BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
DeviceStatusHandler.h
1 #pragma once
2 
3 #include <set>
4 #include <map>
5 
6 #include <Poco/SharedPtr.h>
7 
8 #include "model/DeviceID.h"
9 #include "model/DevicePrefix.h"
10 #include "model/ModuleID.h"
11 
12 namespace BeeeOn {
13 
20 public:
21  typedef Poco::SharedPtr<DeviceStatusHandler> Ptr;
22  typedef std::map<DeviceID, std::map<ModuleID, double>> DeviceValues;
23 
24  virtual ~DeviceStatusHandler();
25 
29  virtual DevicePrefix prefix() const = 0;
30 
40  virtual void handleRemoteStatus(
41  const DevicePrefix &prefix,
42  const std::set<DeviceID> &paired,
43  const DeviceValues &values) = 0;
44 };
45 
46 }
DeviceStatusHandler represents a class that can process status of a set of devices. This is useful when fetching pairing state from a remote server.
Definition: DeviceStatusHandler.h:19
virtual void handleRemoteStatus(const DevicePrefix &prefix, const std::set< DeviceID > &paired, const DeviceValues &values)=0
Handle device status as understood by a remote server. All devices of a certain prefix are notified i...
virtual DevicePrefix prefix() const =0