![]() |
MAK RTIspy API Documentation for HLA Evolved
|
Collaboration diagram for DtRtiExec:Public Member Functions | |
| virtual | ~DtRtiExec () |
| Destructor. | |
| virtual void | shutdownForwarderIfCreated () |
| virtual void | checkVersion (const DtString &version) const |
| Called by the exec application to make sure that the RTI Version matches. | |
| virtual void | processCreate (const DtCreateMsg &msg) |
| Called when a createFedEx message is received. | |
| virtual void | processDestroy (const DtDestroyMsg &msg) |
| Called when a destroyFedEx message is received. | |
| virtual void | processListFederations (const DtListFederationsMsg &msg) |
| Called when a list federations message is received. | |
| virtual void | processJoin (const DtJoinMsg &msg) |
| Called when a Join message is received. | |
| virtual void | processDisconnect (const DtDisconnectMsg &msg) |
| Called when a disconnect message is received Actually used to capture broken connection. | |
| virtual void | processQueueFull (const DtQueueFullMsg &msg) |
| Called when a queue full message is received. | |
| virtual void | processReconnect (const DtReconnectMsg &msg) |
| Called when a reconnect message is received Actually used to recover from a broken connection. | |
| virtual DtFedExec * | createFedEx (DtConnectionMgr *connMgr, const std::vector< unsigned int > &crcs, const char *fedExName, std::string const &timeImplName, MAKRti::DtFomType fedType, const std::vector< DtString > &fedFileName, const DtString &momModuleName, int fedExHandle, DtRIDParameters *params, unsigned int momModuleCrc) |
| Returns a new fed ex instance, Override this function to replace the default federation execution object. | |
| DtConnectionMgr * | connectMgr () |
| Returns the connection manager Not virtual because referenced in both ctors and dtors. | |
| virtual bool | exists (const DtString &fedExName) |
| Returns true if the name fedex exists, false otherwise. | |
| virtual void | destroyFederationByName (const DtString &fullFedexName, bool sendDestroyResponse=true, bool forceDestroy=false) |
| Attempt to destroy a federation. | |
| int | processQuit () |
| User request to quit is processed. | |
| virtual void | listFederates () |
| Respond to a request to list federates through interactive input. | |
| virtual void | parseDeleteCommand (const DtString &command, unsigned int &handle, DtString &federationName) const |
| Respond to a request to delete a federate through interactive input. | |
| virtual int | deleteFederate (unsigned int handle, const DtString &federationName) |
| virtual void | processUpdateNotifyLevel (DtNotifyLevelType level) |
| Updates the rtiexec notify level. | |
| virtual void | exit () |
| Causes the rtiexec to exit. | |
| virtual void | enableLogging () |
| Enables logging. | |
| virtual void | enableWebSpy (const DtInetAddr &webSpyIpAddr, int webSpyPort) |
| Sets the web spy connection status as enabled and connected. | |
| DtFedExec * | fedExec (const DtString &fedExName) |
| Search for a fed executive by name. | |
| const DtFedExec * | fedExec (const DtString &fedExName) const |
| const std::map< DtString, DtFedExec * > & | fedExecs () const |
| Returns a reference to the entire map of federations. | |
| const DtRIDParameters & | params () const |
| Returns a handle to the current RID Params. | |
| virtual void | run () |
| main loop | |
| virtual bool | tick (bool noCallbacks=false) |
| Work performed here for each cycle in main loop. | |
| virtual void | wait (DtTime intervalInSeconds) |
| Wait for input or until the the given interval expires. | |
| virtual void | addFedExCreatedCallback (DtFedExCbFn fn, void *usr) |
| Register a callback to be triggered whenever a new federation execution is created. | |
| virtual void | removeFedExCreatedCallback (DtFedExCbFn fn, void *usr) |
| virtual void | addFedExDestroyedCallback (DtFedExCbFn fn, void *usr) |
| Register a callback to be triggered whenever an existing federation execution is destroyed. | |
| virtual void | removeFedExDestroyedCallback (DtFedExCbFn fn, void *usr) |
| virtual void | addLogFileNameUpdatedCallback (DtLogFileNameCbFn fn, void *usr) |
| Register a callback to be triggered whenever the log file name for the rtiexec is updated. | |
| virtual void | removeLogFileNameUpdatedCallback (DtLogFileNameCbFn fn, void *usr) |
| virtual void | addWebServerUpdatedCallback (DtWebServerCbFn fn, void *usr) |
| Register a callback to be triggered whenever the web server for the rtiexec is updated. | |
| virtual void | removeWebServerUpdatedCallback (DtWebServerCbFn fn, void *usr) |
| virtual void | addTickCallback (DtTickCbFn fn, void *usr, DtTime interval) |
| Register a callback to be called during tick, but only at the given interval. | |
| virtual void | removeTickCallback (DtTickCbFn fn, void *usr) |
| virtual void | addTickCallback (DtTickWithExecCbFn fn, void *usr, DtTime interval) |
| Register a callback to be called during tick, but only at the given interval. | |
| virtual void | removeTickCallback (DtTickWithExecCbFn fn, void *usr) |
| virtual void | sendCreateResponseMsg (const unsigned long destinationID, DtCreateResponseFlag flag, MAKRti::DtString const &errorString) |
| Send RTI messages. | |
| virtual void | sendDestroyResponseMsg (const char *fedExName, DtDestroyResponseFlag flag) |
| virtual void | sendReportFederationsMsg (unsigned long destId, const std::vector< DtString > &federationNames, const std::vector< DtString > &timeImplNames) |
| virtual void | sendJoinResponseMsg (unsigned long destinationIDValue, unsigned short requestID, unsigned int crc, DtFederateHandle handle, const char *fedName, int fedExHandle, const char *fedExName, const DtString &momModule, const std::vector< DtString > &fedFileName, unsigned long flags, bool allowNetworkTesting, MAKRti::DtString const &errorString, DtJoinResponseMsg::errorCodes errorValue=DtJoinResponseMsg::DT_NO_ERROR) |
| virtual void | ridRequestCb (const DtRidTestRequestMsg &msg) |
| The RID request callback is processed by the RTI in response to a ridTestRequest. | |
Static Public Member Functions | |
| static DtRtiExec * | create (DtRIDParameters *p, DtBoost::shared_ptr< DtFilePrinter > logPrinter, bool autoExit=false, const DtRtiConnectionInfoDataPair &connInfo=DtRtiConnectionInfoDataPair()) |
| Creates an instance of a DtRtiExec;. | |
| static void | setCreatorFunction (DtRtiExecCreator fn) |
| Call this function to set an alternate creator function With this function, users can replace this DtRtiExec with their own derived class. | |
| static void | processRtiExecHandshakeMsg (const DtRtiExecHandshakeMsg &msg, void *usr) |
| Handshake message callback. | |
| static void | processCreate (const DtCreateMsg &msg, void *usr) |
| Callback on the createFedEx message. | |
| static void | processDestroy (const DtDestroyMsg &msg, void *usr) |
| Callback on the destroyFedEx message. | |
| static void | processListFederations (const DtListFederationsMsg &msg, void *usr) |
| Callback on the list federations message. | |
| static void | processJoin (const DtJoinMsg &msg, void *usr) |
| Callback on the Join message. | |
| static void | processDisconnect (const DtDisconnectMsg &msg, void *usr) |
| Callback on the Disconnect message. | |
| static void | processQueueFull (const DtQueueFullMsg &msg, void *usr) |
| Callback on the Queue Full message. | |
| static void | processReconnect (const DtReconnectMsg &msg, void *usr) |
| Callback on the Reconnect message. | |
| static void | ridRequestCb (const DtRidTestRequestMsg &msg, void *usr) |
| RID File Received callback. | |
| static bool | shutdownSignalCaught () |
| static void | caughtShutdownSignal () |
Protected Types | |
| enum | DtStartRtiForwarderResult { ForwarderSuccessfullyStarted, RetryStartingForwarder, ForwarderStartupFailed } |
| typedef std::map< unsigned long, DtTime > | DtConnIdToTimeMap |
Protected Member Functions | |
| DtRtiExec (DtRIDParameters *p, DtBoost::shared_ptr< DtFilePrinter > logPrinter, bool autoExit, const DtRtiConnectionInfoDataPair &connInfo) | |
| Constructor. | |
| void | cleanupConstructorException () |
| Clean up before constructor throws an exception Not virtual since it is called by constructor. | |
| virtual void | rtiExecToForwarderHandshake () |
| Inform RTI Forwarder that Exec is connected, and verify that this is the ONLY Exec connected. | |
| virtual void | sendRtiExecHandshakeMsg (DtHandle destId, DtRtiExecHandshakeMsg::DtHandshakeStatus status) |
| Send RTI Forwarder connection response msg. | |
| virtual void | processRtiExecHandshakeMsg (const DtRtiExecHandshakeMsg &msg) |
| Process the RTI Forwarder's Handshake response. | |
| virtual void | performMulticastDiscovery (bool reliableTransportDisabled) |
| Attempt to discover either the RTI Forwarder or other rtiexecs. | |
| virtual void | removeDroppedFederateConnections () |
| Force resign a federate. | |
| virtual DtStartRtiForwarderResult | startRtiForwarder (const DtRIDParameters *params) |
| Starts forwarder if the exec is configured to do so. | |
Protected Attributes | |
| DtConnectionMgr * | myConnectionMgr |
| std::map< DtString, DtFedExec * > | myExecByName |
| std::map< DtFederationHandle, DtFedExec * > | myExecByHandle |
| DtString | lineOfInput |
| bool | myHandleForDeleteComplete |
| bool | myFedNameForDeleteComplete |
| DtString | myFederationNameForDelete |
| unsigned int | myHandleForDelete |
| bool | myCreatedRtiForwarder |
| bool | myPendingDelete |
| bool | myPendingQuit |
| int | myFreeFedExHandle |
| DtList | myCreateCallbacks |
| DtList | myDestroyCallbacks |
| std::list< DtTickCallbackInfo > | myTickCallbacks |
| List of tick callbacks. | |
| std::list < DtTickWithExecCallbackInfo > | myTickWithExecCallbacks |
| List of tick callbacks with DtRtiExec reference. | |
| std::list < DtLogFileNameCallbackInfo > | myLogFileNameCallbacks |
| List of log file name update callbacks. | |
| std::list < DtWebServerCallbackInfo > | myWebServerCallbacks |
| List of log file name update callbacks. | |
| DtClock | myClock |
| DtRtiExecHandshakeMsg::DtHandshakeStatus | myHandshakeStatus |
| DtTime | myNextHeartbeat |
| DtRtiMsgForwarderSP | myRtiForwarder |
| DtForwarderFaultManager * | myFaultManager |
| DtMulitcastDiscoveryMgr * | myMcastDiscoveryMgr |
| DtConnIdToTimeMap | myDisconnectedFederates |
| Map of dropped Federate to timestamp of drop. | |
| DtRIDParameters * | myParams |
| bool | myAutoExit |
| bool | myExitCommanded |
| Flag indicating that an exit command was received. | |
| DtBoost::shared_ptr < DtFilePrinter > | myLogPrinter |
| Printer which prints output to a log file. | |
| DtRtiConnectionInfoDataPair | myConnInfo |
Static Protected Attributes | |
| static bool | theShutdownSignalCaught = false |
| static DtRtiExecCreator | theCreator = NULL |
typedef std::map< unsigned long, DtTime > DtRtiExec::DtConnIdToTimeMap [protected] |
enum DtRtiExec::DtStartRtiForwarderResult [protected] |
| DtRtiExec::DtRtiExec | ( | DtRIDParameters * | p, |
| DtBoost::shared_ptr< DtFilePrinter > | logPrinter, | ||
| bool | autoExit, | ||
| const DtRtiConnectionInfoDataPair & | connInfo | ||
| ) | [protected] |
Constructor.
References DtDisconnectMsg::addCallback(), DtQueueFullMsg::addCallback(), DtListFederationsMsg::addCallback(), DtRidTestRequestMsg::addCallback(), DtDestroyMsg::addCallback(), DtReconnectMsg::addCallback(), DtRtiExecHandshakeMsg::addCallback(), DtCreateMsg::addCallback(), DtJoinMsg::addCallback(), cleanupConstructorException(), DtRIDParameters::clearAncillaryForwarderGroupAddrs(), connectMgr(), DtSmConnectionMgr::create(), create(), DtRIDParameters::DtFomTransportTypeUseBestEffort, DtIsIpOfLocalInterface(), DtRIDParameters::DtSynchronousMode, DtTHROW_PROPAGATE, DtRIDParameters::enableFederateHeartbeat, ForwarderSuccessfullyStarted, DtRIDParameters::mcastDiscoveryEnabled, myClock, myConnectionMgr, myFaultManager, myNextHeartbeat, myParams, performMulticastDiscovery(), DtAssistantPopupHelper::popupsDisabled(), processCreate(), processDestroy(), processDisconnect(), processJoin(), processListFederations(), processQueueFull(), processReconnect(), processRtiExecHandshakeMsg(), RetryStartingForwarder, ridRequestCb(), rtiExecToForwarderHandshake(), DtConnectionMgr::setInternalCreatorFunction(), DtAssistantPopupHelper::setPopupsDisabled(), DtRIDParameters::setProcessingModel(), startRtiForwarder(), DtRIDParameters::tcpForwarderAddr(), DtRIDParameters::useRtiExec, and DtRIDParameters::useSharedMem.
Referenced by create().
| DtRtiExec::~DtRtiExec | ( | ) | [virtual] |
Destructor.
References connectMgr(), myConnectionMgr, myExecByHandle, myExecByName, myFaultManager, myLogPrinter, myMcastDiscoveryMgr, processCreate(), processDestroy(), processDisconnect(), processJoin(), processListFederations(), processReconnect(), DtDisconnectMsg::removeCallback(), DtListFederationsMsg::removeCallback(), DtRidTestRequestMsg::removeCallback(), DtDestroyMsg::removeCallback(), DtReconnectMsg::removeCallback(), DtCreateMsg::removeCallback(), DtJoinMsg::removeCallback(), and ridRequestCb().
| void DtRtiExec::addFedExCreatedCallback | ( | DtFedExCbFn | fn, |
| void * | usr | ||
| ) | [virtual] |
Register a callback to be triggered whenever a new federation execution is created.
References myCreateCallbacks.
| void DtRtiExec::addFedExDestroyedCallback | ( | DtFedExCbFn | fn, |
| void * | usr | ||
| ) | [virtual] |
Register a callback to be triggered whenever an existing federation execution is destroyed.
References myDestroyCallbacks.
| void DtRtiExec::addLogFileNameUpdatedCallback | ( | DtLogFileNameCbFn | fn, |
| void * | usr | ||
| ) | [virtual] |
Register a callback to be triggered whenever the log file name for the rtiexec is updated.
References myLogFileNameCallbacks.
| void DtRtiExec::addTickCallback | ( | DtTickCbFn | fn, |
| void * | usr, | ||
| DtTime | interval | ||
| ) | [virtual] |
Register a callback to be called during tick, but only at the given interval.
References myTickCallbacks.
| void DtRtiExec::addTickCallback | ( | DtTickWithExecCbFn | fn, |
| void * | usr, | ||
| DtTime | interval | ||
| ) | [virtual] |
Register a callback to be called during tick, but only at the given interval.
For callbacks which will be passed a reference to the calling DtRtiExec.
References myTickWithExecCallbacks.
| void DtRtiExec::addWebServerUpdatedCallback | ( | DtWebServerCbFn | fn, |
| void * | usr | ||
| ) | [virtual] |
Register a callback to be triggered whenever the web server for the rtiexec is updated.
References myWebServerCallbacks.
| void DtRtiExec::caughtShutdownSignal | ( | ) | [static] |
Referenced by unixShutdownSignalHandler().
| void DtRtiExec::checkVersion | ( | const DtString & | version | ) | const [virtual] |
| void DtRtiExec::cleanupConstructorException | ( | ) | [protected] |
Clean up before constructor throws an exception Not virtual since it is called by constructor.
References DtConnectionMgr::flush(), myConnectionMgr, myCreatedRtiForwarder, myFaultManager, and DtConnectionMgr::sendShutdownForwarderMsg().
Referenced by DtRtiExec().
| DtConnectionMgr * DtRtiExec::connectMgr | ( | ) | [inline] |
Returns the connection manager Not virtual because referenced in both ctors and dtors.
References myConnectionMgr.
Referenced by createFedEx(), DtRtiExec(), processCreate(), processRtiExecHandshakeMsg(), ridRequestCb(), rtiExecToForwarderHandshake(), sendCreateResponseMsg(), sendDestroyResponseMsg(), sendJoinResponseMsg(), sendReportFederationsMsg(), sendRtiExecHandshakeMsg(), tick(), wait(), and ~DtRtiExec().
| DtRtiExec * DtRtiExec::create | ( | DtRIDParameters * | p, |
| DtBoost::shared_ptr< DtFilePrinter > | logPrinter, | ||
| bool | autoExit = false, |
||
| const DtRtiConnectionInfoDataPair & | connInfo = DtRtiConnectionInfoDataPair() |
||
| ) | [static] |
Creates an instance of a DtRtiExec;.
References DtRtiExec(), params(), and theCreator.
Referenced by createFedEx(), DtRtiExec(), and setCreatorFunction().
| DtFedExec * DtRtiExec::createFedEx | ( | DtConnectionMgr * | connMgr, |
| const std::vector< unsigned int > & | crcs, | ||
| const char * | fedExName, | ||
| std::string const & | timeImplName, | ||
| MAKRti::DtFomType | fedType, | ||
| const std::vector< DtString > & | fedFileName, | ||
| const DtString & | momModuleName, | ||
| int | fedExHandle, | ||
| DtRIDParameters * | params, | ||
| unsigned int | momModuleCrc | ||
| ) | [virtual] |
Returns a new fed ex instance, Override this function to replace the default federation execution object.
References connectMgr(), and create().
Referenced by processCreate().
| int DtRtiExec::deleteFederate | ( | unsigned int | handle, |
| const DtString & | federationName | ||
| ) | [virtual] |
| void DtRtiExec::destroyFederationByName | ( | const DtString & | fullFedexName, |
| bool | sendDestroyResponse = true, |
||
| bool | forceDestroy = false |
||
| ) | [virtual] |
Attempt to destroy a federation.
By default, if destruction fails, a destroy response is sent. If this is being called in response to a command at the rtiexec GUI, then no response needs to be sent. If forceDestroy is set, federation is destroyed regardless of whether it has joined federates.
References DtDRExecDestroyed, DtDRExecDoesNotExist, DtDRFederatesJoined, exists(), DtFedExec::fedExHandle(), myConnectionMgr, DtFedExCallbackInfo::myData, myDestroyCallbacks, myExecByHandle, myExecByName, DtFedExCallbackInfo::myFn, DtFedExec::numFederates(), DtConnectionMgr::removeLogicalTimeFactory(), and sendDestroyResponseMsg().
Referenced by processDestroy(), removeDroppedFederateConnections(), and tick().
| void DtRtiExec::enableLogging | ( | ) | [virtual] |
Enables logging.
References myLogFileNameCallbacks, and myLogPrinter.
| void DtRtiExec::enableWebSpy | ( | const DtInetAddr & | webSpyIpAddr, |
| int | webSpyPort | ||
| ) | [virtual] |
Sets the web spy connection status as enabled and connected.
References DtDefaultInterfaceAddr(), myWebServerCallbacks, DtRIDParameters::networkInterfaceAddr(), and params().
| bool DtRtiExec::exists | ( | const DtString & | fedExName | ) | [virtual] |
Returns true if the name fedex exists, false otherwise.
References myExecByName.
Referenced by deleteFederate(), destroyFederationByName(), processCreate(), and processJoin().
| void DtRtiExec::exit | ( | ) | [virtual] |
Causes the rtiexec to exit.
References myExitCommanded.
| DtFedExec * DtRtiExec::fedExec | ( | const DtString & | fedExName | ) |
Search for a fed executive by name.
Returns NULL if none are found.
References myExecByName.
Referenced by DtRtiexecObserverForAssistant::processTimeStateEvent().
| const DtFedExec * DtRtiExec::fedExec | ( | const DtString & | fedExName | ) | const |
References myExecByName.
| const std::map< DtString, DtFedExec * > & DtRtiExec::fedExecs | ( | ) | const |
Returns a reference to the entire map of federations.
References myExecByName.
Referenced by DtRtiexecObserverForWebService::processTimeStateEvent().
| void DtRtiExec::listFederates | ( | ) | [virtual] |
Respond to a request to list federates through interactive input.
References myExecByName.
| const DtRIDParameters & DtRtiExec::params | ( | ) | const [inline] |
Returns a handle to the current RID Params.
References myParams.
Referenced by create(), enableWebSpy(), processDisconnect(), processJoin(), rtiExecToForwarderHandshake(), and sendRtiExecHandshakeMsg().
| void DtRtiExec::parseDeleteCommand | ( | const DtString & | command, |
| unsigned int & | handle, | ||
| DtString & | federationName | ||
| ) | const [virtual] |
Respond to a request to delete a federate through interactive input.
| void DtRtiExec::performMulticastDiscovery | ( | bool | reliableTransportDisabled | ) | [protected, virtual] |
Attempt to discover either the RTI Forwarder or other rtiexecs.
References DtMulitcastDiscoveryMgr::discover(), DtMulticastDiscoveryMsg::DtDiscoverRtiExec, DtMulticastDiscoveryMsg::DtDiscoverTcpForwarder, DtMulitcastDiscoveryMgr::init(), DtRIDParameters::mcastDiscoveryEnabled, myMcastDiscoveryMgr, myParams, DtAssistantPopupHelper::popupAssistantMessage(), and DtRIDParameters::setTcpForwarderAddr().
Referenced by DtRtiExec().
| void DtRtiExec::processCreate | ( | const DtCreateMsg & | msg | ) | [virtual] |
Called when a createFedEx message is received.
References DtConnectionMgr::addLogicalTimeFactory(), connectMgr(), DtFedExec::createDistributor(), createFedEx(), DtCRExecAlreadyExists, DtCRExecCouldNotCreateTimeFactory, DtCRExecCouldNotOpenFed, DtCRExecCreated, exists(), DtFedExec::fedExHandle(), DtCreateMsg::fedFileType(), DtFedExec::fedTimeFactory(), DtCreateMsg::fullFedExName(), DtCreateMsg::getCRCsOfFedFiles(), DtCreateMsg::getFomModuleNames(), DtCreateMsg::momModuleCrc(), DtCreateMsg::MOMmoduleName(), myConnectionMgr, myCreateCallbacks, DtFedExCallbackInfo::myData, myExecByHandle, myExecByName, DtFedExCallbackInfo::myFn, myFreeFedExHandle, myParams, NULL, sendCreateResponseMsg(), DtFedExec::setFullyCreated(), DtCreateMsg::sourceID(), and DtCreateMsg::timeImplName().
Referenced by DtRtiExec(), and ~DtRtiExec().
| void DtRtiExec::processCreate | ( | const DtCreateMsg & | msg, |
| void * | usr | ||
| ) | [static] |
Callback on the createFedEx message.
| void DtRtiExec::processDestroy | ( | const DtDestroyMsg & | msg | ) | [virtual] |
Called when a destroyFedEx message is received.
References destroyFederationByName(), and DtDestroyMsg::fullFedExName().
Referenced by DtRtiExec(), and ~DtRtiExec().
| void DtRtiExec::processDestroy | ( | const DtDestroyMsg & | msg, |
| void * | usr | ||
| ) | [static] |
Callback on the destroyFedEx message.
| void DtRtiExec::processDisconnect | ( | const DtDisconnectMsg & | msg | ) | [virtual] |
Called when a disconnect message is received Actually used to capture broken connection.
References DtConnectMsg::connectionHandle(), DtFedExec::disconnectFederate(), DtFedExec::federateHandleOfConnection(), DtRIDParameters::federateReconnectPause, DtFedExec::fedExName(), DtFederate::getDescription(), DtFedExec::getFederate(), myClock, myDisconnectedFederates, myExecByName, myParams, params(), and DtRIDParameters::responseInterval.
Referenced by DtRtiExec(), and ~DtRtiExec().
| void DtRtiExec::processDisconnect | ( | const DtDisconnectMsg & | msg, |
| void * | usr | ||
| ) | [static] |
Callback on the Disconnect message.
| void DtRtiExec::processJoin | ( | const DtJoinMsg & | msg | ) | [virtual] |
Called when a Join message is received.
References DtJoinResponseMsg::DT_FEDEX_DOES_NOT_EXIST, exists(), DtJoinMsg::fullFedExName(), params(), DtJoinMsg::requestID(), sendJoinResponseMsg(), and DtJoinMsg::sourceID().
Referenced by DtRtiExec(), and ~DtRtiExec().
| void DtRtiExec::processJoin | ( | const DtJoinMsg & | msg, |
| void * | usr | ||
| ) | [static] |
Callback on the Join message.
| void DtRtiExec::processListFederations | ( | const DtListFederationsMsg & | msg | ) | [virtual] |
Called when a list federations message is received.
References DtListFederationsMsg::destinationID(), myExecByName, and sendReportFederationsMsg().
Referenced by DtRtiExec(), and ~DtRtiExec().
| void DtRtiExec::processListFederations | ( | const DtListFederationsMsg & | msg, |
| void * | usr | ||
| ) | [static] |
Callback on the list federations message.
| void DtRtiExec::processQueueFull | ( | const DtQueueFullMsg & | msg | ) | [virtual] |
Called when a queue full message is received.
References DtForwarderQueueFullResign, DtRtiMsg::federateHandle(), DtFedExec::fedExHandle(), DtRtiMsg::fedExHandle(), myExecByName, and DtFedExec::resignFederate().
Referenced by DtRtiExec().
| void DtRtiExec::processQueueFull | ( | const DtQueueFullMsg & | msg, |
| void * | usr | ||
| ) | [static] |
Callback on the Queue Full message.
| int DtRtiExec::processQuit | ( | ) |
User request to quit is processed.
If there are no federations, quit is granted immediately. Otherwise, a pending quit status is set to true and the user is prompted to confirm the quit request. Return -1 if quit should be granted immediately.
References myExecByName, and myPendingQuit.
| void DtRtiExec::processReconnect | ( | const DtReconnectMsg & | msg | ) | [virtual] |
Called when a reconnect message is received Actually used to recover from a broken connection.
References DtReconnectMsg::DtReconnectAccepted, DtReconnectMsg::DtReconnectRequest, DtReconnectMsg::federateHandle(), DtRtiMsg::fedExHandle(), DtFedExec::getFederate(), myDisconnectedFederates, myExecByHandle, myExecByName, DtReconnectMsg::newConnectionHandle(), DtReconnectMsg::oldConnectionHandle(), DtFedExec::reconnectFederateFailed(), DtFedExec::reconnectFederateSucceeded(), DtReconnectMsg::reconnectStatus(), and DtFedExec::restoreFederateConnection().
Referenced by DtRtiExec(), and ~DtRtiExec().
| void DtRtiExec::processReconnect | ( | const DtReconnectMsg & | msg, |
| void * | usr | ||
| ) | [static] |
Callback on the Reconnect message.
| void DtRtiExec::processRtiExecHandshakeMsg | ( | const DtRtiExecHandshakeMsg & | msg, |
| void * | usr | ||
| ) | [static] |
Handshake message callback.
Referenced by DtRtiExec().
| void DtRtiExec::processRtiExecHandshakeMsg | ( | const DtRtiExecHandshakeMsg & | msg | ) | [protected, virtual] |
Process the RTI Forwarder's Handshake response.
References DtConnectionMgr::connectionId(), connectMgr(), DtRtiExecHandshakeMsg::destConnectionHandle(), DtRtiExecHandshakeMsg::handshakeStatus(), DtRtiExecHandshakeMsg::HsRequest, DtRtiExecHandshakeMsg::HsResponseDenied, DtRtiExecHandshakeMsg::HsResponseGranted, myHandshakeStatus, sendRtiExecHandshakeMsg(), and DtRtiExecHandshakeMsg::srcConnectionHandle().
| void DtRtiExec::processUpdateNotifyLevel | ( | DtNotifyLevelType | level | ) | [virtual] |
Updates the rtiexec notify level.
| void DtRtiExec::removeDroppedFederateConnections | ( | ) | [protected, virtual] |
Force resign a federate.
References DtFedExec::creatorID(), destroyFederationByName(), DtFedExec::fedExName(), DtFedExec::fullyCreated(), myClock, myDisconnectedFederates, myExecByName, and DtFedExec::removeFederateConnection().
Referenced by tick().
| void DtRtiExec::removeFedExCreatedCallback | ( | DtFedExCbFn | fn, |
| void * | usr | ||
| ) | [virtual] |
References myCreateCallbacks, DtFedExCallbackInfo::myData, DtFedExCallbackInfo::myFn, and NULL.
| void DtRtiExec::removeFedExDestroyedCallback | ( | DtFedExCbFn | fn, |
| void * | usr | ||
| ) | [virtual] |
References DtFedExCallbackInfo::myData, myDestroyCallbacks, DtFedExCallbackInfo::myFn, and NULL.
| void DtRtiExec::removeLogFileNameUpdatedCallback | ( | DtLogFileNameCbFn | fn, |
| void * | usr | ||
| ) | [virtual] |
References myLogFileNameCallbacks.
| void DtRtiExec::removeTickCallback | ( | DtTickCbFn | fn, |
| void * | usr | ||
| ) | [virtual] |
References myTickCallbacks.
| void DtRtiExec::removeTickCallback | ( | DtTickWithExecCbFn | fn, |
| void * | usr | ||
| ) | [virtual] |
References myTickWithExecCallbacks.
| void DtRtiExec::removeWebServerUpdatedCallback | ( | DtWebServerCbFn | fn, |
| void * | usr | ||
| ) | [virtual] |
References myWebServerCallbacks.
| void DtRtiExec::ridRequestCb | ( | const DtRidTestRequestMsg & | msg | ) | [virtual] |
The RID request callback is processed by the RTI in response to a ridTestRequest.
It fills up a ridResponse with the number of RID parameters that it wants consistent and sends the response back to the federate that requested it.
References connectMgr(), DtMessageFactory< T_Message, T_MessageKind, T_NetworkHeader >::create(), DtRidTestRequestMsg::destinationID(), DtTransferRidParamsMsgKind, DtRtiMsg::federateHandle(), DtRtiMsg::fedExHandle(), DtConnectionMgr::msgFactory(), myParams, DtRIDParameters::ridsToConsistencyCheck(), DtConnectionMgr::sendAndDelete(), DtTransferRidParamsMsg::setDestinationID(), DtRtiMsg::setFederateHandle(), DtRtiMsg::setFedEx(), and DtTransferRidParamsMsg::writeRidTestBlock().
Referenced by DtRtiExec(), ridRequestCb(), and ~DtRtiExec().
| void DtRtiExec::ridRequestCb | ( | const DtRidTestRequestMsg & | msg, |
| void * | usr | ||
| ) | [static] |
RID File Received callback.
References ridRequestCb().
| void DtRtiExec::rtiExecToForwarderHandshake | ( | ) | [protected, virtual] |
Inform RTI Forwarder that Exec is connected, and verify that this is the ONLY Exec connected.
References DtConnectionMgr::connectionId(), connectMgr(), DtRIDParameters::getFullPathToRidFile(), DtRtiExecHandshakeMsg::HsRequest, DtRtiExecHandshakeMsg::HsResponseDenied, DtRtiExecHandshakeMsg::HsResponseGranted, myClock, myHandshakeStatus, params(), DtRIDParameters::responseInterval, sendRtiExecHandshakeMsg(), DtRIDParameters::tcpForwarderAddr(), DtRIDParameters::tcpPort, DtConnectionMgr::tick(), and DtConnectionMgr::yield().
Referenced by DtRtiExec().
| void DtRtiExec::run | ( | ) | [virtual] |
main loop
References myAutoExit, myExecByHandle, myExitCommanded, shutdownSignalCaught(), tick(), unixShutdownSignalHandler(), and wait().
| void DtRtiExec::sendCreateResponseMsg | ( | const unsigned long | destinationID, |
| DtCreateResponseFlag | flag, | ||
| MAKRti::DtString const & | errorString | ||
| ) | [virtual] |
Send RTI messages.
References connectMgr(), DtConnectionMgr::create(), DtCreateResponseMsgKind, DtConnectionMgr::sendAndDelete(), and DtCreateResponseMsg::set().
Referenced by processCreate().
| void DtRtiExec::sendDestroyResponseMsg | ( | const char * | fedExName, |
| DtDestroyResponseFlag | flag | ||
| ) | [virtual] |
References connectMgr(), DtConnectionMgr::create(), DtDestroyResponseMsgKind, DtConnectionMgr::sendAndDelete(), and DtDestroyResponseMsg::set().
Referenced by destroyFederationByName().
| void DtRtiExec::sendJoinResponseMsg | ( | unsigned long | destinationIDValue, |
| unsigned short | requestID, | ||
| unsigned int | crc, | ||
| DtFederateHandle | handle, | ||
| const char * | fedName, | ||
| int | fedExHandle, | ||
| const char * | fedExName, | ||
| const DtString & | momModule, | ||
| const std::vector< DtString > & | fedFileName, | ||
| unsigned long | flags, | ||
| bool | allowNetworkTesting, | ||
| MAKRti::DtString const & | errorString, | ||
| DtJoinResponseMsg::errorCodes | errorValue = DtJoinResponseMsg::DT_NO_ERROR |
||
| ) | [virtual] |
References connectMgr(), DtConnectionMgr::create(), DtJoinResponseMsgKind, DtConnectionMgr::sendAndDelete(), and DtJoinResponseMsg::set().
Referenced by processJoin().
| void DtRtiExec::sendReportFederationsMsg | ( | unsigned long | destId, |
| const std::vector< DtString > & | federationNames, | ||
| const std::vector< DtString > & | timeImplNames | ||
| ) | [virtual] |
References connectMgr(), DtConnectionMgr::create(), DtReportFederationsMsgKind, DtConnectionMgr::sendAndDelete(), and DtReportFederationsMsg::set().
Referenced by processListFederations().
| void DtRtiExec::sendRtiExecHandshakeMsg | ( | DtHandle | destId, |
| DtRtiExecHandshakeMsg::DtHandshakeStatus | status | ||
| ) | [protected, virtual] |
Send RTI Forwarder connection response msg.
References connectMgr(), DtConnectionMgr::create(), DtGetLocalHostName(), DtRtiExecHandshakeMsgKind, params(), DtConnectionMgr::sendAndDelete(), and DtRtiExecHandshakeMsg::set().
Referenced by processRtiExecHandshakeMsg(), and rtiExecToForwarderHandshake().
| void DtRtiExec::setCreatorFunction | ( | DtRtiExecCreator | fn | ) | [static] |
Call this function to set an alternate creator function With this function, users can replace this DtRtiExec with their own derived class.
References create(), DtBindCreator(), and theCreator.
| void DtRtiExec::shutdownForwarderIfCreated | ( | ) | [virtual] |
| bool DtRtiExec::shutdownSignalCaught | ( | ) | [static] |
References theShutdownSignalCaught.
Referenced by run().
| DtRtiExec::DtStartRtiForwarderResult DtRtiExec::startRtiForwarder | ( | const DtRIDParameters * | params | ) | [protected, virtual] |
Starts forwarder if the exec is configured to do so.
return zero on error.
References DtRIDParameters::destAddrString, destAddrString, DtCreateProcess__rti__(), DtProcFgInteractive__rti__, DtRtiLibPath(), ForwarderStartupFailed, ForwarderSuccessfullyStarted, myClock, myConnInfo, myCreatedRtiForwarder, DtRIDParameters::networkInterfaceAddr(), NULL, DtRIDParameters::responseInterval, RetryStartingForwarder, DtRIDParameters::tcpPort, and DtRIDParameters::useRoutesFile().
Referenced by DtRtiExec().
| bool DtRtiExec::tick | ( | bool | noCallbacks = false | ) | [virtual] |
Work performed here for each cycle in main loop.
Primarily processing messages and ticking each federation execution. Returns boolean: tick processed a message? If noCallbacks is true, no tick callbacks will be called
References connectMgr(), destroyFederationByName(), DtFedExec::fedExName(), myClock, myDisconnectedFederates, myExecByName, myMcastDiscoveryMgr, myNextHeartbeat, myParams, myTickCallbacks, myTickWithExecCallbacks, removeDroppedFederateConnections(), DtConnectionMgr::send(), DtMulitcastDiscoveryMgr::tick(), DtFedExec::tick(), and DtConnectionMgr::tick().
Referenced by run().
| void DtRtiExec::wait | ( | DtTime | intervalInSeconds | ) | [virtual] |
Wait for input or until the the given interval expires.
References connectMgr(), and DtConnectionMgr::wait().
Referenced by run().
DtString DtRtiExec::lineOfInput [protected] |
bool DtRtiExec::myAutoExit [protected] |
Referenced by run().
DtClock DtRtiExec::myClock [protected] |
DtConnectionMgr* DtRtiExec::myConnectionMgr [protected] |
DtRtiConnectionInfoDataPair DtRtiExec::myConnInfo [protected] |
Referenced by startRtiForwarder().
DtList DtRtiExec::myCreateCallbacks [protected] |
Referenced by addFedExCreatedCallback(), processCreate(), and removeFedExCreatedCallback().
bool DtRtiExec::myCreatedRtiForwarder [protected] |
Referenced by cleanupConstructorException(), shutdownForwarderIfCreated(), and startRtiForwarder().
DtList DtRtiExec::myDestroyCallbacks [protected] |
Referenced by addFedExDestroyedCallback(), destroyFederationByName(), and removeFedExDestroyedCallback().
DtConnIdToTimeMap DtRtiExec::myDisconnectedFederates [protected] |
Map of dropped Federate to timestamp of drop.
Referenced by processDisconnect(), processReconnect(), removeDroppedFederateConnections(), and tick().
std::map<DtFederationHandle, DtFedExec*> DtRtiExec::myExecByHandle [protected] |
Referenced by destroyFederationByName(), processCreate(), processReconnect(), run(), and ~DtRtiExec().
std::map<DtString, DtFedExec*> DtRtiExec::myExecByName [protected] |
bool DtRtiExec::myExitCommanded [protected] |
DtForwarderFaultManager* DtRtiExec::myFaultManager [protected] |
Referenced by cleanupConstructorException(), DtRtiExec(), and ~DtRtiExec().
DtString DtRtiExec::myFederationNameForDelete [protected] |
bool DtRtiExec::myFedNameForDeleteComplete [protected] |
int DtRtiExec::myFreeFedExHandle [protected] |
Referenced by processCreate().
unsigned int DtRtiExec::myHandleForDelete [protected] |
bool DtRtiExec::myHandleForDeleteComplete [protected] |
Referenced by processRtiExecHandshakeMsg(), and rtiExecToForwarderHandshake().
std::list<DtLogFileNameCallbackInfo> DtRtiExec::myLogFileNameCallbacks [protected] |
List of log file name update callbacks.
Referenced by addLogFileNameUpdatedCallback(), enableLogging(), and removeLogFileNameUpdatedCallback().
DtBoost::shared_ptr<DtFilePrinter> DtRtiExec::myLogPrinter [protected] |
Printer which prints output to a log file.
Referenced by enableLogging(), and ~DtRtiExec().
DtMulitcastDiscoveryMgr* DtRtiExec::myMcastDiscoveryMgr [protected] |
Referenced by performMulticastDiscovery(), tick(), and ~DtRtiExec().
DtTime DtRtiExec::myNextHeartbeat [protected] |
Referenced by DtRtiExec(), and tick().
DtRIDParameters* DtRtiExec::myParams [protected] |
Referenced by DtRtiExec(), params(), performMulticastDiscovery(), processCreate(), processDisconnect(), ridRequestCb(), and tick().
bool DtRtiExec::myPendingDelete [protected] |
bool DtRtiExec::myPendingQuit [protected] |
Referenced by processQuit().
DtRtiMsgForwarderSP DtRtiExec::myRtiForwarder [protected] |
std::list<DtTickCallbackInfo> DtRtiExec::myTickCallbacks [protected] |
List of tick callbacks.
Referenced by addTickCallback(), removeTickCallback(), and tick().
std::list<DtTickWithExecCallbackInfo> DtRtiExec::myTickWithExecCallbacks [protected] |
List of tick callbacks with DtRtiExec reference.
Referenced by addTickCallback(), removeTickCallback(), and tick().
std::list<DtWebServerCallbackInfo> DtRtiExec::myWebServerCallbacks [protected] |
List of log file name update callbacks.
Referenced by addWebServerUpdatedCallback(), enableWebSpy(), and removeWebServerUpdatedCallback().
DtRtiExecCreator DtRtiExec::theCreator = NULL [static, protected] |
Referenced by create(), and setCreatorFunction().
bool DtRtiExec::theShutdownSignalCaught = false [static, protected] |
Referenced by shutdownSignalCaught().