MAK RTIspy API Documentation for HLA 1516
Public Member Functions | Protected Member Functions | Protected Attributes
DtRtiexecObserverForAssistant Class Reference

Observes the rtiexec and is responsible sending information on rtiexec to the RTI Assistant. More...

+ Inheritance diagram for DtRtiexecObserverForAssistant:
+ Collaboration diagram for DtRtiexecObserverForAssistant:

List of all members.

Public Member Functions

 DtRtiexecObserverForAssistant ()
virtual ~DtRtiexecObserverForAssistant ()
virtual void initialize (DtRIDParameters *params, DtBoost::shared_ptr< DtRtiexecCmdProc > cmdProc)
 Initializes the observer.
virtual void startObservation ()
 Indicates that observation of the exec has begun.
bool gotConnInfoFromAssistant ()
 Returns true if the assistant supplied the rtiexec connection info.

Protected Member Functions

virtual void addCallbacks ()
 Adds all RTI message and tick callbacks. Called when a manager is set.
virtual void removeCallbacks ()
 Removes all RTI message and tick callbacks.
void fillFederateTimeStateInfo (DtAssistantFederateInfo &stateInfo, unsigned long connId, const MAKRti::DtString &fedType, const MAKRti::DtString &fedName, DtFederateHandle fedHandle, const MAKRti::DtString &fedHostName, const MAKRti::DtInetAddr &fedHost, DtHlaVersionId hlaVersion, const DtFedExec &fedExec, const MAKRti::DtInetAddr &fedWebServHost, int fedWebServPort)
 Fills in the federate time state using the given information.
virtual void sendConnectionInfo (bool isConnected)
 Send the connection info to the assistant.

Protected Attributes

DtBoost::shared_ptr
< DtRtiAssistantExecClient
myAssistantClient
 The assistant client.
DtAssistantPrintermyAssistantPrinter
 The printer which sends notifications to the assistant.
DtBufferPrintermyBufferPrinter
 The printer which stores all rtiexec output.
DtBoost::shared_ptr< DtPrinterBufmyPrinterBuffer
 Buffer which the buffer printer writes to.
DtBoost::shared_ptr
< DtRtiexecCmdProc
myCmdProc
 Processes commands to be performed by the rtiexec.
bool myFedReconnectEnabled
 Is federate reconnect enabled?
bool myAllowNetworkTesting
 Whether or not this rtiexec allows network testing for its federations.
DtFederationStateByNameMap myFederations
 Cache the complete state of the federations.
DtFederationNameByHandleMap myFederationNames
 Map of federation handles to names.
MAKRti::DtTime myMinTimeBetweenUpdates
 Min. time exec should wait between time state updates.
bool myGotConnInfoFromAssistant
 Whether or not the assistant supplied connection info.
bool myExecIsObserved
 Whether or not there is currently an assistant observing this rtiexec.
DtRIDParametersmyParams
 The RID parameter settings.
int myForwarderPort
 Stored information about the forwarder.
MAKRti::DtInetAddr myForwarderToConnectTo
 Stored information about the forwarder.

Rtiexec event processing functions

virtual void tick ()
 Periodic processing.
virtual void queryForConnectionInfo (DtRtiConnectionInfoDataPair &connInfo, DtRtiConnectionConfigurationInfo &config)
 Periodic processing.
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 processFedExCreatedEvent (DtFedExec *exec)
 Process a new federation execution created event.
virtual void processFedExDestroyedEvent (DtFedExec *exec)
 Process a federation execution destroyed event.
virtual void processFederateJoinedEvent (DtFedExec *exec, DtFederate *federate)
 Process a federate joined event.
virtual void processFederateResignedEvent (DtFedExec *exec, DtFederate *federate)
 Process a federate resigned event.
virtual void processSyncPtRegisteredEvent (DtFedExec *exec, DtSyncPt *pt)
 Process a new sync. point registered event.
virtual void processFederationSynchronizedEvent (DtFedExec *exec, DtSyncPt *pt)
 Process a federation synchronized to an existing sync. point event.
virtual void processSyncPtAchievedEvent (DtFedExec *exec, DtFederate *federate, DtSyncPt *pt)
 Process an existing sync. point achieved event.
virtual void processFederateDisconnectedEvent (DtFedExec *exec, DtFederate *federate)
 Process a federate disconnect event.
virtual void processFederateReconnectSucceededEvent (DtFedExec *exec, DtFederate *federate)
 Process a federate reconnect succeeded event.
virtual void processFederateReconnectFailedEvent (DtFedExec *exec, DtFederate *federate)
 Process a federate reconnect failed event.
virtual void processLogFileUpdatedEvent (const MAKRti::DtFilename &logFile)
 Process a log file name update event.
virtual void processWebServerUpdatedEvent (const MAKRti::DtInetAddr &webSpyIpAddr, int webSpyPort)
 Process a web server update event.
virtual void processTimeStateEvent (const DtRtiExec &exec)
 Process a federate reconnect failed event.
