MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes
DtFederationShadow Class Reference

Instances of DtFederationShadow implement a central server responsible for keeping track of the ownership status of the object instances owned by the federate or managed by its LRC. More...

+ Collaboration diagram for DtFederationShadow:

Public Member Functions

virtual ~DtFederationShadow ()
 Destructor. More...
 
virtual DtHandle federationHandle () const
 Get the federation handle. More...
 
virtual const MAKRti::DtString & name () const
 Get the federation name. More...
 
DtConnectionMgrconnectMgr ()
 Return the connection manager. More...
 
virtual DtFomModuleManagerfomManager ()
 Get the FOM Module Manager. More...
 
const DtRIDParametersparams () const
 Return the RID parameters. More...
 
virtual void checkVersion (const MAKRti::DtString &version) const
 Called by the ownership manager application to make sure that the RTI Version matches. More...
 
virtual void processUpdateNotifyLevel (DtNotifyLevelType level)
 Updates the notify level. More...
 
virtual void exit ()
 Causes the ownership manager to exit. More...
 
int processQuit ()
 User request to quit is processed. More...
 
virtual DtResignAction resignAction () const
 Get the federation resign action. More...
 
virtual void run ()
 main loop More...
 

Static Public Member Functions

static DtFederationShadowcreate (DtHandle federationHandle, const MAKRti::DtString &federationName, DtRIDParameters *p, std::shared_ptr< DtFilePrinter > logPrinter)
 Creates an instance of a DtFederationShadow;. More...
 
static void setCreatorFunction (DtFederationShadowCreator fn)
 Call this function to set an alternate creator function With this function, users can replace this DtFederationShadow with their own derived class. More...
 
static bool shutdownSignalCaught ()
 
static void caughtShutdownSignal ()
 
static const MAKRti::DtString & shutDownStatement ()
 String indicating federation shadow is shutting down. More...
 
static const MAKRti::DtString & readyStatement ()
 String indicating success to create the federation shadow. More...
 

Protected Types

typedef std::map< DtHandle,
DtFederateShadow * > 
FederateShadowByHandleMap
 

Protected Member Functions

 DtFederationShadow (DtHandle federationHandle, const MAKRti::DtString &federationName, DtRIDParameters *p, std::shared_ptr< DtFilePrinter > logPrinter)
 Constructor. More...
 
virtual DtFederateShadowfederateShadow (DtHandle federateHandle)
 Constructor - must use create method to construct an instance. More...
 
virtual void cleanupConstructorException ()
 Clean up before constructor throws an exception Not virtual since it is called by constructor. More...
 
virtual void wait (DtTime intervalInSeconds)
 Wait for input or until the the given interval expires. More...
 
virtual bool tick (bool noCallbacks=false)
 Work performed here for each cycle in main loop. More...
 
virtual void processJoinFoms (const DtJoinResponseMsg &msg)
 Initialize the FOM. More...
 
virtual void sendFederationShadowHandshakeMsg (DtHandle destinationId, DtFederationShadowHandshakeMsg::HandshakeStatus status)
 Send RTI Forwarder connection response msg. More...
 
virtual void federationShadowToForwarderHandshake ()
 Inform RTI Forwarder that federation shadow is connected. More...
 
DtFederateShadowfederate (DtFederateHandle federateHandle)
 Return the federate with the given handle; null if does not exist. More...
 

Protected Attributes

DtRIDParametersmyParams
 
std::shared_ptr< DtFilePrinter > myLogPrinter
 Printer which prints output to a log file. More...
 
DtConnectionMgrmyConnectionMgr
 
DtFomModuleManagermyFomManager
 The FOM Module Manager. More...
 
DtResignAction myResignAction
 Automatic resign action for federates that crash or forced to resign. More...
 
DtSynchronousFileDistributormyFomDistributor
 The Fed File Distributor of the joined federation execution. More...
 
DtClock myClock
 
DtHandle myFederationHandle
 
MAKRti::DtString myFederationName
 
DtFederationShadowHandshakeMsg::HandshakeStatus myHandshakeStatus
 
FederateShadowByHandleMap myFederatesByConnection
 List of federates. More...
 
FederateShadowByHandleMap myFederatesByHandle
 
bool myExitCommanded
 Flag indicating that an exit command was received. More...
 
bool myPendingQuit
 

Static Protected Attributes

static DtFederationShadowCreator theCreator
 
static bool theShutdownSignalCaught
 
static const MAKRti::DtString theShutDownStatement
 
