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

Represents a message sent by the gateway to the server intended to export measured sensor data. More...

#include <GWSensorDataExport.h>

Inheritance diagram for BeeeOn::GWSensorDataExport:
BeeeOn::GWMessage

Public Types

typedef Poco::SharedPtr
< GWSensorDataExport
Ptr
 
- Public Types inherited from BeeeOn::GWMessage
typedef Poco::SharedPtr
< GWMessage
Ptr
 

Public Member Functions

 GWSensorDataExport (const Poco::JSON::Object::Ptr object)
 
GWSensorDataConfirm::Ptr confirm () const
 Creates and returns a corresponding GWSensorDataConfirm message.
 
void setData (const std::vector< SensorData > &data)
 
std::vector< SensorDatadata () const
 
- 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::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 intended to export measured sensor data.

The GWSensorDataExport contains unique identifier intended to match a proper GWSensorDataConfirm (confirmation, that the server accepted exported measured sensor data). After the GWSensorDataExport is sent, the gateway expect a confirmation with the given id.

An example message:

{
  "id": "9990944f-e53d-47dd-8b46-a797c8ccec10",
  "message_type": "sensor_data_export",
  "data": {
    {
      "device_id": "0xa300000000000001",
      "timestamp": 1538575474123012,
      "values": [
        {
          "module_id": 0,
          "value": 25.6
        },
        {
          "module_id": 1,
          "value": 100.0
        }
      ]
    }
  }
}

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