SDK.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #pragma once
  2. // 下列 ifdef 块是创建使从 DLL 导出更简单的
  3. // 宏的标准方法。此 DLL 中的所有文件都是用命令行上定义的 {0}_EXPORTS
  4. // 符号编译的。在使用此 DLL 的
  5. // 任何项目上不应定义此符号。这样,源文件中包含此文件的任何其他项目都会将
  6. // {0}_API 函数视为是从 DLL 导入的,而此 DLL 则将用此宏定义的
  7. // 符号视为是被导出的。
  8. #ifdef IRCONTROL_EXPORTS
  9. #define IRCONTROL_API __declspec(dllexport)
  10. #else
  11. #define IRCONTROL_API __declspec(dllimport)
  12. #endif
  13. #ifndef __MAKE_PYD__ // 是否使用PYD;
  14. extern "C" IRCONTROL_API int nIRControl;
  15. //////////////////////////////////////////////////////////////////////////
  16. // 程序是否在运行;
  17. extern "C" IRCONTROL_API DWORD IsAppRunning(LPCTSTR lpszAppDir);
  18. // 启动红老鼠服务进程;
  19. extern "C" IRCONTROL_API bool StartIRApp(LPCTSTR lpszAppDir, LPCTSTR lpSignalXml, DWORD dwPort);
  20. // 关闭红老鼠;
  21. extern "C" IRCONTROL_API bool CloseApp();
  22. //////////////////////////////////////////////////////////////////////////
  23. extern "C" IRCONTROL_API bool Connect(LPCTSTR lpServer, int port);
  24. extern "C" IRCONTROL_API void DisConnect();
  25. // 返回设备列表,以逗号隔开;
  26. extern "C" IRCONTROL_API LPCTSTR getDeviceNames();
  27. // 获取信号数据集信号,以\n分隔;
  28. extern "C" IRCONTROL_API LPCTSTR getSignalsName();
  29. // 加载xml文件;
  30. extern "C" IRCONTROL_API bool loadSignalDataSet(LPCTSTR lpDatasetXml);
  31. // 发送单个信号;
  32. extern "C" IRCONTROL_API bool sendSignal(LPCTSTR lpSignal, int send_times, int sleep_time);
  33. // 发送多个信号,以逗号分隔;
  34. extern "C" IRCONTROL_API bool sendSignals(LPCTSTR lpSignals, int sleep_time);
  35. // 发送重复信号;
  36. extern "C" IRCONTROL_API bool sendRepeatsSignal(LPCTSTR lpSignal, int repeat_time);
  37. #endif