MAK RTIspy API Documentation for HLA 1.3
List of all members | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions
DtRtiAmbassadorBaseImplementor Class Reference

This class is a base for the protocol specific DtRtiAmbassadorImplementor class. More...

+ Collaboration diagram for DtRtiAmbassadorBaseImplementor:

Public Member Functions

virtual ~DtRtiAmbassadorBaseImplementor ()
 Destructor.
virtual void addObserver (MAKRti::DtString const &name, DtRtiAmbassadorObserver *observer)
 Add/Remove observers to the LRC's observer list.
virtual DtRtiAmbassadorObserver * removeObserver (MAKRti::DtString const &name)
virtual void addFedAmbWrapper (MAKRti::DtString const &name, DtFedAmbWrapper *wrapper)
 Add/Remove federate wrappers to the LRC's federate wrapper list.
virtual DtFedAmbWrapperremoveFedAmbWrapper (MAKRti::DtString const &name)
virtual bool enterServiceCall (const MAKRti::DtString &serviceCallName)
 Prepare for a service call Called by RTI Ambassador services to gain mutually exclusive access to RTI managers.
virtual void exitServiceCall (const MAKRti::DtString &serviceCallName)
 Finish a service call.
virtual bool isConnected () const
 Is the connection completed?
virtual DtRIDParametersparams ()
 Get the RID parameters.
virtual DtFederateMgrvalidatedFedMgr ()
 Get the federate mgr Will throw RTI Exception if not initialized.
virtual DtFederateMgrnakedFedMgr ()
 Get the federate mgr Returns even when not initialized (with null)
virtual DtConnectionMgrvalidatedConnectMgr ()
 Get the connection mgr Will throw RTI Exception if not initialized.
virtual DtConnectionMgrnakedConnectMgr ()
 Get the connection mgr Returns even when not initialized (with null)
virtual DtObjectMgrobjMgr ()
 Get the object mgr If the LRC is unjoined, this will return NULL.
virtual DtInteractionMgrinterMgr ()
 Get the interaction mgr If the LRC is unjoined, this will return NULL.
virtual DtFomClassMgrfomMgr ()
 Get the fom mgr If the LRC is unjoined, this will return NULL.
virtual DtRtiAmbObserverListobservers ()
 Return the observer list.
virtual const
DtRtiAmbObserverList
observers () const
 Return the observer list.
virtual void enableLogging ()
 Enables logging if it is not already enabled Plugin Users should never need to call this.
virtual DtBoost::shared_ptr
< MAKRti::DtFilePrinter > 
logPrinter ()
 Get the printer which prints output to the log file.
unsigned long flags () const
virtual DtFederateMgrvalidateIsJoined (const MAKRti::DtString &serviceCallName)
 Validate that federate is joined.
virtual const DtFederateMgrvalidateIsJoined (const MAKRti::DtString &serviceCallName) const
 Validate that federate is joined.

Protected Types

enum  DtProcessingModelOverride { DtImmediateCallbacks = 0, DtEvokedCallbacks, DtDefaultModel }
 0 == Use an immediate callback processing model 1 == Use an evoked callback processing model 2 == Use default processing model More...

Protected Member Functions

 DtRtiAmbassadorBaseImplementor ()
 Abstract class, do not instantiate.
virtual void setupConnection (const std::vector< MAKRti::DtString > &rid, DtProcessingModelOverride processingModelOverride=DtDefaultModel)
 Establish preliminary connection configuration and infrastructure.
virtual bool completeConnection (MAKRti::DtString &errorMessage)
 Complete the connection infrastructure Throws if there is a fatal failure Returns boolean: connection completed successfully? If not it is possible to try again.
virtual void clearConnection ()
 Remove the connection.
virtual void shutdown ()
 Prepare asynchronous connection for shutdown.
virtual bool performMulticastDiscovery ()
 Attempt to automatically detect the RTI Forwarder (or RTI Exec) Returns false if not found.
virtual void printDisabledService (const MAKRti::DtString &service)
 Print a disabled service.
virtual unsigned long incrementServiceCallCount ()
 Increment the service call count and return its value.
virtual bool tickOnce ()
 Called from tick/evokeCallback: Ticks the federate manager.
virtual void throwInternalError (const MAKRti::DtString &errorMessage) const =0
 Throw an RTI internal exception.
