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 Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions
DtInteractionMgr Class Reference

Instances of DtInteractionMgr manage the sending and receiving of interactions. More...

+ Collaboration diagram for DtInteractionMgr:

Public Types

typedef DtInteractionMgr *(* DtInteractionMgrCreator )(DtFederateMgr *fedMgr)
 Creator function.

Public Member Functions

virtual ~DtInteractionMgr ()
 Destructor.
virtual void postJoinInit ()
 Post join processing. All managers shall have been created and initialized.
virtual bool isPostJoined () const
 Return bool: Was the post join initialization perfomerd?
virtual void publish (DtInteractionClassHandle theInteraction)
 Process publish service call.
virtual void unpublish (DtInteractionClassHandle theInteraction)
 Process unpublish service call.
virtual void subscribe (DtInteractionClassHandle theClass, bool active)
 Process subscribe service call.
virtual void unsubscribe (DtInteractionClassHandle theClass)
 Process unsubscribe service call.
virtual unsigned long send (DtInteractionClassHandle theInteraction, const DtPhvps &params, RTI::FedTime const *theTime, const char *theTag, DtHandle channel, bool anonymous=false)
 Process send interaction service call.
MAKRti::DtTransportType getTransport (DtInteractionClassHandle theClass)
 Get the transport for the given class.
virtual void setTransport (DtInteractionClassHandle theClass, MAKRti::DtTransportType theType)
 Set the transport for the given class.
virtual void setOrder (DtInteractionClassHandle theClass, MAKRti::DtOrderType theType)
 Set the order for the given class.
virtual int acceptInteraction (const DtInteractionMsg &msg)
 DDM.
virtual int subscribed (DtInteractionClassHandle handle)
 Returns 1 if subscribed to the class, 0 otherwise Assumes handle is defined.
virtual int published (DtInteractionClassHandle handle)
 Returns 1 if published the class, 0 otherwise Assumes handle is defined.
virtual int subscribed (DtInteractionClassInfo *classDesc)
 Returns 1 if subscribed to the class, 0 otherwise Assumes handle is defined.
virtual int evaluateSubscription (DtRtiMsg const &msg)
 Determine if message is interaction and if so, is it subscribed e.g., would be delivered if processed Returns -1 if not an interaction, 0 if no delivery expected, 1 if delivery expected.
virtual void sendSubscribeMsg (DtInteractionClassHandle theInter, bool isPassive, DtFederateHandle fedHandle)
 Send subscribe interaction message.
virtual void sendSubscribeMsg (DtInteractionClassHandle theInter, bool isPassive, DtBitMask *sendMask=0)
virtual void sendPublishMsg (DtInteractionClassHandle theInter)
 Send publish interaction message.
virtual void sendUnsubscribeMsg (DtInteractionClassHandle theInter, bool forSmartForwarding=false)
 Send unsubscribe interaction message.
virtual void sendUnpublishMsg (DtInteractionClassHandle theInter)
 Send unpublish interaction message.
virtual void sendInteractionMsg (DtInteractionClassHandle theClass, const DtPhvps &theParams, MAKRti::DtTransportType transportType, MAKRti::DtOrderType orderType, RTI::FedTime const *theTime, const char *theTag, unsigned long serialNumber, DtHandle channel, bool anonymous=false)
 Send interaction message.
virtual void addPendingStartInters (DtInteractionClassHandle theClass)
 Add a turnOn/OffInteractions call that should be made in the next tick call.
virtual void addPendingStopInters (DtInteractionClassHandle theClass)
virtual void sendPendingStartInters ()
 Send pending turnOn/OffInteractions.
virtual void sendPendingStopInters ()
virtual void sendPendingSubscription ()
 Send/add pending subscription class retransmissions that will get sent during next tick.
virtual void addPendingSubscription (DtObjectClassHandle theClass, bool isPassive, DtFederateHandle fedHandle=0)
virtual void sendPendingUnsubscription ()
 Send/add pending unsubscription class retransmissions that will get sent during next tick.
