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

Detailed Description

DtOwnershipTransferConnector is the sole decision-making authority for all entity ownership acquire and divest operations in the VR-Engage frontend process. It lives as a base connector for the lifetime of the frontend session.

On acquire, the coordinator sends DtIfTakeOwnership directly to the current VRE Sim backend via the VRF message interface. DtIfTakeOwnershipResponse callbacks drive non-terminal status publications and terminal response publications back to the state machine.

On divest, the coordinator resolves the towing-specific LastVreSim target when present, otherwise falls back to LastVrfSim. If LastVrfSim is missing or unavailable, it uses the first available full-capabilities backend.

#include <ownershipTransferConnector.h>

Inheritance diagram for makVre::DtOwnershipTransferConnector:
[legend]

Public Member Functions

 DtOwnershipTransferConnector ()=default
 
virtual ~DtOwnershipTransferConnector () override=default
 
virtual void install (makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection *connection, makVrf::DtVrlinkVrfRemoteController *vrfRemoteController, DtReflectedExtEntityList *reflectedExtEntityList)
 
virtual void shutdown () override
 
virtual void tick (double dt) override
 
virtual DtVreMessageResult handleOwnershipTransferRequest (DtVreMessage *message)
 
virtual DtVreMessageResult handleEntityRemoved (DtVreMessage *message)
 
virtual DtVreMessageResult handlePlayerDisengaged (DtVreMessage *message)
 
virtual DtVreMessageResult handlePlayerEngaged (DtVreMessage *message)
 
virtual DtExtEntityStateRepository * reflectedEntityEESR (const DtEntityIdentifier &entityId) const
 
Tick-Driven State Machine
virtual void startNextOperation ()
 
virtual void evaluateAndSend ()
 
virtual void evaluateAcquire (const DtSimulationAddress &vreSim)
 
virtual void evaluateRelease (const DtSimulationAddress &vreSim)
 
virtual void processBackendResponses (double dt)
 
virtual void finalizeAndPublish ()
 
virtual bool detectBackendChange ()
 
virtual void detectExternalOwnershipChanges ()
 
Eligibility and Resolution
virtual DtTransferEligibility entityTransferElegibility (const DtEntityIdentifier &entityId, const DtSimulationAddress &targetVreSim, std::string &reason) const
 
virtual DtSimulationAddress lastVrfSim (const DtUUID &entityUuid) const
 
virtual DtSimulationAddress lastVreSim (const DtUUID &entityUuid) const
 
Helpers
virtual void sendTransferOwnershipMessage (const DtSimulationAddress &target, const DtUUID &entityUuid) const
 
virtual void sendStatusUpdate (VreOwnershipTransferStatusMessage::StatusCode statusCode) const
 
- Public Member Functions inherited from makVre::DT_PROTOCOL_NAMESPACE::DtSimEventConnector
 DtSimEventConnector ()
 
virtual ~DtSimEventConnector () override
 
virtual void install (makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection *connection)
 
- Public Member Functions inherited from makVre::DtConnector
 DtConnector ()
 
virtual ~DtConnector ()
 
virtual DtConnectorType type ()
 
virtual std::string name ()
 

Protected Member Functions

virtual void clearSecondaryOwned ()
 
virtual void promoteSecondaryToPrimary ()
 
virtual void rollbackSecondaryOnAcquireFailure ()
 
virtual void clearAttrsForEntity (const DtUUID &uuid)
 
virtual void setPrimaryOwned (const DtUUID &uuid, const DtEntityIdentifier &id)
 
virtual void clearPrimaryOwned ()
 
virtual bool entityOnBackend (const DtEntityIdentifier &entityId, const DtSimulationAddress &vreSim) const
 
virtual bool isRemoteVreOwnshipBackend (const DtSimulationAddress &backendAddress, const DtSimulationAddress &localVreSim) const
 
virtual bool needsTowingOwnershipTransfer (const DtUUID &entityUuid) const
 
virtual bool isOwnershipTransferDisabledForEntity (const DtEntityIdentifier &entityId) const
 
virtual DtSimulationAddress statePropertySimAddress (const DtUUID &entityUuid, const std::string &propertyName) const
 
virtual std::vector< DtSimulationAddress > releaseTargetsForEntity (const DtUUID &entityUuid, bool towingRelease) const
 
virtual bool isBackendAvailable (const DtSimulationAddress &backendAddress) const
 
