Loading...
Searching...
No Matches
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
25#ifndef SENML_PHYDAT_H
26#define SENML_PHYDAT_H
27
28#include <stddef.h>
29#include <stdbool.h>
30#include <stdint.h>
31
32#include "senml.h"
33#include <phydat.h>
34
35#ifdef __cplusplus
36extern "C" {
37#endif
38
51void phydat_to_senml_bool(senml_bool_value_t *senml, const phydat_t *phydat, const uint8_t dim);
52
72void phydat_to_senml_float(senml_value_t *senml, const phydat_t *phydat, const uint8_t dim);
73
91void phydat_to_senml_decimal(senml_value_t *senml, const phydat_t *phydat, const uint8_t dim);
92
93#ifdef __cplusplus
94}
95#endif
96
97#endif /* SENML_PHYDAT_H */
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:155
SenML boolean value.
Definition senml.h:281
SenML string value.
Definition senml.h:264