static const MAKRti::DtString theReadyStatement
 
virtual void processFederationShadowHandshakeMsg (const DtFederationShadowHandshakeMsg &msg)
 Process Messages. More...
 
virtual void processFederationShadowShutdownMsg (const DtFederationShadowShutdownMsg &msg)
 Process Messages. More...
 
virtual void processCreateResponseMsg (const DtCreateResponseMsg &msg)
 Process Messages. More...
 
virtual void processJoinMsg (const DtJoinMsg &msg)
 Process Messages. More...
 
virtual void processJoinResponseMsg (const DtJoinResponseMsg &msg)
 Process Messages. More...
 
virtual void processJoinConfirm (const DtJoinConfirmMsg &msg)
 Process Messages. More...
 
virtual void processResign (const DtResignMsg &msg)
 Process Messages. More...
 
virtual void processResignDirective (const DtResignDirectiveMsg &msg)
 Process Messages. More...
 
virtual void processRegister (const DtRegObjMsg &msg)
 Process Messages. More...
 
virtual void processMultiRegister (const DtMultiRegObjMsg &msg)
 Process Messages. More...
 
virtual void processAssocPubReg (const DtAssocPubRegMsg &msg)
 Process Messages. More...
 
virtual void processDeleteRo (const DtDeleteRoMsg &msg)
 Process Messages. More...
 
virtual void processDeleteTso (const DtDeleteTsoMsg &msg)
 Process Messages. More...
 
virtual void processOwnership (const DtOwnershipMsg &msg)
 Process Messages. More...
 
static void processFederationShadowHandshakeMsg (const DtFederationShadowHandshakeMsg &msg, void *usr)
 Process Messages. More...
 
static void processFederationShadowShutdownMsg (const DtFederationShadowShutdownMsg &msg, void *usr)
 Process Messages. More...
 
static void processCreateResponseMsg (const DtCreateResponseMsg &msg, void *usr)
 Process Messages. More...
 
static void processJoinMsg (const DtJoinMsg &msg, void *usr)
 Process Messages. More...
 
static void processJoinResponseMsg (const DtJoinResponseMsg &msg, void *usr)
 Process Messages. More...
 
static void processJoinConfirm (const DtJoinConfirmMsg &msg, void *usr)
 Process Messages. More...
 
static void processResign (const DtResignMsg &msg, void *usr)
 Process Messages. More...
 
static void processResignDirective (const DtResignDirectiveMsg &msg, void *usr)
 Process Messages. More...
 
static void processRegister (const DtRegObjMsg &msg, void *usr)
 Process Messages. More...
 
static void processMultiRegister (const DtMultiRegObjMsg &msg, void *usr)
 Process Messages. More...
 
static void processAssocPubReg (const DtAssocPubRegMsg &msg, void *usr)
 Process Messages. More...
 
static void processDeleteRo (const DtDeleteRoMsg &msg, void *usr)
 Process Messages. More...
 
static void processDeleteTso (const DtDeleteTsoMsg &msg, void *usr)
 Process Messages. More...
 
static void processOwnership (const DtOwnershipMsg &msg, void *usr)
 Process Messages. More...
 

Detailed Description

Instances of DtFederationShadow implement a central server responsible for keeping track of the ownership status of the object instances owned by the federate or managed by its LRC.

In the case where a federate is lost or forced to resign, the federation shadow will act on behalf of the federate to carry out the federation's automatic resign directive (e.g., delete objects and release attributes).

Member Typedef Documentation

Constructor & Destructor Documentation

DtFederationShadow::DtFederationShadow ( DtHandle  federationHandle,
const MAKRti::DtString &  federationName,
DtRIDParameters p,
std::shared_ptr< DtFilePrinter >  logPrinter 
)
protected

Constructor.

virtual DtFederationShadow::~DtFederationShadow ( )
virtual

Destructor.

Member Function Documentation

static void DtFederationShadow::caughtShutdownSignal ( )
static
virtual void DtFederationShadow::checkVersion ( const MAKRti::DtString &  version) const
virtual

Called by the ownership manager application to make sure that the RTI Version matches.

virtual void DtFederationShadow::cleanupConstructorException ( )
protectedvirtual

Clean up before constructor throws an exception Not virtual since it is called by constructor.

DtConnectionMgr * DtFederationShadow::connectMgr ( )
inline

Return the connection manager.

References myConnectionMgr.

