VirtualDevice.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #pragma once
  2. #include "ModuleDevice.h"
  3. #include "ModuleClient.h"
  4. #define CONTAINERDPC_API
  5. #define CONTAINERDPC_C_API extern "C"
  6. class CONTAINERDPC_API VirtualDevice :
  7. public ModuleDevice
  8. {
  9. protected:
  10. string m_strVirtualDeviceName; //虚拟设备类型关键字,如果ABS/DTS/AGD/AEC等,用于识别模型 模板
  11. string m_strServiceDevicePath; //服务设备CCOS路径
  12. string m_strHostDevicePath; //宿主设备CCOS路径
  13. virtual RET_STATUS OnNotify(string keyStr, ResDataObject& resContext) ;
  14. public:
  15. VirtualDevice();
  16. virtual ~VirtualDevice();
  17. void SetDeviceInfo(string strHostDev, string strServDev);
  18. void OnSetClientID() override;
  19. RET_STATUS Request(ResDataObject PARAM_IN* pRequest, ResDataObject PARAM_OUT* pResponse) override;
  20. //virtual RET_STATUS UpdateItem(const char* pszProperty, const char* pszValueUpdate, ResDataObject& resRespons);
  21. RET_STATUS OnUpdate(const char* pszProperty, const char* pszValueUpdate, ResDataObject& resRespons) override;
  22. //virtual RET_STATUS OnDel(const char* pszPropery, ResDataObject& resDelValue, ResDataObject& resResponse);
  23. //virtual RET_STATUS OnAdd(const char* pszPropery, ResDataObject& reAddValue, ResDataObject& resResponse);
  24. RET_STATUS SetItem(const char* pszPropery, ResDataObject& resSetValue, ResDataObject& resResponse) override;
  25. RET_STATUS GetItem(const char* pszPropery, ResDataObject& resResponse) override;
  26. //virtual RET_STATUS OnAction(const char* pszActionName, const char* pszParams, ResDataObject& resResponse);
  27. //virtual RET_STATUS OnMessage(const char* pszTopic, const char* pszMessageValue, ResDataObject& resResponse);
  28. };