![]() |
VR-Forces Developer's Guide
|
The class responsible for managing communication between multiple DtDe instances typically running in processes on other machines.
Public Types | |
| typedef std::list< DtDeRecord > | IgRecords |
Public Member Functions | |
| virtual | ~DtDeCommunicator () |
| virtual bool | initialize () |
| virtual void | listenForMasterIg () |
| virtual bool | hasMasterIg () const |
| virtual void | disconnectMasterIg (const std::string &masterName) |
| bool | connectToSlaveIg (const std::string &slaveAddr, int port, std::string &igNameOut) |
| void | disconnectSlaveIg (const std::string &name, bool lostConnection=false) |
| virtual void | tick () |
| virtual void | addIgRecord (const DtDeRecord &record) |
| virtual void | removeIgRecord (const DtDeRecord &record, bool lostConnection=false) |
| DtDeRecord & | hostIgRecord () |
| DtDeRecord * | findRecordByIgName (const std::string &igName) |
| DtDeRecord * | findRecordByDisplayName (const std::string &displayName) |
| bool | masterIgOnly () const |
| const IgRecords & | connectedIgs () const |
| virtual const std::string & | name () const |
Static Public Member Functions | |
| static const char * | className () |
Protected Member Functions | |
| DtDeCommunicator (DtDe &de, DtDriverConfiguration &config) | |
| bool | validateSlaveConnection (const std::string &ipAddr) |
| void | invalidateSlaveConnection (const std::string &ipAddr) |
| virtual void | addSlave (DtTcpMessageClient *client, std::string &igNameOut) |
Protected Attributes | |
| bool | myUseUdpForUpdates |
| DtDe & | myDe |
| DtDriverConfiguration & | myConfiguration |
| std::string | myName |
| IgRecords | myIgRecords |
| DtTcpServer * | myTcpServer |
| DtUdpServer * | myUdpServer |
| DtIgCommunicatorSignaler & | mySignaler |
| DtDeRemoteDisplayReconnector * | myDeRemoteDisplayReconnector |
Static Protected Attributes | |
| static const char * | myClassName |
Friends | |
| class | DtDeCommunicatorCreator |
| class | DtDeRemoteDisplayReconnector |
| class | DtThreadedDisplayReconnector |
| typedef std::list<DtDeRecord> makVrv::DtDeCommunicator::IgRecords |
|
virtual |
DTOR.
|
protected |
CTOR. Create derived class instead.
|
virtual |
Initialize, called by Ig after it's member is set.
|
virtual |
Start listening for a master.
| DtCorruptedState | if the DtIG is configured to be a master. |
|
virtual |
Check to see if the client has a Master IG.
|
virtual |
Disconnect from the Master IG (starts listening automatically)
| bool makVrv::DtDeCommunicator::connectToSlaveIg | ( | const std::string & | slaveAddr, |
| int | port, | ||
| std::string & | igNameOut | ||
| ) |
Attempt to connect to a slave.
| DtCorruptedState | if the DtIG is NOT configured to be a master. If connectToSlaveIg() returns true, igNameOut will contain the name of the connected slave IG. |
| void makVrv::DtDeCommunicator::disconnectSlaveIg | ( | const std::string & | name, |
| bool | lostConnection = false |
||
| ) |
Disconnect a slave IG with a given name. If lostConnection is true, this is being called because the master failed to send to a remote display. This will cause the named RD to be added to the Remote Display Reconnector to attempt re-attachment.
|
virtual |
Tick the driver.
|
virtual |
Get the current driver configuration.
Add a client.
|
virtual |
Remove a client. The lostConnection flag is set to true if the record is removed because a connection to the display was lost. This is provided to propogate that fact to the signal_clientToByDeleted signal.
| DtDeRecord& makVrv::DtDeCommunicator::hostIgRecord | ( | ) |
Get the record for the host IG (aka this de instance that owns the communicator.
| DtDeRecord* makVrv::DtDeCommunicator::findRecordByIgName | ( | const std::string & | igName | ) |
Find a record by Ig's name.
| DtDeRecord* makVrv::DtDeCommunicator::findRecordByDisplayName | ( | const std::string & | displayName | ) |
Find a record by the Ig's Display name.
| bool makVrv::DtDeCommunicator::masterIgOnly | ( | ) | const |
Check to see if only a single master de is in use.
| const IgRecords& makVrv::DtDeCommunicator::connectedIgs | ( | ) | const |
Get a set of the current IG instances.
|
virtual |
Return the name of this driver. Composed of the host name and process id.
|
static |
Returns the name of this class. Required for DtSubjectAnnouncer::findInstance().
|
protected |
Make slave connectable.
|
protected |
Disallow slave connection.
|
protectedvirtual |
Add the specified client to the server(s) and returns the client's name in igNameOut.
|
friend |
|
friend |
|
friend |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |