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

This class meant to encapsulate user callbacks on ownership management services. More...

+ Inheritance diagram for DtDefaultOwnershipHandler:
+ Collaboration diagram for DtDefaultOwnershipHandler:

Public Member Functions

 DtDefaultOwnershipHandler ()
 Constructor. More...
 
virtual ~DtDefaultOwnershipHandler ()
 Destructor. More...
 
virtual DtOwnershipHandlerclone () const
 Clone copy. More...
 
 DtDefaultOwnershipHandler (const DtDefaultOwnershipHandler &other)
 Copy constructor. More...
 
DtDefaultOwnershipHandleroperator= (const DtDefaultOwnershipHandler &other)
 Assignment operator. More...
 
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. More...
 
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. More...
 
virtual void gainOwnership ()
 Called whenever the local federate has gained ownership of an object. More...
 
virtual void loseOwnership ()
 Called whenever the local federate has lost ownership of an object. More...
 
virtual void addAcquireOwnershipCallback (DtAcquireOwnershipCb cb, void *usr)
 Callback for Acquiring ownership. More...
 
virtual void removeAcquireOwnershipCallback (DtAcquireOwnershipCb cb, void *usr)
 
virtual void addDivestOwnershipCallback (DtDivestOwnershipCb cb, void *usr)
 Callback for divesting ownership. More...
 
virtual void removeDivestOwnershipCallback (DtDivestOwnershipCb cb, void *usr)
 
virtual void addAcquireOwnershipRequestCallback (DtAcquireOwnershipRequestCb cb, void *usr)
 Callback for acquiring and divesting requests. More...
 
virtual void removeAcquireOwnershipRequestCallback (DtAcquireOwnershipRequestCb cb, void *usr)
 
virtual void addDivestOwnershipRequestCallback (DtDivestOwnershipRequestCb cb, void *usr)
 
virtual void removeDivestOwnershipRequestCallback (DtDivestOwnershipRequestCb cb, void *usr)
 
virtual bool requestOwnershipRelease ()
 
virtual bool requestOwnershipAssumption ()
 
- Public Member Functions inherited from DtOwnershipHandler
 DtOwnershipHandler ()
 Constructor. More...
 
virtual ~DtOwnershipHandler ()
 Destructor. More...
 
 DtOwnershipHandler (const DtOwnershipHandler &other)
 Copy constructor. More...
 
DtOwnershipHandleroperator= (const DtOwnershipHandler &other)
 Assignment operator. More...
 
virtual void divestObject (DtU16 siteTarget, DtU16 applicationTarget)
 Begin a DIS 7 push request for this object The entire process will by default be automated from here. More...
 
virtual void acquireObject ()
 Begin a DIS 7 pull request for this object The entire process will by default be automated from here. More...
 
virtual void setExConn (DtExerciseConn *exConn)
 
virtual void setEntityId (const DtEntityIdentifier &entityId)
 
virtual void setAutoResponseTimer (double time)
 By default DIS 7 allows for 5 seconds for transfer ownership to happen before it gets cancelled. More...
 

Protected Attributes

DtOwnershipAction myAcquisitionAction
 
DtOwnershipAction myDivestAction
 
std::list
< DtAcquireOwnershipCbInfo
myDefaultAcquireOwnershipCb
 
std::list
< DtDivestOwnershipCbInfo
myDefaultDivestOwnershipCb
 
std::list
< DtAcquireOwnershipRequestCbInfo
myAcquireOwnershipRequestCbList
 
std::list
< DtDivestOwnershipRequestCbInfo
myDivestOwnershipRequestCbList
 
- Protected Attributes inherited from DtOwnershipHandler
DtOwnershipStatus myStatus
 
DtTime myOwnershipTimer
 
double myAutoResponseTimer
 
DtU32 myRequestId
 
DtExerciseConnmyExConn
 
DtEntityIdentifier myEntityId
 
bool myAckReceived
 
bool myEventReportReceived
 

Additional Inherited Members

- Protected Member Functions inherited from DtOwnershipHandler
virtual void acknowledgeCallback (DtAcknowledgeRPdu *ack)
 
virtual void setRecordCallback (DtSetRecordPdu *setRec)
 
virtual void eventReportCallback (DtEventReportPdu *setRec)
 
virtual void transferOwnershipCallback (DtTransferControlRequestPdu *transfer)
 
virtual void transferFailed ()
 Sent whenever a transfer did not complete. More...
 
- Static Protected Member Functions inherited from DtOwnershipHandler
static void acknowledgeRCb (DtAcknowledgeRPdu *ack, void *usr)
 The following callbacks are used internally to handle the back and forth messaging required in a DIS ownership transfer. More...
 
