MAK RTIspy API Documentation for HLA 1.3
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Private Attributes
DtInteractionClassInfo Class Reference
+ Collaboration diagram for DtInteractionClassInfo:

List of all members.

Public Member Functions

 DtInteractionClassInfo (const char *name, DtInteractionClassInfo *base, DtInteractionClassHandle handle, DtSharingType sharing, MAKRti::DtString semantics, MAKRti::DtTransportType transport, MAKRti::DtOrderType order)
 Constructors.
 DtInteractionClassInfo (const DtInteractionClassInfo &orig)
 Copy constructor (not implemented)
DtInteractionClassInfooperator= (const DtInteractionClassInfo &orig)
 Assignment operator (not implemented)
virtual ~DtInteractionClassInfo ()
 Destructor.
virtual void setFomType (MAKRti::DtFomType type)
virtual MAKRti::DtFomType fomType () const
virtual void addParam (const char *paramName, const char *semantics, bool addSorted)
 Adds an parameter to the class (called during FED processing).
virtual void addSubclass (DtInteractionClassInfo *sub)
 Add a subclass (called during FED processing).
virtual DtDimensionHandleSet
const & 
dimensions () const
 Set/Get dimensions.
virtual void setDimensions (DtDimensionHandleSet const &dimList)
virtual void addDimension (DtDimensionHandle dimHandle)
 Add/Remove a dimesion handle.
virtual void removeDimension (DtDimensionHandle dimHandle)
virtual const char * name () const
 Return class name, as in FED.
virtual bool isName (const char *name)
 Return boolean: name matches? Compare depends on FOM type: insensitive for 1.3 and sensitive for 1516 Root name is prepended to name if necessary.
virtual bool isFullName (const char *name)
 Root name is required.
virtual DtParameterHandle paramHandle (const char *theName)
 Get parameter handle from name.
virtual char * paramName (DtParameterHandle theHandle)
 Get parameter name from handle.
virtual DtInteractionClassHandle handle () const
 Get/set class handle.
virtual void setHandle (DtInteractionClassHandle handleValue)
virtual DtInteractionClassInfobaseClass () const
 Return pointer to base class descriptor.
virtual void setBaseClass (DtInteractionClassInfo *base)
 Set base class pointer (User should not need to call this);.
virtual MAKRti::DtList * subclasses ()
 Return list of subclasses.
virtual int isOfClass (DtInteractionClassHandle handle) const
 Returns 1 if this class is handle or is a subclass of handle.
virtual void publish (DtInteractionMgr *interMgr)
 Publish and unpublish.
virtual void unpublish ()
virtual int published () const
 Return 1 if we are publishing this class, 0 otherwise.
virtual void subscribe (bool active)
 Subscribe and unsubscribe.
virtual void unsubscribe ()
virtual int subscribed () const
 Return 1 if we are subscribed to this class, 0 otherwise.
virtual void remoteSubscribe (DtFederateHandle fedHandle, DtInteractionMgr *interMgr)
 Call when another federate subscribes to this class actively.
virtual void remotePassiveSubscribe (DtFederateHandle fedHandle, DtInteractionMgr *interMgr)
 Call when another federate subscribes to this class passively.
virtual void remoteUnsubscribe (DtFederateHandle fedHandle, DtInteractionMgr *interMgr, bool forSmartForwarding)
 Call when another federate unsubscribes to this class.
virtual bool remoteFederateIsSubscribed (DtFederateHandle fedHandle) const
 Returns true if the remote federate is subscribed to this class.
virtual int numRemoteFederatesSubscribed () const
 Returns number of remote federates subscribed to this class.
virtual const MAKRti::DtList & subscribedFederates () const
 Returns a list of federates who are subscribed to this interaction.
virtual bool relevant () const
 Returns true if the class is relevant, false otherwise.
virtual DtParamInfoparamByName (const char *theName)
 Get parameter descriptor by name or handle.
virtual DtParamInfoparamByHandle (const DtParameterHandle theHandle)
virtual MAKRti::DtTransportType transport () const
 Set/Get transport type representing transport mechanism.
virtual void setTransport (MAKRti::DtTransportType theTransport)
DtSharingType sharing () const
void setSharing (const DtSharingType sharing)
const char * semantics () const
void setSemantics (const MAKRti::DtString &semantics)
virtual MAKRti::DtOrderType order () const
 Set/Get order type.
