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...
 
- Public Member Functions inherited from Hue::OnOffDevice
 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...
 
- Public Member Functions inherited from Hue::Device
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
 
- Public Member Functions inherited from UPnP::Item
virtual ~Item ()
 
virtual XML::NodegetDescription (XML::Document &doc, DescType descType) const
 
virtual ItemEnumeratorgetList (unsigned index, String &name)
 
virtual Itemnext () const
 
bool operator== (const Item &other) const
 

Additional Inherited Members

- Public Types inherited from Hue::Device
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()

Hue::DimmableDevice::DimmableDevice ( ID  id,
const String name 
)
inline

Member Function Documentation

◆ getAttribute()

bool Hue::DimmableDevice::getAttribute ( Attribute  attr,
unsigned value 
) const
inlineoverridevirtual

Get the (cached) device attribute value.

Parameters
attr
value
Return values
booltrue on success, false if attribute not supported or value unknown

Implements Hue::Device.

◆ setAttribute()

Status Hue::DimmableDevice::setAttribute ( Attribute  attr,
unsigned  value,
Callback  callback 
)
inlineoverridevirtual

Set a device attribute.

Parameters
attrThe attribute to change
valueValue for the attribute (exact type is attribute-specific)
callbackIf 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: