Open Lighting Architecture: ola::RDMResponse Class Reference

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
ola::RDMResponse Class Reference

## Detailed Description

An RDM Command that represents responses (GET, SET or DISCOVER).

Inheritance diagram for ola::RDMResponse:

## Public Member Functions
| RDMResponse (const UID &source, const UID &destination, uint8_t transaction_number, uint8_t response_type, uint8_t message_count, uint16_t sub_device, RDMCommand::RDMCommandClass command_class, uint16_t param_id, const uint8_t *data, unsigned int length)
| Create a new RDM Response.
virtual void | Print (CommandPrinter *printer, bool summarize, bool unpack_param_data) const
RDMResponse * | Duplicate () const
| Make a copy of the response.
Accessors
uint8_t | ResponseType () const
| The Response Type.
RDMCommandClass | CommandClass () const
| The CommmandClass of this message.
Mutators
void | SetDestinationUID (const UID &destination_uid)
| Set the destination UID.
void | SetTransactionNumber (uint8_t transaction_number)
| Set the transaction number.
Public Member Functions inherited from ola::rdm::RDMCommand
virtual uint16_t | Checksum (uint16_t checksum) const
| Modify the calculated checksum for this command.
virtual void | Print (CommandPrinter *printer, bool summarize, bool unpack_param_data) const
| Output the contents of the command to a CommandPrinter.
bool | operator== (const RDMCommand &other) const
| Test for equality.
virtual uint8_t | SubStartCode () const
| The Sub-Start code for the RDMCommand.
virtual uint8_t | MessageLength () const
| The Message length field.
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 RDMResponse * | InflateFromData (const uint8_t *data, size_t length, RDMStatusCode *status_code, const RDMRequest *request=NULL)
static RDMResponse * | InflateFromData (const ola::io::ByteString &input, RDMStatusCode *status_code, const RDMRequest *request=NULL)
static RDMResponse * | CombineResponses (const RDMResponse *response1, const RDMResponse *response2)
| Combine two RDMResponses.
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.

## Static Public Attributes
static const unsigned int | MAX_OVERFLOW_SIZE = 4 << 10
| The maximum size of an ACK_OVERFLOW session that we'll buffer.
Static Public Attributes inherited from ola::rdm::RDMCommand
static const uint8_t | START_CODE = 0xcc
| The RDM Start Code.

## 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...
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)
Protected Attributes inherited from ola::rdm::RDMCommand
uint8_t | m_port_id
UID | m_source
UID | m_destination
uint8_t | m_transaction_number

## Constructor & Destructor Documentation

## ◆ RDMResponse()

ola::rdm::RDMResponse::RDMResponse | ( | const UID & | source,
|  | const UID & | destination,
|  | uint8_t | transaction_number,
|  | uint8_t | response_type,
|  | uint8_t | message_count,
|  | uint16_t | sub_device,
|  | RDMCommand::RDMCommandClass | command_class,
|  | uint16_t | param_id,
|  | const uint8_t * | data,
|  | unsigned int | length )
| inline

Create a new RDM Response.

Parameters

  source | The source UID.
  destination | The destination UID.
  transaction_number | The transaction number.
  response_type | The Response Type.
  message_count | Set to 0.
  sub_device | The Sub Device index.
  command_class | The Command Class of this request.
  param_id | The PID value.
  data | The parameter data, or NULL if there isn't any.
  length | The length of the parameter data.

## Member Function Documentation

## ◆ CommandClass()

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

The CommmandClass of this message.

Implements ola::rdm::RDMCommand.

## ◆ Duplicate()

RDMResponse * ola::rdm::RDMResponse::Duplicate | ( |  | ) | const
| inline

Make a copy of the response.

Returns
  A new RDMResponse that is identical to this one.

## ◆ InflateFromData()

RDMResponse * ola::rdm::RDMResponse::InflateFromData | ( | const ola::io::ByteString & | input,
|  | RDMStatusCode * | status_code,
|  | const RDMRequest * | request = NULL )
| inlinestatic

Create a RDMResponse request from raw data in a ByteString.

Parameters

  | input | the raw response data.
  [out] | status_code | a pointer to a RDMStatusCode to set
  | request | an optional RDMRequest object that this response is for

Returns
  a new RDMResponse object, or NULL is this response is invalid

## ◆ ResponseType()

uint8_t ola::rdm::RDMResponse::ResponseType | ( |  | ) | const
| inline

The Response Type.

Returns
  The Response Type (ACK, NACK, etc.)

## ◆ SetDestinationUID()

void ola::rdm::RDMResponse::SetDestinationUID | ( | const UID & | destination_uid | ) |
| inline

Set the destination UID.

Parameters

  destination_uid | The new destination UID.

## ◆ SetTransactionNumber()

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

Set the transaction number.

Parameters

  transaction_number | the new transaction number.

## Member Data Documentation

## ◆ MAX_OVERFLOW_SIZE

const unsigned int ola::rdm::RDMResponse::MAX_OVERFLOW_SIZE = 4 << 10
| static

The maximum size of an ACK_OVERFLOW session that we'll buffer.

4k should be big enough for everyone ;)

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

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