virtual void addPendingUnsubscription (DtObjectClassHandle theClass, bool forSmartForwarding)
virtual void preTick ()
 Called before processing messages in RTI ambassador tick / evoke callbacks.
virtual void postTick ()
 Called after processing messages in RTI ambassador tick / evoke callbacks.
virtual void processResign (const DtResignMsg &msg)
 Process resign message.
virtual DtInteractionClassInfofirstSubscribedClass (DtInteractionClassInfo *classDesc)
 Returns most specific superclass of class, to which we are subscribed.
void enableRelevanceAdvisorySwitch ()
 Enable/Disable interactionRelevanceAdvisorySwitch 1516 throws exception if call is redundant.
void disableRelevanceAdvisorySwitch ()
void setRelevanceAdvisorySwitch (bool enableSwitch)
 Set/Get value of interactionRelevanceAdvisorySwitch.
bool relevanceAdvisorySwitch ()
virtual MAKRti::DtInetAddr localAddrMap (DtInteractionClassHandle theClass, DtHandle theChannel)
 Map the class and channel to a multicast address.
virtual bool save (DtRtiSaveFile &file)
 Save the state information to the given file.
virtual void prepareToRestore ()
 Prepare the state information to be restored (i.e., clear out existing data).
virtual bool restore (DtRtiSaveFile &file)
 Restore the state information from the given file.
DtFederateMgrfederateMgr ()
 Access the federate manager.
DtFederateMgrfederateMgr () const
DtConnectionMgrconnectMgr ()
 Access the connection manager.
DtConnectionMgrconnectMgr () const
DtRIDParametersparams ()
 Access the RID parameters.
DtRIDParametersparams () const
DtFomClassMgrfom ()
 Access the fom manager.
DtFomClassMgrfom () const

Static Public Member Functions

static DtInteractionMgrcreate (DtFederateMgr *fedMgrPtr)
 A Interaction Manager instance is created and its pointer is returned.
static void setCreatorFunction (DtInteractionMgrCreator fn)
 Register a creator function.
static void setInternalCreatorFunction (DtInteractionMgrCreator fn)
 Register alternate internal creators.

Protected Types

typedef std::map
< DtObjectClassHandle,
DtBitMask * > 
DtObjectClassMaskMap

Protected Member Functions

 DtInteractionMgr (DtFederateMgr *fedMgr)
 Constructor.
void fastIncrementSentTally (DtInteractionClassHandle classHandle, MAKRti::DtTransportType transport)
void fastIncrementReceivedTally (DtInteractionClassHandle classHandle, MAKRti::DtTransportType transport)
virtual void processInteraction (const DtInteractionMsg &msg)
 Message callbacks called from registered callbacks.
virtual void processPub (const DtPubInterMsg &msg)
virtual void processUnpub (const DtUnpubInterMsg &msg)
virtual void processSub (const DtSubInterMsg &msg)
virtual void processUnsub (const DtUnsubInterMsg &msg)
virtual void addClassMulticast (DtInteractionClassInfo *classDesc)
 Recursively add and remove the DM multicast address of this class and all its subclasses.
virtual void removeClassMulticast (DtInteractionClassInfo *classDesc)
virtual void destroyInteractionLists ()
 DDM.

Static Protected Member Functions

static void processInteraction (const DtInteractionMsg &msg, void *usr)
 Message callback methods to register with connection manager The class instance is expected for user data.
static void processPub (const DtPubInterMsg &msg, void *usr)
static void processUnpub (const DtUnpubInterMsg &msg, void *usr)
static void processSub (const DtSubInterMsg &msg, void *usr)
static void processUnsub (const DtUnsubInterMsg &msg, void *usr)

Protected Attributes

DtFederateMgrmyFederateMgr
 Access to the federate manager.
bool myIsJoined
 Manager has performed join processing.
MAKRti::DtList myPendingStartIntersList
 Pending start/stop interactions.
