Equalizer  1.4.1
co/global.h
00001 
00002 /* Copyright (c) 2005-2012, Stefan Eilemann <eile@equalizergraphics.com> 
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_GLOBAL_H
00019 #define CO_GLOBAL_H
00020 
00021 #include <co/api.h>
00022 #include <co/types.h>
00023 #include <string>
00024 
00025 namespace co
00026 {
00028     class Global
00029     {
00030     public:
00036         CO_API static void setProgramName( const std::string& programName );
00037 
00039         CO_API static const std::string& getProgramName();
00040 
00046         CO_API static void setWorkDir( const std::string& workDir );
00047 
00049         CO_API static const std::string& getWorkDir();
00050 
00056         CO_API static void setDefaultPort( const uint16_t port );
00057 
00059         CO_API static uint16_t getDefaultPort();
00060 
00070         CO_API static void setObjectBufferSize( const uint32_t size );
00071 
00073         CO_API static uint32_t getObjectBufferSize();
00074 
00087         CO_API static bool fromString( const std::string& data );
00088 
00090         CO_API static void toString( std::string& data );
00091 
00093         CO_API static PluginRegistry& getPluginRegistry();
00094 
00096         CO_API static ErrorRegistry& getErrorRegistry();
00097 
00100         // Note: also update string array initialization in global.cpp
00102         enum IAttribute
00103         {
00104             IATTR_INSTANCE_CACHE_SIZE,   
00105 
00106             IATTR_NODE_SEND_QUEUE_SIZE,
00107             IATTR_NODE_SEND_QUEUE_AGE,   
00108             IATTR_RSP_ACK_TIMEOUT,       
00109             IATTR_RSP_ERROR_DOWNSCALE,   
00110             IATTR_RSP_ERROR_UPSCALE,     
00111             IATTR_RSP_ERROR_MAXSCALE,    
00112             IATTR_RSP_MIN_SENDRATE_SHIFT, 
00113             IATTR_RSP_NUM_BUFFERS,       
00114             IATTR_RSP_ACK_FREQUENCY,     
00115             IATTR_UDP_MTU,               
00116             IATTR_UDP_BUFFER_SIZE,       
00117             IATTR_QUEUE_MIN_SIZE,        
00118             IATTR_QUEUE_REFILL,          
00119             IATTR_RDMA_RING_BUFFER_SIZE_MB, 
00120             IATTR_RDMA_SEND_QUEUE_DEPTH, 
00121             IATTR_RDMA_RESOLVE_TIMEOUT_MS, 
00122             IATTR_ROBUSTNESS,            
00123             IATTR_TIMEOUT_DEFAULT,       
00124             IATTR_ALL
00125         };
00126 
00128         CO_API static void setIAttribute( const IAttribute attr,
00129                                           const int32_t value );
00130 
00132         CO_API static int32_t getIAttribute( const IAttribute attr );
00133 
00135         CO_API static uint32_t getTimeout();
00137 
00139         CO_API static uint32_t getKeepaliveTimeout();
00141     };
00142 }
00143 
00144 #endif // CO_GLOBAL_H
Generated on Mon Nov 26 2012 14:41:49 for Equalizer 1.4.1 by  doxygen 1.7.6.1