Astarte device API for Zephyr 0.7.2
Astarte device SDK for Zephyr RTOS
Loading...
Searching...
No Matches
device_id.h
Go to the documentation of this file.
1/*
2 * (C) Copyright 2024, SECO Mind Srl
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ASTARTE_DEVICE_SDK_DEVICE_ID_H
8#define ASTARTE_DEVICE_SDK_DEVICE_ID_H
9
24
31#define ASTARTE_DEVICE_ID_LEN 22
32
34#define ASTARTE_DEVICE_ID_NAMESPACE_SIZE 16
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
49
63 const uint8_t namespace[static ASTARTE_DEVICE_ID_NAMESPACE_SIZE], const uint8_t *name,
64 size_t name_size, char out[static ASTARTE_DEVICE_ID_LEN + 1]);
65
66#ifdef __cplusplus
67}
68#endif
69
74#endif // ASTARTE_DEVICE_SDK_DEVICE_ID_H
Astarte types and defines.
astarte_result_t astarte_device_id_generate_deterministic(const uint8_t namespace[static ASTARTE_DEVICE_ID_NAMESPACE_SIZE], const uint8_t *name, size_t name_size, char out[static ASTARTE_DEVICE_ID_LEN+1])
Generate a deterministic Astarte device ID.
#define ASTARTE_DEVICE_ID_NAMESPACE_SIZE
Size in bytes for the namespace used to generate a deterministic device IDs.
Definition device_id.h:34
#define ASTARTE_DEVICE_ID_LEN
Number of characters in the string version of an Astarte device ID.
Definition device_id.h:31
astarte_result_t astarte_device_id_generate_random(char out[static ASTARTE_DEVICE_ID_LEN+1])
Generate a random Astarte device ID.
astarte_result_t
Astarte Device SDK return codes.
Definition result.h:31
Astarte result types.