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 Slots | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
DtAssistantConnQueryMgr Class Reference

Maintains list of known RTI connections and processes connection queries from RTI components. More...

+ Inheritance diagram for DtAssistantConnQueryMgr:
+ Collaboration diagram for DtAssistantConnQueryMgr:

Public Slots

void processConnectionsUpdate (const DtRtiConnectionAndConfiguration &conns)
 Processes an update to existing connections or the discovery of new connections.
void processConnectionsRemoval (const DtRtiConnectionAndConfiguration &conns)
 Processes the removal of existing connections.
void processAssistantFound (const DtAssistantInfo &assistant)
 Process the discovery of a remote assistant.
void processAssistantLost (const DtAssistantInfo &assistant)
 Process the loss of a discovered remote assistant.
void processConnQueryAccepted (QWidget *widget)
 Processes the acceptance of a connection query dialog.
void processConnQueryRejected (QWidget *widget)
 Processes the rejection of a connection query dialog.
void startRtiexec (const DtRtiConnectionInfoDataPair &, const DtRtiConnectionConfigurationInfo &, bool)
 Starts an rtiexec with the given connection and configuration.
void addProhibitedPort (int port, const MAKRti::DtString &reason)
 Adds a port that will not be allowed to use in choosing a connection.
void removeProhibitedPort (int port)
 Removes a port that will not be allowed to use in choosing a connection.
void closeConnQueryDialog (const DtAssistantComponentInfo *info)
 Closes the displayed connection query dialog if it matches the given ID.
void processNewUserAddedConnection (const DtRtiConnectionInfoDataPair &, DtAssistantConnQueryWidget *)
 Processes the addition of a new user defined connection that has not yet been accepted.
void checkForConflictingUnsavedConns (DtAssistantConnQueryWidget *widget)
 Checks the unsaved user-added connections from the given widget in order to set whether the connection is conflicting or not.
void setStartRtiexecEnableBasedOnConn (const DtRtiConnectionInfoDataPair &)
 Enables or disables the "Start rtiexec" functionality based on the given connection.
- Public Slots inherited from DtAssistantMgr
void displayWarningDialogs ()
 Displays all warning dialogs.

Public Member Functions

 DtAssistantConnQueryMgr (DtBoost::shared_ptr< DtRtiAssistantServer > server, DtBoost::shared_ptr< DtRtiAssistantPeer > peer, DtAssistantSignalRouter &signalRouter, DtBoost::shared_ptr< DtAssistantComponentMgr > compMgr, DtBoost::shared_ptr< DtAssistantConnectionInfoMgr > connInfoMgr)
 Constructor.
virtual ~DtAssistantConnQueryMgr ()
 Destructor.
virtual void tick ()
 Performs tasks that need to be completed periodically.
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.
virtual bool updateConfigFromWidgetResults (DtRtiConnectionInfoDataPair &connInfo, DtRtiConnectionConfigurationInfo &config, DtAssistantConnQueryWidget *widget)
 Updates the stored configuration from the results of widget.
virtual void updateConnQueryWidget (DtAssistantConnQueryWidget *widget, bool preserveSelection)
 Updates the given connection query widget with the latest RTI connections from the cache.
- 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.

Protected Member Functions

virtual bool checkForInterfaces ()
 Checks for the existence of at least one usable network interface.
void processConnQueryResults (QWidget *widget, bool accepted)
 Processes the results of a connection query.
virtual void processUserAddedConnections (const DtRtiConnectionAndConfiguration &conns)
 Process the addition of new connections.
virtual void processUserRemovedConnections (const DtRtiConnectionAndConfiguration &conns)
 Process the removal of connections.
virtual void addToAllConnQuery (const DtRtiConnectionAndConfiguration &conns)
 Adds a set of connections and configurations to all connection query widgets.
virtual void removeFromAllConnQuery (const DtRtiConnectionAndConfiguration &conns)
 Removes the set of connections to all connection query widgets.
void setChosenConnection (const DtRtiConnectionInfo &conn, const DtRtiConnectionConfigurationInfo &config)
 Process a request to set the connection and config chosen to be used automatically in the future.
void clearChosenConnection ()
 Process a request to remove the connection chosen to be used automatically in the future.
- 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

DtAssistantMsgQueue myConnQueryMsgQueue
 The queue which holds connection query messages.
DtBoost::shared_ptr
< DtAssistantComponentMgr
myCompMgr
 The manager that keeps track of all local RTI components.
DtBoost::shared_ptr
< DtAssistantConnectionInfoMgr
myConnInfoMgr
 The manager that keeps track of all active and inactive connections.
DtClock myClock
 Clock for determining when local interfaces should be checked.
DtAssistantLrcConnQueryDialogmyLrcConnQueryDlg
 The dialog which queries the user for LRC connection information.
DtAssistantRtiexecConnQueryDialogmyRtiexecOrForwarderConnQueryDlg
 The dialog which queries the user for rtiexec or Forwarder connection information.
DtAssistantConnConfigWidgetmyConnConfigWidget
 Connection configuration widget to be inserted into the assistant configuration dialog.
DtAssistantNoInterfacesFoundDialog * myNoInterfacesFoundDialog
 The dialog that informs users that no network interfaces were found.
std::set< int > myCompsConnectingWithChosen
 The set of components that have been told to try to use the current chosen connection.
QSignalMapper * myConnQueryAcceptedMapper
 Signal mappers for the connection query dialogs.
QSignalMapper * myConnQueryRejectedMapper
 Signal mappers for the connection query dialogs.
- 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.

Private Member Functions

 DtAssistantConnQueryMgr (DtAssistantConnQueryMgr const &)
 Copy Constructor not implemented – Copy Not Allowed!
DtAssistantConnQueryMgroperator= (DtAssistantConnQueryMgr const &)
 Assignment not implemented – Assignment Not Allowed!

Message Callbacks

Callbacks for connection query messages

static void addConnQueryMsgToQueue (const DtAssistantConnQueryMsg &msg, void *usr)
 Callback to add connection query message to queue.
static void processConnQueryMsg (const DtAssistantConnQueryMsg &msg, void *usr)
 Callback to process a connection query message from a component.
virtual void addConnQueryMsgToQueue (const DtAssistantConnQueryMsg &msg)
 Called by the callback function to add a message to the queue.
virtual void processConnQueryMsg (const DtAssistantConnQueryMsg &msg)
 Called by the callback function to process connection query messages.

Additional Inherited Members

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

Detailed Description

Maintains list of known RTI connections and processes connection queries from RTI components.

Constructor & Destructor Documentation

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

Copy Constructor not implemented – Copy Not Allowed!

Member Function Documentation

void DtAssistantConnQueryMgr::addConnQueryMsgToQueue ( const DtAssistantConnQueryMsg msg,
void *  usr 
)
staticprotected

Callback to add connection query message to queue.

Connection query messages should be added to a queue in order to be processed one at a time. Two connection query dialogs should not be displayed at the same time.

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

void DtAssistantConnQueryMgr::addConnQueryMsgToQueue ( const DtAssistantConnQueryMsg msg)
protectedvirtual

Called by the callback function to add a message to the queue.

References DtAssistantMsgQueue::addMsg(), myConnQueryMsgQueue, and DtAssistantMgr::myServer.

void DtAssistantConnQueryMgr::addProhibitedPort ( int  port,
const MAKRti::DtString &  reason 
)
slot
void DtAssistantConnQueryMgr::addToAllConnQuery ( const DtRtiConnectionAndConfiguration conns)
protectedvirtual
void DtAssistantConnQueryMgr::checkForConflictingUnsavedConns ( DtAssistantConnQueryWidget widget)
slot
bool DtAssistantConnQueryMgr::checkForInterfaces ( )
protectedvirtual

Checks for the existence of at least one usable network interface.

If not an error dialog will be displayed and the return value will be false.

References DtRtiConnectionInfo::localIpAddresses(), and DtRtiConnectionInfo::setLocalIpAddresses().

Referenced by processConnQueryMsg().

void DtAssistantConnQueryMgr::clearChosenConnection ( )
protected

Process a request to remove the connection chosen to be used automatically in the future.

void DtAssistantConnQueryMgr::closeConnQueryDialog ( const DtAssistantComponentInfo info)
slot

Closes the displayed connection query dialog if it matches the given ID.

References DtAssistantComponentInfo::compId(), DtAssistantMsgQueue::currentCompId(), myConnQueryMsgQueue, myLrcConnQueryDlg, and myRtiexecOrForwarderConnQueryDlg.

Referenced by DtAssistantConnQueryMgr().

void DtAssistantConnQueryMgr::configWidget ( DtAssistantConfigWidget **  widget,
QIcon &  icon,
QString &  name,
DtPreferencesPage pageId 
)
virtual

Retrieves a widget which will be placed in the configuration dialog for configuring user preferences.

Reimplemented from DtAssistantMgr.

