#include <Uuid.h>

Collaboration diagram for Uuid:
[legend]

Public Member Functions

 Uuid ()
 
 Uuid (const char *s)
 
 Uuid (const char *s, size_t len)
 
 Uuid (const String &s)
 
 operator bool ()
 
bool generate ()
 
bool decompose (const char *s, size_t len)
 
bool decompose (const char *s)
 
bool decompose (const String &s)
 
size_t toString (char *buffer, size_t bufSize) const
 
String toString () const
 
 operator String () const
 

Public Attributes

uint32_t time_low {0}
 
uint16_t time_mid {0}
 
uint16_t time_hi_and_version {0}
 
uint8_t clock_seq_hi_and_reserved {0}
 
uint8_t clock_seq_low {0}
 
uint8_t node [6] {}
 

Static Public Attributes

static constexpr size_t stringSize = 36
 Number of characters in a UUID string (excluding NUL terminator) More...
 

Constructor & Destructor Documentation

◆ Uuid() [1/4]

Uuid::Uuid ( )
inline

◆ Uuid() [2/4]

Uuid::Uuid ( const char *  s)
inlineexplicit

◆ Uuid() [3/4]

Uuid::Uuid ( const char *  s,
size_t  len 
)
inlineexplicit

◆ Uuid() [4/4]

Uuid::Uuid ( const String s)
inlineexplicit

Member Function Documentation

◆ decompose() [1/3]

bool Uuid::decompose ( const char *  s,
size_t  len 
)

◆ decompose() [2/3]

bool Uuid::decompose ( const char *  s)
inline

◆ decompose() [3/3]

bool Uuid::decompose ( const String s)
inline

◆ generate()

bool Uuid::generate ( )
Note
System clock must be set or this will not produce correct results.

◆ operator bool()

Uuid::operator bool ( )
inlineexplicit

◆ operator String()

Uuid::operator String ( ) const
inline

◆ toString() [1/2]

size_t Uuid::toString ( char *  buffer,
size_t  bufSize 
) const
Note
Get string representation of UUID
Parameters
uuid
buffer
bufSizeMust be at least UUID_STRING_SIZE
Return values
size_tnumber of characters written (either 0 or UUID_STRING_SIZE)
Note
Converts UUID into a string of the form

<time_low>-<time_mid>-<time_high_and_version>-<clock_seq_and_reserved><clock_seq_low>-<node>

e.g. 2fac1234-31f8-11b4-a222-08002b34c003

◆ toString() [2/2]

String Uuid::toString ( ) const

Member Data Documentation

◆ clock_seq_hi_and_reserved

uint8_t Uuid::clock_seq_hi_and_reserved {0}

◆ clock_seq_low

uint8_t Uuid::clock_seq_low {0}

◆ node

uint8_t Uuid::node[6] {}

◆ stringSize

constexpr size_t Uuid::stringSize = 36
static

Number of characters in a UUID string (excluding NUL terminator)

◆ time_hi_and_version

uint16_t Uuid::time_hi_and_version {0}

◆ time_low

uint32_t Uuid::time_low {0}

◆ time_mid

uint16_t Uuid::time_mid {0}

The documentation for this struct was generated from the following file: