![]() |
MAK RTIspy API Documentation for HLA Evolved
|
Coordinates Assistant activities. More...
Collaboration diagram for DtRtiAssistant:Public Member Functions | |
| DtRtiAssistant (int argc, char **argv, bool autoExit, DtAssistantShowDialogMsg::DtAssistantShowDialogEnum showDialog=DtAssistantShowDialogMsg::DoNotShowDialog, DtAssistantShutdownMsg::DtShutdownEnum shouldShutdown=DtAssistantShutdownMsg::DtDoNotShutdown, const std::vector< DtRtiAssistantCommand > &commands=std::vector< DtRtiAssistantCommand >()) | |
| Constructor. | |
| ~DtRtiAssistant () | |
| Destructor. | |
| void | tick () |
Static Public Member Functions | |
| static void | tick (void *usr) |
| Ticks the server and peer to receive and process new messages. | |
Protected Types | |
| typedef std::vector < DtAssistantMgr * > | DtAssistantMgrVector |
Protected Member Functions | |
| virtual void | initializeAssistantServer (int argc, char **argv, DtAssistantShowDialogMsg::DtAssistantShowDialogEnum showDialog) |
| Called by constructor. | |
| virtual bool | processCommands (DtAssistantShowDialogMsg::DtAssistantShowDialogEnum showDialog, DtAssistantShutdownMsg::DtShutdownEnum shouldShutdown, const std::vector< DtRtiAssistantCommand > &commands) |
| If there are available commands we should process them and return. | |
| virtual bool | showDialogOnConnectedAssistant (DtAssistantShowDialogMsg::DtAssistantShowDialogEnum dialog) |
| Called by constructor. | |
| virtual void | sendShutdownToConnectedAssistant (DtAssistantShutdownMsg::DtShutdownEnum shouldShutDown) |
| Called by constructor. | |
| virtual void | sendCommandToConnectedAssistant (const DtRtiAssistantCommand &command) |
| Called by constructor. | |
| virtual MAKRti::DtString | sendInteractiveCommandToConnectedAssistant (const DtRtiAssistantCommand &command) |
| Called by constructor. | |
| virtual bool | connectToAssistant () |
| Called by constructor. | |
| virtual void | processShutdown (bool shouldConfirm) |
| Called by the callback function to process a shutdown all request. | |
Static Protected Member Functions | |
| static void | processShutdown (void *usr) |
| Callback to process a request to shutdown all components from the GUI. | |
Protected Attributes | |
| DtBoost::shared_ptr < DtRtiAssistantServer > | myServer |
| The Assistant server from which new messages will arrive. | |
| DtBoost::shared_ptr < DtRtiAssistantPeer > | myPeer |
| The Assistant peer which communicates with other Assistants. | |
| QApplication * | myQApp |
| The Qt Application for the Assistant. | |
| DtBoost::shared_ptr < DtAssistantFederateInfoDialogMgr > | myFederateInfoDialogMgr |
| The Assistant federate info view manager, which is responsible for displaying federate information in the Federate Info Dialog. | |
| DtAssistantMgrVector | myManagers |
| List of all managers. | |
| DtSignalToCallbackMapper * | myShutdownSignalMapper |
| Maps shutdown signals to the shutdown callback function. | |
| DtSignalToCallbackMapper * | myTickSignalMapper |
| Maps tick signals to the tick callback function. | |
| QTimer * | myTickTimer |
| Timer which causes tick to occur. | |
| int | myServerPortNumber |
| Port the RTIAssistant server should bind to. | |
| int | myClientPortNumber |
| Port the RTI Assistant client should use to communicate. | |
| bool | myAutoExit |
| Indicates whether or not the Assistant should exit when the last connection has closed. | |
| bool | myShutdownInProgress |
| Indicates that a user requested shutdown is currently in progress. | |
| DtTime | myExitTime |
| Time at which Assistant should be closed due to loss of all connections. | |
| DtClock | myClock |
| Clock for timeouts. | |
| DtBoost::shared_ptr < DtFilePrinter > | myLogPrinter |
| Assistant printer. | |
| MAKRti::DtString | myAssistantLogName |
| Assistant log name. | |
Managers | |
| DtBoost::shared_ptr < DtAssistantComponentMgr > | myCompMgr |
| The Assistant component manager, which maintains information on all attached local RTI components. | |
| DtBoost::shared_ptr < DtAssistantPreferencesInfoMgr > | myPrefMgr |
| The Assistant preferences manager, which maintains the current settings for all user configurable Assistant preferences. | |
| DtBoost::shared_ptr < DtAssistantConnectionInfoMgr > | myConnInfoMgr |
| The Assistant connection information manager, which maintains a list of all known connection configurations and their current states. | |
| DtBoost::shared_ptr < DtAssistantFederationsInfoMgr > | myFederationInfoMgr |
| The Assistant federation information manager, which maintains the current state of all known federations. | |
| DtBoost::shared_ptr < DtAssistantNetworkCompInfoMgr > | myNetworkCompInfoMgr |
| The Assistant network component information manager, which maintains the current state of all known forwarders. | |
| DtBoost::shared_ptr < DtAssistantTrayIconMgr > | myTrayIconMgr |
| The Assistant tray icon manager, which manages the icon and its menu. | |
| DtBoost::shared_ptr < DtAssistantPopupMsgMgr > | myPopupMgr |
| The Assistant popup message manager, which display popup dialogs. | |
| DtBoost::shared_ptr < DtAssistantConnQueryMgr > | myConnQueryMgr |
| The Assistant connection query manager, which processes queries for connection info from connecting components. | |
| DtBoost::shared_ptr < DtAssistantLicenseQueryMgr > | myLicQueryMgr |
| The Assistant license query manager, which processes queries for license server info from connecting components. | |
| DtBoost::shared_ptr < DtAssistantLatencyTestMgr > | myLatTestMgr |
| The Assistant latency test manager, which initiates and reports results of federate latency tests. | |
| DtBoost::shared_ptr < DtAssistantPreferencesViewMgr > | myPrefViewMgr |
| The Assistant preferences view manager, which manages the preferences dialog to display and update user preferences. | |
| DtBoost::shared_ptr < DtAssistantFederationsViewMgr > | myFederationViewMgr |
| The Assistant federation view manager, which is responsible for displaying federation information in the Federations View. | |
| DtBoost::shared_ptr < DtAssistantNetworkCompViewMgr > | myNetworkCompViewMgr |
| The Assistant network component view manager, which is responsible for displaying network/forwarder information in the Network Component View. | |
Private Member Functions | |
| DtRtiAssistant (DtRtiAssistant const &) | |
| Copy Constructor not implemented -- Copy Not Allowed! | |
| DtRtiAssistant & | operator= (DtRtiAssistant const &) |
| Assignment not implemented -- Assignment Not Allowed! | |
Message Callbacks | |
| virtual void | processAssistantShutdownMsg (const DtAssistantShutdownMsg &msg) |
| Called by the callback function to process an assistant shutdown msg. | |
| static void | processAssistantShutdownMsg (const DtAssistantShutdownMsg &msg, void *usr) |
| Callback to process an assistant shutdown message. | |
Coordinates Assistant activities.
The DtRtiAssistant coordinates Assistant activities between the DtRtiAssistantServer, DtRtiAssistantPeer, and managers. It does this primarily by registering callbacks and signals with these classes to process new messages or GUI input.
typedef std::vector<DtAssistantMgr*> DtRtiAssistant::DtAssistantMgrVector [protected] |
| DtRtiAssistant::DtRtiAssistant | ( | int | argc, |
| char ** | argv, | ||
| bool | autoExit, | ||
| DtAssistantShowDialogMsg::DtAssistantShowDialogEnum | showDialog = DtAssistantShowDialogMsg::DoNotShowDialog, |
||
| DtAssistantShutdownMsg::DtShutdownEnum | shouldShutdown = DtAssistantShutdownMsg::DtDoNotShutdown, |
||
| const std::vector< DtRtiAssistantCommand > & | commands = std::vector<DtRtiAssistantCommand>() |
||
| ) |
Constructor.
References connectToAssistant(), determineClientAndServerPorts(), DtASSISTANT_DEFAULT_IPV4_ADDR, DtASSISTANT_DEFAULT_IPV6_ADDR, DtRtiLibPath(), initializeAssistantServer(), DtRtiConnectionInfo::localSupportsIPv4(), DtRtiConnectionInfo::localSupportsIPv6(), myAssistantLogName, myClientPortNumber, myLogPrinter, myPeer, myQApp, myServer, myServerPortNumber, processCommands(), and DtRtiConnectionInfo::setLocalIpAddresses().
Destructor.
References myCompMgr, myConnInfoMgr, myConnQueryMgr, myFederateInfoDialogMgr, myFederationInfoMgr, myFederationViewMgr, myLatTestMgr, myLicQueryMgr, myLogPrinter, myNetworkCompInfoMgr, myNetworkCompViewMgr, myPopupMgr, myPrefMgr, myPrefViewMgr, myQApp, myServer, myShutdownSignalMapper, myTickSignalMapper, myTickTimer, myTrayIconMgr, processAssistantShutdownMsg(), DtSignalToCallbackMapper::removeCallback(), DtAssistantShutdownMsg::removeCallback(), and tick().
| DtRtiAssistant::DtRtiAssistant | ( | DtRtiAssistant const & | ) | [private] |
Copy Constructor not implemented -- Copy Not Allowed!
| bool DtRtiAssistant::connectToAssistant | ( | ) | [protected, virtual] |
Called by constructor.
THIS assistant instance was NOT able to bind to the assistantPort. To make sure the app using the port is an assistant of this RTI version, we will connect to it and make sure we get a valid response.
References DtRtiAssistantClient::isConnected(), and myClientPortNumber.
Referenced by DtRtiAssistant().
| void DtRtiAssistant::initializeAssistantServer | ( | int | argc, |
| char ** | argv, | ||
| DtAssistantShowDialogMsg::DtAssistantShowDialogEnum | showDialog | ||
| ) | [protected, virtual] |
Called by constructor.
This assistant instance was able to bind to the assistantPort and should act as an ordinary server. Normal startup
References DtSignalToCallbackMapper::addCallback(), DtAssistantShutdownMsg::addCallback(), connect(), DtGetLocalHostName(), DtRtiVersionNumber, myAssistantLogName, myCompMgr, myConnInfoMgr, myConnQueryMgr, myFederateInfoDialogMgr, myFederationInfoMgr, myFederationViewMgr, myLatTestMgr, myLicQueryMgr, myManagers, myNetworkCompInfoMgr, myNetworkCompViewMgr, myPeer, myPopupMgr, myPrefMgr, myPrefViewMgr, myQApp, myServer, myShutdownSignalMapper, myTickSignalMapper, myTickTimer, myTrayIconMgr, processAssistantShutdownMsg(), processShutdown(), DtAssistantShowDialogMsg::ShowConnections, DtAssistantShowDialogMsg::ShowFederations, DtAssistantShowDialogMsg::ShowNetworkComponents, DtAssistantShowDialogMsg::ShowNotificationHistory, and tick().
Referenced by DtRtiAssistant().
| DtRtiAssistant& DtRtiAssistant::operator= | ( | DtRtiAssistant const & | ) | [private] |
Assignment not implemented -- Assignment Not Allowed!
| void DtRtiAssistant::processAssistantShutdownMsg | ( | const DtAssistantShutdownMsg & | msg, |
| void * | usr | ||
| ) | [static, protected] |
Callback to process an assistant shutdown message.
Referenced by initializeAssistantServer(), and ~DtRtiAssistant().
| void DtRtiAssistant::processAssistantShutdownMsg | ( | const DtAssistantShutdownMsg & | msg | ) | [protected, virtual] |
Called by the callback function to process an assistant shutdown msg.
References DtAssistantShutdownMsg::isForceShutdown(), and processShutdown().
| bool DtRtiAssistant::processCommands | ( | DtAssistantShowDialogMsg::DtAssistantShowDialogEnum | showDialog, |
| DtAssistantShutdownMsg::DtShutdownEnum | shouldShutdown, | ||
| const std::vector< DtRtiAssistantCommand > & | commands | ||
| ) | [protected, virtual] |
If there are available commands we should process them and return.
If true, commands were processed and this process should exit, else this process should run as an assistant.
References DtAssistantShowDialogMsg::DoNotShowDialog, DtAssistantShutdownMsg::DtDoNotShutdown, sendInteractiveCommandToConnectedAssistant(), sendShutdownToConnectedAssistant(), and showDialogOnConnectedAssistant().
Referenced by DtRtiAssistant().
| void DtRtiAssistant::processShutdown | ( | void * | usr | ) | [static, protected] |
Callback to process a request to shutdown all components from the GUI.
Referenced by initializeAssistantServer(), processAssistantShutdownMsg(), and tick().
| void DtRtiAssistant::processShutdown | ( | bool | shouldConfirm | ) | [protected, virtual] |
Called by the callback function to process a shutdown all request.
References myCompMgr, myConnInfoMgr, myManagers, myServer, and myShutdownInProgress.
| void DtRtiAssistant::sendCommandToConnectedAssistant | ( | const DtRtiAssistantCommand & | command | ) | [protected, virtual] |
Called by constructor.
THIS assistant instance was NOT able to bind to the assistantPort and should act as a client to the server assistant sending any Required messages to the server assistant and exiting. Shuts down any connected rtiExec on the connected assistant.
References myClientPortNumber, and DtRtiAssistantToAssistantClient::sendCommandMessage().
| MAKRti::DtString DtRtiAssistant::sendInteractiveCommandToConnectedAssistant | ( | const DtRtiAssistantCommand & | command | ) | [protected, virtual] |
Called by constructor.
THIS assistant instance was NOT able to bind to the assistantPort and should act as a client to the server assistant sending any Required messages to the server assistant and exiting. Shuts down any connected RTI Forwarder on the connected assistant.
References DtRtiAssistantClient::isConnected(), DtRtiAssistantClient::isDisabled(), myClientPortNumber, and DtRtiAssistantToAssistantClient::sendInteractiveCommandMessage().
Referenced by processCommands().
| void DtRtiAssistant::sendShutdownToConnectedAssistant | ( | DtAssistantShutdownMsg::DtShutdownEnum | shouldShutDown | ) | [protected, virtual] |
Called by constructor.
This assistant instance was NOT able to bind to the assistantPort and should act as a client to the server assistant sending any required messages to the server assistant and exiting. Shows the preferences dialog on the connected assistant.
References myClientPortNumber, DtRtiAssistantToAssistantClient::sendShutdownMessage(), and DtRtiAssistantClient::testConnectionStatus().
Referenced by processCommands().
| bool DtRtiAssistant::showDialogOnConnectedAssistant | ( | DtAssistantShowDialogMsg::DtAssistantShowDialogEnum | dialog | ) | [protected, virtual] |
Called by constructor.
This assistant instance was NOT able to bind to the assistantPort and should act as a client to the server assistant sending any required messages to the server assistant and exiting. Shows the specified dialog on the connected assistant. returns success.
References myClientPortNumber, and DtRtiAssistantToAssistantClient::sendShowDialogMsg().
Referenced by processCommands().
| void DtRtiAssistant::tick | ( | void * | usr | ) | [static] |
Ticks the server and peer to receive and process new messages.
References tick().
| void DtRtiAssistant::tick | ( | ) |
References myAutoExit, myClock, myCompMgr, myExitTime, myManagers, myPeer, myPrefMgr, myQApp, myServer, myShutdownInProgress, and processShutdown().
Referenced by initializeAssistantServer(), tick(), and ~DtRtiAssistant().
MAKRti::DtString DtRtiAssistant::myAssistantLogName [protected] |
Assistant log name.
Referenced by DtRtiAssistant(), and initializeAssistantServer().
bool DtRtiAssistant::myAutoExit [protected] |
Indicates whether or not the Assistant should exit when the last connection has closed.
Referenced by tick().
int DtRtiAssistant::myClientPortNumber [protected] |
Port the RTI Assistant client should use to communicate.
Referenced by connectToAssistant(), DtRtiAssistant(), sendCommandToConnectedAssistant(), sendInteractiveCommandToConnectedAssistant(), sendShutdownToConnectedAssistant(), and showDialogOnConnectedAssistant().
DtClock DtRtiAssistant::myClock [protected] |
Clock for timeouts.
Referenced by tick().
DtBoost::shared_ptr<DtAssistantComponentMgr> DtRtiAssistant::myCompMgr [protected] |
The Assistant component manager, which maintains information on all attached local RTI components.
Referenced by initializeAssistantServer(), processShutdown(), tick(), and ~DtRtiAssistant().
DtBoost::shared_ptr<DtAssistantConnectionInfoMgr> DtRtiAssistant::myConnInfoMgr [protected] |
The Assistant connection information manager, which maintains a list of all known connection configurations and their current states.
Referenced by initializeAssistantServer(), processShutdown(), and ~DtRtiAssistant().
DtBoost::shared_ptr<DtAssistantConnQueryMgr> DtRtiAssistant::myConnQueryMgr [protected] |
The Assistant connection query manager, which processes queries for connection info from connecting components.
Referenced by initializeAssistantServer(), and ~DtRtiAssistant().
DtTime DtRtiAssistant::myExitTime [protected] |
Time at which Assistant should be closed due to loss of all connections.
Referenced by tick().
DtBoost::shared_ptr<DtAssistantFederateInfoDialogMgr> DtRtiAssistant::myFederateInfoDialogMgr [protected] |
The Assistant federate info view manager, which is responsible for displaying federate information in the Federate Info Dialog.
Referenced by initializeAssistantServer(), and ~DtRtiAssistant().
DtBoost::shared_ptr<DtAssistantFederationsInfoMgr> DtRtiAssistant::myFederationInfoMgr [protected] |
The Assistant federation information manager, which maintains the current state of all known federations.
Referenced by initializeAssistantServer(), and ~DtRtiAssistant().
DtBoost::shared_ptr<DtAssistantFederationsViewMgr> DtRtiAssistant::myFederationViewMgr [protected] |
The Assistant federation view manager, which is responsible for displaying federation information in the Federations View.
Referenced by initializeAssistantServer(), and ~DtRtiAssistant().
DtBoost::shared_ptr<DtAssistantLatencyTestMgr> DtRtiAssistant::myLatTestMgr [protected] |
The Assistant latency test manager, which initiates and reports results of federate latency tests.
Referenced by initializeAssistantServer(), and ~DtRtiAssistant().
DtBoost::shared_ptr<DtAssistantLicenseQueryMgr> DtRtiAssistant::myLicQueryMgr [protected] |
The Assistant license query manager, which processes queries for license server info from connecting components.
Referenced by initializeAssistantServer(), and ~DtRtiAssistant().
DtBoost::shared_ptr< DtFilePrinter > DtRtiAssistant::myLogPrinter [protected] |
Assistant printer.
Referenced by DtRtiAssistant(), and ~DtRtiAssistant().
DtAssistantMgrVector DtRtiAssistant::myManagers [protected] |
List of all managers.
Referenced by initializeAssistantServer(), processShutdown(), and tick().
DtBoost::shared_ptr<DtAssistantNetworkCompInfoMgr> DtRtiAssistant::myNetworkCompInfoMgr [protected] |
The Assistant network component information manager, which maintains the current state of all known forwarders.
Referenced by initializeAssistantServer(), and ~DtRtiAssistant().
DtBoost::shared_ptr<DtAssistantNetworkCompViewMgr> DtRtiAssistant::myNetworkCompViewMgr [protected] |
The Assistant network component view manager, which is responsible for displaying network/forwarder information in the Network Component View.
Referenced by initializeAssistantServer(), and ~DtRtiAssistant().
DtBoost::shared_ptr<DtRtiAssistantPeer> DtRtiAssistant::myPeer [protected] |
The Assistant peer which communicates with other Assistants.
Referenced by DtRtiAssistant(), initializeAssistantServer(), and tick().
DtBoost::shared_ptr<DtAssistantPopupMsgMgr> DtRtiAssistant::myPopupMgr [protected] |
The Assistant popup message manager, which display popup dialogs.
Referenced by initializeAssistantServer(), and ~DtRtiAssistant().
DtBoost::shared_ptr<DtAssistantPreferencesInfoMgr> DtRtiAssistant::myPrefMgr [protected] |
The Assistant preferences manager, which maintains the current settings for all user configurable Assistant preferences.
Referenced by initializeAssistantServer(), tick(), and ~DtRtiAssistant().
DtBoost::shared_ptr<DtAssistantPreferencesViewMgr> DtRtiAssistant::myPrefViewMgr [protected] |
The Assistant preferences view manager, which manages the preferences dialog to display and update user preferences.
Referenced by initializeAssistantServer(), and ~DtRtiAssistant().
QApplication* DtRtiAssistant::myQApp [protected] |
The Qt Application for the Assistant.
Referenced by DtRtiAssistant(), initializeAssistantServer(), tick(), and ~DtRtiAssistant().
DtBoost::shared_ptr<DtRtiAssistantServer> DtRtiAssistant::myServer [protected] |
The Assistant server from which new messages will arrive.
Referenced by DtRtiAssistant(), initializeAssistantServer(), processShutdown(), tick(), and ~DtRtiAssistant().
int DtRtiAssistant::myServerPortNumber [protected] |
Port the RTIAssistant server should bind to.
Referenced by DtRtiAssistant().
bool DtRtiAssistant::myShutdownInProgress [protected] |
Indicates that a user requested shutdown is currently in progress.
Referenced by processShutdown(), and tick().
Maps shutdown signals to the shutdown callback function.
Referenced by initializeAssistantServer(), and ~DtRtiAssistant().
Maps tick signals to the tick callback function.
Referenced by initializeAssistantServer(), and ~DtRtiAssistant().
QTimer* DtRtiAssistant::myTickTimer [protected] |
Timer which causes tick to occur.
Referenced by initializeAssistantServer(), and ~DtRtiAssistant().
DtBoost::shared_ptr<DtAssistantTrayIconMgr> DtRtiAssistant::myTrayIconMgr [protected] |
The Assistant tray icon manager, which manages the icon and its menu.
Referenced by initializeAssistantServer(), and ~DtRtiAssistant().