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