VR-Link API Documentation for HLA Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions
DtUnknownHlaObject Class Reference

Instances of DtUnknownHlaObject are used to store attributes for HLA objects which are not known by our FOM. More...

+ Inheritance diagram for DtUnknownHlaObject:
+ Collaboration diagram for DtUnknownHlaObject:

Public Member Functions

 DtUnknownHlaObject (DtExerciseConn *exConn, const char *name, DtObjClassDesc &classDesc)
 Constructor for local objects.
 DtUnknownHlaObject (DtExerciseConn *exConn, RTI::ObjectHandle id, const char *name, DtObjClassDesc &classDesc)
 Constructor for reflected objects.
virtual ~DtUnknownHlaObject ()
 destructor
virtual void update ()
 Does nothing.
virtual void update (const RTI::AttributeHandleValuePairSet &ahvps)
 Sends the ahpvs through our DtExerciseConn.
- Public Member Functions inherited from DtHlaObject
 DtHlaObject (DtExerciseConn *conn, RTI::ObjectHandle id, const char *name, DtObjClassDesc &classDesc, bool reflecting=false)
 Constructor - used to construct a DtHlaObject to represent an object that we discover through an RTI callback.
 DtHlaObject (DtExerciseConn *conn, const char *name, DtObjClassDesc &classDesc, bool reflecting=false)
 Constructor - used to construct a DtHlaObject to represent an object that will be registered locally.
virtual ~DtHlaObject ()
 Destructor.
virtual const RTI::ObjectHandle & objectId () const
 Get the object's handle.
virtual const
RTI::AttributeHandleSet & 
attrHandleSet ()
 Get the set of attributes associated with this object's FOM class.
virtual const
RTI::AttributeHandleSet & 
requestedAttributes ()
 Returns the union of all sets of attributes requested since the last call to clearRequestedAttributes.
virtual RTI::ObjectClassHandle objectClassHandle () const
 Get the object's class handle.
virtual const char * name () const
 Get the object's name.
int numAttributes () const
 Get the number of attributes associated with this object's FOM class.
virtual DtExerciseConnexerciseConn () const
 Get the exercise connection for this object.
virtual DtObjClassDescclassDesc () const
 Get the class descriptor for the object's class.
virtual void setupUpdating ()
 Local Object specific functions.
virtual void generateUpdate (const RTI::AttributeHandleSet &eligibileAttrs, const RTI::AttributeHandleSet &requiredAttrs, DtStateMsg *msg)
 Called by update to actually generate an outgoing message.
virtual void cleanupFromUpdating ()
 Do the deinitialization required to stop updating attributes of this object.
virtual void processProvideUpdate (const RTI::AttributeHandleSet &set)
 Set yourself up so that on the next tick, you send an update for the appropriate attributes.
virtual void clearRequestedAttributes ()
 Clears the set of requested attributes.
virtual const
RTI::AttributeHandleSet & 
ownedAttributes ()
 Returns the set of attributes of this object that are owned by the local federate.
virtual void forceUpdate ()
 Specify a set of attributes that should be included in the ahvps the next time update is called, even if they would not otherwise need to be sent.
virtual void forceUpdate (const RTI::AttributeHandleSet &set)
virtual void clearForcedAttributes ()
 Clear (empty) the set of forced attributes.
virtual const
RTI::AttributeHandleSet & 
attributesNeededByFederation ()
 Returns the set of attributes that are currently needed by the federation, i.e.
virtual const
RTI::AttributeHandleSet & 
eligibleAttributes ()
 Returns the set of attributes that eligible for sending.
virtual const
RTI::AttributeHandleSet & 
requiredAttributes ()
 Returns the set of attributes that should be included in the next update regardless of whether their update conditions have been met.
bool classNeededByFederation ()
 Returns true if the class is needed by the federation, i.e.
void setupClassForUpdating ()
 If the class has never been published, publish it with all attributes using DtObjClassDesc::publish.
virtual void setupReflecting ()
 Remote Object specific functions.
virtual void callReflect (const DtStateMsg &msg)
 Calls reflect, and any postReflect callbacks.