virtual void setOrder (MAKRti::DtOrderType theOrder)
virtual void setSpaceHandle (DtSpaceHandle spaceHandleValue)
 Return the space handle.
virtual DtSpaceHandle spaceHandle () const
virtual MAKRti::DtInetAddr destinationAddress () const
 set the destination to send to when using DM Filtering
virtual MAKRti::DtInetAddr destinationDevice () const
virtual void setDestination (MAKRti::DtInetAddr addr, MAKRti::DtInetAddr devAddr, bool inclusive, MAKRti::DtInetAddr oldAddr, MAKRti::DtInetAddr oldDevAddr)
virtual int subscribedWithRegion () const
 Return 1 if we are subscribed to this class with region, 0 otherwise.
virtual int numParameters () const
 Returns the number of parameters.
virtual DtParamVector const & params () const
 Returns the list of parameters.
virtual DtBitMask getDestinations (bool includeBaseClass=true) const
 Get the list of remote subscribers to the class = update destinations The base class destination masks are added unless specified otherwise.
virtual void forceDestinations (DtBitMask const &mask, MAKRti::DtTime delay)
 Temporarily force destinations with this mask for given delay A negative time delay will force the destinations indefinitely.
virtual void overrideDestinations (DtBitMask const &mask)
 Permanently override destinations with given mask.
virtual void clearDestinationOverride ()
 Remove destination override.
virtual bool save (DtRtiSaveFile &file)
 save and restore
virtual bool restore (DtInteractionClassPacket *packet)
virtual void print () const
 Print the contents.
virtual bool sameAncestry (const DtInteractionClassInfo *) const
 Test for equality.
bool operator== (const DtInteractionClassInfo &other) const
bool operator!= (const DtInteractionClassInfo &other) const
bool isScaffolding () const
 Determines whether the class is a scaffolding class.

Protected Member Functions

virtual void addRemoteSubscription (DtFederateHandle fedHandle)
 Add/delete remote subscription to this class by indicated federate.
virtual void addRemotePassiveSubscription (DtFederateHandle fedHandle)
virtual void deleteRemoteSubscription (DtFederateHandle fedHandle, bool isForSmartForwarding=false)
virtual void updateRelevance (DtInteractionMgr *interMgr)
 Update the relevance field of this class and all subclasses, based on current subscriptions.
void addParamSorted (const char *paramName, MAKRti::DtString semantics)
 Insert Parameters in sorted or unsorted (deprecated) order.
void addParamUnsorted (const char *paramName, MAKRti::DtString semantics)

Static Protected Member Functions

static bool sameInteractionClass (const DtInteractionClassInfo &, const DtInteractionClassInfo &)
static bool sameParamsUnsorted (const std::vector< DtParamInfo > &, const std::vector< DtParamInfo > &)
static bool sameParamsSorted (const std::vector< DtParamInfo > &, const std::vector< DtParamInfo > &)

Protected Attributes

MAKRti::DtString myName
DtInteractionClassHandle myHandle
DtSpaceHandle mySpaceHandle
DtDimensionHandleSet myDimensions
MAKRti::DtFomType myFomType
DtSubcribeInteractionType mySubscribed
int myPublished
DtInteractionClassInfomyBase
MAKRti::DtList mySubclasses
MAKRti::DtTransportType myTransport
MAKRti::DtString mySemantics
DtSharingType mySharing
MAKRti::DtOrderType myOrder
DtParamVector myParams
int myFirstParam
MAKRti::DtHashlist myRemoteSubscriptions
MAKRti::DtHashlist myRemotePassiveSubscriptions
DtBitMask myRemoteSubscriberMask
DtBitMaskmyForceDestinationsMask
 Create this bit mask to temporarily force destinations after publish.
DtBitMaskmyOverrideDestinationsMask
 Create this bit mask to permanently override destinations.
MAKRti::DtTime myForceDestinationsTime
bool myRelevant
MAKRti::DtInetAddr myAddr
MAKRti::DtInetAddr myDevAddr
MAKRti::DtClock myClock

Static Private Attributes

static const unsigned int theMaxParams = 300

Constructor & Destructor Documentation

DtInteractionClassInfo::DtInteractionClassInfo ( const char *  name,
DtInteractionClassInfo base,
DtInteractionClassHandle  handle,
DtSharingType  sharing,
MAKRti::DtString  semantics,
MAKRti::DtTransportType  transport,
MAKRti::DtOrderType  order 
)

