WifiUnitLogic.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #pragma once
  2. #ifndef WIFIUNITLOGIC_EXPORTS
  3. #ifdef _WIN64
  4. #ifdef _DEBUG
  5. #pragma comment(lib, "WifiUnitLogicX64D.lib")
  6. #else
  7. #pragma comment(lib, "WifiUnitLogicX64.lib")
  8. #endif
  9. #else
  10. #ifdef _DEBUG
  11. #pragma comment(lib, "WifiUnitLogicD.lib")
  12. #else
  13. #pragma comment(lib, "WifiUnitLogic.lib")
  14. #endif
  15. #endif
  16. #endif
  17. #ifdef WIFIUNITLOGIC_EXPORTS
  18. #define WIFIUNITLOGIC_API __declspec(dllexport)
  19. #else
  20. #define WIFIUNITLOGIC_API __declspec(dllimport)
  21. #endif
  22. #include "LogicDevice.h"
  23. #include "DIOSLogicDeviceStructure.h"
  24. class WIFIUNITLOGIC_API Wifi_LogicDevice : public LogicDevice
  25. {
  26. public:
  27. Wifi_LogicDevice(void);
  28. virtual ~Wifi_LogicDevice(void);
  29. //get device type
  30. virtual bool SYSTEM_CALL GetDeviceType(GUID &DevType);
  31. //get device resource
  32. virtual RET_STATUS SYSTEM_CALL GetDeviceResource(ResDataObject PARAM_OUT *pDeviceResource);
  33. //ResourceCommand Request In and Response Out
  34. virtual RET_STATUS SYSTEM_CALL Request(ResDataObject PARAM_IN *pRequest, ResDataObject PARAM_OUT *pResponse);
  35. //notify to lower layer
  36. virtual RET_STATUS SYSTEM_CALL CmdToLogicDev(ResDataObject PARAM_IN *pCmd);
  37. //errors,warnings
  38. void SetErrorInfo(int errCode, char *pErrInfo);
  39. void SetWarningInfo(int warningCode, char *pWarningInfo);
  40. //Data Access
  41. public:
  42. BaseJsonDataObject< int>* m_nValue;
  43. BaseJsonDataObject<unsigned int>* m_nState;
  44. BaseJsonDataObject<unsigned int>* m_nValueMode;//wifiÇ¿¶Èʱ°Ù·Ö±È»¹ÊÇdbmģʽ
  45. public:
  46. void LogInfo(string string);
  47. void LogWarn(string string);
  48. void LogError(string string);
  49. public:
  50. unsigned int m_nSignalWarnThreshold;
  51. unsigned int m_nSignalErrorThreshold;
  52. bool SetSignalError(unsigned int nValue);
  53. bool SetSignalWarn(unsigned int nValue);
  54. virtual bool SetValue(int nValue, int & nStatus);
  55. virtual bool SetState(unsigned int nState);
  56. virtual bool SetValueMode(unsigned int nState);
  57. virtual RET_STATUS DATA_ACTION GetSignalValue(unsigned int & SignalValue);
  58. };