static DtFederationShadow* DtFederationShadow::create ( DtHandle  federationHandle,
const MAKRti::DtString &  federationName,
DtRIDParameters p,
std::shared_ptr< DtFilePrinter >  logPrinter 
)
static

Creates an instance of a DtFederationShadow;.

virtual void DtFederationShadow::exit ( )
virtual

Causes the ownership manager to exit.

DtFederateShadow * DtFederationShadow::federate ( DtFederateHandle  federateHandle)
inlineprotected

Return the federate with the given handle; null if does not exist.

References myFederatesByHandle.

virtual DtFederateShadow* DtFederationShadow::federateShadow ( DtHandle  federateHandle)
protectedvirtual

Constructor - must use create method to construct an instance.

virtual DtHandle DtFederationShadow::federationHandle ( ) const
virtual

Get the federation handle.

virtual void DtFederationShadow::federationShadowToForwarderHandshake ( )
protectedvirtual

Inform RTI Forwarder that federation shadow is connected.

virtual DtFomModuleManager* DtFederationShadow::fomManager ( )
virtual

Get the FOM Module Manager.

virtual const MAKRti::DtString& DtFederationShadow::name ( ) const
virtual

Get the federation name.

const DtRIDParameters & DtFederationShadow::params ( ) const
inline

Return the RID parameters.

References myParams.

virtual void DtFederationShadow::processAssocPubReg ( const DtAssocPubRegMsg &  msg)
protectedvirtual

Process Messages.

static void DtFederationShadow::processAssocPubReg ( const DtAssocPubRegMsg &  msg,
void *  usr 
)
staticprotected

Process Messages.

virtual void DtFederationShadow::processCreateResponseMsg ( const DtCreateResponseMsg msg)
protectedvirtual

Process Messages.

static void DtFederationShadow::processCreateResponseMsg ( const DtCreateResponseMsg msg,
void *  usr 
)
staticprotected

Process Messages.

virtual void DtFederationShadow::processDeleteRo ( const DtDeleteRoMsg msg)
protectedvirtual

Process Messages.

static void DtFederationShadow::processDeleteRo ( const DtDeleteRoMsg msg,
void *  usr 
)
staticprotected

Process Messages.

virtual void DtFederationShadow::processDeleteTso ( const DtDeleteTsoMsg &  msg)
protectedvirtual

Process Messages.

static void DtFederationShadow::processDeleteTso ( const DtDeleteTsoMsg &  msg,
void *  usr 
)
staticprotected

Process Messages.

static void DtFederationShadow::processFederationShadowHandshakeMsg ( const DtFederationShadowHandshakeMsg msg,
void *  usr 
)
staticprotected

Process Messages.

virtual void DtFederationShadow::processFederationShadowHandshakeMsg ( const DtFederationShadowHandshakeMsg msg)
protectedvirtual

Process Messages.

virtual void DtFederationShadow::processFederationShadowShutdownMsg ( const DtFederationShadowShutdownMsg msg)
protectedvirtual

Process Messages.

static void DtFederationShadow::processFederationShadowShutdownMsg ( const DtFederationShadowShutdownMsg msg,
void *  usr 
)
staticprotected

Process Messages.

virtual void DtFederationShadow::processJoinConfirm ( const DtJoinConfirmMsg msg)
protectedvirtual

Process Messages.

static void DtFederationShadow::processJoinConfirm ( const DtJoinConfirmMsg msg,
void *  usr 
)
staticprotected

Process Messages.

virtual void DtFederationShadow::processJoinFoms ( const DtJoinResponseMsg msg)
protectedvirtual

Initialize the FOM.

virtual void DtFederationShadow::processJoinMsg ( const DtJoinMsg msg)
protectedvirtual

Process Messages.

static void DtFederationShadow::processJoinMsg ( const DtJoinMsg msg,
void *  usr 
)
staticprotected

Process Messages.

virtual void DtFederationShadow::processJoinResponseMsg ( const DtJoinResponseMsg msg)
protectedvirtual

Process Messages.

static void DtFederationShadow::processJoinResponseMsg ( const DtJoinResponseMsg msg,
void *  usr 
)
staticprotected

Process Messages.

virtual void DtFederationShadow::processMultiRegister ( const DtMultiRegObjMsg msg)
protectedvirtual

Process Messages.

static void DtFederationShadow::processMultiRegister ( const DtMultiRegObjMsg msg,
void *  usr 
)
staticprotected

Process Messages.

virtual void DtFederationShadow::processOwnership ( const DtOwnershipMsg msg)
protectedvirtual

