Loading...
Searching...
No Matches
saul.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2021 Silke Hofstra
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
23
24#include <stdint.h>
25#include "nanocbor/nanocbor.h"
26#include "saul_reg.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
39#ifndef CONFIG_SENML_SAUL_USE_FLOATS
40#define CONFIG_SENML_SAUL_USE_FLOATS 0
41#endif
42
51int senml_saul_reg_encode_cbor(nanocbor_encoder_t *enc, saul_reg_t *dev);
52
65size_t senml_saul_encode_cbor(uint8_t *buf, size_t len, saul_reg_t *reg);
66
67#ifdef __cplusplus
68}
69#endif
70
struct saul_reg saul_reg_t
SAUL registry entry.
size_t senml_saul_encode_cbor(uint8_t *buf, size_t len, saul_reg_t *reg)
Encode all sensors from a [S]ensor [A]ctuator [U]ber [L]ayer registry as senml+cbor.
int senml_saul_reg_encode_cbor(nanocbor_encoder_t *enc, saul_reg_t *dev)
Encode a single [S]ensor [A]ctuator [U]ber [L]ayer sensor as senml+cbor.
SAUL registry interface definition.