MAK RTIspy API Documentation for HLA 1516
List of all members | Public Slots | Signals | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions
DtAssistantNetworkCompInfoMgr Class Reference

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.
void provideForwarderInfo (const DtRtiConnectionInfo &conn, const DtAssistantForwarderInfo **info)
 Response to a query for forwarder info.
- Public Slots inherited from DtAssistantMgr
void displayWarningDialogs ()
 Displays all warning dialogs.

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.
- Signals inherited from DtAssistantMgr
void warningDialogDisplayed ()
 Emitted when a warning dialog is displayed.
void warningDialogDismissed ()
 Emitted when a warning dialog is dismissed.
void popupRequested (const MAKRti::DtString &text, int sourceCompId, const MAKRti::DtString &advancedText)
 Emitted when a popup dialog should be displayed.
void popupRequested (const MAKRti::DtString &text, const MAKRti::DtString &source, const MAKRti::DtString &advancedText)
 Emitted when a popup dialog should be displayed.
void notificationRequested (const MAKRti::DtString &message, MAKRti::DtNotifyLevelType notifyLevel, int sourceCompId, bool logOnly)
 Emitted when a notification should be displayed.
void notificationRequested (const MAKRti::DtString &message, MAKRti::DtNotifyLevelType notifyLevel, const MAKRti::DtString &source, bool logOnly)
 Emitted when a notification should be displayed.

