Universally Unique Identifier (UUID) API
Collaboration diagram for Universally Unique Identifier (UUID) API:

Functions

void rdm_uuidCreate (RDM_UUID_T *uuid)
RDM_RETCODE rdm_uuidFromString (const RDM_TCHAR_T *str, RDM_UUID_T *uuid)
size_t rdm_uuidStrLen (const RDM_UUID_T *uuid, RDM_BOOL_T braces)
RDM_RETCODE rdm_uuidToString (const RDM_UUID_T *uuid, RDM_TCHAR_T *str, size_t len, RDM_BOOL_T braces)

Detailed Description

The RDM uuid datatype API. The functions here are located in RDM Base Functionality. Linker option:

    -lrdmbase

The UUID/GUID types represent 128-bit unique identifiers. The implementation of UUID/GUID is represented by the RFC 4122 standard

Function Documentation

rdm_uuidCreate()

void rdm_uuidCreate ( RDM_UUID_T * uuid )

#include <rdmuuidapi.h>

Create a Universally Unique Identifier (UUID)

This function is able to create a universally unique identifier with a very high probability.

See also
rdm_uuidToString
rdm_uuidFromString
Parameters
[out] uuid [OUT] The Universally Unique Identifier to be creasted

rdm_uuidFromString()

RDM_RETCODE rdm_uuidFromString ( const RDM_TCHAR_T * str,
RDM_UUID_T * uuid
)

#include <rdmuuidapi.h>

Convert a string to a Universally Unique Identifier (UUID)

Convert a string to a Universally Unique Identifier (UUID).

Return values
sOKAY Normal, successful return.
ePSP_INVUUID Invalid UUID in the PSP library.
See also
rdm_uuidToString
rdm_uuidCreate
Parameters
[in] str [IN] The UUID in string form that is to be converted
[out] uuid [OUT] The converted UUID

rdm_uuidStrLen()

size_t rdm_uuidStrLen ( const RDM_UUID_T * uuid,
RDM_BOOL_T braces
)

#include <rdmuuidapi.h>

Get the string length of a Universally Unique Identifier (UUID)

Get the string length of a Universally Unique Identifier if it were to be converted to a string.

Returns
The string length, if converted to a string
Parameters
[in] uuid [IN] The UUID we want the string length off if converted to a string
[in] braces [IN] Whether the converted string should include braces

rdm_uuidToString()

RDM_RETCODE rdm_uuidToString ( const RDM_UUID_T * uuid,
RDM_TCHAR_T * str,
size_t len,
RDM_BOOL_T braces
)

#include <rdmuuidapi.h>

Convert a Universally Unique Identifier (UUID) to a string

Convert a Universally Unique Identifier (UUID) to a string. The string buffer provided should be big enough to hold at least 36 characters, plus the optional braces, and a null terminator.

Return values
sOKAY Normal, successful return.
sTRUNCATE Result is truncated.
See also
rdm_uuidStrLen
rdm_uuidFromString
rdm_uuidCreate
Parameters
[in] uuid [IN] The UUID that is to be converted
[out] str [OUT] The string buffer for the converted UUID
[in] len [IN] The lengt of the provided string buffer measured in number of characters
[in] braces [IN] Whether the converted string should include braces