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_LIVENESS_QUERY_HEARTBEAT_PULSE__H 00041 #define __JAUS_CORE_LIVENESS_QUERY_HEARTBEAT_PULSE__H 00042 00043 #include "jaus/core/corecodes.h" 00044 #include "jaus/core/message.h" 00045 00046 namespace JAUS 00047 { 00054 class QueryHeartbeatPulse : public Message 00055 { 00056 public: 00057 QueryHeartbeatPulse(const Address& dest = Address(), 00058 const Address& src = Address()) : Message(QUERY_HEARTBEAT_PULSE, dest, src) 00059 { 00060 } 00061 QueryHeartbeatPulse(const QueryHeartbeatPulse& message) : Message(QUERY_HEARTBEAT_PULSE) 00062 { 00063 *this = message; 00064 } 00065 ~QueryHeartbeatPulse() {} 00066 // Return true if a command message, otherwise false. 00067 virtual bool IsCommand() const { return false; } 00068 // Writes message payload data to the packet at the current write position. 00069 virtual int WriteMessageBody(Packet& packet) const { return 0; } 00070 // Reads message payload data from the packets current read position. 00071 virtual int ReadMessageBody(const Packet& packet) { return 0; } 00072 // Make a copy of the message and returns pointer to it. 00073 virtual Message* Clone() const { return new QueryHeartbeatPulse(*this); } 00074 // Gets the presence vector data for the message. 00075 virtual UInt GetPresenceVector() const { return 0; } 00076 // Get the size of the message presence vector. 0 value indicates no presence vector. 00077 virtual UInt GetPresenceVectorSize() const { return 0; } 00078 // Get the mask associated with presence vector. Indicates what bits are used. 00079 virtual UInt GetPresenceVectorMask() const { return 0; } 00080 // Gets the response type to the associated message, 0 if message is a response type. 00081 virtual UShort GetMessageCodeOfResponse() const { return REPORT_HEARTBEAT_PULSE; } 00082 // Gets the name of the message in human readable format (for logging, etc.) 00083 virtual std::string GetMessageName() const { return "Query Heartbeat Pulse"; } 00084 // Clears only message body information. 00085 virtual void ClearMessageBody() {} 00086 // Return true if payload is greater than maxPaylodSize (payload == message data only). 00087 virtual bool IsLargeDataSet(const unsigned int maxPayloadSize) const { return false; } 00088 QueryHeartbeatPulse& operator=(const QueryHeartbeatPulse& message) 00089 { 00090 CopyHeaderData(&message); 00091 return *this; 00092 } 00093 }; 00094 } 00095 00096 #endif 00097 /* End of File */