![]() |
BeeeOn Gateway
v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
|
The unpair process might under certain circumstances unpair a different device then intended. The custom unpair response holds a list of IDs of devices unpaired by the unpair request. Depending on the server, it might be possible to use also generic GWResponse. But this class is better and should be preferred. More...
#include <GWUnpairResponse.h>
Public Member Functions | |
GWUnpairResponse (const Poco::JSON::Object::Ptr object) | |
void | setUnpairedDevices (const std::set< DeviceID > &devices) |
std::set< DeviceID > | unpairedDevices () const |
![]() | |
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. | |
![]() | |
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 | |
![]() | |
enum | Status { ACCEPTED, SUCCESS, FAILED, SUCCESS_PARTIAL } |
typedef Poco::SharedPtr < GWResponse > | Ptr |
![]() | |
typedef Poco::SharedPtr < GWMessage > | Ptr |
![]() | |
static Status | convertStatus (const int value) |
Covert integer value to GWResponse::Status and return it. | |
![]() | |
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... | |
![]() | |
GWResponse (const GWMessageTypeEnum::Raw &type) | |
![]() | |
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 |
The unpair process might under certain circumstances unpair a different device then intended. The custom unpair response holds a list of IDs of devices unpaired by the unpair request. Depending on the server, it might be possible to use also generic GWResponse. But this class is better and should be preferred.
An example message:
{ "id": "603a5085-1b00-4c5e-ac70-dde674a49b0c", "message_type": "unpair_response", "devices": { {"device_id": "0xa1012345aabbccdd"} } }