#pragma once #ifndef THREEAXGYRUNITLOGIC_EXPORTS #ifdef _WIN64 #ifdef _DEBUG #pragma comment(lib, "ThreeAxisGyrUnitLogicX64D.lib") #else #pragma comment(lib, "ThreeAxisGyrUnitLogicX64.lib") #endif #else #ifdef _DEBUG #pragma comment(lib, "ThreeAxisGyrUnitLogicD.lib") #else #pragma comment(lib, "ThreeAxisGyrUnitLogic.lib") #endif #endif #endif #ifdef THREEAXGYRUNITLOGIC_EXPORTS #define THREEAXGYR_API __declspec(dllexport) #else #define THREEAXGYR_API __declspec(dllimport) #endif #include "LogicDevice.h" #include "DIOSLogicDeviceStructure.h" #define THREEAXGYR_POSITION_TRANSVERSE 0 #define THREEAXGYR_POSITION_VERTICAL 1 #define THREEAXGYR_POSITION_FRONTANYANGLE 2 #define THREEAXGYR_POSITION_BACKANYANGLE 3 class THREEAXGYR_API ThreeAxisGyr_LogicDevice : public LogicDevice { public: ThreeAxisGyr_LogicDevice(void); virtual ~ThreeAxisGyr_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); virtual RET_STATUS SYSTEM_CALL GetSEQResource(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* m_nRoll;// BaseJsonDataObject* m_nPitch;// BaseJsonDataObject* m_nYaw;// BaseJsonDataObject* m_bDrop;// BaseJsonDataObject* m_nPosition;// char m_chLog[512]; public: //hsw actions virtual RET_STATUS RollNotify(int nRoll); virtual RET_STATUS PitchNotify(int nPitch); virtual RET_STATUS YawNotify(int nYaw); virtual RET_STATUS DropNotify(bool bDrop); virtual void CalculatePosition(); //we need check each action resource is Support or not //return yes or no inside of OEM module virtual bool Support_RollNotify(); virtual bool Support_PitchNotify(); virtual bool Support_YawNotify(); virtual bool Support_DropNotify(); void LogInfo(string string); void LogWarn(string string); void LogError(string string); };