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 Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends
makVrv::DtDeCommunicator Class Reference

The class responsible for managing communication between multiple DtDe instances typically running in processes on other machines. More...

Public Types

typedef std::list< DtDeRecordIgRecords
 

Public Member Functions

virtual ~DtDeCommunicator ()
 DTOR. More...
 
virtual bool initialize ()
 Initialize, called by Ig after it's member is set. More...
 
virtual void listenForMasterIg ()
 Start listening for a master. More...
 
virtual bool hasMasterIg () const
 Check to see if the client has a Master IG. More...
 
virtual void disconnectMasterIg (const std::string &masterName)
 Disconnect from the Master IG (starts listening automatically) More...
 
bool connectToSlaveIg (const std::string &slaveAddr, int port, std::string &igNameOut)
 Attempt to connect to a slave. More...
 
void disconnectSlaveIg (const std::string &name, bool lostConnection=false)
 Disconnect a slave IG with a given name. More...
 
virtual void tick ()
 Tick the driver. More...
 
virtual void addIgRecord (const DtDeRecord &record)
 Get the current driver configuration. More...
 
virtual void removeIgRecord (const DtDeRecord &record, bool lostConnection=false)
 Remove a client. More...
 
DtDeRecordhostIgRecord ()
 Get the record for the host IG (aka this de instance that owns the communicator. More...
 
DtDeRecordfindRecordByIgName (const std::string &igName)
 Find a record by Ig's name. More...
 
DtDeRecordfindRecordByDisplayName (const std::string &displayName)
 Find a record by the Ig's Display name. More...
 
bool masterIgOnly () const
 Check to see if only a single master de is in use. More...
 
const IgRecordsconnectedIgs () const
 Get a set of the current IG instances. More...
 
virtual const std::string & name () const
 Return the name of this driver. More...
 

Static Public Member Functions

static const charclassName ()
 Returns the name of this class. More...
 

Protected Member Functions

 DtDeCommunicator (DtDe &de, DtDriverConfiguration &config)
 CTOR. Create derived class instead. More...
 
bool validateSlaveConnection (const std::string &ipAddr)
 Make slave connectable. More...
 
void invalidateSlaveConnection (const std::string &ipAddr)
 Disallow slave connection. More...
 
virtual void addSlave (DtTcpMessageClient *client, std::string &igNameOut)
 Add the specified client to the server(s) and returns the client's name in igNameOut. More...
 

Protected Attributes

bool myUseUdpForUpdates
 
DtDemyDe
 
DtDriverConfigurationmyConfiguration
 
std::string myName
 
IgRecords myIgRecords
 
DtTcpServermyTcpServer
 
DtUdpServermyUdpServer
 
DtIgCommunicatorSignalermySignaler
 
DtDeRemoteDisplayReconnectormyDeRemoteDisplayReconnector
 

Static Protected Attributes

static const charmyClassName
 

Friends

class DtDeCommunicatorCreator
 
class DtDeRemoteDisplayReconnector
 
class DtThreadedDisplayReconnector
 

Detailed Description

The class responsible for managing communication between multiple DtDe instances typically running in processes on other machines.

Member Typedef Documentation

Constructor & Destructor Documentation

virtual makVrv::DtDeCommunicator::~DtDeCommunicator ( )
virtual

DTOR.

makVrv::DtDeCommunicator::DtDeCommunicator ( DtDe de,
DtDriverConfiguration config 
)
protected

CTOR. Create derived class instead.

Member Function Documentation

virtual bool makVrv::DtDeCommunicator::initialize ( )
virtual

Initialize, called by Ig after it's member is set.

virtual void makVrv::DtDeCommunicator::listenForMasterIg ( )
virtual

Start listening for a master.

Exceptions
DtCorruptedStateif the DtIG is configured to be a master.
virtual bool makVrv::DtDeCommunicator::hasMasterIg ( ) const
virtual

Check to see if the client has a Master IG.

virtual void makVrv::DtDeCommunicator::disconnectMasterIg ( const std::string &  masterName)
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.

Exceptions
DtCorruptedStateif 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 void makVrv::DtDeCommunicator::tick ( )
virtual

Tick the driver.

virtual void makVrv::DtDeCommunicator::addIgRecord ( const DtDeRecord record)
virtual

Get the current driver configuration.

Add a client.

virtual void makVrv::DtDeCommunicator::removeIgRecord ( const DtDeRecord record,
bool  lostConnection = false 
)
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 const std::string& makVrv::DtDeCommunicator::name ( ) const
virtual

Return the name of this driver.

Composed of the host name and process id.

static const char* makVrv::DtDeCommunicator::className ( )
static

Returns the name of this class.

Required for DtSubjectAnnouncer::findInstance().

bool makVrv::DtDeCommunicator::validateSlaveConnection ( const std::string &  ipAddr)
protected

Make slave connectable.

void makVrv::DtDeCommunicator::invalidateSlaveConnection ( const std::string &  ipAddr)
protected

Disallow slave connection.

virtual void makVrv::DtDeCommunicator::addSlave ( DtTcpMessageClient client,
std::string &  igNameOut 
)
protectedvirtual

Add the specified client to the server(s) and returns the client's name in igNameOut.

Friends And Related Function Documentation

friend class DtDeCommunicatorCreator
friend
friend class DtDeRemoteDisplayReconnector
friend
friend class DtThreadedDisplayReconnector
friend

Member Data Documentation

const char* makVrv::DtDeCommunicator::myClassName
staticprotected
bool makVrv::DtDeCommunicator::myUseUdpForUpdates
protected
DtDe& makVrv::DtDeCommunicator::myDe
protected
DtDriverConfiguration& makVrv::DtDeCommunicator::myConfiguration
protected
std::string makVrv::DtDeCommunicator::myName
protected
IgRecords makVrv::DtDeCommunicator::myIgRecords
protected
DtTcpServer* makVrv::DtDeCommunicator::myTcpServer
protected
DtUdpServer* makVrv::DtDeCommunicator::myUdpServer
protected
DtIgCommunicatorSignaler& makVrv::DtDeCommunicator::mySignaler
protected
DtDeRemoteDisplayReconnector* makVrv::DtDeCommunicator::myDeRemoteDisplayReconnector
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)