#pragma once #ifndef WIFIUNITLOGIC_EXPORTS #ifdef _WIN64 #ifdef _DEBUG #pragma comment(lib, "WifiUnitLogicX64D.lib") #else #pragma comment(lib, "WifiUnitLogicX64.lib") #endif #else #ifdef _DEBUG #pragma comment(lib, "WifiUnitLogicD.lib") #else #pragma comment(lib, "WifiUnitLogic.lib") #endif #endif #endif #ifdef WIFIUNITLOGIC_EXPORTS #define WIFIUNITLOGIC_API __declspec(dllexport) #else #define WIFIUNITLOGIC_API __declspec(dllimport) #endif #include "LogicDevice.h" #include "DIOSLogicDeviceStructure.h" class WIFIUNITLOGIC_API Wifi_LogicDevice : public LogicDevice { public: Wifi_LogicDevice(void); virtual ~Wifi_LogicDevice(void); //get device type virtual bool SYSTEM_CALL GetDeviceType(GUID &DevType); //get device resource virtual RET_STATUS SYSTEM_CALL GetDeviceResource(ResDataObject PARAM_OUT *pDeviceResource); //ResourceCommand Request In and Response Out virtual RET_STATUS SYSTEM_CALL Request(ResDataObject PARAM_IN *pRequest, ResDataObject PARAM_OUT *pResponse); //notify to lower layer virtual RET_STATUS SYSTEM_CALL CmdToLogicDev(ResDataObject PARAM_IN *pCmd); //errors,warnings void SetErrorInfo(int errCode, char *pErrInfo); void SetWarningInfo(int warningCode, char *pWarningInfo); //Data Access public: BaseJsonDataObject< int>* m_nValue; BaseJsonDataObject* m_nState; BaseJsonDataObject* m_nValueMode;//wifi强度时百分比还是dbm模式 public: void LogInfo(string string); void LogWarn(string string); void LogError(string string); public: unsigned int m_nSignalWarnThreshold; unsigned int m_nSignalErrorThreshold; bool SetSignalError(unsigned int nValue); bool SetSignalWarn(unsigned int nValue); virtual bool SetValue(int nValue, int & nStatus); virtual bool SetState(unsigned int nState); virtual bool SetValueMode(unsigned int nState); virtual RET_STATUS DATA_ACTION GetSignalValue(unsigned int & SignalValue); };