hyperion.ng/libsrc/leddevice/LedDeviceTest.h
T. van der Zwan b63753f5dc Moved all devices to separate library and added 'Factory' for device creation.
Former-commit-id: 26cab1b85b00406240689ad9c1018f0307028fe4
2013-12-17 18:50:15 +00:00

42 lines
817 B
C++

#pragma once
// STL includes0
#include <fstream>
// Leddevice includes
#include <leddevice/LedDevice.h>
///
/// Implementation of the LedDevice that write the led-colors to an
/// ASCII-textfile('/home/pi/LedDevice.out')
///
class LedDeviceTest : public LedDevice
{
public:
///
/// Constructs the test-device, which opens an output stream to the file
///
LedDeviceTest(const std::string& output);
///
/// Destructor of this test-device
///
virtual ~LedDeviceTest();
///
/// 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<ColorRgb> & ledValues);
/// Switch the leds off
virtual int switchOff();
private:
/// The outputstream
std::ofstream _ofs;
};