Member Function Documentation

Add/Remove a dimesion handle.

References myDimensions.

Referenced by DtFomClassMgr::addInteractionDimension().

void DtInteractionClassInfo::addParam ( const char *  paramName,
const char *  semantics,
bool  addSorted 
) [virtual]

Adds an parameter to the class (called during FED processing).

References addParamSorted(), addParamUnsorted(), myParams, paramByName(), and theMaxParams.

Referenced by DtFomClassMgr::addParameter(), DtInteractionClassInfo(), and DtFomClassMgr::mergeParameters().

void DtInteractionClassInfo::addParamSorted ( const char *  paramName,
MAKRti::DtString  semantics 
) [protected]

Insert Parameters in sorted or unsorted (deprecated) order.

References fomType(), myFirstParam, myParams, and name().

Referenced by addParam().

void DtInteractionClassInfo::addParamUnsorted ( const char *  paramName,
MAKRti::DtString  semantics 
) [protected]

References fomType(), myParams, and DtParamInfo::setFomType().

Referenced by addParam().

void DtInteractionClassInfo::addRemoteSubscription ( DtFederateHandle  fedHandle) [protected, virtual]

Add/delete remote subscription to this class by indicated federate.

References DtRtiMtdDestinationList::destinationIndex(), myRemoteSubscriberMask, myRemoteSubscriptions, DtBitMask::setBit(), and DtRtiMsg::smartForwardingEnabled().

Referenced by remoteSubscribe(), and restore().

Add a subclass (called during FED processing).

References mySubclasses.

Referenced by DtInteractionClassInfo(), and setBaseClass().

Remove destination override.

References myOverrideDestinationsMask.

void DtInteractionClassInfo::deleteRemoteSubscription ( DtFederateHandle  fedHandle,
bool  isForSmartForwarding = false 
) [protected, virtual]
MAKRti::DtInetAddr DtInteractionClassInfo::destinationAddress ( ) const [virtual]
MAKRti::DtInetAddr DtInteractionClassInfo::destinationDevice ( ) const [virtual]
MAKRti::DtFomType DtInteractionClassInfo::fomType ( ) const [virtual]
void DtInteractionClassInfo::forceDestinations ( DtBitMask const &  mask,
MAKRti::DtTime  delay 
) [virtual]

Temporarily force destinations with this mask for given delay A negative time delay will force the destinations indefinitely.

References myClock, myForceDestinationsMask, and myForceDestinationsTime.

Referenced by publish().

DtBitMask DtInteractionClassInfo::getDestinations ( bool  includeBaseClass = true) const [virtual]

Get the list of remote subscribers to the class = update destinations The base class destination masks are added unless specified otherwise.

References baseClass(), getDestinations(), myClock, myForceDestinationsMask, myForceDestinationsTime, myOverrideDestinationsMask, myRemoteSubscriberMask, and NULL.

Referenced by getDestinations(), and DtInteractionMgr::sendInteractionMsg().

bool DtInteractionClassInfo::isFullName ( const char *  name) [virtual]

Root name is required.

References fomType(), myName, and name().

Referenced by isName().

bool DtInteractionClassInfo::isName ( const char *  name) [virtual]

Return boolean: name matches? Compare depends on FOM type: insensitive for 1.3 and sensitive for 1516 Root name is prepended to name if necessary.

References fomType(), isFullName(), and name().

Referenced by paramByName().

Returns 1 if this class is handle or is a subclass of handle.

References baseClass(), handle(), and isOfClass().

Referenced by isOfClass().

Determines whether the class is a scaffolding class.

References myFirstParam, and params().

Referenced by DtFomClassMgr::mergeInteractionInfo().

const char * DtInteractionClassInfo::name ( ) const [virtual]
int DtInteractionClassInfo::numParameters ( ) const [virtual]

Returns the number of parameters.

References myParams.

Referenced by DtTestInteraction::DtTestInteraction().

Returns number of remote federates subscribed to this class.

References myRemoteSubscriptions.

Referenced by remotePassiveSubscribe(), remoteSubscribe(), remoteUnsubscribe(), and updateRelevance().

bool DtInteractionClassInfo::operator!= ( const DtInteractionClassInfo other) const
DtInteractionClassInfo& DtInteractionClassInfo::operator= ( const DtInteractionClassInfo orig)

