LedDevice implementation for a lightpack device (http://code.google.com/p/light-pack/)
More...
#include <LedDeviceLightpack.h>
|
| LedDeviceLightpack (const QString &serialNumber="") |
| Constructs the LedDeviceLightpack. More...
|
|
| LedDeviceLightpack (const QJsonObject &deviceConfig) |
| Constructs specific LedDevice. More...
|
|
bool | init (const QJsonObject &deviceConfig) |
| Sets configuration. More...
|
|
virtual | ~LedDeviceLightpack () |
| Destructor of the LedDevice; closes the output device if it is open.
|
|
int | open () |
| Opens and configures the output device. More...
|
|
int | write (const ColorRgb *ledValues, int size) |
| Writes the RGB-Color values to the leds. More...
|
|
virtual int | switchOff () |
| Switch the leds off. More...
|
|
const QString & | getSerialNumber () const |
| Get the serial of the Lightpack.
|
|
int | getLedCount () const |
| Get the number of leds.
|
|
| LedDevice (const QJsonObject &config=QJsonObject(), QObject *parent=nullptr) |
|
virtual int | switchOn () |
| Switch the leds on (led hardware enable), used if reinitialization is required for the device implementation.
|
|
virtual int | setLedValues (const std::vector< ColorRgb > &ledValues) |
|
const QString & | getColorOrder () |
| Get color order of device. More...
|
|
void | setActiveDevice (QString dev) |
|
const QString & | getActiveDevice () |
|
void | setLedCount (int ledCount) |
|
int | getLedCount () |
|
void | setEnable (bool enable) |
|
bool | enabled () |
|
int | getLatchTime () |
|
bool | componentState () |
|
|
virtual void | start () |
| Is called on thread start, all construction tasks and init should run here.
|
|
void | enableStateChanged (bool newState) |
| Emits whenever the led device switches between on/off. More...
|
|
void | visiblePriorityChanged (const quint8 &priority) |
| PIPER signal for Priority Muxer -> LedDevice. More...
|
|
int | rewriteLeds () |
| Write the last data to the leds again.
|
|
QJsonObject | _devConfig |
|
Logger * | _log |
| The common Logger instance for all LedDevices.
|
|
std::vector< uint8_t > | _ledBuffer |
| The buffer containing the packed RGB values.
|
|
bool | _deviceReady |
|
QString | _activeDevice |
|
int | _ledCount |
|
int | _ledRGBCount |
|
int | _ledRGBWCount |
|
QTimer | _refresh_timer |
| Timer object which makes sure that led data is written at a minimum rate e.g. More...
|
|
unsigned int | _refresh_timer_interval |
|
qint64 | _last_write_time |
|
unsigned int | _latchTime_ms |
|
§ LedDeviceLightpack() [1/2]
LedDeviceLightpack::LedDeviceLightpack |
( |
const QString & |
serialNumber = "" | ) |
|
§ LedDeviceLightpack() [2/2]
LedDeviceLightpack::LedDeviceLightpack |
( |
const QJsonObject & |
deviceConfig | ) |
|
Constructs specific LedDevice.
- Parameters
-
deviceConfig | json device config |
§ init()
bool LedDeviceLightpack::init |
( |
const QJsonObject & |
deviceConfig | ) |
|
|
virtual |
Sets configuration.
- Parameters
-
deviceConfig | the json device config |
- Returns
- true if success
Reimplemented from LedDevice.
§ open()
int LedDeviceLightpack::open |
( |
| ) |
|
|
virtual |
Opens and configures the output device.
- Returns
- Zero on succes else negative
Reimplemented from LedDevice.
§ switchOff()
int LedDeviceLightpack::switchOff |
( |
| ) |
|
|
virtual |
Switch the leds off.
- Returns
- Zero on success else negative
Reimplemented from LedDevice.
§ write()
int LedDeviceLightpack::write |
( |
const ColorRgb * |
ledValues, |
|
|
int |
size |
|
) |
| |
Writes the RGB-Color values to the leds.
- Parameters
-
[in] | ledValues | Array of RGB values |
[in] | size | The number of RGB values |
- Returns
- Zero on success else negative
The documentation for this class was generated from the following files: