VR-Engage  2.2
Loading...
Searching...
No Matches
ifRadarStateUnsubscribe.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file ifRadarStateUnsubscribe.h
7//! \ingroup vreVrfMessages
8//! \brief Interface message class for canceling radar state subscriptions
9//!
10//! This file defines the DtIfRadarStateUnsubscribe class, which is used to
11//! cancel an active subscription to radar state updates from a specific entity.
12
13//! The DtIfRadarStateUnsubscribe class provides a mechanism for canceling
14//! existing radar state subscriptions to stop receiving updates.
15#pragma once
16
18
19#include <vrfExtProtocol/simInterfaceContent.h>
20#include <vrfutil/rwUUID.h>
21
22//! \brief Interface message for canceling radar state subscriptions
23//!
24//! This class is used to indicate that any previous radar state subscription
25//! from the originating simulation address should be canceled, and radar state
26//! messages should no longer be sent. This is the counterpart to a subscription
27//! request with the subscribe flag set to true.
28class VRFMESSAGES_DLL DtIfRadarStateUnsubscribe : public DtSimInterfaceContent
29{
30public:
31 //! \brief Default constructor
32 //!
33 //! Initializes an empty radar state unsubscribe message.
35
36 //! \brief Copy constructor
37 //! \param orig The radar state unsubscribe message to copy from
38 //!
39 //! Creates a new radar state unsubscribe message by copying an existing one.
41
42 //! \brief Assignment operator
43 //! \param orig The radar state unsubscribe message to copy from
44 //! \return Reference to this object after assignment
45 //!
46 //! Copies the contents of another radar state unsubscribe message into this one.
48
49 //! \brief Virtual destructor
50 virtual ~DtIfRadarStateUnsubscribe() override;
51
52 //! \brief Gets the interface message type
53 //! \return The message type identifier
54 //!
55 //! Returns DtRadarStateUnsubscribeMessageType as defined in vreVrfMessageTypes.h.
56 virtual int type() const override;
57
58 //! \brief Creates a copy of this message
59 //! \return Pointer to the new copy
60 //!
61 //! Creates a dynamically allocated copy of this message.
62 virtual DtSimInterfaceContent* clone() const override;
63
64 //! \brief Sets the UUID of the entity to unsubscribe from
65 //! \param name The entity UUID to set
66 //!
67 //! Sets the UUID of the entity whose radar state updates should no longer be received.
68 //! This identifies the specific radar system subscription to cancel.
69 virtual void setUUID(const DtUUID& name);
70
71 //! \brief Gets the UUID of the entity being unsubscribed from
72 //! \return The entity UUID
73 virtual const DtUUID& uuid() const;
74
75 //! \brief Gets the network representation size
76 //! \return Size in bytes of the network representation
77 //!
78 //! Returns the size of the network buffer needed to store this message.
79 virtual int netRepSize() const override;
80
81 //! \brief Deserializes the message from a network buffer
82 //! \param contentBuffer Pointer to the network buffer
83 //! \param contentSize Size of the buffer in bytes
84 //! \return True if deserialization was successful
85 //!
86 //! Fills the message from the provided network buffer.
87 virtual bool setFromNet(const char* contentBuffer, unsigned contentSize) override;
88
89 //! \brief Serializes the message for network transmission
90 //! \return True if serialization was successful
91 //!
92 //! Prepares the message for network transmission.
93 virtual bool setToNet() override;
94
95 //! \brief Formats the message data as a string
96 //! \param str String to store the formatted message data
97 //!
98 //! Appends a human-readable representation of the message to the provided string.
99 virtual void printDataToString(DtString& str) override;
100
101 //! \brief Static creator function for factory registration
102 //! \return Pointer to a new instance of DtIfRadarStateUnsubscribe
103 //!
104 //! This static function is used for registration with DtInterfaceContentFactory.
105 static DtSimInterfaceContent* creator();
106
107protected:
108 //! \brief UUID of the entity whose radar state is being unsubscribed from
109 DtUUID myUUID;
110};
virtual void printDataToString(DtString &str) override
Formats the message data as a string.
virtual ~DtIfRadarStateUnsubscribe() override
Virtual destructor.
virtual bool setFromNet(const char *contentBuffer, unsigned contentSize) override
Deserializes the message from a network buffer.
virtual DtSimInterfaceContent * clone() const override
Creates a copy of this message.
virtual const DtUUID & uuid() const
Gets the UUID of the entity being unsubscribed from.
virtual void setUUID(const DtUUID &name)
Sets the UUID of the entity to unsubscribe from.
DtUUID myUUID
UUID of the entity whose radar state is being unsubscribed from.
Definition ifRadarStateUnsubscribe.h:109
DtIfRadarStateUnsubscribe(const DtIfRadarStateUnsubscribe &orig)
Copy constructor.
const DtIfRadarStateUnsubscribe & operator=(const DtIfRadarStateUnsubscribe &orig)
Assignment operator.
virtual int type() const override
Gets the interface message type.
virtual bool setToNet() override
Serializes the message for network transmission.
DtIfRadarStateUnsubscribe()
Default constructor.
static DtSimInterfaceContent * creator()
Static creator function for factory registration.
virtual int netRepSize() const override
Gets the network representation size.
Export/import macros for the VRF Messages library.
#define VRFMESSAGES_DLL
Definition export.h:23