Equalizer  1.2.1
fabric/configPackets.h
00001 
00002 /* Copyright (c) 2005-2012, Stefan Eilemann <eile@equalizergraphics.com>
00003  *                    2010, Cedric Stalder  <cedric.stalder@gmail.com>
00004  *
00005  * This library is free software; you can redistribute it and/or modify it under
00006  * the terms of the GNU Lesser General Public License version 2.1 as published
00007  * by the Free Software Foundation.
00008  *  
00009  * This library is distributed in the hope that it will be useful, but WITHOUT
00010  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00011  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00012  * details.
00013  * 
00014  * You should have received a copy of the GNU Lesser General Public License
00015  * along with this library; if not, write to the Free Software Foundation, Inc.,
00016  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00017  */
00018 
00019 #ifndef EQFABRIC_CONFIGPACKETS_H
00020 #define EQFABRIC_CONFIGPACKETS_H
00021 
00022 #include <eq/fabric/packets.h> // base structs
00023 #include <eq/fabric/serverPackets.h> // used inline
00024 
00026 namespace eq
00027 {
00028 namespace fabric
00029 {
00030     struct ConfigCreateReplyPacket : public ConfigPacket
00031     {
00032         ConfigCreateReplyPacket(const ServerCreateConfigPacket* request)
00033                 : requestID( request->requestID )
00034                 , pad( 0 )
00035         {
00036             command   = CMD_CONFIG_CREATE_REPLY;
00037             size      = sizeof( ConfigCreateReplyPacket );
00038             objectID  = request->configVersion.identifier;
00039         }
00040 
00041         const uint32_t requestID;
00042         const uint32_t pad;
00043     };
00044 
00045     struct ConfigNewLayoutPacket : public ConfigPacket
00046     {
00047         ConfigNewLayoutPacket( const uint32_t requestID_ )
00048                 : requestID( requestID_ )
00049                 , pad( 0 )
00050             {
00051                 command = CMD_CONFIG_NEW_LAYOUT;
00052                 size    = sizeof( ConfigNewLayoutPacket );
00053             }
00054 
00055         const uint32_t requestID;
00056         const uint32_t pad;
00057     };
00058 
00059     struct ConfigNewCanvasPacket : public ConfigPacket
00060     {
00061         ConfigNewCanvasPacket( const uint32_t requestID_ )
00062                 : requestID( requestID_ )
00063                 , pad( 0 )
00064             {
00065                 command = CMD_CONFIG_NEW_CANVAS;
00066                 size    = sizeof( ConfigNewCanvasPacket );
00067             }
00068 
00069         const uint32_t requestID;
00070         const uint32_t pad;
00071     };
00072 
00073     struct ConfigNewObserverPacket : public ConfigPacket
00074     {
00075         ConfigNewObserverPacket( const uint32_t requestID_ )
00076                 : requestID( requestID_ )
00077                 , pad( 0 )
00078             {
00079                 command = CMD_CONFIG_NEW_OBSERVER;
00080                 size    = sizeof( ConfigNewObserverPacket );
00081             }
00082 
00083         const uint32_t requestID;
00084         const uint32_t pad;
00085     };
00086 
00087     struct ConfigNewEntityReplyPacket : public ConfigPacket
00088     {
00089         ConfigNewEntityReplyPacket( const ConfigNewLayoutPacket* request )
00090                 : requestID( request->requestID ) { init(); }
00091         ConfigNewEntityReplyPacket( const ConfigNewCanvasPacket* request )
00092                 : requestID( request->requestID ) { init(); }
00093         ConfigNewEntityReplyPacket( const ConfigNewObserverPacket* request )
00094                 : requestID( request->requestID ) { init(); }
00095         void init()
00096             {
00097                 command = CMD_CONFIG_NEW_ENTITY_REPLY;
00098                 size    = sizeof( ConfigNewEntityReplyPacket );
00099             }
00100 
00101         const uint32_t requestID;
00102         co::base::UUID     entityID;
00103     };
00104 }
00105 }
00107 #endif //EQFABRIC_CONFIGPACKETS_H
Generated on Fri Jun 8 2012 15:44:30 for Equalizer 1.2.1 by  doxygen 1.8.0