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