phydat.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 
24 #include <stddef.h>
25 #include <stdbool.h>
26 #include <stdint.h>
27 
28 #include "senml.h"
29 #include <phydat.h>
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
47 void phydat_to_senml_bool(senml_bool_value_t *senml, const phydat_t *phydat, const uint8_t dim);
48 
68 void phydat_to_senml_float(senml_value_t *senml, const phydat_t *phydat, const uint8_t dim);
69 
87 void phydat_to_senml_decimal(senml_value_t *senml, const phydat_t *phydat, const uint8_t dim);
88 
89 #ifdef __cplusplus
90 }
91 #endif
92 
void phydat_to_senml_float(senml_value_t *senml, const phydat_t *phydat, const uint8_t dim)
Create a SenML float value.
void phydat_to_senml_bool(senml_bool_value_t *senml, const phydat_t *phydat, const uint8_t dim)
Create a SenML boolean value.
void phydat_to_senml_decimal(senml_value_t *senml, const phydat_t *phydat, const uint8_t dim)
Create a SenML decimal fraction value.
Functionality for converting from Phydat to SenML.
Basic SenML types.
Generic data structure for expressing physical values.
Definition: phydat.h:151
SenML boolean value.
Definition: senml.h:277
SenML string value.
Definition: senml.h:260