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_WRENCH_EFFORT__H 00041 #define __JAUS_MOBILITY_REPORT_WRENCH_EFFORT__H 00042 00043 #include "jaus/core/message.h" 00044 #include "jaus/mobility/mobilitycodes.h" 00045 00046 namespace JAUS 00047 { 00057 class JAUS_MOBILITY_DLL ReportWrenchEffort : public Message 00058 { 00059 public: 00067 class JAUS_MOBILITY_DLL PresenceVector : public JAUS::PresenceVector 00068 { 00069 public: 00070 const static UShort PropulsiveLinearEffortX = 0x0001; 00071 const static UShort PropulsiveLinearEffortY = 0x0002; 00072 const static UShort PropulsiveLinearEffortZ = 0x0004; 00073 const static UShort PropulsiveRotationalEffortX = 0x0008; 00074 const static UShort PropulsiveRotationalEffortY = 0x0010; 00075 const static UShort PropulsiveRotationalEffortZ = 0x0020; 00076 const static UShort ResistiveLinearEffortX = 0x0040; 00077 const static UShort ResistiveLinearEffortY = 0x0080; 00078 const static UShort ResistiveLinearEffortZ = 0x0100; 00079 const static UShort ResistiveRotationalEffortX = 0x0200; 00080 const static UShort ResistiveRotationalEffortY = 0x0400; 00081 const static UShort ResistiveRotationalEffortZ = 0x0800; 00082 }; 00083 ReportWrenchEffort(const Address& dest = Address(), const Address& src = Address()); 00084 ReportWrenchEffort(const ReportWrenchEffort& message); 00085 ~ReportWrenchEffort(); 00086 bool SetPropulsiveLinearEffortX(const double percent); 00087 bool SetPropulsiveLinearEffortY(const double percent); 00088 bool SetPropulsiveLinearEffortZ(const double percent); 00089 bool SetPropulsiveRotationalEffortX(const double percent); 00090 bool SetPropulsiveRotationalEffortY(const double percent); 00091 bool SetPropulsiveRotationalEffortZ(const double percent); 00092 bool SetResistiveLinearEffortX(const double percent); 00093 bool SetResistiveLinearEffortY(const double percent); 00094 bool SetResistiveLinearEffortZ(const double percent); 00095 bool SetResistiveRotationalEffortX(const double percent); 00096 bool SetResistiveRotationalEffortY(const double percent); 00097 bool SetResistiveRotationalEffortZ(const double percent); 00098 inline double GetPropulsiveLinearEffortX() const { return mPropulsiveLinearEffortX; } 00099 inline double GetPropulsiveLinearEffortY() const { return mPropulsiveLinearEffortY; } 00100 inline double GetPropulsiveLinearEffortZ() const { return mPropulsiveLinearEffortZ; } 00101 inline double GetPropulsiveRotationalEffortX() const { return mPropulsiveRotationalEffortX; } 00102 inline double GetPropulsiveRotationalEffortY() const { return mPropulsiveRotationalEffortY; } 00103 inline double GetPropulsiveRotationalEffortZ() const { return mPropulsiveRotationalEffortZ; } 00104 inline double GetResistiveLinearEffortX() const { return mResistiveLinearEffortX; } 00105 inline double GetResistiveLinearEffortY() const { return mResistiveLinearEffortY; } 00106 inline double GetResistiveLinearEffortZ() const { return mResistiveLinearEffortZ; } 00107 inline double GetResistiveRotationalEffortX() const { return mResistiveRotationalEffortX; } 00108 inline double GetResistiveRotationalEffortY() const { return mResistiveRotationalEffortY; } 00109 inline double GetResistiveRotationalEffortZ() const { return mResistiveRotationalEffortZ; } 00110 virtual bool IsCommand() const { return false; } 00111 virtual int WriteMessageBody(Packet& packet) const; 00112 virtual int ReadMessageBody(const Packet& packet); 00113 virtual Message* Clone() const { return new ReportWrenchEffort(*this); } 00114 virtual UInt GetPresenceVector() const { return mPresenceVector; } 00115 virtual UInt GetPresenceVectorSize() const { return USHORT_SIZE; } 00116 virtual UInt GetPresenceVectorMask() const { return 0x0FFF; } 00117 virtual UShort GetMessageCodeOfResponse() const { return 0; } 00118 virtual std::string GetMessageName() const { return "Set Wrench Effort"; } 00119 virtual void ClearMessageBody(); 00120 virtual bool IsLargeDataSet(const unsigned int maxPayloadSize = 1437) const { return false; } 00121 virtual int RunTestCase() const; 00122 ReportWrenchEffort& operator=(const ReportWrenchEffort& message); 00123 protected: 00124 UShort mPresenceVector; 00125 double mPropulsiveLinearEffortX; 00126 double mPropulsiveLinearEffortY; 00127 double mPropulsiveLinearEffortZ; 00128 double mPropulsiveRotationalEffortX; 00129 double mPropulsiveRotationalEffortY; 00130 double mPropulsiveRotationalEffortZ; 00131 double mResistiveLinearEffortX; 00132 double mResistiveLinearEffortY; 00133 double mResistiveLinearEffortZ; 00134 double mResistiveRotationalEffortX; 00135 double mResistiveRotationalEffortY; 00136 double mResistiveRotationalEffortZ; 00137 }; 00138 } 00139 00140 #endif 00141 /* End of File */