#[repr(C)]pub struct TelemetryBlock<T, const BUF_SIZE: usize>where
T: Transcendental,{
pub node_id: NodeId,
pub channel: u32,
pub timestamp: u64,
pub sample_rate: f32,
pub block_index: u64,
pub peak: T,
pub rms: T,
pub dc_offset: T,
pub data: [T; BUF_SIZE],
}Expand description
Fixed-size telemetry frame for RT-safe ring buffer communication.
Contains a full signal block plus computed metrics (peak, RMS, DC offset).
Implements Copy + Default, compatible with SpscQueue (overwrite-oldest).
Fields§
§node_id: NodeIdSource node identifier
channel: u32Audio channel index
timestamp: u64Timestamp (microseconds since UNIX epoch)
sample_rate: f32Sample rate at capture time
block_index: u64Monotonic block counter
peak: TPeak amplitude of the block
rms: TRMS (root mean square) of the block
dc_offset: TDC offset (average) of the block
data: [T; BUF_SIZE]Full signal block data
Implementations§
Source§impl<T, const BUF_SIZE: usize> TelemetryBlock<T, BUF_SIZE>where
T: Transcendental,
impl<T, const BUF_SIZE: usize> TelemetryBlock<T, BUF_SIZE>where
T: Transcendental,
Sourcepub fn compute_metrics(&mut self)
pub fn compute_metrics(&mut self)
Compute metrics (peak, RMS, DC offset) from the block data.
Trait Implementations§
Source§impl<T, const BUF_SIZE: usize> Clone for TelemetryBlock<T, BUF_SIZE>where
T: Clone + Transcendental,
impl<T, const BUF_SIZE: usize> Clone for TelemetryBlock<T, BUF_SIZE>where
T: Clone + Transcendental,
Source§fn clone(&self) -> TelemetryBlock<T, BUF_SIZE>
fn clone(&self) -> TelemetryBlock<T, BUF_SIZE>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T, const BUF_SIZE: usize> Debug for TelemetryBlock<T, BUF_SIZE>where
T: Debug + Transcendental,
impl<T, const BUF_SIZE: usize> Debug for TelemetryBlock<T, BUF_SIZE>where
T: Debug + Transcendental,
Source§impl<T, const BUF_SIZE: usize> Default for TelemetryBlock<T, BUF_SIZE>where
T: Transcendental,
impl<T, const BUF_SIZE: usize> Default for TelemetryBlock<T, BUF_SIZE>where
T: Transcendental,
Source§fn default() -> TelemetryBlock<T, BUF_SIZE>
fn default() -> TelemetryBlock<T, BUF_SIZE>
Returns the “default value” for a type. Read more
impl<T, const BUF_SIZE: usize> Copy for TelemetryBlock<T, BUF_SIZE>where
T: Copy + Transcendental,
Auto Trait Implementations§
impl<T, const BUF_SIZE: usize> Freeze for TelemetryBlock<T, BUF_SIZE>where
T: Freeze,
impl<T, const BUF_SIZE: usize> RefUnwindSafe for TelemetryBlock<T, BUF_SIZE>where
T: RefUnwindSafe,
impl<T, const BUF_SIZE: usize> Send for TelemetryBlock<T, BUF_SIZE>
impl<T, const BUF_SIZE: usize> Sync for TelemetryBlock<T, BUF_SIZE>
impl<T, const BUF_SIZE: usize> Unpin for TelemetryBlock<T, BUF_SIZE>where
T: Unpin,
impl<T, const BUF_SIZE: usize> UnsafeUnpin for TelemetryBlock<T, BUF_SIZE>where
T: UnsafeUnpin,
impl<T, const BUF_SIZE: usize> UnwindSafe for TelemetryBlock<T, BUF_SIZE>where
T: UnwindSafe,
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