Open Lighting Architecture: ola::dmx::RunLengthEncoder Class Reference

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
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

## ◆ Decode()

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_channel | the first channel for the RLE'ed data
  [in] | data | the encoded frame.
  [in] | length | the length of the encoded frame.
  [out] | output | the DmxBuffer to store the frame in

Returns
  true if decoding was successful, false otherwise.

## ◆ Encode()

bool ola::dmx::RunLengthEncoder::Encode | ( | const DmxBuffer & | src,
|  | uint8_t * | data,
|  | unsigned int * | size )

Given a DMXBuffer, run length encode the data.

Parameters

  [in] | src | the DmxBuffer to encode.
  [out] | data | where to store the RLE data
  [in,out] | size | the 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:

- include/ola/dmx/RunLengthEncoder.h
- common/dmx/RunLengthEncoder.cpp