MAK RTIspy API Documentation for HLA 1516
Public Member Functions | Protected Member Functions | Protected Attributes
DtRtiexecObserverForWebService Class Reference

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:

List of all members.

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

Detailed Description

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.


Constructor & Destructor Documentation


Member Function Documentation

void DtRtiexecObserverForWebService::addCallbacks ( ) [protected, virtual]
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().

Get the RID params.

References myParams.

Referenced by DtRtiExecWebManager::DtRtiExecWebManager().

void DtRtiexecObserverForWebService::processControlRspMsg ( const DtRtiMsg msg,
void *  usr 
) [static]

Process the web spy control response message.

Referenced by addCallbacks(), and removeCallbacks().

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

Process a federation synchronized to an existing sync. point event.

Reimplemented from DtRtiexecObserver.

References DtFedExec::fedExHandle(), myWebManager, and DtSyncPt::name().

Process a new federation execution created event.

Reimplemented from DtRtiexecObserver.

References DtFedExec::fedExHandle(), DtFedExec::fedExName(), DtFedExec::fedFileName(), and myWebManager.

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

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::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::processTimeStateEvent ( const DtRtiExec exec,
void *  usr 
) [static]

Callback for periodic time state processing.

Referenced by addCallbacks(), and removeCallbacks().

Process a federate reconnect failed event.

References DtToString(), DtFedExec::federates(), DtRtiExec::fedExecs(), and myWebManager.

void DtRtiexecObserverForWebService::removeCallbacks ( ) [protected, virtual]
void DtRtiexecObserverForWebService::sendMsgToFederation ( const DtString &  federationName,
std::auto_ptr< DtRtiMsg msg 
) [virtual]
void DtRtiexecObserverForWebService::setConnectionId ( unsigned long  connectionId) [inline]

Sets the rtiexec connection ID.

References DtRtiexecObserver::connectionId(), and myConnectionId.

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

Periodic processing.

References myClock, and myWebManager.

Referenced by addCallbacks(), removeCallbacks(), and tick().


Member Data Documentation

Clock used in message processing.

Referenced by tick().

Processes commands to be performed by the rtiexec.

Referenced by changeRidParam(), deleteFederate(), destroyFederation(), sendMsgToFederation(), and startObservation().

The rtiexecs connection ID.

Referenced by processNetworkMapRespMsg(), setConnectionId(), and startObservation().

Min. time exec should wait between time state updates.

Referenced by addCallbacks().

RID parameters used by this exec.

Referenced by params(), and startObservation().


The documentation for this class was generated from the following files:

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)