virtual void callReflectLocal (const DtStateMsg &msg)
 Calls reflectLocal, and any postReflect callbacks.
virtual void reflectLocal (const DtStateMsg &msg)=0
 Called by callReflectLocal to handle the reflection of updates that we are sending locally.
virtual void cleanupFromReflecting ()
 Do the deinitialization required to stop handling reflection of object.
virtual void requestUpdate (RTI::AttributeHandleSet *attrs=0)
 Request an update for the object for the set of attributes indicated by attrs (or all subscribed attributes if attrs is NULL).
virtual void addRemoveObjectCb (DtRemoveObjectCb cb, void *usr)
 Add (register) function to be called when object is about to be removed.
virtual void removeRemoveObjectCb (DtRemoveObjectCb cb, void *usr)
 Remove (deregister) function to be called when object is about to be removed.
virtual void addPostReflectCb (DtObjectReflectAttributeValuesCb cb, void *usr)
 Add (register) function to be called after each reflectAttrValues.
virtual void removePostReflectCb (DtObjectReflectAttributeValuesCb cb, void *usr)
 Remove (deregister) function to be called after each reflectAttrValues.
virtual void processRemoveObject ()
 Process notification of removal of the object from the network.
virtual DtOwnershipHandlersetOwnershipHandler (DtOwnershipHandler *handler)
 Ownership-Management-related functions.
virtual void unconditionalDivest (const RTI::AttributeHandleSet &attrs)
 Unconditionally divest ownership of attrs.
virtual void negotiatedDivest (const RTI::AttributeHandleSet &attrs)
 Try to divest ownership of attrs.
virtual void divestAttributes (const RTI::AttributeHandleSet &attrs, bool ifAvailable=false)
 Try to divest ownership of attrs.
virtual void divestObject (bool ifAvailable=false)
 Try to divest ownership of all attrs.
virtual void cancelNegotiatedDivest (const RTI::AttributeHandleSet &attrs)
 Cancel a negotiated divestiture of attributes.
virtual void acquireAttributes (const RTI::AttributeHandleSet &attrs, bool ifAvailable=false)
 Attempt to acquire ownership of attributes.
virtual void acquireObject (bool ifAvailable=false)
 Attempt to acquire ownership of all attributes for an object.
virtual void cancelAcquireAttributes (const RTI::AttributeHandleSet &attrs)
 Cancel the request to acquire ownership of attrs.
virtual DtTime lastSimTimeUpdateReceived () const
 Returns the value of VR-Link simulation time at the time the last attribute update was received for this object.
virtual DtTime lastReceivedTimeStamp () const
virtual void setLastSimTimeUpdateReceived (DtTime tm)
 Set the time an update was last received or sent.
virtual void setLastReceivedTimeStamp (DtTime tm)
virtual void printMsg (const DtStateMsg &msg, bool fullReport=false) const
 Prints contents of a state msg.
virtual void localSubscriptionChanged ()
 Called when local object class subscriptions change.
virtual void publicationChanged ()
 Called when there is a change in the publication status of this object's object class.
virtual const DtStringlastProducingFederate () const
 Obtain the Federate Handle of the last federate to produce a reflect attribute update.
virtual void processRequestAssumption (const RTI::AttributeHandleSet &attrs, const char *tag)
 Process RTI's requestAttributeOwnershipAssumption service.
virtual void processRequestRelease (const RTI::AttributeHandleSet &attrs, const char *tag)
 Process RTI's requestAttributeOwnershipRelease service.
virtual void processAttributeAcquisition (const RTI::AttributeHandleSet &attrs)
 Handle an invocation of the attributeOwnershipAcquisitionNotification service.
virtual void processAttributeDivestiture (const RTI::AttributeHandleSet &attrs)
 Handle an invocation of the attributeOwnershipDivestitureNotification service.
virtual void processConfirmAcquisitionCancellation (const RTI::AttributeHandleSet &attrs)
 Process RTI's conformAttributeOwnershipAcquisitionCancellation service.

Protected Member Functions

 DtUnknownHlaObject (const DtUnknownHlaObject &orig)
 copy constructor