virtual void throwNotConnected (const MAKRti::DtString &errorMessage) const =0
 Throw an RTI not connected exception (internal for 1.3 & 1516)
virtual void throwNotJoined (const MAKRti::DtString &errorMessage) const =0
 Throw an RTI not joined exception.

Protected Attributes

DtRIDParametersmyParams
 The RTI initialization parameters.
DtConnectionMgrmyConnectMgr
 The connection manager.
DtFederateMgrmyFedMgr
 The federate manager.
DtRtiPluginManagermyPluginMgr
 The plugin manager.
DtRtiAmbObserverListmyObservers
 The list of RTI Ambassador observers.
DtRtiAmbObserverListmyEmptyObserverList
 The empty list.
DtBoost::shared_ptr
< DtRtiAssistantLrcClient
myAssistantClient
 The assistant client. We cache it until we're initialized.
DtBoost::shared_ptr
< MAKRti::DtFilePrinter > 
myLogPrinter
 The printer which prints output to the log file.
DtBoost::shared_ptr
< DtAssistantPrinter
myAssistantPrinter
 The printer which sends output to the assistant file.
bool myCallbacksEnabled
 Indicates callbacks enabled status.
MAKRti::DtClock myClock
 Clock used for timing.
unsigned long myFlags
bool myUseBusyWaitForTick

Private Member Functions

 DtRtiAmbassadorBaseImplementor (DtRtiAmbassadorBaseImplementor const &)
 Copy Constructor not implemented – Copy Not Allowed!
DtRtiAmbassadorBaseImplementoroperator= (DtRtiAmbassadorBaseImplementor const &)
 Assignment not implemented – Assignment Not Allowed!

Detailed Description

This class is a base for the protocol specific DtRtiAmbassadorImplementor class.

It performs the common initialization and processing for setting up connections and establishing the common infrastructure. The protocol specific DtRtiAmbassadorImplementor that derive from this class implement the RTIambassador services defined in the HLA specification by forwarding federate requests to the appropriate sub-managers.

Member Enumeration Documentation

0 == Use an immediate callback processing model 1 == Use an evoked callback processing model 2 == Use default processing model

Enumerator:
DtImmediateCallbacks 
DtEvokedCallbacks 
DtDefaultModel 

Constructor & Destructor Documentation

DtRtiAmbassadorBaseImplementor::DtRtiAmbassadorBaseImplementor ( )
protected

Abstract class, do not instantiate.

References myEmptyObserverList.

DtRtiAmbassadorBaseImplementor::~DtRtiAmbassadorBaseImplementor ( )
virtual

Destructor.

References clearConnection(), and myEmptyObserverList.

DtRtiAmbassadorBaseImplementor::DtRtiAmbassadorBaseImplementor ( DtRtiAmbassadorBaseImplementor const &  )
private

Copy Constructor not implemented – Copy Not Allowed!

Member Function Documentation

void DtRtiAmbassadorBaseImplementor::addFedAmbWrapper ( MAKRti::DtString const &  name,
DtFedAmbWrapper wrapper 
)
virtual

Add/Remove federate wrappers to the LRC's federate wrapper list.

References DtConnectionMgr::addFedAmbWrapper(), and validatedConnectMgr().

void DtRtiAmbassadorBaseImplementor::addObserver ( MAKRti::DtString const &  name,
DtRtiAmbassadorObserver *  observer 
)
virtual

Add/Remove observers to the LRC's observer list.

References DtRtiAmbObserverList::addObserver(), and myObservers.

void DtRtiAmbassadorBaseImplementor::clearConnection ( )
protectedvirtual
bool DtRtiAmbassadorBaseImplementor::completeConnection ( MAKRti::DtString &  errorMessage)
protectedvirtual
void DtRtiAmbassadorBaseImplementor::enableLogging ( )
virtual

Enables logging if it is not already enabled Plugin Users should never need to call this.

References myAssistantClient, and myLogPrinter.

Referenced by DtFederateMgr::processAssistantEnableLogging().

bool DtRtiAmbassadorBaseImplementor::enterServiceCall ( const MAKRti::DtString &  serviceCallName)
virtual

Prepare for a service call Called by RTI Ambassador services to gain mutually exclusive access to RTI managers.

