RDMnet  0.3.0
Implementation of ANSI E1.33 (RDMnet)
View other versions:
rdmnet::llrp::RdmResponse Class Reference

Overview

An RDM response received over LLRP and delivered to an RDMnet callback function.

Not valid for use other than as a parameter to an RDMnet callback function; use RdmResponse::Save() to create a copyable version.

#include <rdmnet/cpp/message_types/llrp_rdm_response.h>

Public Member Functions

 RdmResponse ()=delete
 Not default-constructible.
 
 RdmResponse (const RdmResponse &other)=delete
 Not copyable - use Save() to create a copyable version.
 
RdmResponseoperator= (const RdmResponse &other)=delete
 Not copyable - use Save() to create a copyable version.
 
constexpr RdmResponse (const LlrpRdmResponse &c_resp) noexcept
 Construct a RdmResponse copied from an instance of the C LlrpRdmResponse type.
 
constexpr etcpal::Uuid source_cid () const noexcept
 Get the CID of the LLRP target that sent this response.
 
constexpr uint32_t seq_num () const noexcept
 Get the LLRP sequence number of this response, for matching with a corresponding command.
 
constexpr rdm::Uid source_uid () const noexcept
 Get the UID of the LLRP target that sent this response.
 
constexpr rdm::Uid dest_uid () const noexcept
 Get the UID of the LLRP manager to which this response is addressed.
 
constexpr rdm_response_type_t response_type () const noexcept
 Get the RDM response type of this response.
 
constexpr uint16_t subdevice () const noexcept
 Get the RDM subdevice from which this response originated (0 means the root device).
 
constexpr rdm_command_class_t command_class () const noexcept
 Get the RDM response class of this response.
 
constexpr uint16_t param_id () const noexcept
 Get the RDM parameter ID (PID) of this response.
 
constexpr rdm::ResponseHeader rdm_header () const noexcept
 Get the RDM protocol header contained within this response.
 
constexpr const uint8_t * data () const noexcept
 Get a pointer to the RDM parameter data buffer contained within this response.
 
constexpr uint8_t data_len () const noexcept
 Get the length of the RDM parameter data contained within this response.
 
constexpr bool HasData () const noexcept
 Whether this RDM response includes any RDM parameter data.
 
constexpr bool IsAck () const noexcept
 Whether this response has an RDM response type of ACK. More...
 
constexpr bool IsNack () const noexcept
 Whether this response has an RDM response type of NACK_REASON. More...
 
constexpr bool IsGetResponse () const noexcept
 Whether this response is an RDM GET response.
 
constexpr bool IsSetResponse () const noexcept
 Whether this response is an RDM SET response.
 
constexpr const LlrpRdmResponseget () const noexcept
 Get a const reference to the underlying C type.
 
etcpal::Expected< rdm::NackReason > GetNackReason () const noexcept
 Get the NACK reason code of this RDM response. More...
 
rdm::Response ToRdm () const
 Convert the RDM data in this response to an RDM response type.
 
SavedRdmResponse Save () const
 Save the data in this response for later use from a different context. More...
 

Member Function Documentation

◆ GetNackReason()

etcpal::Expected< rdm::NackReason > rdmnet::llrp::RdmResponse::GetNackReason ( ) const
inlinenoexcept

Get the NACK reason code of this RDM response.

Returns
If IsNack() and has valid NACK reason data, the valid NackReason instance.
Otherwise, kEtcPalErrInvalid.

◆ IsAck()

constexpr bool rdmnet::llrp::RdmResponse::IsAck ( ) const
constexprnoexcept

Whether this response has an RDM response type of ACK.

If this is false, it implies that IsNack() is true (ACK_TIMER and ACK_OVERFLOW are not allowed in LLRP).

◆ IsNack()

constexpr bool rdmnet::llrp::RdmResponse::IsNack ( ) const
constexprnoexcept

Whether this response has an RDM response type of NACK_REASON.

If this is false, it implies that IsAck() is true (ACK_TIMER and ACK_OVERFLOW are not allowed in LLRP).

◆ Save()

SavedRdmResponse rdmnet::llrp::RdmResponse::Save ( ) const
inline

Save the data in this response for later use from a different context.

Returns
A SavedRdmResponse containing the copied data.

The documentation for this class was generated from the following file: