Hue::DimmableDevice Class Reference
#include <DimmableDevice.h>
Inheritance diagram for Hue::DimmableDevice:
Collaboration diagram for Hue::DimmableDevice:
Public Member Functions | |
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 |
![]() | |
virtual | ~Item () |
virtual XML::Node * | getDescription (XML::Document &doc, DescType descType) const |
virtual ItemEnumerator * | getList (unsigned index, String &name) |
virtual Item * | next () const |
bool | operator== (const Item &other) const |
Additional Inherited Members | |
![]() | |
enum class | Attribute { XX } |
enum class | 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
◆ DimmableDevice()
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: