23 #ifndef RDMNET_CPP_MESSAGE_TYPES_LLRP_RDM_COMMAND_H_
24 #define RDMNET_CPP_MESSAGE_TYPES_LLRP_RDM_COMMAND_H_
27 #include "etcpal/common.h"
28 #include "etcpal/inet.h"
30 #include "rdm/cpp/message.h"
31 #include "rdm/cpp/uid.h"
38 class SavedRdmCommand;
58 constexpr uint32_t
seq_num() const noexcept;
63 constexpr rdm::Uid
source_uid() const noexcept;
64 constexpr rdm::Uid
dest_uid() const noexcept;
65 constexpr uint16_t
subdevice() const noexcept;
67 constexpr uint16_t
param_id() const noexcept;
69 constexpr rdm::CommandHeader
rdm_header() const noexcept;
71 constexpr const uint8_t*
data() const noexcept;
72 constexpr uint8_t
data_len() const noexcept;
74 constexpr
bool HasData() const noexcept;
76 constexpr
bool IsGet() const noexcept;
77 constexpr
bool IsSet() const noexcept;
81 rdm::Command
ToRdm() const;
101 constexpr uint32_t
seq_num() const noexcept;
106 constexpr rdm::Uid
source_uid() const noexcept;
107 constexpr rdm::Uid
dest_uid() const noexcept;
108 constexpr uint16_t
subdevice() const noexcept;
109 constexpr rdm_command_class_t
command_class() const noexcept;
110 constexpr uint16_t
param_id() const noexcept;
112 constexpr rdm::CommandHeader
rdm_header() const noexcept;
114 constexpr const uint8_t*
data() const noexcept;
115 constexpr uint8_t
data_len() const noexcept;
117 bool IsValid() const noexcept;
118 constexpr
bool HasData() const noexcept;
120 constexpr
bool IsGet() const noexcept;
121 constexpr
bool IsSet() const noexcept;
126 rdm::Command
ToRdm() const;
229 return (cmd_.
rdm_header.command_class == kRdmCCGetCommand);
235 return (cmd_.
rdm_header.command_class == kRdmCCSetCommand);
369 return rdm_command_header_is_valid(&cmd_.
rdm_header);
381 return (cmd_.
rdm_header.command_class == kRdmCCGetCommand);
387 return (cmd_.
rdm_header.command_class == kRdmCCSetCommand);
An RDM command received over LLRP and delivered to an RDMnet callback function.
Definition: llrp_rdm_command.h:46
RdmCommand()=delete
Not default-constructible.
RdmCommand & operator=(const RdmCommand &other)=delete
Not copyable - use Save() to create a copyable version.
constexpr etcpal_iptype_t netint_ip_type() const noexcept
Get the IP protocol type of the network interface on which this command was received.
Definition: llrp_rdm_command.h:161
constexpr etcpal::Uuid source_cid() const noexcept
Get the CID of the LLRP manager that sent this command.
Definition: llrp_rdm_command.h:142
constexpr rdm::Uid dest_uid() const noexcept
Get the UID of the LLRP target to which this command is addressed.
Definition: llrp_rdm_command.h:179
constexpr uint16_t subdevice() const noexcept
Get the RDM subdevice to which this command is addressed (0 means the root device).
Definition: llrp_rdm_command.h:185
constexpr rdm_command_class_t command_class() const noexcept
Get the RDM command class of this command.
Definition: llrp_rdm_command.h:191
constexpr const uint8_t * data() const noexcept
Get a pointer to the RDM parameter data buffer contained within this command.
Definition: llrp_rdm_command.h:209
SavedRdmCommand Save() const
Save the data in this command for later use with API functions from a different context.
Definition: llrp_rdm_command.h:252
constexpr bool IsGet() const noexcept
Whether this command is an RDM GET command.
Definition: llrp_rdm_command.h:227
constexpr const LlrpRdmCommand & get() const noexcept
Get a const reference to the underlying C type.
Definition: llrp_rdm_command.h:239
constexpr rdm::Uid source_uid() const noexcept
Get the UID of the LLRP manager that sent this command.
Definition: llrp_rdm_command.h:173
constexpr unsigned int netint_index() const noexcept
Get the index of the network interface on which this command was received.
Definition: llrp_rdm_command.h:167
constexpr uint16_t param_id() const noexcept
Get the RDM parameter ID (PID) of this command.
Definition: llrp_rdm_command.h:197
constexpr bool IsSet() const noexcept
Whether this command is an RDM SET command.
Definition: llrp_rdm_command.h:233
constexpr rdm::CommandHeader rdm_header() const noexcept
Get the RDM protocol header contained within this command.
Definition: llrp_rdm_command.h:203
constexpr uint32_t seq_num() const noexcept
Get the LLRP sequence number of this command.
Definition: llrp_rdm_command.h:148
constexpr RdmnetMcastNetintId netint_id() const noexcept
Get the network interface ID on which this command was received.
Definition: llrp_rdm_command.h:155
constexpr bool HasData() const noexcept
Whether this command has any associated RDM parameter data.
Definition: llrp_rdm_command.h:221
constexpr uint8_t data_len() const noexcept
Get the length of the RDM parameter data contained within this command.
Definition: llrp_rdm_command.h:215
rdm::Command ToRdm() const
Convert the RDM data in this command to an RDM command type.
Definition: llrp_rdm_command.h:245
RdmCommand(const RdmCommand &other)=delete
Not copyable - use Save() to create a copyable version.
An RDM command received over LLRP by a local component and saved for a later response.
Definition: llrp_rdm_command.h:91
ETCPAL_CONSTEXPR_14 LlrpSavedRdmCommand & get() noexcept
Get a mutable reference to the underlying C type.
Definition: llrp_rdm_command.h:391
SavedRdmCommand & operator=(const LlrpSavedRdmCommand &c_cmd) noexcept
Assign an instance of the C LlrpSavedRdmCommand type to an instance of this class.
Definition: llrp_rdm_command.h:267
constexpr const uint8_t * data() const noexcept
Get a pointer to the RDM parameter data buffer contained within this command.
Definition: llrp_rdm_command.h:354
constexpr rdm::Uid source_uid() const noexcept
Get the UID of the LLRP manager that sent this command.
Definition: llrp_rdm_command.h:318
constexpr rdm::CommandHeader rdm_header() const noexcept
Get the RDM protocol header contained within this command.
Definition: llrp_rdm_command.h:348
constexpr rdm::Uid dest_uid() const noexcept
Get the UID of the LLRP target to which this command is addressed.
Definition: llrp_rdm_command.h:324
constexpr unsigned int netint_index() const noexcept
Get the index of the network interface on which this command was received.
Definition: llrp_rdm_command.h:312
constexpr bool HasData() const noexcept
Whether this command has any associated RDM parameter data.
Definition: llrp_rdm_command.h:373
constexpr rdm_command_class_t command_class() const noexcept
Get the RDM command class of this command.
Definition: llrp_rdm_command.h:336
constexpr uint8_t data_len() const noexcept
Get the length of the RDM parameter data contained within this command.
Definition: llrp_rdm_command.h:360
constexpr etcpal::Uuid source_cid() const noexcept
Get the CID of the LLRP manager that sent this command.
Definition: llrp_rdm_command.h:287
constexpr uint16_t subdevice() const noexcept
Get the RDM subdevice to which this command is addressed (0 means the root device).
Definition: llrp_rdm_command.h:330
constexpr uint16_t param_id() const noexcept
Get the RDM parameter ID (PID) of this command.
Definition: llrp_rdm_command.h:342
constexpr etcpal_iptype_t netint_ip_type() const noexcept
Get the IP protocol type of the network interface on which this command was received.
Definition: llrp_rdm_command.h:306
constexpr bool IsGet() const noexcept
Whether this command is an RDM GET command.
Definition: llrp_rdm_command.h:379
SavedRdmCommand()=default
Create an empty, invalid SavedRdmCommand by default.
constexpr uint32_t seq_num() const noexcept
Get the LLRP sequence number of this command.
Definition: llrp_rdm_command.h:293
constexpr bool IsSet() const noexcept
Whether this command is an RDM SET command.
Definition: llrp_rdm_command.h:385
bool IsValid() const noexcept
Whether the values contained in this command are valid for an RDM command.
Definition: llrp_rdm_command.h:367
constexpr RdmnetMcastNetintId netint_id() const noexcept
Get the network interface ID on which this command was received.
Definition: llrp_rdm_command.h:300
rdm::Command ToRdm() const
Convert the RDM data in this command to an RDM command type.
Definition: llrp_rdm_command.h:403
#define ETCPAL_CONSTEXPR_14_OR_INLINE
etcpal_error_t rdmnet_save_llrp_rdm_command(const LlrpRdmCommand *command, LlrpSavedRdmCommand *saved_command)
Save the data in a received LLRP RDM command for later use with API functions from a different contex...
Definition: message.c:443
Basic types for parsed RDMnet messages.
A namespace which contains all C++ language definitions in the RDMnet library.
Definition: broker.h:45
An RDM command received from a remote LLRP Manager.
Definition: message.h:439
uint32_t seq_num
The sequence number received with this command, to be echoed in the corresponding response.
Definition: message.h:443
const uint8_t * data
Pointer to buffer containing any associated RDM parameter data.
Definition: message.h:452
uint8_t data_len
The length of any associated RDM parameter data.
Definition: message.h:454
EtcPalUuid source_cid
The CID of the LLRP Manager from which this command was received.
Definition: message.h:441
RdmCommandHeader rdm_header
The header information from the encapsulated RDM command.
Definition: message.h:450
RdmnetMcastNetintId netint_id
An ID for the network interface on which this command was received.
Definition: message.h:448
An RDM command received from a remote LLRP Manager.
Definition: message.h:459
A set of identifying information for a network interface, for multicast purposes.
Definition: common.h:364
etcpal_iptype_t ip_type
The IP protocol used on the network interface.
Definition: common.h:366
unsigned int index
The index of the network interface.
Definition: common.h:368