MAK RTIspy API Documentation for HLA 1516
Public Types | Public Member Functions | Protected Attributes | Private Member Functions
DtRtiExecConnectionState Class Reference
+ Collaboration diagram for DtRtiExecConnectionState:

List of all members.

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.
const DtTcpMsgSocketrtiExecSock () const
 retrieve the stored socket of the connected rtiExec.
bool rtiExecAvailable () const
 retrieve whether the exec is available.
bool rtiExecIsLocalConnection () const
 is the rtiexec connected directly to this forwarder or is it connected to a remote forwarder?
bool noConnectionAvailable () const
 is our state == DtNotConnected.
bool isWaitingForReconnect () const
 retrieve whether the exec has been disconnected and we're waiting for reconnect.d
bool reconnectEnabled () const
 variable that concerns us: whether the RtiExec Reconnect ability is enabled.
bool hasTimeElapsed () const
 This will always return false unless the rtiExec has disconnected.
void resetRtiExecConnID ()
 Reset state to not connected.
MAKRti::DtString hostName () const
 Return the stored hostname for this exec conn.
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.

Protected Attributes

bool myRtiExecAvailable
 In the case of an RtiExec reconnect, the DtRtiExecTrackingFilter will change the.
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.
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

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

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

Member Function Documentation

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.

References myRtiExecReconnectTimeout, and myTimer.

Referenced by DtRtiExecTrackingFilter::processTimeout().

MAKRti::DtString DtRtiExecConnectionState::hostName ( ) const

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

References DtWaitingForReconnect, and myRtiExecState.

Referenced by DtRtiExecTrackingFilter::processReconnectMsg(), and DtRtiExecTrackingFilter::processTimeout().

is our state == DtNotConnected.

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

References DtNotConnected, and myRtiExecState.

Referenced by DtRtiExecTrackingFilter::processReconnectMsg(), and DtRtiExecTrackingFilter::processRtiExecDisconnectMsg().

DtRtiExecConnectionState& DtRtiExecConnectionState::operator= ( const DtRtiExecConnectionState orig) [private]

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

References myReconnectEnabled.

Referenced by DtRtiExecTrackingFilter::processDisconnectMsg(), and DtRtiExecTrackingFilter::processReconnectMsg().

Reset state to not connected.

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

References DtNotConnected, myExecHostname, myExecSock, myRtiExecConnID, myRtiExecIsLocallyConnected, and myRtiExecState.

Referenced by DtRtiExecTrackingFilter::processDisconnectMsg(), and rtiExecDisconnectMsgReceived().

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

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

References myRtiExecIsLocallyConnected.

Referenced by DtRtiExecTrackingFilter::processDisconnectMsg().

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

retrieve the stored socket of the connected rtiExec.

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

References myExecSock.

Referenced by DtRtiExecTrackingFilter::processTimeout(), and DtRtiExecTrackingFilter::rtiExecSocket().

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

References DtTcpMsgSocket::isConnected(), myExecSock, myPingTimer, and myRtiExecReconnectTimeout.

Referenced by DtRtiExecTrackingFilter::processTimeout().


Member Data Documentation

MAKRti::DtString DtRtiExecConnectionState::myExecHostname [protected]
MAKRti::DtClock DtRtiExecConnectionState::myPingTimer [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.

MAKRti::DtClock DtRtiExecConnectionState::myTimer [protected]

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)