123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- #pragma once
- #ifndef DOSEDPC_EXPORTS
- #ifdef _WIN64
- #ifdef _DEBUG
- #pragma comment(lib, "DoseDPCX64D.lib")
- #else
- #pragma comment(lib, "DoseDPCX64.lib")
- #endif
- #else
- #ifdef _DEBUG
- #pragma comment(lib, "DoseDPCD.lib")
- #else
- #pragma comment(lib, "DoseDPC.lib")
- #endif
- #endif
- #endif
- #define PARAM_IN_TYPE
- #ifdef DOSEDPC_EXPORTS
- #define GENDPC_API __declspec(dllexport)
- #else
- #define GENDPC_API __declspec(dllimport)
- #endif
- //#include "DPC.h"
- //
- //extern "C" GENDPC_API DPC* GetDPC();
- //extern "C" GENDPC_API void ReleaseDPC(DPC *p);
- //
- //class GENDPC_API DoseDPC : public DPC
- //{
- // std::string *m_pWorkpath;
- //public:
- // DoseDPC(void);
- // virtual ~DoseDPC(void);
- //
- // virtual bool DpcEntry(ResDataObject &Configuration);
- //
- // virtual ResDataObject GetConnectionType();
- //
- // virtual bool Connect(ResDataObject &Connection);
- //
- // virtual bool Probe(ResDataObject &HardwareInfo);
- //
- // virtual bool SetWorkPath(const char *pWorkPath);
- //
- // //virtual LogicDevice* LoadLogicDevices();
- // virtual PVOID LoadLogicDevices();
- //
- // virtual void UnloadLogicDevices(/*LogicDevice*/PVOID p);
- //
- // virtual bool DisConnect();
- //
- //};
- #include "GeneratorDriver.h"
- class GENDPC_API DoseDPC : public GeneratorDriver
- {
- std::string *m_pWorkpath;
- public:
- DoseDPC(void);
- virtual ~DoseDPC(void);
- ResDataObject m_DeviceConfig; //设备属性
- virtual bool DriverEntry(ResDataObject &Configuration);
- virtual bool SYSTEM_CALL Driver_Probe(ResDataObject& PARAM_OUT HardwareInfo);
- virtual bool SetDriverWorkPath(const char *pWorkPath);
- virtual PVOID SYSTEM_CALL LoadDriver();//无根节点
- virtual void SYSTEM_CALL UnloadDriver();
- //actions
- virtual bool Connect();
- virtual void DisConnect();
- //virtual bool SYSTEM_CALL GetDeviceType(GUID &DevType);
- virtual bool SYSTEM_CALL SetDeviceWorkPath(const char * PARAM_IN pWorkPath);
- RET_STATUS GetDeviceResource(ResDataObject *pDeviceResource);
- RET_STATUS DATA_ACTION GetDeviceConfig(ResDataObject PARAM_OUT *pDeviceConfig);
- RET_STATUS DATA_ACTION SetDeviceConfig(ResDataObject PARAM_IN *DeviceConfig);
-
- //逻辑设备树的加载和卸载
- virtual PVOID SYSTEM_CALL LoadLogicDevices();
- virtual void SYSTEM_CALL UnloadLogicDevices();
- virtual bool SYSTEM_CALL OnHeartBeat();
- virtual bool Device_Probe(ResDataObject &HardwareInfo);
- };
- extern "C" GENDPC_API DriverDPC* GetDriverDPC();
- extern "C" GENDPC_API void ReleaseDriverDPC(DriverDPC *p);
|