MAK RTIspy API Documentation for HLA 1516
Signals | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions
DtAssistantComponentMgr Class Reference

Processes information on each local RTI component that is connected to this Assistant. More...

+ Inheritance diagram for DtAssistantComponentMgr:
+ Collaboration diagram for DtAssistantComponentMgr:

List of all members.

Signals

void localFederateJoined (int compId, const MAKRti::DtString &federateType, const MAKRti::DtString &federateName, unsigned federateHandle, const MAKRti::DtString &federationName, unsigned federationHandle, DtHlaVersionId hlaVersion)
 Emitted when a local federate joins a federation.
void localFederateResigned (int compId)
 Emitted when a local federate resigns from a federation.
void forwarderHasRtiexec (int compId)
 Emitted when a local forwarder connects with an rtiexec.
void forwarderHasNoRtiexec (int compId)
 Emitted when a local forwarder disconnects with an rtiexec.
Component added signals

Emitted when a new local RTI component is added

void lrcComponentAdded (int compId)
void rtiexecComponentAdded (int compId)
void forwarderComponentAdded (int compId)
void webServerComponentAdded (int compId)
void sharedMemComponentAdded (int compId)
Component removed signals

Emitted when a local RTI component is removed

void lrcComponentRemoved (int compId)
void rtiexecComponentRemoved (int compId)
void forwarderComponentRemoved (int compId)
void webServerComponentRemoved (int compId)
void sharedMemComponentRemoved (int compId)
Component removed unexpectedly signals

Emitted when a local RTI component is removed unexpectedly

void lrcComponentRemovedUnexpectedly (int compId)
void rtiexecComponentRemovedUnexpectedly (int compId)
void forwarderComponentRemovedUnexpectedly (int compId)
void webServerComponentRemovedUnexpectedly (int compId)
void sharedMemComponentRemovedUnexpectedly (int compId)
Component renamed signals

Emitted when a local RTI component is renamed

void lrcComponentRenamed (int compId)
void rtiexecComponentRenamed (int compId)
void forwarderComponentRenamed (int compId)
void webServerComponentRenamed (int compId)
void sharedMemComponentRenamed (int compId)
Component connected signals

Emitted when a local RTI component disconnects its RTI connection

void lrcComponentConnected (int compId)
void rtiexecComponentConnected (int compId)
void forwarderComponentConnected (int compId)
void lrcComponentDisconnected (int compId)
void rtiexecComponentDisconnected (int compId)
void forwarderComponentDisconnected (int compId)
Component updated signals

Emitted when a local RTI component is updated

void lrcComponentUpdated (int compId)
void rtiexecComponentUpdated (int compId)
void forwarderComponentUpdated (int compId)
void webServerComponentUpdated (int compId)
void sharedMemComponentUpdated (int compId)

Public Member Functions

 DtAssistantComponentMgr (DtBoost::shared_ptr< DtRtiAssistantServer > server, DtBoost::shared_ptr< DtRtiAssistantPeer > peer, DtBoost::shared_ptr< DtAssistantPreferencesInfoMgr > prefMgr)
 Constructor.
virtual ~DtAssistantComponentMgr ()
 Destructor.
virtual const
DtAssistantComponentInfo
componentInfo (int compId) const
 Returns a reference to the information for the component with the given component ID.
virtual void updateComponent (int compId, const DtAssistantComponentInfo &comp)
 Updates the component with the given ID.
virtual const
DtIdToComponentInfoMap
components () const
 Returns components the assistant is connected to.
virtual const
DtIdToComponentInfoMap
rtiexecComponents () const
 Returns rtiexec components the assistant is connected to.
virtual const
DtIdToComponentInfoMap
lrcComponents () const
 Returns LRC components the assistant is connected to.
virtual const
DtIdToComponentInfoMap
forwarderComponents () const
 Returns forwarder components the assistant is connected to.
virtual const
DtIdToComponentInfoMap
webServerComponents () const
 Returns web server components the assistant is connected to.
virtual const
DtIdToComponentInfoMap
sharedMemComponents () const
 Returns shared memory queue components the assistant is connected to.
virtual MAKRti::DtString printLocalComponentList () const
 Print list of local components.
virtual MAKRti::DtString printFederationList (const DtAssistantExecStateMsg &msg)
 Print formatted federation info.
virtual MAKRti::DtString printRtiExecComponentsList (std::map< int, MAKRti::DtString > &data) const
 Print list of rtiExec Components.
virtual MAKRti::DtString printForwarderComponentsList (const std::map< int, MAKRti::DtString > &data) const
 Print list of Forwarder Components.

Protected Member Functions

virtual void processSocketRemoval (int compId, const MAKRti::DtString &reason)
 Called by the callback function to process the removal of a socket.

Static Protected Member Functions

