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

This class adds the RPR Ownership interactions to the default ownership handler. More...

+ Inheritance diagram for DtRprOwnershipHandler:
+ Collaboration diagram for DtRprOwnershipHandler:

Public Member Functions

 DtRprOwnershipHandler (int site, int app)
 Constructor You must fill out the site and app of your federate.
virtual ~DtRprOwnershipHandler ()
 Destructor.
virtual DtOwnershipHandlerclone () const
 Clone copy.
 DtRprOwnershipHandler (const DtRprOwnershipHandler &other)
 Copy constructor.
DtRprOwnershipHandleroperator= (const DtRprOwnershipHandler &other)
 Assignment operator.
void setSite (int site)
 Sets the site Id for this acknowledge.
int site () const
 Gets the site Id for this acknowledge.
void setApplicationId (int app)
 Sets the applicationID for this acknowledge.
int applicationId () const
 Gets the applicationID for this acknowledge.
virtual bool requestAttributeOwnershipRelease (const RTI::AttributeHandleSet &candidateAttributes, const char *theTag)
 Called as a result of the requestAttributeOwnershipRelease RTI service.
virtual void requestAttributeOwnershipAssumption (const RTI::AttributeHandleSet &offeredAttributes, const char *theTag)
 Called as a result of the requestAttributeOwnershipAssumption RTI service.
- Public Member Functions inherited from DtDefaultOwnershipHandler
 DtDefaultOwnershipHandler ()
 Constructor.
virtual ~DtDefaultOwnershipHandler ()
 Destructor.
 DtDefaultOwnershipHandler (const DtDefaultOwnershipHandler &other)
 Copy constructor.
DtDefaultOwnershipHandleroperator= (const DtDefaultOwnershipHandler &other)
 Assignment operator.
virtual void setOwnershipAcquisitionAction (DtOwnershipAction)
 Set the default action when someone offers an object to acquire Your three options are, accept, deny, or send a callback to ask for this information.
virtual void setOwnershipDivestitudeAction (DtOwnershipAction)
 Set the default action when someone requests your object to acquire Your three options are, accept, deny, or send a callback to ask for this information.
virtual void gainOwnership (const RTI::AttributeHandleSet &set)
 Called whenever the local federate has acquired ownership of a set of attributes.
virtual void loseOwnership (const RTI::AttributeHandleSet &set)
 Called whenever the local federate has lost ownership of a set of attributes.
virtual void addAcquireOwnershipCallback (DtAcquireOwnershipCb cb, void *usr, const DtObjClassDesc *desc=0)
 Callback for Acquiring ownership.
virtual void removeAcquireOwnershipCallback (DtAcquireOwnershipCb cb, void *usr, const DtObjClassDesc *desc=0)
virtual void addDivestOwnershipCallback (DtDivestOwnershipCb cb, void *usr, const DtObjClassDesc *desc=0)
 Callback for divesting ownership.
virtual void removeDivestOwnershipCallback (DtDivestOwnershipCb cb, void *usr, const DtObjClassDesc *desc=0)
virtual void addAcquireOwnershipRequestCallback (DtAcquireOwnershipRequestCb cb, void *usr)
 Callback for acquiring and divesting requests.
virtual void removeAcquireOwnershipRequestCallback (DtAcquireOwnershipRequestCb cb, void *usr)
virtual void addDivestOwnershipRequestCallback (DtDivestOwnershipRequestCb cb, void *usr)
virtual void removeDivestOwnershipRequestCallback (DtDivestOwnershipRequestCb cb, void *usr)
- Public Member Functions inherited from DtOwnershipHandler
 DtOwnershipHandler ()
 Constructor.
virtual ~DtOwnershipHandler ()
 Destructor.
 DtOwnershipHandler (const DtOwnershipHandler &other)
 Copy constructor.
DtOwnershipHandleroperator= (const DtOwnershipHandler &other)
 Assignment operator.
virtual DtHlaObjecthlaObject ()
 Returns a pointer to the DtHlaObject with which this instance has been registered.
virtual void attributeOwnershipDivestitureNotification (const RTI::AttributeHandleSet &releasedAttributes)
 Called as a result of the attributeOwnershipDivestitureNotification RTI service.
