![]() |
VR-Forces Developer's Guide
|
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.

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 DtDisplayConfiguration & | displayConfig () const |
| DtLocklessQueue < DtTcpMessageClient * > * | getQueue () |
Protected Attributes | |
| DtDe & | myDe |
| DtDeCommunicator & | myDeCommunicator |
| std::string | myIpAddr |
| int | myPort |
| DtDisplayConfiguration | myDisplayConfig |
| DtLocklessQueue < DtTcpMessageClient * > * | myClientReturnQueue |
| DtThread * | myReconnectThread |
| double | myLastRetry |
| double | myRetryPeriod |
| bool | myReconnected |
Private Member Functions | |
| 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 |
Destructor. Stops/Deletes the thread, deletes the lockless queue.
|
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 |
This is what runs in the thread to attempt to connect each retry period.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |