4 #include <leddevice/LedDevice.h> 5 #include "ProviderUdp.h" 8 #include <ssdp/SSDPDiscover.h> 12 #include <QNetworkAccessManager> 60 virtual int write(
const std::vector<ColorRgb> & ledValues);
71 bool init(
const QJsonObject &deviceConfig);
75 QNetworkAccessManager* _networkmanager;
83 QString _deviceFirmwareVersion;
84 ushort _extControlVersion;
88 std::vector<uint> _panelIds;
95 bool discoverNanoleafDevice();
102 QJsonDocument changeToExternalControlMode();
110 QString getOnOffRequest (
bool isOn )
const;
121 QString getUrl(QString host, QString port, QString auth_token, QString endpoint)
const;
129 QJsonDocument getJson(QString url)
const;
138 QJsonDocument putJson(QString url, QString json)
const;
147 QJsonDocument handleReply(QNetworkReply*
const &reply )
const;
The ProviderUdp implements an abstract base-class for LedDevices using UDP packets.
Definition: ProviderUdp.h:15
Interface (pure virtual base class) for LedDevices.
Definition: LedDevice.h:32
static LedDevice * construct(const QJsonObject &deviceConfig)
Constructs leddevice.
Definition: LedDeviceNanoleaf.cpp:75
virtual ~LedDeviceNanoleaf()
Destructor of the LedDevice; closes the tcp client.
Definition: LedDeviceNanoleaf.cpp:360
virtual int write(const std::vector< ColorRgb > &ledValues)
Writes the led color values to the led-device.
Definition: LedDeviceNanoleaf.cpp:365
bool init(const QJsonObject &deviceConfig)
Identifies a Nanoleaf device's panel configuration, sets device into External Control (UDP) mode...
Definition: LedDeviceNanoleaf.cpp:86
LedDeviceNanoleaf(const QJsonObject &deviceConfig)
Constructs the LedDevice for Nanoleaf LightPanels (aka Aurora) or Canvas.
Definition: LedDeviceNanoleaf.cpp:80
virtual int switchOff()
Switch the leds off.
Definition: LedDeviceNanoleaf.cpp:487
virtual int switchOn()
Switch the leds on.
Definition: LedDeviceNanoleaf.cpp:478
Implementation of the LedDevice interface for sending to Nanoleaf devices via network by using the 'e...
Definition: LedDeviceNanoleaf.h:18