bool ownershipTransferAvailable () const
 
virtual void clearTowingOwnershipTransferMarker (const DtEntityIdentifier &entityId) const
 
virtual void resetActiveDeadline ()
 
virtual void publishResponse (const OwnershipOperation &op, OwnershipTransferResponseMessage::ResponseStatus status, const std::string &msg=std::string()) const
 
virtual void publishFailureIfExternal (const OwnershipOperation &op, const std::string &failureMsg) const
 
virtual void completeActiveOperation (TerminalOutcome outcome, std::string failureMsg=std::string())
 
virtual void enqueueAutoDivestPair (const DtUUID &currentPrimaryUuid, const DtEntityIdentifier &currentPrimaryId)
 
virtual void cancelPairedAcquire (unsigned int pairId, const std::string &failureMsg)
 
virtual bool prepareSecondarySlot (const DtSimulationAddress &vreSim, std::string &outFailReason)
 
virtual void tickIdleRelease (double dt)
 
virtual void validateOwnshipEntity (double dt)
 
virtual void blockingRelease (const DtUUID &uuid, const DtEntityIdentifier &entityId)
 

Protected Attributes

const DtExerciseConnInitializer * myExerciseConnInitializer = nullptr
 
makVrf::DtVrlinkVrfRemoteController * myVrfRemoteController = nullptr
 
DtAttributeHandleType< DtOwnershipTransferManager * > myOwnershipTransferManagerAttr
 
DtReflectedExtEntityList * myReflectedEntityList = nullptr
 
DtSimulationAddress myPreviousVreBackendAddr
 
double myValidationGrace = 0.0
 
Queue-Based State Machine
std::deque< OwnershipOperation > myOperationQueue
 
ActiveOperation myActive
 
std::deque< OwnershipResponse > myResponseQueue
 
unsigned int myNextPairId = 1
 
bool myBackendDirtyFlag = false
 
Attribute Handles
DtAttributeHandleType< DtSimulationAddress > myVreBackendAttr
 
DtAttributeHandleType< DtUUID > myOwnedEntityUuidAttr
 
DtAttributeHandleType< DtEntityIdentifier > myOwnedEntityIdAttr
 
DtAttributeHandleType< DtUUID > mySecondaryOwnedEntityUuidAttr
 
DtAttributeHandleType< DtEntityIdentifier > mySecondaryOwnedEntityIdAttr
 
DtAttributeHandleType< DtEntityIdentifier > myLocalEntityIdAttr
 
DtAttributeHandleType< std::vector< std::string > > myVreStatusStationsAttr
 
Idle Release Timer
double myIdleReleaseDeadline = 0.0
 
DtUUID myIdleReleaseEntityUuid
 
DtEntityIdentifier myIdleReleaseEntityId
 
- Protected Attributes inherited from makVre::DT_PROTOCOL_NAMESPACE::DtSimEventConnector
makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection * myConnection
 
- Protected Attributes inherited from makVre::DtConnector
std::string myName
 
DtConnectorType myType
 
DtAttributeCallbackManager myAttributeCallbacks
 
DtVreMessageHandlerGroup myMessageHandlers
 

VRF Response

virtual void onBackendEnabledChanged (bool enabled)
 
static void takeOwnershipResponseCallback (DtSimMessage *msg, void *usr)
 

Additional Inherited Members

- Public Types inherited from makVre::DtConnector
enum  DtConnectorType {
  DIS , HLA13 , HLA1516 , HLA1516E ,
  HLA4
}
 
- Static Public Member Functions inherited from makVre::DtConnector
static std::string extension (DtConnectorType type)
 

Constructor & Destructor Documentation

◆ DtOwnershipTransferConnector()

makVre::DtOwnershipTransferConnector::DtOwnershipTransferConnector ( )
default

Default constructor.

◆ ~DtOwnershipTransferConnector()

virtual makVre::DtOwnershipTransferConnector::~DtOwnershipTransferConnector ( )
overridevirtualdefault

Virtual destructor.

Member Function Documentation

◆ install()

virtual void makVre::DtOwnershipTransferConnector::install ( makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection * connection,
makVrf::DtVrlinkVrfRemoteController * vrfRemoteController,
DtReflectedExtEntityList * reflectedExtEntityList )
virtual

Installs the coordinator with shared infrastructure.