Also checks that connection is fully initialized (throws if not). Return true if entered with access to lock

References completeConnection(), DtConnectionMgr::enterServiceCall(), isConnected(), throwNotConnected(), and validatedConnectMgr().

void DtRtiAmbassadorBaseImplementor::exitServiceCall ( const MAKRti::DtString &  serviceCallName)
virtual

Finish a service call.

References DtConnectionMgr::exitServiceCall(), and validatedConnectMgr().

unsigned long DtRtiAmbassadorBaseImplementor::flags ( ) const

References myFlags.

DtFomClassMgr * DtRtiAmbassadorBaseImplementor::fomMgr ( )
virtual

Get the fom mgr If the LRC is unjoined, this will return NULL.

References DtFederateMgr::fom(), and validatedFedMgr().

unsigned long DtRtiAmbassadorBaseImplementor::incrementServiceCallCount ( )
protectedvirtual

Increment the service call count and return its value.

Null operation if not yet connected (returns 0).

References DtConnectionMgr::incrementServiceCallCount(), and validatedConnectMgr().

DtInteractionMgr * DtRtiAmbassadorBaseImplementor::interMgr ( )
virtual

Get the interaction mgr If the LRC is unjoined, this will return NULL.

References DtFederateMgr::interMgr(), and validatedFedMgr().

bool DtRtiAmbassadorBaseImplementor::isConnected ( ) const
virtual

Is the connection completed?

References myFedMgr.

Referenced by clearConnection(), and enterServiceCall().

DtBoost::shared_ptr< MAKRti::DtFilePrinter > DtRtiAmbassadorBaseImplementor::logPrinter ( )
virtual

Get the printer which prints output to the log file.

References myLogPrinter.

DtConnectionMgr * DtRtiAmbassadorBaseImplementor::nakedConnectMgr ( )
virtual

Get the connection mgr Returns even when not initialized (with null)

References myConnectMgr.

DtFederateMgr * DtRtiAmbassadorBaseImplementor::nakedFedMgr ( )
virtual

Get the federate mgr Returns even when not initialized (with null)

References myFedMgr.

DtObjectMgr * DtRtiAmbassadorBaseImplementor::objMgr ( )
virtual

Get the object mgr If the LRC is unjoined, this will return NULL.

References DtFederateMgr::objMgr(), and validatedFedMgr().

DtRtiAmbObserverList * DtRtiAmbassadorBaseImplementor::observers ( )
virtual

Return the observer list.

References myEmptyObserverList, and myObservers.

const DtRtiAmbObserverList * DtRtiAmbassadorBaseImplementor::observers ( ) const
virtual

Return the observer list.

References myEmptyObserverList, and myObservers.

DtRtiAmbassadorBaseImplementor& DtRtiAmbassadorBaseImplementor::operator= ( DtRtiAmbassadorBaseImplementor const &  )
private

Assignment not implemented – Assignment Not Allowed!

DtRIDParameters * DtRtiAmbassadorBaseImplementor::params ( )
virtual

Get the RID parameters.

References myParams.

Referenced by setupConnection().

bool DtRtiAmbassadorBaseImplementor::performMulticastDiscovery ( )
protectedvirtual
void DtRtiAmbassadorBaseImplementor::printDisabledService ( const MAKRti::DtString &  service)
protectedvirtual

Print a disabled service.

References myParams.

DtFedAmbWrapper * DtRtiAmbassadorBaseImplementor::removeFedAmbWrapper ( MAKRti::DtString const &  name)
virtual
DtRtiAmbassadorObserver * DtRtiAmbassadorBaseImplementor::removeObserver ( MAKRti::DtString const &  name)
virtual
void DtRtiAmbassadorBaseImplementor::setupConnection ( const std::vector< MAKRti::DtString > &  rid,
DtProcessingModelOverride  processingModelOverride = DtDefaultModel 
)
protectedvirtual
void DtRtiAmbassadorBaseImplementor::shutdown ( )
protectedvirtual

Prepare asynchronous connection for shutdown.

References DtConnectionMgr::isShuttingDown(), myConnectMgr, DtConnectionMgr::shutdown(), and DtConnectionMgr::yield().

Referenced by clearConnection().

virtual void DtRtiAmbassadorBaseImplementor::throwInternalError ( const MAKRti::DtString &  errorMessage) const
protectedpure virtual

