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_PATH_SEGMENT__H 00041 #define __JAUS_MOBILITY_SET_LOCAL_PATH_SEGMENT__H 00042 00043 #include "jaus/core/message.h" 00044 #include "jaus/mobility/mobilitycodes.h" 00045 00046 namespace JAUS 00047 { 00065 class JAUS_MOBILITY_DLL SetLocalPathSegment : public Message 00066 { 00067 public: 00075 class JAUS_MOBILITY_DLL PresenceVector : public JAUS::PresenceVector 00076 { 00077 public: 00078 const static Byte P1Z = 0x01; 00079 const static Byte P2Z = 0x02; 00080 const static Byte PathTolerance = 0x04; 00081 }; 00088 class JAUS_MOBILITY_DLL Limits : public JAUS::Limits 00089 { 00090 public: 00091 const static double MinX; 00092 const static double MaxX; 00093 const static double MinY; 00094 const static double MaxY; 00095 const static double MinZ; 00096 const static double MaxZ; 00097 const static double MinWeightingFactor; 00098 const static double MaxWeightingFactor; 00099 const static double MinPathTolerance; 00100 const static double MaxPathTolerance; 00101 }; 00102 SetLocalPathSegment(const Address& dest = Address(), const Address& src = Address()); 00103 SetLocalPathSegment(const SetLocalPathSegment& message); 00104 ~SetLocalPathSegment(); 00105 bool SetP1X(const double degrees); 00106 bool SetP1Y(const double degrees); 00107 bool SetP1Z(const double value); 00108 bool SetP2X(const double degrees); 00109 bool SetP2Y(const double degrees); 00110 bool SetP2Z(const double value); 00111 bool SetWeightingFactor(const double value); 00112 bool SetPathTolerance(const double value); 00113 inline double GetP1X() const { return mP1X; } 00114 inline double GetP1Y() const { return mP1Y; } 00115 inline double GetP1Z() const { return mP1Z; } 00116 inline double GetP2X() const { return mP2X; } 00117 inline double GetP2Y() const { return mP2Y; } 00118 inline double GetP2Z() const { return mP2Z; } 00119 inline double GetWeightingFactor() const { return mWeightingFactor; } 00120 inline double GetPathTolerance() const { return mPathTolerance; } 00121 virtual bool IsCommand() const { return true; } 00122 virtual int WriteMessageBody(Packet& packet) const; 00123 virtual int ReadMessageBody(const Packet& packet); 00124 virtual Message* Clone() const { return new SetLocalPathSegment(*this); } 00125 virtual UInt GetPresenceVector() const { return mPresenceVector; } 00126 virtual UInt GetPresenceVectorSize() const { return BYTE_SIZE; } 00127 virtual UInt GetPresenceVectorMask() const { return 0x07; } 00128 virtual UShort GetMessageCodeOfResponse() const { return 0; } 00129 virtual std::string GetMessageName() const { return "Set Local Path Segment"; } 00130 virtual void ClearMessageBody(); 00131 virtual bool IsLargeDataSet(const unsigned int maxPayloadSize = 1437) const { return false; } 00132 virtual int RunTestCase() const; 00133 SetLocalPathSegment& operator=(const SetLocalPathSegment& message); 00134 protected: 00135 Byte mPresenceVector; 00136 double mP1X; 00137 double mP1Y; 00138 double mP1Z; 00139 double mP2X; 00140 double mP2Y; 00141 double mP2Z; 00142 double mWeightingFactor; 00143 double mPathTolerance; 00144 }; 00145 } 00146 00147 #endif 00148 /* End of File */