Parameters
connectionNon-owning pointer to the protocol-specific VR-Link connection.
vrfRemoteControllerNon-owning pointer to the shared VRF remote controller.
reflectedExtEntityListNon-owning pointer to the reflected entity list used to look up entity sim engine addresses during eligibility checks

Stores the non-owning infrastructure pointer, registers factory creators for DtIfTakeOwnership and DtIfTakeOwnershipResponse, registers the static takeOwnershipResponseCallback, and subscribes to OwnershipTransferRequestMessage via DtVreMessageManager. Binds the ownership-transfer manager from the global App attribute tree.

◆ shutdown()

virtual void makVre::DtOwnershipTransferConnector::shutdown ( )
overridevirtual

Shuts down the coordinator.

Cancels queued operations, removes the VRF response callback, unassigns App attribute handles, and clears non-owning infrastructure references.

Reimplemented from makVre::DT_PROTOCOL_NAMESPACE::DtSimEventConnector.

◆ tick()

virtual void makVre::DtOwnershipTransferConnector::tick ( double dt)
overridevirtual

Performs periodic processing for the ownership transfer coordinator.

Checks whether an in-flight acquire has exceeded its deadline and, if so, clears the pending transfer and publishes a terminal FAILURE response.

Reimplemented from makVre::DT_PROTOCOL_NAMESPACE::DtSimEventConnector.

◆ handleOwnershipTransferRequest()

virtual DtVreMessageResult makVre::DtOwnershipTransferConnector::handleOwnershipTransferRequest ( DtVreMessage * message)
virtual

Dispatches an incoming ownership transfer request by enqueuing it.

Parameters
messagePointer to the ownership transfer request message
Returns
HANDLED

◆ startNextOperation()

virtual void makVre::DtOwnershipTransferConnector::startNextOperation ( )
virtual

Dequeues the next operation from the FIFO queue and moves to Pending phase.

A no-op when the queue is empty (stays Idle).

◆ evaluateAndSend()

virtual void makVre::DtOwnershipTransferConnector::evaluateAndSend ( )
virtual

Evaluates EESR ground truth and sends TakeOwnership if needed.

Dispatches to evaluateAcquire or evaluateRelease based on operation type.

◆ evaluateAcquire()

virtual void makVre::DtOwnershipTransferConnector::evaluateAcquire ( const DtSimulationAddress & vreSim)
virtual

Evaluates and dispatches the active Acquire operation.

Parameters
vreSimThe current VRE backend address (already validated non-null).

◆ evaluateRelease()

virtual void makVre::DtOwnershipTransferConnector::evaluateRelease ( const DtSimulationAddress & vreSim)
virtual

Evaluates and dispatches the active Release operation.

Parameters
vreSimThe current VRE backend address (already validated non-null).

◆ processBackendResponses()

virtual void makVre::DtOwnershipTransferConnector::processBackendResponses ( double dt)
virtual

Drains the response queue, applies response precedence, and advances state.

Processes all queued VRF responses in order, applying terminal detection per the response precedence table. After draining, checks timeout if no terminal was found.

Parameters
dtElapsed seconds since the previous tick.

◆ finalizeAndPublish()

virtual void makVre::DtOwnershipTransferConnector::finalizeAndPublish ( )
virtual

Publishes results, updates ownership attrs, and returns to Idle phase.

For failed internal auto-divest releases, cancels the paired Acquire in the queue and publishes failure for the original request.

◆ detectBackendChange()

virtual bool makVre::DtOwnershipTransferConnector::detectBackendChange ( )
virtual

Detects backend address change or disconnect; clears all state if found.

Checks the backend dirty flag set by the attribute callback. If the backend has changed or gone null, publishes failures for all in-flight work, clears queues and attrs, and returns true. The caller (tick) returns early.

Returns
true if backend changed and state was cleared; false otherwise

◆ detectExternalOwnershipChanges()

virtual void makVre::DtOwnershipTransferConnector::detectExternalOwnershipChanges ( )
virtual

Detects when an entity has been transferred to our VRE backend by another station's divest, without an explicit acquire request.

Only runs during maintenance (phase==Idle && queue empty). If we don't currently own any entity but the local station is engaged on an entity whose simEngineAddress matches our VRE backend, claim ownership.

◆ entityTransferElegibility()

virtual DtTransferEligibility makVre::DtOwnershipTransferConnector::entityTransferElegibility ( const DtEntityIdentifier & entityId,
const DtSimulationAddress & targetVreSim,
std::string & reason ) const
virtual

