The DtConnectionFaultProcessor class is a message processor responsible for responding to lost connections by initiating and participating in the RTI Exec's fault resolution algorithm.
When rtiexec receives ConnectionLostMsg( myForwarderID, droppedForwarderID ) rtiexec sends PingForwarderMsg( droppedForwarderID ) Forwarders aggregate all downstream PingForwarderResps and return upstream (=> return NoConnection( droppedForwarderID ) by default If rtiexec receives PingForwarderResp = NoConnection Then Forwarder has been lost no additional action required Else Both myForwarderID and droppedForwarderID are connected rtiexec sends ForwarderStatusRequestMsg( myConnectionID ) rtiexec sends ForwarderStatusRequestMsg( droppedConnectionID ) rtiexec waits for ForwarderStatusMsg (contains downstream federate count) Compare ForwarderStatusMsg( myConnectionID ).numFederates to ForwarderStatusMsg( droppedConnectionID ).numFederates rtiexec Sends ResignForwarder( ID ) where ID = either forwarder with fewer attached federates or (if equal) forwarder with lower ID (arbitrary) Required Processors (basically implement the algorithms required for fault recovery): 1) CountDownstreamFederates Processor
- Receives CountDownstreamFederatesMsg from Port A ( IN or LAN port )
- Forward CountDownstreamFederatesMsg to all downstream nodes
- myFederateCount = num local federates
- Wait for all downstream responses (if no connections, no waiting)
- myFederateCount += CountDownstreamFederatesResp.numFederates (from downstream)
- Send CountDownstreamFederatesResp( myFederateCount ) to Port A
2) PingResponse Processor
- Receives PingForwarderMsg( ID ) from Port A ( IN or LAN port )
- Forward PingForwarderMsg( ID ) to all downstream nodes
- myPingResp = false
- If ID == myID Then
- If No downstream connections, Then
- Wait for PingResponseMsg from all downstream forwarders
- myPingResponse |= downstream PingResponseMsg (ie - accept any TRUE )
- Send PingResponseMsg( ID, myPingResponse ) to Port A
3) ConnectionLossDetection Processor
- If !myOutPort.droppedConnections.empty()
- For each dropped connection ID
- Send ForwarderConnectionLost( myID, droppedID ) to OUT port
4) ResignForwarder Processor
- Receives ResignForwarderMsg( ID )
- If ID == myID Then
- Else
- Forward message downstream and/or to foreign and local groups