VR-Engage  2.2
Loading...
Searching...
No Matches
rfxEntityListMessage.h
Go to the documentation of this file.
1// ******************************************************************************
2// ** Copyright (c) 2025 MAK Technologies
3// ** All rights reserved.
4// ******************************************************************************
5
6//! \file rfxEntityListMessage.h
7//! \brief Defines the request and response messages for entity list queries
8//! \ingroup vreRadarFxShared
9//!
10//! This file contains message classes for requesting the list of entities
11//! in the simulation and receiving the entity data
12
13#pragma once
14
15#include "export.h"
16#include "rfxMessage.h"
17
18#include <vlutil/vlString.h>
19#include <matrix/vlVector.h>
20
21#include <vector>
22#include <string>
23
24
25namespace makRadarFx
26{
27//! \brief Entity description data structure
28//!
29//! Contains information about an entity in the simulation,
30//! including its identifier, marking text, and entity type
32{
33 //! \brief Entity's unique simulation identifier
34 std::string myId;
35
36 //! \brief Entity's marking text (e.g., callsign or designation)
37 std::string myMarkingText;
38
39 //! \brief Entity's type classification
40 std::string myEntityType;
41};
42
43//! \brief Request message for entity list information
44//!
45//! This message requests the list of all entities currently present
46//! in the simulation. The response provides descriptive information
47//! about each entity.
49{
50public:
51 //! \brief Default constructor
52 //!
53 //! Initializes a new entity list request message
55
56 //! \brief Virtual destructor
58
59 //! \brief size of the message
60 virtual int messageSize();
61 //! \brief decode a message. Used by the factory
62 static DtBaseMessage* decode(unsigned char* buffer, int length);
63 //! \brief clone a message. Caller of function is responsible managing this memory
64 virtual DtBaseMessage* clone();
65
66protected:
67 virtual void serialize(DtStreamWriter& writer);
68 virtual void deserialize(DtStreamReader& reader);
69};
70
71
72//! \brief Response message containing the list of entities in the simulation
73//!
74//! This message contains the response to an entity list request, providing
75//! descriptive information about all entities currently present in the simulation.
76//! If there are no entities, the list will be empty.
78{
79public:
80 //! \brief Default constructor
81 //!
82 //! Initializes a new entity list response message with an empty entity list
84
85 //! \brief Virtual destructor
87
88 //! \brief Sets the list of entities
89 //! \param entities Vector of entity descriptions to set
90 //!
91 //! Sets the list of all entities currently in the simulation.
92 //! This list will be empty if there are no entities within the simulation.
93 virtual void setEntityList(std::vector<DtEntityDescription> entities);
94
95 //! \brief Gets the list of entities
96 //! \return Vector of entity descriptions
97 //!
98 //! Returns the list of all entities currently in the simulation.
99 //! This list will be empty if there are no entities within the simulation.
100 virtual std::vector<DtEntityDescription> entityList();
101
102 //! \brief size of the message
103 virtual int messageSize();
104 //! \brief decode a message. Used by the factory
105 static DtBaseMessage* decode(unsigned char* buffer, int length);
106 //! \brief clone a message. Caller of function is responsible managing this memory
108
109protected:
110 //! \brief Serializes the message data to a stream writer
111 //! \param writer Reference to the stream writer to write the data to
112 virtual void serialize(DtStreamWriter& writer);
113
114 //! \brief Deserializes message data from a stream reader
115 //! \param reader Reference to the stream reader to read the data from
116 virtual void deserialize(DtStreamReader& reader);
117
118 //! \brief List of entity descriptions in the simulation
119 std::vector<DtEntityDescription> myEntities;
120};
121} // namespace makRadarFx
DtBaseMessage()
Default constructor.
virtual ~DtEntityListRequest()
Virtual destructor.
virtual int messageSize()
size of the message
virtual void deserialize(DtStreamReader &reader)
Deserializes message data from a stream reader.
virtual DtBaseMessage * clone()
clone a message. Caller of function is responsible managing this memory
virtual void serialize(DtStreamWriter &writer)
Serializes the message data to a stream writer.
DtEntityListRequest()
Default constructor.
static DtBaseMessage * decode(unsigned char *buffer, int length)
decode a message. Used by the factory
virtual DtBaseMessage * clone()
clone a message. Caller of function is responsible managing this memory
virtual std::vector< DtEntityDescription > entityList()
Gets the list of entities.
virtual void serialize(DtStreamWriter &writer)
Serializes the message data to a stream writer.
virtual int messageSize()
size of the message
virtual void setEntityList(std::vector< DtEntityDescription > entities)
Sets the list of entities.
std::vector< DtEntityDescription > myEntities
List of entity descriptions in the simulation.
Definition rfxEntityListMessage.h:119
virtual ~DtEntityListResponse()
Virtual destructor.
DtEntityListResponse()
Default constructor.
virtual void deserialize(DtStreamReader &reader)
Deserializes message data from a stream reader.
static DtBaseMessage * decode(unsigned char *buffer, int length)
decode a message. Used by the factory
Stream reader for decoding values from a byte array in little endian format.
Definition byteStream.h:32
Stream writer for encoding values into a byte array in little endian format.
Definition byteStream.h:159
Defines export macros for the RadarFx Shared library.
#define RFX_DLL_SHARED
Export/import macro for non-Windows platforms (empty)
Definition export.h:25
Definition radarFxConnectorDriver.h:21
Defines the base message class for RadarFX client-server communication.
Entity description data structure.
Definition rfxEntityListMessage.h:32
std::string myId
Entity's unique simulation identifier.
Definition rfxEntityListMessage.h:34
std::string myEntityType
Entity's type classification.
Definition rfxEntityListMessage.h:40
std::string myMarkingText
Entity's marking text (e.g., callsign or designation)
Definition rfxEntityListMessage.h:37