BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
RevogiSmartPlug.h
1 #pragma once
2 
3 #include <Poco/SharedPtr.h>
4 #include <Poco/UUID.h>
5 
6 #include "bluetooth/RevogiDevice.h"
7 
8 namespace BeeeOn {
9 
14 class RevogiSmartPlug : public RevogiDevice {
15 public:
16  typedef Poco::SharedPtr<RevogiSmartPlug> Ptr;
17 
18  static const std::string PLUG_NAME;
19 
20 public:
22  const MACAddress& address,
23  const Poco::Timespan& timeout,
24  const RefreshTime& refresh,
25  const HciInterface::Ptr hci);
26  ~RevogiSmartPlug();
27 
28  void requestModifyState(
29  const ModuleID& moduleID,
30  const double value) override;
31 
32 protected:
38  SensorData parseValues(const std::vector<unsigned char>& values) const override;
39 
40  void prependHeader(std::vector<unsigned char>& payload) const override;
41 };
42 
43 }
RefreshTime represents time of refreshing values from sensors. E.g. sensors are polled periodically o...
Definition: RefreshTime.h:24
Definition: SensorData.h:20
Definition: MACAddress.h:8
void requestModifyState(const ModuleID &moduleID, const double value) override
Modifies the device module given by moduleID to a given value.
Definition: RevogiSmartPlug.cpp:39
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
Abstract class for Revogi devices.
Definition: RevogiDevice.h:29
SensorData parseValues(const std::vector< unsigned char > &values) const override
Definition: RevogiSmartPlug.cpp:55
The class represents Revogi Smart Meter Plug. It allows to control all its modules.
Definition: RevogiSmartPlug.h:14