Loading...
Searching...
No Matches
saul.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021 Silke Hofstra
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
9#pragma once
10
26
27#include <stdint.h>
28#include "nanocbor/nanocbor.h"
29#include "saul_reg.h"
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
42#ifndef CONFIG_SENML_SAUL_USE_FLOATS
43#define CONFIG_SENML_SAUL_USE_FLOATS 0
44#endif
45
54int senml_saul_reg_encode_cbor(nanocbor_encoder_t *enc, saul_reg_t *dev);
55
68size_t senml_saul_encode_cbor(uint8_t *buf, size_t len, saul_reg_t *reg);
69
70#ifdef __cplusplus
71}
72#endif
73
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.