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_WAYPOINT__H 00041 #define __JAUS_MOBILITY_REPORT_LOCAL_WAYPOINT__H 00042 00043 #include "jaus/core/message.h" 00044 #include "jaus/mobility/mobilitycodes.h" 00045 00046 namespace JAUS 00047 { 00057 class JAUS_MOBILITY_DLL ReportLocalWaypoint : public Message 00058 { 00059 public: 00067 class JAUS_MOBILITY_DLL PresenceVector : public JAUS::PresenceVector 00068 { 00069 public: 00070 const static Byte Z = 0x01; 00071 const static Byte Roll = 0x02; 00072 const static Byte Pitch = 0x04; 00073 const static Byte Yaw = 0x08; 00074 const static Byte WaypointTolerance = 0x10; 00075 const static Byte PathTolerance = 0x20; 00076 }; 00083 class JAUS_MOBILITY_DLL Limits : public JAUS::Limits 00084 { 00085 public: 00086 const static double MinPoint; 00087 const static double MaxPoint; 00088 const static double MinAngle; 00089 const static double MaxAngle; 00090 const static double MinWaypointTolerance; 00091 const static double MaxWaypointTolerance; 00092 const static double MinPathTolerance; 00093 const static double MaxPathTolerance; 00094 }; 00095 ReportLocalWaypoint(const Address& dest = Address(), const Address& src = Address()); 00096 ReportLocalWaypoint(const ReportLocalWaypoint& message); 00097 ~ReportLocalWaypoint(); 00098 bool SetX(const double value); 00099 bool SetY(const double value); 00100 bool SetZ(const double value); 00101 bool SetRoll(const double radians); 00102 bool SetPitch(const double radians); 00103 bool SetYaw(const double radians); 00104 bool SetWaypointTolerance(const double value); 00105 bool SetPathTolerance(const double value); 00106 inline double GetX() const { return mX; } 00107 inline double GetY() const { return mY; } 00108 inline double GetZ() const { return mZ; } 00109 inline double GetRoll() const { return mRoll; } 00110 inline double GetPitch() const { return mPitch; } 00111 inline double GetYaw() const { return mYaw; } 00112 inline double GetWaypointTolerance() const { return mWaypointTolerance; } 00113 inline double GetPathTolerance() const { return mPathTolerance; } 00114 virtual bool IsCommand() const { return false; } 00115 virtual int WriteMessageBody(Packet& packet) const; 00116 virtual int ReadMessageBody(const Packet& packet); 00117 virtual Message* Clone() const { return new ReportLocalWaypoint(*this); } 00118 virtual UInt GetPresenceVector() const { return mPresenceVector; } 00119 virtual UInt GetPresenceVectorSize() const { return BYTE_SIZE; } 00120 virtual UInt GetPresenceVectorMask() const { return 0x3F; } 00121 virtual UShort GetMessageCodeOfResponse() const { return 0; } 00122 virtual std::string GetMessageName() const { return "Report Local Waypoint"; } 00123 virtual void ClearMessageBody(); 00124 virtual bool IsLargeDataSet(const unsigned int maxPayloadSize = 1437) const { return false; } 00125 virtual int RunTestCase() const; 00126 ReportLocalWaypoint& operator=(const ReportLocalWaypoint& message); 00127 protected: 00128 Byte mPresenceVector; 00129 double mX; 00130 double mY; 00131 double mZ; 00132 double mRoll; 00133 double mPitch; 00134 double mYaw; 00135 double mWaypointTolerance; 00136 double mPathTolerance; 00137 00138 }; 00139 } 00140 00141 #endif 00142 /* End of File */