Open Lighting Architecture  0.9.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
ola::dmx::RunLengthEncoder Class Reference

Detailed Description

Encode / Decode DMX data using Run Length Encoding

Public Member Functions

bool Encode (const DmxBuffer &src, uint8_t *data, unsigned int *size)
bool Decode (unsigned int start_channel, const uint8_t *data, unsigned int length, DmxBuffer *output)

Member Function Documentation

bool ola::dmx::RunLengthEncoder::Decode ( unsigned int  start_channel,
const uint8_t *  data,
unsigned int  length,
DmxBuffer output 
)

Decode an DMX frame and place the output in a DmxBuffer

Parameters
[in]start_channelthe first channel for the RLE'ed data
[in]datathe encoded frame.
[in]lengththe length of the encoded frame.
[out]outputthe DmxBuffer to store the frame in
Returns
true if decoding was successful, false otherwise.
bool ola::dmx::RunLengthEncoder::Encode ( const DmxBuffer src,
uint8_t *  data,
unsigned int *  size 
)

Given a DMXBuffer, run length encode the data.

Parameters
[in]srcthe DmxBuffer to encode.
[out]datawhere to store the RLE data
[in,out]sizethe size of the data segment, set to the amount of data encoded.
Returns
true if we encoded all data, false if we ran out of space

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