hyperion.ng
Public Slots | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
LedDevicePhilipsHue Class Reference

Implementation for the Philips Hue system. More...

#include <LedDevicePhilipsHue.h>

Inheritance diagram for LedDevicePhilipsHue:
LedDevice

Public Slots

virtual void start ()
 thread start
 
- Public Slots inherited from LedDevice
virtual void start ()
 Is called on thread start, all construction tasks and init should run here.
 

Public Member Functions

 LedDevicePhilipsHue (const QJsonObject &deviceConfig)
 Constructs specific LedDevice. More...
 
virtual ~LedDevicePhilipsHue ()
 Destructor of this device.
 
- Public Member Functions inherited from LedDevice
 LedDevice (const QJsonObject &config=QJsonObject(), QObject *parent=nullptr)
 
virtual int switchOff ()
 Switch the leds off (led hardware disable)
 
virtual int switchOn ()
 Switch the leds on (led hardware enable), used if reinitialization is required for the device implementation.
 
virtual int setLedValues (const std::vector< ColorRgb > &ledValues)
 
const QString & getColorOrder ()
 Get color order of device. More...
 
void setActiveDevice (QString dev)
 
const QString & getActiveDevice ()
 
void setLedCount (int ledCount)
 
int getLedCount ()
 
void setEnable (bool enable)
 
bool enabled ()
 
int getLatchTime ()
 
bool componentState ()
 

Static Public Member Functions

static LedDeviceconstruct (const QJsonObject &deviceConfig)
 constructs leddevice
 

Protected Member Functions

virtual int write (const std::vector< ColorRgb > &ledValues)
 Writes the RGB-Color values to the leds. More...
 
bool init (const QJsonObject &deviceConfig)
 
- Protected Member Functions inherited from LedDevice
virtual int open ()
 Opens and configures the output device. More...
 

Additional Inherited Members

- Signals inherited from LedDevice
void enableStateChanged (bool newState)
 Emits whenever the led device switches between on/off. More...
 
void visiblePriorityChanged (const quint8 &priority)
 PIPER signal for Priority Muxer -> LedDevice. More...
 
- Protected Slots inherited from LedDevice
int rewriteLeds ()
 Write the last data to the leds again.
 
- Protected Attributes inherited from LedDevice
QJsonObject _devConfig
 
Logger_log
 The common Logger instance for all LedDevices.
 
std::vector< uint8_t > _ledBuffer
 The buffer containing the packed RGB values.
 
bool _deviceReady
 
QString _activeDevice
 
int _ledCount
 
int _ledRGBCount
 
int _ledRGBWCount
 
QTimer _refresh_timer
 Timer object which makes sure that led data is written at a minimum rate e.g. More...
 
unsigned int _refresh_timer_interval
 
qint64 _last_write_time
 
unsigned int _latchTime_ms
 

Detailed Description

Implementation for the Philips Hue system.

To use set the device to "philipshue". Uses the official Philips Hue API (http://developers.meethue.com).

Author
ntim (github), bimsarck (github)

Constructor & Destructor Documentation

§ LedDevicePhilipsHue()

LedDevicePhilipsHue::LedDevicePhilipsHue ( const QJsonObject &  deviceConfig)

Constructs specific LedDevice.

Parameters
deviceConfigjson device config

Member Function Documentation

§ write()

int LedDevicePhilipsHue::write ( const std::vector< ColorRgb > &  ledValues)
protectedvirtual

Writes the RGB-Color values to the leds.

Parameters
[in]ledValuesThe RGB-color per led
Returns
Zero on success else negative

Implements LedDevice.


The documentation for this class was generated from the following files: