hyperion.ng/libsrc/leddevice/LedDeviceTest.cpp
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

32 lines
472 B
C++

// Local-Hyperion includes
#include "LedDeviceTest.h"
LedDeviceTest::LedDeviceTest(const std::string& output) :
_ofs(output.empty()?"/home/pi/LedDevice.out":output.c_str())
{
// empty
}
LedDeviceTest::~LedDeviceTest()
{
// empty
}
int LedDeviceTest::write(const std::vector<ColorRgb> & ledValues)
{
_ofs << "[";
for (const ColorRgb& color : ledValues)
{
_ofs << color;
}
_ofs << "]" << std::endl;
return 0;
}
int LedDeviceTest::switchOff()
{
return 0;
}