Equalizer
1.4.1
|
00001 00002 /* Copyright (c) 2005-2010, 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_SERVERPACKETS_H 00020 #define EQFABRIC_SERVERPACKETS_H 00021 00022 #include <eq/fabric/packets.h> // base structs 00023 00025 namespace eq 00026 { 00027 namespace fabric 00028 { 00029 struct ServerCreateConfigPacket : public ServerPacket 00030 { 00031 ServerCreateConfigPacket( const Object* config, 00032 const uint32_t req = LB_UNDEFINED_UINT32 ) 00033 : configVersion( config ) 00034 , requestID( req ) 00035 , fill( 0 ) 00036 { 00037 command = CMD_SERVER_CREATE_CONFIG; 00038 size = sizeof( ServerCreateConfigPacket ); 00039 } 00040 00041 const co::ObjectVersion configVersion; 00042 const uint32_t requestID; 00043 const uint32_t fill; 00044 }; 00045 00046 struct ServerDestroyConfigPacket : public ServerPacket 00047 { 00048 ServerDestroyConfigPacket() 00049 : requestID ( LB_UNDEFINED_UINT32 ) 00050 { 00051 command = CMD_SERVER_DESTROY_CONFIG; 00052 size = sizeof( ServerDestroyConfigPacket ); 00053 } 00054 00055 UUID configID; 00056 uint32_t requestID; 00057 }; 00058 00059 struct ServerDestroyConfigReplyPacket : public ServerPacket 00060 { 00061 ServerDestroyConfigReplyPacket( 00062 const ServerDestroyConfigPacket* request ) 00063 { 00064 command = CMD_SERVER_DESTROY_CONFIG_REPLY; 00065 size = sizeof( ServerDestroyConfigReplyPacket ); 00066 requestID = request->requestID; 00067 } 00068 00069 uint32_t requestID; 00070 }; 00071 00072 inline std::ostream& operator << ( std::ostream& os, 00073 const ServerCreateConfigPacket* packet ) 00074 { 00075 os << (ServerPacket*)packet << " config version " 00076 << packet->configVersion << " request " << packet->requestID; 00077 return os; 00078 } 00079 } 00080 } 00082 #endif //EQFABRIC_SERVERPACKETS_H