MAKRti::DtList myPendingStopIntersList
std::set< DtRtiMsgKindmyConstrainedInteractionKinds
bool myRelevanceSwitch
 Indicates whether relevance advisory is enabled.
std::set< DtObjectClassHandlemyRetransmitSubClass
 Set of class subscriptions to retransmit.
DtObjectClassMaskMap myRetransmitSubClassMask
std::set< DtObjectClassHandlemyRetransmitPassiveSubClass
std::set< DtObjectClassHandlemyRetransmitUnsubClass
 Set of class unsubscriptions to retransmit.
std::set< DtObjectClassHandlemyRetransmitUnsubClassForSmartForwarding

Static Protected Attributes

static DtInteractionMgrCreator theCreator = 0
 The plugin creator.
static DtInteractionMgrCreator theInternalCreator = 0
 The internal creator.

Private Member Functions

 DtInteractionMgr (DtInteractionMgr const &other)
 Copy constructor not implemented – Copy not allowed!
DtInteractionMgroperator= (DtInteractionMgr const &other)
 Assignment operator not implemented – Assignment not allowed!

Detailed Description

Instances of DtInteractionMgr manage the sending and receiving of interactions.

This class also handles subscription and publication information.

Member Typedef Documentation

typedef DtInteractionMgr*(* DtInteractionMgr::DtInteractionMgrCreator)(DtFederateMgr *fedMgr)

Creator function.

Constructor & Destructor Documentation

DtInteractionMgr::DtInteractionMgr ( DtFederateMgr fedMgr)
protected
DtInteractionMgr::~DtInteractionMgr ( )
virtual
DtInteractionMgr::DtInteractionMgr ( DtInteractionMgr const &  other)
private

Copy constructor not implemented – Copy not allowed!

Member Function Documentation

int DtInteractionMgr::acceptInteraction ( const DtInteractionMsg msg)
virtual

DDM.

Return true if the interaction should be processed

References connectMgr(), DtRtiMsg::federateHandle(), and DtConnectionMgr::fedHandle().

Referenced by processInteraction().

void DtInteractionMgr::addClassMulticast ( DtInteractionClassInfo classDesc)
protectedvirtual
void DtInteractionMgr::addPendingStartInters ( DtInteractionClassHandle  theClass)
virtual

Add a turnOn/OffInteractions call that should be made in the next tick call.

If relevanceAdvisorySwitch is false, it's a no-op.

References myPendingStartIntersList, and relevanceAdvisorySwitch().

Referenced by DtInteractionClassInfo::publish(), and DtInteractionClassInfo::updateRelevance().

void DtInteractionMgr::addPendingStopInters ( DtInteractionClassHandle  theClass)
virtual
void DtInteractionMgr::addPendingSubscription ( DtObjectClassHandle  theClass,
bool  isPassive,
DtFederateHandle  fedHandle = 0 
)
virtual
void DtInteractionMgr::addPendingUnsubscription ( DtObjectClassHandle  theClass,
bool  forSmartForwarding 
)
virtual
DtConnectionMgr * DtInteractionMgr::connectMgr ( )
DtConnectionMgr * DtInteractionMgr::connectMgr ( ) const
DtInteractionMgr * DtInteractionMgr::create ( DtFederateMgr fedMgrPtr)
static

A Interaction Manager instance is created and its pointer is returned.

A registered creator is used if present; otherwise, an internal class is instantiated.

References DtInteractionMgr(), theCreator, and theInternalCreator.

Referenced by setCreatorFunction(), and setInternalCreatorFunction().

void DtInteractionMgr::destroyInteractionLists ( )
protectedvirtual

DDM.

Destroy processing lists

Referenced by ~DtInteractionMgr().

void DtInteractionMgr::disableRelevanceAdvisorySwitch ( )
void DtInteractionMgr::enableRelevanceAdvisorySwitch ( )

Enable/Disable interactionRelevanceAdvisorySwitch 1516 throws exception if call is redundant.

References relevanceAdvisorySwitch(), and setRelevanceAdvisorySwitch().

