![]() |
BeeeOn Gateway
v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
|
The class represents BeeWi smart led light. It allows to gather and to control all its modules. More...
#include <BeeWiSmartLite.h>
Public Types | |
| enum | Command { ON_OFF = 0x10, COLOR_TEMPERATURE = 0x11, BRIGHTNESS = 0x12, COLOR = 0x13 } |
|
typedef Poco::SharedPtr < BeeWiSmartLite > | Ptr |
Public Types inherited from BeeeOn::BeeWiDevice | |
|
typedef Poco::SharedPtr < BeeWiDevice > | Ptr |
Public Types inherited from BeeeOn::BLESmartDevice | |
|
typedef Poco::SharedPtr < BLESmartDevice > | Ptr |
Public Types inherited from BeeeOn::PollableDevice | |
|
typedef Poco::SharedPtr < PollableDevice > | Ptr |
Public Member Functions | |
| BeeWiSmartLite (const MACAddress &address, const Poco::Timespan &timeout, const RefreshTime &refresh, const HciInterface::Ptr hci) | |
| void | requestModifyState (const ModuleID &moduleID, const double value) override |
| Modifies the device module given by moduleID to a given value. More... | |
| SensorData | parseAdvertisingData (const std::vector< unsigned char > &data) const override |
Public Member Functions inherited from BeeeOn::BeeWiDevice | |
| BeeWiDevice (const MACAddress &address, const Poco::Timespan &timeout, const RefreshTime &refresh, const std::string &productName, const std::list< ModuleType > &moduleTypes, const HciInterface::Ptr hci) | |
| std::list< ModuleType > | moduleTypes () const override |
| std::string | vendor () const override |
| std::string | productName () const override |
| void | pair (Poco::SharedPtr< HciInterface::WatchCallback > callback) override |
| When the device supports processing of advertising data, it should call a watch() on the given HciInterface in this method and a unwatch() in the destructor. When the method is re-called it do not have any effect. | |
Public Member Functions inherited from BeeeOn::BLESmartDevice | |
| BLESmartDevice (const MACAddress &address, const Poco::Timespan &timeout, const RefreshTime &refresh, const HciInterface::Ptr hci) | |
| 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. | |
| MACAddress | macAddress () const |
| virtual bool | pollable () const |
| Returns true if the device is pollable, otherwise false. | |
| void | poll (Distributor::Ptr distributor) override |
| Perform polling for data and ship them via the given distributor. | |
Static Public Member Functions | |
| static bool | match (const std::string &modelID) |
Static Public Attributes | |
| static const std::string | NAME = "BeeWi SmartLite" |
Protected Member Functions | |
| unsigned int | brightnessToPercentages (const double value) const |
| unsigned char | brightnessFromPercentages (const double percents) const |
| unsigned int | colorTempToKelvins (const double value) const |
| unsigned char | colorTempFromKelvins (const double temperature) const |
Protected Member Functions inherited from BeeeOn::BeeWiDevice | |
| void | initLocalTime (HciConnection::Ptr conn) const |
| Sends and initilize local time of sensor. The local time is in format: ymdHMS. More... | |
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) | |
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) |
Protected Attributes inherited from BeeeOn::BLESmartDevice | |
| DeviceID | m_deviceId |
| MACAddress | m_address |
| Poco::Timespan | m_timeout |
| RefreshTime | m_refresh |
| HciInterface::Ptr | m_hci |
The class represents BeeWi smart led light. It allows to gather and to control all its modules.
|
overridevirtual |
| ID (1 B) | 1 B | on/off (1 B) | 1 B | brightness (4 b) | color temperature (4 b) | color (3 B) |
Reimplemented from BeeeOn::BLESmartDevice.
|
overridevirtual |
Modifies the device module given by moduleID to a given value.
| IOException | in case of communication failure. |
| NotImplementedException | if the device does not support modification of its state. |
Reimplemented from BeeeOn::BLESmartDevice.
1.8.5