static void tick (void *usr)
 Callback for periodic processing.
static void processTimeStateEvent (const DtRtiExec &exec, void *usr)
 Callback for periodic time state processing.

RTI message processing callbacks

virtual void processLatencyTestStatusMsg (const DtTestMgrStatusMsg &msg)
 Process latency test status message.
virtual void processLatencyTestResultsMsg (const DtLatencyReportMsg &msg)
 Process latency test status message.
static void processLatencyTestStatusMsg (const DtRtiMsg &msg, void *usr)
 Callback for latency test status message.
static void processLatencyTestResultsMsg (const DtRtiMsg &msg, void *usr)
 Callback for latency test results message.

RTI Assistant message processing callbacks

virtual void processExecObserveMsg (const DtAssistantStateObserveMsg &msg)
 Process exec observe message by enabling or disabling rtiexec update messages to the assistant.
virtual void processDeleteFederateMsg (const DtAssistantDeleteFederateMsg &msg)
 Process delete federate command.
virtual void processDeleteFederationMsg (const DtAssistantDeleteFederationMsg &msg)
 Process delete federation command.
virtual void processEnableLoggingMsg (const DtAssistantLogEnableMsg &msg)
 Process logging enable command.
virtual void processNotifyLevelChangeMsg (const DtAssistantNtfyLvlUpdateMsg &msg)
 Process notify level change command.
virtual void processNetworkTestingEnableMsg (const DtAssistantNetworkTestEnableMsg &msg)
 Process network testing enable/disable command.
virtual void processLatencyTestCmndMsg (const DtAssistantChangeLatencyTestModeMsg &msg)
 Process latency command.
virtual void processRidParamRequestMsg (const DtAssistantRidParamsMsg &msg)
 Process RID request.
virtual void processLogRequestMsg (const DtAssistantLogRequestMsg &msg)
 Process log request.
virtual void processExitCmndMsg (const DtAssistantExitMsg &msg)
 Process exit command.
virtual void processAssistantDisconnect ()
 Process assistant disconnect.
static void processExecObserveMsg (const DtAssistantStateObserveMsg &msg, void *usr)
 Callback for a command message notifying this exec that it is or is not being observed.
static void processDeleteFederateMsg (const DtAssistantDeleteFederateMsg &msg, void *usr)
 Callback for federate delete command message.
static void processDeleteFederationMsg (const DtAssistantDeleteFederationMsg &msg, void *usr)
 Callback for federation delete command 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 processNetworkTestingEnableMsg (const DtAssistantNetworkTestEnableMsg &msg, void *usr)
 Callback for networking testing enable/disable command message.
static void processLatencyTestCmndMsg (const DtAssistantChangeLatencyTestModeMsg &msg, void *usr)
 Callback for latency testing command message.
static void processRidParamRequestMsg (const DtAssistantRidParamsMsg &msg, void *usr)
 Callback for RID parameter request.
static void processLogRequestMsg (const DtAssistantLogRequestMsg &msg, void *usr)
 Callback for log request.
static void processExitCmndMsg (const DtAssistantExitMsg &msg, void *usr)
 Callback for exit command message.
static void processAssistantDisconnect (void *usr)
 Callback for assistant disconnect.

Detailed Description

Observes the rtiexec and is responsible sending information on rtiexec to the RTI Assistant.

Also accepts commands from the Assistant and gives them to the rtiexec for processing.


Constructor & Destructor Documentation


Member Function Documentation

void DtRtiexecObserverForAssistant::addCallbacks ( ) [protected, virtual]

Disables sending DtWarn & DtFatal to assistant as notifications.

References myAssistantPrinter.

Enables sending DtWarn & DtFatal to assistant as notifications.

References myAssistantPrinter.

void DtRtiexecObserverForAssistant::fillFederateTimeStateInfo ( DtAssistantFederateInfo stateInfo,
unsigned long  connId,
const MAKRti::DtString &  fedType,
const MAKRti::DtString &  fedName,
DtFederateHandle  fedHandle,
const MAKRti::DtString &  fedHostName,
const MAKRti::DtInetAddr &  fedHost,
DtHlaVersionId  hlaVersion,
const DtFedExec fedExec,
const MAKRti::DtInetAddr &  fedWebServHost,
int  fedWebServPort 
) [protected]

Returns true if the assistant supplied the rtiexec connection info.

References myGotConnInfoFromAssistant.

void DtRtiexecObserverForAssistant::initialize ( DtRIDParameters params,
DtBoost::shared_ptr< DtRtiexecCmdProc cmdProc 
) [virtual]

Callback for assistant disconnect.

References processAssistantDisconnect().

Callback for federate delete command message.

Referenced by DtRtiexecObserverForAssistant(), and ~DtRtiexecObserverForAssistant().

Callback for federation delete command message.

Referenced by DtRtiexecObserverForAssistant(), and ~DtRtiexecObserverForAssistant().

Callback for logging enable command message.

Referenced by DtRtiexecObserverForAssistant(), and ~DtRtiexecObserverForAssistant().

