BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes
BeeeOn::PhilipsHueBulb Class Referenceabstract

Abstract class representing generic Philips Hue bulb. More...

#include <PhilipsHueBulb.h>

Inheritance diagram for BeeeOn::PhilipsHueBulb:
BeeeOn::PollableDevice BeeeOn::Loggable BeeeOn::PhilipsHueDimmableBulb

Public Types

typedef Poco::SharedPtr
< PhilipsHueBulb
Ptr
 
- Public Types inherited from BeeeOn::PollableDevice
typedef Poco::SharedPtr
< PollableDevice
Ptr
 

Public Member Functions

 PhilipsHueBulb (const uint32_t ordinalNumber, const PhilipsHueBridge::BulbID bulbId, const PhilipsHueBridge::Ptr bridge, const RefreshTime &refresh)
 The DeviceID is created based on a bulb's 64-bit identifier, where DevicePrefix is given on 8th byte.
 
virtual bool requestModifyState (const ModuleID &moduleID, const double value)=0
 
virtual SensorData requestState ()=0
 
DeviceID id () const override
 
RefreshTime refresh () const override
 Regular period telling how often to call the method PollableDevice::poll(). The refresh must contain a valid time.
 
virtual std::list< ModuleTypemoduleTypes () const =0
 
virtual std::string name () const =0
 
Poco::FastMutex & lock ()
 
PhilipsHueBridge::Ptr bridge ()
 
PhilipsHueBulbInfo info ()
 
void poll (Distributor::Ptr distributor) override
 Perform polling for data and ship them via the given distributor.
 

Static Public Attributes

static const double MAX_DIM = 255
 

Protected Member Functions

int dimToPercentage (const double value)
 
int dimFromPercentage (const double percents)
 
- Protected Member Functions inherited from BeeeOn::Loggable
void setupLogger (Poco::Logger *logger=0) const
 
Poco::Logger & logger () const
 
 Loggable (const ClassInfo &info)
 
 Loggable (const std::type_info &info)
 

Protected Attributes

const DeviceID m_deviceID
 
uint32_t m_ordinalNumber
 
PhilipsHueBridge::Ptr m_bridge
 
RefreshTime m_refresh
 

Additional Inherited Members

- Static Protected Member Functions inherited from BeeeOn::Loggable
static Poco::Logger & forMethod (const char *name)
 
static Poco::Logger & forClass (const ClassInfo &info)
 
static Poco::Logger & forClass (const std::type_info &info)
 
template<typename T >
static Poco::Logger & forInstance (const T *i)
 
static void configureSimple (Poco::Logger &logger, const std::string &level)
 
static void logException (Poco::Logger &logger, const Poco::Message::Priority priority, const Poco::Exception &e, const char *file, size_t line)
 

Detailed Description

Abstract class representing generic Philips Hue bulb.

Member Function Documentation

DeviceID PhilipsHueBulb::id ( ) const
overridevirtual
Returns
ID of the device.

Implements BeeeOn::PollableDevice.


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