References DtConnectionsPage, DtIconAndTextureManager::getIcon(), DtIconAndTextureManager::getInstance(), and myConnConfigWidget.

DtAssistantConnQueryMgr& DtAssistantConnQueryMgr::operator= ( DtAssistantConnQueryMgr const &  )
private

Assignment not implemented – Assignment Not Allowed!

void DtAssistantConnQueryMgr::processAssistantFound ( const DtAssistantInfo assistant)
slot
void DtAssistantConnQueryMgr::processAssistantLost ( const DtAssistantInfo assistant)
slot
void DtAssistantConnQueryMgr::processConfigWidgetAccept ( )
virtual

Process the changes that were accepted in the configuration widget.

Reimplemented from DtAssistantMgr.

References myConnConfigWidget, and updateConfigFromWidgetResults().

void DtAssistantConnQueryMgr::processConnectionsRemoval ( const DtRtiConnectionAndConfiguration conns)
slot

Processes the removal of existing connections.

References removeFromAllConnQuery().

Referenced by DtAssistantConnQueryMgr().

void DtAssistantConnQueryMgr::processConnectionsUpdate ( const DtRtiConnectionAndConfiguration conns)
slot

Processes an update to existing connections or the discovery of new connections.

References addToAllConnQuery().

Referenced by DtAssistantConnQueryMgr().

void DtAssistantConnQueryMgr::processConnQueryAccepted ( QWidget widget)
slot

Processes the acceptance of a connection query dialog.

References processConnQueryResults().

Referenced by DtAssistantConnQueryMgr().

void DtAssistantConnQueryMgr::processConnQueryMsg ( const DtAssistantConnQueryMsg msg,
void *  usr 
)
staticprotected

Callback to process a connection query message from a component.

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

void DtAssistantConnQueryMgr::processConnQueryMsg ( const DtAssistantConnQueryMsg msg)
protectedvirtual
void DtAssistantConnQueryMgr::processConnQueryRejected ( QWidget widget)
slot

Processes the rejection of a connection query dialog.

References processConnQueryResults().

Referenced by DtAssistantConnQueryMgr().

void DtAssistantConnQueryMgr::processConnQueryResults ( QWidget widget,
bool  accepted 
)
protected
void DtAssistantConnQueryMgr::processNewUserAddedConnection ( const DtRtiConnectionInfoDataPair conn,
DtAssistantConnQueryWidget widget 
)
slot

Processes the addition of a new user defined connection that has not yet been accepted.

References DtRtiConnectionAndConfiguration::addConnection(), DtAssistantConnQueryWidget::addConnections(), DtRtiAssociatedConnectionData::DtConnectionConflicting, and myConnInfoMgr.

Referenced by DtAssistantConnQueryMgr().

void DtAssistantConnQueryMgr::processUserAddedConnections ( const DtRtiConnectionAndConfiguration conns)
protectedvirtual

Process the addition of new connections.

References myConnInfoMgr, and DtRtiConnectionAndConfiguration::size().

Referenced by updateConfigFromWidgetResults().

void DtAssistantConnQueryMgr::processUserRemovedConnections ( const DtRtiConnectionAndConfiguration conns)
protectedvirtual

Process the removal of connections.

References myConnInfoMgr, and DtRtiConnectionAndConfiguration::size().

Referenced by updateConfigFromWidgetResults().

void DtAssistantConnQueryMgr::removeFromAllConnQuery ( const DtRtiConnectionAndConfiguration conns)
protectedvirtual
void DtAssistantConnQueryMgr::removeProhibitedPort ( int  port)
slot
void DtAssistantConnQueryMgr::setChosenConnection ( const DtRtiConnectionInfo conn,
const DtRtiConnectionConfigurationInfo config 
)
protected

Process a request to set the connection and config chosen to be used automatically in the future.

void DtAssistantConnQueryMgr::setStartRtiexecEnableBasedOnConn ( const DtRtiConnectionInfoDataPair conn)
slot

Enables or disables the "Start rtiexec" functionality based on the given connection.

References myConnInfoMgr, myLrcConnQueryDlg, DtAssistantLrcConnQueryWidget::setStartRtiexecEnabled(), and DtAssistantLrcConnQueryDialog::widget().

Referenced by DtAssistantConnQueryMgr().

void DtAssistantConnQueryMgr::startRtiexec ( const DtRtiConnectionInfoDataPair conn,
const DtRtiConnectionConfigurationInfo config,
bool  remoteStart 
)
slot

Starts an rtiexec with the given connection and configuration.

References DtRtiConnectionAndConfiguration::addConnection(), and myConnInfoMgr.

