Class for manipulating UUID (aka GUID) entities.
More...
#include <Uuid.h>
|
constexpr | Uuid () |
|
| Uuid (const char *s) |
|
| Uuid (const char *s, size_t len) |
|
| Uuid (const String &s) |
|
| Uuid (const FlashString &s) |
|
constexpr | Uuid (uint32_t time_low, uint16_t time_mid, uint16_t time_hi_and_version, uint8_t clock_seq_hi_and_reserved, uint8_t clock_seq_low, uint8_t n1, uint8_t n2, uint8_t n3, uint8_t n4, uint8_t n5, uint8_t n6) |
|
| operator bool () const |
|
bool | operator== (const Uuid &other) const |
|
bool | operator!= (const Uuid &other) const |
|
bool | generate (MacAddress mac) |
| Generate a UUID using a MAC node address. More...
|
|
bool | generate () |
| Generate UUID using random number instead of MAC. More...
|
|
|
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 |
|
|
static constexpr size_t | stringSize = 36 |
| Number of characters in a UUID string (excluding NUL terminator) More...
|
|
Class for manipulating UUID (aka GUID) entities.
UUID: Universally Unique IDentifier GUID: Globally Unique IDentifier
See https://pubs.opengroup.org/onlinepubs/9629399/apdxa.htm.
◆ Uuid() [1/6]
◆ Uuid() [2/6]
Uuid::Uuid |
( |
const char * |
s | ) |
|
|
inlineexplicit |
◆ Uuid() [3/6]
Uuid::Uuid |
( |
const char * |
s, |
|
|
size_t |
len |
|
) |
| |
|
inlineexplicit |
◆ Uuid() [4/6]
Uuid::Uuid |
( |
const String & |
s | ) |
|
|
inlineexplicit |
◆ Uuid() [5/6]
◆ Uuid() [6/6]
constexpr Uuid::Uuid |
( |
uint32_t |
time_low, |
|
|
uint16_t |
time_mid, |
|
|
uint16_t |
time_hi_and_version, |
|
|
uint8_t |
clock_seq_hi_and_reserved, |
|
|
uint8_t |
clock_seq_low, |
|
|
uint8_t |
n1, |
|
|
uint8_t |
n2, |
|
|
uint8_t |
n3, |
|
|
uint8_t |
n4, |
|
|
uint8_t |
n5, |
|
|
uint8_t |
n6 |
|
) |
| |
|
inlineexplicitconstexpr |
◆ decompose() [1/3]
bool Uuid::decompose |
( |
const char * |
s | ) |
|
|
inline |
◆ decompose() [2/3]
bool Uuid::decompose |
( |
const char * |
s, |
|
|
size_t |
len |
|
) |
| |
◆ decompose() [3/3]
bool Uuid::decompose |
( |
const String & |
s | ) |
|
|
inline |
◆ generate() [1/2]
Generate UUID using random number instead of MAC.
- Return values
-
bool | true if system clock time was used, false if substituted with random number |
Used where MAC address is not available or it is not desirable to expose it.
◆ generate() [2/2]
Generate a UUID using a MAC node address.
- Parameters
-
mac | Node address to use in generating the UUID, typically from WifiStation |
- Return values
-
bool | true if system clock time was used, false if substituted with random number |
◆ operator bool()
Uuid::operator bool |
( |
| ) |
const |
|
inlineexplicit |
◆ operator String()
Uuid::operator String |
( |
| ) |
const |
|
inline |
◆ operator!=()
◆ operator==()
bool Uuid::operator== |
( |
const Uuid & |
other | ) |
const |
◆ toString() [1/2]
String Uuid::toString |
( |
| ) |
const |
◆ toString() [2/2]
size_t Uuid::toString |
( |
char * |
buffer, |
|
|
size_t |
bufSize |
|
) |
| const |
- Parameters
-
uuid | |
buffer | |
bufSize | Must be at least UUID_STRING_SIZE |
- Return values
-
size_t | number 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
◆ 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
◆ stringSize
constexpr size_t Uuid::stringSize = 36 |
|
staticconstexpr |
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: