hyperion.ng/libsrc/hyperion/device/LedDeviceTest.h

42 lines
815 B
C
Raw Normal View History

#pragma once
// STL includes0
#include <fstream>
// Hyperion includes
#include <hyperion/LedDevice.h>
2013-09-09 04:54:13 +02:00
///
/// Implementation of the LedDevice that write the led-colors to an
/// ASCII-textfile('/home/pi/LedDevice.out')
///
class LedDeviceTest : public LedDevice
{
public:
2013-09-09 04:54:13 +02:00
///
/// Constructs the test-device, which opens an output stream to the file
///
LedDeviceTest(const std::string& output);
2013-09-09 04:54:13 +02:00
///
/// Destructor of this test-device
///
virtual ~LedDeviceTest();
2013-09-09 04:54:13 +02:00
///
/// Writes the given led-color values to the output stream
///
/// @param ledValues The color-value per led
///
/// @return Zero on success else negative
///
virtual int write(const std::vector<RgbColor> & ledValues);
/// Switch the leds off
virtual int switchOff();
private:
2013-09-09 04:54:13 +02:00
/// The outputstream
std::ofstream _ofs;
};