VR-Engage  2.2
Loading...
Searching...
No Matches
DtIfVreStatus Class Reference

Detailed Description

Instances of DtIfVreStatus messages are sent out by a VREngage application to announce its availability as a role player and its current entity assignment status. These status messages enable coordination between multiple VREngage stations and other simulation components.

#include <ifVreStatus.h>

Inheritance diagram for DtIfVreStatus:
[legend]

Public Member Functions

 DtIfVreStatus ()
 
virtual ~DtIfVreStatus () override
 
 DtIfVreStatus (const DtIfVreStatus &orig)
 
DtIfVreStatusoperator= (const DtIfVreStatus &orig)
 
virtual int type () const override
 
virtual DtSimInterfaceContent * clone () const override
 
virtual void setId (unsigned long id)
 
virtual unsigned long id () const
 
virtual void setName (const DtString &name)
 
virtual DtString name () const
 
virtual void setPlayerName (const DtString &name)
 
virtual DtString playerName () const
 
virtual void setUUID (const DtString &uuid)
 
virtual DtString uuid () const
 
virtual void setStationName (const DtString &name)
 
virtual DtString stationName () const
 
virtual void setSpectatorMode (bool mode)
 
virtual bool spectatorMode () const
 
virtual void setFinalStatusMessage (bool yesNo)
 
virtual bool finalStatusMessage () const
 
virtual int netRepSize () const override
 
virtual bool setFromNet (const char *contentBuffer, unsigned contentSize) override
 
virtual bool setToNet () override
 
virtual void printDataToString (DtString &str) override
 

Static Public Member Functions

static DtSimInterfaceContent * creator ()
 

Protected Attributes

DtU32 myVersion
 
DtU64 myId
 
DtString myName
 
DtString myPlayerName
 
DtString myUUID
 
DtString myStationName
 
bool mySpectatorMode
 
bool myFinalStatusMessage
 

Constructor & Destructor Documentation

◆ DtIfVreStatus() [1/2]

DtIfVreStatus::DtIfVreStatus ( )

Default constructor.

Initializes an empty VREngage status message.

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

◆ ~DtIfVreStatus()

virtual DtIfVreStatus::~DtIfVreStatus ( )
overridevirtual

Virtual destructor.

◆ DtIfVreStatus() [2/2]

DtIfVreStatus::DtIfVreStatus ( const DtIfVreStatus & orig)

Copy constructor.

Parameters
origThe VREngage status message to copy from

Creates a new VREngage status message by copying an existing one.

References DtIfVreStatus().

Member Function Documentation

◆ operator=()

DtIfVreStatus & DtIfVreStatus::operator= ( const DtIfVreStatus & orig)

Assignment operator.

Parameters
origThe VREngage status message to copy from
Returns
Reference to this object after assignment

Copies the contents of another VREngage status message into this one.

References DtIfVreStatus().

◆ type()

virtual int DtIfVreStatus::type ( ) const
overridevirtual

Gets the interface message type.

Returns
The message type identifier

Returns DtVreStatusMessageType as defined in vreVrfMessageTypes.h.

◆ clone()

virtual DtSimInterfaceContent * DtIfVreStatus::clone ( ) const
overridevirtual

Creates a copy of this message.

Returns
Pointer to the new copy

Creates a dynamically allocated copy of this message.

◆ setId()

virtual void DtIfVreStatus::setId ( unsigned long id)
virtual

Sets the identifier of the VREngage application.

Parameters
idThe unique identifier to set

Sets the unique identifier for the VREngage application. This must be unique across all VREngage stations in an exercise and must not change over the lifetime of the application.

◆ id()

virtual unsigned long DtIfVreStatus::id ( ) const
virtual

Gets the identifier of the VREngage application.

Returns
The VREngage application identifier

◆ setName()

virtual void DtIfVreStatus::setName ( const DtString & name)
virtual

Sets the name of the VREngage application.

Parameters
nameThe application name to set

Sets the name of the VREngage application. This should be unique across all participating VREngage applications in an exercise, but unlike the ID, it may be changed during the lifetime of the application.

References name().

◆ name()

virtual DtString DtIfVreStatus::name ( ) const
virtual

Gets the name of the VREngage application.

Returns
The application name

Referenced by setName(), setPlayerName(), and setStationName().

◆ setPlayerName()

virtual void DtIfVreStatus::setPlayerName ( const DtString & name)
virtual

Sets the name of the player using the VREngage application.

Parameters
nameThe player name to set

Sets the optional name of the human player using the VREngage application. This can be used for display purposes and user identification.

References name().

◆ playerName()

