BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
SonoffSC.h
1 #pragma once
2 
3 #include <list>
4 
5 #include <Poco/SharedPtr.h>
6 #include <Poco/Timestamp.h>
7 
8 #include "model/ModuleType.h"
9 #include "model/SensorData.h"
10 #include "net/MqttMessage.h"
11 #include "sonoff/SonoffDevice.h"
12 #include "util/Loggable.h"
13 
14 namespace BeeeOn {
15 
22 class SonoffSC : public SonoffDevice {
23 public:
24  typedef Poco::SharedPtr<SonoffSC> Ptr;
25 
26  static const std::string PRODUCT_NAME;
27 
28  SonoffSC(const DeviceID& id, const RefreshTime &refresh);
29  ~SonoffSC();
30 
35  SensorData parseMessage(const MqttMessage& message) override;
36 };
37 
38 }
RefreshTime represents time of refreshing values from sensors. E.g. sensors are polled periodically o...
Definition: RefreshTime.h:24
Definition: SensorData.h:20
SensorData parseMessage(const MqttMessage &message) override
Parses the MQTT message from the Sonoff SC and creates from it SensorData.
Definition: SonoffSC.cpp:47
Abstract class representing generic Sonoff device.
Definition: SonoffDevice.h:21
Definition: MqttMessage.h:7
The class represents Sonoff SC device. The class allows to process the messages from the Sonoff SC wi...
Definition: SonoffSC.h:22
Definition: DeviceID.h:17