VR-Engage  2.2
Loading...
Searching...
No Matches
ifRadarContactData.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file ifRadarContactData.h
7//! \ingroup vreVrfMessages
8//! \brief Interface message class for radar contact data
9//!
10//! This file defines the DtIfRadarContactData class, which encapsulates information
11//! about radar contacts detected by a radar system. It includes data about the
12//! entity owning the radar, the radar name, and a list of detected contacts.
13
14//! The DtIfRadarContactData class provides a complete representation of
15//! all contacts detected by a radar system at a specific point in time.
16#pragma once
17
20
21#include <vrfExtProtocol/simInterfaceContent.h>
22#include <vrfmsgs/sensorDataEntry.h>
23#include <vrfutil/rwUUID.h>
24
25//! \brief Interface message for radar contact data
26//!
27//! This class encapsulates the current internal state of a radar system's
28//! contact detection capability. It contains information about the entity that
29//! owns the radar, the radar's name, and a list of currently detected contacts
30//! with their respective properties.
31class VRFMESSAGES_DLL DtIfRadarContactData : public DtSimInterfaceContent
32{
33public:
34 //! \brief Default constructor
35 //!
36 //! Initializes an empty radar contact data message.
38
39 //! \brief Copy constructor
40 //! \param orig The radar contact data to copy from
41 //!
42 //! Creates a new radar contact data object by copying an existing one.
44
45 //! \brief Assignment operator
46 //! \param orig The radar contact data to copy from
47 //! \return Reference to this object after assignment
48 //!
49 //! Copies the contents of another radar contact data object into this one.
51
52 //! \brief Virtual destructor
53 virtual ~DtIfRadarContactData() override;
54
55 //! \brief Gets the interface message type
56 //! \return The message type identifier
57 //!
58 //! Returns DtRadarContactDataMessageType as defined in vreVrfMessageTypes.h.
59 virtual int type() const override;
60
61 //! \brief Creates a copy of this message
62 //! \return Pointer to the new copy
63 //!
64 //! Creates a dynamically allocated copy of this message.
65 virtual DtSimInterfaceContent* clone() const override;
66
67 //! \brief Sets the source entity UUID
68 //! \param entity The UUID of the source entity
69 //!
70 //! Sets the UUID of the entity that owns the radar system.
71 virtual void setSourceEntity(const DtUUID& entity);
72
73 //! \brief Gets the source entity UUID
74 //! \return The UUID of the source entity
75 //!
76 //! Returns the UUID of the entity that owns the radar system.
77 virtual const DtUUID& sourceEntity() const;
78
79 //! \brief Sets the radar sensor name
80 //! \param sensorName The name of the radar sensor
81 //!
82 //! Sets the name of the radar sensor that detected these contacts.
83 virtual void setSensorName(const DtString& sensorName);
84
85 //! \brief Gets the radar sensor name
86 //! \return The name of the radar sensor
87 virtual DtString sensorName() const;
88
89 //! \brief Gets the list of radar contacts (const version)
90 //! \return Const reference to the list of radar contacts
91 //!
92 //! Returns a constant reference to the list of contacts detected by the radar.
94
95 //! \brief Gets the list of radar contacts (non-const version)
96 //! \return Reference to the list of radar contacts
97 //!
98 //! Returns a modifiable reference to the list of contacts detected by the radar.
100
101 //! \brief Gets the network representation size
102 //! \return Size in bytes of the network representation
103 //!
104 //! Returns the size of the network buffer needed to store this message.
105 virtual int netRepSize() const override;
106
107 //! \brief Deserializes the message from a network buffer
108 //! \param contentBuffer Pointer to the network buffer
109 //! \param contentSize Size of the buffer in bytes
110 //! \return True if deserialization was successful
111 //!
112 //! Fills the message from the provided network buffer.
113 virtual bool setFromNet(const char* contentBuffer, unsigned contentSize) override;
114
115 //! \brief Serializes the message for network transmission
116 //! \return True if serialization was successful
117 //!
118 //! Prepares the message for network transmission.
119 virtual bool setToNet() override;
120
121 //! \brief Formats the message data as a string
122 //! \param str String to store the formatted message data
123 //!
124 //! Appends a human-readable representation of the message to the provided string.
125 virtual void printDataToString(DtString& str) override;
126
127 //! \brief Static creator function for factory registration
128 //! \return Pointer to a new instance of DtIfRadarContactData
129 //!
130 //! This static function is used for registration with DtInterfaceContentFactory.
131 static DtSimInterfaceContent* creator();
132
133protected:
134 //! \brief UUID of the entity that owns the radar system
136
137 //! \brief Name of the radar sensor
138 DtString mySensorName;
139
140 //! \brief List of radar contacts detected by the radar
142};
virtual void setSourceEntity(const DtUUID &entity)
Sets the source entity UUID.
DtString mySensorName
Name of the radar sensor.
Definition ifRadarContactData.h:138
virtual bool setFromNet(const char *contentBuffer, unsigned contentSize) override
Deserializes the message from a network buffer.
virtual void printDataToString(DtString &str) override
Formats the message data as a string.
virtual DtString sensorName() const
Gets the radar sensor name.
virtual int type() const override
Gets the interface message type.
virtual const DtUUID & sourceEntity() const
Gets the source entity UUID.
DtUUID mySourceEntity
UUID of the entity that owns the radar system.
Definition ifRadarContactData.h:135
virtual bool setToNet() override
Serializes the message for network transmission.
DtIfRadarContactData()
Default constructor.
const DtIfRadarContactData & operator=(const DtIfRadarContactData &orig)
Assignment operator.
DtIfRadarContactData(const DtIfRadarContactData &orig)
Copy constructor.
virtual const DtRadarDataEntryList & radarDataEntryList() const
Gets the list of radar contacts (const version)
virtual ~DtIfRadarContactData() override
Virtual destructor.
virtual DtRadarDataEntryList & radarDataEntryList()
Gets the list of radar contacts (non-const version)
virtual int netRepSize() const override
Gets the network representation size.
virtual DtSimInterfaceContent * clone() const override
Creates a copy of this message.
virtual void setSensorName(const DtString &sensorName)
Sets the radar sensor name.
static DtSimInterfaceContent * creator()
Static creator function for factory registration.
DtRadarDataEntryList myRadarContactDataList
List of radar contacts detected by the radar.
Definition ifRadarContactData.h:141
Export/import macros for the VRF Messages library.
#define VRFMESSAGES_DLL
Definition export.h:23
Defines radar contact information structure.
std::vector< DtRwRadarContactInfo > DtRadarDataEntryList
List type for storing multiple radar contact information entries.
Definition rwRadarContactInfo.h:278