![]() |
MAK RTIspy API Documentation for HLA 1.3
|
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 DtFedAmbWrapper * | removeFedAmbWrapper (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 DtRIDParameters * | params () |
| Get the RID parameters. | |
| virtual DtFederateMgr * | validatedFedMgr () |
| Get the federate mgr Will throw RTI Exception if not initialized. | |
| virtual DtFederateMgr * | nakedFedMgr () |
| Get the federate mgr Returns even when not initialized (with null) | |
| virtual DtConnectionMgr * | validatedConnectMgr () |
| Get the connection mgr Will throw RTI Exception if not initialized. | |
| virtual DtConnectionMgr * | nakedConnectMgr () |
| Get the connection mgr Returns even when not initialized (with null) | |
| virtual DtObjectMgr * | objMgr () |
| Get the object mgr If the LRC is unjoined, this will return NULL. | |
| virtual DtInteractionMgr * | interMgr () |
| Get the interaction mgr If the LRC is unjoined, this will return NULL. | |
| virtual DtFomClassMgr * | fomMgr () |
| Get the fom mgr If the LRC is unjoined, this will return NULL. | |
| virtual DtRtiAmbObserverList * | observers () |
| 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 DtFederateMgr * | validateIsJoined (const MAKRti::DtString &serviceCallName) |
| Validate that federate is joined. | |
| virtual const DtFederateMgr * | validateIsJoined (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 | |
| DtRIDParameters * | myParams |
| The RTI initialization parameters. | |
| DtConnectionMgr * | myConnectMgr |
| The connection manager. | |
| DtFederateMgr * | myFedMgr |
| The federate manager. | |
| DtRtiPluginManager * | myPluginMgr |
| The plugin manager. | |
| DtRtiAmbObserverList * | myObservers |
| The list of RTI Ambassador observers. | |
| DtRtiAmbObserverList * | myEmptyObserverList |
| 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! | |
| DtRtiAmbassadorBaseImplementor & | operator= (DtRtiAmbassadorBaseImplementor const &) |
| Assignment not implemented – Assignment Not Allowed! | |
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.
|
protected |
|
protected |
Abstract class, do not instantiate.
References myEmptyObserverList.
|
virtual |
Destructor.
References clearConnection(), and myEmptyObserverList.
|
private |
Copy Constructor not implemented – Copy Not Allowed!
|
virtual |
Add/Remove federate wrappers to the LRC's federate wrapper list.
References DtConnectionMgr::addFedAmbWrapper(), and validatedConnectMgr().
|
virtual |
Add/Remove observers to the LRC's observer list.
References DtRtiAmbObserverList::addObserver(), and myObservers.
|
protectedvirtual |
Remove the connection.
References isConnected(), myAssistantClient, myAssistantPrinter, myConnectMgr, myFedMgr, myLogPrinter, myObservers, myParams, myPluginMgr, netMsgRsp(), shutdown(), and uninitControl().
Referenced by completeConnection(), setupConnection(), and ~DtRtiAmbassadorBaseImplementor().
|
protectedvirtual |
Complete the connection infrastructure Throws if there is a fatal failure Returns boolean: connection completed successfully? If not it is possible to try again.
Error message provided if recoverable failure occurs
References clearConnection(), DtSimpleFederateMgr::create(), DtConnectionMgr::create(), DtFederateMgr::create(), DtRtiExecFederateMgr::create(), DtRIDParameters::dumpRid, myAssistantClient, myConnectMgr, myFedMgr, myParams, myUseBusyWaitForTick, performMulticastDiscovery(), DtRIDParameters::printParameters(), DtFederateMgr::setInternalCreatorFunction(), throwInternalError(), DtRIDParameters::useBusyWaitForTickMinMax, and DtRIDParameters::useRtiExec.
Referenced by enterServiceCall().
|
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().
|
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().
|
virtual |
Finish a service call.
References DtConnectionMgr::exitServiceCall(), and validatedConnectMgr().
| unsigned long DtRtiAmbassadorBaseImplementor::flags | ( | ) | const |
References myFlags.
|
virtual |
Get the fom mgr If the LRC is unjoined, this will return NULL.
References DtFederateMgr::fom(), and validatedFedMgr().
|
protectedvirtual |
Increment the service call count and return its value.
Null operation if not yet connected (returns 0).
References DtConnectionMgr::incrementServiceCallCount(), and validatedConnectMgr().
|
virtual |
Get the interaction mgr If the LRC is unjoined, this will return NULL.
References DtFederateMgr::interMgr(), and validatedFedMgr().
|
virtual |
Is the connection completed?
References myFedMgr.
Referenced by clearConnection(), and enterServiceCall().
|
virtual |
Get the printer which prints output to the log file.
References myLogPrinter.
|
virtual |
Get the connection mgr Returns even when not initialized (with null)
References myConnectMgr.
|
virtual |
Get the federate mgr Returns even when not initialized (with null)
References myFedMgr.
|
virtual |
Get the object mgr If the LRC is unjoined, this will return NULL.
References DtFederateMgr::objMgr(), and validatedFedMgr().
|
virtual |
Return the observer list.
References myEmptyObserverList, and myObservers.
|
virtual |
Return the observer list.
References myEmptyObserverList, and myObservers.
|
private |
Assignment not implemented – Assignment Not Allowed!
|
virtual |
|
protectedvirtual |
Attempt to automatically detect the RTI Forwarder (or RTI Exec) Returns false if not found.
References DtMulitcastDiscoveryMgr::discover(), DtMulticastDiscoveryMsg::DtDiscoverTcpForwarder, DtRIDParameters::DtFomTransportTypeUseBestEffort, DtMulitcastDiscoveryMgr::init(), myParams, DtRIDParameters::setTcpForwarderAddr(), DtRIDParameters::tcpForwarderAddrString(), and DtRIDParameters::useRtiExec.
Referenced by completeConnection().
|
protectedvirtual |
Print a disabled service.
References myParams.
|
virtual |
References DtConnectionMgr::removeFedAmbWrapper(), and validatedConnectMgr().
|
virtual |
References myObservers, and DtRtiAmbObserverList::removeObserver().
|
protectedvirtual |
Establish preliminary connection configuration and infrastructure.
References clearConnection(), DtSmConnectionMgr::create(), DtAsyncConnectionMgr::create(), determineClientAndServerPorts(), DtRIDParameters::DtAsynchronousCallbacks, DtRIDParameters::DtAsynchronousMode, DtEvokedCallbacks, DtRIDParameters::DtFomTransportTypeUseFomSettings, DtImmediateCallbacks, DtRIDParameters::DtSynchronousMode, initControl(), isControlEnabled(), lm, logFileDirectory, logFileName, myAssistantClient, myAssistantPrinter, myFlags, myLogPrinter, myObservers, myParams, netFedRsp(), netMsgRsp(), params(), DtRIDParameters::resolveAbsoluteFileLocation(), DtConnectionMgr::setInternalCreatorFunction(), tcpPort, and throwInternalError().
|
protectedvirtual |
Prepare asynchronous connection for shutdown.
References DtConnectionMgr::isShuttingDown(), myConnectMgr, DtConnectionMgr::shutdown(), and DtConnectionMgr::yield().
Referenced by clearConnection().
|
protectedpure virtual |
Throw an RTI internal exception.
Referenced by completeConnection(), and setupConnection().
|
protectedpure virtual |
Throw an RTI not connected exception (internal for 1.3 & 1516)
Referenced by enterServiceCall(), validatedConnectMgr(), and validatedFedMgr().
|
protectedpure virtual |
Throw an RTI not joined exception.
|
protectedvirtual |
Called from tick/evokeCallback: Ticks the federate manager.
References DtFederateMgr::tick(), and validatedFedMgr().
|
virtual |
Get the connection mgr Will throw RTI Exception if not initialized.
References myConnectMgr, and throwNotConnected().
Referenced by addFedAmbWrapper(), enterServiceCall(), exitServiceCall(), incrementServiceCallCount(), and removeFedAmbWrapper().
|
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 |
Validate that federate is joined.
If not valid, throw not joined exception. Return the federate manager if everything is OK
|
virtual |
Validate that federate is joined.
If not valid, throw not joined exception. Return the federate manager if everything is OK
|
protected |
The assistant client. We cache it until we're initialized.
Referenced by clearConnection(), completeConnection(), enableLogging(), and setupConnection().
|
protected |
The printer which sends output to the assistant file.
Referenced by clearConnection(), and setupConnection().
|
protected |
Indicates callbacks enabled status.
|
protected |
Clock used for timing.
|
protected |
The connection manager.
Referenced by clearConnection(), completeConnection(), nakedConnectMgr(), shutdown(), and validatedConnectMgr().
|
protected |
The empty list.
Referenced by DtRtiAmbassadorBaseImplementor(), observers(), and ~DtRtiAmbassadorBaseImplementor().
|
protected |
The federate manager.
Referenced by clearConnection(), completeConnection(), isConnected(), nakedFedMgr(), and validatedFedMgr().
|
protected |
Referenced by flags(), and setupConnection().
|
protected |
The printer which prints output to the log file.
Referenced by clearConnection(), enableLogging(), logPrinter(), and setupConnection().
|
protected |
The list of RTI Ambassador observers.
Referenced by addObserver(), clearConnection(), observers(), removeObserver(), and setupConnection().
|
protected |
The RTI initialization parameters.
Referenced by clearConnection(), completeConnection(), params(), performMulticastDiscovery(), printDisabledService(), and setupConnection().
|
protected |
The plugin manager.
Referenced by clearConnection().
|
protected |
Referenced by completeConnection().