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_REPORT_VELOCITY_STATE__H 00041 #define __JAUS_MOBILITY_REPORT_VELOCITY_STATE__H 00042 00043 #include "jaus/core/message.h" 00044 #include "jaus/mobility/mobilitycodes.h" 00045 00046 namespace JAUS 00047 { 00055 class JAUS_MOBILITY_DLL ReportVelocityState : public Message 00056 { 00057 public: 00065 class JAUS_MOBILITY_DLL PresenceVector : public JAUS::PresenceVector 00066 { 00067 public: 00068 const static UShort VelocityX = 0x0001; 00069 const static UShort VelocityY = 0x0002; 00070 const static UShort VelocityZ = 0x0004; 00071 const static UShort VelocityRMS = 0x0008; 00072 const static UShort RollRate = 0x0010; 00073 const static UShort PitchRate = 0x0020; 00074 const static UShort YawRate = 0x0040; 00075 const static UShort RateRMS = 0x0080; 00076 const static UShort TimeStamp = 0x0100; 00077 }; 00084 class JAUS_MOBILITY_DLL Limits : public JAUS::Limits 00085 { 00086 public: 00087 const static double MinVelocity; 00088 const static double MaxVelocity; 00089 const static double MinVelocityRMS; 00090 const static double MaxVelocityRMS; 00091 const static double MinRotationalRate; 00092 const static double MaxRotationalRate; 00093 const static double MinRateRMS; 00094 const static double MaxRateRMS; 00095 }; 00096 ReportVelocityState(const Address& dest = Address(), const Address& src = Address()); 00097 ReportVelocityState(const ReportVelocityState& message); 00098 ~ReportVelocityState(); 00099 bool SetVelocityX(const double value); 00100 bool SetVelocityY(const double value); 00101 bool SetVelocityZ(const double value); 00102 bool SetVelocityRMS(const double value); 00103 bool SetRollRate(const double radians); 00104 bool SetPitchRate(const double value); 00105 bool SetYawRate(const double value); 00106 bool SetRateRMS(const double value); 00107 bool SetTimeStamp(const Time& time); 00108 inline double GetVelocityX() const { return mVelocityX; } 00109 inline double GetVelocityY() const { return mVelocityY; } 00110 inline double GetVelocityZ() const { return mVelocityZ; } 00111 inline double GetVelocityRMS() const { return mVelocityRMS; } 00112 inline double GetRollRate() const { return mRollRate; } 00113 inline double GetPitchRate() const { return mPitchRate; } 00114 inline double GetYawRate() const { return mYawRate; } 00115 inline double GetRateRMS() const { return mRateRMS; } 00116 inline Time GetTimeStamp() const { return mTimeStamp; } 00117 virtual bool IsCommand() const { return false; } 00118 virtual int WriteMessageBody(Packet& packet) const; 00119 virtual int ReadMessageBody(const Packet& packet); 00120 virtual Message* Clone() const { return new ReportVelocityState(*this); } 00121 virtual UInt GetPresenceVector() const { return mPresenceVector; } 00122 virtual UInt GetPresenceVectorSize() const { return USHORT_SIZE; } 00123 virtual UInt GetPresenceVectorMask() const { return 0x01FF; } 00124 virtual UShort GetMessageCodeOfResponse() const { return 0; } 00125 virtual std::string GetMessageName() const { return "Report Velocity State"; } 00126 virtual void ClearMessageBody(); 00127 virtual bool IsLargeDataSet(const unsigned int maxPayloadSize = 1437) const { return false; } 00128 virtual int RunTestCase() const; 00129 virtual void PrintMessageBody() const; 00130 ReportVelocityState& operator=(const ReportVelocityState& message); 00131 protected: 00132 UShort mPresenceVector; 00133 double mVelocityX; 00134 double mVelocityY; 00135 double mVelocityZ; 00136 double mVelocityRMS; 00137 double mRollRate; 00138 double mPitchRate; 00139 double mYawRate; 00140 double mRateRMS; 00141 Time mTimeStamp; 00142 00143 }; 00144 } 00145 00146 #endif 00147 /* End of File */