robotics_signals/sensors/
temperature.rs

1use cdds_derive::*;
2use cyclonedds_rs::*;
3use serde_derive::{Deserialize, Serialize};
4
5use crate::standard::Header;
6
7/// Simple temperature reading
8#[repr(C)]
9#[derive(Serialize, Deserialize, Topic)]
10pub struct Temperature {
11    // timestamp of the measurement
12    // frame_id is the location of the temperature sensor
13    pub header: Header,
14
15    /// Measurement of the Temperature in Degrees Celsius.
16    pub temperature: f64,
17
18    /// 0 is interpreted as variance unknown
19    pub variance: f64,
20}