DoseDPC.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. #pragma once
  2. #ifndef DOSEDPC_EXPORTS
  3. #ifdef _WIN64
  4. #ifdef _DEBUG
  5. #pragma comment(lib, "DoseDPCX64D.lib")
  6. #else
  7. #pragma comment(lib, "DoseDPCX64.lib")
  8. #endif
  9. #else
  10. #ifdef _DEBUG
  11. #pragma comment(lib, "DoseDPCD.lib")
  12. #else
  13. #pragma comment(lib, "DoseDPC.lib")
  14. #endif
  15. #endif
  16. #endif
  17. #define PARAM_IN_TYPE
  18. #ifdef DOSEDPC_EXPORTS
  19. #define GENDPC_API __declspec(dllexport)
  20. #else
  21. #define GENDPC_API __declspec(dllimport)
  22. #endif
  23. //#include "DPC.h"
  24. //
  25. //extern "C" GENDPC_API DPC* GetDPC();
  26. //extern "C" GENDPC_API void ReleaseDPC(DPC *p);
  27. //
  28. //class GENDPC_API DoseDPC : public DPC
  29. //{
  30. // std::string *m_pWorkpath;
  31. //public:
  32. // DoseDPC(void);
  33. // virtual ~DoseDPC(void);
  34. //
  35. // virtual bool DpcEntry(ResDataObject &Configuration);
  36. //
  37. // virtual ResDataObject GetConnectionType();
  38. //
  39. // virtual bool Connect(ResDataObject &Connection);
  40. //
  41. // virtual bool Probe(ResDataObject &HardwareInfo);
  42. //
  43. // virtual bool SetWorkPath(const char *pWorkPath);
  44. //
  45. // //virtual LogicDevice* LoadLogicDevices();
  46. // virtual PVOID LoadLogicDevices();
  47. //
  48. // virtual void UnloadLogicDevices(/*LogicDevice*/PVOID p);
  49. //
  50. // virtual bool DisConnect();
  51. //
  52. //};
  53. #include "GeneratorDriver.h"
  54. class GENDPC_API DoseDPC : public GeneratorDriver
  55. {
  56. std::string *m_pWorkpath;
  57. public:
  58. DoseDPC(void);
  59. virtual ~DoseDPC(void);
  60. ResDataObject m_DeviceConfig; //设备属性
  61. virtual bool DriverEntry(ResDataObject &Configuration);
  62. virtual bool SYSTEM_CALL Driver_Probe(ResDataObject& PARAM_OUT HardwareInfo);
  63. virtual bool SetDriverWorkPath(const char *pWorkPath);
  64. virtual PVOID SYSTEM_CALL LoadDriver();//无根节点
  65. virtual void SYSTEM_CALL UnloadDriver();
  66. //actions
  67. virtual bool Connect();
  68. virtual void DisConnect();
  69. //virtual bool SYSTEM_CALL GetDeviceType(GUID &DevType);
  70. virtual bool SYSTEM_CALL SetDeviceWorkPath(const char * PARAM_IN pWorkPath);
  71. RET_STATUS GetDeviceResource(ResDataObject *pDeviceResource);
  72. RET_STATUS DATA_ACTION GetDeviceConfig(ResDataObject PARAM_OUT *pDeviceConfig);
  73. RET_STATUS DATA_ACTION SetDeviceConfig(ResDataObject PARAM_IN *DeviceConfig);
  74. //逻辑设备树的加载和卸载
  75. virtual PVOID SYSTEM_CALL LoadLogicDevices();
  76. virtual void SYSTEM_CALL UnloadLogicDevices();
  77. virtual bool SYSTEM_CALL OnHeartBeat();
  78. virtual bool Device_Probe(ResDataObject &HardwareInfo);
  79. };
  80. extern "C" GENDPC_API DriverDPC* GetDriverDPC();
  81. extern "C" GENDPC_API void ReleaseDriverDPC(DriverDPC *p);