![]() |
BeeeOn Gateway
v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
|
#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) |
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.
|
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.