DetectorCLI.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // 下列 ifdef 块是创建使从 DLL 导出更简单的
  2. // 宏的标准方法。此 DLL 中的所有文件都是用命令行上定义的 DETECTORCLI_EXPORTS
  3. // 符号编译的。在使用此 DLL 的
  4. // 任何其他项目上不应定义此符号。这样,源文件中包含此文件的任何其他项目都会将
  5. // DETECTORCLI_API 函数视为是从 DLL 导入的,而此 DLL 则将用此宏定义的
  6. // 符号视为是被导出的。
  7. #ifndef DETECTORCLI_EXPORTS
  8. #ifdef _WIN64
  9. #ifdef _DEBUG
  10. #pragma comment(lib, "DetectorCLIX64D.lib")
  11. #else
  12. #pragma comment(lib, "DetectorCLIX64.lib")
  13. #endif
  14. #else
  15. #ifdef _DEBUG
  16. #pragma comment(lib, "DetectorCLID.lib")
  17. #else
  18. #pragma comment(lib, "DetectorCLI.lib")
  19. #endif
  20. #endif
  21. #endif
  22. #ifdef DETECTORCLI_EXPORTS
  23. #define DETECTORCLI_API __declspec(dllexport)
  24. #define DETECTORCLI_C_API extern "C" __declspec(dllexport)
  25. #else
  26. #define DETECTORCLI_API __declspec(dllimport)
  27. #define DETECTORCLI_C_API extern "C" __declspec(dllimport)
  28. #endif
  29. #include "DiosConsoleScript.h"
  30. class CommonLogicClient;
  31. // 此类是从 DetectorCLI.dll 导出的
  32. class DETECTORCLI_API CDetectorCLI : public DiosConsoleScript
  33. {
  34. public:
  35. CDetectorCLI(void);
  36. virtual ~CDetectorCLI();
  37. // TODO: 在此添加您的方法。
  38. virtual void Help();
  39. //inputcmd : helloworld 2020 Joy_Derk
  40. //[0]:helloworld
  41. //[1]:2020
  42. //[2]:Joy_Derk
  43. //[0]:command,[1]:P1,[2]:P2...
  44. virtual DCS_RET Command(ResDataObject &Req);
  45. DCS_RET ConnectDemoFD(ResDataObject &Req);
  46. DCS_RET DisconnectDemoFD(ResDataObject &Req);
  47. DCS_RET NewModelTest(ResDataObject &Req);
  48. };
  49. DETECTORCLI_C_API DiosConsoleScript* LoadDCS();//user要集成此功能
  50. DETECTORCLI_C_API void UnLoadDCS(DiosConsoleScript* pDcs);