Collage  0.6.1
queuePackets.h
00001 
00002 /* Copyright (c) 2011, Stefan Eilemann <eile@eyescale.ch>
00003  *
00004  * This library is free software; you can redistribute it and/or modify it under
00005  * the terms of the GNU Lesser General Public License version 2.1 as published
00006  * by the Free Software Foundation.
00007  *  
00008  * This library is distributed in the hope that it will be useful, but WITHOUT
00009  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00010  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00011  * details.
00012  * 
00013  * You should have received a copy of the GNU Lesser General Public License
00014  * along with this library; if not, write to the Free Software Foundation, Inc.,
00015  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00016  */
00017 
00018 #ifndef CO_QUEUEPACKETS_H
00019 #define CO_QUEUEPACKETS_H
00020 
00021 #include <co/packets.h> // base class
00022 
00023 namespace co
00024 {
00025     struct QueueGetItemPacket : public ObjectPacket
00026     {
00027         QueueGetItemPacket()
00028             : ObjectPacket()
00029             , itemsRequested( 0u )
00030             , slaveInstanceID( EQ_INSTANCE_ALL )
00031         {
00032             command = CMD_QUEUE_GET_ITEM;
00033             size = sizeof( QueueGetItemPacket );
00034         }
00035         uint32_t itemsRequested;
00036         uint32_t slaveInstanceID;
00037         int32_t requestID;
00038     };
00039     
00040     struct QueueItemPacket : public ObjectPacket
00041     {
00042         QueueItemPacket()
00043             : ObjectPacket()
00044         {
00045             command = CMD_QUEUE_ITEM;
00046             size = sizeof( QueueItemPacket );
00047         }
00048     };
00049 
00050     struct QueueEmptyPacket : public ObjectPacket
00051     {
00052         QueueEmptyPacket( const QueueGetItemPacket* request )
00053             : ObjectPacket()
00054             , requestID( request->requestID )
00055         {
00056             command = CMD_QUEUE_EMPTY;
00057             size = sizeof( QueueEmptyPacket );
00058             objectID = request->objectID;
00059             instanceID = request->slaveInstanceID;
00060         }
00061 
00062         const int32_t requestID;
00063     };
00064 }
00065 
00066 #endif // CO_QUEUEPACKETS_H
00067 
Generated on Mon Nov 26 2012 14:41:44 for Collage 0.6.1 by  doxygen 1.7.6.1