23 #ifndef RDMNET_CPP_MESSAGE_TYPES_RDM_COMMAND_H_ 
   24 #define RDMNET_CPP_MESSAGE_TYPES_RDM_COMMAND_H_ 
   27 #include "etcpal/common.h" 
   28 #include "rdm/cpp/message.h" 
   29 #include "rdm/cpp/uid.h" 
   30 #include "rdmnet/defs.h" 
   35 class SavedRdmCommand;
 
   56   constexpr uint32_t 
seq_num() const noexcept;
 
   60   constexpr uint16_t            
subdevice() const noexcept;
 
   62   constexpr uint16_t            
param_id() const noexcept;
 
   64   constexpr rdm::CommandHeader 
rdm_header() const noexcept;
 
   66   constexpr const uint8_t* 
data() const noexcept;
 
   67   constexpr uint8_t        
data_len() const noexcept;
 
   69   constexpr 
bool HasData() const noexcept;
 
   72   constexpr 
bool IsGet() const noexcept;
 
   73   constexpr 
bool IsSet() const noexcept;
 
   77   rdm::Command    
ToRdm() const;
 
   98   constexpr uint32_t 
seq_num() const noexcept;
 
  102   constexpr uint16_t            
subdevice() const noexcept;
 
  103   constexpr rdm_command_class_t 
command_class() const noexcept;
 
  104   constexpr uint16_t            
param_id() const noexcept;
 
  106   constexpr rdm::CommandHeader 
rdm_header() const noexcept;
 
  108   constexpr const uint8_t* 
data() const noexcept;
 
  109   constexpr uint8_t        
data_len() const noexcept;
 
  111   bool           IsValid() const noexcept;
 
  112   constexpr 
bool HasData() const noexcept;
 
  115   constexpr 
bool IsGet() const noexcept;
 
  116   constexpr 
bool IsSet() const noexcept;
 
  121   rdm::Command 
ToRdm() const;
 
  211   return (cmd_.
rdm_header.command_class == kRdmCCGetCommand);
 
  217   return (cmd_.
rdm_header.command_class == kRdmCCSetCommand);
 
  345   return rdm_command_header_is_valid(&cmd_.
rdm_header);
 
  364   return (cmd_.
rdm_header.command_class == kRdmCCGetCommand);
 
  370   return (cmd_.
rdm_header.command_class == kRdmCCSetCommand);
 
An RDM command received over RDMnet and delivered to an RDMnet callback function.
Definition: rdm_command.h:43
 
constexpr uint8_t data_len() const noexcept
Get the length of the RDM parameter data contained within this command.
Definition: rdm_command.h:197
 
RdmCommand(const RdmCommand &other)=delete
Not copyable - use Save() to create a copyable version.
 
constexpr uint16_t subdevice() const noexcept
Get the RDM subdevice to which this command is addressed (0 means the root device).
Definition: rdm_command.h:167
 
RdmCommand & operator=(const RdmCommand &other)=delete
Not copyable - use Save() to create a copyable version.
 
constexpr bool IsToDefaultResponder() const noexcept
Whether this command is addressed to the RDMnet default responder.
Definition: rdm_command.h:222
 
constexpr bool IsSet() const noexcept
Whether this command is an RDM SET command.
Definition: rdm_command.h:215
 
RdmCommand()=delete
Not default-constructible.
 
constexpr uint32_t seq_num() const noexcept
Get the RDMnet sequence number of this command.
Definition: rdm_command.h:149
 
constexpr uint16_t param_id() const noexcept
Get the RDM parameter ID (PID) of this command.
Definition: rdm_command.h:179
 
constexpr bool HasData() const noexcept
Whether this command has any associated RDM parameter data.
Definition: rdm_command.h:203
 
constexpr rdm::Uid rdm_dest_uid() const noexcept
Get the UID of the RDM responder to which this command is addressed.
Definition: rdm_command.h:161
 
SavedRdmCommand Save() const
Save the data in this command for later use with API functions from a different context.
Definition: rdm_command.h:241
 
rdm::Command ToRdm() const
Convert the RDM data in this command to an RDM command type.
Definition: rdm_command.h:234
 
constexpr rdm::Uid rdm_source_uid() const noexcept
Get the UID of the RDM controller that has sent this command.
Definition: rdm_command.h:155
 
constexpr uint16_t dest_endpoint() const noexcept
Get the endpoint to which this command is addressed.
Definition: rdm_command.h:143
 
constexpr rdm::CommandHeader rdm_header() const noexcept
Get the RDM protocol header contained within this command.
Definition: rdm_command.h:185
 
constexpr bool IsGet() const noexcept
Whether this command is an RDM GET command.
Definition: rdm_command.h:209
 
