|
VR-Engage
2.3
|
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 std::string | stationId () const |
| virtual void | setStationId (const std::string &id) |
| 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 std::string | roleName () const |
| virtual void | setRoleName (const std::string &roleName) |
| 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 |
| DtRwString | myStationId |
| DtRwString | myRoleName |
| DtRwBoolean | myIsPlayerStationControlled |
| DtRwStringList | myRoleTypes |
| 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.
|
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 player station control state.
Returns whether the entity is currently controlled by a VREngage player station.
|
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 role types for the entity.
Returns a list of strings indicating which role-type keys are controlled by the VREngage player station, such as "gunner", "driver", "commander", or "entity" for entity-level control.
|
virtual |
Sets the controlled role types for the entity.
| description | List of role-type strings indicating which role entries are controlled |
Sets the list of strings indicating which role-type keys are controlled by the VREngage player station, such as "gunner", "driver", "commander", or "entity" for entity-level control.
|
virtual |
Gets the entity-role name associated with the control request.
Returns the role name that should be written into the "Role" field of the structured station entry in the published "Roles" state property.
Referenced by setRoleName().
|
virtual |
Sets the entity-role name associated with the control request.
| roleName | The entity-role name to store in the request. |
Sets the role name that should be written into the "Role" field of the structured station entry in the published "Roles" state property.
References roleName().
|
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 |
Entity-role name stored for the structured "Role" field.
|
protected |
Flag indicating whether the entity is player station controlled.
|
protected |
List of role-type keys that are controlled.
Contains strings like "gunner", "driver", "commander", or "entity".