VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtSetVreControlledRequest Class Reference

Detailed Description

This class is used to inform a VRForces back-end that an entity is being controlled by a VREngage player station. The message includes the identity of the controlling application, station information, and role information (e.g., gunner, driver, commander, or entity-level control).

#include <setVreControlled.h>

Inheritance diagram for makVre::DtSetVreControlledRequest:
[legend]

Public Member Functions

 DtSetVreControlledRequest ()
 
 DtSetVreControlledRequest (const DtString &writeName, DtReaderWriterRegistry *parentRegistry=0)
 
 DtSetVreControlledRequest (const DtString &writeName, const DtSetVreControlledRequest &orig, DtReaderWriterRegistry *parentRegistry=0)
 
const DtSetVreControlledRequestoperator= (const DtSetVreControlledRequest &orig)
 
virtual ~DtSetVreControlledRequest () override
 
virtual const DtSetMessageType & type () const override
 
virtual DtSetDataRequest * clone (const DtString &name, DtReaderWriterRegistry *parentRegistry=0) const override
 
virtual DtString stringRep () const override
 
virtual DtSimulationAddress simulationAddress () const
 
virtual void setSimulationAddress (const DtSimulationAddress &address)
 
virtual unsigned stationId () const
 
virtual void setStationId (unsigned id)
 
virtual std::string stationName () const
 
virtual void setStationName (const std::string &name)
 
virtual bool playerStationControlled () const
 
virtual void setPlayerStationControlled (bool trueFalse)
 
virtual std::vector< std::string > roles () const
 
virtual void setRoles (const std::vector< std::string > &description)
 
virtual int netRepSize () const override
 
virtual bool setFromNet (const char *contentBuffer, unsigned contentSize) override
 
virtual bool setToNet () override
 

Static Public Member Functions

static DtSetDataRequest * creator ()
 

Protected Attributes

DtRwSimulationAddress mySimulationAddress
 
DtRwUnsigned myStationId
 
DtRwString myStationName
 
DtRwBoolean myIsPlayerStationControlled
 
DtRwStringList myRoles
 

Constructor & Destructor Documentation

◆ DtSetVreControlledRequest() [1/3]

makVre::DtSetVreControlledRequest::DtSetVreControlledRequest ( )

Default constructor.

Initializes an empty VREngage control state request.

Referenced by DtSetVreControlledRequest(), and operator=().

◆ DtSetVreControlledRequest() [2/3]

makVre::DtSetVreControlledRequest::DtSetVreControlledRequest ( const DtString & writeName,
DtReaderWriterRegistry * parentRegistry = 0 )

Named constructor for reader/writer functionality.

Parameters
writeNameThe name to identify this request
parentRegistryOptional reader-writer registry for serialization

If you have a request 'put' itself, the writeName will preface it.

◆ DtSetVreControlledRequest() [3/3]

makVre::DtSetVreControlledRequest::DtSetVreControlledRequest ( const DtString & writeName,
const DtSetVreControlledRequest & orig,
DtReaderWriterRegistry * parentRegistry = 0 )

Copy constructor.

Parameters
writeNameThe name to identify this request
origThe request to copy from
parentRegistryOptional reader-writer registry for serialization

Creates a new request by copying an existing one.

References DtSetVreControlledRequest().

◆ ~DtSetVreControlledRequest()

virtual makVre::DtSetVreControlledRequest::~DtSetVreControlledRequest ( )
overridevirtual

Virtual destructor.

Member Function Documentation

◆ operator=()

const DtSetVreControlledRequest & makVre::DtSetVreControlledRequest::operator= ( const DtSetVreControlledRequest & orig)

Assignment operator.

Parameters
origThe request to copy from
Returns
Reference to this object after assignment

Copies the contents of another request into this one.

References DtSetVreControlledRequest().

◆ type()

virtual const DtSetMessageType & makVre::DtSetVreControlledRequest::type ( ) const
overridevirtual

Gets the message type.

Returns
The message type identifier

Returns DtSetVreControlledType as the message type identifier.

◆ clone()

virtual DtSetDataRequest * makVre::DtSetVreControlledRequest::clone ( const DtString & name,
DtReaderWriterRegistry * parentRegistry = 0 ) const
overridevirtual

Creates a copy of this request.

Parameters
nameThe name to identify the cloned request
parentRegistryOptional reader-writer registry for serialization
Returns
Pointer to a new dynamically allocated copy

Creates a deep copy of the request for factory system use.

◆ stringRep()

virtual DtString makVre::DtSetVreControlledRequest::stringRep ( ) const
overridevirtual

Gets a human-readable string representation.

Returns
String containing a human-readable representation of the request

Provides a human-readable representation of this request for debugging and logging.

◆ simulationAddress()

virtual DtSimulationAddress makVre::DtSetVreControlledRequest::simulationAddress ( ) const
virtual

Gets the simulation address of the player station.

Returns
The simulation address of the controlling player station