Assignment operator (not implemented)

bool DtInteractionClassInfo::operator== ( const DtInteractionClassInfo other) const
MAKRti::DtOrderType DtInteractionClassInfo::order ( ) const [virtual]
void DtInteractionClassInfo::overrideDestinations ( DtBitMask const &  mask) [virtual]

Permanently override destinations with given mask.

References myOverrideDestinationsMask.

DtParamInfo * DtInteractionClassInfo::paramByName ( const char *  theName) [virtual]

Get parameter descriptor by name or handle.

References isName(), myParams, and NULL.

Referenced by addParam(), DtFomClassMgr::mergeParameters(), and paramHandle().

DtParameterHandle DtInteractionClassInfo::paramHandle ( const char *  theName) [virtual]

Get parameter handle from name.

References DtParamInfo::handle(), and paramByName().

Referenced by DtTestInteraction::DtTestInteraction(), and DtFomClassMgr::paramHandle().

char * DtInteractionClassInfo::paramName ( DtParameterHandle  theHandle) [virtual]

Get parameter name from handle.

References DtParamInfo::name(), and paramByHandle().

Referenced by DtInteractionClassInfo(), and DtFomClassMgr::paramName().

DtParamVector const & DtInteractionClassInfo::params ( ) const [virtual]
void DtInteractionClassInfo::print ( ) const [virtual]
void DtInteractionClassInfo::publish ( DtInteractionMgr interMgr) [virtual]
int DtInteractionClassInfo::published ( ) const [virtual]

Returns true if the class is relevant, false otherwise.

References myRelevant.

Referenced by publish(), and updateRelevance().

Returns true if the remote federate is subscribed to this class.

References myRemoteSubscriptions, and NULL.

Referenced by remotePassiveSubscribe(), remoteSubscribe(), and remoteUnsubscribe().

Call when another federate subscribes to this class passively.

Simply stores passive subscription, does not updateRelevance.

References addRemotePassiveSubscription(), handle(), numRemoteFederatesSubscribed(), and remoteFederateIsSubscribed().

Referenced by DtInteractionMgr::processSub().

void DtInteractionClassInfo::remoteSubscribe ( DtFederateHandle  fedHandle,
DtInteractionMgr interMgr 
) [virtual]

Call when another federate subscribes to this class actively.

Updates subscriptions for this class, then calls updateRelevance.

References addRemoteSubscription(), handle(), numRemoteFederatesSubscribed(), remoteFederateIsSubscribed(), and updateRelevance().

Referenced by DtInteractionMgr::processSub().

void DtInteractionClassInfo::remoteUnsubscribe ( DtFederateHandle  fedHandle,
DtInteractionMgr interMgr,
bool  forSmartForwarding 
) [virtual]

Call when another federate unsubscribes to this class.

Updates subscriptions for this class, then calls updateRelevance.

References deleteRemoteSubscription(), handle(), numRemoteFederatesSubscribed(), remoteFederateIsSubscribed(), DtRtiMsg::smartForwardingEnabled(), and updateRelevance().

Referenced by DtInteractionMgr::processResign(), DtInteractionMgr::processSub(), and DtInteractionMgr::processUnsub().

References myDimensions.

Test for equality.

References baseClass(), and name().

Referenced by DtFomClassMgr::mergeInteractionInfo().

bool DtInteractionClassInfo::sameInteractionClass ( const DtInteractionClassInfo firstClass,
const DtInteractionClassInfo secondClass 
) [static, protected]
bool DtInteractionClassInfo::sameParamsSorted ( const std::vector< DtParamInfo > &  first,
const std::vector< DtParamInfo > &  second 
) [static, protected]
bool DtInteractionClassInfo::sameParamsUnsorted ( const std::vector< DtParamInfo > &  first,
const std::vector< DtParamInfo > &  second 
) [static, protected]

References name().

Referenced by sameInteractionClass().

const char * DtInteractionClassInfo::semantics ( ) const

Set base class pointer (User should not need to call this);.

References addSubclass(), and myBase.

void DtInteractionClassInfo::setDestination ( MAKRti::DtInetAddr  addr,
MAKRti::DtInetAddr  devAddr,
bool  inclusive,
MAKRti::DtInetAddr  oldAddr,
MAKRti::DtInetAddr  oldDevAddr 
) [virtual]
void DtInteractionClassInfo::setDimensions ( DtDimensionHandleSet const &  dimList) [virtual]
void DtInteractionClassInfo::setFomType ( MAKRti::DtFomType  type) [virtual]

