3 #include <Poco/SharedPtr.h>
6 #include "bluetooth/BeeWiDevice.h"
7 #include "bluetooth/HciConnection.h"
17 typedef Poco::SharedPtr<BeeWiSmartWatt> Ptr;
19 static const std::string NAME;
25 static const Poco::UUID ACTUAL_VALUES;
29 static const Poco::UUID ON_OFF;
33 static const Poco::UUID LIGHT_ON_OFF;
41 const Poco::Timespan& timeout,
43 const HciInterface::Ptr hci);
48 const Poco::Timespan& timeout,
50 const HciInterface::Ptr hci,
51 HciConnection::Ptr conn);
55 void poll(Distributor::Ptr distributor)
override;
59 const double value)
override;
67 const std::vector<unsigned char>& data)
const override;
69 static bool match(
const std::string& modelID);
void requestModifyState(const ModuleID &moduleID, const double value) override
Modifies the device module given by moduleID to a given value.
Definition: BeeWiSmartWatt.cpp:70
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 BeeWi smart switch. It allows to gather and to control all its modules...
Definition: BeeWiSmartWatt.h:15
Definition: MACAddress.h:8
Abstract class for BeeWi devices. Some BeeWi devices need to set the time to stop blinking...
Definition: BeeWiDevice.h:22
Definition: ModuleID.h:12
BeeWiSmartWatt(const MACAddress &address, const Poco::Timespan &timeout, const RefreshTime &refersh, const HciInterface::Ptr hci)
SensorData parseValues(std::vector< unsigned char > &values) const
Definition: BeeWiSmartWatt.cpp:123
SensorData parseAdvertisingData(const std::vector< unsigned char > &data) const override
Definition: BeeWiSmartWatt.cpp:104
void poll(Distributor::Ptr distributor) override
Perform polling for data and ship them via the given distributor.
Definition: BeeWiSmartWatt.cpp:60
bool pollable() const override
Returns true if the device is pollable, otherwise false.
Definition: BeeWiSmartWatt.cpp:55