BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
Public Types | Public Member Functions
BeeeOn::GWNewDeviceGroupRequest Class Reference

Represents a message sent by the gateway to the server after discovering a device consisting of a group of subdevices in the sensoric network. Example of the device may be VPT regulator that consists of 4 zones and a boiler. Vendor name stored in message has to be same for all devices. More...

#include <GWNewDeviceGroupRequest.h>

Inheritance diagram for BeeeOn::GWNewDeviceGroupRequest:
BeeeOn::GWRequest BeeeOn::GWMessage

Public Types

typedef Poco::SharedPtr
< GWNewDeviceGroupRequest
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

 GWNewDeviceGroupRequest (const Poco::JSON::Object::Ptr object)
 
void setGroupName (const std::string &groupName)
 
std::string groupName () const
 
void setVendor (const std::string &vendor)
 
std::string vendor () const
 
void addDeviceDescription (const DeviceDescription &deviceDescription)
 
std::vector< DeviceDescriptiondeviceDescriptions () 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
 

Detailed Description

Represents a message sent by the gateway to the server after discovering a device consisting of a group of subdevices in the sensoric network. Example of the device may be VPT regulator that consists of 4 zones and a boiler. Vendor name stored in message has to be same for all devices.

Response to this request is the generic response GWResponse.

An example message:

{
  "message_type": "new_device_group_request",
  "id": "bddc7e1d-2578-40c0-8d42-43f818fef401",
  "group_name": "Control Center",
  "vendor": "Example Control Company",
  "devices": [
    {
      "device_id": "0xa100000000000001",
      "product_name": "Control Panel"
      "module_types": [
        {
          "type": "on_off",
          "attributes": ["controllable"]
        },
        {
          "type": "on_off",
          "attributes": ["controllable"]
        }
      ],
      "refresh_time": -1
    },
    {
      "device_id": "0xa100000000000002",
      "product_name": "Probe",
      "module_types": [
        {
          "type": "temperature",
          "attributes": ["inner"]
        },
        {
          "type": "humidity",
          "attributes": ["inner"]
        }
      ],
      "refresh_time": 120
    }
  ]
}

The documentation for this class was generated from the following files: