You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Represents a decoded sensor data value. Since temperature may be integer (raw)
242
243
/// or float (computed), we use the struct to return both integer and float values.
244
+
#[derive(Clone,Copy)]// Sensor values may be copied
243
245
pubstructSensorValue{
244
246
/// Null-terminated string for the key. `t` for raw temp, `tmp` for computed. When transmitted to CoAP Server or Collector Node, the key (field name) to be used.
245
247
pubkey:&'staticStrn,
246
248
/// The type of the sensor value and the value.
247
249
pubval:SensorValueType,
250
+
/// Geolocation associated with the sensor value.
251
+
publoc:SensorValueType,
248
252
}
249
253
250
254
/// Default sensor value is `None`
@@ -254,11 +258,13 @@ impl Default for SensorValue {
254
258
SensorValue{
255
259
key:&init_strn!(""),
256
260
val:SensorValueType::None,
261
+
loc:SensorValueType::None,
257
262
}
258
263
}
259
264
}
260
265
261
266
/// Represents the type and value of a sensor data value.
267
+
#[derive(Clone,Copy)]// Sensor values may be copied
0 commit comments