References myHandle.

Referenced by DtFomClassMgr::addInterClassSorted().

void DtInteractionClassInfo::setOrder ( MAKRti::DtOrderType  theOrder) [virtual]
void DtInteractionClassInfo::setSemantics ( const MAKRti::DtString &  semantics)

References mySemantics.

References mySharing.

void DtInteractionClassInfo::setSpaceHandle ( DtSpaceHandle  spaceHandleValue) [virtual]

Return the space handle.

References mySpaceHandle.

Referenced by DtFomClassMgr::addInterClassSorted(), and DtFomClassMgr::addInterClassUnsorted().

void DtInteractionClassInfo::setTransport ( MAKRti::DtTransportType  theTransport) [virtual]
MAKRti::DtList * DtInteractionClassInfo::subclasses ( ) [virtual]
void DtInteractionClassInfo::subscribe ( bool  active) [virtual]

Subscribe and unsubscribe.

References DtSubcribeInteractionActive, DtSubcribeInteractionPassive, and mySubscribed.

Referenced by DtInteractionMgr::subscribe().

int DtInteractionClassInfo::subscribed ( ) const [virtual]
const MAKRti::DtList & DtInteractionClassInfo::subscribedFederates ( ) const [virtual]

Returns a list of federates who are subscribed to this interaction.

References myRemoteSubscriptions.

Return 1 if we are subscribed to this class with region, 0 otherwise.

References NULL.

Referenced by DtInteractionMgr::processPub(), DtInteractionMgr::sendInteractionMsg(), DtInteractionMgr::subscribed(), and DtInteractionMgr::unsubscribe().

MAKRti::DtTransportType DtInteractionClassInfo::transport ( ) const [virtual]

References myPublished.

Referenced by DtInteractionMgr::unpublish().

void DtInteractionClassInfo::updateRelevance ( DtInteractionMgr interMgr) [protected, virtual]

Update the relevance field of this class and all subclasses, based on current subscriptions.

Add pending turnOn/OffInteractions when appropriate.

References DtInteractionMgr::addPendingStartInters(), DtInteractionMgr::addPendingStopInters(), baseClass(), handle(), myRelevant, NULL, numRemoteFederatesSubscribed(), published(), relevant(), subclasses(), and updateRelevance().

Referenced by remoteSubscribe(), remoteUnsubscribe(), and updateRelevance().


Member Data Documentation

MAKRti::DtInetAddr DtInteractionClassInfo::myAddr [protected]

Referenced by baseClass(), print(), and setBaseClass().

MAKRti::DtClock DtInteractionClassInfo::myClock [protected]
MAKRti::DtInetAddr DtInteractionClassInfo::myDevAddr [protected]
MAKRti::DtFomType DtInteractionClassInfo::myFomType [protected]

Referenced by fomType(), and setFomType().

Create this bit mask to temporarily force destinations after publish.

Referenced by DtInteractionClassInfo(), forceDestinations(), getDestinations(), and ~DtInteractionClassInfo().

Referenced by handle(), print(), restore(), save(), and setHandle().

MAKRti::DtString DtInteractionClassInfo::myName [protected]

Referenced by isFullName(), name(), and print().

MAKRti::DtOrderType DtInteractionClassInfo::myOrder [protected]

Referenced by order(), print(), restore(), save(), and setOrder().

Create this bit mask to permanently override destinations.

Referenced by clearDestinationOverride(), DtInteractionClassInfo(), getDestinations(), overrideDestinations(), and ~DtInteractionClassInfo().

MAKRti::DtHashlist DtInteractionClassInfo::myRemoteSubscriptions [protected]
MAKRti::DtString DtInteractionClassInfo::mySemantics [protected]

Referenced by semantics(), and setSemantics().

Referenced by setSharing(), and sharing().

Referenced by print(), setSpaceHandle(), and spaceHandle().

MAKRti::DtList DtInteractionClassInfo::mySubclasses [protected]
MAKRti::DtTransportType DtInteractionClassInfo::myTransport [protected]
const unsigned int DtInteractionClassInfo::theMaxParams = 300 [static, private]

Referenced by addParam().


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)