MAK RTIspy API Documentation for HLA Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Protected Attributes | Private Member Functions
DtRtiExecConnectionState Class Reference
+ Collaboration diagram for DtRtiExecConnectionState:

Public Types

enum  rtiExecConnectionStateDefns { DtNotConnected, DtConnectedAndRunning, DtWaitingForReconnect, DtReconnectFailed }
 this enumerates the state of the RTI, classified in the possible states More...
 

Public Member Functions

 DtRtiExecConnectionState (bool reconnectEnabled, MAKRti::DtTime rtiExecReconnectTimeout)
 
 ~DtRtiExecConnectionState ()
 
unsigned int rtiExecConnID () const
 retrieve the connection ID of the rtiExec. More...
 
const DtTcpMsgSocketrtiExecSock () const
 retrieve the stored socket of the connected rtiExec. More...
 
bool rtiExecAvailable () const
 retrieve whether the exec is available. More...
 
bool rtiExecIsLocalConnection () const
 is the rtiexec connected directly to this forwarder or is it connected to a remote forwarder? More...
 
bool noConnectionAvailable () const
 is our state == DtNotConnected. More...
 
bool isWaitingForReconnect () const
 retrieve whether the exec has been disconnected and we're waiting for reconnect.d More...
 
bool reconnectEnabled () const
 variable that concerns us: whether the RtiExec Reconnect ability is enabled. More...
 
bool hasTimeElapsed () const
 This will always return false unless the rtiExec has disconnected. More...
 
void resetRtiExecConnID ()
 Reset state to not connected. More...
 
MAKRti::DtString hostName () const
 Return the stored hostname for this exec conn. More...
 
bool rtiExecTimedOutReconnect ()
 
bool rtiExecDisconnected ()
 
bool rtiExecDisconnectMsgReceived ()
 
bool rtiExecConnected (unsigned int newConnectionID, const DtTcpMsgSocket *execSock, const MAKRti::DtString &hostName)
 
bool rtiExecReconnected (unsigned int newConnectionID, const DtTcpMsgSocket *execSock, const MAKRti::DtString &hostName)
 
bool testRtiExecConnectionStatus ()
 Periodically ping the rtiexec connection to ensure that it is alive Returns false if there is an rtiexec connection error. More...
 

Protected Attributes

bool myRtiExecAvailable
 In the case of an RtiExec reconnect, the DtRtiExecTrackingFilter will change the. More...
 
bool myRtiExecIsLocallyConnected
 
unsigned int myRtiExecConnID
 
const DtTcpMsgSocketmyExecSock
 
rtiExecConnectionStateDefns myRtiExecState
 
bool myReconnectEnabled
 
MAKRti::DtTime myRtiExecReconnectTimeout
 
MAKRti::DtClock myTimer
 
MAKRti::DtClock myPingTimer
 
MAKRti::DtString myExecHostname
 

Private Member Functions

 DtRtiExecConnectionState (const DtRtiExecConnectionState &orig)
 Copy and assignment unimplemented - there should never be any copies. More...
 
DtRtiExecConnectionStateoperator= (const DtRtiExecConnectionState &orig)
 

Member Enumeration Documentation

this enumerates the state of the RTI, classified in the possible states

as this class is concerned DtNotConnected: either never connected, or disconnected and didn't reconnect in the timeout period. No reconnect is possible from this state. connect message will transition us to state DtConnectedAndRunning.

DtConnectedAndRunning: Everything's up and running, No reconnect is possible from this state. upon disconnect state transitions to DtWaitingForReconnect

DtWaitingForReconnect: rtiExec has a broken socket, if rtiExec reconnect is received prior to timeout it will transition to connectedAndRunning else it will inform all federates and transition to notConnected.

Enumerator
DtNotConnected 
DtConnectedAndRunning 
DtWaitingForReconnect 
DtReconnectFailed 

Constructor & Destructor Documentation

DtRtiExecConnectionState::DtRtiExecConnectionState ( const DtRtiExecConnectionState orig)
private

Copy and assignment unimplemented - there should never be any copies.

