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

#include <GatewayID.h>

Public Types

enum  { LENGTH = 16 }
 

Public Member Functions

 GatewayID (uint64_t value)
 
 GatewayID (int version, uint64_t data)
 
bool isNull () const
 
int version () const
 
uint64_t data () const
 
std::string toString () const
 
bool operator!= (const GatewayID &id) const
 
bool operator== (const GatewayID &id) const
 
bool operator< (const GatewayID &id) const
 
bool operator> (const GatewayID &id) const
 
bool operator<= (const GatewayID &id) const
 
bool operator>= (const GatewayID &id) const
 
 operator unsigned long long () const
 
 operator uint64_t () const
 

Static Public Member Functions

static GatewayID parse (const std::string &s)
 
static GatewayID random (int version=1, uint32_t seed=0)
 

Static Protected Member Functions

static uint64_t parse64 (const std::string &s)
 

Detailed Description

Gateway ID is a globally unique ID generated during manufactoring of each device. The format of the ID is defined as 16 decadic digits: VDDD DDDD DDDD DDDC. The V denotes version, C is the DAMM checksum and D represents data digits which are generated randomly.

Member Function Documentation

GatewayID GatewayID::random ( int  version = 1,
uint32_t  seed = 0 
)
static

Generate a random ID. Seed the random generator with the given seed. If the seed is 0 then the generator is possibly seeded in another (more secure) way.


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