MAK RTIspy API Documentation for HLA Evolved
Public Member Functions | Static Public Member Functions | Static Protected Member Functions | Protected Attributes
DtRtiConnectionInfo Class Reference

Stores the information on an RTI connection known by the Assistant. More...

+ Collaboration diagram for DtRtiConnectionInfo:

List of all members.

Public Member Functions

 DtRtiConnectionInfo ()
 Constructor.
 DtRtiConnectionInfo (const MAKRti::DtString &hostname, int udpPort, int tcpPort, const MAKRti::DtInetAddr &bestEffortAddress, const MAKRti::DtInetAddr &interfaceAddr, int forwarderPort)
 rtiexec connection constructors
 DtRtiConnectionInfo (const MAKRti::DtInetAddr &reliableAddress, int udpPort, int tcpPort, const MAKRti::DtInetAddr &bestEffortAddress, const MAKRti::DtInetAddr &interfaceAddr, int forwarderPort)
 DtRtiConnectionInfo (const MAKRti::DtInetAddr &bestEffortAddress, int port, const MAKRti::DtInetAddr &interfaceAddr)
 Lightweight connection constructor.
 DtRtiConnectionInfo (const DtHostNameAddress &host, int udpPort, int tcpPort, const MAKRti::DtInetAddr &bestEffortAddress, bool useRtiexec, const MAKRti::DtInetAddr &interfaceAddr, int forwarderPort)
 Constructor to set all values explicitly.
virtual ~DtRtiConnectionInfo ()
 Destructor.
virtual bool operator< (const DtRtiConnectionInfo &other) const
 Less than operator.
virtual bool operator== (const DtRtiConnectionInfo &other) const
 Equals operator.
virtual bool operator!= (const DtRtiConnectionInfo &other) const
 Not equals operator.
virtual DtRtiConnectionInfooperator= (const DtRtiConnectionInfo &other)
 Assignment operator.
virtual bool isEquivalentHost (const DtRtiConnectionInfo &other) const
 Determines if another connection has an equivalent host, based on the IP address and host name and network interface address.
virtual bool isEquivalentHostAllInterfaces (const DtRtiConnectionInfo &other) const
 Determines if another connection has an equivalent host, based on the IP address and host name, assuming the host is bound on all interfaces.
virtual bool isLocalHost () const
 Determines if the host for this connection is the local machine, based on the IP address and host name.
virtual bool conflictsWith (const DtRtiConnectionInfo &other, MAKRti::DtString &reason) const
 Returns true if the connection conflicts with this connection and sets a description of the reason for the conflict.
virtual MAKRti::DtString defaultName () const
 Default name for this connection.
virtual MAKRti::DtString description () const
 Returns a text description of this connection.
virtual const MAKRti::DtInetAddr & reliableIp () const
 Returns IP address for reliable communication.
virtual void setReliableIp (const MAKRti::DtInetAddr &ip)
 Sets the reliable IP address.
virtual const MAKRti::DtInetAddr & bestEffortIp () const
 Returns IP address for best effort communication.
virtual void setBestEffortIp (const MAKRti::DtInetAddr &ip)
 Sets the best effort IP address.
virtual int udpPort () const
 Returns UDP port.
virtual void setUdpPort (int port)
 Sets the UDP port.
virtual int tcpPort () const
 Returns TCP port.
virtual void setTcpPort (int port)
 Sets the TCP port.
virtual MAKRti::DtString hostName () const
 Returns host name.
virtual void setHostName (const MAKRti::DtString &host)
 Sets the host name.
virtual const MAKRti::DtInetAddr & networkInterfaceAddr () const
 Returns the local network interface address to use for this connection.
virtual void setNetworkInterfaceAddr (const MAKRti::DtInetAddr &addr)
 Sets the local network interface address to use for this connection.
virtual bool useRtiexec () const
 Returns whether this connection uses an rtiexec.
virtual void setUseRtiexec (bool useExec)
 Sets whether this connection uses an rtiexec.
virtual int forwarderPort () const
 Returns the forwarder port.
virtual void setForwarderPort (int port)
 Sets the port.
virtual bool isValid () const
 Returns true if this connection info passes a basic validity check.

Static Public Member Functions

static const DtRtiConnectionInfoinvalidConn ()
 Returns an invalid connection.
static void setLocalIpAddresses (bool reset=false)
 Sets the list of recognized local IP addresses.
static const std::set
< MAKRti::DtInetAddr > & 
localIpAddresses ()
 Returns list of local IP addresses.
static bool localSupportsIPv4 (bool reset=false)
 Returns whether any of the local interfaces support IPv4.
static bool localSupportsIPv6 (bool reset=false)
 Returns whether any of the local interfaces support IPv6.
