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

Represents message sent by the gateway after connecting to the server. Message is intended to gateway registration on the server. More...

#include <GWGatewayRegister.h>

Inheritance diagram for BeeeOn::GWGatewayRegister:
BeeeOn::GWMessage

Public Types

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

Public Member Functions

 GWGatewayRegister (const Poco::JSON::Object::Ptr object)
 
void setGatewayID (const GatewayID &gatewayID)
 
GatewayID gatewayID () const
 
void setVersion (const std::string &version)
 
std::string version () const
 
void setIPAddress (const Poco::Net::IPAddress &ipAddress)
 
Poco::Net::IPAddress ipAddress () 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 message sent by the gateway after connecting to the server. Message is intended to gateway registration on the server.

Server confirms successful registration with message GWGatewayAccepted.

An example of a registration message:

{
  "message_type": "gateway_register",
  "gateway_id": "1875034586645818",
  "version": "v2017.01",
  "ip_address": "192.168.0.1"
}

Member Function Documentation

GatewayID GWGatewayRegister::gatewayID ( ) const
Returns
ID of the gateway that is being registered
IPAddress GWGatewayRegister::ipAddress ( ) const
Returns
IP address the gateway can see on the socket used for communication with the remote server
string GWGatewayRegister::version ( ) const
Returns
version of the gateway software

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