Implementation of the LedDevice that write the led-colors to an ASCII-textfile('/home/pi/LedDevice.out')
More...
#include <LedDeviceFile.h>
|
| | LedDeviceFile (const QJsonObject &deviceConfig) |
| | Constructs specific LedDevice. More...
|
| |
|
virtual | ~LedDeviceFile () |
| | Destructor of this test-device.
|
| |
| virtual bool | init (const QJsonObject &deviceConfig) |
| | Sets configuration. More...
|
| |
|
| LedDevice (const QJsonObject &config=QJsonObject(), QObject *parent=nullptr) |
| |
|
virtual int | switchOff () |
| | Switch the leds off (led hardware disable)
|
| |
|
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 int | write (const std::vector< ColorRgb > &ledValues) |
| | Writes the given led-color values to the output stream. More...
|
| |
| virtual int | open () |
| | Opens and configures the output device. More...
|
| |
|
|
std::ofstream | _ofs |
| | The outputstream.
|
| |
|
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 |
| |
Implementation of the LedDevice that write the led-colors to an ASCII-textfile('/home/pi/LedDevice.out')
§ LedDeviceFile()
| LedDeviceFile::LedDeviceFile |
( |
const QJsonObject & |
deviceConfig | ) |
|
Constructs specific LedDevice.
- Parameters
-
| deviceConfig | json device config |
§ init()
| bool LedDeviceFile::init |
( |
const QJsonObject & |
deviceConfig | ) |
|
|
virtual |
Sets configuration.
- Parameters
-
| deviceConfig | the json device config |
- Returns
- true if success
Reimplemented from LedDevice.
§ write()
| int LedDeviceFile::write |
( |
const std::vector< ColorRgb > & |
ledValues | ) |
|
|
protectedvirtual |
Writes the given led-color values to the output stream.
- Parameters
-
| ledValues | The color-value per led |
- Returns
- Zero on success else negative
Implements LedDevice.
The documentation for this class was generated from the following files:
- libsrc/leddevice/dev_other/LedDeviceFile.h
- libsrc/leddevice/dev_other/LedDeviceFile.cpp