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_CORE_DISCOVERY_REPORT_CONFIGURATION__H 00041 #define __JAUS_CORE_DISCOVERY_REPORT_CONFIGURATION__H 00042 00043 #include "jaus/core/corecodes.h" 00044 #include "jaus/core/message.h" 00045 #include <map> 00046 00047 namespace JAUS 00048 { 00057 class JAUS_CORE_DLL ReportConfiguration : public Message 00058 { 00059 public: 00066 class JAUS_CORE_DLL Record 00067 { 00068 public: 00069 typedef std::vector<Record> List; 00070 Record(const Byte c = 0, const Byte i = 0) 00071 { 00072 mComponent = c; 00073 mInstance = i; 00074 } 00075 Record(const Record& record) 00076 { 00077 *this = record; 00078 } 00079 ~Record(){} 00080 Record& operator=(const Record& record) 00081 { 00082 mComponent = record.mComponent; 00083 mInstance = record.mInstance; 00084 return *this; 00085 } 00086 Byte mComponent; 00087 Byte mInstance; 00088 }; 00089 typedef std::map<Byte, Record::List > Nodes; 00090 ReportConfiguration(const Address& dest = Address(), const Address& src = Address()); 00091 ReportConfiguration(const ReportConfiguration& message); 00092 ~ReportConfiguration(); 00093 Nodes* GetNodes() { return &mNodes; } 00094 const Nodes* GetNodes() const { return &mNodes; } 00095 virtual bool IsCommand() const { return false; } 00096 virtual int WriteMessageBody(Packet& packet) const; 00097 virtual int ReadMessageBody(const Packet& packet); 00098 virtual Message* Clone() const { return new ReportConfiguration(*this); } 00099 virtual UInt GetPresenceVector() const { return 0; } 00100 virtual UInt GetPresenceVectorSize() const { return 0; } 00101 virtual UInt GetPresenceVectorMask() const { return 0; } 00102 virtual UShort GetMessageCodeOfResponse() const { return 0; } 00103 virtual std::string GetMessageName() const { return "Report Configuration"; } 00104 virtual void ClearMessageBody(); 00105 virtual bool IsLargeDataSet(const unsigned int maxPayloadSize) const { return false; } 00106 ReportConfiguration& operator=(const ReportConfiguration& message); 00107 protected: 00108 Nodes mNodes; 00109 }; 00110 } 00111 00112 #endif 00113 /* End of File */