Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Examples  

cluster::ApplicationDataRequest Class Reference

#include <ApplicationDataRequest.h>

Inheritance diagram for cluster::ApplicationDataRequest:

Inheritance graph
[legend]
Collaboration diagram for cluster::ApplicationDataRequest:

Collaboration graph
[legend]
List of all members.

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...


Constructor & Destructor Documentation

cluster::ApplicationDataRequest::ApplicationDataRequest   [inline]
 

Definition at line 51 of file ApplicationDataRequest.h.

00052    {;}

cluster::ApplicationDataRequest::ApplicationDataRequest const vpr::GUID    plugin_guid,
const vpr::GUID &    id
 

Create a ApplicationDataRequest packet to request a remote ApplicationData object.

Parameters:
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, 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    }


Member Function Documentation

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, 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    }

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, 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    }

vpr::Uint16 cluster::ApplicationDataRequest::getPacketFactoryType   [inline, static]
 

Return the type of this packet.

Definition at line 80 of file ApplicationDataRequest.h.

00081    {
00082        return(Header::RIM_APPDATA_REQ);
00083    }

vpr::GUID cluster::ApplicationDataRequest::getId   [inline]
 

Return the GUID of the ApplicationData object being requested.

Definition at line 88 of file ApplicationDataRequest.h.

00088 { return mId; }   


The documentation for this class was generated from the following files:
Generated on Sun May 2 14:26:44 2004 for Gadgeteer by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002