View on GitHub

Vistle

Distributed Data-parallel Scientific Visualization in VR

rhrcontroller.h
Go to the documentation of this file.
1#ifndef VISTLE_RHRCONTROLLER_H
2#define VISTLE_RHRCONTROLLER_H
3
4#include "renderer.h"
6#include <boost/asio/ip/address.hpp>
7#include <string>
8
9namespace vistle {
10
11class V_RENDEREREXPORT RhrController {
12public:
13 RhrController(vistle::Module *module, int displayRank);
15 Port *outputPort() const;
16
17 std::shared_ptr<RhrServer> server() const;
18 int rootRank() const;
19 bool hasConnection() const;
20 void tryConnect(double wait = 1.);
21
22 void addClient(const Port *client);
23 void removeClient(const Port *client);
24
26 None, // no dedicated connection necessary
27 Connect, // client connects to server
28 Listen, // server connects to client
29 };
30
31 ConnectionDirection connectionMethod() const; // for the client
32
33 // where this server is listening
34 unsigned short listenPort() const;
35 std::string listenHost() const;
36
37 // where this server should connect to
38 unsigned short connectPort() const;
39 std::string connectHost() const;
40
41private:
42 bool initializeServer();
43 Object::ptr getConfigObject() const;
44 bool sendConfigObject() const;
45
46 vistle::Module *m_module;
47 Port *m_imageOutPort;
48 int m_displayRank;
49
50 Port::ConstPortSet m_clients;
51 const Port *m_currentClient = nullptr;
52 int m_clientModuleId = 0;
53
54 IntParameter *m_rhrConnectionMethod;
55 StringParameter *m_rhrLocalEndpoint;
56 IntParameter *m_rhrBasePort;
57 unsigned short m_forwardPort; //< current port mapping
58 StringParameter *m_rhrRemoteEndpoint;
59 IntParameter *m_rhrRemotePort;
60 StringParameter *m_rhrAutoRemoteEndpoint;
61 IntParameter *m_rhrAutoRemotePort;
62
63 IntParameter *m_rgbaEncoding;
64 CompressionParameters::ColorCodec m_rgbaCodec;
65 IntParameter *m_rgbaCompressMode;
66 message::CompressionMode m_rgbaCompress;
67
68 IntParameter *m_depthPrec;
69 Integer m_prec;
70 IntParameter *m_depthCodecParam = nullptr;
71 CompressionParameters::DepthCodec m_depthCodec = CompressionParameters::DepthRaw;
72 IntParameter *m_depthZfpMode;
73 CompressionParameters::ZfpMode m_zfpMode;
74 IntParameter *m_depthCompressMode;
75 message::CompressionMode m_depthCompress;
76
77 IntVectorParameter *m_sendTileSizeParam;
78 IntParamVector m_sendTileSize;
79
80 IntParameter *m_dumpImagesParam = nullptr;
81 bool m_dumpImages = false;
82
83 std::shared_ptr<RhrServer> m_rhr;
84};
85
86} // namespace vistle
87#endif
std::shared_ptr< Object > ptr
std::set< const Port *, detail::deref_compare< Port > > ConstPortSet
Definition: rhrcontroller.h:11
std::string connectHost() const
void tryConnect(double wait=1.)
void addClient(const Port *client)
bool handleParam(const vistle::Parameter *p)
std::string listenHost() const
Port * outputPort() const
RhrController(vistle::Module *module, int displayRank)
std::shared_ptr< RhrServer > server() const
void removeClient(const Port *client)
unsigned short listenPort() const
ConnectionDirection
Definition: rhrcontroller.h:25
@ Connect
Definition: rhrcontroller.h:27
@ Listen
Definition: rhrcontroller.h:28
@ None
Definition: rhrcontroller.h:26
unsigned short connectPort() const
bool hasConnection() const
ConnectionDirection connectionMethod() const
int64_t Integer
RhrServer class.