23 #ifndef RDMNET_CPP_MESSAGE_TYPES_RPT_STATUS_H_
24 #define RDMNET_CPP_MESSAGE_TYPES_RPT_STATUS_H_
28 #include "rdm/cpp/uid.h"
48 constexpr rdm::Uid
source_uid() const noexcept;
50 constexpr uint32_t
seq_num() const noexcept;
82 uint32_t
seq_num() const noexcept;
87 bool IsValid() const noexcept;
94 uint16_t source_endpoint_{E133_NULL_ENDPOINT};
182 : source_uid_(c_status.source_uid)
183 , source_endpoint_(c_status.source_endpoint)
184 , seq_num_(c_status.seq_num)
185 , status_code_(c_status.status_code)
205 : source_uid_(status.source_uid())
206 , source_endpoint_(status.source_endpoint())
207 , seq_num_(status.seq_num())
208 , status_code_(status.status_code())
209 , status_string_(status.status_string())
233 return source_endpoint_;
251 return status_string_;
257 return seq_num_ != 0;
275 return !status_string_.
empty();
An RPT status message received over RDMnet and delivered to an RDMnet callback function.
Definition: rpt_status.h:42
constexpr const char * status_c_str() const noexcept
Get the optional status string accompanying this status message.
Definition: rpt_status.h:134
RptStatus()=delete
Not default-constructible.
SavedRptStatus Save() const
Save the data in this status message for later use from a different context.
Definition: rpt_status.h:171
constexpr uint16_t source_endpoint() const noexcept
Get the endpoint from which this RPT status message was sent.
Definition: rpt_status.h:116
const char * CodeToCString() const noexcept
Convert the status message's code to a string representation.
Definition: rpt_status.h:146
constexpr rdm::Uid source_uid() const noexcept
Get the UID of the RDMnet component that sent this RPT status message.
Definition: rpt_status.h:110
constexpr uint32_t seq_num() const noexcept
Get the RDMnet sequence number of this RPT status message, for matching with a corresponding command.
Definition: rpt_status.h:122
constexpr rpt_status_code_t status_code() const noexcept
Get the RPT status code of this status message.
Definition: rpt_status.h:128
constexpr bool HasStatusString() const noexcept
Determine whether the optional RPT status string is present.
Definition: rpt_status.h:158
std::string status_string() const
Get the optional status string accompanying this status message.
Definition: rpt_status.h:140
std::string CodeToString() const
Convert the status message's code to a string representation.
Definition: rpt_status.h:152
constexpr const RdmnetRptStatus & get() const noexcept
Get a const reference to the underlying C type.
Definition: rpt_status.h:164
An RPT status message received over RDMnet and saved for later processing.
Definition: rpt_status.h:71
SavedRptStatus & operator=(const RdmnetSavedRptStatus &c_status)
Assign an instance of the C RdmnetSavedRptStatus type to an instance of this class.
Definition: rpt_status.h:192
bool HasStatusString() const noexcept
Determine whether the optional RPT status string is present.
Definition: rpt_status.h:273
SavedRptStatus()=default
Constructs an empty, invalid RPT status by default.
bool IsValid() const noexcept
Whether the values contained in this class are valid for an RPT Status message.
Definition: rpt_status.h:255
std::string CodeToString() const
Convert the status message's code to a string representation.
Definition: rpt_status.h:267
const rdm::Uid & source_uid() const noexcept
Get the UID of the RDMnet component that sent this RPT status message.
Definition: rpt_status.h:225
const std::string & status_string() const noexcept
Get the optional status string accompanying this status message.
Definition: rpt_status.h:249
uint32_t seq_num() const noexcept
Get the RDMnet sequence number of this RPT status message, for matching with a corresponding command.
Definition: rpt_status.h:237
uint16_t source_endpoint() const noexcept
Get the endpoint from which this RPT status message was sent.
Definition: rpt_status.h:231
rpt_status_code_t status_code() const noexcept
Get the RPT status code of this status message.
Definition: rpt_status.h:243
const char * CodeToCString() const noexcept
Convert the status message's code to a string representation.
Definition: rpt_status.h:261
Functions and definitions common to all RDMnet API modules.
const char * rdmnet_rpt_status_code_to_string(rpt_status_code_t code)
Get a string representation of an RPT status code.
Definition: common.c:231
rpt_status_code_t
RPT status code definitions.
Definition: common.h:53
Basic types for parsed RDMnet messages.
A namespace which contains all C++ language definitions in the RDMnet library.
Definition: broker.h:45
An RDMnet RPT status message received by a local component.
Definition: message.h:193
RdmUid source_uid
The UID of the RDMnet component that sent this status message.
Definition: message.h:195
const char * status_string
An optional implementation-defined status string to accompany this status message.
Definition: message.h:203
uint32_t seq_num
The sequence number of the status message, for matching with a corresponding command.
Definition: message.h:199
uint16_t source_endpoint
The endpoint from which the status message was sent.
Definition: message.h:197
rpt_status_code_t status_code
A status code that indicates the specific error or status condition.
Definition: message.h:201
An RPT status received over RDMnet and saved for later processing.
Definition: message.h:215
uint16_t source_endpoint
The endpoint from which the status message was sent.
Definition: message.h:219
uint32_t seq_num
The sequence number of the status message, for matching with a corresponding command.
Definition: message.h:221
char * status_string
An optional implementation-defined status string to accompany this status message.
Definition: message.h:229
RdmUid source_uid
The UID of the RDMnet component that sent this status message.
Definition: message.h:217
rpt_status_code_t status_code
A status code that indicates the specific error or status condition.
Definition: message.h:223