Leddevice refactoring the next part (#253)

* add general switchOff

* refactoring of leddevices regarding ledcount and switchoff

* remove obsolete includes
This commit is contained in:
redPanther
2016-09-23 08:49:22 +02:00
committed by GitHub
parent 5aeec2e1e5
commit d6a34edfb2
71 changed files with 274 additions and 1073 deletions

View File

@@ -1,9 +1,13 @@
#pragma once
#include <QObject>
#include <QString>
// STL incldues
#include <vector>
#include <QObject>
#include <string>
#include <map>
#include <algorithm>
// Utility includes
#include <utils/ColorRgb.h>
@@ -32,17 +36,10 @@ public:
///
virtual ~LedDevice() {}
///
/// Writes the RGB-Color values to the leds.
///
/// @param[in] ledValues The RGB-color per led
///
/// @return Zero on success else negative
///
virtual int write(const std::vector<ColorRgb>& ledValues) = 0;
/// Switch the leds off
virtual int switchOff() = 0;
virtual int switchOff();
virtual int setLedValues(const std::vector<ColorRgb>& ledValues);
///
/// Opens and configures the output device
@@ -58,6 +55,15 @@ public:
static Json::Value getLedDeviceSchemas();
protected:
///
/// Writes the RGB-Color values to the leds.
///
/// @param[in] ledValues The RGB-color per led
///
/// @return Zero on success else negative
///
virtual int write(const std::vector<ColorRgb>& ledValues) = 0;
/// The common Logger instance for all LedDevices
Logger * _log;