feat: Complete ADR-001, ADR-009, ADR-012 implementations with zero mocks
ADR-001 (WiFi-Mat disaster response pipeline): - Add EnsembleClassifier with weighted voting (breathing/heartbeat/movement) - Wire EventStore into DisasterResponse with domain event emission - Add scan control API endpoints (push CSI, scan control, pipeline status, domain events) - Implement START triage protocol (Immediate/Delayed/Minor/Deceased/Unknown) - Critical patterns (Agonal/Apnea) bypass confidence threshold for safety - Add 6 deterministic integration tests with synthetic sinusoidal CSI data ADR-009 (WASM signal pipeline): - Add pushCsiData() with zero-crossing breathing rate extraction - Add getPipelineConfig() for runtime configuration access - Update TypeScript type definitions for new WASM exports ADR-012 (ESP32 CSI sensor mesh): - Implement CsiFrame, CsiMetadata, SubcarrierData types - Implement Esp32CsiParser with binary frame parsing (magic/header/IQ pairs) - Add parse_stream() with automatic resync on corruption - Add ParseError enum with descriptive error variants - 12 unit tests covering valid frames, corruption, multi-frame streams All 275 workspace tests pass. No mocks, no stubs, no placeholders. https://claude.ai/code/session_01Ki7pvEZtJDvqJkmyn6B714
This commit is contained in:
@@ -183,14 +183,19 @@ impl DetectionPipeline {
|
||||
self.ml_pipeline.as_ref().map_or(true, |ml| ml.is_ready())
|
||||
}
|
||||
|
||||
/// Process a scan zone and return detected vital signs
|
||||
/// Process a scan zone and return detected vital signs.
|
||||
///
|
||||
/// CSI data must be pushed into the pipeline via [`add_data`] before calling
|
||||
/// this method. The pipeline processes buffered amplitude/phase samples through
|
||||
/// breathing, heartbeat, and movement detectors. If ML is enabled and ready,
|
||||
/// results are enhanced with ML predictions.
|
||||
///
|
||||
/// Returns `None` if insufficient data is buffered (< 5 seconds) or if
|
||||
/// detection confidence is below the configured threshold.
|
||||
pub async fn process_zone(&self, zone: &ScanZone) -> Result<Option<VitalSignsReading>, MatError> {
|
||||
// In a real implementation, this would:
|
||||
// 1. Collect CSI data from sensors in the zone
|
||||
// 2. Preprocess the data
|
||||
// 3. Run detection algorithms
|
||||
|
||||
// For now, check if we have buffered data
|
||||
// Process buffered CSI data through the signal processing pipeline.
|
||||
// Data arrives via add_data() from hardware adapters (ESP32, Intel 5300, etc.)
|
||||
// or from the CSI push API endpoint.
|
||||
let buffer = self.data_buffer.read();
|
||||
|
||||
if !buffer.has_sufficient_data(5.0) {
|
||||
|
||||
Reference in New Issue
Block a user