constexpr const RdmnetRdmCommand & get() const noexcept
Get a const reference to the underlying C type.
Definition: rdm_command.h:228
 
constexpr rdm_command_class_t command_class() const noexcept
Get the RDM command class of this command.
Definition: rdm_command.h:173
 
constexpr const uint8_t * data() const noexcept
Get a pointer to the RDM parameter data buffer contained within this command.
Definition: rdm_command.h:191
 
constexpr rdm::Uid rdmnet_source_uid() const noexcept
Get the UID of the RDMnet controller that sent this command.
Definition: rdm_command.h:137
 
An RDM command received over RDMnet by a local component and saved for a later response.
Definition: rdm_command.h:87
 
constexpr uint8_t data_len() const noexcept
Get the length of the RDM parameter data contained within this command.
Definition: rdm_command.h:336
 
constexpr bool IsToDefaultResponder() const noexcept
Whether this command is addressed to the RDMnet default responder.
Definition: rdm_command.h:356
 
constexpr uint16_t subdevice() const noexcept
Get the RDM subdevice to which this command is addressed (0 means the root device).
Definition: rdm_command.h:306
 
constexpr const uint8_t * data() const noexcept
Get a pointer to the RDM parameter data buffer contained within this command.
Definition: rdm_command.h:330
 
SavedRdmCommand & operator=(const RdmnetSavedRdmCommand &c_cmd) noexcept
Assign an instance of the C RdmnetSavedRdmCommand type to an instance of this class.
Definition: rdm_command.h:256
 
constexpr uint16_t param_id() const noexcept
Get the RDM parameter ID (PID) of this command.
Definition: rdm_command.h:318
 
constexpr rdm_command_class_t command_class() const noexcept
Get the RDM command class of this command.
Definition: rdm_command.h:312
 
constexpr rdm::CommandHeader rdm_header() const noexcept
Get the RDM protocol header contained within this command.
Definition: rdm_command.h:324
 
constexpr rdm::Uid rdm_source_uid() const noexcept
Get the UID of the RDM controller that sent this command.
Definition: rdm_command.h:294
 
constexpr bool HasData() const noexcept
Whether this command has any associated RDM parameter data.
Definition: rdm_command.h:349
 
rdm::Command ToRdm() const
Convert the RDM data in this command to an RDM command type.
Definition: rdm_command.h:386
 
constexpr bool IsGet() const noexcept
Whether this command is an RDM GET command.
Definition: rdm_command.h:362
 
constexpr rdm::Uid rdmnet_source_uid() const noexcept
Get the UID of the RDMnet controller that sent this command.
Definition: rdm_command.h:276
 
constexpr rdm::Uid rdm_dest_uid() const noexcept
Get the UID of the RDM responder to which this command is addressed.
Definition: rdm_command.h:300
 
constexpr bool IsSet() const noexcept
Whether this command is an RDM SET command.
Definition: rdm_command.h:368
 
constexpr uint32_t seq_num() const noexcept
Get the RDMnet sequence number of this command.
Definition: rdm_command.h:288
 
ETCPAL_CONSTEXPR_14 RdmnetSavedRdmCommand & get() noexcept
Get a mutable reference to the underlying C type.
Definition: rdm_command.h:374
 
SavedRdmCommand()=default
Construct an empty, invalid SavedRdmCommand by default.
 
bool IsValid() const noexcept
Whether the values contained in this command are valid for an RDM command.
Definition: rdm_command.h:343
 
constexpr uint16_t dest_endpoint() const noexcept
Get the endpoint to which this command is addressed.
Definition: rdm_command.h:282
 
#define ETCPAL_CONSTEXPR_14_OR_INLINE
 
etcpal_error_t rdmnet_save_rdm_command(const RdmnetRdmCommand *command, RdmnetSavedRdmCommand *saved_command)
Save the data in a received RDM command for later use with API functions from a different context.
Definition: message.c:70
 
Basic types for parsed RDMnet messages.
 
A namespace which contains all C++ language definitions in the RDMnet library.
Definition: broker.h:45
 
An RDMnet RDM command received by this component.
Definition: message.h:53
 
uint8_t data_len
The length of any associated RDM parameter data.
Definition: message.h:65
 
uint16_t dest_endpoint
The local endpoint to which this command is addressed.
Definition: message.h:57
 
RdmCommandHeader rdm_header
The header information from the encapsulated RDM command.
Definition: message.h:61
 
uint32_t seq_num
The command's sequence number, to be echoed in its response.
Definition: message.h:59
 
const uint8_t * data
Pointer to buffer containing any associated RDM parameter data.
Definition: message.h:63
 
RdmUid rdmnet_source_uid
The UID of the component that sent this command.
Definition: message.h:55
 
An RDM command received by this component and saved for a later response.
Definition: message.h:73