ThreeAxisGyrUnitLogic.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #pragma once
  2. #ifndef THREEAXGYRUNITLOGIC_EXPORTS
  3. #ifdef _WIN64
  4. #ifdef _DEBUG
  5. #pragma comment(lib, "ThreeAxisGyrUnitLogicX64D.lib")
  6. #else
  7. #pragma comment(lib, "ThreeAxisGyrUnitLogicX64.lib")
  8. #endif
  9. #else
  10. #ifdef _DEBUG
  11. #pragma comment(lib, "ThreeAxisGyrUnitLogicD.lib")
  12. #else
  13. #pragma comment(lib, "ThreeAxisGyrUnitLogic.lib")
  14. #endif
  15. #endif
  16. #endif
  17. #ifdef THREEAXGYRUNITLOGIC_EXPORTS
  18. #define THREEAXGYR_API __declspec(dllexport)
  19. #else
  20. #define THREEAXGYR_API __declspec(dllimport)
  21. #endif
  22. #include "LogicDevice.h"
  23. #include "DIOSLogicDeviceStructure.h"
  24. #define THREEAXGYR_POSITION_TRANSVERSE 0
  25. #define THREEAXGYR_POSITION_VERTICAL 1
  26. #define THREEAXGYR_POSITION_FRONTANYANGLE 2
  27. #define THREEAXGYR_POSITION_BACKANYANGLE 3
  28. class THREEAXGYR_API ThreeAxisGyr_LogicDevice : public LogicDevice
  29. {
  30. public:
  31. ThreeAxisGyr_LogicDevice(void);
  32. virtual ~ThreeAxisGyr_LogicDevice(void);
  33. //get device type
  34. virtual bool SYSTEM_CALL GetDeviceType(GUID &DevType);
  35. //get device resource
  36. virtual RET_STATUS SYSTEM_CALL GetDeviceResource(ResDataObject PARAM_OUT *pDeviceResource);
  37. virtual RET_STATUS SYSTEM_CALL GetSEQResource(ResDataObject PARAM_OUT *pDeviceResource);
  38. //ResourceCommand Request In and Response Out
  39. virtual RET_STATUS SYSTEM_CALL Request(ResDataObject PARAM_IN *pRequest, ResDataObject PARAM_OUT *pResponse);
  40. //notify to lower layer
  41. virtual RET_STATUS SYSTEM_CALL CmdToLogicDev(ResDataObject PARAM_IN *pCmd);
  42. //errors,warnings
  43. void SetErrorInfo(int errCode, char *pErrInfo);
  44. void SetWarningInfo(int warningCode, char *pWarningInfo);
  45. //Data Access
  46. public:
  47. BaseJsonDataObject<int>* m_nRoll;//
  48. BaseJsonDataObject<int>* m_nPitch;//
  49. BaseJsonDataObject<int>* m_nYaw;//
  50. BaseJsonDataObject<bool>* m_bDrop;//
  51. BaseJsonDataObject<int>* m_nPosition;//
  52. char m_chLog[512];
  53. public:
  54. //hsw actions
  55. virtual RET_STATUS RollNotify(int nRoll);
  56. virtual RET_STATUS PitchNotify(int nPitch);
  57. virtual RET_STATUS YawNotify(int nYaw);
  58. virtual RET_STATUS DropNotify(bool bDrop);
  59. virtual void CalculatePosition();
  60. //we need check each action resource is Support or not
  61. //return yes or no inside of OEM module
  62. virtual bool Support_RollNotify();
  63. virtual bool Support_PitchNotify();
  64. virtual bool Support_YawNotify();
  65. virtual bool Support_DropNotify();
  66. void LogInfo(string string);
  67. void LogWarn(string string);
  68. void LogError(string string);
  69. };