Ignore:
Timestamp:
Jun 8, 2010, 9:39:17 AM (14 years ago)
Author:
Torben Dannhauer
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • osgVisual/include/cluster/dataIO_clusterAsioTcpIostream.h

    r59 r62  
    1818#include "dataIO_cluster.h"
    1919
     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
    2030namespace osgVisual
    2131{
    2232
    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 */
     44class dataIO_clusterAsioTcpIostream :   public dataIO_cluster
    2445{
     46
    2547public:
     48
    2649        dataIO_clusterAsioTcpIostream();
    27         virtual ~dataIO_clusterAsioTcpIostream(void);
     50        virtual ~dataIO_clusterAsioTcpIostream();
    2851
    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
     61private:
     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;
    3775};
    3876
    39 }       // END Namespace
     77}       // END NAMESPACE
Note: See TracChangeset for help on using the changeset viewer.