BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
RevogiSmartLite.h
1 #pragma once
2 
3 #include <Poco/SharedPtr.h>
4 
5 #include "bluetooth/RevogiRGBLight.h"
6 
7 namespace BeeeOn {
8 
14 public:
15  typedef Poco::SharedPtr<RevogiSmartLite> Ptr;
16 
17  static const std::string LIGHT_NAME;
18 
19 public:
21  const MACAddress& address,
22  const Poco::Timespan& timeout,
23  const RefreshTime& refresh,
24  const HciInterface::Ptr hci);
25  ~RevogiSmartLite();
26 
27  void requestModifyState(
28  const ModuleID& moduleID,
29  const double value) override;
30 
31 protected:
32  void modifyStatus(const double value, const HciConnection::Ptr conn);
33  void modifyBrightness(
34  const double value,
35  const unsigned char colorTemperature,
36  const HciConnection::Ptr conn);
37  void modifyColorTemperature(const double value, const HciConnection::Ptr conn);
38 
39  unsigned char colorTempFromKelvins(const double temperature) const;
40  unsigned int colorTempToKelvins(const double value) const;
41 
47  SensorData parseValues(const std::vector<unsigned char>& values) const override;
48 };
49 
50 }
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 generic Revogi RGB light. It allows to control the on/off, brightness and color ...
Definition: RevogiRGBLight.h:19
Definition: MACAddress.h:8
RefreshTime refresh() const override
Regular period telling how often to call the method PollableDevice::poll(). The refresh must contain ...
Definition: BLESmartDevice.cpp:31
Definition: ModuleID.h:12
void requestModifyState(const ModuleID &moduleID, const double value) override
Modifies the device module given by moduleID to a given value.
Definition: RevogiSmartLite.cpp:46
SensorData parseValues(const std::vector< unsigned char > &values) const override
Definition: RevogiSmartLite.cpp:146
The class represents Revogi Delite-1748 bulb. It allows to control all its modules.
Definition: RevogiSmartLite.h:13