![]() |
BeeeOn Gateway
v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
|
Represents a message sent byt the server to the gateway as a response to the GWDeviceListRequest. More...
#include <GWDeviceListResponse.h>
Public Types | |
|
typedef Poco::SharedPtr < GWDeviceListResponse > | Ptr |
Public Types inherited from BeeeOn::GWResponse | |
| enum | Status { ACCEPTED, SUCCESS, FAILED, SUCCESS_PARTIAL } |
|
typedef Poco::SharedPtr < GWResponse > | Ptr |
Public Types inherited from BeeeOn::GWMessage | |
|
typedef Poco::SharedPtr < GWMessage > | Ptr |
Public Member Functions | |
| GWDeviceListResponse (const Poco::JSON::Object::Ptr object) | |
| void | setDevices (const std::vector< DeviceID > &devices) |
| std::vector< DeviceID > | devices () const |
| void | setModulesValues (const DeviceID &device, const std::map< ModuleID, double > &values) |
| std::map< ModuleID, double > | modulesValues (const DeviceID &device) const |
| void | setRefreshFor (const DeviceID &device, const RefreshTime &refresh) |
| RefreshTime | refreshFor (const DeviceID &device) const |
| void | setProperties (const DeviceID &device, const std::map< std::string, std::string > &properties) |
|
std::map< std::string, std::string > | properties (const DeviceID &device) const |
Public Member Functions inherited from BeeeOn::GWResponse | |
| GWResponse (const Poco::JSON::Object::Ptr object) | |
| void | setStatus (Status status) |
| Status | status () const |
| void | setAckExpected (bool expected) |
| bool | ackExpected () const |
| Poco::SharedPtr< GWAck > | ack () const |
| Creates and returns a corresponding GWAck message. | |
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::GWResponse | |
| static Status | convertStatus (const int value) |
| Covert integer value to GWResponse::Status and return it. | |
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::GWResponse | |
| GWResponse (const GWMessageTypeEnum::Raw &type) | |
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 byt the server to the gateway as a response to the GWDeviceListRequest.
The message contains a list of paired devices with a specific prefix.
For each device, there is an optional section under key config. Here, some configuration options might be available. Currently, the well known keys are: "refresh_time", "ip_address", "password".
An example message:
{
"id": "60775a50-d91c-4325-89b1-283e38bd60b2",
"message_type": "device_list_response",
"status": 1,
"devices": [
{"device_id": "0xa300000000000001"}
],
"values": {
"0xa300000000000001": {
"0": 0,
"1": 10.0
}
},
"config": {
"0xa300000000000001": {
"regresh_time": "30",
"password": "super-secret",
"ip-address": "10.0.0.1"
}
}
}
| vector< DeviceID > GWDeviceListResponse::devices | ( | ) | const |
1.8.5