![]() |
MAK RTIspy API Documentation for HLA Evolved
|
Manages the client connection to the RTI Assistant. More...
Inheritance diagram for DtRtiAssistantClient:
Collaboration diagram for DtRtiAssistantClient:Public Member Functions | |
| DtRtiAssistantClient (DtAssistantComponentType type, int port=DtASSISTANT_DEFAULT_PORT) | |
| Constructor. | |
| virtual | ~DtRtiAssistantClient () |
| Destructor. | |
| virtual bool | tick (unsigned int timeout=0) |
| Do the actual message processing. | |
| virtual bool | isConnected () |
| Returns true if the socket is connected. | |
| virtual bool | isDisabled () |
| Returns true if the socket is disabled. | |
| virtual void | addMsgCallback (DtAssistantMsgKind msgKind, DtAssistantMsgCbMgr::DtCallbackFcn fcn, void *usr) |
| Message Callbacks These callback functions operate on all of the connections. | |
| virtual void | removeMsgCallback (DtAssistantMsgKind msgKind, DtAssistantMsgCbMgr::DtCallbackFcn fcn, void *usr) |
| virtual void | addWildcardMsgCallback (DtAssistantMsgCbMgr::DtCallbackFcn fcn, void *usr) |
| virtual void | removeWildcardMsgCallback (DtAssistantMsgCbMgr::DtCallbackFcn fcn, void *usr) |
| virtual void | addDisconnectCallback (DtAssistantDisconnectCb cb, void *usr) |
| These functions add callbacks for notification of a socket disconnect. | |
| virtual void | removeDisconnectCallback (DtAssistantDisconnectCb cb, void *usr) |
| virtual bool | sendLRCConnQueryMsg (bool error, MAKRti::DtInetAddr &relIpAddr, MAKRti::DtInetAddr &beIpAddr, MAKRti::DtInetAddr &interfaceAddr, int &udpPort, int &tcpPort, bool &useRtiexec, bool &forceFullCompliance, int &forwarderPort) |
| Send a message querying for the connection parameters. | |
| virtual bool | sendForwardingComponentConnQueryMsg (bool error, MAKRti::DtInetAddr &relIpAddr, MAKRti::DtInetAddr &beIpAddr, MAKRti::DtInetAddr &interfaceAddr, int &udpPort, int &tcpPort, bool &forceFullCompliance, int &forwarderPort, MAKRti::DtInetAddr &forwardrToConnectTo) |
| Send a message querying for the rtiexec connection parameters. | |
| virtual void | sendLatencyTestMsg (const DtAssistantLatencyReportMsg &msg) |
| Send a message to the assistant with latency test measurements. | |
| virtual void | sendLatencyTestStatusMsg (const DtAssistantTestMgrStatusMsg &msg) |
| Send an updated latency test status message to the assistant. | |
| virtual bool | getNewLicenseServerFromAssistant (bool allowUnlicensed, bool &runUnlicensed, MAKRti::DtString &serverName, const MAKRti::DtString &featToCheck) |
| Send a message to the assistant to query the user for an alternate license server. | |
| virtual void | sendNotifyMsg (const MAKRti::DtString &text, DtNotifyLevelType notifyLevel) |
| Send a message to display a pop up notification above the tray icon. | |
| virtual void | sendSignalTickedMsg () |
| Send a signal ticked message to the assistant. | |
| virtual void | sendDialogBoxMsg (const MAKRti::DtString &text, const MAKRti::DtString &advancedText) |
| Send a message to display a dialog notification. | |
| virtual void | sendClose () |
| Send connection closed message to Assistant. | |
| virtual void | setMsgFactory (DtAssistantMessageFactory *fact) |
| Get/Set the message factory. | |
| virtual DtAssistantMessageFactory * | msgFactory () const |
| virtual void | shutDownConnection () |
| AssistantClientOwner should call this function when it processes an assistantExitMsg. | |
| virtual MAKRti::DtString | getProcessName () const |
| get the process name | |
| virtual int | getPID () const |
| get the PID | |
| virtual MAKRti::DtString | getCommandArgs () const |
| get the command args | |
| bool | testConnectionStatus () |
| test the connection | |
Protected Member Functions | |
| virtual bool | initialize () |
| Attempts to connect to the RTI Assistant. | |
| virtual DtAssistantConnectionStatus | connectToAssistant () |
| Attempt to open a connection and handshake with the Assistant. | |
| virtual DtAssistantConnectionStatus | makeSingleConnectionAttempt () |
| virtual bool | startAssistant () |
| Attempt to start a new Assistant. | |
| virtual bool | readAndProcess (MAKRti::DtTime maxTime) |
| Read and process any messages on the socket for up to the maxTime. | |
| virtual bool | sendMsg (const DtAssistantMsg &msg) |
| Send a message to the RTI Assistant. | |
| virtual DtAssistantMsg * | sendMsgAndWait (const DtAssistantMsg &msg, DtAssistantMsgKind respKind, unsigned int waitSecs=0) |
| Send a message to the RTI Assistant and wait for response of the specified kind. | |
| virtual DtAssistantConnectionStatus | sendConnectMsg () |
| Send basic component information to the Assistant for a new connection. | |
| virtual void | processRespMsg (const DtAssistantMsg &respMsg) |
| virtual void | processNtfyLvlUpdateMsg (const DtAssistantNtfyLvlUpdateMsg &updateMsg) |
| virtual void | processAssistantExitMsg (const DtAssistantExitMsg &inter) |
| virtual void | processDisconnect () |
| Process Assistant socket disconnect. | |
| virtual std::auto_ptr < DtAssistantMsg > | netRead (int *retCode) const |
| Attempt to read a new message from the socket. | |
| virtual bool | sendLicQueryMsg (bool allowUnlicensed, bool &runUnlicensed, MAKRti::DtString &licServer) |
| Send a message querying for the license server. | |
| virtual void | sendClientInfo () |
| intended to be over-ridden by subclasses. | |
Static Protected Member Functions | |
| static void | processRespMsg (const DtAssistantMsg &respMsg, void *usr) |
| Response message callback. | |
| static void | processNtfyLvlUpdateMsg (const DtAssistantNtfyLvlUpdateMsg &updateMsg, void *usr) |
| Notify level update message callback. | |
| static void | processAssistantExitMsg (const DtAssistantExitMsg &inter, void *usr) |
| Process the assistant exit message. The assistant is commanding us to exit. | |
Protected Attributes | |
| bool | myAssistantDisabled |
| Set to true if the Assistant is disabled. | |
| MAKRti::DtInetAddr | myAssistantAddr |
| The IP address of the Assistant. | |
| unsigned int | myAssistantPort |
| The port on which the RTI Assistant listens for connections. | |
| DtTcpMsgSocket * | mySocket |
| The socket to the RTI Assistant. | |
| bool | myCreateIfConnectFails |
| Indicates whether an Assistant should be created if a connection cannot be established. | |
| DtAssistantConnectionStatus | myConnStatus |
| The current connection status. | |
| bool | myInitializingConnection |
| Is connection being initialized. | |
| MAKRti::DtU32 | mySockOpts |
| The socket options to be used when connecting to the Assistant. | |
| DtAssistantMessageFactory * | myMessageFactory |
| The message factory. | |
| DtAssistantDfltMsgFactory | myDefaultMessageFactory |
| Default message factory. | |
| DtAssistantComponentType | myComponentType |
| The component type. (LRC, rtiexec, etc.) | |
| MAKRti::DtClock | myClock |
| Clock for timeouts. | |
| MAKRti::DtTime | myConnTestInterval |
| Interval at which connection should be tested. | |
| MAKRti::DtTime | myTimeToTestConnection |
| Next time to test connection. | |
| DtAssistantMsgCbMgr | myMsgCbMgr |
| Message callback manager. | |
| std::auto_ptr< DtAssistantMsg > | myRespMsg |
| The last response message to be received. | |
| std::list < DtAssistantDisconnectCbInfo * > | myDisconnectCallbacks |
| Lists of pointers to socket disconnect callbacks. | |
| MAKRti::DtMutex * | mySocketMutex |
| locks access to the socket connection. | |
| bool | myShouldShutdown |
| should be set when assistant exit msg has been received. | |
| int | myNumFailedAssistantConnects |
| How many assistant restarts have we attempted. | |
| int | myNumSuccessfulAssistantConnects |
| How many assistant reconnects occurred. | |
| int | myPID |
| the Process ID ( PID ) | |
| MAKRti::DtString | myProcessName |
| the Process Name | |
| MAKRti::DtString | myCommandArgs |
| the command line arguments | |
Static Protected Attributes | |
| static const int | theMaxNumberOfAssistantConnectAttempts = 10 |
| either starting up or reconnecting, how many assistant restarts do we tolerate before giving up. | |
| static const MAKRti::DtInetAddr | theFirstHostInetAddr = DtDefaultInterfaceAddr() |
| The first InetAddr when the federate was launched. | |
Private Member Functions | |
| DtRtiAssistantClient (DtRtiAssistantClient const &) | |
| Copy constructor not implemented. | |
| DtRtiAssistantClient & | operator= (DtRtiAssistantClient const &) |
| Assignment operator not implemented. | |
Manages the client connection to the RTI Assistant.
DtRtiAssistantClient manages the connection to the RTI Assistant. It also provides methods for packaging and sending common messages to the RTI Assistant.
| DtRtiAssistantClient::DtRtiAssistantClient | ( | DtAssistantComponentType | type, |
| int | port = DtASSISTANT_DEFAULT_PORT |
||
| ) |
| DtRtiAssistantClient::~DtRtiAssistantClient | ( | ) | [virtual] |
Destructor.
References mySocket, and mySocketMutex.
| DtRtiAssistantClient::DtRtiAssistantClient | ( | DtRtiAssistantClient const & | ) | [private] |
Copy constructor not implemented.
| void DtRtiAssistantClient::addDisconnectCallback | ( | DtAssistantDisconnectCb | cb, |
| void * | usr | ||
| ) | [virtual] |
These functions add callbacks for notification of a socket disconnect.
References myDisconnectCallbacks.
| void DtRtiAssistantClient::addMsgCallback | ( | DtAssistantMsgKind | msgKind, |
| DtAssistantMsgCbMgr::DtCallbackFcn | fcn, | ||
| void * | usr | ||
| ) | [virtual] |
Message Callbacks These callback functions operate on all of the connections.
References myMsgCbMgr.
Referenced by DtAssistantExitMsg::addCallback(), DtAssistantFederateSignalTickIntervalMsg::addCallback(), DtAssistantLogRequestMsg::addCallback(), DtAssistantLogEnableMsg::addCallback(), DtAssistantDeleteFederationMsg::addCallback(), DtAssistantNtfyLvlUpdateMsg::addCallback(), DtAssistantAwaitingForwardersMsg::addCallback(), DtAssistantDeleteFederateMsg::addCallback(), DtAssistantNetworkTestEnableMsg::addCallback(), DtAssistantRidParamsMsg::addCallback(), DtAssistantChangeLatencyTestModeMsg::addCallback(), DtAssistantStateObserveMsg::addCallback(), and sendMsgAndWait().
| void DtRtiAssistantClient::addWildcardMsgCallback | ( | DtAssistantMsgCbMgr::DtCallbackFcn | fcn, |
| void * | usr | ||
| ) | [virtual] |
References myMsgCbMgr.
| DtAssistantConnectionStatus DtRtiAssistantClient::connectToAssistant | ( | ) | [protected, virtual] |
Attempt to open a connection and handshake with the Assistant.
Returns the connection status. Does not block, so
References DtAssistantConnected, DtAssistantConnectFailed, DtAssistantNoResponse, makeSingleConnectionAttempt(), myCreateIfConnectFails, myNumFailedAssistantConnects, startAssistant(), and theMaxNumberOfAssistantConnectAttempts.
Referenced by initialize().
| MAKRti::DtString DtRtiAssistantClient::getCommandArgs | ( | ) | const [virtual] |
get the command args
References myCommandArgs.
| bool DtRtiAssistantClient::getNewLicenseServerFromAssistant | ( | bool | allowUnlicensed, |
| bool & | runUnlicensed, | ||
| MAKRti::DtString & | serverName, | ||
| const MAKRti::DtString & | featToCheck | ||
| ) | [virtual] |
Send a message to the assistant to query the user for an alternate license server.
Returns true unless user cancels dialog.
References lm, and sendLicQueryMsg().
Referenced by DtFedExec::init(), and initControl().
| int DtRtiAssistantClient::getPID | ( | ) | const [virtual] |
get the PID
References myPID.
| MAKRti::DtString DtRtiAssistantClient::getProcessName | ( | ) | const [virtual] |
get the process name
References myProcessName.
| bool DtRtiAssistantClient::initialize | ( | ) | [protected, virtual] |
Attempts to connect to the RTI Assistant.
Will create one if none is present.
References connectToAssistant(), DtAssistantConnected, DtAssistantConnectFailed, DtAssistantConnectRejected, DtAssistantNoResponse, DtAssistantWrongDisplay, isDisabled(), myAssistantDisabled, myInitializingConnection, myNumSuccessfulAssistantConnects, myShouldShutdown, and sendClientInfo().
Referenced by DtRtiAssistantForwarderClient::DtRtiAssistantForwarderClient(), DtRtiAssistantLrcClient::DtRtiAssistantLrcClient(), DtRtiAssistantShmExecClient::DtRtiAssistantShmExecClient(), DtRtiAssistantToAssistantClient::DtRtiAssistantToAssistantClient(), DtRtiAssistantWwwClient::DtRtiAssistantWwwClient(), readAndProcess(), sendMsg(), and sendMsgAndWait().
| bool DtRtiAssistantClient::isConnected | ( | ) | [virtual] |
Returns true if the socket is connected.
References DtTcpMsgSocket::isConnected(), and mySocket.
Referenced by DtRtiAssistant::connectToAssistant(), initControl(), and DtRtiAssistant::sendInteractiveCommandToConnectedAssistant().
| bool DtRtiAssistantClient::isDisabled | ( | ) | [virtual] |
Returns true if the socket is disabled.
References myAssistantDisabled, myNumFailedAssistantConnects, and theMaxNumberOfAssistantConnectAttempts.
Referenced by initialize(), and DtRtiAssistant::sendInteractiveCommandToConnectedAssistant().
| DtAssistantConnectionStatus DtRtiAssistantClient::makeSingleConnectionAttempt | ( | ) | [protected, virtual] |
| DtAssistantMessageFactory * DtRtiAssistantClient::msgFactory | ( | ) | const [virtual] |
References myMessageFactory.
Referenced by netRead(), DtRtiAssistantShmExecClient::sendClientInfo(), DtRtiAssistantWwwClient::sendClientInfo(), DtRtiAssistantForwarderClient::sendClientInfo(), DtRtiAssistantExecClient::sendClientInfo(), DtRtiAssistantLrcClient::sendClientInfo(), sendClose(), DtRtiAssistantToAssistantClient::sendCommandMessage(), sendConnectMsg(), sendDialogBoxMsg(), DtRtiAssistantExecClient::sendExecStateMsg(), DtRtiAssistantExecClient::sendFederateUpdateMsg(), DtRtiAssistantExecClient::sendFederationStateMsg(), DtRtiAssistantExecClient::sendFederationTimeStateMsg(), sendForwardingComponentConnQueryMsg(), DtRtiAssistantForwarderClient::sendFullForwarderInfo(), DtRtiAssistantToAssistantClient::sendInteractiveCommandMessage(), sendLicQueryMsg(), DtRtiAssistantExecClient::sendLogMsg(), sendLRCConnQueryMsg(), DtRtiAssistantExecClient::sendNoFederationMsg(), sendNotifyMsg(), DtRtiAssistantExecClient::sendRidParamsMsg(), DtRtiAssistantToAssistantClient::sendShowDialogMsg(), DtRtiAssistantToAssistantClient::sendShutdownMessage(), sendSignalTickedMsg(), DtRtiAssistantExecClient::sendSyncPtUpdateMsg(), and DtRtiAssistantForwarderClient::sendWaitingForForwarders().
| std::auto_ptr< DtAssistantMsg > DtRtiAssistantClient::netRead | ( | int * | retCode | ) | const [protected, virtual] |
Attempt to read a new message from the socket.
References DtASSISTANT_BUFFER_TOO_SMALL, DtASSISTANT_INVALID_VERSION, DtASSISTANT_READ_BAD_PACKET, DtASSISTANT_READ_FILTERED_PACKET, DtASSISTANT_READ_NO_PACKETS, DtASSISTANT_READ_SIZE_MISMATCH, DtASSISTANT_READ_SUCCESS, DtASSISTANT_UNKNOWN_ERROR, DtAssistantMessageVersion, DtTcpMsgSocket::isConnected(), DtAssistantMsg::isOk(), DtAssistantMsg::kindToString(), msgFactory(), DtNetAssistantMsgHeader::msgKind, mySocket, mySocketMutex, DtTcpMsgSocket::recvMessage(), DtNetAssistantMsgHeader::totalSize, DtNetAssistantMsgHeader::version, and DtNetAssistantMsgHeader::versionMatches().
Referenced by readAndProcess().
| DtRtiAssistantClient& DtRtiAssistantClient::operator= | ( | DtRtiAssistantClient const & | ) | [private] |
Assignment operator not implemented.
| void DtRtiAssistantClient::processAssistantExitMsg | ( | const DtAssistantExitMsg & | inter, |
| void * | usr | ||
| ) | [static, protected] |
Process the assistant exit message. The assistant is commanding us to exit.
Referenced by DtRtiAssistantClient().
| void DtRtiAssistantClient::processAssistantExitMsg | ( | const DtAssistantExitMsg & | inter | ) | [protected, virtual] |
References shutDownConnection().
| void DtRtiAssistantClient::processDisconnect | ( | ) | [protected, virtual] |
Process Assistant socket disconnect.
References DtAssistantDisconnectCbInfo::myCb, myDisconnectCallbacks, and DtAssistantDisconnectCbInfo::myUsr.
Referenced by testConnectionStatus(), and tick().
| void DtRtiAssistantClient::processNtfyLvlUpdateMsg | ( | const DtAssistantNtfyLvlUpdateMsg & | updateMsg, |
| void * | usr | ||
| ) | [static, protected] |
Notify level update message callback.
Referenced by DtRtiAssistantClient().
| void DtRtiAssistantClient::processNtfyLvlUpdateMsg | ( | const DtAssistantNtfyLvlUpdateMsg & | updateMsg | ) | [protected, virtual] |
References DtAssistantNtfyLvlUpdateMsg::notifyLevel().
| void DtRtiAssistantClient::processRespMsg | ( | const DtAssistantMsg & | respMsg, |
| void * | usr | ||
| ) | [static, protected] |
Response message callback.
Referenced by sendMsgAndWait().
| void DtRtiAssistantClient::processRespMsg | ( | const DtAssistantMsg & | respMsg | ) | [protected, virtual] |
References DtAssistantMsg::clone(), and myRespMsg.
| bool DtRtiAssistantClient::readAndProcess | ( | MAKRti::DtTime | maxTime | ) | [protected, virtual] |
Read and process any messages on the socket for up to the maxTime.
References DtASSISTANT_INVALID_VERSION, DtASSISTANT_READ_NO_PACKETS, DtASSISTANT_READ_SUCCESS, initialize(), DtTcpMsgSocket::isConnected(), myClock, myMsgCbMgr, mySocket, netRead(), and shutDownConnection().
Referenced by tick().
| void DtRtiAssistantClient::removeDisconnectCallback | ( | DtAssistantDisconnectCb | cb, |
| void * | usr | ||
| ) | [virtual] |
| void DtRtiAssistantClient::removeMsgCallback | ( | DtAssistantMsgKind | msgKind, |
| DtAssistantMsgCbMgr::DtCallbackFcn | fcn, | ||
| void * | usr | ||
| ) | [virtual] |
References myMsgCbMgr.
Referenced by DtAssistantExitMsg::removeCallback(), DtAssistantFederateSignalTickIntervalMsg::removeCallback(), DtAssistantLogRequestMsg::removeCallback(), DtAssistantLogEnableMsg::removeCallback(), DtAssistantDeleteFederationMsg::removeCallback(), DtAssistantNtfyLvlUpdateMsg::removeCallback(), DtAssistantAwaitingForwardersMsg::removeCallback(), DtAssistantDeleteFederateMsg::removeCallback(), DtAssistantNetworkTestEnableMsg::removeCallback(), DtAssistantRidParamsMsg::removeCallback(), DtAssistantChangeLatencyTestModeMsg::removeCallback(), DtAssistantStateObserveMsg::removeCallback(), and sendMsgAndWait().
| void DtRtiAssistantClient::removeWildcardMsgCallback | ( | DtAssistantMsgCbMgr::DtCallbackFcn | fcn, |
| void * | usr | ||
| ) | [virtual] |
References myMsgCbMgr.
| void DtRtiAssistantClient::sendClientInfo | ( | ) | [protected, virtual] |
intended to be over-ridden by subclasses.
Sends subclass specific data to the assistant.
Reimplemented in DtRtiAssistantLrcClient, DtRtiAssistantExecClient, DtRtiAssistantForwarderClient, DtRtiAssistantToAssistantClient, DtRtiAssistantWwwClient, and DtRtiAssistantShmExecClient.
Referenced by initialize().
| void DtRtiAssistantClient::sendClose | ( | ) | [virtual] |
Send connection closed message to Assistant.
This should be called prior to a normal shutdown of the client.
References DtAssistantConnMsgKind, msgFactory(), myComponentType, sendMsg(), DtAssistantConnMsg::setComponentType(), and DtAssistantConnMsg::setDisconnect().
Referenced by DtRtiAssistantToAssistantClient::~DtRtiAssistantToAssistantClient().
| DtAssistantConnectionStatus DtRtiAssistantClient::sendConnectMsg | ( | ) | [protected, virtual] |
Send basic component information to the Assistant for a new connection.
Returns false if the Assistant rejects this connection.
References DtAssistantConnMsg::display(), DtAssistantConnected, DtAssistantConnectRejected, DtAssistantConnMsgKind, DtAssistantNoResponse, DtAssistantWrongDisplay, DtAssistantConnMsg::isDisconnect(), msgFactory(), myComponentType, myCreateIfConnectFails, mySocket, mySocketMutex, sendMsgAndWait(), DtAssistantConnMsg::setComponentType(), DtAssistantConnMsg::setDisconnect(), and DtAssistantConnMsg::setDisplay().
Referenced by makeSingleConnectionAttempt().
| void DtRtiAssistantClient::sendDialogBoxMsg | ( | const MAKRti::DtString & | text, |
| const MAKRti::DtString & | advancedText | ||
| ) | [virtual] |
Send a message to display a dialog notification.
References DtAssistantPopupMsgKind, msgFactory(), sendMsg(), and DtAssistantPopupMsg::set().
Referenced by DtAssistantPopupHelper::sendPopupMessage().
| bool DtRtiAssistantClient::sendForwardingComponentConnQueryMsg | ( | bool | error, |
| MAKRti::DtInetAddr & | relIpAddr, | ||
| MAKRti::DtInetAddr & | beIpAddr, | ||
| MAKRti::DtInetAddr & | interfaceAddr, | ||
| int & | udpPort, | ||
| int & | tcpPort, | ||
| bool & | forceFullCompliance, | ||
| int & | forwarderPort, | ||
| MAKRti::DtInetAddr & | forwardrToConnectTo | ||
| ) | [virtual] |
Send a message querying for the rtiexec connection parameters.
References DtAssistantConnQueryMsg::additionalForwarderConnectionAddr(), DtAssistantConnQueryMsg::bestEffortIpAddress(), DtAssistantConnQueryMsgKind, DtAssistantConnQueryMsg::forceFullCompliance(), DtAssistantConnQueryMsg::forwarderPort(), DtAssistantConnQueryMsg::isAccepted(), msgFactory(), DtAssistantConnQueryMsg::networkInterfaceAddress(), DtAssistantConnQueryMsg::reliableIpAddress(), sendMsgAndWait(), DtAssistantConnQueryMsg::tcpPort(), and DtAssistantConnQueryMsg::udpPort().
| void DtRtiAssistantClient::sendLatencyTestMsg | ( | const DtAssistantLatencyReportMsg & | msg | ) | [virtual] |
Send a message to the assistant with latency test measurements.
References sendMsg().
Referenced by DtTestManager::processLatencyTest().
| void DtRtiAssistantClient::sendLatencyTestStatusMsg | ( | const DtAssistantTestMgrStatusMsg & | msg | ) | [virtual] |
Send an updated latency test status message to the assistant.
References sendMsg().
Referenced by DtTestManager::sendStatusMessages().
| bool DtRtiAssistantClient::sendLicQueryMsg | ( | bool | allowUnlicensed, |
| bool & | runUnlicensed, | ||
| MAKRti::DtString & | licServer | ||
| ) | [protected, virtual] |
Send a message querying for the license server.
References DtAssistantLicQueryMsgKind, DtAssistantLicQueryMsg::isAccepted(), DtAssistantLicQueryMsg::isUnlicensed(), DtAssistantLicQueryMsg::licenseServer(), msgFactory(), sendMsgAndWait(), and DtAssistantLicQueryMsg::setUnlicensed().
Referenced by getNewLicenseServerFromAssistant().
| bool DtRtiAssistantClient::sendLRCConnQueryMsg | ( | bool | error, |
| MAKRti::DtInetAddr & | relIpAddr, | ||
| MAKRti::DtInetAddr & | beIpAddr, | ||
| MAKRti::DtInetAddr & | interfaceAddr, | ||
| int & | udpPort, | ||
| int & | tcpPort, | ||
| bool & | useRtiexec, | ||
| bool & | forceFullCompliance, | ||
| int & | forwarderPort | ||
| ) | [virtual] |
Send a message querying for the connection parameters.
References DtAssistantConnQueryMsg::bestEffortIpAddress(), DtAssistantConnQueryMsgKind, DtAssistantConnQueryMsg::forceFullCompliance(), DtAssistantConnQueryMsg::forwarderPort(), DtAssistantConnQueryMsg::isAccepted(), msgFactory(), DtAssistantConnQueryMsg::networkInterfaceAddress(), DtAssistantConnQueryMsg::reliableIpAddress(), sendMsgAndWait(), DtAssistantConnQueryMsg::setError(), DtAssistantConnQueryMsg::tcpPort(), DtAssistantConnQueryMsg::udpPort(), and DtAssistantConnQueryMsg::useRtiexec().
| bool DtRtiAssistantClient::sendMsg | ( | const DtAssistantMsg & | msg | ) | [protected, virtual] |
Send a message to the RTI Assistant.
returns true if no error.
References initialize(), DtTcpMsgSocket::isConnected(), mySocket, mySocketMutex, and DtTcpMsgSocket::sendMessage().
Referenced by DtRtiAssistantShmExecClient::sendClientInfo(), DtRtiAssistantWwwClient::sendClientInfo(), DtRtiAssistantForwarderClient::sendClientInfo(), DtRtiAssistantExecClient::sendClientInfo(), DtRtiAssistantLrcClient::sendClientInfo(), sendClose(), DtRtiAssistantToAssistantClient::sendCommandMessage(), sendDialogBoxMsg(), DtRtiAssistantExecClient::sendExecStateMsg(), DtRtiAssistantExecClient::sendFederateUpdateMsg(), DtRtiAssistantExecClient::sendFederationStateMsg(), DtRtiAssistantExecClient::sendFederationTimeStateMsg(), DtRtiAssistantForwarderClient::sendFullForwarderInfo(), sendLatencyTestMsg(), sendLatencyTestStatusMsg(), DtRtiAssistantExecClient::sendLogMsg(), DtRtiAssistantExecClient::sendNoFederationMsg(), sendNotifyMsg(), DtRtiAssistantExecClient::sendRidParamsMsg(), DtRtiAssistantToAssistantClient::sendShowDialogMsg(), DtRtiAssistantToAssistantClient::sendShutdownMessage(), sendSignalTickedMsg(), DtRtiAssistantExecClient::sendSyncPtUpdateMsg(), and DtRtiAssistantForwarderClient::sendWaitingForForwarders().
| DtAssistantMsg * DtRtiAssistantClient::sendMsgAndWait | ( | const DtAssistantMsg & | msg, |
| DtAssistantMsgKind | respKind, | ||
| unsigned int | waitSecs = 0 |
||
| ) | [protected, virtual] |
Send a message to the RTI Assistant and wait for response of the specified kind.
A pointer to the response message will be returned. Ownership of the message is passed to the calling function who must delete it when finished. Optional parameter waitSecs specifies how long we should wait for the response. If 0 is specified, wait is indefinite. Returns null pointer if timeout occurred.
References addMsgCallback(), DtTcpMsgSocket::flush(), initialize(), DtTcpMsgSocket::isConnected(), myClock, myNumSuccessfulAssistantConnects, myRespMsg, myShouldShutdown, mySocket, mySocketMutex, processRespMsg(), removeMsgCallback(), DtTcpMsgSocket::sendMessage(), DtTcpMsgSocket::testConnectionStatus(), and tick().
Referenced by sendConnectMsg(), sendForwardingComponentConnQueryMsg(), DtRtiAssistantToAssistantClient::sendInteractiveCommandMessage(), sendLicQueryMsg(), and sendLRCConnQueryMsg().
| void DtRtiAssistantClient::sendNotifyMsg | ( | const MAKRti::DtString & | text, |
| DtNotifyLevelType | notifyLevel | ||
| ) | [virtual] |
Send a message to display a pop up notification above the tray icon.
References DtAssistantNotifyMsgKind, msgFactory(), sendMsg(), DtAssistantNotifyMsg::setNotifyLevel(), and DtAssistantNotifyMsg::setText().
| void DtRtiAssistantClient::sendSignalTickedMsg | ( | ) | [virtual] |
Send a signal ticked message to the assistant.
References DtAssistantSignalTickedMsgKind, msgFactory(), and sendMsg().
Referenced by DtFederateMgr::sendTickedMsg().
| void DtRtiAssistantClient::setMsgFactory | ( | DtAssistantMessageFactory * | fact | ) | [virtual] |
Get/Set the message factory.
References myMessageFactory.
| void DtRtiAssistantClient::shutDownConnection | ( | ) | [virtual] |
AssistantClientOwner should call this function when it processes an assistantExitMsg.
References myShouldShutdown.
Referenced by processAssistantExitMsg(), and readAndProcess().
| bool DtRtiAssistantClient::startAssistant | ( | ) | [protected, virtual] |
Attempt to start a new Assistant.
References DtCreateProcess__rti__(), DtProcFgInteractive__rti__, DtProcNonInteractive__rti__, and DtRtiLibPath().
Referenced by connectToAssistant().
test the connection
References mySocket, mySocketMutex, NULL, processDisconnect(), and DtTcpMsgSocket::testConnectionStatus().
Referenced by DtRtiAssistant::sendShutdownToConnectedAssistant().
| bool DtRtiAssistantClient::tick | ( | unsigned int | timeout = 0 | ) | [virtual] |
Do the actual message processing.
References DtTcpMsgSocket::isConnected(), myClock, myConnTestInterval, mySocket, mySocketMutex, myTimeToTestConnection, processDisconnect(), readAndProcess(), and DtTcpMsgSocket::testConnectionStatus().
Referenced by DtFederateMgr::posttick(), and sendMsgAndWait().
MAKRti::DtInetAddr DtRtiAssistantClient::myAssistantAddr [protected] |
The IP address of the Assistant.
Referenced by DtRtiAssistantClient(), and makeSingleConnectionAttempt().
bool DtRtiAssistantClient::myAssistantDisabled [protected] |
Set to true if the Assistant is disabled.
Referenced by initialize(), and isDisabled().
unsigned int DtRtiAssistantClient::myAssistantPort [protected] |
The port on which the RTI Assistant listens for connections.
Referenced by makeSingleConnectionAttempt().
MAKRti::DtClock DtRtiAssistantClient::myClock [protected] |
Clock for timeouts.
Referenced by readAndProcess(), sendMsgAndWait(), and tick().
MAKRti::DtString DtRtiAssistantClient::myCommandArgs [protected] |
the command line arguments
Referenced by DtRtiAssistantClient(), getCommandArgs(), and DtRtiAssistantLrcClient::sendClientInfo().
The component type. (LRC, rtiexec, etc.)
Reimplemented in DtRtiAssistantShmExecClient.
Referenced by sendClose(), and sendConnectMsg().
The current connection status.
Referenced by makeSingleConnectionAttempt().
MAKRti::DtTime DtRtiAssistantClient::myConnTestInterval [protected] |
Interval at which connection should be tested.
Referenced by tick().
bool DtRtiAssistantClient::myCreateIfConnectFails [protected] |
Indicates whether an Assistant should be created if a connection cannot be established.
Referenced by connectToAssistant(), DtRtiAssistantToAssistantClient::DtRtiAssistantToAssistantClient(), and sendConnectMsg().
Default message factory.
std::list<DtAssistantDisconnectCbInfo*> DtRtiAssistantClient::myDisconnectCallbacks [protected] |
Lists of pointers to socket disconnect callbacks.
Referenced by addDisconnectCallback(), processDisconnect(), and removeDisconnectCallback().
bool DtRtiAssistantClient::myInitializingConnection [protected] |
Is connection being initialized.
Referenced by initialize().
The message factory.
Referenced by msgFactory(), and setMsgFactory().
DtAssistantMsgCbMgr DtRtiAssistantClient::myMsgCbMgr [protected] |
Message callback manager.
Referenced by addMsgCallback(), addWildcardMsgCallback(), readAndProcess(), removeMsgCallback(), and removeWildcardMsgCallback().
int DtRtiAssistantClient::myNumFailedAssistantConnects [protected] |
How many assistant restarts have we attempted.
Referenced by connectToAssistant(), and isDisabled().
int DtRtiAssistantClient::myNumSuccessfulAssistantConnects [protected] |
How many assistant reconnects occurred.
Referenced by initialize(), and sendMsgAndWait().
int DtRtiAssistantClient::myPID [protected] |
the Process ID ( PID )
Referenced by DtRtiAssistantClient(), getPID(), and DtRtiAssistantLrcClient::sendClientInfo().
MAKRti::DtString DtRtiAssistantClient::myProcessName [protected] |
the Process Name
Referenced by DtRtiAssistantClient(), getProcessName(), and DtRtiAssistantLrcClient::sendClientInfo().
std::auto_ptr<DtAssistantMsg> DtRtiAssistantClient::myRespMsg [protected] |
The last response message to be received.
Referenced by processRespMsg(), and sendMsgAndWait().
bool DtRtiAssistantClient::myShouldShutdown [protected] |
should be set when assistant exit msg has been received.
Referenced by initialize(), sendMsgAndWait(), and shutDownConnection().
DtTcpMsgSocket* DtRtiAssistantClient::mySocket [protected] |
The socket to the RTI Assistant.
Referenced by isConnected(), makeSingleConnectionAttempt(), netRead(), readAndProcess(), sendConnectMsg(), DtRtiAssistantExecClient::sendLogMsg(), sendMsg(), sendMsgAndWait(), testConnectionStatus(), tick(), and ~DtRtiAssistantClient().
MAKRti::DtMutex* DtRtiAssistantClient::mySocketMutex [protected] |
locks access to the socket connection.
Referenced by DtRtiAssistantClient(), makeSingleConnectionAttempt(), netRead(), sendConnectMsg(), sendMsg(), sendMsgAndWait(), testConnectionStatus(), tick(), and ~DtRtiAssistantClient().
MAKRti::DtU32 DtRtiAssistantClient::mySockOpts [protected] |
The socket options to be used when connecting to the Assistant.
Referenced by DtRtiAssistantToAssistantClient::DtRtiAssistantToAssistantClient(), and makeSingleConnectionAttempt().
MAKRti::DtTime DtRtiAssistantClient::myTimeToTestConnection [protected] |
Next time to test connection.
Referenced by tick().
const MAKRti::DtInetAddr DtRtiAssistantClient::theFirstHostInetAddr = DtDefaultInterfaceAddr() [static, protected] |
The first InetAddr when the federate was launched.
const int DtRtiAssistantClient::theMaxNumberOfAssistantConnectAttempts = 10 [static, protected] |
either starting up or reconnecting, how many assistant restarts do we tolerate before giving up.
Referenced by connectToAssistant(), and isDisabled().