Open Lighting Architecture  Latest Git
Classes | Public Member Functions | Public Attributes | List of all members
ola::rdm::RDMFrame Class Reference

Detailed Description

The raw data for a RDM message and its associated timing information.

A RDMFrame holds the raw data and timing metadata for a RDM message. If no timing data was available, the timing values will be 0.

RDMFrames include the RDM Start Code (0xCC).

Collaboration diagram for ola::rdm::RDMFrame:
Collaboration graph
[legend]

Classes

struct  Options
 

Public Member Functions

 RDMFrame (const uint8_t *data, unsigned int length, const Options &options=Options())
 Create an RDMFrame from a uint8_t pointer. More...
 
 RDMFrame (const ola::io::ByteString &data, const Options &options=Options())
 Create a RDMFrame using a ByteString. string. More...
 
bool operator== (const RDMFrame &other) const
 Test for equality. More...
 

Public Attributes

ola::io::ByteString data
 The raw RDM data, including the RDM start code.
 
struct {
   uint32_t   response_time
 The time between the end of the last byte of the request to the start of the response.
 
   uint32_t   break_time
 The duration of the break.
 
   uint32_t   mark_time
 The duration of the mark-after-break.
 
   uint32_t   data_time
 The time between the first and last byte of the data.
 
timing
 The timing measurements for an RDM Frame. More...
 

Constructor & Destructor Documentation

◆ RDMFrame() [1/2]

ola::rdm::RDMFrame::RDMFrame ( const uint8_t *  data,
unsigned int  length,
const Options options = Options() 
)

Create an RDMFrame from a uint8_t pointer.

Parameters
dataA pointer to the frame data, the contents are copied.
lengthThe size of the frame data.
optionsOptions used when creating the RDMFrame.

◆ RDMFrame() [2/2]

ola::rdm::RDMFrame::RDMFrame ( const ola::io::ByteString data,
const Options options = Options() 
)
explicit

Create a RDMFrame using a ByteString. string.

Parameters
dataThe ByteString with the RDM frame data.
optionsOptions used when creating the RDMFrame.

Member Function Documentation

◆ operator==()

bool ola::rdm::RDMFrame::operator== ( const RDMFrame other) const

Test for equality.

Parameters
otherThe RDMFrame to test against.
Returns
True if two RDMFrames are equal, including any timing information.

Member Data Documentation

◆ timing

struct { ... } ola::rdm::RDMFrame::timing

The timing measurements for an RDM Frame.

All times are measured in nanoseconds.

For DUB responses, the break and mark values will be 0.


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