|
VR-Engage
2.2
|
Interface message for requesting sensor data
This class is used to request sensor data messages to be sent from a DtObjectSensor. It supports three types of requests: one-time updates, subscriptions for continuous updates, and unsubscribe operations to cancel existing subscriptions.
#include <ifVreSensorDataRequest.h>
Public Types | |
| enum | RequestType { ONE_UPDATE , SUBSCRIBE , UNSUBSCRIBE } |
Public Member Functions | |
| DtIfVreSensorDataRequest () | |
| DtIfVreSensorDataRequest (const DtIfVreSensorDataRequest &orig) | |
| const DtIfVreSensorDataRequest & | operator= (const DtIfVreSensorDataRequest &orig) |
| virtual | ~DtIfVreSensorDataRequest () override |
| virtual int | type () const override |
| virtual DtSimInterfaceContent * | clone () const override |
| virtual void | setUUID (const DtUUID &uuid) |
| virtual const DtUUID & | uuid () const |
| virtual void | setSensorType (const int type) |
| virtual int | sensorType () const |
| virtual void | setSubscriberId (const unsigned long id) |
| virtual unsigned long | subscriberId () const |
| virtual void | setRequestType (const RequestType type) |
| virtual RequestType | requestType () 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 | |
| DtUUID | myUUID |
| DtU32 | mySensorType |
| DtU64 | mySubscriberId |
| DtU32 | myRequestType |
| DtIfVreSensorDataRequest::DtIfVreSensorDataRequest | ( | ) |
Default constructor.
Initializes an empty sensor data request message.
Referenced by DtIfVreSensorDataRequest(), and operator=().
| DtIfVreSensorDataRequest::DtIfVreSensorDataRequest | ( | const DtIfVreSensorDataRequest & | orig | ) |
Copy constructor.
| orig | The sensor data request to copy from |
Creates a new sensor data request message by copying an existing one.
References DtIfVreSensorDataRequest().
|
overridevirtual |
Virtual destructor.
| const DtIfVreSensorDataRequest & DtIfVreSensorDataRequest::operator= | ( | const DtIfVreSensorDataRequest & | orig | ) |
Assignment operator.
| orig | The sensor data request to copy from |
Copies the contents of another sensor data request message into this one.
References DtIfVreSensorDataRequest().
|
overridevirtual |
Gets the interface message type.
Returns DtVreSensorDataRequestMessageType as defined in vreVrfMessageTypes.h.
Referenced by setRequestType(), and setSensorType().
|
overridevirtual |
Creates a copy of this message.
Creates a dynamically allocated copy of this message.
|
virtual |
Sets the UUID of the entity whose sensor data is being requested.
| uuid | The entity UUID to set |
Sets the UUID of the entity whose sensor data is being requested. This identifies the specific entity in the simulation that has the sensor.
References uuid().
|
virtual |
Gets the UUID of the entity whose sensor data is being requested.
Referenced by setUUID().
|
virtual |
Sets the sensor type.
| type | The sensor type identifier |
Sets the type of sensor for which data is being requested. Sensor types are defined in the system and determine what kind of sensor data will be provided in response.
References type().
|
virtual |
Gets the sensor type.
|
virtual |
Sets the subscriber identifier.
| id | The subscriber identifier |
Sets the unique identifier for the subscriber requesting the data. This is used to manage multiple subscriptions and route responses.
|
virtual |
Gets the subscriber identifier.
|
virtual |
Sets the request type.
| type | The request type (ONE_UPDATE, SUBSCRIBE, or UNSUBSCRIBE) |
Sets the type of request being made. This determines how the sensor system will handle the request (single update vs. continuous updates).
References type().
|
virtual |
Gets the request type.
|
overridevirtual |
Gets the network representation size.
Returns the size of the network buffer needed to store this message.
|
overridevirtual |
Deserializes the message from a network buffer.
| contentBuffer | Pointer to the network buffer |
| contentSize | Size of the buffer in bytes |
Fills the message from the provided network buffer.
|
overridevirtual |
Serializes the message for network transmission.
Prepares the message for network transmission.
|
overridevirtual |
Formats the message data as a string.
| str | String to store the formatted message data |
Appends a human-readable representation of the message to the provided string.
|
static |
Static creator function for factory registration.
This static function is used for registration with DtInterfaceContentFactory.
|
protected |
UUID of the entity whose sensor data is being requested.
|
protected |
Type of sensor for which data is being requested.
|
protected |
Unique identifier for the subscriber requesting the data.
|
protected |
Type of request (ONE_UPDATE, SUBSCRIBE, or UNSUBSCRIBE)