static void processSocketRemoval (int compId, const MAKRti::DtString &reason, void *usr)
 Callback to process the removal of a socket connection.

Protected Attributes

DtBoost::shared_ptr
< DtAssistantPreferencesInfoMgr
myPrefMgr
 The manager responsible for maintaining user Assistant preferences.
DtClock myClock
 The clock.
DtIdToComponentInfoMap myComponentsById
 Map containing the information on all connected components indexed by component ID.
DtIdToComponentInfoMap myRtiExecComponentsById
 Map containing the information on all connected components indexed by component ID.
DtIdToComponentInfoMap myLrcComponentsById
 Map containing the information on all connected components indexed by component ID.
DtIdToComponentInfoMap myForwarderComponentsById
 Map containing the information on all connected components indexed by component ID.
DtIdToComponentInfoMap myWebComponentsById
 Map containing the information on all connected components indexed by component ID.
DtIdToComponentInfoMap mySharedMemComponentsById
 Map containing the information on all connected components indexed by component ID.

Private Member Functions

 DtAssistantComponentMgr (DtAssistantComponentMgr const &)
 Copy Constructor not implemented -- Copy Not Allowed!
DtAssistantComponentMgroperator= (DtAssistantComponentMgr const &)
 Assignment not implemented -- Assignment Not Allowed!

Message Callbacks

Callbacks for component information messages

static void processConnMsg (const DtAssistantConnMsg &msg, void *usr)
 Callback to process a connection update message from a component.
static void processLrcCompInfoMsg (const DtAssistantLrcCompInfoMsg &msg, void *usr)
 Callback to process a component information message from an LRC.
static void processRtiexecCompInfoMsg (const DtAssistantRtiexecCompInfoMsg &msg, void *usr)
 Callback to process a component information message from an rtiexec.
static void processRtiForwarderCompInfoMsg (const DtAssistantRtiForwarderCompInfoMsg &msg, void *usr)
 Callback to process a component information message from an RTI Forwarder.
static void processWwwCompInfoMsg (const DtAssistantWwwCompInfoMsg &msg, void *usr)
 Callback to process a component information message from a web spy server.
virtual void processConnMsg (const DtAssistantConnMsg &msg)
 Called by the callback function to process connection messages.
virtual void processNewConnMsg (const DtAssistantConnMsg &msg)
 Processes a connection message for a new connection.
virtual void processCloseConnMsg (const DtAssistantConnMsg &msg)
 Processes a connection message for a connection which is closing.
virtual void processLrcCompInfoMsg (const DtAssistantLrcCompInfoMsg &msg)
 Called by the callback function to process LRC component information messages.
virtual void processRtiexecCompInfoMsg (const DtAssistantRtiexecCompInfoMsg &msg)
 Called by the callback function to process rtiexec component information messages.
virtual void processRtiForwarderCompInfoMsg (const DtAssistantRtiForwarderCompInfoMsg &msg)
 Called by the callback function to process RTI Forwarder component information messages.
virtual void processWwwCompInfoMsg (const DtAssistantWwwCompInfoMsg &msg)
 Called by the callback function to process web spy server component information messages.

Detailed Description

Processes information on each local RTI component that is connected to this Assistant.

This information is stored so that it may be retrieved by other assistant managers as needed. Emits signals to notify other classes when information has been updated.


Constructor & Destructor Documentation

DtAssistantComponentMgr::DtAssistantComponentMgr ( DtBoost::shared_ptr< DtRtiAssistantServer server,
DtBoost::shared_ptr< DtRtiAssistantPeer peer,
DtBoost::shared_ptr< DtAssistantPreferencesInfoMgr prefMgr 
)

Copy Constructor not implemented -- Copy Not Allowed!


Member Function Documentation

const DtAssistantComponentInfo * DtAssistantComponentMgr::componentInfo ( int  compId) const [virtual]

Returns a reference to the information for the component with the given component ID.

Returns a null pointer if the component could not be found.

References myComponentsById.

Returns components the assistant is connected to.

References myComponentsById.

void DtAssistantComponentMgr::forwarderComponentAdded ( int  compId) [signal]

Referenced by processNewConnMsg().

Referenced by processCloseConnMsg().

Referenced by processSocketRemoval().

Returns forwarder components the assistant is connected to.

References myForwarderComponentsById.

void DtAssistantComponentMgr::forwarderHasNoRtiexec ( int  compId) [signal]

Emitted when a local forwarder disconnects with an rtiexec.

Referenced by processRtiForwarderCompInfoMsg().

void DtAssistantComponentMgr::forwarderHasRtiexec ( int  compId) [signal]

Emitted when a local forwarder connects with an rtiexec.

Referenced by processRtiForwarderCompInfoMsg().