Process logging enable command.

References myCmdProc.

Callback for a command message notifying this exec that it is or is not being observed.

Referenced by DtRtiexecObserverForAssistant(), and ~DtRtiexecObserverForAssistant().

void DtRtiexecObserverForAssistant::processExitCmndMsg ( const DtAssistantExitMsg msg,
void *  usr 
) [static]

Callback for exit command message.

Referenced by DtRtiexecObserverForAssistant(), and ~DtRtiexecObserverForAssistant().

Process exit command.

References myAssistantClient, and myCmdProc.

Process a federation execution destroyed event.

Reimplemented from DtRtiexecObserver.

References DtFedExec::fedExHandle(), DtFedExec::fedExName(), myAssistantClient, myExecIsObserved, myFederationNames, and myFederations.

Callback for latency testing command message.

Referenced by DtRtiexecObserverForAssistant(), and ~DtRtiexecObserverForAssistant().

void DtRtiexecObserverForAssistant::processLatencyTestResultsMsg ( const DtRtiMsg msg,
void *  usr 
) [static]

Callback for latency test results message.

Referenced by addCallbacks(), and removeCallbacks().

void DtRtiexecObserverForAssistant::processLatencyTestStatusMsg ( const DtRtiMsg msg,
void *  usr 
) [static]

Callback for latency test status message.

Referenced by addCallbacks(), and removeCallbacks().

void DtRtiexecObserverForAssistant::processLogFileUpdatedEvent ( const MAKRti::DtFilename &  logFile) [virtual]

Process a log file name update event.

Reimplemented from DtRtiexecObserver.

References myAssistantClient.

void DtRtiexecObserverForAssistant::processLogRequestMsg ( const DtAssistantLogRequestMsg msg,
void *  usr 
) [static]

Callback for log request.

Referenced by DtRtiexecObserverForAssistant(), and ~DtRtiexecObserverForAssistant().

Callback for networking testing enable/disable command message.

Referenced by DtRtiexecObserverForAssistant(), and ~DtRtiexecObserverForAssistant().

Callback for notify level change command message.

Referenced by DtRtiexecObserverForAssistant(), and ~DtRtiexecObserverForAssistant().

Process notify level change command.

References myCmdProc, and DtAssistantNtfyLvlUpdateMsg::notifyLevel().

Callback for RID parameter request.

Referenced by DtRtiexecObserverForAssistant().

void DtRtiexecObserverForAssistant::processSyncPtAchievedEvent ( DtFedExec exec,
DtFederate federate,
DtSyncPt pt 
) [virtual]
void DtRtiexecObserverForAssistant::processTimeStateEvent ( const DtRtiExec exec,
void *  usr 
) [static]

Callback for periodic time state processing.

Referenced by addCallbacks(), processExecObserveMsg(), and removeCallbacks().

void DtRtiexecObserverForAssistant::processWebServerUpdatedEvent ( const MAKRti::DtInetAddr &  webSpyIpAddr,
int  webSpyPort 
) [virtual]

Process a web server update event.

Reimplemented from DtRtiexecObserver.

References myAssistantClient.

void DtRtiexecObserverForAssistant::removeCallbacks ( ) [protected, virtual]
void DtRtiexecObserverForAssistant::sendConnectionInfo ( bool  isConnected) [protected, virtual]
void DtRtiexecObserverForAssistant::setForwarderInfo ( int  forwarderPort,
const MAKRti::DtInetAddr &  forwarderToConnectTo 
) [virtual]

If we're not querying the assistant, provide some way for the forwarder to indicate what its forwarderConnInfo is.

References myForwarderPort, and myForwarderToConnectTo.

Indicates that observation of the exec has begun.

Reimplemented from DtRtiexecObserver.

References sendConnectionInfo().

void DtRtiexecObserverForAssistant::tick ( void *  usr) [static]

Callback for periodic processing.

References tick().

Periodic processing.

References myAssistantClient.

Referenced by addCallbacks(), removeCallbacks(), and tick().


Member Data Documentation

Whether or not this rtiexec allows network testing for its federations.

Referenced by initialize(), and processFedExCreatedEvent().

The printer which stores all rtiexec output.

Referenced by DtRtiexecObserverForAssistant(), and ~DtRtiexecObserverForAssistant().

Is federate reconnect enabled?

Referenced by initialize(), and processFederateDisconnectedEvent().

Stored information about the forwarder.

Referenced by queryForConnectionInfo(), sendConnectionInfo(), and setForwarderInfo().

Stored information about the forwarder.

Referenced by queryForConnectionInfo(), sendConnectionInfo(), and setForwarderInfo().

Whether or not the assistant supplied connection info.

Referenced by gotConnInfoFromAssistant(), and queryForConnectionInfo().

Min. time exec should wait between time state updates.

Referenced by addCallbacks(), and processExecObserveMsg().

Buffer which the buffer printer writes to.

Referenced by DtRtiexecObserverForAssistant(), and processLogRequestMsg().


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)