pub struct SensorFluxProcessor { /* private fields */ }Available on crate feature
flux only.Expand description
Sensor-aware Flux processor for baseline tracking and HSI enrichment.
Implementations§
Source§impl SensorFluxProcessor
impl SensorFluxProcessor
Sourcepub fn new(baseline_window_sessions: usize) -> Self
pub fn new(baseline_window_sessions: usize) -> Self
Create a new processor with the specified baseline window size.
§Arguments
baseline_window_sessions- Number of sessions to include in rolling baseline (default: 20)
Sourcepub fn with_device_id(baseline_window_sessions: usize, device_id: &str) -> Self
pub fn with_device_id(baseline_window_sessions: usize, device_id: &str) -> Self
Create with a custom device ID.
Sourcepub fn process_window(
&mut self,
window: &EventWindow,
_features: &WindowFeatures,
base_snapshot: HsiSnapshot,
) -> Result<EnrichedSnapshot, ComputeError>
pub fn process_window( &mut self, window: &EventWindow, _features: &WindowFeatures, base_snapshot: HsiSnapshot, ) -> Result<EnrichedSnapshot, ComputeError>
Process a window and return an enriched snapshot with flux metrics.
This converts the sensor window to a behavior session, processes it through the flux pipeline, and returns an enriched snapshot.
Sourcepub fn update_baseline(
&mut self,
window: &EventWindow,
) -> Result<(), ComputeError>
pub fn update_baseline( &mut self, window: &EventWindow, ) -> Result<(), ComputeError>
Process a window without enrichment (just baseline update).
This updates the baseline without returning enriched output.
Sourcepub fn save_baselines(&self) -> Result<String, ComputeError>
pub fn save_baselines(&self) -> Result<String, ComputeError>
Save baselines to JSON for persistence.
Sourcepub fn load_baselines(&mut self, json: &str) -> Result<(), ComputeError>
pub fn load_baselines(&mut self, json: &str) -> Result<(), ComputeError>
Load baselines from JSON.
Sourcepub fn session_count(&self) -> usize
pub fn session_count(&self) -> usize
Get the number of sessions processed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SensorFluxProcessor
impl RefUnwindSafe for SensorFluxProcessor
impl Send for SensorFluxProcessor
impl Sync for SensorFluxProcessor
impl Unpin for SensorFluxProcessor
impl UnwindSafe for SensorFluxProcessor
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