#include <cluster/Packets/ApplicationDataRequest.h>
Inheritance diagram for cluster::ApplicationDataRequest:


Public Member Functions | |
| ApplicationDataRequest () | |
| ApplicationDataRequest (const vpr::GUID plugin_guid, const vpr::GUID &id) | |
| Create a ApplicationDataRequest packet to request a remote ApplicationData object. | |
| void | serialize () |
| Serializes member variables into a data stream. | |
| virtual void | parse (vpr::BufferObjectReader *reader) |
| Parses the data stream into the local member variables. | |
| virtual void | printData (int debug_level) |
| Print the data to the screen in a readable form. | |
| vpr::GUID | getId () |
| Return the GUID of the ApplicationData object being requested. | |
Static Public Member Functions | |
| static vpr::Uint16 | getPacketFactoryType () |
| Return the type of this packet. | |
Definition at line 52 of file ApplicationDataRequest.h.
| cluster::ApplicationDataRequest::ApplicationDataRequest | ( | ) | [inline] |
| cluster::ApplicationDataRequest::ApplicationDataRequest | ( | const vpr::GUID | plugin_guid, | |
| const vpr::GUID & | id | |||
| ) |
Create a ApplicationDataRequest packet to request a remote ApplicationData object.
| plugin_guid | GUID of the ClusterPlugin that should handle this packet. | |
| id | GUID of the ApplicationData object that we are requesting. |
Definition at line 42 of file ApplicationDataRequest.cpp.
References cluster::Packet::mHeader, cluster::Packet::mPluginId, cluster::Header::RIM_APPDATA_REQ, cluster::Header::RIM_PACKET, cluster::Header::RIM_PACKET_HEAD_SIZE, and serialize().
00043 { 00044 // Set the local member variables using the given values. 00045 mPluginId = plugin_guid; 00046 mId = id; 00047 00048 // Create a Header for this packet with the correect type and size. 00049 mHeader = new Header(Header::RIM_PACKET, 00050 Header::RIM_APPDATA_REQ, 00051 Header::RIM_PACKET_HEAD_SIZE 00052 + 16/*Plugin GUID*/ 00053 + 16/*Object GUID*/, 00054 0/*Field not curently used*/); 00055 // Serialize the given data. 00056 serialize(); 00057 }
| void cluster::ApplicationDataRequest::serialize | ( | ) |
Serializes member variables into a data stream.
Definition at line 58 of file ApplicationDataRequest.cpp.
References cluster::Packet::mHeader, cluster::Packet::mPacketWriter, cluster::Packet::mPluginId, and cluster::Header::serializeHeader().
Referenced by ApplicationDataRequest().
00059 { 00060 // Clear the data stream. 00061 mPacketWriter->getData()->clear(); 00062 mPacketWriter->setCurPos(0); 00063 00064 // Serialize the header. 00065 mHeader->serializeHeader(); 00066 00067 // Serialize plugin GUID. 00068 mPluginId.writeObject(mPacketWriter); 00069 00070 // Serialize ApplicationData object GUID 00071 mId.writeObject(mPacketWriter); 00072 }
| void cluster::ApplicationDataRequest::parse | ( | vpr::BufferObjectReader * | reader | ) | [virtual] |
Parses the data stream into the local member variables.
Implements cluster::Packet.
Definition at line 74 of file ApplicationDataRequest.cpp.
References cluster::Packet::mPluginId.
00075 { 00076 // De-Serialize plugin GUID 00077 mPluginId.readObject(reader); 00078 00079 // De-Serialize ApplicationData object GUID 00080 mId.readObject(reader); 00081 }
| void cluster::ApplicationDataRequest::printData | ( | int | debug_level | ) | [virtual] |
Print the data to the screen in a readable form.
Implements cluster::Packet.
Definition at line 83 of file ApplicationDataRequest.cpp.
References gadgetDBG_RIM(), cluster::Packet::mPluginId, and cluster::Packet::printData().
00084 { 00085 vprDEBUG_BEGIN(gadgetDBG_RIM,debug_level) 00086 << clrOutBOLD(clrYELLOW,"==== ApplicationData Request Packet ====\n") << vprDEBUG_FLUSH; 00087 00088 Packet::printData(debug_level); 00089 00090 vprDEBUG(gadgetDBG_RIM,debug_level) 00091 << clrOutBOLD(clrYELLOW, "Plugin GUID: ") << mPluginId.toString() 00092 << std::endl << vprDEBUG_FLUSH; 00093 vprDEBUG(gadgetDBG_RIM,debug_level) 00094 << clrOutBOLD(clrYELLOW, "Object GUID: ") << mId.toString() 00095 << std::endl << vprDEBUG_FLUSH; 00096 00097 vprDEBUG_END(gadgetDBG_RIM,debug_level) 00098 << clrOutBOLD(clrYELLOW,"====================================\n") << vprDEBUG_FLUSH; 00099 }
| static vpr::Uint16 cluster::ApplicationDataRequest::getPacketFactoryType | ( | ) | [inline, static] |
Return the type of this packet.
Definition at line 87 of file ApplicationDataRequest.h.
References cluster::Header::RIM_APPDATA_REQ.
00088 { 00089 return(Header::RIM_APPDATA_REQ); 00090 }
| vpr::GUID cluster::ApplicationDataRequest::getId | ( | ) | [inline] |
Return the GUID of the ApplicationData object being requested.
Definition at line 95 of file ApplicationDataRequest.h.
Referenced by cluster::ApplicationDataManager::handlePacket().
1.5.1