MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | 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:

Public Member Functions

 DtRtiexecObserverForAssistant ()
 Default CTOR. More...
 
virtual ~DtRtiexecObserverForAssistant ()
 Virtual DTOR. More...
 
virtual void initialize (DtRIDParameters *params, std::shared_ptr< DtRtiexecCmdProc > cmdProc)
 Initialize the observer. More...
 
virtual void startObservation ()
 Indicates that observation of the exec has begun. More...
 
virtual void queryForConnectionInfo (DtRtiConnectionInfoDataPair &connInfo, DtRtiConnectionConfigurationInfo &config)
 Queries the assistant for the connection info to use. More...
 
virtual void performParameterOverrides (DtRIDParameters &ridParams) const
 Overrides RID parameters based on connection status and other settings. More...
 
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. More...
 
virtual void enableNotifications ()
 Enables sending DtWarn & DtFatal to assistant as notifications. More...
 
virtual void disableNotifications ()
 Disables sending DtWarn & DtFatal to assistant as notifications. More...
 
bool gotConnInfoFromAssistant ()
 Returns true if the assistant supplied the rtiexec connection info. More...
 
virtual void sendTrayNotification (const MAKRti::DtString &text, DtNotifyLevelType notifyLevel)
 
const DtRIDParametersridParams () const
 
DtRIDParametersridParams ()
 
- Public Member Functions inherited from DtRtiexecObserver
 DtRtiexecObserver ()
 Constructor. More...
 
virtual ~DtRtiexecObserver ()
 Destructor. More...
 
virtual void setMgr (DtRtiexecObserverMgr *mgr)
 Sets the manager for this observer. More...
 
virtual void removeMgr ()
 Removes the manager for this observer. More...
 
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. More...
 
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. More...
 
virtual void addTickCallback (DtTickCbFn fcn, DtTime interval)
 Add a tick callback function to be called periodically at the given time interval. More...
 
virtual void removeTickCallback (DtTickCbFn fcn)
 Remove tick callback. More...
 
virtual void addTickCallback (DtTickWithExecCbFn fcn, DtTime interval)
 Add a tick callback function that takes a reference to a DtRtiExec to be called periodically at the given time interval. More...
 
virtual void removeTickCallback (DtTickWithExecCbFn fcn)
 Remove tick callback that takes a reference to a DtRtiExec. More...
 
virtual unsigned long connectionId () const
 Get the connection ID for this exec (threadsafe) More...
 

Protected Member Functions

virtual void addCallbacks ()
 Adds all RTI message and tick callbacks. Called when a manager is set. More...
 
virtual void removeCallbacks ()
 Removes all RTI message and tick callbacks. More...
 
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, int astntCompId, const DtFedExec &fedExec)
 Fills in the federate time state using the given information. More...
 
virtual void sendConnectionInfo (bool isConnected)
 Send the connection info to the assistant. More...
 

Protected Attributes

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

Rtiexec event processing functions

virtual void tick ()
 Periodic processing. More...
 
static void tick (void *usr)
 Callback for periodic processing. More...
 

RTI Assistant message processing callbacks

virtual void processFedExCreatedEvent (DtFedExec *exec)
 Process a new federation execution created event. More...
 
virtual void processFedExDestroyedEvent (DtFedExec *exec)
 Process a federation execution destroyed event. More...
 
virtual void processFederateJoinedEvent (DtFedExec *exec, DtFederate *federate)
 Process a federate joined event. More...
 
virtual void processFederateResignedEvent (DtFedExec *exec, DtFederate *federate)
 Process a federate resigned event. More...
 
virtual void processSyncPtRegisteredEvent (DtFedExec *exec, DtSyncPt *pt)
 Process a new sync. point registered event. More...
 
virtual void processFederationSynchronizedEvent (DtFedExec *exec, DtSyncPt *pt)
 Process a federation synchronized to an existing sync. point event. More...
 
