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_LOCAL_VECTOR__H 00041 #define __JAUS_MOBILITY_REPORT_LOCAL_VECTOR__H 00042 00043 #include "jaus/core/message.h" 00044 #include "jaus/mobility/mobilitycodes.h" 00045 00046 namespace JAUS 00047 { 00057 class JAUS_MOBILITY_DLL ReportLocalVector : public Message 00058 { 00059 public: 00067 class JAUS_MOBILITY_DLL PresenceVector : public JAUS::PresenceVector 00068 { 00069 public: 00070 const static Byte Speed = 0x01; 00071 const static Byte Z = 0x02; 00072 const static Byte Heading = 0x04; 00073 const static Byte Roll = 0x08; 00074 const static Byte Pitch = 0x10; 00075 }; 00082 class JAUS_MOBILITY_DLL Limits : public JAUS::Limits 00083 { 00084 public: 00085 const static double MinSpeed; 00086 const static double MaxSpeed; 00087 const static double MinZ; 00088 const static double MaxZ; 00089 const static double MinAngle; 00090 const static double MaxAngle; 00091 }; 00092 ReportLocalVector(const Address& dest = Address(), const Address& src = Address()); 00093 ReportLocalVector(const ReportLocalVector& message); 00094 ~ReportLocalVector(); 00095 bool SetSpeed(const double value); 00096 bool SetZ(const double value); 00097 bool SetHeading(const double radians); 00098 bool SetRoll(const double radians); 00099 bool SetPitch(const double radians); 00100 inline double GetSpeed() const { return mSpeed; } 00101 inline double GetZ() const { return mZ; } 00102 inline double GetHeading() const { return mHeading; } 00103 inline double GetRoll() const { return mRoll; } 00104 inline double GetPitch() const { return mPitch; } 00105 virtual bool IsCommand() const { return false; } 00106 virtual int WriteMessageBody(Packet& packet) const; 00107 virtual int ReadMessageBody(const Packet& packet); 00108 virtual Message* Clone() const { return new ReportLocalVector(*this); } 00109 virtual UInt GetPresenceVector() const { return mPresenceVector; } 00110 virtual UInt GetPresenceVectorSize() const { return BYTE_SIZE; } 00111 virtual UInt GetPresenceVectorMask() const { return 0x1F; } 00112 virtual UShort GetMessageCodeOfResponse() const { return 0; } 00113 virtual std::string GetMessageName() const { return "Report Local Vector"; } 00114 virtual void ClearMessageBody(); 00115 virtual bool IsLargeDataSet(const unsigned int maxPayloadSize = 1437) const { return false; } 00116 virtual int RunTestCase() const; 00117 ReportLocalVector& operator=(const ReportLocalVector& message); 00118 protected: 00119 Byte mPresenceVector; 00120 double mSpeed; 00121 double mZ; 00122 double mHeading; 00123 double mRoll; 00124 double mPitch; 00125 00126 }; 00127 } 00128 00129 #endif 00130 /* End of File */