mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
197af35de0
* start ledclone * led cloning: clone scan areas from original led main: show exceptions, better exit * tune json schema for new option. somwe cleanup * fix warnings and bug for framebuffer selection. thx to clang brought by new osx buikld on travis * make ledclone feature work flawlessly for effects too. Effect sees the ledstring without cloned leds. cloned leds will be inserted just before sending to leddevice additional: remove warnings and fix code style * fix warning
42 lines
856 B
C++
42 lines
856 B
C++
#pragma once
|
|
|
|
// STL includes0
|
|
#include <fstream>
|
|
|
|
// Leddevice includes
|
|
#include <leddevice/LedDevice.h>
|
|
|
|
///
|
|
/// Implementation of the LedDevice that write the led-colors via udp
|
|
///
|
|
///
|
|
class LedDeviceUdp : public LedDevice
|
|
{
|
|
public:
|
|
///
|
|
/// Constructs the test-device, which opens an output stream to the file
|
|
///
|
|
LedDeviceUdp(const std::string& output, const unsigned protocol, const unsigned maxPacket);
|
|
|
|
///
|
|
/// Destructor of this test-device
|
|
///
|
|
virtual ~LedDeviceUdp();
|
|
|
|
///
|
|
/// 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 number of leds (needed when switching off)
|
|
size_t mLedCount;
|
|
};
|