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_PATH_SEGMENT__H 00041 #define __JAUS_MOBILITY_REPORT_LOCAL_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 ReportLocalPathSegment : public Message 00057 { 00058 public: 00066 class JAUS_MOBILITY_DLL PresenceVector : public JAUS::PresenceVector 00067 { 00068 public: 00069 const static Byte P1Z = 0x01; 00070 const static Byte P2Z = 0x02; 00071 const static Byte PathTolerance = 0x04; 00072 }; 00079 class JAUS_MOBILITY_DLL Limits : public JAUS::Limits 00080 { 00081 public: 00082 const static double MinX; 00083 const static double MaxX; 00084 const static double MinY; 00085 const static double MaxY; 00086 const static double MinZ; 00087 const static double MaxZ; 00088 const static double MinWeightingFactor; 00089 const static double MaxWeightingFactor; 00090 const static double MinPathTolerance; 00091 const static double MaxPathTolerance; 00092 }; 00093 ReportLocalPathSegment(const Address& dest = Address(), const Address& src = Address()); 00094 ReportLocalPathSegment(const ReportLocalPathSegment& message); 00095 ~ReportLocalPathSegment(); 00096 bool SetP1X(const double degrees); 00097 bool SetP1Y(const double degrees); 00098 bool SetP1Z(const double value); 00099 bool SetP2X(const double degrees); 00100 bool SetP2Y(const double degrees); 00101 bool SetP2Z(const double value); 00102 bool SetWeightingFactor(const double value); 00103 bool SetPathTolerance(const double value); 00104 inline double GetP1X() const { return mP1X; } 00105 inline double GetP1Y() const { return mP1Y; } 00106 inline double GetP1Z() const { return mP1Z; } 00107 inline double GetP2X() const { return mP2X; } 00108 inline double GetP2Y() const { return mP2Y; } 00109 inline double GetP2Z() const { return mP2Z; } 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 ReportLocalPathSegment(*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 Local Path Segment"; } 00121 virtual void ClearMessageBody(); 00122 virtual bool IsLargeDataSet(const unsigned int maxPayloadSize = 1437) const { return false; } 00123 virtual int RunTestCase() const; 00124 ReportLocalPathSegment& operator=(const ReportLocalPathSegment& message); 00125 protected: 00126 Byte mPresenceVector; 00127 double mP1X; 00128 double mP1Y; 00129 double mP1Z; 00130 double mP2X; 00131 double mP2Y; 00132 double mP2Z; 00133 double mWeightingFactor; 00134 double mPathTolerance; 00135 }; 00136 } 00137 00138 #endif 00139 /* End of File */