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_EXTRAS_RANGE_SENSOR_QUERY_RANGE_SENSOR_LOCAL_SCAN__H 00041 #define __JAUS_EXTRAS_RANGE_SENSOR_QUERY_RANGE_SENSOR_LOCAL_SCAN__H 00042 00043 #include "jaus/extras/extrascodes.h" 00044 #include "jaus/core/message.h" 00045 00046 namespace JAUS 00047 { 00055 class JAUS_EXTRAS_DLL QueryLocalRangeScan : public Message 00056 { 00057 public: 00058 QueryLocalRangeScan(const Address& dest = Address(), 00059 const Address& src = Address()) : Message(QUERY_LOCAL_RANGE_SCAN, dest, src) 00060 { 00061 mSensorID = 0; 00062 } 00063 QueryLocalRangeScan(const QueryLocalRangeScan& message) : Message(QUERY_LOCAL_RANGE_SCAN) 00064 { 00065 mSensorID = 0; 00066 *this = message; 00067 } 00068 ~QueryLocalRangeScan() {} 00069 void SetSensorID(const Byte id) { mSensorID = id; } 00070 Byte GetSensorID() const { return mSensorID; } 00071 virtual bool IsCommand() const { return false; } 00072 virtual int WriteMessageBody(Packet& packet) const { return packet.Write(mSensorID); } 00073 virtual int ReadMessageBody(const Packet& packet) { return packet.Read(mSensorID); } 00074 virtual Message* Clone() const { return new QueryLocalRangeScan(*this); } 00075 virtual UInt GetPresenceVector() const { return 0; } 00076 virtual UInt GetPresenceVectorSize() const { return 0; } 00077 virtual UInt GetPresenceVectorMask() const { return 0; } 00078 virtual UShort GetMessageCodeOfResponse() const { return REPORT_LOCAL_RANGE_SCAN; } 00079 virtual std::string GetMessageName() const { return "Query Local Range Scan"; } 00080 virtual void ClearMessageBody() {} 00081 virtual bool IsLargeDataSet(const unsigned int maxPayloadSize) const { return false; } 00082 QueryLocalRangeScan& operator=(const QueryLocalRangeScan& message) 00083 { 00084 CopyHeaderData(&message); 00085 mSensorID = message.mSensorID; 00086 return *this; 00087 } 00088 protected: 00089 Byte mSensorID; 00090 }; 00091 } 00092 00093 #endif 00094 /* End of File */