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


Public Member Functions | |
| EndBlock () | |
| EndBlock (const vpr::Uint32 &frame_number) | |
| Create a EndBlock packet to signal that the local node has reached the end of the frame. | |
| 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::Uint16 | getTempVar () |
Static Public Member Functions | |
| static vpr::Uint16 | getPacketFactoryType () |
| Return the type of this packet. | |
Definition at line 50 of file EndBlock.h.
| cluster::EndBlock::EndBlock | ( | ) | [inline] |
| cluster::EndBlock::EndBlock | ( | const vpr::Uint32 & | frame_number | ) |
Create a EndBlock packet to signal that the local node has reached the end of the frame.
| frame_number | The current number of frames that have been drawn. |
Definition at line 49 of file EndBlock.cpp.
References cluster::Packet::mHeader, cluster::Header::RIM_END_BLOCK, cluster::Header::RIM_PACKET, cluster::Header::RIM_PACKET_HEAD_SIZE, and serialize().
00050 { 00051 // Set the local member variables using the given values. 00052 mTempVar = frame_number; 00053 // Create a Header for this packet with the correect type and size. 00054 mHeader = new Header(Header::RIM_PACKET, 00055 Header::RIM_END_BLOCK, 00056 Header::RIM_PACKET_HEAD_SIZE 00057 + 2 /*Temp Variable*/, 00058 frame_number); 00059 // Serialize the given data. 00060 serialize(); 00061 }
| void cluster::EndBlock::serialize | ( | ) |
Serializes member variables into a data stream.
Definition at line 66 of file EndBlock.cpp.
References cluster::Packet::mHeader, cluster::Packet::mPacketWriter, and cluster::Header::serializeHeader().
Referenced by EndBlock().
00067 { 00068 //mTempVar = Header::RIM_END_BLOCK; 00069 // Clear the data stream. 00070 mPacketWriter->getData()->clear(); 00071 mPacketWriter->setCurPos(0); 00072 00073 // Serialize the header. 00074 mHeader->serializeHeader(); 00075 00076 // Serialize the Temp Var 00077 mPacketWriter->writeUint16(mTempVar); 00078 }
| void cluster::EndBlock::parse | ( | vpr::BufferObjectReader * | reader | ) | [virtual] |
Parses the data stream into the local member variables.
Implements cluster::Packet.
Definition at line 83 of file EndBlock.cpp.
| void cluster::EndBlock::printData | ( | int | debug_level | ) | [virtual] |
Print the data to the screen in a readable form.
Implements cluster::Packet.
Definition at line 92 of file EndBlock.cpp.
00093 { 00094 boost::ignore_unused_variable_warning(debug_level); 00095 /* vprDEBUG_BEGIN(gadgetDBG_RIM,vprDBG_CONFIG_LVL) 00096 << clrOutBOLD(clrYELLOW,"====== END BLOCK ======\n") << vprDEBUG_FLUSH; 00097 00098 Packet::printData(debug_level); 00099 00100 vprDEBUG(gadgetDBG_RIM,debug_level) 00101 << clrOutBOLD(clrYELLOW, "New State: ") << mNewState 00102 << std::endl << vprDEBUG_FLUSH; 00103 00104 vprDEBUG_END(gadgetDBG_RIM,vprDBG_CONFIG_LVL) 00105 << clrOutBOLD(clrYELLOW,"=======================\n") << vprDEBUG_FLUSH; 00106 */ 00107 }
| static vpr::Uint16 cluster::EndBlock::getPacketFactoryType | ( | ) | [inline, static] |
Return the type of this packet.
Definition at line 82 of file EndBlock.h.
References cluster::Header::RIM_END_BLOCK.
00083 { 00084 return(Header::RIM_END_BLOCK); 00085 }
| vpr::Uint16 cluster::EndBlock::getTempVar | ( | ) | [inline] |
1.5.1