BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
ServerLastValueResult.h
1 #pragma once
2 
3 #include "core/Answer.h"
4 #include "core/Result.h"
5 #include "model/DeviceID.h"
6 #include "model/ModuleID.h"
7 
8 namespace BeeeOn {
9 
10 /*
11  * The result for ServerLastValueCommand that includes
12  * the last value saved in database.
13  */
14 class ServerLastValueResult : public Result {
15 public:
16  typedef Poco::AutoPtr<ServerLastValueResult> Ptr;
17 
18  ServerLastValueResult(const Answer::Ptr answer);
19 
20  void setValue(double value);
21  double value() const;
22 
23  void setDeviceID(const DeviceID &deviceID);
24  DeviceID deviceID() const;
25 
26  void setModuleID(const ModuleID &moduleID);
27  ModuleID moduleID() const;
28 
29 protected:
31 
32 private:
33  double m_value;
34  DeviceID m_deviceID;
35  ModuleID m_moduleID;
36 };
37 
38 }
Definition: ModuleID.h:12
Definition: Result.h:29
Definition: ServerLastValueResult.h:14
Definition: DeviceID.h:17