2016-01-06 10:40:48 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
// Leddevice includes
|
|
|
|
#include <leddevice/LedDevice.h>
|
|
|
|
|
|
|
|
///
|
2016-08-08 00:17:00 +02:00
|
|
|
/// Implementation of the LedDevice that write the led-colors via udp
|
|
|
|
///
|
2016-01-06 10:40:48 +01:00
|
|
|
///
|
|
|
|
class LedDeviceUdp : public LedDevice
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
///
|
|
|
|
/// Constructs the test-device, which opens an output stream to the file
|
|
|
|
///
|
2016-08-08 00:17:00 +02:00
|
|
|
LedDeviceUdp(const std::string& output, const unsigned protocol, const unsigned maxPacket);
|
2016-01-06 10:40:48 +01:00
|
|
|
|
|
|
|
///
|
|
|
|
/// 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();
|
|
|
|
|
|
|
|
};
|