virtual void processSyncPtAchievedEvent (DtFedExec *exec, DtFederate *federate, DtSyncPt *pt)
 Process an existing sync. point achieved event. More...
 
virtual void processFederateDisconnectedEvent (DtFedExec *exec, DtFederate *federate)
 Process a federate disconnect event. More...
 
virtual void processFederateReconnectSucceededEvent (DtFedExec *exec, DtFederate *federate)
 Process a federate reconnect succeeded event. More...
 
virtual void processFederateReconnectFailedEvent (DtFedExec *exec, DtFederateHandle federateHandle)
 Process a federate reconnect failed event. More...
 
virtual void processLogFileUpdatedEvent (const MAKRti::DtFilename &logFile)
 Process a log file name update event. More...
 
virtual void processTimeStateEvent (const DtRtiExec &exec)
 Process a federate reconnect failed event. More...
 
virtual void processExecObserveMsg (const DtAssistantStateObserveMsg &msg)
 Process exec observe message by enabling or disabling rtiexec update messages to the assistant. More...
 
virtual void processDeleteFederateMsg (const DtAssistantDeleteFederateMsg &msg)
 Process delete federate command. More...
 
virtual void processDeleteFederationMsg (const DtAssistantDeleteFederationMsg &msg)
 Process delete federation command. More...
 
virtual void processEnableLoggingMsg (const DtAssistantLogEnableMsg &msg)
 Process logging enable command. More...
 
virtual void processNotifyLevelChangeMsg (const DtAssistantNtfyLvlUpdateMsg &msg)
 Process notify level change command. More...
 
virtual void processNetworkTestingEnableMsg (const DtAssistantNetworkTestEnableMsg &msg)
 Process network testing enable/disable command. More...
 
virtual void processLatencyTestCmndMsg (const DtAssistantChangeLatencyTestModeMsg &msg)
 Process latency command. More...
 
virtual void processRidParamRequestMsg (const DtAssistantRidParamsMsg &msg)
 Process RID request. More...
 
virtual void processLogRequestMsg (const DtAssistantLogRequestMsg &msg)
 Process log request. More...
 
virtual void processExitCmndMsg (const DtAssistantExitMsg &msg)
 Process exit command. More...
 
virtual void processAssistantDisconnect ()
 Process assistant disconnect. More...
 
static void processTimeStateEvent (const DtRtiExec &exec, void *usr)
 Callback for periodic time state processing. More...
 
static void processExecObserveMsg (const DtAssistantStateObserveMsg &msg, void *usr)
 Callback for a command message notifying this exec that it is or is not being observed. More...
 
static void processDeleteFederateMsg (const DtAssistantDeleteFederateMsg &msg, void *usr)
 Callback for federate delete command message. More...
 
static void processDeleteFederationMsg (const DtAssistantDeleteFederationMsg &msg, void *usr)
 Callback for federation delete command message. More...
 
static void processEnableLoggingMsg (const DtAssistantLogEnableMsg &msg, void *usr)
 Callback for logging enable command message. More...
 
static void processNotifyLevelChangeMsg (const DtAssistantNtfyLvlUpdateMsg &msg, void *usr)
 Callback for notify level change command message. More...
 
static void processNetworkTestingEnableMsg (const DtAssistantNetworkTestEnableMsg &msg, void *usr)
 Callback for networking testing enable/disable command message. More...
 
static void processLatencyTestCmndMsg (const DtAssistantChangeLatencyTestModeMsg &msg, void *usr)
 Callback for latency testing command message. More...
 
static void processRidParamRequestMsg (const DtAssistantRidParamsMsg &msg, void *usr)
 Callback for RID parameter request. More...
 
static void processLogRequestMsg (const DtAssistantLogRequestMsg &msg, void *usr)
 Callback for log request. More...
 
static void processExitCmndMsg (const DtAssistantExitMsg &msg, void *usr)
 Callback for exit command message. More...
 
static void processAssistantDisconnect (void *usr)
 Callback for assistant disconnect. More...
 