virtual void attributeOwnershipAcquisitionNotification (const RTI::AttributeHandleSet &securedAttributes)
 Called as a result of the attributeOwnershipAcquisitionNotification RTI service.
virtual void confirmAttributeOwnershipAcquisitionCancellation (const RTI::AttributeHandleSet &attributes)
 Called as a result of the confirmAttributeOwnershipAcquisitionCancellation RTI service.

Protected Member Functions

virtual void sendRPRAcknowledge (bool returnVal)
 Send a RPR specific acknowledge interaction.

Protected Attributes

DtSimulationAddress mySimulator
- Protected Attributes inherited from DtDefaultOwnershipHandler
DtOwnershipAction myAcquisitionAction
DtOwnershipAction myDivestAction
std::map
< RTI::ObjectClassHandle,
std::list
< DtAcquireOwnershipCbInfo > > 
myAcquireOwnershipCbList
std::map
< RTI::ObjectClassHandle,
std::list
< DtDivestOwnershipCbInfo > > 
myDivestOwnershipCbList
std::list
< DtAcquireOwnershipCbInfo
myDefaultAcquireOwnershipCb
std::list
< DtDivestOwnershipCbInfo
myDefaultDivestOwnershipCb
std::list
< DtAcquireOwnershipRequestCbInfo
myAcquireOwnershipRequestCbList
std::list
< DtDivestOwnershipRequestCbInfo
myDivestOwnershipRequestCbList
- Protected Attributes inherited from DtOwnershipHandler
DtHlaObjectmyHlaObj

Detailed Description

This class adds the RPR Ownership interactions to the default ownership handler.

In other words, whenever there is an ownership transfer, this class also sends an acknowledge interaction as per the RPR standard.

Constructor & Destructor Documentation

DtRprOwnershipHandler::DtRprOwnershipHandler ( int  site,
int  app 
)

Constructor You must fill out the site and app of your federate.

This information is required for the ownership handler to correctly send acknowledge interactions.

virtual DtRprOwnershipHandler::~DtRprOwnershipHandler ( )
virtual

Destructor.

DtRprOwnershipHandler::DtRprOwnershipHandler ( const DtRprOwnershipHandler other)

Copy constructor.

Member Function Documentation

int DtRprOwnershipHandler::applicationId ( ) const
inline

Gets the applicationID for this acknowledge.

virtual DtOwnershipHandler* DtRprOwnershipHandler::clone ( ) const
virtual

Clone copy.

Reimplemented from DtDefaultOwnershipHandler.

DtRprOwnershipHandler& DtRprOwnershipHandler::operator= ( const DtRprOwnershipHandler other)

Assignment operator.

virtual void DtRprOwnershipHandler::requestAttributeOwnershipAssumption ( const RTI::AttributeHandleSet &  offeredAttributes,
const char *  theTag 
)
virtual

Called as a result of the requestAttributeOwnershipAssumption RTI service.

You can call DtHlaObject's acquireAttributes even though you are within an RTI callback.

Reimplemented from DtDefaultOwnershipHandler.

virtual bool DtRprOwnershipHandler::requestAttributeOwnershipRelease ( const RTI::AttributeHandleSet &  candidateAttributes,
const char *  theTag 
)
virtual

Called as a result of the requestAttributeOwnershipRelease RTI service.

You should return true if you accept this attribute transfer, and false otherwise

Reimplemented from DtDefaultOwnershipHandler.

virtual void DtRprOwnershipHandler::sendRPRAcknowledge ( bool  returnVal)
protectedvirtual

Send a RPR specific acknowledge interaction.

void DtRprOwnershipHandler::setApplicationId ( int  app)
inline

Sets the applicationID for this acknowledge.

void DtRprOwnershipHandler::setSite ( int  site)
inline

Sets the site Id for this acknowledge.

int DtRprOwnershipHandler::site ( ) const
inline

Gets the site Id for this acknowledge.

Member Data Documentation

DtSimulationAddress DtRprOwnershipHandler::mySimulator
protected

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

Document ID: Generated on Tue Mar 1 02:56:17 EST 2016 from SVN revision 162687
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)