Evaluates whether the entity can be transferred to the VRE sim backend.

Parameters
entityIdThe entity identifier to check
targetVreSimThe simulation address of the VRE Sim backend
reasonPopulated with a human-readable explanation when ineligible
Returns
DtTransferEligibility indicating whether the transfer can proceed

◆ lastVrfSim()

virtual DtSimulationAddress makVre::DtOwnershipTransferConnector::lastVrfSim ( const DtUUID & entityUuid) const
virtual

Reads the reflected LastVrfSim owner for an entity.

Parameters
entityUuidUUID of the entity
Returns
The simulation address, or DtSimulationAddress::nullId() when unavailable

◆ lastVreSim()

virtual DtSimulationAddress makVre::DtOwnershipTransferConnector::lastVreSim ( const DtUUID & entityUuid) const
virtual

Reads the reflected LastVreSim owner for a towing-acquired entity.

Parameters
entityUuidUUID of the entity
Returns
The simulation address, or DtSimulationAddress::nullId() when unavailable

◆ takeOwnershipResponseCallback()

static void makVre::DtOwnershipTransferConnector::takeOwnershipResponseCallback ( DtSimMessage * msg,
void * usr )
static

Static VRF message callback for DtIfTakeOwnershipResponse.

Extracts response data and pushes to myResponseQueue. Makes NO decisions.

Parameters
msgPointer to the simulation message
usrPointer to the connector instance

◆ onBackendEnabledChanged()

virtual void makVre::DtOwnershipTransferConnector::onBackendEnabledChanged ( bool enabled)
virtual

Processes a change to the backend Enabled attribute.

Sets myBackendDirtyFlag to true. All decision logic is deferred to detectBackendChange() in the next tick.

Parameters
enabledThe new value of the Enabled attribute

◆ sendTransferOwnershipMessage()

virtual void makVre::DtOwnershipTransferConnector::sendTransferOwnershipMessage ( const DtSimulationAddress & target,
const DtUUID & entityUuid ) const
virtual

Sends DtIfTakeOwnership to the target backend.

Parameters
targetThe simulation address to send to
entityUuidThe entity UUID to transfer

◆ sendStatusUpdate()

virtual void makVre::DtOwnershipTransferConnector::sendStatusUpdate ( VreOwnershipTransferStatusMessage::StatusCode statusCode) const
virtual

Publishes a VreOwnershipTransferStatusMessage to the frontend.

Parameters
statusCodeThe status code to report

◆ handleEntityRemoved()

virtual DtVreMessageResult makVre::DtOwnershipTransferConnector::handleEntityRemoved ( DtVreMessage * message)
virtual

Handles notification that an entity was removed from the simulation.

If the removed entity matches the currently owned entity, clears all ownership tracking state and resets the attribute store to the initial values. This covers rewind and entity deletion scenarios.

Parameters
messagePointer to the EntityRemovedMessage.
Returns
HANDLED

◆ handlePlayerDisengaged()

virtual DtVreMessageResult makVre::DtOwnershipTransferConnector::handlePlayerDisengaged ( DtVreMessage * message)
virtual

Handles OwnershipPlayerDisengagedMessage from chooseRoleState.

Arms the idle-release timer.

Parameters
messagePointer to the OwnershipPlayerDisengagedMessage.
Returns
HANDLED

◆ handlePlayerEngaged()

virtual DtVreMessageResult makVre::DtOwnershipTransferConnector::handlePlayerEngaged ( DtVreMessage * message)
virtual

Handles OwnershipPlayerEngagedMessage from chooseRoleState.

Cancels an armed idle-release timer only when the message's entity matches the entity awaiting release.

Parameters
messagePointer to the OwnershipPlayerEngagedMessage.
Returns
HANDLED

◆ reflectedEntityEESR()

virtual DtExtEntityStateRepository * makVre::DtOwnershipTransferConnector::reflectedEntityEESR ( const DtEntityIdentifier & entityId) const
virtual

Looks up the extended entity state repository for a reflected entity.

Searches myReflectedEntityList for the first entry whose ESR entity identifier matches entityId and returns its extended ESR (EESR).

Parameters
entityIdThe entity identifier to search for.
Returns
A non-owning pointer to the matching DtExtEntityStateRepository, or nullptr if no matching entity is found or if the matched entry has no extended ESR. The caller must not delete the returned pointer.

