hyperion.ng/libsrc/leddevice/LedDeviceFile.cpp

33 lines
479 B
C++
Raw Normal View History

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