RTI message processing callbacks

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

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

DtRtiexecObserverForAssistant::DtRtiexecObserverForAssistant ( )

Default CTOR.

virtual DtRtiexecObserverForAssistant::~DtRtiexecObserverForAssistant ( )
virtual

Virtual DTOR.

Member Function Documentation

virtual void DtRtiexecObserverForAssistant::addCallbacks ( )
protectedvirtual

Adds all RTI message and tick callbacks. Called when a manager is set.

Implements DtRtiexecObserver.

virtual void DtRtiexecObserverForAssistant::disableNotifications ( )
virtual

Disables sending DtWarn & DtFatal to assistant as notifications.

virtual void DtRtiexecObserverForAssistant::enableNotifications ( )
virtual

Enables sending DtWarn & DtFatal to assistant as notifications.

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,
int  astntCompId,
const DtFedExec fedExec 
)
protected

Fills in the federate time state using the given information.

bool DtRtiexecObserverForAssistant::gotConnInfoFromAssistant ( )
inline

Returns true if the assistant supplied the rtiexec connection info.

References myGotConnInfoFromAssistant.

virtual void DtRtiexecObserverForAssistant::initialize ( DtRIDParameters params,
std::shared_ptr< DtRtiexecCmdProc cmdProc 
)
virtual

Initialize the observer.

Observer takes ownership of params, which could be changed or reinstantiated - do not continue to use the pointer passed into this method. Use ridParams accessor instead.

virtual void DtRtiexecObserverForAssistant::performParameterOverrides ( DtRIDParameters ridParams) const
virtual

Overrides RID parameters based on connection status and other settings.

static void DtRtiexecObserverForAssistant::processAssistantDisconnect ( void *  usr)
static

Callback for assistant disconnect.

virtual void DtRtiexecObserverForAssistant::processAssistantDisconnect ( )
virtual

Process assistant disconnect.

static void DtRtiexecObserverForAssistant::processDeleteFederateMsg ( const DtAssistantDeleteFederateMsg msg,
void *  usr 
)
static

Callback for federate delete command message.

virtual void DtRtiexecObserverForAssistant::processDeleteFederateMsg ( const DtAssistantDeleteFederateMsg msg)
virtual

Process delete federate command.

static void DtRtiexecObserverForAssistant::processDeleteFederationMsg ( const DtAssistantDeleteFederationMsg msg,
void *  usr 
)
static

Callback for federation delete command message.

virtual void DtRtiexecObserverForAssistant::processDeleteFederationMsg ( const DtAssistantDeleteFederationMsg msg)
virtual

Process delete federation command.

static void DtRtiexecObserverForAssistant::processEnableLoggingMsg ( const DtAssistantLogEnableMsg msg,
void *  usr 
)
static

Callback for logging enable command message.

virtual void DtRtiexecObserverForAssistant::processEnableLoggingMsg ( const DtAssistantLogEnableMsg msg)
virtual

Process logging enable command.

static void DtRtiexecObserverForAssistant::processExecObserveMsg ( const DtAssistantStateObserveMsg msg,
void *  usr 
)
static

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

virtual void DtRtiexecObserverForAssistant::processExecObserveMsg ( const DtAssistantStateObserveMsg msg)
virtual

Process exec observe message by enabling or disabling rtiexec update messages to the assistant.

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

Callback for exit command message.

virtual void DtRtiexecObserverForAssistant::processExitCmndMsg ( const DtAssistantExitMsg msg)
virtual

Process exit command.

virtual void DtRtiexecObserverForAssistant::processFederateDisconnectedEvent ( DtFedExec exec,
DtFederate federate 
)
virtual

Process a federate disconnect event.

Reimplemented from DtRtiexecObserver.

virtual void DtRtiexecObserverForAssistant::processFederateJoinedEvent ( DtFedExec exec,
DtFederate federate 
)
virtual

Process a federate joined event.

Reimplemented from DtRtiexecObserver.