◆ clearSecondaryOwned()

virtual void makVre::DtOwnershipTransferConnector::clearSecondaryOwned ( )
protectedvirtual

Clears secondary owned entity attributes to null.

◆ promoteSecondaryToPrimary()

virtual void makVre::DtOwnershipTransferConnector::promoteSecondaryToPrimary ( )
protectedvirtual

Promotes the secondary owned entity to primary.

Moves the secondary entity UUID and ID into the primary attributes, then clears the secondary.

◆ rollbackSecondaryOnAcquireFailure()

virtual void makVre::DtOwnershipTransferConnector::rollbackSecondaryOnAcquireFailure ( )
protectedvirtual

Rolls back secondary entity to primary after an acquire failure.

Called when a Vehicle acquire fails while the Human was moved to secondary (retain path). Restores Human as primary since it's still owned by our backend.

◆ clearAttrsForEntity()

virtual void makVre::DtOwnershipTransferConnector::clearAttrsForEntity ( const DtUUID & uuid)
protectedvirtual

Clears primary and/or secondary attrs that match the given entity UUID.

Parameters
uuidThe entity UUID to clear from owned attrs.

◆ setPrimaryOwned()

virtual void makVre::DtOwnershipTransferConnector::setPrimaryOwned ( const DtUUID & uuid,
const DtEntityIdentifier & id )
protectedvirtual

Sets primary owned entity attrs (UUID and ID together).

◆ clearPrimaryOwned()

virtual void makVre::DtOwnershipTransferConnector::clearPrimaryOwned ( )
protectedvirtual

Clears primary owned entity attrs (UUID and ID together).

◆ entityOnBackend()

virtual bool makVre::DtOwnershipTransferConnector::entityOnBackend ( const DtEntityIdentifier & entityId,
const DtSimulationAddress & vreSim ) const
protectedvirtual

Returns true if entity is reflected and currently on the given backend.

◆ isRemoteVreOwnshipBackend()

virtual bool makVre::DtOwnershipTransferConnector::isRemoteVreOwnshipBackend ( const DtSimulationAddress & backendAddress,
const DtSimulationAddress & localVreSim ) const
protectedvirtual

Returns true if an address belongs to a remote VRE ownship backend.

Uses the backend listener's limited-capability status first, then falls back to a recent remote VRE station status record.

Parameters
backendAddressSimulation address to classify.
localVreSimThis station's VRE backend address, which is never remote.
Returns
True when the address identifies a remote VRE ownship backend.

◆ needsTowingOwnershipTransfer()

virtual bool makVre::DtOwnershipTransferConnector::needsTowingOwnershipTransfer ( const DtUUID & entityUuid) const
protectedvirtual

Returns true if the reflected entity was acquired through towing.

◆ isOwnershipTransferDisabledForEntity()

virtual bool makVre::DtOwnershipTransferConnector::isOwnershipTransferDisabledForEntity ( const DtEntityIdentifier & entityId) const
protectedvirtual

Returns true when the entity's DisableOwnershipTransfer state property is True.

Parameters
entityIdThe entity to check

◆ statePropertySimAddress()

virtual DtSimulationAddress makVre::DtOwnershipTransferConnector::statePropertySimAddress ( const DtUUID & entityUuid,
const std::string & propertyName ) const
protectedvirtual

Reads a simulation-address-valued reflected state property.

◆ releaseTargetsForEntity()

virtual std::vector< DtSimulationAddress > makVre::DtOwnershipTransferConnector::releaseTargetsForEntity ( const DtUUID & entityUuid,
bool towingRelease ) const
protectedvirtual

Resolves active candidate target backends for releasing an entity.

Prefers LastVreSim for towing releases, then LastVrfSim. When LastVrfSim is missing or unavailable, appends the first available backend that advertises all scenario capabilities.

◆ isBackendAvailable()

virtual bool makVre::DtOwnershipTransferConnector::isBackendAvailable ( const DtSimulationAddress & backendAddress) const
protectedvirtual

Returns true when the backend listener currently lists an address.

Parameters
backendAddressSimulation address of the backend to find.
Returns
True when the address is non-null and belongs to a known backend.

◆ ownershipTransferAvailable()

bool makVre::DtOwnershipTransferConnector::ownershipTransferAvailable ( ) const
protected

Returns whether ownership transfer may run in the current session.

Returns false before the app-level manager is available and for unhosted or self-hosted sessions.

