REDAC HybridController
Firmware for LUCIDAC/REDAC Teensy

This is a small UUID representation class. More...

#include <uuid.h>

Public Member Functions

bool allZero ()
 Checks if UUID is all zeros, can be used for detecting illegal values and failed conversions.
 
bool operator== (const UUID &other)
 
void toCharArray (char *_buffer) const
 
String toString () const
 
size_t printTo (Print &p) const
 
void toJson (JsonArray target) const
 Provides only the Array representation.
 
void fromJson (JsonArrayConst src)
 
void fromJson (JsonVariantConst src)
 Can read both string and array representation.
 

Static Public Member Functions

static UUID fromString (const char *str)
 Parses standard UUID representation such as "2d2f7585-c53c-465b-8844-1294c52dc917", returns an allZero instance in case of error.
 

Public Attributes

uint8_t ar [16] = {0}
 

Detailed Description

This is a small UUID representation class.

Only for holding pre-generated UUIDs. NOT for generating new UUIDs. It thus has a completely different scope then https://github.com/RobTillaart/UUID but borrows the printing code.

Generation is like UUID{0x26,0x5,0x1b,0xb5,0x7c,0xb7,0x43,0xfd,0x8d,0x64,0xe2,0x4f,0xdf,0xa1,0x44,0x89} or like UUID::from_String("2d2f7585-c53c-465b-8844-1294c52dc917").

Definition at line 19 of file uuid.h.

Member Function Documentation

◆ allZero()

bool utils::UUID::allZero ( )
inline

Checks if UUID is all zeros, can be used for detecting illegal values and failed conversions.

Definition at line 36 of file uuid.h.

References ar.

◆ fromJson() [1/2]

void utils::UUID::fromJson ( JsonArrayConst src)
inline

Definition at line 64 of file uuid.h.

References ar, and src.

Referenced by utils::convertFromJson(), and fromJson().

◆ fromJson() [2/2]

void utils::UUID::fromJson ( JsonVariantConst src)
inline

Can read both string and array representation.

Definition at line 72 of file uuid.h.

References fromJson(), fromString(), and src.

◆ fromString()

FLASHMEM utils::UUID utils::UUID::fromString ( const char * str)
static

Parses standard UUID representation such as "2d2f7585-c53c-465b-8844-1294c52dc917", returns an allZero instance in case of error.

Definition at line 66 of file uuid.cpp.

References ar, chartoi(), and index().

Referenced by fromJson().

◆ operator==()

bool utils::UUID::operator== ( const UUID & other)
inline

Definition at line 43 of file uuid.h.

References ar.

◆ printTo()

FLASHMEM size_t utils::UUID::printTo ( Print & p) const

Definition at line 49 of file uuid.cpp.

◆ toCharArray()

FLASHMEM void utils::UUID::toCharArray ( char * _buffer) const

Definition at line 6 of file uuid.cpp.

References ar.

◆ toJson()

void utils::UUID::toJson ( JsonArray target) const
inline

Provides only the Array representation.

Definition at line 59 of file uuid.h.

References ar.

Referenced by utils::convertToJson().

◆ toString()

FLASHMEM String utils::UUID::toString ( ) const

Definition at line 42 of file uuid.cpp.

Member Data Documentation

◆ ar

uint8_t utils::UUID::ar[16] = {0}

Definition at line 21 of file uuid.h.

Referenced by allZero(), fromJson(), fromString(), operator==(), toCharArray(), and toJson().


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