void DtAssistantComponentMgr::localFederateJoined ( int  compId,
const MAKRti::DtString &  federateType,
const MAKRti::DtString &  federateName,
unsigned  federateHandle,
const MAKRti::DtString &  federationName,
unsigned  federationHandle,
DtHlaVersionId  hlaVersion 
) [signal]

Emitted when a local federate joins a federation.

Referenced by processLrcCompInfoMsg().

void DtAssistantComponentMgr::localFederateResigned ( int  compId) [signal]

Emitted when a local federate resigns from a federation.

Referenced by processCloseConnMsg(), processLrcCompInfoMsg(), and processSocketRemoval().

void DtAssistantComponentMgr::lrcComponentAdded ( int  compId) [signal]

Referenced by processNewConnMsg().

void DtAssistantComponentMgr::lrcComponentConnected ( int  compId) [signal]

Referenced by processLrcCompInfoMsg().

void DtAssistantComponentMgr::lrcComponentRemoved ( int  compId) [signal]

Referenced by processCloseConnMsg().

Referenced by processSocketRemoval().

void DtAssistantComponentMgr::lrcComponentRenamed ( int  compId) [signal]

Referenced by processLrcCompInfoMsg().

Returns LRC components the assistant is connected to.

References myLrcComponentsById.

void DtAssistantComponentMgr::lrcComponentUpdated ( int  compId) [signal]

Referenced by processLrcCompInfoMsg().

DtAssistantComponentMgr& DtAssistantComponentMgr::operator= ( DtAssistantComponentMgr const &  ) [private]

Assignment not implemented -- Assignment Not Allowed!

MAKRti::DtString DtAssistantComponentMgr::printFederationList ( const DtAssistantExecStateMsg msg) [virtual]

Print formatted federation info.

References DtAssistantExecStateMsg::getAllData().

MAKRti::DtString DtAssistantComponentMgr::printForwarderComponentsList ( const std::map< int, MAKRti::DtString > &  data) const [virtual]

Print list of Forwarder Components.

MAKRti::DtString DtAssistantComponentMgr::printLocalComponentList ( ) const [virtual]
MAKRti::DtString DtAssistantComponentMgr::printRtiExecComponentsList ( std::map< int, MAKRti::DtString > &  data) const [virtual]

Print list of rtiExec Components.

References myRtiExecComponentsById.

void DtAssistantComponentMgr::processCloseConnMsg ( const DtAssistantConnMsg msg) [protected, virtual]
void DtAssistantComponentMgr::processConnMsg ( const DtAssistantConnMsg msg,
void *  usr 
) [static, protected]

Callback to process a connection update message from a component.

Referenced by DtAssistantComponentMgr(), and ~DtAssistantComponentMgr().

void DtAssistantComponentMgr::processConnMsg ( const DtAssistantConnMsg msg) [protected, virtual]

Called by the callback function to process connection messages.

References DtAssistantConnMsg::isDisconnect(), processCloseConnMsg(), and processNewConnMsg().

void DtAssistantComponentMgr::processLrcCompInfoMsg ( const DtAssistantLrcCompInfoMsg msg,
void *  usr 
) [static, protected]

Callback to process a component information message from an LRC.

Referenced by DtAssistantComponentMgr(), and ~DtAssistantComponentMgr().

Called by the callback function to process LRC component information messages.

References DtAssistantLrcCompInfoMsg::bestEffortIpAddress(), DtAssistantLrcCompInfoMsg::commandArgs(), DtAssistantLrcCompInfoMsg::federateHandle(), DtAssistantLrcCompInfoMsg::federateName(), DtAssistantLrcCompInfoMsg::federationHandle(), DtAssistantLrcCompInfoMsg::federationName(), DtAssistantLrcCompInfoMsg::forwarderPort(), DtAssistantLrcCompInfoMsg::fullCompliance(), DtAssistantLrcCompInfoMsg::hlaVersion(), DtAssistantLrcCompInfoMsg::ipAddress(), DtAssistantLrcCompInfoMsg::licServer(), localFederateJoined(), localFederateResigned(), DtAssistantLrcCompInfoMsg::logFilename(), lrcComponentConnected(), lrcComponentDisconnected(), lrcComponentRenamed(), lrcComponentUpdated(), myLrcComponentsById, DtAssistantMgr::myServer, DtAssistantLrcCompInfoMsg::name(), DtAssistantLrcCompInfoMsg::networkInterfaceAddress(), DtAssistantLrcCompInfoMsg::notifyLevel(), DtAssistantLrcCompInfoMsg::processId(), DtAssistantLrcCompInfoMsg::processName(), DtRtiConnectionInfo::setBestEffortIp(), DtRtiConnectionInfo::setForwarderPort(), DtRtiConnectionInfo::setHostName(), DtRtiConnectionInfo::setNetworkInterfaceAddr(), DtRtiConnectionInfo::setReliableIp(), DtRtiConnectionInfo::setTcpPort(), DtRtiConnectionInfo::setUdpPort(), DtRtiConnectionInfo::setUseRtiexec(), DtAssistantLrcCompInfoMsg::tcpPort(), DtAssistantLrcCompInfoMsg::udpPort(), DtAssistantLrcCompInfoMsg::useRtiexec(), DtAssistantLrcCompInfoMsg::webSpyId(), DtAssistantLrcCompInfoMsg::webSpyIpAddress(), and DtAssistantLrcCompInfoMsg::webSpyPort().

