![]() |
BeeeOn Gateway
v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
|
Represents a message sent by the server to the gateway, intended to change state of an active module on the device. More...
#include <GWSetValueRequest.h>
Public Types | |
|
typedef Poco::SharedPtr < GWSetValueRequest > | Ptr |
Public Types inherited from BeeeOn::GWRequest | |
|
typedef Poco::SharedPtr < GWRequest > | Ptr |
Public Types inherited from BeeeOn::GWMessage | |
|
typedef Poco::SharedPtr < GWMessage > | Ptr |
Public Member Functions | |
| GWSetValueRequest (const Poco::JSON::Object::Ptr object) | |
| void | setDeviceID (const DeviceID &deviceID) |
| DeviceID | deviceID () const |
| void | setModuleID (const ModuleID &moduleID) |
| ModuleID | moduleID () const |
| void | setValue (double value) |
| double | value () const |
| void | setTimeout (const Poco::Timespan &timeout) |
| Poco::Timespan | timeout () const |
| void | setMode (const OpMode &mode) |
| OpMode | mode () const |
Public Member Functions inherited from BeeeOn::GWRequest | |
| template<typename T > | |
| Poco::SharedPtr< T > | derive (std::function< void(Poco::SharedPtr< T >)> f=[](Poco::SharedPtr< T >){}) const |
| Derive the appropriate response and apply the given function to construct it. | |
| GWResponse::Ptr | derive (std::function< void(GWResponse::Ptr)> f=[](GWResponse::Ptr){}) const |
| Derive the appropriate response and apply the given function to construct it. | |
Public Member Functions inherited from BeeeOn::GWMessage | |
| void | setID (const GlobalID &id) |
| Set unique identifier intended to match request message with its response. | |
| GlobalID | id () const |
| Return unique identifier intended to match request message with its response. | |
| GWMessageType | type () const |
| Returns the type of the message. | |
| std::string | toString () const |
| Returns the string representation of the message. | |
| std::string | toBriefString () const |
Additional Inherited Members | |
Static Public Member Functions inherited from BeeeOn::GWMessage | |
| static GWMessage::Ptr | fromJSON (const std::string &json) |
| Factory method for creating subclasses of the GWMessage from the json string. More... | |
| static GWMessage::Ptr | fromJSON (Poco::JSON::Object::Ptr object) |
| Factory method for creating subclasses of the GWMessage from the JSON::Object. More... | |
Protected Member Functions inherited from BeeeOn::GWRequest | |
| GWRequest (const GWMessageType::Raw &type) | |
| GWRequest (const Poco::JSON::Object::Ptr object) | |
| virtual GWResponse::Ptr | deriveResponse () const |
| GWResponse::Ptr | deriveGenericResponse (GWResponse::Ptr response) const |
Protected Member Functions inherited from BeeeOn::GWMessage | |
| GWMessage (const GWMessageType::Raw &type) | |
| Constructs a GWMessage depending on the given type. More... | |
| GWMessage (const Poco::JSON::Object::Ptr object) | |
| Constructs a GWMessage from the JSON::Object. | |
| Poco::JSON::Object::Ptr | json () const |
Represents a message sent by the server to the gateway, intended to change state of an active module on the device.
The message contains an identification of the device and its module, a value to be set and a timeout for which the value must be set or the operation end with failed.
An example message:
{
"id": "a507755f-793f-4067-89bf-533fb73b6a41",
"message_type": "set_value_request",
"device_id": "0xa300000000000001",
"module_id": "0",
"timeout": 30,
"value": 1.0
}
1.8.5