#include <ApplicationDataAck.h>
Inheritance diagram for cluster::ApplicationDataAck:


Public Methods | |
| ApplicationDataAck () | |
| ApplicationDataAck (const vpr::GUID &plugin_guid, const vpr::GUID &id, const bool ack) | |
| Create a ApplicationDataAck packet to acknowledge a ApplicationDataRequest. More... | |
| void | serialize () |
| Serializes member variables into a data stream. More... | |
| virtual void | parse (vpr::BufferObjectReader *reader) |
| Parses the data stream into the local member variables. More... | |
| virtual void | printData (int debug_level) |
| Print the data to the screen in a readable form. More... | |
| vpr::GUID | getId () |
| Return the GUID of the ApplicationData object being acknoledged. More... | |
| bool | getAck () |
| Return a boolean determining if this is a positive(ACK) or a negative(NACK) responce. More... | |
Static Public Methods | |
| vpr::Uint16 | getPacketFactoryType () |
| Return the type of this packet. More... | |
|
|
Definition at line 53 of file ApplicationDataAck.h.
00054 {;}
|
|
||||||||||||||||
|
Create a ApplicationDataAck packet to acknowledge a ApplicationDataRequest.
Definition at line 43 of file ApplicationDataAck.cpp. References cluster::Packet::mHeader, cluster::Packet::mPluginId, and serialize.
00046 {
00047 // Set the local member variables using the given values.
00048 mPluginId = plugin_guid;
00049 mId = id;
00050 mAck = ack;
00051
00052 // Create a Header for this packet with the correect type and size.
00053 mHeader = new Header(Header::RIM_PACKET,
00054 Header::RIM_APPDATA_ACK,
00055 Header::RIM_PACKET_HEAD_SIZE
00056 + 16/*Plugin GUID*/
00057 + 16/*Object GUID*/
00058 + 1 /*mAck*/,
00059 0/*Field not curently used*/);
00060 // Serialize the given data.
00061 serialize();
00062 }
|
|
|
Serializes member variables into a data stream.
Definition at line 63 of file ApplicationDataAck.cpp. References cluster::Packet::mHeader, cluster::Packet::mPacketWriter, and cluster::Packet::mPluginId. Referenced by ApplicationDataAck.
00064 {
00065 // Clear the data stream.
00066 mPacketWriter->getData()->clear();
00067 mPacketWriter->setCurPos(0);
00068
00069 // Serialize the header.
00070 mHeader->serializeHeader();
00071
00072 // Serialize plugin GUID
00073 mPluginId.writeObject(mPacketWriter);
00074
00075 // Serialize ApplicationData object GUID
00076 mId.writeObject(mPacketWriter);
00077
00078 // Serialize the Ack boolean
00079 mPacketWriter->writeBool(mAck);
00080 }
|
|
|
Parses the data stream into the local member variables.
Implements cluster::Packet. Definition at line 82 of file ApplicationDataAck.cpp. References cluster::Packet::mPluginId.
00083 {
00084 // De-Serialize plugin GUID
00085 mPluginId.readObject(reader);
00086
00087 // De-Serialize ApplicationData object GUID
00088 mId.readObject(reader);
00089
00090 // De-Serialize the Ack boolean
00091 mAck = reader->readBool();
00092 }
|
|
|
Print the data to the screen in a readable form.
Implements cluster::Packet. Definition at line 94 of file ApplicationDataAck.cpp. References gadgetDBG_RIM, and cluster::Packet::mPluginId.
00095 {
00096 vprDEBUG_BEGIN(gadgetDBG_RIM,debug_level)
00097 << clrOutBOLD(clrYELLOW,"==== ApplicationData Ack Packet ====\n") << vprDEBUG_FLUSH;
00098
00099 Packet::printData(debug_level);
00100
00101 vprDEBUG(gadgetDBG_RIM,debug_level)
00102 << clrOutBOLD(clrYELLOW, "Plugin GUID: ") << mPluginId.toString()
00103 << std::endl << vprDEBUG_FLUSH;
00104 vprDEBUG(gadgetDBG_RIM,debug_level)
00105 << clrOutBOLD(clrYELLOW, "Object GUID: ") << mId.toString()
00106 << std::endl << vprDEBUG_FLUSH;
00107 vprDEBUG(gadgetDBG_RIM,debug_level)
00108 << clrOutBOLD(clrYELLOW, "Ack or Nack: ") << (mAck ? "Ack" : "Nack") << std::endl
00109 << std::endl << vprDEBUG_FLUSH;
00110
00111 vprDEBUG_END(gadgetDBG_RIM,debug_level)
00112 << clrOutBOLD(clrYELLOW,"================================\n") << vprDEBUG_FLUSH;
00113 }
|
|
|
Return the type of this packet.
Definition at line 85 of file ApplicationDataAck.h.
00086 {
00087 return(Header::RIM_APPDATA_ACK);
00088 }
|
|
|
Return the GUID of the ApplicationData object being acknoledged.
Definition at line 93 of file ApplicationDataAck.h.
00093 { return mId; }
|
|
|
Return a boolean determining if this is a positive(ACK) or a negative(NACK) responce.
Definition at line 98 of file ApplicationDataAck.h.
00098 { return mAck; }
|
1.2.14 written by Dimitri van Heesch,
© 1997-2002