BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
GWSetValueRequest.h
1 #pragma once
2 
3 #include <Poco/SharedPtr.h>
4 #include <Poco/Timespan.h>
5 #include <Poco/JSON/Object.h>
6 
7 #include "gwmessage/GWRequest.h"
8 #include "model/DeviceID.h"
9 #include "model/ModuleID.h"
10 #include "model/OpMode.h"
11 
12 namespace BeeeOn {
13 
34 class GWSetValueRequest : public GWRequest {
35 public:
36  typedef Poco::SharedPtr<GWSetValueRequest> Ptr;
37 
39  GWSetValueRequest(const Poco::JSON::Object::Ptr object);
40 
41  void setDeviceID(const DeviceID &deviceID);
42  DeviceID deviceID() const;
43 
44  void setModuleID(const ModuleID &moduleID);
45  ModuleID moduleID() const;
46 
47  void setValue(double value);
48  double value() const;
49 
50  void setTimeout(const Poco::Timespan &timeout);
51  Poco::Timespan timeout() const;
52 
53  void setMode(const OpMode &mode);
54  OpMode mode() const;
55 };
56 
57 }
Abstract class representing a request message. The GWRequest can not be used alone, but it must be inherited by a specific request object.
Definition: GWRequest.h:25
Definition: ModuleID.h:12
Represents a message sent by the server to the gateway, intended to change state of an active module ...
Definition: GWSetValueRequest.h:34
Definition: DeviceID.h:17