Guuid

Interface to generate global universally unique identifier.

File information

Filecommon/interface/guuid.h

Classes IGuuid

Data types OS_GUID

Examples IGuuid::GenerateUUID
IGuuid::GenerateBinaryUUID

Classes

IGuuid

class IGuuid {
public:
    static void GenerateUUID(char * uid);
    static void GenerateBinaryUUID(OS_GUID * uid);
};

Public functions

GenerateUUID (static function)
This function creates a new universally unique identifier (UUID) and unparse it to a char pointer.

Parameters

char * uid A char pointer to store the new UUID. It needs to be of size GUID_SIZE (37 bytes)

Code Example

char * id = (char *)malloc(GUID_SIZE);
IGuuid::GenerateUUID(id);
                
GenerateBinaryUUID (static function)
This function creates a binary universally unique identifier (UUID).

Parameters

OS_GUID * uid An object of type struct OS_GUID

Code Example

OS_GUID id;
IGuuid::GenerateBinaryUUID(&id);
                

Data types

OS_GUID

typedef struct {
    byte b[16]; 
} OS_GUID;

Overview

The struct OS_GUID is used to store the binary generated UUID.