VR-Engage  2.2
Loading...
Searching...
No Matches
icVreTdlEngagementStatus.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file icVreTdlEngagementStatus.h
7//! \ingroup vreVrfMessages
8//! \brief Interface class for Tactical Data Link (TDL) engagement status information
9//!
10//! This file defines the IcVreTdlEngagementStatus class, which encapsulates engagement
11//! status information between entities within the TDL network. It provides information
12//! about which entity is engaging which target and the status of the engagement.
13
14#pragma once
15
16// VR-Engage includes
18
19// VR-Forces includes
20#include <vrfExtProtocol/simInterfaceContent.h>
21#include <vrfutil/rwUUID.h>
22
23// VR-Link includes
24#include <vlutil/vlString.h>
25
26// #include "TDLMessageTypes.h"
27
28namespace ctiTdl
29{
30//! \brief Message type identifier for TDL engagement status messages
32
33//! \brief Interface message class for TDL engagement status information
34//!
35//! This class encapsulates engagement status information between entities
36//! within the TDL network. It defines which entity is engaging which target
37//! and the current state of that engagement (e.g., engaged, weapon released).
38class VRFMESSAGES_DLL IcVreTdlEngagementStatus : public DtSimInterfaceContent
39{
40public:
41 //! \brief Default constructor
42 //!
43 //! Initializes an empty engagement status message.
45
46 //! \brief Virtual destructor
47 //!
48 //! Cleans up all resources associated with the engagement status.
49 virtual ~IcVreTdlEngagementStatus() override;
50
51 //! \brief Copy constructor
52 //! \param orig The engagement status to copy from
53 //!
54 //! Creates a new engagement status by copying an existing one.
56
57 //! \brief Assignment operator
58 //! \param orig The engagement status to copy from
59 //! \return Reference to this object after assignment
60 //!
61 //! Copies the contents of another engagement status into this one.
63
64 //! \brief Gets the interface message type
65 //! \return The message type identifier
66 //!
67 //! Returns IcVreTdlEngagementStatusType.
68 virtual int type() const override;
69
70 //! \brief Creates a copy of this message
71 //! \return Pointer to the new copy
72 //!
73 //! Creates a dynamically allocated copy of this message.
74 virtual DtSimInterfaceContent* clone() const override;
75
76 //! \brief Static creator function for factory registration
77 //! \return Pointer to a new instance of IcVreTdlEngagementStatus
78 //!
79 //! This static function is used for registration with DtInterfaceContentFactory.
80 static DtSimInterfaceContent* creator();
81
82 //! \brief Gets the network representation size
83 //! \return Size in bytes of the network representation
84 //!
85 //! Returns the size of the full network representation padded to an 8-byte boundary.
86 virtual int netRepSize() const override;
87
88 //! \brief Deserializes the message from a network buffer
89 //! \param contentBuffer Pointer to the network buffer
90 //! \param contentSize Size of the buffer in bytes
91 //! \return True if deserialization was successful
92 //!
93 //! Fills the engagement status from the provided network buffer.
94 virtual bool setFromNet(const char* contentBuffer, unsigned contentSize) override;
95
96 //! \brief Serializes the message for network transmission
97 //! \return True if serialization was successful
98 //!
99 //! Prepares the engagement status for network transmission.
100 virtual bool setToNet() override;
101
102 //! \brief Formats the message data as a string
103 //! \param str String to store the formatted message data
104 //!
105 //! Appends a human-readable representation of the engagement status to the provided string.
106 virtual void printDataToString(DtString& str) override;
107
108 //! \brief Sets the UUID for this engagement status
109 //! \param uuid The UUID to set
110 virtual void setUUID(DtUUID uuid);
111
112 //! \brief Gets the UUID of this engagement status
113 //! \return The engagement status UUID
114 virtual DtUUID getUUID();
115
116 //! \brief Sets the source track number
117 //! \param stn The source track number to set
118 //!
119 //! Sets the track number (STN) of the engaging platform.
120 virtual void setSourceTrackNumber(const DtString& stn);
121
122 //! \brief Gets the source track number
123 //! \return The source track number of the engaging platform
124 virtual DtString getSourceTrackNumber();
125
126 //! \brief Sets the objective track number
127 //! \param tn The objective track number to set
128 //!
129 //! Sets the track number (TN) of the objective/target platform.
130 virtual void setObjectiveTrackNumber(const DtString& tn);
131
132 //! \brief Gets the objective track number
133 //! \return The track number of the objective/target platform
134 virtual DtString getObjectiveTrackNumber();
135
136 //! \brief Sets the engagement status
137 //! \param status The engagement status code to set
138 //!
139 //! Sets the engagement status code as defined in ctiTdl::StatusType.
140 virtual void setEngagementStatus(const int status);
141
142 //! \brief Gets the engagement status
143 //! \return The engagement status code
144 //!
145 //! Returns the engagement status code as defined in ctiTdl::StatusType.
146 virtual int getEngagementStatus();
147
148protected:
149 //! \brief UUID of this engagement status for unique identification
150 DtUUID myUUID;
151
152 //! \brief Source track number (STN) of the engaging platform
154
155 //! \brief Track number (TN) of the objective/target platform
157
158 //! \brief Current engagement status code
159 //! See ctiTdl::StatusType in VreTdlTrackTypes.h for possible values
161};
162} // namespace ctiTdl
static DtSimInterfaceContent * creator()
Static creator function for factory registration.
IcVreTdlEngagementStatus & operator=(const IcVreTdlEngagementStatus &orig)
Assignment operator.
virtual void setObjectiveTrackNumber(const DtString &tn)
Sets the objective track number.
virtual void setUUID(DtUUID uuid)
Sets the UUID for this engagement status.
virtual ~IcVreTdlEngagementStatus() override
Virtual destructor.
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 DtString getSourceTrackNumber()
Gets the source track number.
DtString mySourceTrackNumber
Source track number (STN) of the engaging platform.
Definition icVreTdlEngagementStatus.h:153
virtual DtString getObjectiveTrackNumber()
Gets the objective track number.
int myEngagementStatus
Current engagement status code See ctiTdl::StatusType in VreTdlTrackTypes.h for possible values.
Definition icVreTdlEngagementStatus.h:160
virtual int type() const override
Gets the interface message type.
virtual int getEngagementStatus()
Gets the engagement status.
virtual DtUUID getUUID()
Gets the UUID of this engagement status.
DtString myObjectiveTrackNumber
Track number (TN) of the objective/target platform.
Definition icVreTdlEngagementStatus.h:156
IcVreTdlEngagementStatus(const IcVreTdlEngagementStatus &orig)
Copy constructor.
virtual void setSourceTrackNumber(const DtString &stn)
Sets the source track number.
DtUUID myUUID
UUID of this engagement status for unique identification.
Definition icVreTdlEngagementStatus.h:150
virtual DtSimInterfaceContent * clone() const override
Creates a copy of this message.
virtual bool setToNet() override
Serializes the message for network transmission.
virtual void setEngagementStatus(const int status)
Sets the engagement status.
virtual int netRepSize() const override
Gets the network representation size.
IcVreTdlEngagementStatus()
Default constructor.
Export/import macros for the VRF Messages library.
#define VRFMESSAGES_DLL
Definition export.h:23
Definition icVreTdlEngagementStatus.h:29
const int IcVreTdlEngagementStatusType
Message type identifier for TDL engagement status messages.
Definition icVreTdlEngagementStatus.h:31