![]() |
MAK RTIspy API Documentation for HLA 1.3
|
Observes the RTI Forwarder and is responsible sending information on RTI Forwarder to the RTI Assistant. More...
Inheritance diagram for DtForwarderObserverForAssistant:
Collaboration diagram for DtForwarderObserverForAssistant:Classes | |
| struct | DtForwarderObserverConnInfo |
| struct | DtForwarderObserverDroppedConnInfo |
Public Member Functions | |
| DtForwarderObserverForAssistant () | |
| virtual | ~DtForwarderObserverForAssistant () |
| virtual void | initialize (DtRIDParameters *params) |
| Initialization. | |
| virtual void | queryForConnectionInfo (int &forwarderPort, MAKRti::DtInetAddr &forwarderToConnectTo) |
| virtual void | setForwarderInfo (int forwarderPort, const MAKRti::DtInetAddr &forwarderToConnectTo) |
| If we're not querying the assistant, provide some way for the forwarder to indicate what its forwarderConnInfo is. | |
| virtual void | enableNotifications () |
| Enables sending DtWarn & DtFatal to assistant as notifications. | |
| virtual void | disableNotifications () |
| Disables sending DtWarn & DtFatal to assistant as notifications. | |
| virtual void | processLogFileUpdatedEvent (const MAKRti::DtFilename &logFile) |
| Process a log file name update event. | |
| virtual int | clientToForwarderConnectionEstablished (const MAKRti::DtString &connName, const MAKRti::DtString &connType, unsigned int connID, const DtInetAddrAndPort &connAddr) |
| Callback for established joined client<->forwarder connections. | |
| virtual int | clientToForwarderConnectionLost (const MAKRti::DtString &connName, unsigned int connID, const DtInetAddrAndPort &connAddr) |
| Callback for lost client<->forwarder connections. | |
| virtual void | clientToForwarderFederateJoined (const DtString &connName, const DtString &connType, const DtString &federationName, unsigned int connID, unsigned int fedHandle, const DtInetAddrAndPort &connAddr, const MAKRti::DtString &connHost, unsigned int processId, const MAKRti::DtString &processName, const MAKRti::DtString &commandArgs, DtHlaVersionId hlaVersion) |
| Callback for fully joined client<->forwarder connections. | |
| virtual void | clientToForwarderFederateLost (const MAKRti::DtString &connName, const MAKRti::DtString &connType, unsigned int connID, unsigned int fedHandle, const DtInetAddrAndPort &connAddr) |
| Callback for lost client<->forwarder connections that were fully joined. | |
| virtual int | forwarderToForwarderExecConnected (const MAKRti::DtString &connName, unsigned int connID, const DtInetAddrAndPort &connAddr, const MAKRti::DtString &hostName, bool fullyCompliant) |
| Callback for connected forwarder<->forwarder exec connections. | |
| virtual int | forwarderToForwarderExecLost (const MAKRti::DtString &connName, unsigned int connID, const DtInetAddrAndPort &connAddr) |
| Callback for lost forwarder<->forwarder exec connections. | |
| virtual int | clientToForwarderExecConnected (const MAKRti::DtString &connName, unsigned int connID, const DtInetAddrAndPort &connAddr, const MAKRti::DtString &connHost, bool fullyCompliant) |
| Callback for connected client->forwarder exec connections. | |
| virtual int | clientToForwarderExecLost (const MAKRti::DtString &connName, unsigned int connID, const DtInetAddrAndPort &connAddr) |
| Callback for lost client->forwarder exec connections. | |
| virtual void | forwarderToForwarderConnectionEstablished (const MAKRti::DtString &connName, unsigned int connID, const DtInetAddrAndPort &connAddr) |
| Callback for established forwarder<->forwarder connections. | |
| virtual void | forwarderToForwarderConnectionLost (const MAKRti::DtString &connName, unsigned int connID, const DtInetAddrAndPort &connAddr) |
| Callback for lost forwarder<->forwarder connections. | |
| virtual int | clientToForwarderSocketQueueUpdate (unsigned int connId, int connQueueStatus) |
| Callback for socket queue update. | |
| virtual void | waitingForFowrarderConnections (const DtForwarderPort::DtConnAndNameMap &allNeededFws, const DtForwarderPort::DtConnAndNameMap &stillNeededFws) |
| Callback to signal that forwarder is waiting for forwarder<->forwarder connections. | |
| virtual void | notWaitingForFowrarderConnections () |
| Callback to signal that forwarder is no longer waiting for forwarder<->forwarder connections. | |
| bool | gotConnInfoFromAssistant () |
| /brief Returns true if the assistant supplied the RTI Forwarder connection info. | |
| DtBoost::shared_ptr < DtRtiAssistantForwarderClient > | assistantClient () |
Public Member Functions inherited from DtRtiForwarderObserver | |
| DtRtiForwarderObserver () | |
| Constructor. | |
| virtual | ~DtRtiForwarderObserver () |
| Destructor. | |
| virtual void | setMgr (DtRtiForwarderObserverMgr *mgr) |
| Sets the manager for this observer. | |
| virtual void | initMgr () |
| Initializes the mgr. | |
| virtual void | removeMgr () |
| Removes the manager for this observer. | |
| virtual void | clientToForwarderFederateJoined (const MAKRti::DtString &connName, const MAKRti::DtString &connType, const MAKRti::DtString &federationName, unsigned int connID, unsigned int fedHandle, const DtInetAddrAndPort &connAddr, const MAKRti::DtString &connHost, unsigned int processId, const MAKRti::DtString &processName, const MAKRti::DtString &commandArgs, DtHlaVersionId hlaVersion)=0 |
| Callback for joined client<->forwarder federate connections. | |
| virtual void | addRtiMsgCallback (DtRtiMsgKind msgKind, DtRtiMsgCbMgr::DtCallbackFcn fcn, bool isMomCallback=false) |
| Register to receive an event whenever an RTI Msg of the specified kind is received. | |
| virtual void | removeRtiMsgCallback (DtRtiMsgKind msgKind, DtRtiMsgCbMgr::DtCallbackFcn fcn, bool isMomCallback=false) |
| Unregister to receive an event whenever an RTI Msg of the specified kind is received. | |
| virtual void | addTickCallback (DtTickCbFn fcn, MAKRti::DtTime interval) |
| Add a tick callback function to be called periodically at the given time interval. | |
| virtual void | removeTickCallback (DtTickCbFn fcn) |
| Remove tick callback. | |
| virtual unsigned long | connectionId () const |
| Get the connection ID for this forwarder (thread safe) | |
Protected Member Functions | |
| virtual void | addCallbacks () |
| /brief Adds all RTI message and tick callbacks. Called when a manager is set. | |
| virtual void | removeCallbacks () |
| /brief Removes all RTI message and tick callbacks. | |
| virtual void | sendForwarderInfoToAssistant () const |
| /brief Populates necessary data and sends it to the assistant client (for observation requests) | |
| virtual void | sendWaitingForForwardersToAssistant () const |
| /brief Populates necessary data and sends a message to the assistant specifying that we are waiting for additional forwarder connections. | |
Protected Member Functions inherited from DtRtiForwarderObserver | |
Protected Attributes | |
| DtBoost::shared_ptr < DtRtiAssistantForwarderClient > | myAssistantClient |
| The assistant client. | |
| DtAssistantPrinter * | myAssistantPrinter |
| The printer which sends notifications to the assistant. | |
| bool | myForwarderIsObserved |
| Whether or not there is currently an assistant observing this RTI Forwarder. | |
| DtRIDParameters * | myParams |
| The RID parameter settings. | |
| MAKRti::DtInetAddr | myHostAddr |
| The host address used for connection. | |
| bool | myGotConnInfoFromAssistant |
| Whether or not the assistant supplied connection info. | |
| std::set < DtForwarderObserverConnInfo > | myConnectedNotJoinedClientConns |
| std::set < DtForwarderObserverConnInfo > | myClientForwarderConns |
| std::set < DtForwarderObserverConnInfo > | myForwarderForwarderConns |
| std::set < DtForwarderObserverDroppedConnInfo > | myUnexpectedlyDroppedClientConns |
| DtNeededFwConnMap | myNeededFws |
| List of forwarders which we are trying to connect to and whether or not a connection has been made. | |
| bool | myIsWaitingForFws |
| Whether we are still waiting for forwarder connections. | |
| MAKRti::DtClock | myClock |
| float | myDefunctRemovalTime |
| DtForwarderObserverConnInfo * | myExecConnection |
| bool | myExecIsLocal |
| DtBoost::shared_ptr < DtFilePrinter > | myLogPrinter |
| Printer which prints output to a log file. | |
| int | myForwarderPort |
| Forwarder connection information. | |
| MAKRti::DtInetAddr | myForwarderToConnectTo |
| Forwarder connection information. | |
Protected Attributes inherited from DtRtiForwarderObserver | |
| DtRtiForwarderObserverMgr * | myMgr |
| Pointer to the observer manager. | |
event processing functions | |
| virtual void | tick () |
| Periodic processing. | |
| static void | tick (void *usr) |
| Callback for periodic processing. | |
RTI Assistant message processing callbacks | |
| virtual void | processForwarderObserveMsg (const DtAssistantStateObserveMsg &msg) |
| /brief Process forwarder observe message by enabling or disabling forwarder update messages to the assistant | |
| virtual void | processExitCmndMsg (const DtAssistantExitMsg &msg) |
| Process exit command. | |
| virtual void | processRidParamRequest (const DtAssistantRidParamsMsg &msg) |
| Process RID parameter request. | |
| virtual void | processEnableLoggingMsg (const DtAssistantLogEnableMsg &msg) |
| Process logging enable command. | |
| virtual void | processNotifyLevelChangeMsg (const DtAssistantNtfyLvlUpdateMsg &msg) |
| Process notify level change command. | |
| virtual void | processAssistantDisconnect () |
| Process assistant disconnect. | |
| static void | processForwarderObserveMsg (const DtAssistantStateObserveMsg &msg, void *usr) |
| /brief Callback for a command message notifying this forwarder that it is or is not being observed | |
| static void | processExitCmndMsg (const DtAssistantExitMsg &msg, void *usr) |
| /brief Callback for exit command message | |
| static void | processRidParamRequest (const DtAssistantRidParamsMsg &msg, void *usr) |
| /brief Callback for assistant RID parameter request message | |
| static void | processEnableLoggingMsg (const DtAssistantLogEnableMsg &msg, void *usr) |
| Callback for logging enable command message. | |
| static void | processNotifyLevelChangeMsg (const DtAssistantNtfyLvlUpdateMsg &msg, void *usr) |
| Callback for notify level change command message. | |
| static void | processAssistantDisconnect (void *usr) |
| /brief Callback for assistant disconnect | |
Observes the RTI Forwarder and is responsible sending information on RTI Forwarder to the RTI Assistant.
Also accepts commands from the Assistant and gives them to the RTI Forwarder for processing.
| DtForwarderObserverForAssistant::DtForwarderObserverForAssistant | ( | ) |
References DtAssistantExitMsg::addCallback(), DtAssistantLogEnableMsg::addCallback(), DtAssistantNtfyLvlUpdateMsg::addCallback(), DtAssistantRidParamsMsg::addCallback(), DtAssistantStateObserveMsg::addCallback(), DtRtiForwarderObserver::addTickCallback(), determineClientAndServerPorts(), DtAssistantForwarderComponent, myAssistantClient, myAssistantPrinter, myClock, processAssistantDisconnect(), processEnableLoggingMsg(), processExitCmndMsg(), processForwarderObserveMsg(), processNotifyLevelChangeMsg(), processRidParamRequest(), and tick().
|
virtual |
References myAssistantClient, myAssistantPrinter, myLogPrinter, processAssistantDisconnect(), processExitCmndMsg(), processForwarderObserveMsg(), processRidParamRequest(), DtAssistantExitMsg::removeCallback(), DtAssistantRidParamsMsg::removeCallback(), DtAssistantStateObserveMsg::removeCallback(), and DtRtiForwarderObserver::removeMgr().
|
protectedvirtual |
/brief Adds all RTI message and tick callbacks. Called when a manager is set.
Implements DtRtiForwarderObserver.
References DtRtiForwarderObserver::addTickCallback(), and tick().
|
inline |
|
virtual |
Callback for established joined client<->forwarder connections.
Implements DtRtiForwarderObserver.
References myConnectedNotJoinedClientConns, myForwarderIsObserved, and sendForwarderInfoToAssistant().
|
virtual |
Callback for lost client<->forwarder connections.
Implements DtRtiForwarderObserver.
References myClientForwarderConns, myClock, myConnectedNotJoinedClientConns, myForwarderIsObserved, myUnexpectedlyDroppedClientConns, and sendForwarderInfoToAssistant().
|
virtual |
Callback for connected client->forwarder exec connections.
Implements DtRtiForwarderObserver.
References myAssistantClient, DtForwarderObserverForAssistant::DtForwarderObserverConnInfo::myConnAddr, myConnectedNotJoinedClientConns, DtForwarderObserverForAssistant::DtForwarderObserverConnInfo::myConnID, DtForwarderObserverForAssistant::DtForwarderObserverConnInfo::myConnName, myExecConnection, myExecIsLocal, myForwarderIsObserved, and sendForwarderInfoToAssistant().
|
virtual |
Callback for lost client->forwarder exec connections.
Implements DtRtiForwarderObserver.
References myAssistantClient, myExecConnection, myExecIsLocal, myForwarderIsObserved, and sendForwarderInfoToAssistant().
|
virtual |
Callback for fully joined client<->forwarder connections.
References myClientForwarderConns, DtForwarderObserverForAssistant::DtForwarderObserverConnInfo::myConnCommandArgs, myConnectedNotJoinedClientConns, DtForwarderObserverForAssistant::DtForwarderObserverConnInfo::myConnPID, DtForwarderObserverForAssistant::DtForwarderObserverConnInfo::myConnProcessName, myForwarderIsObserved, and sendForwarderInfoToAssistant().
|
virtual |
Callback for lost client<->forwarder connections that were fully joined.
Implements DtRtiForwarderObserver.
References myClientForwarderConns, myConnectedNotJoinedClientConns, myForwarderIsObserved, and sendForwarderInfoToAssistant().
|
virtual |
Callback for socket queue update.
Implements DtRtiForwarderObserver.
References myClientForwarderConns, and sendForwarderInfoToAssistant().
|
virtual |
Disables sending DtWarn & DtFatal to assistant as notifications.
References myAssistantPrinter.
|
virtual |
Enables sending DtWarn & DtFatal to assistant as notifications.
References myAssistantPrinter.
|
virtual |
Callback for established forwarder<->forwarder connections.
Implements DtRtiForwarderObserver.
References myForwarderForwarderConns, myForwarderIsObserved, myIsWaitingForFws, myNeededFws, sendForwarderInfoToAssistant(), and sendWaitingForForwardersToAssistant().
|
virtual |
Callback for lost forwarder<->forwarder connections.
Implements DtRtiForwarderObserver.
References myForwarderForwarderConns, myForwarderIsObserved, and sendForwarderInfoToAssistant().
|
virtual |
Callback for connected forwarder<->forwarder exec connections.
Implements DtRtiForwarderObserver.
References myAssistantClient, DtForwarderObserverForAssistant::DtForwarderObserverConnInfo::myConnAddr, DtForwarderObserverForAssistant::DtForwarderObserverConnInfo::myConnID, DtForwarderObserverForAssistant::DtForwarderObserverConnInfo::myConnName, myExecConnection, myExecIsLocal, myForwarderIsObserved, and sendForwarderInfoToAssistant().
|
virtual |
Callback for lost forwarder<->forwarder exec connections.
Implements DtRtiForwarderObserver.
References myAssistantClient, myExecConnection, myForwarderIsObserved, and sendForwarderInfoToAssistant().
|
inline |
/brief Returns true if the assistant supplied the RTI Forwarder connection info.
References myGotConnInfoFromAssistant.
|
virtual |
Initialization.
References myParams.
|
virtual |
Callback to signal that forwarder is no longer waiting for forwarder<->forwarder connections.
Implements DtRtiForwarderObserver.
References myIsWaitingForFws, myNeededFws, and sendWaitingForForwardersToAssistant().
|
static |
/brief Callback for assistant disconnect
References processAssistantDisconnect().
|
virtual |
Process assistant disconnect.
Referenced by DtForwarderObserverForAssistant(), processAssistantDisconnect(), and ~DtForwarderObserverForAssistant().
|
static |
Callback for logging enable command message.
Referenced by DtForwarderObserverForAssistant().
|
virtual |
Process logging enable command.
References myAssistantClient, myLogPrinter, myParams, and DtRIDParameters::rtiForwarderLogFileName.
|
static |
/brief Callback for exit command message
Callback for exit command message.
Referenced by DtForwarderObserverForAssistant(), and ~DtForwarderObserverForAssistant().
|
virtual |
Process exit command.
|
static |
/brief Callback for a command message notifying this forwarder that it is or is not being observed
Referenced by DtForwarderObserverForAssistant(), and ~DtForwarderObserverForAssistant().
|
virtual |
/brief Process forwarder observe message by enabling or disabling forwarder update messages to the assistant
References DtAssistantStateObserveForwarder, DtAssistantStateObserveForwarderPersistent, DtAssistantStateObserveMsg::getDefunctRemovalTime(), DtAssistantStateObserveMsg::isLogRequest(), DtAssistantStateObserveMsg::isObserved(), myDefunctRemovalTime, myForwarderIsObserved, sendForwarderInfoToAssistant(), and DtAssistantStateObserveMsg::targetType().
|
virtual |
Process a log file name update event.
|
static |
Callback for notify level change command message.
Referenced by DtForwarderObserverForAssistant().
|
virtual |
Process notify level change command.
References myAssistantClient, and DtAssistantNtfyLvlUpdateMsg::notifyLevel().
|
static |
/brief Callback for assistant RID parameter request message
Referenced by DtForwarderObserverForAssistant(), and ~DtForwarderObserverForAssistant().
|
virtual |
Process RID parameter request.
References DtRIDParameters::getFullPathToRidFile(), myAssistantClient, myParams, and DtRIDParameters::toLispString().
|
virtual |
References DtRIDParameters::DtFomTransportTypeUseFomSettings, DtRIDParameters::forceParametersToCompliance(), myAssistantClient, myForwarderPort, myForwarderToConnectTo, myGotConnInfoFromAssistant, myParams, DtRIDParameters::setNetworkInterfaceAddr(), DtRIDParameters::setTcpForwarderAddr(), DtRIDParameters::setUseRoutesFile(), and tcpPort.
|
protectedvirtual |
/brief Removes all RTI message and tick callbacks.
Called when a manager is removed or the observer is destroyed.
Implements DtRtiForwarderObserver.
References DtRtiForwarderObserver::removeTickCallback(), and tick().
|
protectedvirtual |
/brief Populates necessary data and sends it to the assistant client (for observation requests)
References DtRtiForwarderObserverMgr::connectionAddr(), DtRtiForwarderObserverMgr::connectionId(), DtRtiForwarderObserverMgr::connectionName(), DtASSISTANT_DROPPED, DtASSISTANT_NORMAL, DtASSISTANT_NOT_JOINED, myAssistantClient, myClientForwarderConns, DtForwarderObserverForAssistant::DtForwarderObserverConnInfo::myConnAddr, myConnectedNotJoinedClientConns, DtForwarderObserverForAssistant::DtForwarderObserverConnInfo::myConnHost, DtForwarderObserverForAssistant::DtForwarderObserverConnInfo::myConnID, DtForwarderObserverForAssistant::DtForwarderObserverConnInfo::myConnQueueStatus, myExecConnection, myExecIsLocal, DtForwarderObserverForAssistant::DtForwarderObserverConnInfo::myFedHandle, myForwarderForwarderConns, DtRtiForwarderObserver::myMgr, and myUnexpectedlyDroppedClientConns.
Referenced by clientToForwarderConnectionEstablished(), clientToForwarderConnectionLost(), clientToForwarderExecConnected(), clientToForwarderExecLost(), clientToForwarderFederateJoined(), clientToForwarderFederateLost(), clientToForwarderSocketQueueUpdate(), forwarderToForwarderConnectionEstablished(), forwarderToForwarderConnectionLost(), forwarderToForwarderExecConnected(), forwarderToForwarderExecLost(), processForwarderObserveMsg(), and tick().
|
protectedvirtual |
/brief Populates necessary data and sends a message to the assistant specifying that we are waiting for additional forwarder connections.
References myAssistantClient, myIsWaitingForFws, and myNeededFws.
Referenced by forwarderToForwarderConnectionEstablished(), notWaitingForFowrarderConnections(), and waitingForFowrarderConnections().
|
virtual |
If we're not querying the assistant, provide some way for the forwarder to indicate what its forwarderConnInfo is.
References myForwarderPort, and myForwarderToConnectTo.
|
static |
Callback for periodic processing.
References tick().
|
virtual |
Periodic processing.
References myAssistantClient, myClock, myDefunctRemovalTime, myUnexpectedlyDroppedClientConns, and sendForwarderInfoToAssistant().
Referenced by addCallbacks(), DtForwarderObserverForAssistant(), removeCallbacks(), and tick().
|
virtual |
Callback to signal that forwarder is waiting for forwarder<->forwarder connections.
Implements DtRtiForwarderObserver.
References DtNameAndConnStatus::isConnected, myIsWaitingForFws, myNeededFws, DtNameAndConnStatus::name, and sendWaitingForForwardersToAssistant().
|
protected |
The assistant client.
Referenced by clientToForwarderExecConnected(), clientToForwarderExecLost(), DtForwarderObserverForAssistant(), forwarderToForwarderExecConnected(), forwarderToForwarderExecLost(), processEnableLoggingMsg(), processNotifyLevelChangeMsg(), processRidParamRequest(), queryForConnectionInfo(), sendForwarderInfoToAssistant(), sendWaitingForForwardersToAssistant(), tick(), and ~DtForwarderObserverForAssistant().
|
protected |
The printer which sends notifications to the assistant.
Referenced by disableNotifications(), DtForwarderObserverForAssistant(), enableNotifications(), and ~DtForwarderObserverForAssistant().
|
protected |
|
protected |
Referenced by clientToForwarderConnectionLost(), DtForwarderObserverForAssistant(), and tick().
|
protected |
|
protected |
Referenced by processForwarderObserveMsg(), and tick().
|
protected |
|
protected |
|
protected |
|
protected |
Whether or not there is currently an assistant observing this RTI Forwarder.
Referenced by clientToForwarderConnectionEstablished(), clientToForwarderConnectionLost(), clientToForwarderExecConnected(), clientToForwarderExecLost(), clientToForwarderFederateJoined(), clientToForwarderFederateLost(), forwarderToForwarderConnectionEstablished(), forwarderToForwarderConnectionLost(), forwarderToForwarderExecConnected(), forwarderToForwarderExecLost(), and processForwarderObserveMsg().
|
protected |
Forwarder connection information.
Referenced by queryForConnectionInfo(), and setForwarderInfo().
|
protected |
Forwarder connection information.
Referenced by queryForConnectionInfo(), and setForwarderInfo().
|
protected |
Whether or not the assistant supplied connection info.
Referenced by gotConnInfoFromAssistant(), and queryForConnectionInfo().
|
protected |
The host address used for connection.
|
protected |
Whether we are still waiting for forwarder connections.
Referenced by forwarderToForwarderConnectionEstablished(), notWaitingForFowrarderConnections(), sendWaitingForForwardersToAssistant(), and waitingForFowrarderConnections().
|
protected |
Printer which prints output to a log file.
Referenced by processEnableLoggingMsg(), and ~DtForwarderObserverForAssistant().
|
protected |
List of forwarders which we are trying to connect to and whether or not a connection has been made.
Referenced by forwarderToForwarderConnectionEstablished(), notWaitingForFowrarderConnections(), sendWaitingForForwardersToAssistant(), and waitingForFowrarderConnections().
|
protected |
The RID parameter settings.
Referenced by initialize(), processEnableLoggingMsg(), processRidParamRequest(), and queryForConnectionInfo().
|
protected |
Referenced by clientToForwarderConnectionLost(), sendForwarderInfoToAssistant(), and tick().