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