VR-Engage  2.3
Loading...
Searching...
No Matches
makVre::OwnershipTransferRequestMessage Class Reference

Detailed Description

Every request carries a stable requestId so the coordinator and waiting states can ignore stale or unrelated responses.

Message type: "vrf.ownership.transferRequest"

Note
This is an auto-generated class. Do not modify directly.

#include <ownershipTransferRequest.h>

Inheritance diagram for makVre::OwnershipTransferRequestMessage:
[legend]

Classes

struct  OwnershipTransferRequestData
 

Public Types

enum  RequestType { RequestType_ACQUIRE , RequestType_RELEASE }
 

Public Member Functions

virtual ~OwnershipTransferRequestMessage () override
 
RequestId

Monotonic counter from DtOwnershipTransferSettings::nextRequestId(). Echoed in the response so the waiting state can discard stale replies.

virtual unsigned long long getRequestId () const
 
virtual void setRequestId (unsigned long long val)
 
RequestType

ACQUIRE to take ownership onto the VRE backend, RELEASE to divest back to the original VRF backend.

virtual RequestType getRequestType () const
 
virtual void setRequestType (RequestType val)
 
EntityId

DIS site:host:entity triple. Used for eligibility checks and stored in the attribute store as ownedEntityId.

virtual const DtEntityIdentifier & getEntityId () const
 
virtual void setEntityId (const DtEntityIdentifier &val)
 
EntityUuid

VRF-internal UUID. Primary key for lastVrfSim() lookup and pending-transfer correlation.

virtual const DtUUID & getEntityUuid () const
 
virtual void setEntityUuid (const DtUUID &val)
 
RequestingStationId

Numeric VR-Engage station ID from app().engageStationId(). Forwarded into auto-divest release data.

virtual const std::string & getRequestingStationId () const
 
virtual void setRequestingStationId (const std::string &val)
 
RequestingRoleName

Player-station or role name from app().getPlayerStationName(). Set by loadingPlayerState; left empty by synthetic releases.

virtual const std::string & getRequestingRoleName () const
 
virtual void setRequestingRoleName (const std::string &val)
 
RetainCurrentOwned

When true, the connector should not auto-divest the currently-owned entity. The current entity becomes a secondary owned entity. Used by embarkation-chained acquires.

virtual bool getRetainCurrentOwned () const
 
virtual void setRetainCurrentOwned (bool val)
 
AllowRemoteVreOwnership

When true, role engagement may complete without a wire transfer when the entity is already simulated by a remote VR-Engage ownship backend. False requires local ownership, including for towing.

virtual bool getAllowRemoteVreOwnership () const
 
virtual void setAllowRemoteVreOwnership (bool val)
 
Operators
bool operator== (const OwnershipTransferRequestMessage &rhs) const
 
bool operator!= (const OwnershipTransferRequestMessage &rhs) const
 
- Public Member Functions inherited from makVre::DtVreMessage
 DtVreMessage ()
 
virtual ~DtVreMessage ()
 
virtual char * encode ()
 
virtual void encode (char *buffer, int bufferSize)
 
virtual const UInt64 originatingApplicationId () const
 
virtual void setOriginatingApplicationId (UInt64 appId)
 
virtual void setDelay (double delay)
 
virtual bool isDelayed ()
 
virtual void reduceDelay (double dt)
 
virtual const UInt64 versionNumber () const
 

Static Public Member Functions

Static Creators

Create a new default instance.

Returns
A dynamically allocated default message. Caller takes ownership.
static OwnershipTransferRequestMessage * create ()
 
static OwnershipTransferRequestMessage * createFrom (OwnershipTransferRequestMessage *origMsg)
 
static OwnershipTransferRequestMessage * createFromData (const OwnershipTransferRequestData data)
 

Protected Member Functions

 OwnershipTransferRequestMessage ()
 
virtual void serialize (DtStreamWriter &writer) const override
 
virtual void deserialize (DtStreamReader &reader) override
 

Protected Attributes

OwnershipTransferRequestData myData
 
- Protected Attributes inherited from makVre::DtVreMessage
double myDelay
 
UInt64 myApplicationId
 
UInt64 myVersion
 

Static Protected Attributes

static makVre::DtVreMessageId theMessageId
 
static UInt64 theVersion
 

Type Identity

Get the message type string for this message class.

virtual const std::string & type () const override
 
virtual const makVre::DtVreMessageId & messageId () const override
 
static const std::string & theType ()
 
static const makVre::DtVreMessageId & theId ()
 
static UInt64 theVersionNumber ()
 

Serialization

Static decode function pattern for derived classes.

Note
Each derived class must implement a static decode function with the signature:
static DtVreMessage* decode(unsigned char* buffer, int length);
DtVreMessage()
Default constructor.
static makVre::DtVreMessage * decode(char *buffer, int length)
Decode a message from a byte buffer.
This function is used by the message factory to create messages from raw data.

