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

List of all members.

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 void sendSubscribeMsg (DtInteractionClassHandle theInter, bool isPassive)
 Send subscribe interaction message.
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)
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 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
bool myRelevanceSwitch
 Indicates whether relevance advisory is enabled.
std::set< DtObjectClassHandlemyRetransmitSubClass
 Set of class subscriptions to retransmit.
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

Creator function.


Constructor & Destructor Documentation

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) [protected, 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::addPendingSubscription ( DtObjectClassHandle  theClass,
bool  isPassive 
) [virtual]
void DtInteractionMgr::addPendingUnsubscription ( DtObjectClassHandle  theClass,
bool  forSmartForwarding 
) [virtual]

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 ( ) [protected, virtual]

DDM.

Destroy processing lists

Referenced by ~DtInteractionMgr().

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

References relevanceAdvisorySwitch(), and setRelevanceAdvisorySwitch().

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

References momServiceAvailable, and params().

Referenced by processInteraction().

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

References momServiceAvailable, and params().

Referenced by sendInteractionMsg().

Access the federate manager.

References myFederateMgr.

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

References myFederateMgr.

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

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

Referenced by processInteraction().

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!

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

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) [protected, virtual]
void DtInteractionMgr::processInteraction ( const DtInteractionMsg msg,
void *  usr 
) [static, protected]

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

void DtInteractionMgr::processPub ( const DtPubInterMsg msg) [protected, virtual]
void DtInteractionMgr::processPub ( const DtPubInterMsg msg,
void *  usr 
) [static, protected]
void DtInteractionMgr::processResign ( const DtResignMsg msg) [virtual]
void DtInteractionMgr::processSub ( const DtSubInterMsg msg) [protected, virtual]
void DtInteractionMgr::processSub ( const DtSubInterMsg msg,
void *  usr 
) [static, protected]
void DtInteractionMgr::processUnpub ( const DtUnpubInterMsg msg) [protected, virtual]
void DtInteractionMgr::processUnpub ( const DtUnpubInterMsg msg,
void *  usr 
) [static, protected]
void DtInteractionMgr::processUnsub ( const DtUnsubInterMsg msg) [protected, virtual]
void DtInteractionMgr::processUnsub ( const DtUnsubInterMsg msg,
void *  usr 
) [static, protected]
void DtInteractionMgr::publish ( DtInteractionClassHandle  theInteraction) [virtual]

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

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

void DtInteractionMgr::removeClassMulticast ( DtInteractionClassInfo classDesc) [protected, 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]

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

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

Referenced by postTick().

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

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

Referenced by postTick().

void DtInteractionMgr::sendSubscribeMsg ( DtInteractionClassHandle  theInter,
bool  isPassive 
) [virtual]
void DtInteractionMgr::sendUnsubscribeMsg ( DtInteractionClassHandle  theInter,
bool  forSmartForwarding = false 
) [virtual]

Register a creator function.

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

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

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]

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]

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

References fom(), DtFomClassMgr::interactionByHandle(), DtInteractionClassInfo::subscribed(), and DtInteractionClassInfo::subscribedWithRegion().

Referenced by firstSubscribedClass(), and processInteraction().

void DtInteractionMgr::unpublish ( DtInteractionClassHandle  theInteraction) [virtual]

Member Data Documentation

Access to the federate manager.

Referenced by DtInteractionMgr(), and federateMgr().

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]

Indicates whether relevance advisory is enabled.

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

Set of class subscriptions to retransmit.

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

Set of class unsubscriptions to retransmit.

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

The plugin creator.

Referenced by create(), and setCreatorFunction().

The internal creator.

Referenced by create(), and setInternalCreatorFunction().


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)