From 5d50f0426699a06b5720e10f1feaef35c8b59f57 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Sat, 14 Apr 2018 01:57:17 +0200 Subject: Improve writer/reader processing - Handle indefinite number and kind of tags and fields for a metric - Include only once header files - Cleaning and ordering code Change-Id: I14a4f0e6e1626971bff73ce7d9ac067bda69cfc4 Signed-off-by: Romain Forlot --- src/harvester.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/harvester.h') diff --git a/src/harvester.h b/src/harvester.h index 224ec71..b11fffe 100644 --- a/src/harvester.h +++ b/src/harvester.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015, 2016, 2017, 2018 "IoT.bzh" + * Copyright (C) 2018 "IoT.bzh" * Author "Romain Forlot" * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,17 +14,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#ifndef _HARVESTER_H_ +#define _HARVESTER_H_ #define AFB_BINDING_VERSION 2 #include -union port { - int i_port; - char c_port[5]; // Available ports 1-65535 -}; - +enum metric_type {b = 0, i, d, str} type; union metric_value { - enum metric_type {b = 0, i, d, str} type; int b_value; int i_value; double d_value; @@ -32,3 +29,5 @@ union metric_value { }; int init(); + +#endif -- cgit 1.2.3-korg