VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes | Private Member Functions
makVrv::DtThreadedDisplayReconnector Class Reference

The class responsible for restarting a specific disconnected remote display. More...

Inheritance diagram for makVrv::DtThreadedDisplayReconnector:
Inheritance graph
[legend]

Public Member Functions

 DtThreadedDisplayReconnector (DtDe &de, DtDeCommunicator &deCommunicator, double retryPeriod)
 CTOR. The retryPeriod determines how often the thread tries to reconnect to the RDE. More...
 
virtual ~DtThreadedDisplayReconnector ()
 Destructor. Stops/Deletes the thread, deletes the lockless queue. More...
 
virtual void addLostClient (const std::string &ipAddr, int port, const DtDisplayConfiguration &displayConfig)
 DtDeRemoteDisplayConnector calls this to start a thread and save all the information we need about the disconnected RDE. More...
 
virtual void run ()
 This is what runs in the thread to attempt to connect each retry period. More...
 
const std::string & ipAddr () const
 Return the ip address of the RDE to try to reconnect to. More...
 
int port () const
 Return the port of the RDE to try to reconnect to. More...
 
const DtDisplayConfigurationdisplayConfig () const
 Return the display configuration (cached when addLostClient was called) to send to the newly connected RDE. More...
 
DtLocklessQueue
< DtTcpMessageClient * > * 
getQueue ()
 Get a pointer to the lockless queue. More...
 

Protected Attributes

DtDemyDe
 
DtDeCommunicatormyDeCommunicator
 
std::string myIpAddr
 
int myPort
 
DtDisplayConfiguration myDisplayConfig
 
DtLocklessQueue
< DtTcpMessageClient * > * 
myClientReturnQueue
 
DtThread * myReconnectThread
 
double myLastRetry
 
double myRetryPeriod
 
bool myReconnected
 

Private Member Functions

 DtThreadedDisplayReconnector ()
 (Unimplemented) Default CTOR More...
 

Detailed Description

The class responsible for restarting a specific disconnected remote display.

It uses a separate thread to do the connection attempt to avoid a stall in the render thread. When a (re)connection is made, the new DtTcpMessageClient* is put on a lockless queue that DtDeRemoteDisplayConnector can retrieve it from.

Constructor & Destructor Documentation

makVrv::DtThreadedDisplayReconnector::DtThreadedDisplayReconnector ( )
private

(Unimplemented) Default CTOR

makVrv::DtThreadedDisplayReconnector::DtThreadedDisplayReconnector ( DtDe de,
DtDeCommunicator deCommunicator,
double  retryPeriod 
)

CTOR. The retryPeriod determines how often the thread tries to reconnect to the RDE.

virtual makVrv::DtThreadedDisplayReconnector::~DtThreadedDisplayReconnector ( )
virtual

Destructor. Stops/Deletes the thread, deletes the lockless queue.

Member Function Documentation

virtual void makVrv::DtThreadedDisplayReconnector::addLostClient ( const std::string &  ipAddr,
int  port,
const DtDisplayConfiguration displayConfig 
)
virtual

DtDeRemoteDisplayConnector calls this to start a thread and save all the information we need about the disconnected RDE.

const std::string& makVrv::DtThreadedDisplayReconnector::ipAddr ( ) const

Return the ip address of the RDE to try to reconnect to.

int makVrv::DtThreadedDisplayReconnector::port ( ) const

Return the port of the RDE to try to reconnect to.

const DtDisplayConfiguration& makVrv::DtThreadedDisplayReconnector::displayConfig ( ) const

Return the display configuration (cached when addLostClient was called) to send to the newly connected RDE.

DtLocklessQueue<DtTcpMessageClient*>* makVrv::DtThreadedDisplayReconnector::getQueue ( )

Get a pointer to the lockless queue.

Will return NULL if addLostClient() hasn't been called

virtual void makVrv::DtThreadedDisplayReconnector::run ( )
virtual

This is what runs in the thread to attempt to connect each retry period.

Member Data Documentation

DtDe& makVrv::DtThreadedDisplayReconnector::myDe
protected
DtDeCommunicator& makVrv::DtThreadedDisplayReconnector::myDeCommunicator
protected
std::string makVrv::DtThreadedDisplayReconnector::myIpAddr
protected
int makVrv::DtThreadedDisplayReconnector::myPort
protected
DtDisplayConfiguration makVrv::DtThreadedDisplayReconnector::myDisplayConfig
protected
DtLocklessQueue<DtTcpMessageClient*>* makVrv::DtThreadedDisplayReconnector::myClientReturnQueue
protected
DtThread* makVrv::DtThreadedDisplayReconnector::myReconnectThread
protected
double makVrv::DtThreadedDisplayReconnector::myLastRetry
protected
double makVrv::DtThreadedDisplayReconnector::myRetryPeriod
protected
bool makVrv::DtThreadedDisplayReconnector::myReconnected
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)