wifi_densepose_cli/lib.rs
1//! WiFi-DensePose CLI
2//!
3//! Command-line interface for WiFi-DensePose system, including the
4//! Mass Casualty Assessment Tool (MAT) for disaster response.
5//!
6//! # Features
7//!
8//! - **mat**: Disaster survivor detection and triage management
9//! - **version**: Display version information
10//!
11//! # Usage
12//!
13//! ```bash
14//! # Start scanning for survivors
15//! wifi-densepose mat scan --zone "Building A"
16//!
17//! # View current scan status
18//! wifi-densepose mat status
19//!
20//! # List detected survivors
21//! wifi-densepose mat survivors --sort-by triage
22//!
23//! # View and manage alerts
24//! wifi-densepose mat alerts
25//! ```
26
27use clap::{Parser, Subcommand};
28
29pub mod calibrate;
30pub mod calibrate_api;
31pub mod room;
32#[cfg(feature = "mat")]
33pub mod mat;
34
35/// WiFi-DensePose Command Line Interface
36#[derive(Parser, Debug)]
37#[command(name = "wifi-densepose")]
38#[command(
39 author,
40 version,
41 about = "WiFi-based pose estimation and disaster response"
42)]
43#[command(propagate_version = true)]
44pub struct Cli {
45 /// Command to execute
46 #[command(subcommand)]
47 pub command: Commands,
48}
49
50/// Top-level commands
51#[derive(Subcommand, Debug)]
52pub enum Commands {
53 /// Empty-room baseline calibration (ADR-135).
54 /// Captures CSI frames via UDP and saves a per-subcarrier statistical
55 /// baseline used for real-time motion z-scoring and CIR reference.
56 Calibrate(calibrate::CalibrateArgs),
57
58 /// Run the calibration HTTP API (ADR-135/151) for a UI to drive.
59 /// Receives ESP32 CSI over UDP and exposes start/status/stop/result
60 /// endpoints at `/api/v1/calibration/*` (CORS-enabled).
61 CalibrateServe(calibrate_api::CalibrateServeArgs),
62
63 /// Guided per-room enrollment (ADR-151 Stage 2) — walk the anchor sequence
64 /// against a baseline, writing labelled features.
65 Enroll(room::EnrollArgs),
66
67 /// Train the per-room specialist bank from an enrollment (ADR-151 Stage 4).
68 TrainRoom(room::TrainRoomArgs),
69
70 /// Show a trained specialist bank's summary.
71 RoomStatus(room::RoomStatusArgs),
72
73 /// Live mixture-of-specialists readout from the CSI stream (ADR-151 Stage 5).
74 RoomWatch(room::RoomWatchArgs),
75
76 /// Mass Casualty Assessment Tool commands
77 #[cfg(feature = "mat")]
78 #[command(subcommand)]
79 Mat(mat::MatCommand),
80
81 /// Display version information
82 Version,
83}