fix: Eliminate remaining mock data paths, isolate test infrastructure
- core/router_interface.py: Replace placeholder _collect_real_csi_data() with explicit RuntimeError directing users to hardware setup docs - hardware/router_interface.py: Replace np.random.rand() in _parse_csi_response() with RouterConnectionError requiring real parser - testing/: New isolated module for mock data generation (moved out of production code paths per ADR-011) - sensing/: Initialize commodity sensing module (ADR-013) No production code path returns random data. Mock mode requires explicit opt-in via WIFI_DENSEPOSE_MOCK=true environment variable. https://claude.ai/code/session_01Ki7pvEZtJDvqJkmyn6B714
This commit is contained in:
56
v1/src/sensing/__init__.py
Normal file
56
v1/src/sensing/__init__.py
Normal file
@@ -0,0 +1,56 @@
|
||||
"""
|
||||
Commodity WiFi Sensing Module (ADR-013)
|
||||
=======================================
|
||||
|
||||
RSSI-based presence and motion detection using standard Linux WiFi metrics.
|
||||
This module provides real signal processing from commodity WiFi hardware,
|
||||
extracting presence and motion features from RSSI time series.
|
||||
|
||||
Components:
|
||||
- rssi_collector: Data collection from Linux WiFi interfaces
|
||||
- feature_extractor: Time-domain and frequency-domain feature extraction
|
||||
- classifier: Presence and motion classification from features
|
||||
- backend: Common sensing backend interface
|
||||
|
||||
Capabilities:
|
||||
- PRESENCE: Detect whether a person is present in the sensing area
|
||||
- MOTION: Classify motion level (absent / still / active)
|
||||
|
||||
Note: This module uses RSSI only. For higher-fidelity sensing (respiration,
|
||||
pose estimation), CSI-capable hardware and the full DensePose pipeline
|
||||
are required.
|
||||
"""
|
||||
|
||||
from v1.src.sensing.rssi_collector import (
|
||||
LinuxWifiCollector,
|
||||
SimulatedCollector,
|
||||
WifiSample,
|
||||
)
|
||||
from v1.src.sensing.feature_extractor import (
|
||||
RssiFeatureExtractor,
|
||||
RssiFeatures,
|
||||
)
|
||||
from v1.src.sensing.classifier import (
|
||||
PresenceClassifier,
|
||||
SensingResult,
|
||||
MotionLevel,
|
||||
)
|
||||
from v1.src.sensing.backend import (
|
||||
SensingBackend,
|
||||
CommodityBackend,
|
||||
Capability,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"LinuxWifiCollector",
|
||||
"SimulatedCollector",
|
||||
"WifiSample",
|
||||
"RssiFeatureExtractor",
|
||||
"RssiFeatures",
|
||||
"PresenceClassifier",
|
||||
"SensingResult",
|
||||
"MotionLevel",
|
||||
"SensingBackend",
|
||||
"CommodityBackend",
|
||||
"Capability",
|
||||
]
|
||||
Reference in New Issue
Block a user