![]() |
MAK RTIspy API Documentation for HLA 1.3
|
Observes the rtiexec and is responsible sending information on the rtiexec to the web spy server. More...
Inheritance diagram for DtRtiexecObserverForWebService:
Collaboration diagram for DtRtiexecObserverForWebService:Public Member Functions | |
| DtRtiexecObserverForWebService (const DtRIDParameters *params, DtBoost::shared_ptr< DtRtiexecCmdProc > cmdProc) | |
| virtual | ~DtRtiexecObserverForWebService () |
| virtual void | startObservation () |
| Indicates that observation of the exec has begun. | |
| virtual void | sendMsgToFederation (const DtString &federationName, std::auto_ptr< DtRtiMsg > msg) |
| Send an RTI message to the specified federation. | |
| virtual void | deleteFederate (const DtString &federationName, unsigned long federateHandle) |
| Request the Deletion of a federate. | |
| virtual void | destroyFederation (const DtString &federationName, unsigned long federationHandle) |
| Request the Destruction of a federation (will simply fail if federation non-empty) | |
| virtual void | changeRidParam (const DtString &federationName, unsigned long federateHandle, const DtString &ridParameter, const DtString &ridValue) |
| Request a change to the RID Parameter of the federate. | |
| void | setConnectionId (unsigned long connectionId) |
| Sets the rtiexec connection ID. | |
| const DtRIDParameters & | params () const |
| Get the RID params. | |
Protected Member Functions | |
| virtual void | addCallbacks () |
| Adds all RTI message and tick callbacks. Called when a manager is set. | |
| virtual void | removeCallbacks () |
| Removes all RTI message and tick callbacks. | |
Protected Attributes | |
| const DtRIDParameters * | myParams |
| RID parameters used by this exec. | |
| std::auto_ptr < DtRtiExecWebManager > | myWebManager |
| The manager for the current web spy state. | |
| DtBoost::shared_ptr < DtRtiexecCmdProc > | myCmdProc |
| Processes commands to be performed by the rtiexec. | |
| DtClock | myClock |
| Clock used in message processing. | |
| const DtTime | myMinTimeBetweenUpdates |
| Min. time exec should wait between time state updates. | |
| unsigned long | myConnectionId |
| The rtiexecs connection ID. | |
Rtiexec event processing functions | |
| virtual void | tick () |
| Periodic processing. | |
| virtual void | processFedExCreatedEvent (DtFedExec *exec) |
| Process a new federation execution created event. | |
| virtual void | processFedExDestroyedEvent (DtFedExec *exec) |
| Process a federation execution destroyed event. | |
| virtual void | processFederateJoinedEvent (DtFedExec *exec, DtFederate *federate) |
| Process a federate joined event. | |
| virtual void | processFederateResignedEvent (DtFedExec *exec, DtFederate *federate) |
| Process a federate resigned event. | |
| virtual void | processSyncPtRegisteredEvent (DtFedExec *exec, DtSyncPt *pt) |
| Process a new sync. point registered event. | |
| virtual void | processFederationSynchronizedEvent (DtFedExec *exec, DtSyncPt *pt) |
| Process a federation synchronized to an existing sync. point event. | |
| virtual void | processSyncPtAchievedEvent (DtFedExec *exec, DtFederate *federate, DtSyncPt *pt) |
| Process an existing sync. point achieved event. | |
| virtual void | processTimeStateEvent (const DtRtiExec &exec) |
| Process a federate reconnect failed event. | |
| static void | tick (void *usr) |
| Callback for periodic processing. | |
| static void | processTimeStateEvent (const DtRtiExec &exec, void *usr) |
| Callback for periodic time state processing. | |
RTI message processing callbacks | |
| virtual void | processStateRspMsg (const DtWwwStateRspMsg &msg) |
| Process the web spy state response message. | |
| virtual void | processFederateStateRspMsg (const DtWwwFederateStateRspMsg &msg) |
| Process the web spy state response message. | |
| virtual void | processControlRspMsg (const DtWwwControlRspMsg &msg) |
| Process the web spy state response message. | |
| virtual void | processNetworkMapRespMsg (const DtNetworkMapRspMsg &msg) |
| Process the web spy state response message. | |
| static void | processStateRspMsg (const DtRtiMsg &msg, void *usr) |
| Process the web spy state response message. | |
| static void | processFederateStateRspMsg (const DtRtiMsg &msg, void *usr) |
| Process the web spy federate state response message. | |
| static void | processControlRspMsg (const DtRtiMsg &msg, void *usr) |
| Process the web spy control response message. | |
| static void | processNetworkMapRespMsg (const DtRtiMsg &msg, void *usr) |
| Process the web spy network map response message. | |
Observes the rtiexec and is responsible sending information on the rtiexec to the web spy server.
Also accepts commands from the Assistant and gives them to the rtiexec for processing.
| DtRtiexecObserverForWebService::DtRtiexecObserverForWebService | ( | const DtRIDParameters * | params, |
| DtBoost::shared_ptr< DtRtiexecCmdProc > | cmdProc | ||
| ) |
| void DtRtiexecObserverForWebService::addCallbacks | ( | ) | [protected, virtual] |
Adds all RTI message and tick callbacks. Called when a manager is set.
Implements DtRtiexecObserver.
References DtRtiexecObserver::addRtiMsgCallback(), DtRtiexecObserver::addTickCallback(), DtNetworkMapRspMsgKind, DtWwwControlRspMsgKind, DtWwwFederateStateRspMsgKind, DtWwwStateRspMsgKind, myMinTimeBetweenUpdates, processControlRspMsg(), processFederateStateRspMsg(), processNetworkMapRespMsg(), processStateRspMsg(), processTimeStateEvent(), and tick().
| void DtRtiexecObserverForWebService::changeRidParam | ( | const DtString & | federationName, |
| unsigned long | federateHandle, | ||
| const DtString & | ridParameter, | ||
| const DtString & | ridValue | ||
| ) | [virtual] |
Request a change to the RID Parameter of the federate.
References myCmdProc.
| void DtRtiexecObserverForWebService::deleteFederate | ( | const DtString & | federationName, |
| unsigned long | federateHandle | ||
| ) | [virtual] |
Request the Deletion of a federate.
References myCmdProc.
Referenced by DtRtiExecWebManager::issueDeleteFederateCommand().
| void DtRtiexecObserverForWebService::destroyFederation | ( | const DtString & | federationName, |
| unsigned long | federationHandle | ||
| ) | [virtual] |
Request the Destruction of a federation (will simply fail if federation non-empty)
References myCmdProc.
Referenced by DtRtiExecWebManager::issueDestroyFederationCommand().
| const DtRIDParameters & DtRtiexecObserverForWebService::params | ( | ) | const [inline] |
| void DtRtiexecObserverForWebService::processControlRspMsg | ( | const DtRtiMsg & | msg, |
| void * | usr | ||
| ) | [static] |
Process the web spy control response message.
Referenced by addCallbacks(), and removeCallbacks().
| void DtRtiexecObserverForWebService::processControlRspMsg | ( | const DtWwwControlRspMsg & | msg | ) | [virtual] |
Process the web spy state response message.
References DtWwwControlRspMsg::commandId(), DtWwwControlRspMsg::connectionId(), DtRtiMsg::fedExHandle(), myWebManager, and DtWwwControlRspMsg::sourceFederateHandle().
| void DtRtiexecObserverForWebService::processFederateJoinedEvent | ( | DtFedExec * | exec, |
| DtFederate * | federate | ||
| ) | [virtual] |
Process a federate joined event.
Reimplemented from DtRtiexecObserver.
References DtToString(), DtFedExec::fedExHandle(), DtFederate::getConnectionHandle(), DtFederate::getFederateHost(), DtFederate::getHandle(), DtFederate::getType(), DtFederate::getWebServerHost(), DtFederate::getWebServerPort(), and myWebManager.
| void DtRtiexecObserverForWebService::processFederateResignedEvent | ( | DtFedExec * | exec, |
| DtFederate * | federate | ||
| ) | [virtual] |
Process a federate resigned event.
Reimplemented from DtRtiexecObserver.
References DtFedExec::fedExHandle(), DtFederate::getHandle(), and myWebManager.
| void DtRtiexecObserverForWebService::processFederateStateRspMsg | ( | const DtRtiMsg & | msg, |
| void * | usr | ||
| ) | [static] |
Process the web spy federate state response message.
Referenced by addCallbacks(), and removeCallbacks().
| void DtRtiexecObserverForWebService::processFederateStateRspMsg | ( | const DtWwwFederateStateRspMsg & | msg | ) | [virtual] |
Process the web spy state response message.
References DtRtiMsg::fedExHandle(), myWebManager, DtWwwFederateStateRspMsg::responseType(), DtWwwFederateStateRspMsg::sourceConnectionId(), and DtWwwFederateStateRspMsg::sourceFederateHandle().
| void DtRtiexecObserverForWebService::processFederationSynchronizedEvent | ( | DtFedExec * | exec, |
| DtSyncPt * | pt | ||
| ) | [virtual] |
Process a federation synchronized to an existing sync. point event.
Reimplemented from DtRtiexecObserver.
References DtFedExec::fedExHandle(), myWebManager, and DtSyncPt::name().
| void DtRtiexecObserverForWebService::processFedExCreatedEvent | ( | DtFedExec * | exec | ) | [virtual] |
Process a new federation execution created event.
Reimplemented from DtRtiexecObserver.
References DtFedExec::fedExHandle(), DtFedExec::fedExName(), DtFedExec::fedFileName(), and myWebManager.
| void DtRtiexecObserverForWebService::processFedExDestroyedEvent | ( | DtFedExec * | exec | ) | [virtual] |
Process a federation execution destroyed event.
Reimplemented from DtRtiexecObserver.
References DtFedExec::fedExHandle(), and myWebManager.
| void DtRtiexecObserverForWebService::processNetworkMapRespMsg | ( | const DtRtiMsg & | msg, |
| void * | usr | ||
| ) | [static] |
Process the web spy network map response message.
Referenced by addCallbacks(), and removeCallbacks().
| void DtRtiexecObserverForWebService::processNetworkMapRespMsg | ( | const DtNetworkMapRspMsg & | msg | ) | [virtual] |
Process the web spy state response message.
References myConnectionId, myWebManager, DtNetworkMapRspMsg::payload(), and DtNetworkMapRspMsg::requestorId().
| void DtRtiexecObserverForWebService::processStateRspMsg | ( | const DtRtiMsg & | msg, |
| void * | usr | ||
| ) | [static] |
Process the web spy state response message.
Referenced by addCallbacks(), and removeCallbacks().
| void DtRtiexecObserverForWebService::processStateRspMsg | ( | const DtWwwStateRspMsg & | msg | ) | [virtual] |
Process the web spy state response message.
References DtRtiMsg::federateHandle(), DtRtiMsg::fedExHandle(), myWebManager, DtWwwStateRspMsg::responseType(), and DtWwwStateRspMsg::source().
| void DtRtiexecObserverForWebService::processSyncPtAchievedEvent | ( | DtFedExec * | exec, |
| DtFederate * | federate, | ||
| DtSyncPt * | pt | ||
| ) | [virtual] |
Process an existing sync. point achieved event.
Reimplemented from DtRtiexecObserver.
References DtFedExec::fedExHandle(), DtFederate::getHandle(), myWebManager, and DtSyncPt::name().
| void DtRtiexecObserverForWebService::processSyncPtRegisteredEvent | ( | DtFedExec * | exec, |
| DtSyncPt * | pt | ||
| ) | [virtual] |
Process a new sync. point registered event.
Reimplemented from DtRtiexecObserver.
References DtSyncPt::federates(), DtFedExec::federates(), DtFedExec::fedExHandle(), DtFederate::getHandle(), DtFederateHandleSet::isMember(), myWebManager, and DtSyncPt::name().
| void DtRtiexecObserverForWebService::processTimeStateEvent | ( | const DtRtiExec & | exec, |
| void * | usr | ||
| ) | [static] |
Callback for periodic time state processing.
Referenced by addCallbacks(), and removeCallbacks().
| void DtRtiexecObserverForWebService::processTimeStateEvent | ( | const DtRtiExec & | exec | ) | [virtual] |
Process a federate reconnect failed event.
References DtToString(), DtFedExec::federates(), DtRtiExec::fedExecs(), and myWebManager.
| void DtRtiexecObserverForWebService::removeCallbacks | ( | ) | [protected, virtual] |
Removes all RTI message and tick callbacks.
Called when a manager is removed or the observer is destroyed.
Implements DtRtiexecObserver.
References DtNetworkMapRspMsgKind, DtWwwControlRspMsgKind, DtWwwFederateStateRspMsgKind, DtWwwStateRspMsgKind, processControlRspMsg(), processFederateStateRspMsg(), processNetworkMapRespMsg(), processStateRspMsg(), processTimeStateEvent(), DtRtiexecObserver::removeRtiMsgCallback(), DtRtiexecObserver::removeTickCallback(), and tick().
| void DtRtiexecObserverForWebService::sendMsgToFederation | ( | const DtString & | federationName, |
| std::auto_ptr< DtRtiMsg > | msg | ||
| ) | [virtual] |
Send an RTI message to the specified federation.
References myCmdProc.
Referenced by DtRtiExecWebManager::federateStateReqHandler(), DtRtiExecWebManager::issueChangeRidParamsCommand(), DtRtiExecWebManager::issueLrcLogRequest(), DtRtiExecWebManager::issueStateRequest(), DtRtiExecWebManager::issueUndiscoverObjectCommand(), and DtRtiExecWebManager::stateReqHandler().
| void DtRtiexecObserverForWebService::setConnectionId | ( | unsigned long | connectionId | ) | [inline] |
Sets the rtiexec connection ID.
References DtRtiexecObserver::connectionId(), and myConnectionId.
| void DtRtiexecObserverForWebService::startObservation | ( | ) | [virtual] |
Indicates that observation of the exec has begun.
Reimplemented from DtRtiexecObserver.
References myCmdProc, myConnectionId, myParams, myWebManager, and DtRIDParameters::webserviceAddrString.
| void DtRtiexecObserverForWebService::tick | ( | void * | usr | ) | [static] |
Callback for periodic processing.
References tick().
| void DtRtiexecObserverForWebService::tick | ( | ) | [virtual] |
Periodic processing.
References myClock, and myWebManager.
Referenced by addCallbacks(), removeCallbacks(), and tick().
DtClock DtRtiexecObserverForWebService::myClock [protected] |
Clock used in message processing.
Referenced by tick().
DtBoost::shared_ptr<DtRtiexecCmdProc> DtRtiexecObserverForWebService::myCmdProc [protected] |
Processes commands to be performed by the rtiexec.
Referenced by changeRidParam(), deleteFederate(), destroyFederation(), sendMsgToFederation(), and startObservation().
unsigned long DtRtiexecObserverForWebService::myConnectionId [protected] |
The rtiexecs connection ID.
Referenced by processNetworkMapRespMsg(), setConnectionId(), and startObservation().
const DtTime DtRtiexecObserverForWebService::myMinTimeBetweenUpdates [protected] |
Min. time exec should wait between time state updates.
Referenced by addCallbacks().
const DtRIDParameters* DtRtiexecObserverForWebService::myParams [protected] |
RID parameters used by this exec.
Referenced by params(), and startObservation().
std::auto_ptr<DtRtiExecWebManager> DtRtiexecObserverForWebService::myWebManager [protected] |
The manager for the current web spy state.
Referenced by processControlRspMsg(), processFederateJoinedEvent(), processFederateResignedEvent(), processFederateStateRspMsg(), processFederationSynchronizedEvent(), processFedExCreatedEvent(), processFedExDestroyedEvent(), processNetworkMapRespMsg(), processStateRspMsg(), processSyncPtAchievedEvent(), processSyncPtRegisteredEvent(), processTimeStateEvent(), startObservation(), and tick().