virtual void DtRtiexecObserverForAssistant::processFederateReconnectFailedEvent ( DtFedExec exec,
DtFederateHandle  federateHandle 
)
virtual

Process a federate reconnect failed event.

Reimplemented from DtRtiexecObserver.

virtual void DtRtiexecObserverForAssistant::processFederateReconnectSucceededEvent ( DtFedExec exec,
DtFederate federate 
)
virtual

Process a federate reconnect succeeded event.

Reimplemented from DtRtiexecObserver.

virtual void DtRtiexecObserverForAssistant::processFederateResignedEvent ( DtFedExec exec,
DtFederate federate 
)
virtual

Process a federate resigned event.

Reimplemented from DtRtiexecObserver.

virtual void DtRtiexecObserverForAssistant::processFederationSynchronizedEvent ( DtFedExec exec,
DtSyncPt pt 
)
virtual

Process a federation synchronized to an existing sync. point event.

Reimplemented from DtRtiexecObserver.

virtual void DtRtiexecObserverForAssistant::processFedExCreatedEvent ( DtFedExec exec)
virtual

Process a new federation execution created event.

Reimplemented from DtRtiexecObserver.

virtual void DtRtiexecObserverForAssistant::processFedExDestroyedEvent ( DtFedExec exec)
virtual

Process a federation execution destroyed event.

Reimplemented from DtRtiexecObserver.

static void DtRtiexecObserverForAssistant::processLatencyTestCmndMsg ( const DtAssistantChangeLatencyTestModeMsg msg,
void *  usr 
)
static

Callback for latency testing command message.

virtual void DtRtiexecObserverForAssistant::processLatencyTestCmndMsg ( const DtAssistantChangeLatencyTestModeMsg msg)
virtual

Process latency command.

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

Callback for latency test results message.

virtual void DtRtiexecObserverForAssistant::processLatencyTestResultsMsg ( const DtLatencyReportMsg msg)
virtual

Process latency test status message.

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

Callback for latency test status message.

virtual void DtRtiexecObserverForAssistant::processLatencyTestStatusMsg ( const DtTestMgrStatusMsg msg)
virtual

Process latency test status message.

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

Process a log file name update event.

Reimplemented from DtRtiexecObserver.

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

Callback for log request.

virtual void DtRtiexecObserverForAssistant::processLogRequestMsg ( const DtAssistantLogRequestMsg msg)
virtual

Process log request.

static void DtRtiexecObserverForAssistant::processNetworkTestingEnableMsg ( const DtAssistantNetworkTestEnableMsg msg,
void *  usr 
)
static

Callback for networking testing enable/disable command message.

virtual void DtRtiexecObserverForAssistant::processNetworkTestingEnableMsg ( const DtAssistantNetworkTestEnableMsg msg)
virtual

Process network testing enable/disable command.

static void DtRtiexecObserverForAssistant::processNotifyLevelChangeMsg ( const DtAssistantNtfyLvlUpdateMsg msg,
void *  usr 
)
static

Callback for notify level change command message.

virtual void DtRtiexecObserverForAssistant::processNotifyLevelChangeMsg ( const DtAssistantNtfyLvlUpdateMsg msg)
virtual

Process notify level change command.

static void DtRtiexecObserverForAssistant::processRidParamRequestMsg ( const DtAssistantRidParamsMsg msg,
void *  usr 
)
static

Callback for RID parameter request.

virtual void DtRtiexecObserverForAssistant::processRidParamRequestMsg ( const DtAssistantRidParamsMsg msg)
virtual

Process RID request.

virtual void DtRtiexecObserverForAssistant::processSyncPtAchievedEvent ( DtFedExec exec,
DtFederate federate,
DtSyncPt pt 
)
virtual

Process an existing sync. point achieved event.

Reimplemented from DtRtiexecObserver.

virtual void DtRtiexecObserverForAssistant::processSyncPtRegisteredEvent ( DtFedExec exec,
DtSyncPt pt 
)
virtual