static MAKRti::DtString constructConnName (const DtHostNameAddress &hostname, int udpPort, int tcpPort, const MAKRti::DtInetAddr &bestEffortAddress, bool useRtiexec, const MAKRti::DtInetAddr &interfaceAddr, int forwarderPort)
 Constructs the default connection name using the given parameters.
static MAKRti::DtString constructConnDescription (const DtHostNameAddress &hostname, int udpPort, int tcpPort, const MAKRti::DtInetAddr &bestEffortAddress, bool useRtiexec, const MAKRti::DtInetAddr &interfaceAddr, int forwarderPort)
 Constructs the connection description text using the given parameters.
static const MAKRti::DtInetAddr & defaultReliableIp ()
 Returns the default parameters.
static const MAKRti::DtInetAddr & defaultBestEffortIp ()
 Returns the default parameters.
static int defaultLightweightPort ()
 Returns the default parameters.
static int defaultRtiexecPort ()
 Returns the default parameters.
static const MAKRti::DtString & defaultHostName ()
 Returns the default parameters.
static const MAKRti::DtInetAddr & defaultNetworkInterfaceAddr ()
 Returns the default parameters.
static int defaultForwarderPort ()
 Returns the default parameters.

Static Protected Member Functions

static std::set
< MAKRti::DtInetAddr > & 
theLocalIpAddresses ()
 Returns a reference to a static map of local IP addresses to netmasks.

Protected Attributes

MAKRti::DtInetAddr myBestEffortIp
 IP address for best effort transport.
int myUdpPort
 UDP port for the connection.
int myTcpPort
 TCP port for the connection.
DtHostNameAddress myHostNameAddress
 Host of the rtiexec or forwarder.
MAKRti::DtInetAddr myNetworkInterfaceAddr
 Local network interface address to use for this connection.
bool myUseRtiexec
 Whether or not an rtiexec should be used.
int myForwarderPort
 The port used by the forwarder to connect to other forwarders.

Detailed Description

Stores the information on an RTI connection known by the Assistant.


Constructor & Destructor Documentation

Constructor.

References setLocalIpAddresses().

DtRtiConnectionInfo::DtRtiConnectionInfo ( const MAKRti::DtString &  hostname,
int  udpPort,
int  tcpPort,
const MAKRti::DtInetAddr &  bestEffortAddress,
const MAKRti::DtInetAddr &  interfaceAddr,
int  forwarderPort 
)

rtiexec connection constructors

References setLocalIpAddresses().

DtRtiConnectionInfo::DtRtiConnectionInfo ( const MAKRti::DtInetAddr &  reliableAddress,
int  udpPort,
int  tcpPort,
const MAKRti::DtInetAddr &  bestEffortAddress,
const MAKRti::DtInetAddr &  interfaceAddr,
int  forwarderPort 
)

References setLocalIpAddresses().

DtRtiConnectionInfo::DtRtiConnectionInfo ( const MAKRti::DtInetAddr &  bestEffortAddress,
int  port,
const MAKRti::DtInetAddr &  interfaceAddr 
)

Lightweight connection constructor.

References setLocalIpAddresses().

DtRtiConnectionInfo::DtRtiConnectionInfo ( const DtHostNameAddress host,
int  udpPort,
int  tcpPort,
const MAKRti::DtInetAddr &  bestEffortAddress,
bool  useRtiexec,
const MAKRti::DtInetAddr &  interfaceAddr,
int  forwarderPort 
)

Constructor to set all values explicitly.

References setLocalIpAddresses().

Destructor.


Member Function Documentation

const MAKRti::DtInetAddr & DtRtiConnectionInfo::bestEffortIp ( ) const [virtual]
bool DtRtiConnectionInfo::conflictsWith ( const DtRtiConnectionInfo other,
MAKRti::DtString &  reason 
) const [virtual]

Returns true if the connection conflicts with this connection and sets a description of the reason for the conflict.

References bestEffortIp(), forwarderPort(), isEquivalentHost(), isEquivalentHostAllInterfaces(), myBestEffortIp, myForwarderPort, myNetworkInterfaceAddr, myTcpPort, myUdpPort, myUseRtiexec, networkInterfaceAddr(), tcpPort(), udpPort(), and useRtiexec().

Referenced by DtRtiConnectionAndConfiguration::willConflict().

MAKRti::DtString DtRtiConnectionInfo::constructConnDescription ( const DtHostNameAddress hostname,
int  udpPort,
int  tcpPort,
const MAKRti::DtInetAddr &  bestEffortAddress,
bool  useRtiexec,
const MAKRti::DtInetAddr &  interfaceAddr,
int  forwarderPort 
) [static]

Constructs the connection description text using the given parameters.

References forwarderPort(), DtHostNameAddress::hostName(), and DtHostNameAddress::ip().

Referenced by description().

MAKRti::DtString DtRtiConnectionInfo::constructConnName ( const DtHostNameAddress hostname,
int  udpPort,
int  tcpPort,
const MAKRti::DtInetAddr &  bestEffortAddress,
bool  useRtiexec,
const MAKRti::DtInetAddr &  interfaceAddr,
int  forwarderPort 
) [static]

Constructs the default connection name using the given parameters.

References DtHostNameAddress::hostName(), DtHostNameAddress::ip(), and DtHostNameAddress::isValid().

Referenced by defaultName().

const MAKRti::DtInetAddr & DtRtiConnectionInfo::defaultBestEffortIp ( ) [static]
const MAKRti::DtString & DtRtiConnectionInfo::defaultHostName ( ) [static]

Returns the default parameters.

Referenced by DtAssistantLrcConnQueryWidget::promptUserForConnInfo().

MAKRti::DtString DtRtiConnectionInfo::defaultName ( ) const [virtual]
const MAKRti::DtInetAddr & DtRtiConnectionInfo::defaultNetworkInterfaceAddr ( ) [static]
const MAKRti::DtInetAddr & DtRtiConnectionInfo::defaultReliableIp ( ) [static]
MAKRti::DtString DtRtiConnectionInfo::description ( ) const [virtual]
int DtRtiConnectionInfo::forwarderPort ( ) const [virtual]
MAKRti::DtString DtRtiConnectionInfo::hostName ( ) const [virtual]

Determines if another connection has an equivalent host, based on the IP address and host name and network interface address.

References DtHostNameAddress::compareHostName(), DtHostNameAddress::ip(), isLocalHost(), DtHostNameAddress::isValid(), myHostNameAddress, myNetworkInterfaceAddr, and networkInterfaceAddr().

Referenced by conflictsWith(), operator<(), operator=(), and operator==().

Determines if another connection has an equivalent host, based on the IP address and host name, assuming the host is bound on all interfaces.

References isLocalHost(), and myHostNameAddress.

Referenced by conflictsWith().

Determines if the host for this connection is the local machine, based on the IP address and host name.

References DtHostNameAddress::isLocal(), and myHostNameAddress.

Referenced by isEquivalentHost(), and isEquivalentHostAllInterfaces().

bool DtRtiConnectionInfo::isValid ( ) const [virtual]

Returns true if this connection info passes a basic validity check.

References DtHostNameAddress::isValid(), myBestEffortIp, myHostNameAddress, myTcpPort, myUdpPort, and myUseRtiexec.

Referenced by DtAssistantFederationsViewMgr::changeViewedConnection(), DtAssistantNetworkCompViewMgr::changeViewedRtiForwarder(), DtFederationsViewDialog::enableOrDisableRidViewing(), DtAssistantFederationsViewMgr::logConnectionInfo(), DtAssistantNetworkCompViewMgr::processExecObserveRspMsg(), DtAssistantFederationsInfoMgr::processExecObserveRspMsg(), DtAssistantNetworkCompInfoMgr::processForwarderStateMsgForConnection(), DtAssistantNetworkCompViewMgr::processForwarderUpdated(), DtAssistantNetworkCompViewMgr::processRtiexecLogMsg(), DtAssistantNetworkCompViewMgr::processRtiexecNotifyMsg(), DtAssistantFederationsInfoMgr::processRtiexecWebServerChange(), DtAssistantFederationsViewMgr::processViewedWebSpyInfoUpdated(), DtAssistantFederationsViewMgr::saveToLog(), DtAssistantConnQueryWidget::selectConnection(), DtAssistantNetworkCompViewMgr::sendLogRequest(), DtAssistantFederationsViewMgr::sendNetworkTestingDisableMsg(), DtAssistantFederationsViewMgr::sendNetworkTestingEnableMsg(), DtAssistantFederationsInfoMgr::sendObserveFederationsMsg(), DtAssistantNetworkCompInfoMgr::sendObserveForwarderMsg(), DtAssistantFederationsViewMgr::sendRidParamRequest(), DtAssistantConnQueryWidget::setConnections(), DtAssistantFederationsViewMgr::showRtiexecWebSpy(), DtAssistantNetworkCompViewMgr::shutdownRtiexec(), DtAssistantNetworkCompViewMgr::shutdownRtiForwarder(), DtAssistantFederationsViewMgr::tick(), DtAssistantNetworkCompViewMgr::tick(), DtAssistantFederationsInfoMgr::viewFederationsForConnection(), and DtAssistantNetworkCompInfoMgr::viewNetworkComponentsForConnection().

const std::set< MAKRti::DtInetAddr > & DtRtiConnectionInfo::localIpAddresses ( ) [inline, static]
bool DtRtiConnectionInfo::localSupportsIPv4 ( bool  reset = false) [static]

Returns whether any of the local interfaces support IPv4.

References theLocalIpAddresses().

Referenced by DtAssistantConnQueryMgr::checkForInterfaces(), DtRtiAssistant::DtRtiAssistant(), and setLocalIpAddresses().

bool DtRtiConnectionInfo::localSupportsIPv6 ( bool  reset = false) [static]

Returns whether any of the local interfaces support IPv6.

References theLocalIpAddresses().

Referenced by DtAssistantConnQueryMgr::checkForInterfaces(), DtRtiAssistant::DtRtiAssistant(), and setLocalIpAddresses().

const MAKRti::DtInetAddr & DtRtiConnectionInfo::networkInterfaceAddr ( ) const [virtual]
bool DtRtiConnectionInfo::operator!= ( const DtRtiConnectionInfo other) const [virtual]

Not equals operator.

bool DtRtiConnectionInfo::operator< ( const DtRtiConnectionInfo other) const [virtual]

Less than operator.

Comparisons are based on the following parameters in the order listed: 1) Lightweight connections are "less than" rtiexec connections 2) For lightweight connections: best effort IP and port 3) For rtiexec connections: host name or IP address (host name is used if available, though it is resolved to an IP and that is used as the actual value for comparison), port, best effort IP, forwarder port

References bestEffortIp(), forwarderPort(), isEquivalentHost(), myBestEffortIp, myForwarderPort, myHostNameAddress, myNetworkInterfaceAddr, myTcpPort, myUdpPort, myUseRtiexec, networkInterfaceAddr(), tcpPort(), udpPort(), and useRtiexec().

DtRtiConnectionInfo & DtRtiConnectionInfo::operator= ( const DtRtiConnectionInfo other) [virtual]
bool DtRtiConnectionInfo::operator== ( const DtRtiConnectionInfo other) const [virtual]
const MAKRti::DtInetAddr & DtRtiConnectionInfo::reliableIp ( ) const [virtual]
void DtRtiConnectionInfo::setBestEffortIp ( const MAKRti::DtInetAddr &  ip) [virtual]
void DtRtiConnectionInfo::setForwarderPort ( int  port) [virtual]
void DtRtiConnectionInfo::setHostName ( const MAKRti::DtString &  host) [virtual]
void DtRtiConnectionInfo::setLocalIpAddresses ( bool  reset = false) [static]

Sets the list of recognized local IP addresses.

If the set of local IP addresses has already been created it will not be reset unless the reset flag is true.

References DtEnumerateInterfaces(), localSupportsIPv4(), localSupportsIPv6(), and theLocalIpAddresses().

Referenced by DtRtiAssistantPeer::addSocketsForInterfaces(), DtAssistantConnQueryMgr::checkForInterfaces(), DtRtiAssistant::DtRtiAssistant(), and DtRtiConnectionInfo().

void DtRtiConnectionInfo::setNetworkInterfaceAddr ( const MAKRti::DtInetAddr &  addr) [virtual]
void DtRtiConnectionInfo::setReliableIp ( const MAKRti::DtInetAddr &  ip) [virtual]
void DtRtiConnectionInfo::setTcpPort ( int  port) [virtual]
void DtRtiConnectionInfo::setUdpPort ( int  port) [virtual]
void DtRtiConnectionInfo::setUseRtiexec ( bool  useExec) [virtual]
int DtRtiConnectionInfo::tcpPort ( ) const [virtual]
std::set< MAKRti::DtInetAddr > & DtRtiConnectionInfo::theLocalIpAddresses ( ) [static, protected]

Returns a reference to a static map of local IP addresses to netmasks.

This is a shallow wrapper function which is provided to guarantee the std::map is initialized. Please note that this class is only used by the assistant, which is single threaded. If this class is ever used by a multithreaded application, this static member should be mutex protected.

Referenced by localIpAddresses(), localSupportsIPv4(), localSupportsIPv6(), and setLocalIpAddresses().

int DtRtiConnectionInfo::udpPort ( ) const [virtual]

Member Data Documentation

MAKRti::DtInetAddr DtRtiConnectionInfo::myBestEffortIp [protected]

The port used by the forwarder to connect to other forwarders.

Referenced by conflictsWith(), defaultName(), description(), forwarderPort(), operator<(), operator=(), operator==(), and setForwarderPort().

MAKRti::DtInetAddr DtRtiConnectionInfo::myNetworkInterfaceAddr [protected]

Local network interface address to use for this connection.

Referenced by conflictsWith(), defaultName(), description(), isEquivalentHost(), networkInterfaceAddr(), operator<(), operator=(), operator==(), and setNetworkInterfaceAddr().

Whether or not an rtiexec should be used.

Referenced by conflictsWith(), defaultName(), description(), isValid(), operator<(), operator=(), operator==(), setUseRtiexec(), and useRtiexec().


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

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)