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
25#ifndef SENML_SAUL_H
26#define SENML_SAUL_H
27
28#include <stdint.h>
29#include "nanocbor/nanocbor.h"
30#include "saul_reg.h"
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
43#ifndef CONFIG_SENML_SAUL_USE_FLOATS
44#define CONFIG_SENML_SAUL_USE_FLOATS 0
45#endif
46
55int senml_saul_reg_encode_cbor(nanocbor_encoder_t *enc, saul_reg_t *dev);
56
69size_t senml_saul_encode_cbor(uint8_t *buf, size_t len, saul_reg_t *reg);
70
71#ifdef __cplusplus
72}
73#endif
74
75#endif /* SENML_SAUL_H */
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.
SAUL registry entry.
Definition saul_reg.h:39