int DtInteractionMgr::evaluateSubscription ( DtRtiMsg const &  msg)
virtual

Determine if message is interaction and if so, is it subscribed e.g., would be delivered if processed Returns -1 if not an interaction, 0 if no delivery expected, 1 if delivery expected.

References firstSubscribedClass(), fom(), DtInteractionMsg::handle(), DtFomClassMgr::interactionByHandle(), DtRtiMsg::msgKind(), and myConstrainedInteractionKinds.

Referenced by DtRtiMsgQueue::evaluateSubscription().

void DtInteractionMgr::fastIncrementReceivedTally ( DtInteractionClassHandle  classHandle,
MAKRti::DtTransportType  transport 
)
protected

References params().

Referenced by processInteraction().

void DtInteractionMgr::fastIncrementSentTally ( DtInteractionClassHandle  classHandle,
MAKRti::DtTransportType  transport 
)
protected

References params().

Referenced by sendInteractionMsg().

DtFederateMgr * DtInteractionMgr::federateMgr ( )

Access the federate manager.

References myFederateMgr.

Referenced by connectMgr(), fom(), params(), and processInteraction().

DtFederateMgr * DtInteractionMgr::federateMgr ( ) const

References myFederateMgr.

DtInteractionClassInfo * DtInteractionMgr::firstSubscribedClass ( DtInteractionClassInfo classDesc)
virtual

Returns most specific superclass of class, to which we are subscribed.

References DtInteractionClassInfo::baseClass(), NULL, and subscribed().

Referenced by evaluateSubscription(), and processInteraction().

DtFomClassMgr * DtInteractionMgr::fom ( )
DtFomClassMgr * DtInteractionMgr::fom ( ) const
MAKRti::DtTransportType DtInteractionMgr::getTransport ( DtInteractionClassHandle  theClass)
bool DtInteractionMgr::isPostJoined ( ) const
virtual

Return bool: Was the post join initialization perfomerd?

References myIsJoined.

MAKRti::DtInetAddr DtInteractionMgr::localAddrMap ( DtInteractionClassHandle  theClass,
DtHandle  theChannel 
)
virtual

Map the class and channel to a multicast address.

References DtInteractionClassInfo::destinationAddress(), fom(), and DtFomClassMgr::interactionByHandle().

Referenced by sendInteractionMsg().

DtInteractionMgr& DtInteractionMgr::operator= ( DtInteractionMgr const &  other)
private

Assignment operator not implemented – Assignment not allowed!

DtRIDParameters * DtInteractionMgr::params ( )
DtRIDParameters * DtInteractionMgr::params ( ) const
void DtInteractionMgr::postJoinInit ( )
virtual

Post join processing. All managers shall have been created and initialized.

References myIsJoined.

void DtInteractionMgr::postTick ( )
virtual

Called after processing messages in RTI ambassador tick / evoke callbacks.

References sendPendingStartInters(), sendPendingStopInters(), sendPendingSubscription(), and sendPendingUnsubscription().

Referenced by DtFederateMgr::posttick().

void DtInteractionMgr::prepareToRestore ( )
virtual

Prepare the state information to be restored (i.e., clear out existing data).

Referenced by DtRtiExecFederateMgr::prepareToRestoreLRC().

void DtInteractionMgr::preTick ( )
virtual

Called before processing messages in RTI ambassador tick / evoke callbacks.

Referenced by DtFederateMgr::pretick().

void DtInteractionMgr::processInteraction ( const DtInteractionMsg msg)
protectedvirtual
void DtInteractionMgr::processInteraction ( const DtInteractionMsg msg,
void *  usr 
)
staticprotected

Message callback methods to register with connection manager The class instance is expected for user data.

