Collage  1.6.0
High-performance C++ library for developing object-oriented distributed applications.
commands.h
1 
2 /* Copyright (c) 2005-2013, Stefan Eilemann <eile@equalizergraphics.com>
3  * 2012, Daniel Nachbaur <danielnachbaur@gmail.com>
4  *
5  * This file is part of Collage <https://github.com/Eyescale/Collage>
6  *
7  * This library is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU Lesser General Public License version 2.1 as published
9  * by the Free Software Foundation.
10  *
11  * This library is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
14  * details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this library; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20 
21 #ifndef CO_COMMANDS_H
22 #define CO_COMMANDS_H
23 
24 #include <lunchbox/bitOperation.h> // byteswap inline impl
25 
26 namespace co
27 {
28 
34 {
37  COMMANDTYPE_CUSTOM = 1<<7, // !< Application-specific command
38  COMMANDTYPE_INVALID = 0xFFFFFFFFu
39 };
40 
42 {
44  CMD_NODE_MAXIMUM = 0xFFFFFFu,
46  CMD_INVALID = 0xFFFFFFFFu
47 };
48 
50 static const size_t COMMAND_MINSIZE = 256;
51 
53 static const size_t COMMAND_ALLOCSIZE = 4096; // Bigger than minSize!
54 }
55 
56 namespace lunchbox
57 {
58 template<> inline void byteswap( co::CommandType& value )
59  { byteswap( reinterpret_cast< uint32_t& >( value )); }
60 }
61 
62 #endif // CO_COMMANDS_H
Commands for Node subclasses start here.
Definition: commands.h:43
An Object command.
Definition: commands.h:36
Object-oriented network library.
Definition: barrier.h:27
Highest allowed node command (2^24-1)
Definition: commands.h:44
A Node/LocalNode command.
Definition: commands.h:35
CommandType
The type of a Command.
Definition: commands.h:33
Commands
Definition: commands.h:41
Commands for Object subclasses start here.
Definition: commands.h:45