Referenced by DtAssistantConnQueryMgr().

void DtAssistantConnQueryMgr::tick ( )
virtual

Performs tasks that need to be completed periodically.

Reimplemented from DtAssistantMgr.

References DtAssistantMsgQueue::beginProcessMsg(), and myConnQueryMsgQueue.

bool DtAssistantConnQueryMgr::updateConfigFromWidgetResults ( DtRtiConnectionInfoDataPair connInfo,
DtRtiConnectionConfigurationInfo config,
DtAssistantConnQueryWidget widget 
)
virtual

Updates the stored configuration from the results of widget.

Sets connInfo and config with the currently selected connection information. Returns true if the connection was made the chosen connection.

References DtAssistantConnQueryWidget::clearUserAddedAndRemoved(), DtAssistantConnQueryWidget::getResults(), myCompsConnectingWithChosen, myConnInfoMgr, processUserAddedConnections(), processUserRemovedConnections(), DtAssistantConnQueryWidget::userAddedConnections(), and DtAssistantConnQueryWidget::userRemovedConnections().

Referenced by processConfigWidgetAccept(), and processConnQueryResults().

void DtAssistantConnQueryMgr::updateConfigWidget ( )
virtual

Forces the configuration widget to be updated.

Reimplemented from DtAssistantMgr.

References myConnConfigWidget, and updateConnQueryWidget().

void DtAssistantConnQueryMgr::updateConnQueryWidget ( DtAssistantConnQueryWidget widget,
bool  preserveSelection 
)
virtual

Updates the given connection query widget with the latest RTI connections from the cache.

Will preserve the current selection in the dialog if preserveSelection is true.

References checkForConflictingUnsavedConns(), myConnInfoMgr, DtAssistantConnQueryWidget::setConnections(), and DtAssistantConnQueryWidget::setInitialState().

Referenced by processConnQueryMsg(), and updateConfigWidget().

Member Data Documentation

DtClock DtAssistantConnQueryMgr::myClock
protected

Clock for determining when local interfaces should be checked.

DtBoost::shared_ptr<DtAssistantComponentMgr> DtAssistantConnQueryMgr::myCompMgr
protected

The manager that keeps track of all local RTI components.

Referenced by processConnQueryMsg().

std::set< int > DtAssistantConnQueryMgr::myCompsConnectingWithChosen
protected

The set of components that have been told to try to use the current chosen connection.

Referenced by processConnQueryMsg(), processConnQueryResults(), and updateConfigFromWidgetResults().

DtAssistantConnConfigWidget* DtAssistantConnQueryMgr::myConnConfigWidget
protected
DtBoost::shared_ptr<DtAssistantConnectionInfoMgr> DtAssistantConnQueryMgr::myConnInfoMgr
protected
QSignalMapper* DtAssistantConnQueryMgr::myConnQueryAcceptedMapper
protected

Signal mappers for the connection query dialogs.

Referenced by DtAssistantConnQueryMgr().

DtAssistantMsgQueue DtAssistantConnQueryMgr::myConnQueryMsgQueue
protected

The queue which holds connection query messages.

Only one may be processed at a time, but this should not prevent the processing of other messages.

Referenced by addConnQueryMsgToQueue(), closeConnQueryDialog(), DtAssistantConnQueryMgr(), processConnQueryMsg(), processConnQueryResults(), tick(), and ~DtAssistantConnQueryMgr().

QSignalMapper* DtAssistantConnQueryMgr::myConnQueryRejectedMapper
protected

Signal mappers for the connection query dialogs.

Referenced by DtAssistantConnQueryMgr().

DtAssistantLrcConnQueryDialog* DtAssistantConnQueryMgr::myLrcConnQueryDlg
protected
DtAssistantNoInterfacesFoundDialog* DtAssistantConnQueryMgr::myNoInterfacesFoundDialog
protected

The dialog that informs users that no network interfaces were found.

DtAssistantRtiexecConnQueryDialog* DtAssistantConnQueryMgr::myRtiexecOrForwarderConnQueryDlg
protected

The dialog which queries the user for rtiexec or Forwarder connection information.

Referenced by addProhibitedPort(), addToAllConnQuery(), closeConnQueryDialog(), DtAssistantConnQueryMgr(), processConnQueryMsg(), removeFromAllConnQuery(), and removeProhibitedPort().


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

Document ID: Generated on Wed Mar 11 20:26:49 EDT 2015 from SVN revision 150939
Copyright © 2005-2015 VT MÄK Inc. All Rights Reserved (www.mak.com)