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