Gets the total size of the serialized message in bytes

Returns
Size of the message in bytes

This method calculates the total size of the message when serialized, including the base message header (message size, type hash, application ID, version, and delay) and any data added by derived classes.

Derived classes should override this method to include their own data size while calling the base class implementation.

virtual int messageSize () const override
 
OwnershipTransferRequestData getData ()
 
OwnershipTransferRequestData getData () const
 
static makVre::DtVreMessage * decode (char *buffer, int length)
 

Member Enumeration Documentation

◆ RequestType

RequestType enumeration.

Enumerator
RequestType_ACQUIRE 
RequestType_RELEASE 

Constructor & Destructor Documentation

◆ ~OwnershipTransferRequestMessage()

virtual makVre::OwnershipTransferRequestMessage::~OwnershipTransferRequestMessage ( )
overridevirtual

Destructor.

◆ OwnershipTransferRequestMessage()

makVre::OwnershipTransferRequestMessage::OwnershipTransferRequestMessage ( )
protected

Member Function Documentation

◆ create()

static OwnershipTransferRequestMessage * makVre::OwnershipTransferRequestMessage::create ( )
static

Create a copy of the given message.

Parameters
origMsgThe message to copy. Must not be null.
Returns
A dynamically allocated copy. Caller takes ownership.

References OwnershipTransferRequestMessage().

◆ createFrom()

static OwnershipTransferRequestMessage * makVre::OwnershipTransferRequestMessage::createFrom ( OwnershipTransferRequestMessage * origMsg)
static

Create a copy of the given message.

Parameters
origMsgThe message to copy. Must not be null.
Returns
A dynamically allocated copy. Caller takes ownership.

References OwnershipTransferRequestMessage().

◆ createFromData()

static OwnershipTransferRequestMessage * makVre::OwnershipTransferRequestMessage::createFromData ( const OwnershipTransferRequestData data)
static

Create a new message initialized with the given data.

Parameters
dataThe data payload to initialize the message with.
Returns
A dynamically allocated message. Caller takes ownership.

References OwnershipTransferRequestMessage().

◆ theType()

static const std::string & makVre::OwnershipTransferRequestMessage::theType ( )
static

Get the message type string for this instance.

◆ theId()

static const makVre::DtVreMessageId & makVre::OwnershipTransferRequestMessage::theId ( )
static

Get the message identifier for this message class.

◆ theVersionNumber()

static UInt64 makVre::OwnershipTransferRequestMessage::theVersionNumber ( )
static

Get the version number for this message class.

◆ type()

virtual const std::string & makVre::OwnershipTransferRequestMessage::type ( ) const
overridevirtual

Get the message type string for this instance.

Implements makVre::DtVreMessage.

◆ messageId()

virtual const makVre::DtVreMessageId & makVre::OwnershipTransferRequestMessage::messageId ( ) const
overridevirtual

Get the message identifier for this instance.

Implements makVre::DtVreMessage.

◆ getRequestId()

virtual unsigned long long makVre::OwnershipTransferRequestMessage::getRequestId ( ) const
virtual

Monotonic counter from DtOwnershipTransferSettings::nextRequestId(). Echoed in the response so the waiting state can discard stale replies.

◆ setRequestId()

virtual void makVre::OwnershipTransferRequestMessage::setRequestId ( unsigned long long val)
virtual

Monotonic counter from DtOwnershipTransferSettings::nextRequestId(). Echoed in the response so the waiting state can discard stale replies.

◆ getRequestType()

virtual RequestType makVre::OwnershipTransferRequestMessage::getRequestType ( ) const
virtual

ACQUIRE to take ownership onto the VRE backend, RELEASE to divest back to the original VRF backend.

◆ setRequestType()

virtual void makVre::OwnershipTransferRequestMessage::setRequestType ( RequestType val)
virtual

ACQUIRE to take ownership onto the VRE backend, RELEASE to divest back to the original VRF backend.

◆ getEntityId()

virtual const DtEntityIdentifier & makVre::OwnershipTransferRequestMessage::getEntityId ( ) const
virtual

DIS site:host:entity triple. Used for eligibility checks and stored in the attribute store as ownedEntityId.

◆ setEntityId()

virtual void makVre::OwnershipTransferRequestMessage::setEntityId ( const DtEntityIdentifier & val)
virtual

DIS site:host:entity triple. Used for eligibility checks and stored in the attribute store as ownedEntityId.

◆ getEntityUuid()

virtual const DtUUID & makVre::OwnershipTransferRequestMessage::getEntityUuid ( ) const
virtual

VRF-internal UUID. Primary key for lastVrfSim() lookup and pending-transfer correlation.

