Open Lighting Architecture: ola::rdm::RDMRequest Class Reference

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
ola::rdm::RDMRequest Class Reference
RDM » RDM Messages

## Detailed Description

RDM Commands that represent requests (GET, SET or DISCOVER).

Inheritance diagram for ola::rdm::RDMRequest:

## Classes
struct | OverrideOptions

## Public Member Functions
| RDMRequest (const UID &source, const UID &destination, uint8_t transaction_number, uint8_t port_id, uint16_t sub_device, RDMCommandClass command_class, uint16_t param_id, const uint8_t *data, unsigned int length, const OverrideOptions &options=OverrideOptions())
| Create a new request.
RDMCommandClass | CommandClass () const
| The CommmandClass of this message.
uint8_t | PortId () const
| The Port ID for this request.
virtual RDMRequest * | Duplicate () const
| Make a copy of the request.
virtual void | Print (CommandPrinter *printer, bool summarize, bool unpack_param_data) const
| Output the contents of the command to a CommandPrinter.
bool | IsDUB () const
| Check if this is a DUB request.
uint8_t | SubStartCode () const
| The Sub-Start code for the RDMCommand.
uint8_t | MessageLength () const
| The Message length field.
uint16_t | Checksum (uint16_t checksum) const
| Modify the calculated checksum for this command.
Mutators
void | SetSourceUID (const UID &source_uid)
| Set the source UID.
void | SetTransactionNumber (uint8_t transaction_number)
| Set the transaction number.
void | SetPortId (uint8_t port_id)
| Set the Port Id.
Public Member Functions inherited from ola::rdm::RDMCommand
bool | operator== (const RDMCommand &other) const
| Test for equality.
const UID & | SourceUID () const
| Returns the Source UID of the RDMCommand.
const UID & | DestinationUID () const
| Returns the Destination UID of the RDMCommand.
uint8_t | TransactionNumber () const
| Returns the Transaction Number of the RDMCommand.
uint8_t | PortIdResponseType () const
| Returns the Port ID of the RDMCommand.
uint8_t | MessageCount () const
| Returns the Message Count of the RDMCommand.
uint16_t | SubDevice () const
| Returns the SubDevice of the RDMCommand.
uint16_t | ParamId () const
| Returns the Parameter ID of the RDMCommand.
unsigned int | ParamDataSize () const
| Returns the Size of the Parameter Data of the RDMCommand.
const uint8_t * | ParamData () const
| Returns the Parameter Data of the RDMCommand.
std::string | ToString () const
| Create a human readable string from the RDMCommand object.

## Static Public Member Functions
static RDMRequest * | InflateFromData (const uint8_t *data, unsigned int length)
| Inflate a request from some data.
Static Public Member Functions inherited from ola::rdm::RDMCommand
static RDMCommand * | Inflate (const uint8_t *data, unsigned int length)
| Extract a RDMCommand from raw data.

## Protected Attributes
OverrideOptions | m_override_options
Protected Attributes inherited from ola::rdm::RDMCommand
uint8_t | m_port_id
UID | m_source
UID | m_destination
uint8_t | m_transaction_number

## Additional Inherited Members
Public Types inherited from ola::rdm::RDMCommand
enum | RDMCommandClass { DISCOVER_COMMAND = 0x10 , DISCOVER_COMMAND_RESPONSE = 0x11 , GET_COMMAND = 0x20 , GET_COMMAND_RESPONSE = 0x21 , SET_COMMAND = 0x30 , SET_COMMAND_RESPONSE = 0x31 , INVALID_COMMAND = 0xff }
| A set of values representing CommandClasses in E1.20. More...
Static Public Attributes inherited from ola::rdm::RDMCommand
static const uint8_t | START_CODE = 0xcc
| The RDM Start Code.
Protected Member Functions inherited from ola::rdm::RDMCommand
| RDMCommand (const UID &source, const UID &destination, uint8_t transaction_number, uint8_t port_id, uint8_t message_count, uint16_t sub_device, uint16_t param_id, const uint8_t *data, unsigned int length)
| Protected constructor for derived classes.
void | SetParamData (const uint8_t *data, unsigned int length)
Static Protected Member Functions inherited from ola::rdm::RDMCommand
static RDMStatusCode | VerifyData (const uint8_t *data, size_t length, RDMCommandHeader *command_message)
static RDMCommandClass | ConvertCommandClass (uint8_t command_type)

## Member Function Documentation

## ◆ CommandClass()

RDMCommandClass ola::rdm::RDMRequest::CommandClass | ( |  | ) | const
| inlinevirtual

The CommmandClass of this message.

Implements ola::rdm::RDMCommand.

## ◆ Duplicate()

virtual RDMRequest * ola::rdm::RDMRequest::Duplicate | ( |  | ) | const
| inlinevirtual

Make a copy of the request.

Returns
  A new RDMRequest that is identical to this one.

Reimplemented in ola::rdm::BaseRDMRequest< command_class >, ola::rdm::BaseRDMRequest< RDMCommand::GET_COMMAND >, and ola::rdm::BaseRDMRequest< RDMCommand::SET_COMMAND >.

## ◆ PortId()

uint8_t ola::rdm::RDMRequest::PortId | ( |  | ) | const
| inline

The Port ID for this request.

Returns
  The Port ID.

## ◆ Print()

virtual void ola::rdm::RDMRequest::Print | ( | CommandPrinter * | printer,
|  | bool | summarize,
|  | bool | unpack_param_data ) const
| inlinevirtual

Output the contents of the command to a CommandPrinter.

Parameters

  printer | CommandPrinter which will use the information
  summarize | enable a one line summary
  unpack_param_data | if the summary isn't enabled, this controls if we unpack and display parameter data.

Reimplemented from ola::rdm::RDMCommand.

Reimplemented in ola::rdm::RDMDiscoveryRequest.

## ◆ SetPortId()

void ola::rdm::RDMRequest::SetPortId | ( | uint8_t | port_id | ) |
| inline

Set the Port Id.

Parameters

  port_id | the new Port Id.

## ◆ SetSourceUID()

void ola::rdm::RDMRequest::SetSourceUID | ( | const UID & | source_uid | ) |
| inline

Set the source UID.

Parameters

  source_uid | The new source UID.

## ◆ SetTransactionNumber()

void ola::rdm::RDMRequest::SetTransactionNumber | ( | uint8_t | transaction_number | ) |
| inline

Set the transaction number.

Parameters

  transaction_number | the new transaction number.

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

- include/ola/rdm/RDMCommand.h
- common/rdm/RDMCommand.cpp