RDMnet
0.3.0
Implementation of ANSI E1.33 (RDMnet)
|
View other versions:
|
An RDM response received over RDMnet and saved for later processing.
This type is not used by the library API, but can come in handy if an application wants to queue or copy RDM responses before acting on them. This type does heap allocation to hold the response parameter data.
#include <rdmnet/cpp/message_types/rdm_response.h>
Public Member Functions | |
SavedRdmResponse ()=default | |
Constructs an empty, invalid RDM response by default. | |
SavedRdmResponse (const RdmnetSavedRdmResponse &c_resp) | |
Construct a SavedRdmResponse copied from an instance of the C RdmnetSavedRdmResponse type. | |
SavedRdmResponse & | operator= (const RdmnetSavedRdmResponse &c_resp) |
Assign an instance of the C RdmnetSavedRdmResponse type to an instance of this class. | |
SavedRdmResponse (const RdmResponse &resp) | |
Construct a SavedRdmResponse from an RdmResponse. | |
SavedRdmResponse & | operator= (const RdmResponse &resp) |
Assign an RdmResponse to an instance of this class. | |
const rdm::Uid & | rdmnet_source_uid () const noexcept |
Get the UID of the RDMnet component that sent this response. | |
uint16_t | source_endpoint () const noexcept |
Get the endpoint from which this response was sent. | |
uint32_t | seq_num () const noexcept |
Get the RDMnet sequence number of this response, for matching with a corresponding command. | |
rdm::Uid | original_cmd_source_uid () const noexcept |
Get the RDM source UID of the original RDM command, if available. More... | |
rdm::Uid | original_cmd_dest_uid () const noexcept |
Get the RDM destination UID of the original RDM command, if available. More... | |
const rdm::CommandHeader & | original_cmd_header () const noexcept |
Get the RDM protocol header of the original RDM command, if available. More... | |
const uint8_t * | original_cmd_data () const noexcept |
Get the RDM parameter data of the original RDM command, if available. More... | |
uint8_t | original_cmd_data_len () const noexcept |
Get the length of the RDM parameter data accompanying the original RDM command, if available. More... | |
const rdm::Command & | original_cmd () const noexcept |
Get the original RDM command that resulted in this RDM response, if available. More... | |
rdm::Uid | rdm_source_uid () const noexcept |
Get the UID of the RDM responder that sent this response. | |
rdm::Uid | rdm_dest_uid () const noexcept |
Get the UID of the RDM controller to which this response is addressed. | |
rdm_response_type_t | response_type () const noexcept |
Get the RDM response type of this response. | |
uint16_t | subdevice () const noexcept |
Get the RDM subdevice from which this response originated (0 means the root device). | |
rdm_command_class_t | command_class () const noexcept |
Get the RDM response class of this response. | |
uint16_t | param_id () const noexcept |
Get the RDM parameter ID (PID) of this response. | |
const rdm::ResponseHeader & | rdm_header () const noexcept |
Get the RDM protocol header contained within this response. | |
const uint8_t * | data () const noexcept |
Get a pointer to the RDM parameter data buffer contained within this response. | |
size_t | data_len () const noexcept |
Get the length of the RDM parameter data contained within this response. | |
const rdm::Response & | rdm () const noexcept |
Get the RDM data in this response as an RDM response type. | |
bool | IsValid () const noexcept |
Whether the values contained in this response are valid for an RDM response. More... | |
bool | OriginalCommandIncluded () const noexcept |
Whether the original RDM command is included. More... | |
bool | HasData () const noexcept |
Whether this RDM response includes any RDM parameter data. | |
bool | IsFromDefaultResponder () const noexcept |
Whether this RDM response is from a default responder. More... | |
bool | IsResponseToMe () const noexcept |
Whether the response was sent in response to a command previously sent by this controller. More... | |
bool | IsAck () const noexcept |
Whether this command has an RDM response type of ACK. More... | |
bool | IsNack () const noexcept |
Whether this command has an RDM response type of NACK_REASON. More... | |
bool | IsGetResponse () const noexcept |
Whether this response is an RDM GET response. | |
bool | IsSetResponse () const noexcept |
Whether this response is an RDM SET response. | |
etcpal::Expected< rdm::NackReason > | GetNackReason () const noexcept |
Get the NACK reason code of this RDM response. More... | |
std::vector< uint8_t > | GetData () const |
Copy out the data in a SavedRdmResponse. More... | |
void | AppendData (const RdmResponse &new_resp) |
Append more data to this response's parameter data. More... | |
void | AppendData (const uint8_t *data, size_t size) |
Append more data to this response's parameter data. More... | |
|
inline |
Append more data to this response's parameter data.
new_resp | An RdmResponse delivered to an RDMnet callback function as a continuation of a previous response. |
|
inline |
Append more data to this response's parameter data.
data | Pointer to data buffer to append. |
data_len | Size of data buffer to append. |
|
inline |
Copy out the data in a SavedRdmResponse.
|
inlinenoexcept |
Get the NACK reason code of this RDM response.
|
inlinenoexcept |
Whether this command has an RDM response type of ACK.
If this is false, it implies that IsNack() is true (ACK_TIMER is not allowed in RDMnet, and the library recombines ACK_OVERFLOW responses automatically).
|
inlinenoexcept |
Whether this RDM response is from a default responder.
See Devices and Gateways for more information.
|
inlinenoexcept |
Whether this command has an RDM response type of NACK_REASON.
If this is false, it implies that IsAck() is true (ACK_TIMER is not allowed in RDMnet, and the library recombines ACK_OVERFLOW responses automatically).
|
inlinenoexcept |
Whether the response was sent in response to a command previously sent by this controller.
If this is false, the command was a broadcast sent to all controllers.
|
inlinenoexcept |
Whether the values contained in this response are valid for an RDM response.
In particular, a default-constructed SavedRdmResponse is not valid.
|
inlinenoexcept |
Get the original RDM command that resulted in this RDM response, if available.
|
inlinenoexcept |
Get the RDM parameter data of the original RDM command, if available.
|
inlinenoexcept |
Get the length of the RDM parameter data accompanying the original RDM command, if available.
|
inlinenoexcept |
Get the RDM destination UID of the original RDM command, if available.
|
inlinenoexcept |
Get the RDM protocol header of the original RDM command, if available.
|
inlinenoexcept |
Get the RDM source UID of the original RDM command, if available.
|
inlinenoexcept |
Whether the original RDM command is included.
In RDMnet, a response to an RDM command includes the original command data. An exception to this rule is unsolicited RDM responses, which are not in response to a command and thus do not include the original command data.