[65] | 1 | #pragma once |
---|
| 2 | /* -*-c++-*- osgVisual - Copyright (C) 2009-2010 Torben Dannhauer |
---|
| 3 | * |
---|
| 4 | * This library is based on OpenSceneGraph, open source and may be redistributed and/or modified under |
---|
| 5 | * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or |
---|
| 6 | * (at your option) any later version. The full license is in LICENSE file |
---|
| 7 | * included with this distribution, and on the openscenegraph.org website. |
---|
| 8 | * |
---|
| 9 | * osgVisual requires for some proprietary modules a license from the correspondig manufacturer. |
---|
| 10 | * You have to aquire licenses for all used proprietary modules. |
---|
| 11 | * |
---|
| 12 | * This library is distributed in the hope that it will be useful, |
---|
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 15 | * OpenSceneGraph Public License for more details. |
---|
| 16 | */ |
---|
| 17 | |
---|
| 18 | #include <osg/notify> |
---|
| 19 | #include <osg/ArgumentParser> |
---|
| 20 | |
---|
| 21 | #include <dataIO_cluster.h> |
---|
[66] | 22 | #include <dataIO_clusterENet_implementation.h> |
---|
[65] | 23 | |
---|
| 24 | namespace osgVisual |
---|
| 25 | { |
---|
| 26 | |
---|
| 27 | /** |
---|
| 28 | * \brief This class is a ENet based cluster implementation class for osgVisuals cluster capabilities. |
---|
| 29 | * |
---|
| 30 | * All functions which are called always return true and send a debug string to stdout to announce that they were called. |
---|
| 31 | * |
---|
| 32 | * @author Torben Dannhauer |
---|
| 33 | * @date July 2010 |
---|
| 34 | */ |
---|
| 35 | class dataIO_clusterENet : public dataIO_cluster |
---|
| 36 | { |
---|
| 37 | public: |
---|
| 38 | dataIO_clusterENet(); |
---|
| 39 | virtual ~dataIO_clusterENet(void); |
---|
| 40 | |
---|
| 41 | void init( osg::ArgumentParser& arguments_, clustermode clusterMode_, osgVisual::dataIO_transportContainer* sendContainer_, bool compressionEnabled_, bool asAscii_ ); |
---|
| 42 | void shutdown(); |
---|
| 43 | |
---|
| 44 | void init(); |
---|
| 45 | bool sendTO_OBJvaluesToSlaves(); |
---|
| 46 | bool readTO_OBJvaluesFromMaster(); |
---|
| 47 | void reportAsReadyToSwap(); |
---|
| 48 | bool waitForSwap(); |
---|
| 49 | bool waitForAllReadyToSwap(); |
---|
| 50 | bool sendSwapCommand(); |
---|
[66] | 51 | |
---|
| 52 | private: |
---|
| 53 | osg::ref_ptr<osgVisual::dataIO_clusterENet_implementation> enet_impl; |
---|
[67] | 54 | std::string serverToConnect; |
---|
| 55 | osgVisual::dataIO_cluster::clustermode clusterMode; |
---|
[65] | 56 | }; |
---|
| 57 | |
---|
| 58 | } //END NAMESPACE |
---|