pub struct Version1DataFrame {
pub system_secs: u32,
pub system_millis: u16,
pub system_nanos: u16,
pub global_sequence: u32,
pub sensor_sequence: u32,
pub sensor_tag: u16,
pub value: SensorData,
}
Expand description
A sensor data frame.
Fields§
§system_secs: u32
A time in seconds since begin of a measurement, or since startup time.
If unsupported, set to u32::MAX
.
system_millis: u16
The sub-second milliseconds.
If unsupported, set to u16::MAX
.
system_nanos: u16
The sub-millisecond nanoseconds.
If unsupported, set to u16::MAX
.
global_sequence: u32
A sequence identifier, monotonically increasing.
This value can be used to detect package loss on the receiver side. It should increase on every transmitted package, across all sensor.
If unsupported, set to u32::MAX
.
sensor_sequence: u32
A sensor sequence identifier, monotonically increasing.
This value should increase whenever new data became available for the specific sensor, not when it was actually transmitted.
If unsupported, set to u32::MAX
.
sensor_tag: u16
A device-specific tag for a specific sensor.
This value should be identical across all readings from the same sensor. This is to ensure that multiple sensors of the same type, e.g. multiple accelerometers, can be told apart on the host side.
value: SensorData
The sensor reading.
Implementations§
Trait Implementations§
Source§impl Clone for Version1DataFrame
impl Clone for Version1DataFrame
Source§fn clone(&self) -> Version1DataFrame
fn clone(&self) -> Version1DataFrame
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl DataFrame for Version1DataFrame
impl DataFrame for Version1DataFrame
Source§type ProtocolVersion = Version1
type ProtocolVersion = Version1
Source§fn target(&self) -> SensorId
fn target(&self) -> SensorId
Source§fn into_versioned(self) -> VersionedDataFrame<Self::ProtocolVersion, Self>
fn into_versioned(self) -> VersionedDataFrame<Self::ProtocolVersion, Self>
VersionedDataFrame
using the specified ProtocolVersion
.