DtUnknownHlaObjectoperator= (const DtUnknownHlaObject &orig)
 assignment operator
virtual void reflect (const DtStateMsg &stateMsg)
 Does nothing.
- Protected Member Functions inherited from DtHlaObject
 DtHlaObject ()
 Default constructor: not implemented; do not call.
 DtHlaObject (const DtHlaObject &src)
 Copy constructor: not implemented; do not call.
DtHlaObjectoperator= (const DtHlaObject &src)
 Assignment operator: not implemented; do not call.
virtual bool handlesMatch (const RTI::AttributeHandleValuePairSet &handleValueSet, const RTI::AttributeHandleSet &handleSet) const
 Check if the handles in the given handle-value set are in the given handle set.
virtual void copyToLocalAndRemote (const RTI::AttributeHandleValuePairSet &sourceList, const RTI::AttributeHandleSet &neededByRemote, const RTI::AttributeHandleSet &neededByLocal, RTI::AttributeHandleValuePairSet &toRemoteList, RTI::AttributeHandleValuePairSet &toLocalList)
 Copy attribute values from source into remote and local lists.
virtual void clearUpdatedAttributes (const RTI::AttributeHandleValuePairSet &sourceList)
 Remove the attributes present in the given value set from the requested and forced handle sets.
void wipeRemoveList ()
 Remove all callbacks from the remove callback list.
virtual void clearRemoveList ()
 Virtual version of above.
void wipeReflectList ()
 Remove all callbacks from the reflect callback list.
virtual void applyPostReflectCallbacks (const DtStateMsg &msg)
 Apply callbacks after a state msg is reflected.
virtual void loseOwnership (const RTI::AttributeHandleSet &attrs)
 Gets called whenever we lose ownership of a set of attributes.
virtual void gainOwnership (const RTI::AttributeHandleSet &attrs, bool notifyOwnershipManagement=true)
 Gets called whenever we gain ownership of a set of attributes.
virtual void processUpdatesOff (const RTI::AttributeHandleSet &set)
 Callback for handling turnUpdatesOffForObjectInstance RTI call.
void processUpdatesOn (const RTI::AttributeHandleSet &set)
 Callback for handling turnUpdatesOnForObjectInstance RTI call.
virtual bool known () const
 Returns true if the object has been registered with, or discovered via the RTI.
virtual void dumpRtiException (const char *functionName, const RTI::Exception *exc) const
 Print message to explain the RTI Exception.
virtual void computeEligible ()
 Recomputes the set of attrs that are eligible for sending.
virtual void justRegistered ()
 Called by DtHlaObjectManager right after a DtHlaObject is created, if it was created to represent a newly registered object.
virtual void setLastProducingFederate (const DtString &fedName)
 Set the Federate Handle of the last federate to produce a reflect attribute update.
virtual void addHandlesToSet (RTI::AttributeHandleSet &destinationSet, const RTI::AttributeHandleSet &sourceSet)
 Add source attribute set to destination checking each handle for membership first Depracated - use DtFom::setInsert.

Additional Inherited Members

- Static Public Member Functions inherited from DtHlaObject
static void ownerAcquisitionIfAvailableCb (void *usr)
 The following four static fns are for use within ownership msg callbacks.
static void ownerAcquisitionCb (void *usr)
static void negotiatedDivestitureCb (void *usr)
static void unconditionalDivestitureCb (void *usr)
- Protected Types inherited from DtHlaObject
enum  SplitUpdateDiscriminant { UpdateBothLocalAndRemote, UpdateRemoteOnly, UpdateLocalOnly, UpdateSplit }
 When remotely needed and locally subscribed are the same, split is not necessary. More...
- Static Protected Member Functions inherited from DtHlaObject
static void reflectAttributeValuesCb (const DtStateMsg &stateMsg, void *hlaObj)
 Callback for handling state messages for the HLA object.
static void updatesOnCb (RTI::ObjectHandle handle, const RTI::AttributeHandleSet &attributeSet, void *usr)
 Callback for handling turnUpdatesOnForObjectInstance RTI call.
