23 #ifndef RDMNET_CPP_MESSAGE_TYPES_EPT_DATA_H_
24 #define RDMNET_CPP_MESSAGE_TYPES_EPT_DATA_H_
56 constexpr const uint8_t*
data() const noexcept;
57 constexpr
size_t data_len() const noexcept;
89 const uint8_t*
data() const noexcept;
92 bool IsValid() const noexcept;
96 uint16_t manufacturer_id_;
97 uint16_t protocol_id_;
98 std::vector<uint8_t> data_;
113 return data_.source_cid;
119 return data_.manufacturer_id;
125 return data_.protocol_id;
132 return ((
static_cast<uint32_t
>(data_.manufacturer_id) << 16) | data_.protocol_id);
144 return data_.data_len;
151 if (data_.data && data_.data_len)
195 : source_cid_(resp.source_cid())
196 , manufacturer_id_(resp.manufacturer_id())
197 , protocol_id_(resp.protocol_id())
198 , data_(resp.CopyData())
221 return manufacturer_id_;
234 return ((
static_cast<uint32_t
>(manufacturer_id_) << 16) | protocol_id_);
252 return (!source_cid_.
IsNull() && !data_.empty());
bool IsNull() const noexcept
An EPT data message received over RDMnet and delivered to an RDMnet callback function.
Definition: ept_data.h:41
std::vector< uint8_t > CopyData() const
Copy the data out of an EPT data message.
Definition: ept_data.h:149
constexpr const RdmnetEptData & get() const noexcept
Get a const reference to the underlying C type.
Definition: ept_data.h:158
EptData(const EptData &other)=delete
Not copyable - use Save() to create a copyable version.
constexpr const uint8_t * data() const noexcept
Get the data associated with this EPT message.
Definition: ept_data.h:136
EptData()=delete
Not default-constructible.
EptData & operator=(const EptData &other)=delete
Not copyable - use Save() to create a copyable version.
constexpr uint16_t manufacturer_id() const noexcept
Get the ESTA manufacturer ID that identifies the EPT sub-protocol.
Definition: ept_data.h:117
constexpr etcpal::Uuid source_cid() const noexcept
Get the CID of the EPT client that sent this data.
Definition: ept_data.h:111
constexpr size_t data_len() const noexcept
Get the length of the data associated with this EPT message.
Definition: ept_data.h:142
SavedEptData Save() const
Save this data message for later use from a different context.
Definition: ept_data.h:165
constexpr uint32_t sub_protocol() const noexcept
Get the full EPT sub-protocol identifier.
Definition: ept_data.h:130
constexpr uint16_t protocol_id() const noexcept
Get the protocol ID that identifies the EPT sub-protocol.
Definition: ept_data.h:123
An EPT data message received over RDMnet and saved for later processing.
Definition: ept_data.h:76
size_t data_len() const noexcept
Get the length of the data associated with this EPT message.
Definition: ept_data.h:244
uint32_t sub_protocol() const noexcept
Get the full EPT sub-protocol identifier.
Definition: ept_data.h:232
uint16_t manufacturer_id() const noexcept
Get the ESTA manufacturer ID that identifies the EPT sub-protocol.
Definition: ept_data.h:219
const uint8_t * data() const noexcept
Get the data associated with this EPT message.
Definition: ept_data.h:238
SavedEptData & operator=(const RdmnetSavedEptData &c_data)
Assign an instance of the C RdmnetSavedEptData type to an instance of this class.
Definition: ept_data.h:183
bool IsValid() const noexcept
Whether the values contained in this class are valid for an EPT data message.
Definition: ept_data.h:250
const etcpal::Uuid & source_cid() const noexcept
Get the CID of the EPT client that sent this data.
Definition: ept_data.h:213
SavedEptData()=default
Constructs an empty, invalid EPT data structure by default.
uint16_t protocol_id() const noexcept
Get the protocol ID that identifies the EPT sub-protocol.
Definition: ept_data.h:225
Basic types for parsed RDMnet messages.
A namespace which contains all C++ language definitions in the RDMnet library.
Definition: broker.h:45
An RDMnet EPT data message received by a local component.
Definition: message.h:270
An EPT data message received over RDMnet and saved for later processing.
Definition: message.h:291
EtcPalUuid source_cid
The CID of the EPT client that sent this data.
Definition: message.h:293
uint16_t protocol_id
The protocol ID that identifies the EPT sub-protocol.
Definition: message.h:297
const uint8_t * data
The data associated with this EPT message.
Definition: message.h:302
uint16_t manufacturer_id
The ESTA manufacturer ID that identifies the EPT sub-protocol.
Definition: message.h:295
size_t data_len
The length of the data associated with this EPT message.
Definition: message.h:304