![]() |
MAK RTIspy API Documentation for HLA 1516
|
Compiles network component information from RTI Forwarders. More...
Inheritance diagram for DtAssistantNetworkCompInfoMgr:
Collaboration diagram for DtAssistantNetworkCompInfoMgr:Public Slots | |
| void | processConnectionsUpdate (const DtRtiConnectionAndConfiguration &conns) |
| Processes changes in connection state. | |
| void | processConnectionsRemoval (const DtRtiConnectionAndConfiguration &conns) |
| Processes removal of known connections. | |
| void | sendAllForwarderInfo () |
| Sends udpate message for all local conns to remote assistants. | |
| void | sendObserveForwarderMsg () |
| Sends a message indicating the current connection whose forwarder is being observed by this assistant. | |
| void | federateRemovalTimeChanged (float val) |
| Handle a change in the defunct federation removal time. | |
Signals | |
| void | forwarderAdded (const DtRtiConnectionInfo &conn) |
| Emitted when a new forwarder is discovered. | |
| void | forwarderConnUpdated (const DtRtiConnectionInfo &conn) |
| Emitted when the connection info of a known forwarder is updated. | |
| void | forwarderUpdated (const DtRtiConnectionInfo &conn) |
| Emitted when a known forwarder is updated. | |
| void | forwarderRemoved (const DtRtiConnectionInfo &conn) |
| Emitted when a known forwarder is removed. | |
Public Member Functions | |
| DtAssistantNetworkCompInfoMgr (DtBoost::shared_ptr< DtRtiAssistantServer > server, DtBoost::shared_ptr< DtRtiAssistantPeer > peer, DtBoost::shared_ptr< DtAssistantPreferencesInfoMgr > prefMgr, DtBoost::shared_ptr< DtAssistantComponentMgr > compMgr, DtBoost::shared_ptr< DtAssistantConnectionInfoMgr > connInfoMgr) | |
| Constructor. | |
| ~DtAssistantNetworkCompInfoMgr () | |
| Destructor. | |
| virtual void | tick () |
| Performs tasks that need to be completed periodically. | |
| virtual bool | isLocalForwarder (const DtRtiConnectionInfo &conn) const |
| Returns true if the given forwarder connection is for an active local forwarder. | |
| virtual bool | isRemoteForwarder (const DtRtiConnectionInfo &conn) const |
| Returns true if the given forwarder connection is for an active remote forwarder. | |
| virtual void | requestSingleUpdateFromConnectedForwarders (int id) |
| Performs a single data request of the connected RTI Forwarders. | |
| virtual void | viewNetworkComponentsForConnection (const DtRtiConnectionInfo &conn) |
| Sets the connection which is currently being viewed. | |
| virtual const DtAssistantForwarderInfo * | forwarderInfo (const DtRtiConnectionInfo &conn) const |
| Gets the stored information for the given forwarder. | |
Protected Types | |
| typedef std::map < DtRtiConnectionInfo, DtAssistantInfoSet > | DtConnectionToObserversMap |
| typedef std::map < DtRtiConnectionInfo, DtAssistantForwarderInfo > | DtForwarderStateByConnectionMap |
Protected Member Functions | |
| virtual void | pruneTimedOutSingleUpdates () |
| If there were RTI Forwarder updates that timed out, we send back the incomplete msg. | |
Protected Attributes | |
| DtBoost::shared_ptr < DtAssistantComponentMgr > | myCompMgr |
| The local RTI component manager. | |
| DtBoost::shared_ptr < DtAssistantConnectionInfoMgr > | myConnInfoMgr |
| The connection info manager. | |
| DtRtiConnectionInfo | myViewedRtiForwarder |
| The forwarder connection currently being viewed at this Assistant. | |
| DtConnectionToObserversMap | myRemotelyViewedRtiForwarders |
| Local forwarder connections currently being viewed by remote Assistants, and the set of all Assistants which are viewing them. | |
| DtForwarderStateByConnectionMap | myRemoteForwarders |
| information on all known remote forwarders. | |
| DtForwarderStateByConnectionMap | myLocalForwarders |
| information on all local forwarders. | |
| MAKRti::DtClock | myClock |
| Clock used to determine if we need to resend lost messages. | |
| unsigned int | myTimeStateUpdateInterval |
| The interval, in ms, at which local rtiForwarders should be requested to send updated time state information from local rtiForwarders. | |
| float | myDefunctRemovalTime |
| Defunct removal time for dropped federates. | |
| std::map< std::pair< int, MAKRti::DtTime >, std::map < int, MAKRti::DtString > > | myRequestedRtiForwarderUpdates |
Static Protected Attributes | |
| static const int | theTimeToWaitForForwarderInfo = 2 |
| The time, in seconds, to wait for information from the remotely viewed RTI Forwarder before resending the observation request. | |
Private Member Functions | |
| DtAssistantNetworkCompInfoMgr (DtAssistantNetworkCompInfoMgr const &) | |
| Copy Constructor not implemented -- Copy Not Allowed! | |
| DtAssistantNetworkCompInfoMgr & | operator= (DtAssistantNetworkCompInfoMgr const &) |
| Assignment not implemented -- Assignment Not Allowed! | |
Message Callbacks | |
| virtual void | processForwarderObserveMsg (const DtAssistantStateObserveMsg &msg) |
| Called by the callback function to process a forwarder state message. | |
| virtual void | processForwarderStateMsgForConnection (const DtAssistantForwarderStateMsg &msg) |
| Called by the callback function to process a federation state message on behalf of an rtiAssistanttoAssistantClient that requested the data. | |
| virtual void | handleRtiCommands (const DtAssistantForwarderStateMsg &msg) |
| Called by the callback function to process a forwarder state message. | |
| virtual void | processAssistantCommandMsg (const DtAssistantCommandMsg &msg) |
| Processes an RTI Assistant command message. | |
| static void | processForwarderObserveMsg (const DtAssistantStateObserveMsg &msg, void *usr) |
| Callback to process a forwarder state message. | |
| static void | processForwarderStateMsgForConnection (const DtAssistantForwarderStateMsg &msg, void *usr) |
| Called to process a forwarder state message on behalf of an rtiAssistanttoAssistantClient that requested the data. | |
| static void | processAssistantCommandMsg (const DtAssistantCommandMsg &msg, void *usr) |
| Processes an RTI Assistant command message. | |
Compiles network component information from RTI Forwarders.
typedef std::map< DtRtiConnectionInfo, DtAssistantInfoSet > DtAssistantNetworkCompInfoMgr::DtConnectionToObserversMap [protected] |
typedef std::map< DtRtiConnectionInfo, DtAssistantForwarderInfo > DtAssistantNetworkCompInfoMgr::DtForwarderStateByConnectionMap [protected] |
| DtAssistantNetworkCompInfoMgr::DtAssistantNetworkCompInfoMgr | ( | DtBoost::shared_ptr< DtRtiAssistantServer > | server, |
| DtBoost::shared_ptr< DtRtiAssistantPeer > | peer, | ||
| DtBoost::shared_ptr< DtAssistantPreferencesInfoMgr > | prefMgr, | ||
| DtBoost::shared_ptr< DtAssistantComponentMgr > | compMgr, | ||
| DtBoost::shared_ptr< DtAssistantConnectionInfoMgr > | connInfoMgr | ||
| ) |
Constructor.
References DtAssistantForwarderStateMsg::addCallback(), DtAssistantCommandMsg::addCallback(), DtAssistantStateObserveMsg::addCallback(), connect(), federateRemovalTimeChanged(), myConnInfoMgr, DtAssistantMgr::myPeer, DtAssistantMgr::myServer, processAssistantCommandMsg(), processConnectionsRemoval(), processConnectionsUpdate(), processForwarderObserveMsg(), processForwarderStateMsgForConnection(), sendAllForwarderInfo(), and sendObserveForwarderMsg().
Destructor.
References DtAssistantMgr::myPeer, DtAssistantMgr::myServer, processAssistantCommandMsg(), processForwarderObserveMsg(), processForwarderStateMsgForConnection(), DtAssistantForwarderStateMsg::removeCallback(), DtAssistantCommandMsg::removeCallback(), and DtAssistantStateObserveMsg::removeCallback().
| DtAssistantNetworkCompInfoMgr::DtAssistantNetworkCompInfoMgr | ( | DtAssistantNetworkCompInfoMgr const & | ) | [private] |
Copy Constructor not implemented -- Copy Not Allowed!
| void DtAssistantNetworkCompInfoMgr::federateRemovalTimeChanged | ( | float | val | ) | [slot] |
Handle a change in the defunct federation removal time.
References myConnInfoMgr, myDefunctRemovalTime, myRemotelyViewedRtiForwarders, DtAssistantMgr::myServer, myTimeStateUpdateInterval, and myViewedRtiForwarder.
Referenced by DtAssistantNetworkCompInfoMgr().
| void DtAssistantNetworkCompInfoMgr::forwarderAdded | ( | const DtRtiConnectionInfo & | conn | ) | [signal] |
Emitted when a new forwarder is discovered.
Referenced by processConnectionsUpdate().
| void DtAssistantNetworkCompInfoMgr::forwarderConnUpdated | ( | const DtRtiConnectionInfo & | conn | ) | [signal] |
Emitted when the connection info of a known forwarder is updated.
Referenced by processConnectionsUpdate().
| const DtAssistantForwarderInfo * DtAssistantNetworkCompInfoMgr::forwarderInfo | ( | const DtRtiConnectionInfo & | conn | ) | const [virtual] |
Gets the stored information for the given forwarder.
References myLocalForwarders, and myRemoteForwarders.
| void DtAssistantNetworkCompInfoMgr::forwarderRemoved | ( | const DtRtiConnectionInfo & | conn | ) | [signal] |
Emitted when a known forwarder is removed.
Referenced by processConnectionsRemoval(), and processConnectionsUpdate().
| void DtAssistantNetworkCompInfoMgr::forwarderUpdated | ( | const DtRtiConnectionInfo & | conn | ) | [signal] |
Emitted when a known forwarder is updated.
Referenced by processForwarderStateMsgForConnection(), and viewNetworkComponentsForConnection().
| void DtAssistantNetworkCompInfoMgr::handleRtiCommands | ( | const DtAssistantForwarderStateMsg & | msg | ) | [virtual] |
Called by the callback function to process a forwarder state message.
References myCompMgr, myRequestedRtiForwarderUpdates, DtAssistantMgr::myServer, and DtAssistantForwarderStateMsg::toString().
Referenced by processForwarderStateMsgForConnection().
| bool DtAssistantNetworkCompInfoMgr::isLocalForwarder | ( | const DtRtiConnectionInfo & | conn | ) | const [virtual] |
Returns true if the given forwarder connection is for an active local forwarder.
References myLocalForwarders.
| bool DtAssistantNetworkCompInfoMgr::isRemoteForwarder | ( | const DtRtiConnectionInfo & | conn | ) | const [virtual] |
Returns true if the given forwarder connection is for an active remote forwarder.
References myRemoteForwarders.
| DtAssistantNetworkCompInfoMgr& DtAssistantNetworkCompInfoMgr::operator= | ( | DtAssistantNetworkCompInfoMgr const & | ) | [private] |
Assignment not implemented -- Assignment Not Allowed!
| void DtAssistantNetworkCompInfoMgr::processAssistantCommandMsg | ( | const DtAssistantCommandMsg & | msg, |
| void * | usr | ||
| ) | [static] |
Processes an RTI Assistant command message.
Referenced by DtAssistantNetworkCompInfoMgr(), and ~DtAssistantNetworkCompInfoMgr().
| void DtAssistantNetworkCompInfoMgr::processAssistantCommandMsg | ( | const DtAssistantCommandMsg & | msg | ) | [virtual] |
Processes an RTI Assistant command message.
References DtAssistantCommandMsg::commandType(), DtAssistantCommandListForwarder, DtAssistantMgr::myServer, and requestSingleUpdateFromConnectedForwarders().
| void DtAssistantNetworkCompInfoMgr::processConnectionsRemoval | ( | const DtRtiConnectionAndConfiguration & | conns | ) | [slot] |
Processes removal of known connections.
References DtRtiConnectionAndConfiguration::connections(), forwarderRemoved(), myLocalForwarders, and myRemoteForwarders.
Referenced by DtAssistantNetworkCompInfoMgr().
| void DtAssistantNetworkCompInfoMgr::processConnectionsUpdate | ( | const DtRtiConnectionAndConfiguration & | conns | ) | [slot] |
Processes changes in connection state.
References DtRtiConnectionAndConfiguration::connections(), forwarderAdded(), forwarderConnUpdated(), forwarderRemoved(), myLocalForwarders, and myRemoteForwarders.
Referenced by DtAssistantNetworkCompInfoMgr().
| void DtAssistantNetworkCompInfoMgr::processForwarderObserveMsg | ( | const DtAssistantStateObserveMsg & | msg, |
| void * | usr | ||
| ) | [static] |
Callback to process a forwarder state message.
Referenced by DtAssistantNetworkCompInfoMgr(), and ~DtAssistantNetworkCompInfoMgr().
| void DtAssistantNetworkCompInfoMgr::processForwarderObserveMsg | ( | const DtAssistantStateObserveMsg & | msg | ) | [virtual] |
Called by the callback function to process a forwarder state message.
References DtAssistantComponentInfo::compId(), DtAssistantMsg::compId(), DtAssistantComponentInfo::connUsed(), DtAssistantStateObserveForwarder, DtAssistantStateObserveForwarderPersistent, DtAssistantStateObserveMsg::getConnection(), DtAssistantMsg::isAssistantToAssistantMessage(), DtAssistantStateObserveMsg::isLogRequest(), DtAssistantStateObserveMsg::isObserved(), myCompMgr, myDefunctRemovalTime, myLocalForwarders, DtAssistantMgr::myPeer, myRemotelyViewedRtiForwarders, DtAssistantMgr::myServer, myTimeStateUpdateInterval, myViewedRtiForwarder, DtAssistantMsg::sourceAddr(), DtAssistantMsg::sourceHost(), DtAssistantMsg::sourceId(), and DtAssistantStateObserveMsg::targetType().
| void DtAssistantNetworkCompInfoMgr::processForwarderStateMsgForConnection | ( | const DtAssistantForwarderStateMsg & | msg, |
| void * | usr | ||
| ) | [static] |
Called to process a forwarder state message on behalf of an rtiAssistanttoAssistantClient that requested the data.
Referenced by DtAssistantNetworkCompInfoMgr(), and ~DtAssistantNetworkCompInfoMgr().
| void DtAssistantNetworkCompInfoMgr::processForwarderStateMsgForConnection | ( | const DtAssistantForwarderStateMsg & | msg | ) | [virtual] |
Called by the callback function to process a federation state message on behalf of an rtiAssistanttoAssistantClient that requested the data.
References DtAssistantMsg::compId(), DtAssistantComponentInfo::connUsed(), forwarderUpdated(), handleRtiCommands(), DtAssistantMsg::isAssistantToAssistantMessage(), DtRtiConnectionInfo::isValid(), myCompMgr, myConnInfoMgr, myLocalForwarders, DtAssistantMgr::myPeer, myRemoteForwarders, DtAssistantMgr::myServer, myViewedRtiForwarder, DtAssistantMsg::sourceAddr(), DtAssistantMsg::sourceHost(), and DtAssistantMsg::sourceId().
| void DtAssistantNetworkCompInfoMgr::pruneTimedOutSingleUpdates | ( | ) | [protected, virtual] |
If there were RTI Forwarder updates that timed out, we send back the incomplete msg.
References myClock, myCompMgr, myRequestedRtiForwarderUpdates, and DtAssistantMgr::myServer.
Referenced by tick().
| void DtAssistantNetworkCompInfoMgr::requestSingleUpdateFromConnectedForwarders | ( | int | id | ) | [virtual] |
Performs a single data request of the connected RTI Forwarders.
References myClock, myCompMgr, myRequestedRtiForwarderUpdates, DtAssistantMgr::myServer, and theTimeToWaitForForwarderInfo.
Referenced by processAssistantCommandMsg().
| void DtAssistantNetworkCompInfoMgr::sendAllForwarderInfo | ( | ) | [slot] |
Sends udpate message for all local conns to remote assistants.
References myConnInfoMgr, myLocalForwarders, DtAssistantMgr::myPeer, and myRemotelyViewedRtiForwarders.
Referenced by DtAssistantNetworkCompInfoMgr().
| void DtAssistantNetworkCompInfoMgr::sendObserveForwarderMsg | ( | ) | [slot] |
Sends a message indicating the current connection whose forwarder is being observed by this assistant.
References DtRtiConnectionInfo::isValid(), myConnInfoMgr, DtAssistantMgr::myPeer, and myViewedRtiForwarder.
Referenced by DtAssistantNetworkCompInfoMgr().
| void DtAssistantNetworkCompInfoMgr::tick | ( | ) | [virtual] |
Performs tasks that need to be completed periodically.
Reimplemented from DtAssistantMgr.
References myConnInfoMgr, myDefunctRemovalTime, myRemotelyViewedRtiForwarders, myRequestedRtiForwarderUpdates, DtAssistantMgr::myServer, myTimeStateUpdateInterval, myViewedRtiForwarder, and pruneTimedOutSingleUpdates().
| void DtAssistantNetworkCompInfoMgr::viewNetworkComponentsForConnection | ( | const DtRtiConnectionInfo & | conn | ) | [virtual] |
Sets the connection which is currently being viewed.
References forwarderUpdated(), DtRtiConnectionInfo::invalidConn(), DtRtiConnectionInfo::isValid(), myConnInfoMgr, myDefunctRemovalTime, myLocalForwarders, DtAssistantMgr::myPeer, myRemoteForwarders, myRemotelyViewedRtiForwarders, DtAssistantMgr::myServer, and myViewedRtiForwarder.
MAKRti::DtClock DtAssistantNetworkCompInfoMgr::myClock [protected] |
Clock used to determine if we need to resend lost messages.
Referenced by pruneTimedOutSingleUpdates(), and requestSingleUpdateFromConnectedForwarders().
DtBoost::shared_ptr<DtAssistantComponentMgr> DtAssistantNetworkCompInfoMgr::myCompMgr [protected] |
The local RTI component manager.
Referenced by handleRtiCommands(), processForwarderObserveMsg(), processForwarderStateMsgForConnection(), pruneTimedOutSingleUpdates(), and requestSingleUpdateFromConnectedForwarders().
DtBoost::shared_ptr<DtAssistantConnectionInfoMgr> DtAssistantNetworkCompInfoMgr::myConnInfoMgr [protected] |
The connection info manager.
Referenced by DtAssistantNetworkCompInfoMgr(), federateRemovalTimeChanged(), processForwarderStateMsgForConnection(), sendAllForwarderInfo(), sendObserveForwarderMsg(), tick(), and viewNetworkComponentsForConnection().
float DtAssistantNetworkCompInfoMgr::myDefunctRemovalTime [protected] |
Defunct removal time for dropped federates.
Referenced by federateRemovalTimeChanged(), processForwarderObserveMsg(), tick(), and viewNetworkComponentsForConnection().
information on all local forwarders.
Referenced by forwarderInfo(), isLocalForwarder(), processConnectionsRemoval(), processConnectionsUpdate(), processForwarderObserveMsg(), processForwarderStateMsgForConnection(), sendAllForwarderInfo(), and viewNetworkComponentsForConnection().
information on all known remote forwarders.
Referenced by forwarderInfo(), isRemoteForwarder(), processConnectionsRemoval(), processConnectionsUpdate(), processForwarderStateMsgForConnection(), and viewNetworkComponentsForConnection().
Local forwarder connections currently being viewed by remote Assistants, and the set of all Assistants which are viewing them.
Referenced by federateRemovalTimeChanged(), processForwarderObserveMsg(), sendAllForwarderInfo(), tick(), and viewNetworkComponentsForConnection().
std::map<std::pair<int, MAKRti::DtTime>, std::map<int, MAKRti::DtString> > DtAssistantNetworkCompInfoMgr::myRequestedRtiForwarderUpdates [protected] |
Referenced by handleRtiCommands(), pruneTimedOutSingleUpdates(), requestSingleUpdateFromConnectedForwarders(), and tick().
unsigned int DtAssistantNetworkCompInfoMgr::myTimeStateUpdateInterval [protected] |
The interval, in ms, at which local rtiForwarders should be requested to send updated time state information from local rtiForwarders.
Takes into account remote assistants as well.
Referenced by federateRemovalTimeChanged(), processForwarderObserveMsg(), and tick().
The forwarder connection currently being viewed at this Assistant.
Referenced by federateRemovalTimeChanged(), processForwarderObserveMsg(), processForwarderStateMsgForConnection(), sendObserveForwarderMsg(), tick(), and viewNetworkComponentsForConnection().
const int DtAssistantNetworkCompInfoMgr::theTimeToWaitForForwarderInfo = 2 [static, protected] |
The time, in seconds, to wait for information from the remotely viewed RTI Forwarder before resending the observation request.
Referenced by requestSingleUpdateFromConnectedForwarders().