Hue::ColourDevice Class Reference
#include <ColourDevice.h>
Inheritance diagram for Hue::ColourDevice:
Collaboration diagram for Hue::ColourDevice:
Public Member Functions | |
ColourDevice (ID id, const String &name) | |
bool | getAttribute (Attribute attr, unsigned &value) const override |
Get the (cached) device attribute value. More... | |
Status | setAttribute (Attribute attr, unsigned value, Callback callback) override |
Set a device attribute. More... | |
![]() | |
DimmableDevice (ID id, const String &name) | |
bool | getAttribute (Attribute attr, unsigned &value) const override |
Get the (cached) device attribute value. More... | |
Status | setAttribute (Attribute attr, unsigned value, Callback callback) override |
Set a device attribute. More... | |
![]() | |
OnOffDevice (ID id, const String &name) | |
ID | getId () const override |
String | getName () const override |
bool | getAttribute (Attribute attr, unsigned &value) const override |
Get the (cached) device attribute value. More... | |
Status | setAttribute (Attribute attr, unsigned value, Callback callback) override |
Set a device attribute. More... | |
![]() | |
virtual | ~Device () |
virtual String | getUniqueId () const |
Returns the unique device ID string. More... | |
virtual ColorMode | getColorMode () const |
virtual void | getInfo (JsonObject json) |
bool | operator== (const Device &dev) const |
Two devices are considered equal if they have the same ID. More... | |
bool | operator== (const String &name) const |
bool | operator== (ID id) const |
Additional Inherited Members | |
![]() | |
enum | Attribute { Attribute::XX } |
enum | ColorMode { ColorMode::XX } |
using | ID = uint32_t |
using | Attributes = BitSet< uint8_t, Attribute > |
using | Callback = Delegate< void(Status status, int errorCode)> |
Callback invoked when setAttribute() has completed. More... | |
Constructor & Destructor Documentation
◆ ColourDevice()
Member Function Documentation
◆ getAttribute()
|
inlineoverridevirtual |
Get the (cached) device attribute value.
- Parameters
-
attr value
- Return values
-
bool true on success, false if attribute not supported or value unknown
Implements Hue::Device.
◆ setAttribute()
|
inlineoverridevirtual |
Set a device attribute.
- Parameters
-
attr The attribute to change value Value for the attribute (exact type is attribute-specific) callback If you return Status::pending, invoke this callback when completed
- Return values
-
Status
- Note
- DO NOT invoke the callback directly: only use it if pended.
Implements Hue::Device.
The documentation for this class was generated from the following file: