VR-Engage  2.2
Loading...
Searching...
No Matches
ifRwrDataUnsubscribe.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file ifRwrDataUnsubscribe.h
7//! \ingroup vreVrfMessages
8//! \brief Interface message class for canceling RWR data subscriptions
9//!
10//! This file defines the DtIfRwrDataUnsubscribe class, which is used to
11//! cancel an active subscription to radar warning receiver data updates from a specific entity.
12
13//! The DtIfRwrDataUnsubscribe class provides a mechanism for canceling
14//! existing RWR data 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 RWR data subscriptions
23//!
24//! This class is used to indicate that any previous RWR (Radar Warning Receiver) data subscription
25//! from the originating simulation address should be canceled, and RWR data messages
26//! should no longer be sent. This is the counterpart to a subscription request
27//! with the subscribe flag set to true.
28class VRFMESSAGES_DLL DtIfRwrDataUnsubscribe : public DtSimInterfaceContent
29{
30public:
31 //! \brief Default constructor
32 //!
33 //! Initializes an empty RWR data unsubscribe message.
35
36 //! \brief Copy constructor
37 //! \param orig The RWR data unsubscribe message to copy from
38 //!
39 //! Creates a new RWR data unsubscribe message by copying an existing one.
41
42 //! \brief Assignment operator
43 //! \param orig The RWR data unsubscribe message to copy from
44 //! \return Reference to this object after assignment
45 //!
46 //! Copies the contents of another RWR data unsubscribe message into this one.
48
49 //! \brief Virtual destructor
50 virtual ~DtIfRwrDataUnsubscribe() override;
51
52 //! \brief Gets the interface message type
53 //! \return The message type identifier
54 //!
55 //! Returns DtRwrDataUnsubscribeMessageType 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 RWR data updates should no longer be received.
68 //! This identifies the specific radar warning receiver 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 DtIfRwrDataUnsubscribe
103 //!
104 //! This static function is used for registration with DtInterfaceContentFactory.
105 static DtSimInterfaceContent* creator();
106
107protected:
108 //! \brief UUID of the entity whose RWR data is being unsubscribed from
109 DtUUID myUUID;
110};
virtual void setUUID(const DtUUID &name)
Sets the UUID of the entity to unsubscribe from.
DtIfRwrDataUnsubscribe(const DtIfRwrDataUnsubscribe &orig)
Copy 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 setToNet() override
Serializes the message for network transmission.
static DtSimInterfaceContent * creator()
Static creator function for factory registration.
virtual bool setFromNet(const char *contentBuffer, unsigned contentSize) override
Deserializes the message from a network buffer.
const DtIfRwrDataUnsubscribe & operator=(const DtIfRwrDataUnsubscribe &orig)
Assignment operator.
virtual const DtUUID & uuid() const
Gets the UUID of the entity being unsubscribed from.
virtual int netRepSize() const override
Gets the network representation size.
virtual DtSimInterfaceContent * clone() const override
Creates a copy of this message.
virtual ~DtIfRwrDataUnsubscribe() override
Virtual destructor.
DtUUID myUUID
UUID of the entity whose RWR data is being unsubscribed from.
Definition ifRwrDataUnsubscribe.h:109
DtIfRwrDataUnsubscribe()
Default constructor.
Export/import macros for the VRF Messages library.
#define VRFMESSAGES_DLL
Definition export.h:23