VR-Engage  2.2
Loading...
Searching...
No Matches
ifRadarStateData.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file ifRadarStateData.h
7//! \ingroup vreVrfMessages
8//! \brief Interface message class for radar state data
9//!
10//! This file defines the DtIfRadarStateData class, which encapsulates
11//! the current internal state of a radar system. It is used to send
12//! radar state information between simulation components.
13//! \ingroup mfsUtil
14
15//! This class encapsulates the current internal state of a radar system.
16#pragma once
17
20
21#include <vlutil/vlString.h>
22#include <vrfExtProtocol/simInterfaceContent.h>
23#include <vrfutil/rwUUID.h>
24
25//! \brief Interface message for radar state data
26//!
27//! This class encapsulates the current internal state of a radar system,
28//! including source entity ID, radar name, and detailed state information.
29class VRFMESSAGES_DLL DtIfRadarStateData : public DtSimInterfaceContent
30{
31public:
32 //! \brief Default constructor
33 //!
34 //! Initializes an empty radar state data message.
36
37 //! \brief Copy constructor
38 //! \param orig The radar state data to copy from
39 //!
40 //! Creates a new radar state data object by copying an existing one.
42
43 //! \brief Assignment operator
44 //! \param orig The radar state data to copy from
45 //! \return Reference to this object after assignment
46 //!
47 //! Copies the contents of another radar state data object into this one.
49
50 //! \brief Virtual destructor
51 virtual ~DtIfRadarStateData() override;
52
53 //! \brief Gets the interface message type
54 //! \return The message type identifier
55 //!
56 //! Returns DtRadarStateDataMessageType as defined in vreVrfMessageTypes.h.
57 virtual int type() const override;
58
59 //! \brief Creates a copy of this message
60 //! \return Pointer to the new copy
61 //!
62 //! Creates a dynamically allocated copy of this message.
63 virtual DtSimInterfaceContent* clone() const override;
64
65 //! \brief Gets the name of the radar
66 //! \return The radar name
67 virtual DtString radarName() const;
68
69 //! \brief Sets the name of the radar
70 //! \param val The radar name to set
71 virtual void setRadarName(const DtString& val);
72
73 //! \brief Sets the source entity UUID
74 //! \param val The UUID of the source entity
75 //!
76 //! Sets the UUID of the entity that owns the radar system.
77 virtual void setSourceEntity(const DtUUID& val);
78
79 //! \brief Gets the source entity UUID
80 //! \return The UUID of the source entity
81 //!
82 //! Returns the UUID of the entity that owns the radar system.
83 virtual const DtUUID& sourceEntity() const;
84
85 //! \brief Gets the radar state information
86 //! \return The radar state information structure
88
89 //! \brief Sets the radar state information
90 //! \param val The radar state information to set
91 virtual void setRadarStateInfo(const DtRwRadarStateInfo& val);
92
93 //! \brief Gets the network representation size
94 //! \return Size in bytes of the network representation
95 //!
96 //! Returns the size of the network buffer needed to store this message.
97 virtual int netRepSize() const override;
98
99 //! \brief Deserializes the message from a network buffer
100 //! \param contentBuffer Pointer to the network buffer
101 //! \param contentSize Size of the buffer in bytes
102 //! \return True if deserialization was successful
103 //!
104 //! Fills the message from the provided network buffer.
105 virtual bool setFromNet(const char* contentBuffer, unsigned contentSize) override;
106
107 //! \brief Serializes the message for network transmission
108 //! \return True if serialization was successful
109 //!
110 //! Prepares the message for network transmission.
111 virtual bool setToNet() override;
112
113 //! \brief Formats the message data as a string
114 //! \param str String to store the formatted message data
115 //!
116 //! Appends a human-readable representation of the message to the provided string.
117 virtual void printDataToString(DtString& str) override;
118
119 //! \brief Static creator function for factory registration
120 //! \return Pointer to a new instance of DtIfRadarStateData
121 //!
122 //! This static function is used for registration with DtInterfaceContentFactory.
123 static DtSimInterfaceContent* creator();
124
125protected:
126 //! \brief UUID of the entity that owns the radar
128
129 //! \brief Name of the radar system
130 DtString myRadarName;
131
132 //! \brief Detailed radar state information
134};
DtIfRadarStateData()
Default constructor.
virtual int type() const override
Gets the interface message type.
virtual void printDataToString(DtString &str) override
Formats the message data as a string.
virtual bool setFromNet(const char *contentBuffer, unsigned contentSize) override
Deserializes the message from a network buffer.
virtual bool setToNet() override
Serializes the message for network transmission.
virtual DtString radarName() const
Gets the name of the radar.
virtual int netRepSize() const override
Gets the network representation size.
virtual const DtUUID & sourceEntity() const
Gets the source entity UUID.
virtual ~DtIfRadarStateData() override
Virtual destructor.
virtual void setRadarStateInfo(const DtRwRadarStateInfo &val)
Sets the radar state information.
DtRwRadarStateInfo myRadarStateInfo
Detailed radar state information.
Definition ifRadarStateData.h:133
virtual void setRadarName(const DtString &val)
Sets the name of the radar.
virtual DtSimInterfaceContent * clone() const override
Creates a copy of this message.
DtUUID mySourceEntity
UUID of the entity that owns the radar.
Definition ifRadarStateData.h:127
DtIfRadarStateData(const DtIfRadarStateData &orig)
Copy constructor.
const DtIfRadarStateData & operator=(const DtIfRadarStateData &orig)
Assignment operator.
static DtSimInterfaceContent * creator()
Static creator function for factory registration.
DtString myRadarName
Name of the radar system.
Definition ifRadarStateData.h:130
virtual DtRwRadarStateInfo radarStateInfo() const
Gets the radar state information.
virtual void setSourceEntity(const DtUUID &val)
Sets the source entity UUID.
Radar state information class for radar system configurations.
Definition rwRadarStateInfo.h:32
Export/import macros for the VRF Messages library.
#define VRFMESSAGES_DLL
Definition export.h:23
Defines radar state information structure.