The class represents BeeWi smart switch. It allows to gather and to control all its modules.
More...
#include <BeeWiSmartWatt.h>
|
| BeeWiSmartWatt (const MACAddress &address, const Poco::Timespan &timeout, const RefreshTime &refersh, const HciInterface::Ptr hci, HciConnection::Ptr conn) |
|
bool | pollable () const override |
| 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.
|
|
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 |
|
| 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.
|
|
| 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 |
|
void | poll (Distributor::Ptr distributor) override |
| Perform polling for data and ship them via the given distributor.
|
|
|
static bool | match (const std::string &modelID) |
|
|
static const std::string | NAME = "BeeWi Smart Watt" |
|
|
| BeeWiSmartWatt (const MACAddress &address, const Poco::Timespan &timeout, const RefreshTime &refersh, const HciInterface::Ptr hci) |
|
SensorData | parseValues (std::vector< unsigned char > &values) const |
|
void | initLocalTime (HciConnection::Ptr conn) const |
| Sends and initilize local time of sensor. The local time is in format: ymdHMS. More...
|
|
void | setupLogger (Poco::Logger *logger=0) const |
|
Poco::Logger & | logger () const |
|
| Loggable (const ClassInfo &info) |
|
| Loggable (const std::type_info &info) |
|
|
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) |
|
DeviceID | m_deviceId |
|
MACAddress | m_address |
|
Poco::Timespan | m_timeout |
|
RefreshTime | m_refresh |
|
HciInterface::Ptr | m_hci |
|
The class represents BeeWi smart switch. It allows to gather and to control all its modules.
BeeeOn::BeeWiSmartWatt::BeeWiSmartWatt |
( |
const MACAddress & |
address, |
|
|
const Poco::Timespan & |
timeout, |
|
|
const RefreshTime & |
refersh, |
|
|
const HciInterface::Ptr |
hci |
|
) |
| |
|
protected |
The intention of this constructor is only for testing.
SensorData BeeWiSmartWatt::parseAdvertisingData |
( |
const std::vector< unsigned char > & |
data | ) |
const |
|
overridevirtual |
SensorData BeeWiSmartWatt::parseValues |
( |
std::vector< unsigned char > & |
values | ) |
const |
|
protected |
| on/off (1 B) | power (2 B) | voltage (1 B) | current (2 B) | frequency (1 B) |
void BeeWiSmartWatt::requestModifyState |
( |
const ModuleID & |
moduleID, |
|
|
const double |
value |
|
) |
| |
|
overridevirtual |
Modifies the device module given by moduleID to a given value.
- Exceptions
-
IOException | in case of communication failure. |
NotImplementedException | if the device does not support modification of its state. |
Reimplemented from BeeeOn::BLESmartDevice.
The documentation for this class was generated from the following files:
- /var/lib/jenkins/workspace/beeeon-gateway-master/src/bluetooth/BeeWiSmartWatt.h
- /var/lib/jenkins/workspace/beeeon-gateway-master/src/bluetooth/BeeWiSmartWatt.cpp