Process a new sync. point registered event.

Reimplemented from DtRtiexecObserver.

static void DtRtiexecObserverForAssistant::processTimeStateEvent ( const DtRtiExec exec,
void *  usr 
)
static

Callback for periodic time state processing.

virtual void DtRtiexecObserverForAssistant::processTimeStateEvent ( const DtRtiExec exec)
virtual

Process a federate reconnect failed event.

virtual void DtRtiexecObserverForAssistant::queryForConnectionInfo ( DtRtiConnectionInfoDataPair connInfo,
DtRtiConnectionConfigurationInfo config 
)
virtual

Queries the assistant for the connection info to use.

Note: May reinstantiate RID Parameters object, invalidating old pointers.

virtual void DtRtiexecObserverForAssistant::removeCallbacks ( )
protectedvirtual

Removes all RTI message and tick callbacks.

Called when a manager is removed or the observer is destroyed.

Implements DtRtiexecObserver.

const DtRIDParameters* DtRtiexecObserverForAssistant::ridParams ( ) const
inline
DtRIDParameters* DtRtiexecObserverForAssistant::ridParams ( )
inline
virtual void DtRtiexecObserverForAssistant::sendConnectionInfo ( bool  isConnected)
protectedvirtual

Send the connection info to the assistant.

virtual void DtRtiexecObserverForAssistant::sendTrayNotification ( const MAKRti::DtString &  text,
DtNotifyLevelType  notifyLevel 
)
virtual
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.

virtual void DtRtiexecObserverForAssistant::startObservation ( )
virtual

Indicates that observation of the exec has begun.

Reimplemented from DtRtiexecObserver.

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

Callback for periodic processing.

virtual void DtRtiexecObserverForAssistant::tick ( )
virtual

Periodic processing.

Member Data Documentation

bool DtRtiexecObserverForAssistant::myAllowNetworkTesting
protected

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

std::shared_ptr<DtRtiAssistantExecClient> DtRtiexecObserverForAssistant::myAssistantClient
protected

The assistant client.

DtAssistantPrinter* DtRtiexecObserverForAssistant::myAssistantPrinter
protected

The printer which sends notifications to the assistant.

DtBufferPrinter* DtRtiexecObserverForAssistant::myBufferPrinter
protected

The printer which stores all rtiexec output.

std::shared_ptr<DtRtiexecCmdProc> DtRtiexecObserverForAssistant::myCmdProc
protected

Processes commands to be performed by the rtiexec.

bool DtRtiexecObserverForAssistant::myExecIsObserved
protected

Whether or not there is currently an assistant observing this rtiexec.

DtFederationNameByHandleMap DtRtiexecObserverForAssistant::myFederationNames
protected

Map of federation handles to names.

DtFederationStateByNameMap DtRtiexecObserverForAssistant::myFederations
protected

Cache the complete state of the federations.

bool DtRtiexecObserverForAssistant::myFedReconnectEnabled
protected

Is federate reconnect enabled?

int DtRtiexecObserverForAssistant::myForwarderPort
protected

Stored information about the forwarder.

MAKRti::DtInetAddr DtRtiexecObserverForAssistant::myForwarderToConnectTo
protected

Stored information about the forwarder.

bool DtRtiexecObserverForAssistant::myGotConnInfoFromAssistant
protected

Whether or not the assistant supplied connection info.

Referenced by gotConnInfoFromAssistant().

MAKRti::DtTime DtRtiexecObserverForAssistant::myMinTimeBetweenUpdates
protected

Min. time exec should wait between time state updates.

DtRIDParameters* DtRtiexecObserverForAssistant::myParams
protected

The RID parameter settings.

std::shared_ptr<DtPrinterBuf> DtRtiexecObserverForAssistant::myPrinterBuffer
protected

Buffer which the buffer printer writes to.


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

Document ID: Generated on Wed Jul 8 16:20:32 EDT 2026 from SVN revision 291616
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)