static void updatesOffCb (RTI::ObjectHandle handle, const RTI::AttributeHandleSet &attributeSet, void *usr)
 Callback for handling turnUpdatesOffForObjectInstance RTI call.
- Protected Attributes inherited from DtHlaObject
char * myName
DtExerciseConnmyExConn
bool myReflecting
bool myUpdating
DtList myRemoveCbList
DtList myReflectCbList
DtListItemmyRemoveCbListNextPtr
DtListItemmyReflectCbListNextPtr
DtTime myLastSimTimeUpdateReceived
DtTime myLastReceivedTimeStamp
DtObjClassDescmyClassDesc
SplitUpdateDiscriminant mySplitUpdate
 Flag to indicate when to split values between update and self reflect.
DtString myLastProducingFederate
RTI::ObjectHandle myObjectId
RTI::AttributeHandleSet * myEligibleAttrs
 Attributes that are eligible to be sent from within update() - passed to generateUpdate.
RTI::AttributeHandleSet * myNeededAttrs
 Set of owned attributes for which we have received a turnUpdatesOn more recently than a turnUpdatesOff.
RTI::AttributeHandleSet * myOwnedAttributes
 Set of attributes owned by the local federate.
RTI::AttributeHandleSet * myRequestedAttributes
 Requested by other federates.
RTI::AttributeHandleSet * myForcedAttributes
 Requested by a call to setForcedUpdate.
RTI::AttributeHandleSet * myRequiredAttributes
 Union of forced and requested - not computed until needed.
bool myUpdateRequiredAttributes
RTI::AttributeHandleSet * mySelfReflectSplitAttrs
 When self reflecting, these attributes are the differences between eligible needed and eligible subscribed.
RTI::AttributeHandleSet * myEligibleNeeded
 Eligible attributes that are needed remotely.
RTI::AttributeHandleSet * myEligibleSubscribed
 Eligible attributes that are subscribed locally.
RTI::AttributeHandleSet * myScratchAttributes
 Scratch set to use temporarily saves temporary allocation.
DtOwnershipHandlermyOwnershipHandler

Detailed Description

Instances of DtUnknownHlaObject are used to store attributes for HLA objects which are not known by our FOM.

Constructor & Destructor Documentation

DtUnknownHlaObject::DtUnknownHlaObject ( DtExerciseConn exConn,
const char *  name,
DtObjClassDesc classDesc 
)

Constructor for local objects.

DtUnknownHlaObject::DtUnknownHlaObject ( DtExerciseConn exConn,
RTI::ObjectHandle  id,
const char *  name,
DtObjClassDesc classDesc 
)

Constructor for reflected objects.

virtual DtUnknownHlaObject::~DtUnknownHlaObject ( )
virtual

destructor

DtUnknownHlaObject::DtUnknownHlaObject ( const DtUnknownHlaObject orig)
protected

copy constructor

Member Function Documentation

DtUnknownHlaObject& DtUnknownHlaObject::operator= ( const DtUnknownHlaObject orig)
protected

assignment operator

virtual void DtUnknownHlaObject::reflect ( const DtStateMsg stateMsg)
protectedvirtual

Does nothing.

You can access information from incoming update messages by using DtHlaObject::addPostReflectCb to register a function that will be called whenever an update msg is received.

Implements DtHlaObject.

virtual void DtUnknownHlaObject::update ( )
virtual

Does nothing.

Use the version of update that takes an ahpvs to send data for a DtUnknownHlaObject.

Reimplemented from DtHlaObject.

virtual void DtUnknownHlaObject::update ( const RTI::AttributeHandleValuePairSet &  ahvps)
virtual

Sends the ahpvs through our DtExerciseConn.

Does not look at the contents of ahvps. It is the caller's responsibility to insure that all attributes in the message are in the set of attributes needed by the federation (obtained using attributesNeededByFederation). It is also the responsibility of the user of DtUnknownHlaObject to insure that requested attributes (obtained via requestedAttributes) get updated in a timely manner. clearRequestedAttributes should be called after each time requested attributes are updated.


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

Document ID: Generated on Thu Feb 22 04:26:36 EST 2018 from SVN revision 186468
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)