void DtInteractionMgr::processPub ( const DtPubInterMsg msg)
protectedvirtual
void DtInteractionMgr::processPub ( const DtPubInterMsg msg,
void *  usr 
)
staticprotected
void DtInteractionMgr::processResign ( const DtResignMsg msg)
virtual
void DtInteractionMgr::processSub ( const DtSubInterMsg msg)
protectedvirtual
void DtInteractionMgr::processSub ( const DtSubInterMsg msg,
void *  usr 
)
staticprotected
void DtInteractionMgr::processUnpub ( const DtUnpubInterMsg msg)
protectedvirtual
void DtInteractionMgr::processUnpub ( const DtUnpubInterMsg msg,
void *  usr 
)
staticprotected
void DtInteractionMgr::processUnsub ( const DtUnsubInterMsg msg)
protectedvirtual
void DtInteractionMgr::processUnsub ( const DtUnsubInterMsg msg,
void *  usr 
)
staticprotected
void DtInteractionMgr::publish ( DtInteractionClassHandle  theInteraction)
virtual
int DtInteractionMgr::published ( DtInteractionClassHandle  handle)
virtual

Returns 1 if published the class, 0 otherwise Assumes handle is defined.

References fom(), DtFomClassMgr::interactionByHandle(), and DtInteractionClassInfo::published().

bool DtInteractionMgr::relevanceAdvisorySwitch ( )
void DtInteractionMgr::removeClassMulticast ( DtInteractionClassInfo classDesc)
protectedvirtual
bool DtInteractionMgr::restore ( DtRtiSaveFile file)
virtual
bool DtInteractionMgr::save ( DtRtiSaveFile file)
virtual
unsigned long DtInteractionMgr::send ( DtInteractionClassHandle  theInteraction,
const DtPhvps &  params,
RTI::FedTime const *  theTime,
const char *  theTag,
DtHandle  channel,
bool  anonymous = false 
)
virtual
void DtInteractionMgr::sendInteractionMsg ( DtInteractionClassHandle  theClass,
const DtPhvps &  theParams,
MAKRti::DtTransportType  transportType,
MAKRti::DtOrderType  orderType,
RTI::FedTime const *  theTime,
const char *  theTag,
unsigned long  serialNumber,
DtHandle  channel,
bool  anonymous = false 
)
virtual
void DtInteractionMgr::sendPendingStartInters ( )
virtual
void DtInteractionMgr::sendPendingStopInters ( )
virtual
void DtInteractionMgr::sendPendingSubscription ( )
virtual

Send/add pending subscription class retransmissions that will get sent during next tick.

References connectMgr(), myRetransmitPassiveSubClass, myRetransmitSubClass, myRetransmitSubClassMask, and sendSubscribeMsg().

Referenced by postTick().

void DtInteractionMgr::sendPendingUnsubscription ( )
virtual

Send/add pending unsubscription class retransmissions that will get sent during next tick.

References connectMgr(), myRetransmitUnsubClass, myRetransmitUnsubClassForSmartForwarding, and sendUnsubscribeMsg().

Referenced by postTick().

void DtInteractionMgr::sendPublishMsg ( DtInteractionClassHandle  theInter)
virtual
void DtInteractionMgr::sendSubscribeMsg ( DtInteractionClassHandle  theInter,
bool  isPassive,
DtFederateHandle  fedHandle 
)
virtual
void DtInteractionMgr::sendSubscribeMsg ( DtInteractionClassHandle  theInter,
bool  isPassive,
DtBitMask sendMask = 0 
)
virtual
void DtInteractionMgr::sendUnpublishMsg ( DtInteractionClassHandle  theInter)
virtual
void DtInteractionMgr::sendUnsubscribeMsg ( DtInteractionClassHandle  theInter,
bool  forSmartForwarding = false 
)
virtual
void DtInteractionMgr::setCreatorFunction ( DtInteractionMgrCreator  fn)
static

Register a creator function.

When set, it will be used to create the Interaction Manager.

References create(), DtBindCreator(), and theCreator.

void DtInteractionMgr::setInternalCreatorFunction ( DtInteractionMgrCreator  fn)
static

Register alternate internal creators.

