2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
20#include "../core/gimbal_ctx.h"
22#define GBL_UUID_BYTE_COUNT 16
23#define GBL_UUID_NODE_COUNT 6
24#define GBL_UUID_STRING_SIZE 37
25#define GBL_UUID_STRING_LENGTH 36
27#define GBL_SELF_TYPE GblUuid
32
33
34
35
41 uint16_t time_hi_and_version;
42 uint8_t clock_seq_hi_and_reserved;
43 uint8_t clock_seq_low;
51
52
53
54
79
80
81
82
83
84
85
87
88
89
90
91
92
93
95
96
97
98
99
100
101
102
104
105
106
107
108
109
111
112
113
114
115
116
117
119
120
121
122
123
124
126
127
128
129
130
131
#define GBL_PRIVATE_BEGIN
#define GBL_PRIVATE_END
Private data structure.
uint8_t GblBool
Basic boolean type, standardized to sizeof(char)
unsigned GblUuid_version(const GblUuid *pSelf)
Returns the UUID version type, according to RFC 4122.
#define GBL_UUID_BYTE_COUNT
Total number of bytes to representa a UUID, per RFC 4122.
int GblUuid_compare(const GblUuid *pSelf, const GblUuid *pOther)
Lexicographically Compares the given UUID to another, returning 0 if equal, -1 if less than,...
GblBool GblUuid_isNil(const GblUuid *pSelf)
Returns true if the given UUID is equal to the NIL UUID, per RFC 4122 (all zeroes),...
#define GBL_UUID_NODE_COUNT
Number of node bytes in a UUID, per RFC 4122.
Universally unique identifier.
GBL_RESULT GblUuid_genV4(GblUuid *pSelf)
Initializes the given GblUuid structure to a new, randomly generated UUID per RFC 4122 (version 4).
GBL_RESULT GblUuid_setNil(GblUuid *pSelf)
Initializes the given GblUuid structure to a "nil" UUID, per RFC 4122.
const char * GblUuid_string(const GblUuid *pSelf, char *pBuffer)
Fills in the given 37-byte string buffer with the standardized string representation of the given UUI...
GBL_RESULT GblUuid_parse(GblUuid *pSelf, const char *pBuffer)
Initializes the given GblUuid structure by deserializing the string representation given by pStrBuffe...