Throw an RTI internal exception.

Referenced by completeConnection(), and setupConnection().

virtual void DtRtiAmbassadorBaseImplementor::throwNotConnected ( const MAKRti::DtString &  errorMessage) const
protectedpure virtual

Throw an RTI not connected exception (internal for 1.3 & 1516)

Referenced by enterServiceCall(), validatedConnectMgr(), and validatedFedMgr().

virtual void DtRtiAmbassadorBaseImplementor::throwNotJoined ( const MAKRti::DtString &  errorMessage) const
protectedpure virtual

Throw an RTI not joined exception.

bool DtRtiAmbassadorBaseImplementor::tickOnce ( )
protectedvirtual

Called from tick/evokeCallback: Ticks the federate manager.

References DtFederateMgr::tick(), and validatedFedMgr().

DtConnectionMgr * DtRtiAmbassadorBaseImplementor::validatedConnectMgr ( )
virtual

Get the connection mgr Will throw RTI Exception if not initialized.

References myConnectMgr, and throwNotConnected().

Referenced by addFedAmbWrapper(), enterServiceCall(), exitServiceCall(), incrementServiceCallCount(), and removeFedAmbWrapper().

DtFederateMgr * DtRtiAmbassadorBaseImplementor::validatedFedMgr ( )
virtual

Get the federate mgr Will throw RTI Exception if not initialized.

References DtFederateMgr::forcedToResign(), myFedMgr, and throwNotConnected().

Referenced by fomMgr(), interMgr(), objMgr(), and tickOnce().

virtual DtFederateMgr* DtRtiAmbassadorBaseImplementor::validateIsJoined ( const MAKRti::DtString &  serviceCallName)
virtual

Validate that federate is joined.

If not valid, throw not joined exception. Return the federate manager if everything is OK

virtual const DtFederateMgr* DtRtiAmbassadorBaseImplementor::validateIsJoined ( const MAKRti::DtString &  serviceCallName) const
virtual

Validate that federate is joined.

If not valid, throw not joined exception. Return the federate manager if everything is OK

Member Data Documentation

DtBoost::shared_ptr<DtRtiAssistantLrcClient> DtRtiAmbassadorBaseImplementor::myAssistantClient
protected

The assistant client. We cache it until we're initialized.

Referenced by clearConnection(), completeConnection(), enableLogging(), and setupConnection().

DtBoost::shared_ptr< DtAssistantPrinter > DtRtiAmbassadorBaseImplementor::myAssistantPrinter
protected

The printer which sends output to the assistant file.

Referenced by clearConnection(), and setupConnection().

bool DtRtiAmbassadorBaseImplementor::myCallbacksEnabled
protected

Indicates callbacks enabled status.

MAKRti::DtClock DtRtiAmbassadorBaseImplementor::myClock
protected

Clock used for timing.

DtConnectionMgr* DtRtiAmbassadorBaseImplementor::myConnectMgr
protected
DtRtiAmbObserverList* DtRtiAmbassadorBaseImplementor::myEmptyObserverList
protected
DtFederateMgr* DtRtiAmbassadorBaseImplementor::myFedMgr
protected
unsigned long DtRtiAmbassadorBaseImplementor::myFlags
protected

Referenced by flags(), and setupConnection().

DtBoost::shared_ptr< MAKRti::DtFilePrinter > DtRtiAmbassadorBaseImplementor::myLogPrinter
protected

The printer which prints output to the log file.

Referenced by clearConnection(), enableLogging(), logPrinter(), and setupConnection().

DtRtiAmbObserverList* DtRtiAmbassadorBaseImplementor::myObservers
protected

The list of RTI Ambassador observers.

Referenced by addObserver(), clearConnection(), observers(), removeObserver(), and setupConnection().

DtRIDParameters* DtRtiAmbassadorBaseImplementor::myParams
protected
DtRtiPluginManager* DtRtiAmbassadorBaseImplementor::myPluginMgr
protected

The plugin manager.

Referenced by clearConnection().

bool DtRtiAmbassadorBaseImplementor::myUseBusyWaitForTick
protected

Referenced by completeConnection().


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

Document ID: Generated on Tue May 7 16:26:47 EDT 2013 from SVN revision 126903
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)