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


Public Methods | |
| EndBlock () | |
| EndBlock (const vpr::Uint32 &frame_number) | |
| Create a EndBlock packet to signal that the local node has reached the end of the frame. 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::Uint16 | getTempVar () |
Static Public Methods | |
| vpr::Uint16 | getPacketFactoryType () |
| Return the type of this packet. More... | |
|
|
Definition at line 53 of file EndBlock.h.
00054 {;}
|
|
|
Create a EndBlock packet to signal that the local node has reached the end of the frame.
Definition at line 48 of file EndBlock.cpp. References cluster::Packet::mHeader, and serialize.
00049 {
00050 // Set the local member variables using the given values.
00051 mTempVar = frame_number;
00052 // Create a Header for this packet with the correect type and size.
00053 mHeader = new Header(Header::RIM_PACKET,
00054 Header::RIM_END_BLOCK,
00055 Header::RIM_PACKET_HEAD_SIZE
00056 + 2 /*Temp Variable*/,
00057 frame_number);
00058 // Serialize the given data.
00059 serialize();
00060 }
|
|
|
Serializes member variables into a data stream.
Definition at line 65 of file EndBlock.cpp. References cluster::Packet::mHeader, and cluster::Packet::mPacketWriter. Referenced by EndBlock.
00066 {
00067 //mTempVar = Header::RIM_END_BLOCK;
00068 // Clear the data stream.
00069 mPacketWriter->getData()->clear();
00070 mPacketWriter->setCurPos(0);
00071
00072 // Serialize the header.
00073 mHeader->serializeHeader();
00074
00075 // Serialize the Temp Var
00076 mPacketWriter->writeUint16(mTempVar);
00077 }
|
|
|
Parses the data stream into the local member variables.
Implements cluster::Packet. Definition at line 82 of file EndBlock.cpp.
00083 {
00084 // De-Serialize the Temp Var
00085 mTempVar = reader->readUint16();
00086 }
|
|
|
Print the data to the screen in a readable form.
Implements cluster::Packet. Definition at line 91 of file EndBlock.cpp.
00092 {
00093 boost::ignore_unused_variable_warning(debug_level);
00094 /* vprDEBUG_BEGIN(gadgetDBG_RIM,vprDBG_CONFIG_LVL)
00095 << clrOutBOLD(clrYELLOW,"====== END BLOCK ======\n") << vprDEBUG_FLUSH;
00096
00097 Packet::printData(debug_level);
00098
00099 vprDEBUG(gadgetDBG_RIM,debug_level)
00100 << clrOutBOLD(clrYELLOW, "New State: ") << mNewState
00101 << std::endl << vprDEBUG_FLUSH;
00102
00103 vprDEBUG_END(gadgetDBG_RIM,vprDBG_CONFIG_LVL)
00104 << clrOutBOLD(clrYELLOW,"=======================\n") << vprDEBUG_FLUSH;
00105 */
00106 }
|
|
|
Return the type of this packet.
Definition at line 81 of file EndBlock.h.
00082 {
00083 return(Header::RIM_END_BLOCK);
00084 }
|
|
|
Definition at line 85 of file EndBlock.h.
00086 {
00087 return mTempVar;
00088 }
|
1.2.14 written by Dimitri van Heesch,
© 1997-2002