static void setRecordCb (DtSetRecordPdu *setRec, void *usr)
 
static void eventReportCb (DtEventReportPdu *setRec, void *usr)
 
static void transferOwnershipCb (DtTransferControlRequestPdu *setRec, void *usr)
 

Detailed Description

This class meant to encapsulate user callbacks on ownership management services.

It allows users to automatically accept or deny ownership requests, as well as globally register callbacks related to ownership management.

Constructor & Destructor Documentation

DtDefaultOwnershipHandler::DtDefaultOwnershipHandler ( )

Constructor.

virtual DtDefaultOwnershipHandler::~DtDefaultOwnershipHandler ( )
virtual

Destructor.

DtDefaultOwnershipHandler::DtDefaultOwnershipHandler ( const DtDefaultOwnershipHandler other)

Copy constructor.

Member Function Documentation

virtual void DtDefaultOwnershipHandler::addAcquireOwnershipCallback ( DtAcquireOwnershipCb  cb,
void *  usr 
)
virtual

Callback for Acquiring ownership.

These callbacks will be called whenever this federate acquires an object's attributes. Users of this function should create a new DtEntityPublisher, and remove the reflected entities from their lists.

virtual void DtDefaultOwnershipHandler::addAcquireOwnershipRequestCallback ( DtAcquireOwnershipRequestCb  cb,
void *  usr 
)
virtual

Callback for acquiring and divesting requests.

Are only called if you have OWNERSHIP_CALLBACK defined Allows you to decide if you should accept or reject this ownership request. While there may be many callbacks, this will accept if just a single one returns true.

virtual void DtDefaultOwnershipHandler::addDivestOwnershipCallback ( DtDivestOwnershipCb  cb,
void *  usr 
)
virtual

Callback for divesting ownership.

These callbacks will be called whenever this federate divests an object's attributes

virtual void DtDefaultOwnershipHandler::addDivestOwnershipRequestCallback ( DtDivestOwnershipRequestCb  cb,
void *  usr 
)
virtual
virtual DtOwnershipHandler* DtDefaultOwnershipHandler::clone ( ) const
virtual

Clone copy.

Reimplemented from DtOwnershipHandler.

virtual void DtDefaultOwnershipHandler::gainOwnership ( )
virtual

Called whenever the local federate has gained ownership of an object.

Reimplemented from DtOwnershipHandler.

virtual void DtDefaultOwnershipHandler::loseOwnership ( )
virtual

Called whenever the local federate has lost ownership of an object.

Reimplemented from DtOwnershipHandler.

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

Assignment operator.

virtual void DtDefaultOwnershipHandler::removeAcquireOwnershipCallback ( DtAcquireOwnershipCb  cb,
void *  usr 
)
virtual
virtual void DtDefaultOwnershipHandler::removeAcquireOwnershipRequestCallback ( DtAcquireOwnershipRequestCb  cb,
void *  usr 
)
virtual
virtual void DtDefaultOwnershipHandler::removeDivestOwnershipCallback ( DtDivestOwnershipCb  cb,
void *  usr 
)
virtual
virtual void DtDefaultOwnershipHandler::removeDivestOwnershipRequestCallback ( DtDivestOwnershipRequestCb  cb,
void *  usr 
)
virtual
virtual bool DtDefaultOwnershipHandler::requestOwnershipAssumption ( )
virtual

Reimplemented from DtOwnershipHandler.

virtual bool DtDefaultOwnershipHandler::requestOwnershipRelease ( )
virtual

Reimplemented from DtOwnershipHandler.

virtual void DtDefaultOwnershipHandler::setOwnershipAcquisitionAction ( DtOwnershipAction  )
virtual

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 DtDefaultOwnershipHandler::setOwnershipDivestitudeAction ( DtOwnershipAction  )
virtual

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.

Member Data Documentation

std::list<DtAcquireOwnershipRequestCbInfo> DtDefaultOwnershipHandler::myAcquireOwnershipRequestCbList
protected
DtOwnershipAction DtDefaultOwnershipHandler::myAcquisitionAction
protected
std::list<DtAcquireOwnershipCbInfo> DtDefaultOwnershipHandler::myDefaultAcquireOwnershipCb
protected
std::list<DtDivestOwnershipCbInfo> DtDefaultOwnershipHandler::myDefaultDivestOwnershipCb
protected
DtOwnershipAction DtDefaultOwnershipHandler::myDivestAction
protected
std::list<DtDivestOwnershipRequestCbInfo> DtDefaultOwnershipHandler::myDivestOwnershipRequestCbList
protected

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

Document ID: Generated on Thu Sep 19 02:12:35 EDT 2024 from SVN revision 269601
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)