root/juggler/branches/2.2/modules/gadgeteer/cluster/Packets/StartBlock.h
| Revision 19729, 2.4 kB (checked in by patrick, 2 years ago) | |
|---|---|
| |
| Line | |
|---|---|
| 1 | /*************** <auto-copyright.pl BEGIN do not edit this line> ************** |
| 2 | * |
| 3 | * VR Juggler is (C) Copyright 1998-2007 by Iowa State University |
| 4 | * |
| 5 | * Original Authors: |
| 6 | * Allen Bierbaum, Christopher Just, |
| 7 | * Patrick Hartling, Kevin Meinert, |
| 8 | * Carolina Cruz-Neira, Albert Baker |
| 9 | * |
| 10 | * This library is free software; you can redistribute it and/or |
| 11 | * modify it under the terms of the GNU Library General Public |
| 12 | * License as published by the Free Software Foundation; either |
| 13 | * version 2 of the License, or (at your option) any later version. |
| 14 | * |
| 15 | * This library is distributed in the hope that it will be useful, |
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 18 | * Library General Public License for more details. |
| 19 | * |
| 20 | * You should have received a copy of the GNU Library General Public |
| 21 | * License along with this library; if not, write to the |
| 22 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 23 | * Boston, MA 02111-1307, USA. |
| 24 | * |
| 25 | *************** <auto-copyright.pl END do not edit this line> ***************/ |
| 26 | |
| 27 | #ifndef _GADGET_RIM_START_BLOCK_H |
| 28 | #define _GADGET_RIM_START_BLOCK_H |
| 29 | |
| 30 | #include <gadget/gadgetConfig.h> |
| 31 | |
| 32 | #include <vpr/vprTypes.h> |
| 33 | #include <vpr/IO/BufferObjectReader.h> |
| 34 | |
| 35 | #include <gadget/Util/Debug.h> |
| 36 | #include <cluster/Packets/Header.h> |
| 37 | #include <cluster/Packets/Packet.h> |
| 38 | |
| 39 | namespace cluster |
| 40 | { |
| 41 | |
| 42 | /** \class StartBlock StartBlock.h cluster/Packets/StartBlock.h |
| 43 | * |
| 44 | * Data sequence start block packet. |
| 45 | */ |
| 46 | class GADGET_CLASS_API StartBlock : public Packet |
| 47 | { |
| 48 | public: |
| 49 | StartBlock() |
| 50 | {;} |
| 51 | |
| 52 | /** |
| 53 | * Create a StartBlock packet to signal that the local node is ready to |
| 54 | * start. |
| 55 | * |
| 56 | * @param plugin_id GUID of the ClusterPlugin that should handle this |
| 57 | * packet. |
| 58 | * @param frame_number The current number of frames that have been drawn. |
| 59 | */ |
| 60 | StartBlock(const vpr::GUID& plugin_id, const vpr::Uint32& frame_number); |
| 61 | |
| 62 | /** |
| 63 | * Serializes member variables into a data stream. |
| 64 | */ |
| 65 | void serialize(); |
| 66 | |
| 67 | /** |
| 68 | * Parses the data stream into the local member variables. |
| 69 | */ |
| 70 | virtual void parse(vpr::BufferObjectReader* reader); |
| 71 | |
| 72 | /** |
| 73 | * Print the data to the screen in a readable form. |
| 74 | */ |
| 75 | virtual void printData(int debug_level); |
| 76 | |
| 77 | /** |
| 78 | * Return the type of this packet. |
| 79 | */ |
| 80 | static vpr::Uint16 getPacketFactoryType() |
| 81 | { |
| 82 | return(Header::RIM_START_BLOCK); |
| 83 | } |
| 84 | }; |
| 85 | |
| 86 | } |
| 87 | |
| 88 | |
| 89 | #endif |
Note: See TracBrowser for help on using the browser.