◆ clearTowingOwnershipTransferMarker()

virtual void makVre::DtOwnershipTransferConnector::clearTowingOwnershipTransferMarker ( const DtEntityIdentifier & entityId) const
protectedvirtual

Clears the reflected towing transfer marker after release succeeds.

◆ resetActiveDeadline()

virtual void makVre::DtOwnershipTransferConnector::resetActiveDeadline ( )
protectedvirtual

Resets the active operation's deadline using settings (or default).

◆ publishResponse()

virtual void makVre::DtOwnershipTransferConnector::publishResponse ( const OwnershipOperation & op,
OwnershipTransferResponseMessage::ResponseStatus status,
const std::string & msg = std::string() ) const
protectedvirtual

Publishes an OwnershipTransferResponseMessage for the given operation.

Parameters
opThe operation whose request id/entity is used to build the response.
statusThe response status code to publish.
msgOptional human-readable message.

◆ publishFailureIfExternal()

virtual void makVre::DtOwnershipTransferConnector::publishFailureIfExternal ( const OwnershipOperation & op,
const std::string & failureMsg ) const
protectedvirtual

Publishes a failure response for the operation only if it is externally visible (not an internal auto-divest and not idle-initiated).

◆ completeActiveOperation()

virtual void makVre::DtOwnershipTransferConnector::completeActiveOperation ( TerminalOutcome outcome,
std::string failureMsg = std::string() )
protectedvirtual

Transitions the active operation to Complete with the given outcome.

Parameters
outcomeTerminal outcome for the active operation.
failureMsgOptional failure message (cleared if not provided).

◆ enqueueAutoDivestPair()

virtual void makVre::DtOwnershipTransferConnector::enqueueAutoDivestPair ( const DtUUID & currentPrimaryUuid,
const DtEntityIdentifier & currentPrimaryId )
protectedvirtual

Inserts an auto-divest pair at the front of the queue: a Release of the current primary followed by a re-queued copy of the active Acquire. Resets phase to Idle so the next tick processes the new pair.

◆ cancelPairedAcquire()

virtual void makVre::DtOwnershipTransferConnector::cancelPairedAcquire ( unsigned int pairId,
const std::string & failureMsg )
protectedvirtual

Cancels and removes the paired Acquire from the queue and publishes failure if it was externally visible.

◆ prepareSecondarySlot()

virtual bool makVre::DtOwnershipTransferConnector::prepareSecondarySlot ( const DtSimulationAddress & vreSim,
std::string & outFailReason )
protectedvirtual

Checks whether the secondary slot can be used. If occupied by a stale entity, clears it. Returns false (with reason) if occupied by a live entity.

◆ tickIdleRelease()

virtual void makVre::DtOwnershipTransferConnector::tickIdleRelease ( double dt)
protectedvirtual

Decrements the idle-release deadline and enqueues automatic release operations when it expires.

Internally gated: only counts down when phase==Idle && queue empty.

Parameters
dtElapsed seconds since the previous tick.

◆ validateOwnshipEntity()

virtual void makVre::DtOwnershipTransferConnector::validateOwnshipEntity ( double dt)
protectedvirtual

Validates that the currently-owned entity still exists on our backend, with a grace period before clearing stale ownership.

Parameters
dtElapsed seconds since the previous tick.

◆ blockingRelease()

virtual void makVre::DtOwnershipTransferConnector::blockingRelease ( const DtUUID & uuid,
const DtEntityIdentifier & entityId )
protectedvirtual

Releases an entity immediately during shutdown using sendImmediately=true, then clears local ownership attributes without waiting for backend response.

Parameters
uuidThe UUID of the entity to release.
entityIdThe entity identifier to release.

Member Data Documentation

◆ myExerciseConnInitializer

const DtExerciseConnInitializer* makVre::DtOwnershipTransferConnector::myExerciseConnInitializer = nullptr
protected

Exercise connection initializer used to build protocol-specific connection parameters.

Non-owning pointer sourced from the VR-Link driver during install(). Lifetime is guaranteed to outlive this connector.

◆ myVrfRemoteController

makVrf::DtVrlinkVrfRemoteController* makVre::DtOwnershipTransferConnector::myVrfRemoteController = nullptr
protected

Non-owning pointer to the shared VRF remote controller.

◆ myOwnershipTransferManagerAttr

