MAK RTIspy API Documentation for HLA Evolved
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:

List of all members.

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 &)
 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 (int id)
 Closes the displayed connection query dialog if it matches the given ID.
void enableLoopbackDevice (bool val)
 Updates whether the loopback device is enabled for RTI connections.
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 Member Functions

 DtAssistantConnQueryMgr (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, DtBoost::shared_ptr< DtAssistantFederationsInfoMgr > fedInfoMgr)
 Constructor.
virtual ~DtAssistantConnQueryMgr ()
 Destructor.
virtual void tick ()
 Performs tasks that need to be completed periodically.
virtual void configWidget (DtAssistantConfigWidget **widget, QIcon &icon, QString &name)
 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.

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 Attributes

DtAssistantMsgQueue myConnQueryMsgQueue
 The queue which holds connection query messages.
DtBoost::shared_ptr
< DtAssistantPreferencesInfoMgr
myPrefMgr
 The manager that keeps track of Assistant preferences.
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.
DtBoost::shared_ptr
< DtAssistantFederationsInfoMgr
myFedInfoMgr
 The manager that keeps track of all federations and federates.
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.
DtAssistantNoInterfacesFoundDialogmyNoInterfacesFoundDialog
 The dialog that informs users that no network interfaces were found.
bool myLoopbackEnabled
 Determines whether or not the loopback device is a supported device for RTI connections.
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.

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.

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,
DtBoost::shared_ptr< DtAssistantPreferencesInfoMgr prefMgr,
DtBoost::shared_ptr< DtAssistantComponentMgr compMgr,
DtBoost::shared_ptr< DtAssistantConnectionInfoMgr connInfoMgr,
DtBoost::shared_ptr< DtAssistantFederationsInfoMgr fedInfoMgr 
)

Copy Constructor not implemented -- Copy Not Allowed!


Member Function Documentation

void DtAssistantConnQueryMgr::addConnQueryMsgToQueue ( const DtAssistantConnQueryMsg msg,
void *  usr 
) [static, protected]

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

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]

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

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

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

Referenced by DtAssistantConnQueryMgr().

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

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

Reimplemented from DtAssistantMgr.

References DtRtiLibPath(), and myConnConfigWidget.

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

Assignment not implemented -- Assignment Not Allowed!

Process the changes that were accepted in the configuration widget.

Reimplemented from DtAssistantMgr.

References myConnConfigWidget, and updateConfigFromWidgetResults().

Processes the removal of existing connections.

References removeFromAllConnQuery().

Referenced by DtAssistantConnQueryMgr().

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

References addToAllConnQuery().

Referenced by DtAssistantConnQueryMgr().

Processes the acceptance of a connection query dialog.

References processConnQueryResults().

Referenced by DtAssistantConnQueryMgr().

void DtAssistantConnQueryMgr::processConnQueryMsg ( const DtAssistantConnQueryMsg msg,
void *  usr 
) [static, protected]

Callback to process a connection query message from a component.

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

void DtAssistantConnQueryMgr::processConnQueryMsg ( const DtAssistantConnQueryMsg msg) [protected, virtual]

Processes the rejection of a connection query dialog.

References processConnQueryResults().

Referenced by DtAssistantConnQueryMgr().

void DtAssistantConnQueryMgr::processConnQueryResults ( QWidget widget,
bool  accepted 
) [protected]

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

Process the addition of new connections.

References myConnInfoMgr, and DtRtiConnectionAndConfiguration::size().

Referenced by updateConfigFromWidgetResults().

Process the removal of connections.

References myConnInfoMgr, and DtRtiConnectionAndConfiguration::size().

Referenced by updateConfigFromWidgetResults().

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

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

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

Referenced by DtAssistantConnQueryMgr().

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.

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

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.

The manager that keeps track of all local RTI components.

Referenced by DtAssistantConnQueryMgr(), and processConnQueryMsg().

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

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

Signal mappers for the connection query dialogs.

Referenced by DtAssistantConnQueryMgr().

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

Signal mappers for the connection query dialogs.

Referenced by DtAssistantConnQueryMgr().

The manager that keeps track of all federations and federates.

Determines whether or not the loopback device is a supported device for RTI connections.

Referenced by checkForInterfaces(), DtAssistantConnQueryMgr(), and enableLoopbackDevice().

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

Referenced by checkForInterfaces(), and DtAssistantConnQueryMgr().

The manager that keeps track of Assistant preferences.

Referenced by checkForInterfaces(), and DtAssistantConnQueryMgr().

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

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


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)