hyperion.ng/libsrc/hyperion/device/LedDeviceTest.h
T. van der Zwan dd16af0df5 Changed RgbImage to template based Image (with template for pixel type)
Former-commit-id: ef02f164eaf3c2f9dd552c1c17b525cf6eed499c
2013-11-11 09:00:37 +00:00

42 lines
815 B
C++

#pragma once
// STL includes0
#include <fstream>
// Hyperion includes
#include <hyperion/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;
};