43 explicit Uuid(
const char* s)
48 explicit Uuid(
const char* s,
size_t len)
64 : time_low(time_low), time_mid(time_mid), time_hi_and_version(time_hi_and_version),
65 clock_seq_hi_and_reserved(clock_seq_hi_and_reserved),
66 clock_seq_low(clock_seq_low),
node{n1, n2, n3, n4, n5, n6}
70 explicit operator bool()
const 72 return *
this !=
Uuid{};
101 bool decompose(
const char* s,
size_t len);
105 return s ?
decompose(s, strlen(s)) :
false;
130 size_t toString(
char* buffer,
size_t bufSize)
const;
142 static_assert(
sizeof(
Uuid) == 16,
"Bad Uuid");
bool operator!=(const Uuid &other) const
Definition: Uuid.h:77
static constexpr size_t stringSize
Number of characters in a UUID string (excluding NUL terminator)
Definition: Uuid.h:37
const char * c_str() const
Get a constant (un-modifiable) pointer to String content.
Definition: WString.h:616
Uuid(const char *s)
Definition: Uuid.h:43
uint8_t clock_seq_hi_and_reserved
Definition: Uuid.h:30
size_t toString(char *buffer, size_t bufSize) const
Uuid(const char *s, size_t len)
Definition: Uuid.h:48
The String class.
Definition: WString.h:136
bool decompose(const char *s, size_t len)
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)
Definition: Uuid.h:61
A network hardware (MAC) address.
Definition: MacAddress.h:38
bool operator==(const Uuid &other) const
bool generate()
Generate UUID using random number instead of MAC.
uint8_t node[6]
Definition: Uuid.h:32
#define SMING_DEPRECATED
Definition: sming_attr.h:36
size_t length(void) const
Obtain the String length in characters, excluding NUL terminator.
Definition: WString.h:243
uint16_t time_hi_and_version
Definition: Uuid.h:29
Uuid(const FlashString &s)
Definition: Uuid.h:57
Class for manipulating UUID (aka GUID) entities.
Definition: Uuid.h:26
uint32_t time_low
Definition: Uuid.h:27
describes a counted string stored in flash memory
Definition: String.hpp:173
uint8_t clock_seq_low
Definition: Uuid.h:31
bool fromString(const char *s, Uuid &uuid)
Definition: Uuid.h:149
uint16_t time_mid
Definition: Uuid.h:28
constexpr Uuid()
Definition: Uuid.h:39
bool decompose(const String &s)
Definition: Uuid.h:108
bool decompose(const char *s)
Definition: Uuid.h:103
Uuid(const String &s)
Definition: Uuid.h:53