MAK RTIspy API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | 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:

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

DtRtiConnectionInfo::DtRtiConnectionInfo ( )

Constructor.

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

rtiexec connection constructors

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

Lightweight connection constructor.

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.

virtual DtRtiConnectionInfo::~DtRtiConnectionInfo ( )
virtual

Destructor.

Member Function Documentation

virtual const MAKRti::DtInetAddr& DtRtiConnectionInfo::bestEffortIp ( ) const
virtual

Returns IP address for best effort communication.

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.

static 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.

static 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.

static const MAKRti::DtInetAddr& DtRtiConnectionInfo::defaultBestEffortIp ( )
static

Returns the default parameters.

static int DtRtiConnectionInfo::defaultForwarderPort ( )
static

Returns the default parameters.

static const MAKRti::DtString& DtRtiConnectionInfo::defaultHostName ( )
static

Returns the default parameters.

static int DtRtiConnectionInfo::defaultLightweightPort ( )
static

Returns the default parameters.

virtual MAKRti::DtString DtRtiConnectionInfo::defaultName ( ) const
virtual

Default name for this connection.

static const MAKRti::DtInetAddr& DtRtiConnectionInfo::defaultNetworkInterfaceAddr ( )
static

Returns the default parameters.

static const MAKRti::DtInetAddr& DtRtiConnectionInfo::defaultReliableIp ( )
static

Returns the default parameters.

static int DtRtiConnectionInfo::defaultRtiexecPort ( )
static

Returns the default parameters.

virtual MAKRti::DtString DtRtiConnectionInfo::description ( ) const
virtual

Returns a text description of this connection.

virtual int DtRtiConnectionInfo::forwarderPort ( ) const
virtual

Returns the forwarder port.

virtual MAKRti::DtString DtRtiConnectionInfo::hostName ( ) const
virtual

Returns host name.

static const DtRtiConnectionInfo& DtRtiConnectionInfo::invalidConn ( )
static

Returns an invalid connection.

virtual bool DtRtiConnectionInfo::isEquivalentHost ( const DtRtiConnectionInfo other) const
virtual

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

virtual bool DtRtiConnectionInfo::isEquivalentHostAllInterfaces ( const DtRtiConnectionInfo other) const
virtual

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 DtRtiConnectionInfo::isLocalHost ( ) const
virtual

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

virtual bool DtRtiConnectionInfo::isValid ( ) const
virtual

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

const std::set< MAKRti::DtInetAddr > & DtRtiConnectionInfo::localIpAddresses ( )
inlinestatic

Returns list of local IP addresses.

References theLocalIpAddresses().

static bool DtRtiConnectionInfo::localSupportsIPv4 ( bool  reset = false)
static

Returns whether any of the local interfaces support IPv4.

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

Returns whether any of the local interfaces support IPv6.

virtual const MAKRti::DtInetAddr& DtRtiConnectionInfo::networkInterfaceAddr ( ) const
virtual

Returns the local network interface address to use for this connection.

virtual bool DtRtiConnectionInfo::operator!= ( const DtRtiConnectionInfo other) const
virtual

Not equals operator.

virtual 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

virtual DtRtiConnectionInfo& DtRtiConnectionInfo::operator= ( const DtRtiConnectionInfo other)
virtual

Assignment operator.

If the connections have equivalent hosts and the host name is already set, it will not be overwritten.

virtual bool DtRtiConnectionInfo::operator== ( const DtRtiConnectionInfo other) const
virtual

Equals operator.

virtual const MAKRti::DtInetAddr& DtRtiConnectionInfo::reliableIp ( ) const
virtual

Returns IP address for reliable communication.

virtual void DtRtiConnectionInfo::setBestEffortIp ( const MAKRti::DtInetAddr &  ip)
virtual

Sets the best effort IP address.

virtual void DtRtiConnectionInfo::setForwarderPort ( int  port)
virtual

Sets the port.

virtual void DtRtiConnectionInfo::setHostName ( const MAKRti::DtString &  host)
virtual

Sets the host name.

static 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.

virtual void DtRtiConnectionInfo::setNetworkInterfaceAddr ( const MAKRti::DtInetAddr &  addr)
virtual

Sets the local network interface address to use for this connection.

virtual void DtRtiConnectionInfo::setReliableIp ( const MAKRti::DtInetAddr &  ip)
virtual

Sets the reliable IP address.

virtual void DtRtiConnectionInfo::setTcpPort ( int  port)
virtual

Sets the TCP port.

virtual void DtRtiConnectionInfo::setUdpPort ( int  port)
virtual

Sets the UDP port.

virtual void DtRtiConnectionInfo::setUseRtiexec ( bool  useExec)
virtual

Sets whether this connection uses an rtiexec.

virtual int DtRtiConnectionInfo::tcpPort ( ) const
virtual

Returns TCP port.

static std::set< MAKRti::DtInetAddr >& DtRtiConnectionInfo::theLocalIpAddresses ( )
staticprotected

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

virtual int DtRtiConnectionInfo::udpPort ( ) const
virtual

Returns UDP port.

virtual bool DtRtiConnectionInfo::useRtiexec ( ) const
virtual

Returns whether this connection uses an rtiexec.

Member Data Documentation

MAKRti::DtInetAddr DtRtiConnectionInfo::myBestEffortIp
protected

IP address for best effort transport.

int DtRtiConnectionInfo::myForwarderPort
protected

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

DtHostNameAddress DtRtiConnectionInfo::myHostNameAddress
protected

Host of the rtiexec or forwarder.

MAKRti::DtInetAddr DtRtiConnectionInfo::myNetworkInterfaceAddr
protected

Local network interface address to use for this connection.

int DtRtiConnectionInfo::myTcpPort
protected

TCP port for the connection.

int DtRtiConnectionInfo::myUdpPort
protected

UDP port for the connection.

bool DtRtiConnectionInfo::myUseRtiexec
protected

Whether or not an rtiexec should be used.


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

Document ID: Generated on Mon Mar 21 09:41:37 EDT 2016 from SVN revision 163228
Copyright © 2005-2015 VT MÄK Inc. All Rights Reserved (www.mak.com)