The RTI proper uses this function to choose from various internal implementations. This function should not be used by plugins as the assignment may be overridden internally. Use the setCreatorFunction.

References create(), and theInternalCreator.

void DtInteractionMgr::setOrder ( DtInteractionClassHandle  theClass,
MAKRti::DtOrderType  theType 
)
virtual
void DtInteractionMgr::setRelevanceAdvisorySwitch ( bool  enableSwitch)

Set/Get value of interactionRelevanceAdvisorySwitch.

References myRelevanceSwitch.

Referenced by disableRelevanceAdvisorySwitch(), and enableRelevanceAdvisorySwitch().

void DtInteractionMgr::setTransport ( DtInteractionClassHandle  theClass,
MAKRti::DtTransportType  theType 
)
virtual
void DtInteractionMgr::subscribe ( DtInteractionClassHandle  theClass,
bool  active 
)
virtual
int DtInteractionMgr::subscribed ( DtInteractionClassHandle  handle)
virtual

Returns 1 if subscribed to the class, 0 otherwise Assumes handle is defined.

References fom().

Referenced by firstSubscribedClass(), and processInteraction().

int DtInteractionMgr::subscribed ( DtInteractionClassInfo classDesc)
virtual

Returns 1 if subscribed to the class, 0 otherwise Assumes handle is defined.

References DtInteractionClassInfo::subscribed(), and DtInteractionClassInfo::subscribedWithRegion().

void DtInteractionMgr::unpublish ( DtInteractionClassHandle  theInteraction)
virtual
void DtInteractionMgr::unsubscribe ( DtInteractionClassHandle  theClass)
virtual

Member Data Documentation

std::set<DtRtiMsgKind> DtInteractionMgr::myConstrainedInteractionKinds
protected
DtFederateMgr* DtInteractionMgr::myFederateMgr
protected

Access to the federate manager.

Referenced by DtInteractionMgr(), federateMgr(), sendPendingStartInters(), and sendPendingStopInters().

bool DtInteractionMgr::myIsJoined
protected

Manager has performed join processing.

Referenced by isPostJoined(), and postJoinInit().

MAKRti::DtList DtInteractionMgr::myPendingStartIntersList
protected

Pending start/stop interactions.

Referenced by addPendingStartInters(), and sendPendingStartInters().

MAKRti::DtList DtInteractionMgr::myPendingStopIntersList
protected
bool DtInteractionMgr::myRelevanceSwitch
protected

Indicates whether relevance advisory is enabled.

Referenced by DtInteractionMgr(), relevanceAdvisorySwitch(), restore(), save(), and setRelevanceAdvisorySwitch().

std::set<DtObjectClassHandle> DtInteractionMgr::myRetransmitPassiveSubClass
protected
std::set<DtObjectClassHandle> DtInteractionMgr::myRetransmitSubClass
protected

Set of class subscriptions to retransmit.

Referenced by addPendingSubscription(), addPendingUnsubscription(), and sendPendingSubscription().

DtObjectClassMaskMap DtInteractionMgr::myRetransmitSubClassMask
protected
std::set<DtObjectClassHandle> DtInteractionMgr::myRetransmitUnsubClass
protected

Set of class unsubscriptions to retransmit.

Referenced by addPendingSubscription(), addPendingUnsubscription(), and sendPendingUnsubscription().

std::set<DtObjectClassHandle> DtInteractionMgr::myRetransmitUnsubClassForSmartForwarding
protected
DtInteractionMgr::DtInteractionMgrCreator DtInteractionMgr::theCreator = 0
staticprotected

The plugin creator.

Referenced by create(), and setCreatorFunction().

DtInteractionMgr::DtInteractionMgrCreator DtInteractionMgr::theInternalCreator = 0
staticprotected

The internal creator.

Referenced by create(), and setInternalCreatorFunction().


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

Document ID: Generated on Wed Mar 11 20:26:49 EDT 2015 from SVN revision 150939
Copyright © 2005-2015 VT MÄK Inc. All Rights Reserved (www.mak.com)