aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorOmar Tarabai <tarabai@devegypt.com>2014-07-25 11:42:08 +0000
committerOmar Tarabai <tarabai@devegypt.com>2014-07-25 11:42:08 +0000
commitac2af3883bbceafd3258cad788587a70057010d9 (patch)
treeeee0f1dec96321d13373c0090bfe17b708cca875 /src/include
parent98638edc1f1013173895fde63443a667525c58be (diff)
downloadgnunet-ac2af3883bbceafd3258cad788587a70057010d9.tar.gz
gnunet-ac2af3883bbceafd3258cad788587a70057010d9.zip
sensor: towards update functionality
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_protocols.h4
-rw-r--r--src/include/gnunet_sensor_util_lib.h58
2 files changed, 31 insertions, 31 deletions
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h
index 9b0f16507..a95c0107a 100644
--- a/src/include/gnunet_protocols.h
+++ b/src/include/gnunet_protocols.h
@@ -2434,9 +2434,9 @@ extern "C"
2434#define GNUNET_MESSAGE_TYPE_SENSOR_LIST_REQ 805 2434#define GNUNET_MESSAGE_TYPE_SENSOR_LIST_REQ 805
2435 2435
2436/** 2436/**
2437 * Sensor list sent from update point to requesting peer 2437 * Messsage carrying brief sensor information (name, version)
2438 */ 2438 */
2439#define GNUNET_MESSAGE_TYPE_SENSOR_LIST 806 2439#define GNUNET_MESSAGE_TYPE_SENSOR_BRIEF 806
2440 2440
2441 2441
2442/******************************************************************************* 2442/*******************************************************************************
diff --git a/src/include/gnunet_sensor_util_lib.h b/src/include/gnunet_sensor_util_lib.h
index 780b88cda..1e5108d29 100644
--- a/src/include/gnunet_sensor_util_lib.h
+++ b/src/include/gnunet_sensor_util_lib.h
@@ -187,34 +187,6 @@ struct GNUNET_SENSOR_SensorInfo
187 187
188}; 188};
189 189
190/**
191 * Carries a single reading from a sensor
192 */
193struct GNUNET_SENSOR_Reading
194{
195
196 /**
197 * Sensor this reading is related to
198 */
199 struct GNUNET_SENSOR_SensorInfo *sensor;
200
201 /**
202 * Timestamp of taking the reading
203 */
204 uint64_t timestamp;
205
206 /**
207 * Reading value
208 */
209 void *value;
210
211 /**
212 * Size of @e value
213 */
214 uint16_t value_size;
215
216};
217
218GNUNET_NETWORK_STRUCT_BEGIN 190GNUNET_NETWORK_STRUCT_BEGIN
219 191
220/** 192/**
@@ -258,6 +230,34 @@ struct GNUNET_SENSOR_ReadingMessage
258 230
259}; 231};
260 232
233/**
234 * Used to communicate brief information about a sensor.
235 */
236struct GNUNET_SENSOR_SensorBriefMessage
237{
238
239 /**
240 * GNUNET general message header.
241 */
242 struct GNUNET_MessageHeader header;
243
244 /**
245 * Size of sensor name string, allocated at position 0 after this struct.
246 */
247 uint16_t name_size;
248
249 /**
250 * First part of sensor version number
251 */
252 uint16_t version_major;
253
254 /**
255 * Second part of sensor version number
256 */
257 uint16_t version_minor;
258
259};
260
261GNUNET_NETWORK_STRUCT_END 261GNUNET_NETWORK_STRUCT_END
262 262
263 263
@@ -273,7 +273,7 @@ GNUNET_SENSOR_load_all_sensors ();
273/* 273/*
274 * Get path to the directory containing the sensor definition files 274 * Get path to the directory containing the sensor definition files
275 * 275 *
276 * @return sensor files directory 276 * @return sensor files directory string
277 */ 277 */
278char * 278char *
279GNUNET_SENSOR_get_sensor_dir (); 279GNUNET_SENSOR_get_sensor_dir ();