void DtAssistantComponentMgr::processNewConnMsg ( const DtAssistantConnMsg msg) [protected, virtual]
void DtAssistantComponentMgr::processRtiexecCompInfoMsg ( const DtAssistantRtiexecCompInfoMsg msg,
void *  usr 
) [static, protected]

Callback to process a component information message from an rtiexec.

Referenced by DtAssistantComponentMgr(), and ~DtAssistantComponentMgr().

void DtAssistantComponentMgr::processRtiForwarderCompInfoMsg ( const DtAssistantRtiForwarderCompInfoMsg msg,
void *  usr 
) [static, protected]

Callback to process a component information message from an RTI Forwarder.

Referenced by DtAssistantComponentMgr(), and ~DtAssistantComponentMgr().

void DtAssistantComponentMgr::processSocketRemoval ( int  compId,
const MAKRti::DtString &  reason,
void *  usr 
) [static, protected]

Callback to process the removal of a socket connection.

Referenced by DtAssistantComponentMgr(), and ~DtAssistantComponentMgr().

void DtAssistantComponentMgr::processSocketRemoval ( int  compId,
const MAKRti::DtString &  reason 
) [protected, virtual]
void DtAssistantComponentMgr::processWwwCompInfoMsg ( const DtAssistantWwwCompInfoMsg msg,
void *  usr 
) [static, protected]

Callback to process a component information message from a web spy server.

Referenced by DtAssistantComponentMgr(), and ~DtAssistantComponentMgr().

void DtAssistantComponentMgr::rtiexecComponentAdded ( int  compId) [signal]

Referenced by processNewConnMsg().

void DtAssistantComponentMgr::rtiexecComponentRemoved ( int  compId) [signal]

Referenced by processCloseConnMsg().

Referenced by processSocketRemoval().

void DtAssistantComponentMgr::rtiexecComponentRenamed ( int  compId) [signal]

Returns rtiexec components the assistant is connected to.

References myRtiExecComponentsById.

void DtAssistantComponentMgr::rtiexecComponentUpdated ( int  compId) [signal]
void DtAssistantComponentMgr::sharedMemComponentAdded ( int  compId) [signal]

Referenced by processNewConnMsg().

Referenced by processCloseConnMsg().

Referenced by processSocketRemoval().

Returns shared memory queue components the assistant is connected to.

References mySharedMemComponentsById.

void DtAssistantComponentMgr::updateComponent ( int  compId,
const DtAssistantComponentInfo comp 
) [virtual]

Updates the component with the given ID.

References myComponentsById.

void DtAssistantComponentMgr::webServerComponentAdded ( int  compId) [signal]

Referenced by processNewConnMsg().

Referenced by processCloseConnMsg().

Referenced by processSocketRemoval().

Returns web server components the assistant is connected to.

References myWebComponentsById.

Referenced by processWwwCompInfoMsg().


Member Data Documentation

DtClock DtAssistantComponentMgr::myClock [protected]

The clock.

Map containing the information on all connected components indexed by component ID.

Referenced by componentInfo(), components(), processCloseConnMsg(), processNewConnMsg(), processSocketRemoval(), and updateComponent().

Map containing the information on all connected components indexed by component ID.

Referenced by forwarderComponents(), printLocalComponentList(), processCloseConnMsg(), processNewConnMsg(), processRtiForwarderCompInfoMsg(), and processSocketRemoval().

Map containing the information on all connected components indexed by component ID.

Referenced by lrcComponents(), printLocalComponentList(), processCloseConnMsg(), processLrcCompInfoMsg(), processNewConnMsg(), and processSocketRemoval().

The manager responsible for maintaining user Assistant preferences.

Map containing the information on all connected components indexed by component ID.

Referenced by printLocalComponentList(), printRtiExecComponentsList(), processCloseConnMsg(), processNewConnMsg(), processRtiexecCompInfoMsg(), processSocketRemoval(), and rtiexecComponents().

Map containing the information on all connected components indexed by component ID.

Referenced by printLocalComponentList(), processCloseConnMsg(), processNewConnMsg(), processSocketRemoval(), and sharedMemComponents().

Map containing the information on all connected components indexed by component ID.

Referenced by printLocalComponentList(), processCloseConnMsg(), processNewConnMsg(), processSocketRemoval(), processWwwCompInfoMsg(), and webServerComponents().


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)