Public Member Functions

 DtAssistantNetworkCompInfoMgr (DtBoost::shared_ptr< DtRtiAssistantServer > server, DtBoost::shared_ptr< DtRtiAssistantPeer > peer, DtAssistantSignalRouter &signalRouter, 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.
- Public Member Functions inherited from DtAssistantMgr
 DtAssistantMgr (DtBoost::shared_ptr< DtRtiAssistantServer > server, DtBoost::shared_ptr< DtRtiAssistantPeer > peer, DtAssistantSignalRouter &signalRouter)
 Constructor.
virtual ~DtAssistantMgr ()
 Destructor.
virtual void initialize ()
 Initializes this manager just prior to beginning assistant processing.
virtual void startShutdown ()
 Performs any necessary processing at the start of shutdown.
virtual bool dialogsVisible () const
 Determines if there are any visible dialogs for which this manager is responsible.
virtual void configWidget (DtAssistantConfigWidget **widget, QIcon &icon, QString &name, DtPreferencesPage &pageId)
 Retrieves a widget which will be placed in the configuration dialog for configuring user preferences.
virtual void updateConfigWidget ()
 Forces the configuration widget to be updated.
virtual void processConfigWidgetAccept ()
 Process the changes that were accepted in the configuration widget.

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 Member Functions inherited from DtAssistantMgr
void startDialog (QDialog *dlg, bool inTaskbar, bool warningDialog)
 Sets up the given widget as a dialog.
void finishDialog (QDialog *dlg)
 Should be called prior to deleting any dialog started with startDialog.
void showDialog (QDialog *dlg)
 Shows the dialog.
void startMainWindow (QMainWindow *dlg)
 Sets up a main window dialog.
void finishMainWindow (QMainWindow *dlg)
 Should be called prior to deleting any dialog started with startMainWindow.
void showMainWindow (QMainWindow *dlg)
 Shows the dialog.
void showPopup (const MAKRti::DtString &text, int sourceCompId=-1, const MAKRti::DtString &advancedText=MAKRti::DtString::nullString())
 Displays a popup message with the given text, advanced text, and name of the given source component.
void showPopup (const MAKRti::DtString &text, const MAKRti::DtString &source, const MAKRti::DtString &advancedText=MAKRti::DtString::nullString())
 Displays a popup message with the given text, advanced text, and source name.
void displayNotification (const MAKRti::DtString &message, MAKRti::DtNotifyLevelType notifyLevel, int sourceCompId=-1)
 Displays and logs a notification from the given component.
void displayNotification (const MAKRti::DtString &message, MAKRti::DtNotifyLevelType notifyLevel, const MAKRti::DtString &source)
 Displays and logs notification with the given component name.
void logNotification (const MAKRti::DtString &message, MAKRti::DtNotifyLevelType notifyLevel, int sourceCompId=-1)
 Logs a notification from the given component, does not display.
void logNotification (const MAKRti::DtString &message, MAKRti::DtNotifyLevelType notifyLevel, const MAKRti::DtString &source)
 Logs a notification with the given component name, does not display.

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.
std::set< DtRtiConnectionInfomyRemotelyViewedConnectionsNeedingUpdate
 Local forwarder connections currently being viewed by remote Assistants which require an update to be sent as soon as we get one.
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
- Protected Attributes inherited from DtAssistantMgr
DtBoost::shared_ptr
< DtRtiAssistantServer
myServer
 The Assistant server from which new messages will arrive from local RTI components.
DtBoost::shared_ptr
< DtRtiAssistantPeer
myPeer
 The Assistant peer which communicates with other Assistants.
std::set< QDialog * > myUnparentedDialogs
 All unparented dialogs that are created by the GUI should be added to this set.
std::set< QMainWindow * > myMainWindows
 All main windows that are created by the GUI should be added to this set.
std::set< QDialog * > myWarningDialogs
 Set of the popup dialogs, either parented or unparented, which, when active, should cause a warning icon to be displayed.

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.
- Static Protected Attributes inherited from DtAssistantMgr
static QIcon theRtiIcon
 The icons used by the RTI Assistant.
static QIcon theSmallRtiIcon
static QIcon theWebIcon
static QIcon theNotifyRtiIcon
static QIcon theWarningRtiIcon
static QIcon thePreferencesIcon
static QIcon theAboutIcon
static QIcon theHelpIcon
static bool theIconsAreLoaded = false
 Whether or not the icons have yet been loaded.

Private Member Functions

 DtAssistantNetworkCompInfoMgr (DtAssistantNetworkCompInfoMgr const &)
 Copy Constructor not implemented – Copy Not Allowed!
DtAssistantNetworkCompInfoMgroperator= (DtAssistantNetworkCompInfoMgr const &)
 Assignment not implemented – Assignment Not Allowed!

Message Callbacks

Callbacks for federation information messages

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.

Detailed Description

Compiles network component information from RTI Forwarders.

Member Typedef Documentation

Constructor & Destructor Documentation

DtAssistantNetworkCompInfoMgr::DtAssistantNetworkCompInfoMgr ( DtBoost::shared_ptr< DtRtiAssistantServer server,
DtBoost::shared_ptr< DtRtiAssistantPeer peer,
DtAssistantSignalRouter signalRouter,
DtBoost::shared_ptr< DtAssistantComponentMgr compMgr,
DtBoost::shared_ptr< DtAssistantConnectionInfoMgr connInfoMgr 
)
DtAssistantNetworkCompInfoMgr::~DtAssistantNetworkCompInfoMgr ( )
DtAssistantNetworkCompInfoMgr::DtAssistantNetworkCompInfoMgr ( DtAssistantNetworkCompInfoMgr const &  )
private

Copy Constructor not implemented – Copy Not Allowed!

Member Function Documentation

void DtAssistantNetworkCompInfoMgr::federateRemovalTimeChanged ( float  val)
slot
void DtAssistantNetworkCompInfoMgr::forwarderAdded ( const DtRtiConnectionInfo conn)
signal

Emitted when a new forwarder is discovered.

Referenced by DtAssistantNetworkCompInfoMgr(), and processConnectionsUpdate().

void DtAssistantNetworkCompInfoMgr::forwarderConnUpdated ( const DtRtiConnectionInfo conn)
signal

Emitted when the connection info of a known forwarder is updated.

Referenced by DtAssistantNetworkCompInfoMgr(), and processConnectionsUpdate().

const DtAssistantForwarderInfo * DtAssistantNetworkCompInfoMgr::forwarderInfo ( const DtRtiConnectionInfo conn) const
virtual

Gets the stored information for the given forwarder.

References myLocalForwarders, and myRemoteForwarders.

Referenced by provideForwarderInfo().

void DtAssistantNetworkCompInfoMgr::forwarderRemoved ( const DtRtiConnectionInfo conn)
signal

Emitted when a known forwarder is removed.

Referenced by DtAssistantNetworkCompInfoMgr(), processConnectionsRemoval(), and processConnectionsUpdate().

void DtAssistantNetworkCompInfoMgr::forwarderUpdated ( const DtRtiConnectionInfo conn)
signal
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
void DtAssistantNetworkCompInfoMgr::processConnectionsRemoval ( const DtRtiConnectionAndConfiguration conns)
slot
void DtAssistantNetworkCompInfoMgr::processConnectionsUpdate ( const DtRtiConnectionAndConfiguration conns)
slot
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
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
void DtAssistantNetworkCompInfoMgr::provideForwarderInfo ( const DtRtiConnectionInfo conn,
const DtAssistantForwarderInfo **  info 
)
slot

Response to a query for forwarder info.

References forwarderInfo().

Referenced by DtAssistantNetworkCompInfoMgr().

void DtAssistantNetworkCompInfoMgr::pruneTimedOutSingleUpdates ( )
protectedvirtual

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, myRemotelyViewedConnectionsNeedingUpdate, 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
void DtAssistantNetworkCompInfoMgr::viewNetworkComponentsForConnection ( const DtRtiConnectionInfo conn)
virtual

Member Data Documentation

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
DtBoost::shared_ptr<DtAssistantConnectionInfoMgr> DtAssistantNetworkCompInfoMgr::myConnInfoMgr
protected
float DtAssistantNetworkCompInfoMgr::myDefunctRemovalTime
protected

Defunct removal time for dropped federates.

Referenced by federateRemovalTimeChanged(), processForwarderObserveMsg(), tick(), and viewNetworkComponentsForConnection().

DtForwarderStateByConnectionMap DtAssistantNetworkCompInfoMgr::myLocalForwarders
protected
DtForwarderStateByConnectionMap DtAssistantNetworkCompInfoMgr::myRemoteForwarders
protected
std::set< DtRtiConnectionInfo > DtAssistantNetworkCompInfoMgr::myRemotelyViewedConnectionsNeedingUpdate
protected

Local forwarder connections currently being viewed by remote Assistants which require an update to be sent as soon as we get one.

Referenced by processForwarderObserveMsg(), processForwarderStateMsgForConnection(), and sendAllForwarderInfo().

DtConnectionToObserversMap DtAssistantNetworkCompInfoMgr::myRemotelyViewedRtiForwarders
protected

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
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().

DtRtiConnectionInfo DtAssistantNetworkCompInfoMgr::myViewedRtiForwarder
protected
const int DtAssistantNetworkCompInfoMgr::theTimeToWaitForForwarderInfo = 2
staticprotected

The time, in seconds, to wait for information from the remotely viewed RTI Forwarder before resending the observation request.

Referenced by requestSingleUpdateFromConnectedForwarders().


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

Document ID: Generated on Tue May 7 16:26:47 EDT 2013 from SVN revision 126903
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)