aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorOmar Tarabai <tarabai@devegypt.com>2014-07-02 12:51:48 +0000
committerOmar Tarabai <tarabai@devegypt.com>2014-07-02 12:51:48 +0000
commit0255e3026f4553ecfe5098d7f96c05ffca982a52 (patch)
tree0c27cee84382d1f568e64f84d03b4627b4d3e617 /src/include
parent13c92b1966accce020a6a5d3f90b252c55a4ad2f (diff)
downloadgnunet-0255e3026f4553ecfe5098d7f96c05ffca982a52.tar.gz
gnunet-0255e3026f4553ecfe5098d7f96c05ffca982a52.zip
sensor: completed reporting to collection point
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_sensor_service.h39
-rw-r--r--src/include/gnunet_sensordashboard_service.h48
2 files changed, 87 insertions, 0 deletions
diff --git a/src/include/gnunet_sensor_service.h b/src/include/gnunet_sensor_service.h
index 19dcbbb75..1bfed345a 100644
--- a/src/include/gnunet_sensor_service.h
+++ b/src/include/gnunet_sensor_service.h
@@ -223,6 +223,45 @@ struct SensorInfoShort
223 223
224}; 224};
225 225
226GNUNET_NETWORK_STRUCT_BEGIN
227
228/**
229 * Used to communicate sensor readings to
230 * collection points (SENSORDASHBAORD service)
231 */
232struct GNUNET_SENSOR_Reading
233{
234
235 /**
236 * Size of the sensor name value, allocated
237 * at position 0 after this struct
238 */
239 size_t sensorname_size;
240
241 /**
242 * First part of sensor version number
243 */
244 uint16_t sensorversion_major;
245
246 /**
247 * Second part of sensor version number
248 */
249 uint16_t sensorversion_minor;
250
251 /**
252 * Timestamp of recorded reading
253 */
254 uint64_t timestamp;
255
256 /**
257 * Size of reading value, allocation
258 * at poistion 1 after this struct
259 */
260 size_t value_size;
261
262};
263GNUNET_NETWORK_STRUCT_END
264
226/** 265/**
227 * Type of an iterator over sensor definitions. 266 * Type of an iterator over sensor definitions.
228 * 267 *
diff --git a/src/include/gnunet_sensordashboard_service.h b/src/include/gnunet_sensordashboard_service.h
new file mode 100644
index 000000000..b3d94e4df
--- /dev/null
+++ b/src/include/gnunet_sensordashboard_service.h
@@ -0,0 +1,48 @@
1/*
2 This file is part of GNUnet
3 (C)
4
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
9
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
19 */
20
21/**
22 * @file include/gnunet_sensordashboard_service.h
23 * @brief API to the sensordashboard service
24 * @author Omar Tarabai
25 */
26#ifndef GNUNET_SENSORDASHBOARD_SERVICE_H
27#define GNUNET_SENSORDASHBOARD_SERVICE_H
28
29#include "platform.h"
30#include "gnunet_util_lib.h"
31
32#ifdef __cplusplus
33extern "C"
34{
35#if 0 /* keep Emacsens' auto-indent happy */
36}
37#endif
38#endif
39
40
41#if 0 /* keep Emacsens' auto-indent happy */
42{
43#endif
44#ifdef __cplusplus
45}
46#endif
47
48#endif