|
VR-Engage
2.2
|
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>
Public Member Functions | |
| DtSetVreControlledRequest () | |
| DtSetVreControlledRequest (const DtString &writeName, DtReaderWriterRegistry *parentRegistry=0) | |
| DtSetVreControlledRequest (const DtString &writeName, const DtSetVreControlledRequest &orig, DtReaderWriterRegistry *parentRegistry=0) | |
| const DtSetVreControlledRequest & | operator= (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 |
| makVre::DtSetVreControlledRequest::DtSetVreControlledRequest | ( | ) |
Default constructor.
Initializes an empty VREngage control state request.
Referenced by DtSetVreControlledRequest(), and operator=().
| makVre::DtSetVreControlledRequest::DtSetVreControlledRequest | ( | const DtString & | writeName, |
| DtReaderWriterRegistry * | parentRegistry = 0 ) |
Named constructor for reader/writer functionality.
| writeName | The name to identify this request |
| parentRegistry | Optional reader-writer registry for serialization |
If you have a request 'put' itself, the writeName will preface it.
| makVre::DtSetVreControlledRequest::DtSetVreControlledRequest | ( | const DtString & | writeName, |
| const DtSetVreControlledRequest & | orig, | ||
| DtReaderWriterRegistry * | parentRegistry = 0 ) |
Copy constructor.
| writeName | The name to identify this request |
| orig | The request to copy from |
| parentRegistry | Optional reader-writer registry for serialization |
Creates a new request by copying an existing one.
References DtSetVreControlledRequest().
|
overridevirtual |
Virtual destructor.
| const DtSetVreControlledRequest & makVre::DtSetVreControlledRequest::operator= | ( | const DtSetVreControlledRequest & | orig | ) |
Assignment operator.
| orig | The request to copy from |
Copies the contents of another request into this one.
References DtSetVreControlledRequest().
|
overridevirtual |
Gets the message type.
Returns DtSetVreControlledType as the message type identifier.
|
overridevirtual |
Creates a copy of this request.
| name | The name to identify the cloned request |
| parentRegistry | Optional reader-writer registry for serialization |
Creates a deep copy of the request for factory system use.
|
overridevirtual |
Gets a human-readable string representation.
Provides a human-readable representation of this request for debugging and logging.
|
virtual |
Gets the simulation address of the player station.
Returns the simulation address of the VREngage player station that is controlling the entity.
|
virtual |
Sets the simulation address of the player station.
| address | The simulation address to set |
Sets the simulation address of the VREngage player station that is controlling the entity.
|
virtual |
Gets the published ID of the player station.
Returns the unique identifier for the VREngage player station that is controlling the entity.
Referenced by makVre::DtVreSetController< SetControllerBase >::processSetPlayerControlled().
|
virtual |
Sets the published ID of the player station.
| id | The unique ID to set |
Sets the unique identifier for the VREngage player station that is controlling the entity.
|
virtual |
Gets the published name of the player station.
Returns the name of the VREngage player station that is controlling the entity.
|
virtual |
Sets the published name of the player station.
| name | The station name to set |
Sets the name of the VREngage player station that is controlling the entity.
|
virtual |
Gets the player station control state.
Returns whether the entity is currently controlled by a VREngage player station.
Referenced by makVre::DtVreSetController< SetControllerBase >::processSetPlayerControlled().
|
virtual |
Sets the player station control state.
| trueFalse | True 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.
|
virtual |
Gets the controlled roles for the entity.
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().
|
virtual |
Sets the controlled roles for the entity.
| description | List 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.
|
overridevirtual |
Gets the network representation size.
Returns the size of the network buffer needed to store this request, padded to an 8-byte boundary for alignment.
|
overridevirtual |
Deserializes the request from a network buffer.
| contentBuffer | Pointer to the network buffer |
| contentSize | Size of the buffer in bytes |
Fills the request from the provided network buffer.
|
overridevirtual |
Serializes the request for network transmission.
Fills in the network buffer (created by base class setDataRequest) with the request contents for transmission.
|
static |
Static creator function for factory registration.
This static function is used for registration with the request factory system.
|
protected |
Simulation address of the controlling player station.
|
protected |
Unique identifier for the controlling player station.
|
protected |
Name of the controlling player station.
|
protected |
Flag indicating whether the entity is player station controlled.
|
protected |
List of roles/stations that are controlled.
Contains strings like "gunner", "driver", "commander", or "entity".