virtual DtString DtIfVreStatus::playerName ( ) const
virtual

Gets the name of the player.

Returns
The player name

◆ setUUID()

virtual void DtIfVreStatus::setUUID ( const DtString & uuid)
virtual

Sets the UUID of the entity being controlled.

Parameters
uuidThe entity UUID to set

Sets the UUID of the entity currently controlled by this VREngage station. If no entity is currently controlled, this may be empty.

References uuid().

◆ uuid()

virtual DtString DtIfVreStatus::uuid ( ) const
virtual

Gets the UUID of the entity being controlled.

Returns
The entity UUID

Referenced by setUUID().

◆ setStationName()

virtual void DtIfVreStatus::setStationName ( const DtString & name)
virtual

Sets the station/role name for the player.

Parameters
nameThe station name to set

Sets the station name (role) assumed by the player at the VREngage station. Available string identifiers for station names are defined in the VREngage player definition .entity files (e.g., "driver", "gunner", "commander").

References name().

◆ stationName()

virtual DtString DtIfVreStatus::stationName ( ) const
virtual

Gets the station/role name for the player.

Returns
The station name

◆ setSpectatorMode()

virtual void DtIfVreStatus::setSpectatorMode ( bool mode)
virtual

Sets the spectator mode flag.

Parameters
modeTrue for spectator mode, false for active player mode

Sets whether the player at the VREngage station is in spectator mode. In spectator mode, the player can observe but not interact with the entity.

◆ spectatorMode()

virtual bool DtIfVreStatus::spectatorMode ( ) const
virtual

Gets the spectator mode flag.

Returns
True if in spectator mode, false otherwise

◆ setFinalStatusMessage()

virtual void DtIfVreStatus::setFinalStatusMessage ( bool yesNo)
virtual

Sets the final status message flag.

Parameters
yesNoTrue if this is the final status message, false otherwise

Sets whether this status message is the final one to be sent by this VREngage application. When true, it indicates the application is shutting down.

◆ finalStatusMessage()

virtual bool DtIfVreStatus::finalStatusMessage ( ) const
virtual

Gets the final status message flag.

Returns
True if this is the final status message, false otherwise

◆ netRepSize()

virtual int DtIfVreStatus::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 message.

◆ setFromNet()

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

Deserializes the message from a network buffer.

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

Fills the message from the provided network buffer.

◆ setToNet()

virtual bool DtIfVreStatus::setToNet ( )
overridevirtual

Serializes the message for network transmission.

Returns
True if serialization was successful

Prepares the message for network transmission.

◆ printDataToString()

virtual void DtIfVreStatus::printDataToString ( DtString & str)
overridevirtual

Formats the message data as a string.

Parameters
strString to store the formatted message data

Appends a human-readable representation of the message to the provided string.

◆ creator()

static DtSimInterfaceContent * DtIfVreStatus::creator ( )
static

Static creator function for factory registration.

Returns
Pointer to a new instance of DtIfVreStatus

This static function is used for registration with DtInterfaceContentFactory.

Member Data Documentation

◆ myVersion

DtU32 DtIfVreStatus::myVersion
protected

Version information for the message.

The high word is a signal that the version exists, and the low word is the actual version. If this information does not exist, it is assumed to be an older status message.

◆ myId

DtU64 DtIfVreStatus::myId
protected

Unique identifier for the VREngage application.

Must be unique across all VREngage stations in an exercise and must not change over the lifetime of the application.

◆ myName

DtString DtIfVreStatus::myName
protected

Name of the VREngage application.

Should be unique across all VREngage stations in an exercise. Unlike the ID, the name may be changed during an exercise.

◆ myPlayerName

DtString DtIfVreStatus::myPlayerName
protected

Name of the player using the VREngage application.

Optional identifier for the human user of the application.

◆ myUUID

DtString DtIfVreStatus::myUUID
protected

UUID of the entity being controlled.

Identifies the entity currently controlled by this VREngage station. May be empty if no entity is currently controlled.

◆ myStationName

DtString DtIfVreStatus::myStationName
protected

Station/role name for the player.

The station name (role) assumed by the player at the VREngage station (defined in the .entity file, e.g., "driver", "gunner", "commander").

◆ mySpectatorMode

bool DtIfVreStatus::mySpectatorMode
protected

Flag indicating whether player is in spectator mode.

When true, the player can observe but not interact with the entity.

◆ myFinalStatusMessage

bool DtIfVreStatus::myFinalStatusMessage
protected

Flag indicating whether this is the final status message.

When true, indicates this is the final status message to be sent by this VREngage application before shutting down.


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