Astarte device API for Zephyr 0.9.0
Astarte device SDK for Zephyr RTOS
Loading...
Searching...
No Matches
device_id.h File Reference

Functions for the generation of Astarte device identifiers. More...

#include <zephyr/sys/uuid.h>
#include "astarte_device_sdk/astarte.h"
#include "astarte_device_sdk/result.h"

Go to the source code of this file.

Macros

#define ASTARTE_DEVICE_ID_LEN   (UUID_BASE64URL_LEN - 1)
 Number of characters in the string version of an Astarte device ID.
 
#define ASTARTE_DEVICE_ID_NAMESPACE_SIZE   UUID_SIZE
 Size in bytes for the namespace used to generate a deterministic device IDs.
 

Functions

astarte_result_t astarte_device_id_generate_random (char out[ASTARTE_DEVICE_ID_LEN+1])
 Generate a random Astarte device ID.
 
astarte_result_t astarte_device_id_generate_deterministic (const uint8_t nsp[ASTARTE_DEVICE_ID_NAMESPACE_SIZE], const uint8_t *name, size_t name_size, char out[ASTARTE_DEVICE_ID_LEN+1])
 Generate a deterministic Astarte device ID.
 

Detailed Description

Functions for the generation of Astarte device identifiers.