DtAttributeHandleType<DtOwnershipTransferManager*> makVre::DtOwnershipTransferConnector::myOwnershipTransferManagerAttr
protected

Attribute handle for the app-level ownership-transfer manager.

Bound during install() to the non-owning manager pointer published by DtPlayerStationApp.

Attribute Store KeyownershipTransferManager

◆ myReflectedEntityList

DtReflectedExtEntityList* makVre::DtOwnershipTransferConnector::myReflectedEntityList = nullptr
protected

Non-owning pointer to the reflected entity list.

◆ myOperationQueue

std::deque<OwnershipOperation> makVre::DtOwnershipTransferConnector::myOperationQueue
protected

FIFO operation queue. Handlers only push; tick() pops.

◆ myActive

ActiveOperation makVre::DtOwnershipTransferConnector::myActive
protected

The currently executing operation and its phase.

◆ myResponseQueue

std::deque<OwnershipResponse> makVre::DtOwnershipTransferConnector::myResponseQueue
protected

VRF response queue. Callback pushes; tick() drains. Same thread — no mutex.

◆ myNextPairId

unsigned int makVre::DtOwnershipTransferConnector::myNextPairId = 1
protected

Monotonically increasing pair ID counter for linking auto-divest operations.

◆ myBackendDirtyFlag

bool makVre::DtOwnershipTransferConnector::myBackendDirtyFlag = false
protected

Set to true by onBackendEnabledChanged(); read and cleared by detectBackendChange().

◆ myVreBackendAttr

DtAttributeHandleType<DtSimulationAddress> makVre::DtOwnershipTransferConnector::myVreBackendAttr
protected

Current VRE Sim backend simulation address.

Attribute Store KeyvreBackendStatus.SimAddress

◆ myOwnedEntityUuidAttr

DtAttributeHandleType<DtUUID> makVre::DtOwnershipTransferConnector::myOwnedEntityUuidAttr
protected

Owned entity UUID. Written on acquire success, cleared on release/shutdown.

Attribute Store KeyownedEntityUuid

◆ myOwnedEntityIdAttr

DtAttributeHandleType<DtEntityIdentifier> makVre::DtOwnershipTransferConnector::myOwnedEntityIdAttr
protected

Owned entity identifier. Written alongside UUID.

Attribute Store KeyownedEntityId

◆ mySecondaryOwnedEntityUuidAttr

DtAttributeHandleType<DtUUID> makVre::DtOwnershipTransferConnector::mySecondaryOwnedEntityUuidAttr
protected

Secondary (embarked) entity UUID.

Attribute Store KeysecondaryOwnedEntityUuid

◆ mySecondaryOwnedEntityIdAttr

DtAttributeHandleType<DtEntityIdentifier> makVre::DtOwnershipTransferConnector::mySecondaryOwnedEntityIdAttr
protected

Secondary (embarked) entity identifier.

Attribute Store KeysecondaryOwnedEntityId

◆ myLocalEntityIdAttr

DtAttributeHandleType<DtEntityIdentifier> makVre::DtOwnershipTransferConnector::myLocalEntityIdAttr
protected

Local station's currently engaged entity.

Attribute Store KeyentityId

◆ myVreStatusStationsAttr

DtAttributeHandleType<std::vector<std::string> > makVre::DtOwnershipTransferConnector::myVreStatusStationsAttr
protected

Recent remote VRE station statuses used to identify ownship backends.

Attribute Store KeyvreStatus.stations

◆ myIdleReleaseDeadline

double makVre::DtOwnershipTransferConnector::myIdleReleaseDeadline = 0.0
protected

Seconds remaining before the idle-release timer fires. Zero means no timer is armed.

◆ myIdleReleaseEntityUuid

DtUUID makVre::DtOwnershipTransferConnector::myIdleReleaseEntityUuid
protected

UUID of the entity the idle-release timer is armed for.

◆ myIdleReleaseEntityId

DtEntityIdentifier makVre::DtOwnershipTransferConnector::myIdleReleaseEntityId
protected

Entity identifier the idle-release timer is armed for.

◆ myPreviousVreBackendAddr

DtSimulationAddress makVre::DtOwnershipTransferConnector::myPreviousVreBackendAddr
protected

Previous VRE backend address, tracked to detect disconnects.

◆ myValidationGrace

double makVre::DtOwnershipTransferConnector::myValidationGrace = 0.0
protected

Grace countdown for ownship entity validation (seconds).


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