VR-Forces 5.0.1 Developer's Guide
 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. 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.

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

Public Member Functions

 DtThreadedDisplayReconnector (DtDe &de, DtDeCommunicator &deCommunicator, double retryPeriod)
 
virtual ~DtThreadedDisplayReconnector ()
 
virtual void addLostClient (const std::string &ipAddr, int port, const DtDisplayConfiguration &displayConfig)
 
virtual void run ()
 
const std::string & ipAddr () const
 
int port () const
 
const DtDisplayConfigurationdisplayConfig () const
 
DtLocklessQueue
< DtTcpMessageClient * > * 
getQueue ()
 

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 ()
 

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 Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)