BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
PhilipsHueDimmableBulb.h
1 #pragma once
2 
3 #include <list>
4 #include <string>
5 
6 #include <Poco/SharedPtr.h>
7 
8 #include "model/ModuleID.h"
9 #include "model/ModuleType.h"
10 #include "model/SensorData.h"
11 #include "philips/PhilipsHueBridge.h"
12 #include "philips/PhilipsHueBulb.h"
13 
14 namespace BeeeOn {
15 
20 public:
21  typedef Poco::SharedPtr<PhilipsHueDimmableBulb> Ptr;
22 
24  const uint32_t ordinalNumber,
25  const PhilipsHueBridge::BulbID bulbId,
26  const PhilipsHueBridge::Ptr bridge,
27  const RefreshTime &refresh);
28 
29  bool requestModifyState(const ModuleID& moduleID, const double value) override;
30  SensorData requestState() override;
31 
32  std::list<ModuleType> moduleTypes() const override;
33  std::string name() const override;
34 
35 private:
36  bool decodeOnOffValue(const double value) const;
37 };
38 
39 }
RefreshTime represents time of refreshing values from sensors. E.g. sensors are polled periodically o...
Definition: RefreshTime.h:24
Definition: SensorData.h:20
The class represents dimmable Philips Hue bulb.
Definition: PhilipsHueDimmableBulb.h:19
RefreshTime refresh() const override
Regular period telling how often to call the method PollableDevice::poll(). The refresh must contain ...
Definition: PhilipsHueBulb.cpp:42
Definition: ModuleID.h:12
Abstract class representing generic Philips Hue bulb.
Definition: PhilipsHueBulb.h:23