pub struct SensorDataWriter {
pub buffer: Vec<u8>,
pub n_records: usize,
pub sensor_type: SensorType,
}Expand description
Sensor data writer for binary output.
Fields§
§buffer: Vec<u8>Output buffer.
n_records: usizeNumber of records written.
sensor_type: SensorTypeSensor type tag.
Implementations§
Source§impl SensorDataWriter
impl SensorDataWriter
Sourcepub fn new(sensor_type: SensorType) -> Self
pub fn new(sensor_type: SensorType) -> Self
Create a new sensor data writer.
Sourcepub fn write_imu(&mut self, record: &ImuDataRecord)
pub fn write_imu(&mut self, record: &ImuDataRecord)
Write IMU record.
Sourcepub fn write_gps(&mut self, record: &GpsDataRecord)
pub fn write_gps(&mut self, record: &GpsDataRecord)
Write GPS record.
Sourcepub fn write_force(&mut self, record: &ForceGaugeRecord)
pub fn write_force(&mut self, record: &ForceGaugeRecord)
Write force gauge record.
Sourcepub fn write_lidar(&mut self, frame: &LidarFrame)
pub fn write_lidar(&mut self, frame: &LidarFrame)
Write LiDAR frame.
Sourcepub fn bytes_written(&self) -> usize
pub fn bytes_written(&self) -> usize
Total bytes written.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SensorDataWriter
impl RefUnwindSafe for SensorDataWriter
impl Send for SensorDataWriter
impl Sync for SensorDataWriter
impl Unpin for SensorDataWriter
impl UnsafeUnpin for SensorDataWriter
impl UnwindSafe for SensorDataWriter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.