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_GLOBAL_PATH_SEGMENT__H 00041 #define __JAUS_MOBILITY_SET_GLOBAL_PATH_SEGMENT__H 00042 00043 #include "jaus/core/message.h" 00044 #include "jaus/mobility/mobilitycodes.h" 00045 00046 namespace JAUS 00047 { 00066 class JAUS_MOBILITY_DLL SetGlobalPathSegment : public Message 00067 { 00068 public: 00076 class JAUS_MOBILITY_DLL PresenceVector : public JAUS::PresenceVector 00077 { 00078 public: 00079 const static Byte P1Altitude = 0x01; 00080 const static Byte P2Altitude = 0x02; 00081 const static Byte PathTolerance = 0x04; 00082 }; 00089 class JAUS_MOBILITY_DLL Limits : public JAUS::Limits 00090 { 00091 public: 00092 const static double MinLatitude; 00093 const static double MaxLatitude; 00094 const static double MinLongitude; 00095 const static double MaxLongitude; 00096 const static double MinElevation; 00097 const static double MaxElevation; 00098 const static double MinWeightingFactor; 00099 const static double MaxWeightingFactor; 00100 const static double MinPathTolerance; 00101 const static double MaxPathTolerance; 00102 }; 00103 SetGlobalPathSegment(const Address& dest = Address(), const Address& src = Address()); 00104 SetGlobalPathSegment(const SetGlobalPathSegment& message); 00105 ~SetGlobalPathSegment(); 00106 bool SetP1Latitude(const double degrees); 00107 bool SetP1Longitude(const double degrees); 00108 bool SetP1Altitude(const double value); 00109 bool SetP2Latitude(const double degrees); 00110 bool SetP2Longitude(const double degrees); 00111 bool SetP2Altitude(const double value); 00112 bool SetWeightingFactor(const double value); 00113 bool SetPathTolerance(const double value); 00114 inline double GetP1Latitude() const { return mP1Latitude; } 00115 inline double GetP1Longitude() const { return mP1Longitude; } 00116 inline double GetP1Altitude() const { return mP1Altitude; } 00117 inline double GetP2Latitude() const { return mP2Latitude; } 00118 inline double GetP2Longitude() const { return mP2Longitude; } 00119 inline double GetP2Altitude() const { return mP2Altitude; } 00120 inline double GetWeightingFactor() const { return mWeightingFactor; } 00121 inline double GetPathTolerance() const { return mPathTolerance; } 00122 virtual bool IsCommand() const { return true; } 00123 virtual int WriteMessageBody(Packet& packet) const; 00124 virtual int ReadMessageBody(const Packet& packet); 00125 virtual Message* Clone() const { return new SetGlobalPathSegment(*this); } 00126 virtual UInt GetPresenceVector() const { return mPresenceVector; } 00127 virtual UInt GetPresenceVectorSize() const { return BYTE_SIZE; } 00128 virtual UInt GetPresenceVectorMask() const { return 0x07; } 00129 virtual UShort GetMessageCodeOfResponse() const { return 0; } 00130 virtual std::string GetMessageName() const { return "Set Global Path Segment"; } 00131 virtual void ClearMessageBody(); 00132 virtual bool IsLargeDataSet(const unsigned int maxPayloadSize = 1437) const { return false; } 00133 virtual int RunTestCase() const; 00134 SetGlobalPathSegment& operator=(const SetGlobalPathSegment& message); 00135 protected: 00136 Byte mPresenceVector; 00137 double mP1Latitude; 00138 double mP1Longitude; 00139 double mP1Altitude; 00140 double mP2Latitude; 00141 double mP2Longitude; 00142 double mP2Altitude; 00143 double mWeightingFactor; 00144 double mPathTolerance; 00145 00146 }; 00147 } 00148 00149 #endif 00150 /* End of File */