MAK RTIspy API Documentation for HLA 1.3
Public Member Functions | 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:

List of all members.

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 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 Member Functions

 DtRtiAmbassadorBaseImplementor ()
 Abstract class, do not instantiate.
virtual void setupConnection (const std::vector< MAKRti::DtString > &rid)
 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 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.
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.


Constructor & Destructor Documentation

Abstract class, do not instantiate.

Destructor.

References clearConnection().

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 ( ) [protected, virtual]
bool DtRtiAmbassadorBaseImplementor::completeConnection ( MAKRti::DtString &  errorMessage) [protected, 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.

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

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

unsigned long DtRtiAmbassadorBaseImplementor::incrementServiceCallCount ( ) [protected, virtual]

Increment the service call count and return its value.

Null operation if not yet connected (returns 0).

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

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

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

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.

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

References myFedMgr.

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

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

Return the observer list.

References myObservers.

Return the observer list.

References myObservers.

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

Assignment not implemented -- Assignment Not Allowed!

Get the RID parameters.

References myParams.

Referenced by setupConnection().

void DtRtiAmbassadorBaseImplementor::printDisabledService ( const MAKRti::DtString &  service) [protected, virtual]

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) [protected, virtual]
virtual void DtRtiAmbassadorBaseImplementor::throwInternalError ( const MAKRti::DtString &  errorMessage) const [protected, pure virtual]

Throw an RTI internal exception.

Referenced by completeConnection(), and setupConnection().

virtual void DtRtiAmbassadorBaseImplementor::throwNotConnected ( const MAKRti::DtString &  errorMessage) const [protected, pure 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 [protected, pure virtual]

Throw an RTI not joined exception.

Called from tick/evokeCallback: Ticks the federate manager.

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

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

References myConnectMgr, and throwNotConnected().

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

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

References 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

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

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

The printer which sends output to the assistant file.

Referenced by clearConnection(), and setupConnection().

Indicates callbacks enabled status.

MAKRti::DtClock DtRtiAmbassadorBaseImplementor::myClock [protected]

Clock used for timing.

The connection manager.

Referenced by clearConnection(), completeConnection(), and validatedConnectMgr().

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

The list of RTI Ambassador observers.

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

The plugin manager.

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

Referenced by completeConnection().


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)