Changeset 62 for osgVisual/include
- Timestamp:
- Jun 8, 2010, 9:39:17 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
osgVisual/include/cluster/dataIO_clusterAsioTcpIostream.h
r59 r62 18 18 #include "dataIO_cluster.h" 19 19 20 #include <osg/notify> 21 #include <osg/ArgumentParser> 22 23 #include <iostream> 24 #include <string> 25 #include <vector> 26 #include <boost/asio.hpp> 27 #include <boost/date_time/posix_time/posix_time.hpp> 28 29 20 30 namespace osgVisual 21 31 { 22 32 23 class dataIO_clusterAsioTcpIostream : public dataIO_cluster 33 /** 34 * \brief This is a Boost ASIO iostream implementation of dataIO_cluster.. 35 * 36 * This class uses Boost ASIO and it iostream privider to fullfil the functions of dataIO_cluster. 37 * It sends the clusterdata into the network to any connected client. 38 * 39 * 40 * \todo Add getHorizonColor to transport it to slave for consistent fog. 41 * @author Torben Dannhauer 42 * @date May 2010 43 */ 44 class dataIO_clusterAsioTcpIostream : public dataIO_cluster 24 45 { 46 25 47 public: 48 26 49 dataIO_clusterAsioTcpIostream(); 27 virtual ~dataIO_clusterAsioTcpIostream( void);50 virtual ~dataIO_clusterAsioTcpIostream(); 28 51 29 virtual void init( osg::ArgumentParser& arguments_, clustermode clusterMode_, osgVisual::dataIO_transportContainer* sendContainer_, bool compressionEnabled_, bool asAscii_ ); 30 virtual void shutdown(); 31 virtual bool sendTO_OBJvaluesToSlaves() ; 32 virtual bool readTO_OBJvaluesFromMaster(); 33 virtual void reportAsReadyToSwap(); 34 virtual bool waitForSwap(); 35 virtual bool waitForAllReadyToSwap(); 36 virtual bool sendSwapCommand(); 52 void init( osg::ArgumentParser& arguments_, clustermode clusterMode_, osgVisual::dataIO_transportContainer* sendContainer_, bool compressionEnabled_, bool asAscii_ ); 53 void shutdown(); 54 bool sendTO_OBJvaluesToSlaves(); 55 bool readTO_OBJvaluesFromMaster(); 56 void reportAsReadyToSwap(); 57 bool waitForSwap(); 58 bool waitForAllReadyToSwap(); 59 bool sendSwapCommand(); 60 61 private: 62 osgVisual::dataIO_cluster::clustermode clusterMode; 63 bool initialized; 64 int port; // Defaults to 5678 65 66 /** 67 * This list contains the connections to communicate with in each frame. 68 * 69 * As slave, contains only one entry: connection to master. 70 * As Master,contains the connection to all slaves which use this connection. 71 */ 72 std::vector<boost::asio::ip::tcp::iostream> clientlists; 73 74 boost::asio::io_service io_service; 37 75 }; 38 76 39 } // END N amespace77 } // END NAMESPACE
Note: See TracChangeset
for help on using the changeset viewer.