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


Public Methods | |
| ApplicationDataRequest () | |
| ApplicationDataRequest (const vpr::GUID plugin_guid, const vpr::GUID &id) | |
| Create a ApplicationDataRequest packet to request a remote ApplicationData object. 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 requested. More... | |
Static Public Methods | |
| vpr::Uint16 | getPacketFactoryType () |
| Return the type of this packet. More... | |
|
|
Definition at line 51 of file ApplicationDataRequest.h.
00052 {;}
|
|
||||||||||||
|
Create a ApplicationDataRequest packet to request a remote ApplicationData object.
Definition at line 42 of file ApplicationDataRequest.cpp. References cluster::Packet::mHeader, cluster::Packet::mPluginId, 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 }
|
|
|
Serializes member variables into a data stream.
Definition at line 58 of file ApplicationDataRequest.cpp. References cluster::Packet::mHeader, cluster::Packet::mPacketWriter, and cluster::Packet::mPluginId. 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 }
|
|
|
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 }
|
|
|
Print the data to the screen in a readable form.
Implements cluster::Packet. Definition at line 83 of file ApplicationDataRequest.cpp. References gadgetDBG_RIM, and cluster::Packet::mPluginId.
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 }
|
|
|
Return the type of this packet.
Definition at line 80 of file ApplicationDataRequest.h.
00081 {
00082 return(Header::RIM_APPDATA_REQ);
00083 }
|
|
|
Return the GUID of the ApplicationData object being requested.
Definition at line 88 of file ApplicationDataRequest.h.
00088 { return mId; }
|
1.2.14 written by Dimitri van Heesch,
© 1997-2002