phydat.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 
27 #include <stddef.h>
28 #include <stdbool.h>
29 #include <stdint.h>
30 
31 #include "senml.h"
32 #include <phydat.h>
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
50 void phydat_to_senml_bool(senml_bool_value_t *senml, const phydat_t *phydat, const uint8_t dim);
51 
71 void phydat_to_senml_float(senml_value_t *senml, const phydat_t *phydat, const uint8_t dim);
72 
90 void phydat_to_senml_decimal(senml_value_t *senml, const phydat_t *phydat, const uint8_t dim);
91 
92 #ifdef __cplusplus
93 }
94 #endif
95 
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:154
SenML boolean value.
Definition: senml.h:280
SenML string value.
Definition: senml.h:263