LocalConfig.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #pragma once
  2. // 下列 ifdef 块是创建使从 DLL 导出更简单的
  3. // 宏的标准方法。此 DLL 中的所有文件都是用命令行上定义的 LOCALCONFIG_EXPORTS
  4. // 符号编译的。在使用此 DLL 的
  5. // 任何其他项目上不应定义此符号。这样,源文件中包含此文件的任何其他项目都会将
  6. // LOCALCONFIG_API 函数视为是从 DLL 导入的,而此 DLL 则将用此宏定义的
  7. // 符号视为是被导出的。
  8. #ifndef LOCALCONFIG_EXPORTS
  9. #ifdef _WIN64
  10. #ifdef _DEBUG
  11. #pragma comment(lib, "LocalConfigX64D.lib")
  12. #else
  13. #pragma comment(lib, "LocalConfigX64.lib")
  14. #endif
  15. #else
  16. #ifdef _DEBUG
  17. #pragma comment(lib, "LocalConfigD.lib")
  18. #else
  19. #pragma comment(lib, "LocalConfig.lib")
  20. #endif
  21. #endif
  22. #endif
  23. #ifdef LOCALCONFIG_EXPORTS
  24. #define LOCALCONFIG_API __declspec(dllexport)
  25. #define LOCALCONFIG_C_API extern "C" __declspec(dllexport)
  26. #else
  27. #define LOCALCONFIG_API __declspec(dllimport)
  28. #define LOCALCONFIG_C_API extern "C" __declspec(dllimport)
  29. #endif
  30. #include "Definitions.h"
  31. #include "ResDataObject.h"
  32. #include <string>
  33. using namespace std;
  34. LOCALCONFIG_API void SetConfigMode(DIOS_PROC_TYPE Master);//3 = DiosClient,2 = Channel,1 = Master,0 = Slave
  35. LOCALCONFIG_API DIOS_PROC_TYPE GetConfigMode();
  36. LOCALCONFIG_API bool getEbusLogFlag();
  37. LOCALCONFIG_API ResDataObject& getLocalEbusId();
  38. LOCALCONFIG_API ResDataObject& getLocalEbusRouterIp();
  39. LOCALCONFIG_API ResDataObject& getLocalEbusPort();
  40. LOCALCONFIG_API ResDataObject& getChannelEbusId();
  41. LOCALCONFIG_API ResDataObject& getChannelRootpath();
  42. LOCALCONFIG_API ResDataObject& getLocalMachineId();
  43. LOCALCONFIG_API ResDataObject& getRootpath();
  44. LOCALCONFIG_API bool getP2pFlag();
  45. LOCALCONFIG_API ResDataObject getP2pServerIp();
  46. LOCALCONFIG_API ResDataObject getP2pRole();
  47. LOCALCONFIG_API ResDataObject MakeWorkPath(ResDataObject &probeInfo, ResDataObject &Connection, ResDataObject &ProcPath, bool ForWork);
  48. LOCALCONFIG_API ResDataObject MakeDevicePath(ResDataObject &probeInfo, ResDataObject &Connection, ResDataObject &SubPath);
  49. LOCALCONFIG_API ResDataObject& GetDriverConfigPath();
  50. LOCALCONFIG_API ResDataObject& GetLogConfigPath();
  51. LOCALCONFIG_API bool GetDriverConfigFiles(ResDataObject &filelist);
  52. LOCALCONFIG_API bool GetLogPatternResource(ResDataObject &Pattern);
  53. LOCALCONFIG_API bool MakeUniqEbusId(ResDataObject& res);
  54. LOCALCONFIG_API bool GetClientUniqEbusId(ResDataObject& res);
  55. //等有了stream类型的共享内存模块以后,memorysize将会有用.
  56. LOCALCONFIG_API bool GetShareMemSettings(DWORD &BigBlockSize, DWORD &BigBlockCount, DWORD &SmallBlockSize, DWORD &SmallBlockCount);
  57. LOCALCONFIG_API bool GetShareMemLogLevel(int &LogLevel);