DtRtiExecConnectionState::DtRtiExecConnectionState ( bool  reconnectEnabled,
MAKRti::DtTime  rtiExecReconnectTimeout 
)
DtRtiExecConnectionState::~DtRtiExecConnectionState ( )

Member Function Documentation

bool DtRtiExecConnectionState::hasTimeElapsed ( ) const

This will always return false unless the rtiExec has disconnected.

After the RtiDisconnects, this function returns whether the rtiExec disconnect happened more than RTI_rtiExecReconnectTimout seconds ago.

MAKRti::DtString DtRtiExecConnectionState::hostName ( ) const

Return the stored hostname for this exec conn.

bool DtRtiExecConnectionState::isWaitingForReconnect ( ) const

retrieve whether the exec has been disconnected and we're waiting for reconnect.d

bool DtRtiExecConnectionState::noConnectionAvailable ( ) const

is our state == DtNotConnected.

Useful in discarding incoming rtiExecDisconnect Messages from timed out stale exec connections.

DtRtiExecConnectionState& DtRtiExecConnectionState::operator= ( const DtRtiExecConnectionState orig)
private
bool DtRtiExecConnectionState::reconnectEnabled ( ) const

variable that concerns us: whether the RtiExec Reconnect ability is enabled.

void DtRtiExecConnectionState::resetRtiExecConnID ( )

Reset state to not connected.

Should combine this function with available's analog, into a super state resetting multifunction!

bool DtRtiExecConnectionState::rtiExecAvailable ( ) const

retrieve whether the exec is available.

bool DtRtiExecConnectionState::rtiExecConnected ( unsigned int  newConnectionID,
const DtTcpMsgSocket execSock,
const MAKRti::DtString &  hostName 
)
unsigned int DtRtiExecConnectionState::rtiExecConnID ( ) const

retrieve the connection ID of the rtiExec.

bool DtRtiExecConnectionState::rtiExecDisconnected ( )
bool DtRtiExecConnectionState::rtiExecDisconnectMsgReceived ( )
bool DtRtiExecConnectionState::rtiExecIsLocalConnection ( ) const

is the rtiexec connected directly to this forwarder or is it connected to a remote forwarder?

bool DtRtiExecConnectionState::rtiExecReconnected ( unsigned int  newConnectionID,
const DtTcpMsgSocket execSock,
const MAKRti::DtString &  hostName 
)
const DtTcpMsgSocket* DtRtiExecConnectionState::rtiExecSock ( ) const

retrieve the stored socket of the connected rtiExec.

Should really only be used to kill the old execSocket upon rtiExecDisconnectMsgRecv'd.

bool DtRtiExecConnectionState::rtiExecTimedOutReconnect ( )
bool DtRtiExecConnectionState::testRtiExecConnectionStatus ( )

Periodically ping the rtiexec connection to ensure that it is alive Returns false if there is an rtiexec connection error.

Member Data Documentation

MAKRti::DtString DtRtiExecConnectionState::myExecHostname
protected
const DtTcpMsgSocket* DtRtiExecConnectionState::myExecSock
protected
MAKRti::DtClock DtRtiExecConnectionState::myPingTimer
protected
bool DtRtiExecConnectionState::myReconnectEnabled
protected
bool DtRtiExecConnectionState::myRtiExecAvailable
protected

In the case of an RtiExec reconnect, the DtRtiExecTrackingFilter will change the.

connection ID of the known rtiExec. As far as I know, only the DtRtiExecTrackingFilter object (which maybe should be refactored to the singleton pattern) should be the only object that accesses this function.

unsigned int DtRtiExecConnectionState::myRtiExecConnID
protected
bool DtRtiExecConnectionState::myRtiExecIsLocallyConnected
protected
MAKRti::DtTime DtRtiExecConnectionState::myRtiExecReconnectTimeout
protected
rtiExecConnectionStateDefns DtRtiExecConnectionState::myRtiExecState
protected
MAKRti::DtClock DtRtiExecConnectionState::myTimer
protected

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

Document ID: Generated on Mon Sep 7 15:40:32 EDT 2020 from SVN revision 217499
Copyright © 2005-2020 MAK Technologies Inc. All Rights Reserved (www.mak.com)