mdf4-rs 0.6.0

mdf4-rs is a Rust library for working with Measurement Data Format (ASAM MDF4) files.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! [`BusFrame`].

#[allow(unused_imports)]
use super::*;
use alloc::vec::Vec;

/// Trait for frame types that can be serialized to bytes.
pub trait BusFrame: Clone {
    /// Serialize the frame to bytes for MDF storage.
    fn to_mdf_bytes(&self) -> Vec<u8>;

    /// Get the frame size in bytes.
    fn mdf_size(&self) -> usize {
        self.to_mdf_bytes().len()
    }
}