![]() |
VR-Link API Documentation for HLA 1516
|
An instance of DtObjClassDesc is a "class descriptor" for an HLA Object class. More...
Collaboration diagram for DtObjClassDesc:Public Member Functions | |
| DtObjClassDesc (const char *className, DtObjClassDesc *base, RTI::ObjectClassHandle handle, DtExerciseConn *exConn) | |
| Constructor. More... | |
| virtual | ~DtObjClassDesc () |
| destructor More... | |
| virtual void | addAttr (const char *attrName, bool withSpace=false) |
| Add an attribute (Used when reading FED file). More... | |
| virtual RTI::ObjectClassHandle | handle () const |
| Get the object's class handle. More... | |
| virtual RTI::AttributeHandle | attributeHandleByName (const char *attrName) const |
| Returns the attribute handle for this attribute name. More... | |
| virtual DtString | attributeNameByHandle (const RTI::AttributeHandle &hand) const |
| Returns a string holding the name of the attribute handle. More... | |
| virtual const char * | name () const |
| Get the object's class handle. More... | |
| virtual const DtObjClassDesc * | baseClass () const |
| Return a pointer to the base class's descriptor, NULL if none. More... | |
| virtual DtObjClassDesc * | baseClass () |
| Return a pointer to the base class's descriptor, NULL if none. More... | |
| virtual void | addChildClass (DtObjClassDesc *child) |
| Informs base class that it has a new child class. More... | |
| virtual int | isOfClass (RTI::ObjectClassHandle hand) const |
| Returns 1 if the class is of class hand or a subclass of hand, 0 otherwise. More... | |
| virtual int | numAttributes () const |
| Get the number of attributes associated with this object, including privilege to delete. More... | |
| virtual bool | hasAttribute (const char *attrName) const |
| Determine whether a particular object has the attribute name specified. More... | |
| virtual const RTI::AttributeHandleSet & | attrHandleSet () const |
| Get the set of valid attribute handles for this class. More... | |
| virtual const RTI::AttributeHandleSet & | ownAttrHandles () const |
| Get the set of non-inherited attribute handles for this class. More... | |
| virtual bool | classNeededByFederation () |
| Returns true if the class is currently needed by the federation. More... | |
| virtual void | publish () |
| Publishes the class, along with the attributes specified by hSet (or all attributes if no hSet is given). More... | |
| virtual void | publish (const RTI::AttributeHandleSet &hSet) |
| virtual void | unpublish () |
| Unpublishes the class. Same as publish with an empty attribute set. More... | |
| virtual void | subscribe (std::wstring const &updateRateDesignator, bool active) |
| Subscribes to the class, along with the attributes specified by hSet (or all attributes is no hSet is given) and a boolean to indicate whether VR-Link should subscribe actively or passively. More... | |
| virtual void | subscribe (const DtDDMRegionSet ®ion, std::wstring const &updateRateDesignator, bool active) |
| virtual void | subscribe (const RTI::AttributeHandleSet &hSet, std::wstring const &updateRateDesignator, bool active) |
| virtual void | subscribe (const RTI::AttributeHandleSet &hSet, DtDDMRegionSP region, std::wstring const &updateRateDesignator, bool active) |
| virtual void | subscribe (std::wstring const &updateRateDesignator=L"") |
| subscribe using the Exercise connection's passive mode More... | |
| virtual void | subscribe (const DtDDMRegionSet ®ion, std::wstring const &updateRateDesignator=L"") |
| virtual void | subscribe (const RTI::AttributeHandleSet &hSet, std::wstring const &updateRateDesignator=L"") |
| virtual void | subscribe (const RTI::AttributeHandleSet &hSet, DtDDMRegionSP region, std::wstring const &updateRateDesignator=L"") |
| virtual void | passiveSubscribe () |
| virtual void | unsubscribe () |
| Unsubscribe to the class. More... | |
| virtual void | unsubscribe (const DtDDMRegionSet ®ionSet) |
| virtual void | requestUpdates () |
| Request updates of all objects of this class, include the attributes specified by hSet (or all subscribed attributes if no hSet is given). More... | |
| virtual void | requestUpdates (const DtDDMRegionSet ®ion) |
| virtual void | requestUpdates (const RTI::AttributeHandleSet &hSet) |
| virtual void | requestUpdates (const RTI::AttributeHandleSet &hSet, DtDDMRegionSP region) |
| virtual const RTI::AttributeHandleSet & | publishedAttrs () const |
| Returns the set of published attributes. More... | |
| virtual bool | everPublished () const |
| Return true if we have ever published the class using DtObjClassDesc::publish, false otherwise. More... | |
| virtual const RTI::AttributeHandleSet & | subscribedAttrs () const |
| Returns the set of subscribed attributes. More... | |
| virtual const RTI::AttributeHandleSet & | attributesWithSpace () const |
| virtual const RTI::AttributeHandleSet & | attributesWithoutSpace () const |
| virtual const RTI::AttributeHandleSet & | subscribedAttrsWithSpace () const |
| virtual const RTI::AttributeHandleSet & | subscribedAttrsWithoutSpace () const |
| virtual DtObjClassDesc * | firstSubscribed () |
| Return the class descriptor for the first subscribed ancestor including this class. More... | |
| virtual bool | everSubscribed () const |
| Return true if we have ever subscribed to the class using DtObjClassDesc::subscribe, false otherwise. More... | |
| virtual DtVrlRtiAmbassador * | rtiAmb () |
| Get my RTI ambassador. More... | |
| virtual DtVrlFederateAmbassador * | fedAmb () |
| Get my federate ambassador. More... | |
| virtual RTI::AttributeHandle | privilegeHandle () const |
| Returns the attribute handle of the privilegeToDelete attribute. More... | |
| virtual void | setUserTagModifier (DtObjectTagModifierSP modifier) |
| virtual DtObjectTagModifierSP | userTagModifier () |
| virtual void | setSubscribeToUnspecifiedAttributesFlag (bool subscribe) |
| Set/get whether subscriptions default unspecified attributes to subscription without region When true, subscriptions with regionset will subscribe without region to attributes not specified anywhere When false, subscriptions with regionset will only subscribe to specified attributes. More... | |
| virtual bool | subscribeToUnspecifiedAttributesFlag () |
| virtual void | enableUnknownAttributes () |
| allows all unknown attributes to be encoded or decoded in this class. More... | |
| virtual void | setUnknownAttributeEncoder (DtHlaStateEncoder::DtAttributeEncoder encoder) |
| Set an encoder to be called for this object class for any attribute that doesn't have an encoder set for it. More... | |
| virtual void | setUnknownAttributeChecker (DtHlaStateEncoder::DtAttributeCheckerWithHandle checker) |
| Set a checker to be called for this object class for any attribute that doesn't have an checker set for it. More... | |
| virtual void | setUnknownAttributeDecoder (DtHlaStateDecoder::DtAttributeDecoder decoder) |
| Set a decoder to be called for this object class for any attribute received in an update that doesn't have a decoder. More... | |
| virtual DtHlaStateEncoder::DtAttributeEncoder | unknownAttributeEncoder () |
| Returns the unknown attribute encoder. Returns null if not set. More... | |
| virtual DtHlaStateEncoder::DtAttributeCheckerWithHandle | unknownAttributeChecker () |
| Returns the unknown attribute encoder. Returns null if not set. More... | |
| virtual DtHlaStateDecoder::DtAttributeDecoder | unknownAttributeDecoder () |
| Returns the unknown attribute decoder. Returns null if not set. More... | |
Static Public Member Functions | |
| static void | setSubscriptionTimeDelay (double delay) |
| Set a time delay to occur after calling RTI::RTIambassador::subscribe() The purpose of this function is to get around a bug in DMSO RTI NG v3.2 for Win98. More... | |
Protected Types | |
| typedef std::map < RTI::AttributeHandle, DtString > | StringToAttributeHandleMap |
| typedef std::vector < RTI::AttributeHandleSetRegionHandleSetPair > | RegionHandleVector |
Protected Member Functions | |
| virtual void | processStartReg (RTI::ObjectClassHandle h) |
| Callback for handling startRegistration RTI callback. More... | |
| virtual void | processStopReg (RTI::ObjectClassHandle h) |
| Callback for handling stopRegistration RTI callback. More... | |
| virtual DtObjClassDesc * | self () const |
| Casts away const-ness. Use with caution. More... | |
| virtual void | synchSubscribedAttributes () |
| Updates subscribed attributes using values from subscribed attributes with/without space. More... | |
| virtual void | fillInAttributeHandleSetRegionHandleSetPairVector (const RTI::AttributeHandleSet &hSet, DtDDMRegionSP region, RTI::AttributeHandleSetRegionHandleSetPairVector &pairVector) |
| Utility function that fills in the pair vector for subscription with region in HLA 1516. More... | |
| virtual void | addAttr (const char *attrName, RTI::AttributeHandle attrHandle, RTI::DimensionHandleSet &dimSet, bool isPrivilegeToDelete, bool withSpace=false) |
| Add an attribute after handle is known. More... | |
| virtual bool | isMomAttribute (const char *attrName) |
| Returns true if the attribute is a MOM attribute. More... | |
Static Protected Member Functions | |
| static void | startRegCb (RTI::ObjectClassHandle h, void *usr) |
| Callback for handling startRegistration RTI callback. More... | |
| static void | stopRegCb (RTI::ObjectClassHandle h, void *usr) |
| Callback for handling stopRegistration RTI callback. More... | |
Static Protected Attributes | |
| static double | theSubscriptionTimeDelay |
An instance of DtObjClassDesc is a "class descriptor" for an HLA Object class.
A list of all DtObjClassDescs for the various classes in a FOM can be obtained from a DtFom. A DtObjClassDesc can tell you the set of attributes associated with the class, the class's handle, name, and base class. Publication, subscription and update requests are done through the DtObjClassDesc as well, and the DtObjClassDesc maintains information on which attributes of the class are subscribed to by remote federates. By registering callbacks on start/stopUpdates, a DtObjClassDesc can tell you which attributes of the class have been subscribed to by other federates.
|
protected |
|
protected |
| DtObjClassDesc::DtObjClassDesc | ( | const char * | className, |
| DtObjClassDesc * | base, | ||
| RTI::ObjectClassHandle | handle, | ||
| DtExerciseConn * | exConn | ||
| ) |
Constructor.
Adds the base class's attributes to our attribute set. Used when reading FED file.
|
virtual |
destructor
|
virtual |
Add an attribute (Used when reading FED file).
|
protectedvirtual |
Add an attribute after handle is known.
|
inlinevirtual |
Informs base class that it has a new child class.
References myChildren.
|
inlinevirtual |
Get the set of valid attribute handles for this class.
Includes attributes inherited from base classes.
References myAttrs.
Referenced by DtHlaObject::attrHandleSet().
|
virtual |
Returns the attribute handle for this attribute name.
|
virtual |
Returns a string holding the name of the attribute handle.
|
virtual |
|
virtual |
|
inlinevirtual |
Return a pointer to the base class's descriptor, NULL if none.
References myBase.
|
inlinevirtual |
Return a pointer to the base class's descriptor, NULL if none.
References myBase.
|
virtual |
Returns true if the class is currently needed by the federation.
If VR-Link is using advisories, this function will return true if we've either received a startRegistrationForObjectClass call for the class; otherwise this function will always return true. NOTE: We will only receive calls such as startRegistrationForObjectClass if the class has been published using DtObjClassDesc::publish.
|
virtual |
allows all unknown attributes to be encoded or decoded in this class.
This is done by setting the unknown attribute encoder/checker/decoder to the default value if and only if they have not been set yet. The values are: "DtGenericAttributeEncoder::encodeGenericAttribute" "DtGenericAttributeEncoder::needGenericAttribute" "DtGenericAttributeDecoder::decodeGenericAttribute"
|
virtual |
Return true if we have ever published the class using DtObjClassDesc::publish, false otherwise.
|
virtual |
Return true if we have ever subscribed to the class using DtObjClassDesc::subscribe, false otherwise.
|
virtual |
Get my federate ambassador.
|
protectedvirtual |
Utility function that fills in the pair vector for subscription with region in HLA 1516.
|
virtual |
Return the class descriptor for the first subscribed ancestor including this class.
Null is returned if no ancestor is subscribed.
|
inlinevirtual |
|
virtual |
Determine whether a particular object has the attribute name specified.
|
protectedvirtual |
Returns true if the attribute is a MOM attribute.
|
virtual |
Returns 1 if the class is of class hand or a subclass of hand, 0 otherwise.
|
inlinevirtual |
Get the object's class handle.
References DtString::c_str(), and myName.
|
inlinevirtual |
Get the number of attributes associated with this object, including privilege to delete.
References myAttrs.
Referenced by DtHlaObject::numAttributes().
|
inlinevirtual |
Get the set of non-inherited attribute handles for this class.
References myOwnAttrs.
|
virtual |
|
inlinevirtual |
Returns the attribute handle of the privilegeToDelete attribute.
References myPrivHandle.
|
protectedvirtual |
Callback for handling startRegistration RTI callback.
|
protectedvirtual |
Callback for handling stopRegistration RTI callback.
|
virtual |
Publishes the class, along with the attributes specified by hSet (or all attributes if no hSet is given).
Also, registers start and stopUpdates callbacks on the published classes. Can be called multiple times to change the set of published classes.
|
virtual |
|
virtual |
Returns the set of published attributes.
For this to work correctly, do not publish directly through the RTI. Instead, use DtObjClassDesc::publish.
|
virtual |
Request updates of all objects of this class, include the attributes specified by hSet (or all subscribed attributes if no hSet is given).
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Get my RTI ambassador.
|
inlineprotectedvirtual |
Casts away const-ness. Use with caution.
|
virtual |
Set/get whether subscriptions default unspecified attributes to subscription without region When true, subscriptions with regionset will subscribe without region to attributes not specified anywhere When false, subscriptions with regionset will only subscribe to specified attributes.
|
inlinestatic |
Set a time delay to occur after calling RTI::RTIambassador::subscribe() The purpose of this function is to get around a bug in DMSO RTI NG v3.2 for Win98.
If a delay is not used on Win98, DMSO RTI NG may miss subscribe messages and then fail to call discoverObjectInstance() when it's appropriate In most circumstances, you would never want to call this function.
References theSubscriptionTimeDelay.
|
virtual |
Set a checker to be called for this object class for any attribute that doesn't have an checker set for it.
|
virtual |
Set a decoder to be called for this object class for any attribute received in an update that doesn't have a decoder.
|
virtual |
Set an encoder to be called for this object class for any attribute that doesn't have an encoder set for it.
Note that this will be called every tick for each unknown attribute in the object class, as there is no checker. The user can simply not add the handle/value to the AttributeHandleValuePairSet if an update should not be made.
|
virtual |
|
staticprotected |
Callback for handling startRegistration RTI callback.
|
staticprotected |
Callback for handling stopRegistration RTI callback.
|
virtual |
Subscribes to the class, along with the attributes specified by hSet (or all attributes is no hSet is given) and a boolean to indicate whether VR-Link should subscribe actively or passively.
Additionally place the update rate restriction on the subscription The updateRateDesignator takes effect on HLA Evolved ONLY.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
subscribe using the Exercise connection's passive mode
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Returns the set of subscribed attributes.
For this to work correctly, do not publish directly through the RTI. Instead, use DtObjClassDesc::subscribe.
|
virtual |
|
virtual |
|
virtual |
|
protectedvirtual |
Updates subscribed attributes using values from subscribed attributes with/without space.
|
virtual |
Returns the unknown attribute encoder. Returns null if not set.
|
virtual |
Returns the unknown attribute decoder. Returns null if not set.
|
virtual |
Returns the unknown attribute encoder. Returns null if not set.
|
virtual |
Unpublishes the class. Same as publish with an empty attribute set.
|
virtual |
Unsubscribe to the class.
|
virtual |
|
virtual |
|
protected |
Referenced by attrHandleSet(), and numAttributes().
|
protected |
Attributes without a space (or dimensions in 1516) defined in the FOM.
|
protected |
Attributes with a space (or dimensions in 1516) defined in the FOM.
|
protected |
Referenced by baseClass().
|
protected |
Referenced by addChildClass().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by handle().
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by ownAttrHandles().
|
protected |
Handle of the privilegeToDelete attribute.
Referenced by privilegeHandle().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
Referenced by setSubscriptionTimeDelay().