◆ setEntityUuid()

virtual void makVre::OwnershipTransferRequestMessage::setEntityUuid ( const DtUUID & val)
virtual

VRF-internal UUID. Primary key for lastVrfSim() lookup and pending-transfer correlation.

◆ getRequestingStationId()

virtual const std::string & makVre::OwnershipTransferRequestMessage::getRequestingStationId ( ) const
virtual

Numeric VR-Engage station ID from app().engageStationId(). Forwarded into auto-divest release data.

◆ setRequestingStationId()

virtual void makVre::OwnershipTransferRequestMessage::setRequestingStationId ( const std::string & val)
virtual

Numeric VR-Engage station ID from app().engageStationId(). Forwarded into auto-divest release data.

◆ getRequestingRoleName()

virtual const std::string & makVre::OwnershipTransferRequestMessage::getRequestingRoleName ( ) const
virtual

Player-station or role name from app().getPlayerStationName(). Set by loadingPlayerState; left empty by synthetic releases.

◆ setRequestingRoleName()

virtual void makVre::OwnershipTransferRequestMessage::setRequestingRoleName ( const std::string & val)
virtual

Player-station or role name from app().getPlayerStationName(). Set by loadingPlayerState; left empty by synthetic releases.

◆ getRetainCurrentOwned()

virtual bool makVre::OwnershipTransferRequestMessage::getRetainCurrentOwned ( ) const
virtual

When true, the connector should not auto-divest the currently-owned entity. The current entity becomes a secondary owned entity. Used by embarkation-chained acquires.

◆ setRetainCurrentOwned()

virtual void makVre::OwnershipTransferRequestMessage::setRetainCurrentOwned ( bool val)
virtual

When true, the connector should not auto-divest the currently-owned entity. The current entity becomes a secondary owned entity. Used by embarkation-chained acquires.

◆ getAllowRemoteVreOwnership()

virtual bool makVre::OwnershipTransferRequestMessage::getAllowRemoteVreOwnership ( ) const
virtual

When true, role engagement may complete without a wire transfer when the entity is already simulated by a remote VR-Engage ownship backend. False requires local ownership, including for towing.

◆ setAllowRemoteVreOwnership()

virtual void makVre::OwnershipTransferRequestMessage::setAllowRemoteVreOwnership ( bool val)
virtual

When true, role engagement may complete without a wire transfer when the entity is already simulated by a remote VR-Engage ownship backend. False requires local ownership, including for towing.

◆ messageSize()

virtual int makVre::OwnershipTransferRequestMessage::messageSize ( ) const
overridevirtual

Get a copy of the message data.

Reimplemented from makVre::DtVreMessage.

◆ decode()

static makVre::DtVreMessage * makVre::OwnershipTransferRequestMessage::decode ( char * buffer,
int length )
static

Decode a message from a byte buffer.

Parameters
bufferThe raw byte buffer to decode from.
lengthThe length of the buffer in bytes.
Returns
A dynamically allocated decoded message. Caller takes ownership.

◆ getData() [1/2]

OwnershipTransferRequestData makVre::OwnershipTransferRequestMessage::getData ( )

Get a copy of the message data.

◆ getData() [2/2]

OwnershipTransferRequestData makVre::OwnershipTransferRequestMessage::getData ( ) const

Get a copy of the message data (const).

◆ operator==()

bool makVre::OwnershipTransferRequestMessage::operator== ( const OwnershipTransferRequestMessage & rhs) const

◆ operator!=()

bool makVre::OwnershipTransferRequestMessage::operator!= ( const OwnershipTransferRequestMessage & rhs) const

◆ serialize()

virtual void makVre::OwnershipTransferRequestMessage::serialize ( DtStreamWriter & writer) const
overrideprotectedvirtual

Serializes the message to a stream writer.

Parameters
writerReference to the stream writer

This method writes the message header fields to the stream writer. Derived classes should override this method to add their own fields while calling the base class implementation.

Reimplemented from makVre::DtVreMessage.

◆ deserialize()

virtual void makVre::OwnershipTransferRequestMessage::deserialize ( DtStreamReader & reader)
overrideprotectedvirtual

Deserializes the message from a stream reader.

Parameters
readerReference to the stream reader

This method reads the message header fields from the stream reader. Derived classes should override this method to read their own fields while calling the base class implementation.

Reimplemented from makVre::DtVreMessage.

Member Data Documentation

◆ theMessageId

makVre::DtVreMessageId makVre::OwnershipTransferRequestMessage::theMessageId
staticprotected

◆ theVersion

UInt64 makVre::OwnershipTransferRequestMessage::theVersion
staticprotected

◆ myData

OwnershipTransferRequestData makVre::OwnershipTransferRequestMessage::myData
protected

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