00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 #ifndef __JAUS_MOBILITY_QUERY_ACCELERATION_LIMIT__H 00041 #define __JAUS_MOBILITY_QUERY_ACCELERATION_LIMIT__H 00042 00043 #include "jaus/core/message.h" 00044 #include "jaus/mobility/mobilitycodes.h" 00045 00046 namespace JAUS 00047 { 00057 class JAUS_MOBILITY_DLL QueryAccelerationLimit : public Message 00058 { 00059 public: 00067 class JAUS_MOBILITY_DLL PresenceVector : public JAUS::PresenceVector 00068 { 00069 public: 00070 const static Byte AccelerationX = 0x01; 00071 const static Byte AccelerationY = 0x02; 00072 const static Byte AccelerationZ = 0x04; 00073 const static Byte RollAcceleration = 0x08; 00074 const static Byte PitchAcceleration = 0x10; 00075 const static Byte YawAcceleration = 0x20; 00076 }; 00077 // Command types when issuing commands. 00078 enum Command 00079 { 00080 SetMaximumAllowedValues = 0, 00081 SetMinimumAllowedValues 00082 }; 00083 QueryAccelerationLimit(const Address& dest = Address(), const Address& src = Address()); 00084 QueryAccelerationLimit(const QueryAccelerationLimit& message); 00085 ~QueryAccelerationLimit(); 00086 void SetPresenceVector(const Byte presenceVector) { mPresenceVector = presenceVector; } 00087 inline Byte SetCommandType(const Command type) { return mCommandType = type; } 00088 inline Byte GetCommandType() const { return mCommandType; } 00089 virtual bool IsCommand() const { return false; } 00090 virtual int WriteMessageBody(Packet& packet) const; 00091 virtual int ReadMessageBody(const Packet& packet); 00092 virtual Message* Clone() const { return new QueryAccelerationLimit(*this); } 00093 virtual UInt GetPresenceVector() const { return mPresenceVector; } 00094 virtual UInt GetPresenceVectorSize() const { return BYTE_SIZE; } 00095 virtual UInt GetPresenceVectorMask() const { return 0x3F; } 00096 virtual UShort GetMessageCodeOfResponse() const { return REPORT_ACCELERATION_LIMIT; } 00097 virtual std::string GetMessageName() const { return "Query Acceleration Limit"; } 00098 virtual void ClearMessageBody(); 00099 virtual bool IsLargeDataSet(const unsigned int maxPayloadSize = 1437) const { return false; } 00100 virtual int RunTestCase() const; 00101 QueryAccelerationLimit& operator=(const QueryAccelerationLimit& message); 00102 protected: 00103 Byte mPresenceVector; 00104 Command mCommandType; 00105 }; 00106 } 00107 00108 #endif 00109 /* End of File */