Returns the simulation address of the VREngage player station that is controlling the entity.

◆ setSimulationAddress()

virtual void makVre::DtSetVreControlledRequest::setSimulationAddress ( const DtSimulationAddress & address)
virtual

Sets the simulation address of the player station.

Parameters
addressThe simulation address to set

Sets the simulation address of the VREngage player station that is controlling the entity.

◆ stationId()

virtual unsigned makVre::DtSetVreControlledRequest::stationId ( ) const
virtual

Gets the published ID of the player station.

Returns
The unique ID of the controlling player station

Returns the unique identifier for the VREngage player station that is controlling the entity.

Referenced by makVre::DtVreSetController< SetControllerBase >::processSetPlayerControlled().

◆ setStationId()

virtual void makVre::DtSetVreControlledRequest::setStationId ( unsigned id)
virtual

Sets the published ID of the player station.

Parameters
idThe unique ID to set

Sets the unique identifier for the VREngage player station that is controlling the entity.

◆ stationName()

virtual std::string makVre::DtSetVreControlledRequest::stationName ( ) const
virtual

Gets the published name of the player station.

Returns
The name of the controlling player station

Returns the name of the VREngage player station that is controlling the entity.

◆ setStationName()

virtual void makVre::DtSetVreControlledRequest::setStationName ( const std::string & name)
virtual

Sets the published name of the player station.

Parameters
nameThe station name to set

Sets the name of the VREngage player station that is controlling the entity.

◆ playerStationControlled()

virtual bool makVre::DtSetVreControlledRequest::playerStationControlled ( ) const
virtual

Gets the player station control state.

Returns
True if the entity is player station controlled, false otherwise

Returns whether the entity is currently controlled by a VREngage player station.

Referenced by makVre::DtVreSetController< SetControllerBase >::processSetPlayerControlled().

◆ setPlayerStationControlled()

virtual void makVre::DtSetVreControlledRequest::setPlayerStationControlled ( bool trueFalse)
virtual

Sets the player station control state.

Parameters
trueFalseTrue to enable player station control, false to disable

Sets whether the entity is controlled by a VREngage player station. When set to false, this can be used to release control back to AI.

◆ roles()

virtual std::vector< std::string > makVre::DtSetVreControlledRequest::roles ( ) const
virtual

Gets the controlled roles for the entity.

Returns
List of role strings indicating which stations are controlled

Returns a list of strings indicating which roles/stations are controlled by the VREngage player station, such as "gunner", "driver", "commander", or "entity" for entity-level control.

Referenced by makVre::DtVreSetController< SetControllerBase >::processSetPlayerControlled().

◆ setRoles()

virtual void makVre::DtSetVreControlledRequest::setRoles ( const std::vector< std::string > & description)
virtual

Sets the controlled roles for the entity.

Parameters
descriptionList of role strings indicating which stations are controlled

Sets the list of strings indicating which roles/stations are controlled by the VREngage player station, such as "gunner", "driver", "commander", or "entity" for entity-level control.

◆ netRepSize()

virtual int makVre::DtSetVreControlledRequest::netRepSize ( ) const
overridevirtual

Gets the network representation size.

Returns
Size in bytes of the network representation

Returns the size of the network buffer needed to store this request, padded to an 8-byte boundary for alignment.

◆ setFromNet()

virtual bool makVre::DtSetVreControlledRequest::setFromNet ( const char * contentBuffer,
unsigned contentSize )
overridevirtual

Deserializes the request from a network buffer.

Parameters
contentBufferPointer to the network buffer
contentSizeSize of the buffer in bytes
Returns
True if deserialization was successful

Fills the request from the provided network buffer.

◆ setToNet()

virtual bool makVre::DtSetVreControlledRequest::setToNet ( )
overridevirtual

Serializes the request for network transmission.

Returns
True if serialization was successful

Fills in the network buffer (created by base class setDataRequest) with the request contents for transmission.

◆ creator()

static DtSetDataRequest * makVre::DtSetVreControlledRequest::creator ( )
static

Static creator function for factory registration.

Returns
Pointer to a new instance of DtSetVreControlledRequest

This static function is used for registration with the request factory system.

Member Data Documentation

◆ mySimulationAddress

DtRwSimulationAddress makVre::DtSetVreControlledRequest::mySimulationAddress
protected

Simulation address of the controlling player station.

◆ myStationId

DtRwUnsigned makVre::DtSetVreControlledRequest::myStationId
protected

Unique identifier for the controlling player station.

◆ myStationName

DtRwString makVre::DtSetVreControlledRequest::myStationName
protected

Name of the controlling player station.

◆ myIsPlayerStationControlled

DtRwBoolean makVre::DtSetVreControlledRequest::myIsPlayerStationControlled
protected

Flag indicating whether the entity is player station controlled.

◆ myRoles

DtRwStringList makVre::DtSetVreControlledRequest::myRoles
protected

List of roles/stations that are controlled.

Contains strings like "gunner", "driver", "commander", or "entity".


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