Process Messages.

static void DtFederationShadow::processOwnership ( const DtOwnershipMsg msg,
void *  usr 
)
staticprotected

Process Messages.

int DtFederationShadow::processQuit ( )

User request to quit is processed.

If there are no federations, quit is granted immediately. Otherwise, a pending quit status is set to true and the user is prompted to confirm the quit request. Return -1 if quit should be granted immediately.

virtual void DtFederationShadow::processRegister ( const DtRegObjMsg msg)
protectedvirtual

Process Messages.

static void DtFederationShadow::processRegister ( const DtRegObjMsg msg,
void *  usr 
)
staticprotected

Process Messages.

virtual void DtFederationShadow::processResign ( const DtResignMsg msg)
protectedvirtual

Process Messages.

static void DtFederationShadow::processResign ( const DtResignMsg msg,
void *  usr 
)
staticprotected

Process Messages.

virtual void DtFederationShadow::processResignDirective ( const DtResignDirectiveMsg msg)
protectedvirtual

Process Messages.

static void DtFederationShadow::processResignDirective ( const DtResignDirectiveMsg msg,
void *  usr 
)
staticprotected

Process Messages.

virtual void DtFederationShadow::processUpdateNotifyLevel ( DtNotifyLevelType  level)
virtual

Updates the notify level.

static const MAKRti::DtString& DtFederationShadow::readyStatement ( )
static

String indicating success to create the federation shadow.

virtual DtResignAction DtFederationShadow::resignAction ( ) const
virtual

Get the federation resign action.

virtual void DtFederationShadow::run ( )
virtual

main loop

virtual void DtFederationShadow::sendFederationShadowHandshakeMsg ( DtHandle  destinationId,
DtFederationShadowHandshakeMsg::HandshakeStatus  status 
)
protectedvirtual

Send RTI Forwarder connection response msg.

static void DtFederationShadow::setCreatorFunction ( DtFederationShadowCreator  fn)
static

Call this function to set an alternate creator function With this function, users can replace this DtFederationShadow with their own derived class.

static bool DtFederationShadow::shutdownSignalCaught ( )
static
static const MAKRti::DtString& DtFederationShadow::shutDownStatement ( )
static

String indicating federation shadow is shutting down.

virtual bool DtFederationShadow::tick ( bool  noCallbacks = false)
protectedvirtual

Work performed here for each cycle in main loop.

Primarily processing messages and ticking each federation execution. Returns boolean: tick processed a message? If noCallbacks is true, no tick callbacks will be called

virtual void DtFederationShadow::wait ( DtTime  intervalInSeconds)
protectedvirtual

Wait for input or until the the given interval expires.

Member Data Documentation

DtClock DtFederationShadow::myClock
protected
DtConnectionMgr* DtFederationShadow::myConnectionMgr
protected

Referenced by connectMgr().

bool DtFederationShadow::myExitCommanded
protected

Flag indicating that an exit command was received.

FederateShadowByHandleMap DtFederationShadow::myFederatesByConnection
protected

List of federates.

FederateShadowByHandleMap DtFederationShadow::myFederatesByHandle
protected

Referenced by federate().

DtHandle DtFederationShadow::myFederationHandle
protected
MAKRti::DtString DtFederationShadow::myFederationName
protected
DtSynchronousFileDistributor* DtFederationShadow::myFomDistributor
protected

The Fed File Distributor of the joined federation execution.

DtFomModuleManager* DtFederationShadow::myFomManager
protected

The FOM Module Manager.

DtFederationShadowHandshakeMsg::HandshakeStatus DtFederationShadow::myHandshakeStatus
protected
std::shared_ptr<DtFilePrinter> DtFederationShadow::myLogPrinter
protected

Printer which prints output to a log file.

DtRIDParameters* DtFederationShadow::myParams
protected

Referenced by params().

bool DtFederationShadow::myPendingQuit
protected
DtResignAction DtFederationShadow::myResignAction
protected

Automatic resign action for federates that crash or forced to resign.

DtFederationShadowCreator DtFederationShadow::theCreator
staticprotected
const MAKRti::DtString DtFederationShadow::theReadyStatement
staticprotected
bool DtFederationShadow::theShutdownSignalCaught
staticprotected
const MAKRti::DtString DtFederationShadow::theShutDownStatement
staticprotected

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

Document ID: Generated on Sun Jul 20 16:15:30 EDT 2025 from SVN revision 277985
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)