Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::Uuid Class Reference

Uuid Class. More...

#include <Uuid.h>

Public Member Functions

 Uuid () noexcept=default
 
 Uuid (uint8_t self_id, uint64_t timestamp, uint8_t r=0) noexcept
 
uint8_t getSelfId () const noexcept
 
void setSelfId (uint8_t i) noexcept
 
uint8_t getR () const noexcept
 
void setR (uint8_t r) noexcept
 
uint64_t getTimestamp () const noexcept
 
void setTimestamp (uint64_t i) noexcept
 
uint64_t toNumber () const noexcept
 
void parse (uint64_t number) noexcept
 

Protected Attributes

uint8_t selfId = 0
 
uint8_t r = 0
 
uint64_t timestamp = 0
 

Detailed Description

Uuid Class.

Constructor & Destructor Documentation

◆ Uuid() [1/2]

sese::Uuid::Uuid ( )
defaultnoexcept

◆ Uuid() [2/2]

sese::Uuid::Uuid ( uint8_t self_id,
uint64_t timestamp,
uint8_t r = 0 )
noexcept

Create UUID

Parameters
self_idDevice ID
timestampTimestamp
rReserved bit

Member Function Documentation

◆ getR()

uint8_t sese::Uuid::getR ( ) const
nodiscardnoexcept

Get Reserved bit

Returns
Reserved bit

◆ getSelfId()

uint8_t sese::Uuid::getSelfId ( ) const
nodiscardnoexcept

Get Device ID

Returns
Device ID

References selfId.

◆ getTimestamp()

uint64_t sese::Uuid::getTimestamp ( ) const
nodiscardnoexcept

Get Timestamp

Returns
Timestamp

◆ parse()

void sese::Uuid::parse ( uint64_t number)
noexcept

Parse numeric format UUID to Uuid object

Parameters
numberNumeric format UUID

◆ setR()

void sese::Uuid::setR ( uint8_t r)
noexcept

Set Reserved bit

Parameters
rReserved bit

References r.

◆ setSelfId()

void sese::Uuid::setSelfId ( uint8_t i)
noexcept

Set Device ID

Parameters
iDevice ID

References selfId.

◆ setTimestamp()

void sese::Uuid::setTimestamp ( uint64_t i)
noexcept

Set Timestamp

Parameters
iTimestamp

References timestamp.

◆ toNumber()

uint64_t sese::Uuid::toNumber ( ) const
nodiscardnoexcept

Output numeric format UUID

Returns
Numeric format UUID

Member Data Documentation

◆ r

uint8_t sese::Uuid::r = 0
protected

Referenced by setR().

◆ selfId

uint8_t sese::Uuid::selfId = 0
protected

Referenced by getSelfId(), and setSelfId().

◆ timestamp

uint64_t sese::Uuid::timestamp = 0
protected

Referenced by setTimestamp().


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