mirror of
https://github.com/ruvnet/RuView
synced 2026-08-07 20:01:43 +00:00
f49c722764
The Rust port lived two directories deep (rust-port/wifi-densepose-rs/) without any sibling under rust-port/ that warranted the extra level. Move the whole workspace up to v2/ to match v1/ (Python) at the same depth and shorten every cd / build command across the repo. git mv preserves history for all tracked files. 60 files updated for path references (CI workflows, ADRs, docs, scripts, READMEs, internal .claude-flow state). Two manual fixes for relative-cd paths in CLAUDE.md and ADR-043 that became wrong after the depth change (cd ../.. → cd ..). Validated: - cargo check --workspace --no-default-features → clean (after target/ nuke; the gitignored target/ was carried by the OS rename and had hard-coded old paths in build scripts) - cargo test --workspace --no-default-features → 1,539 passed, 0 failed, 8 ignored (same totals as pre-rename) - ESP32-S3 on COM7 → still streaming live CSI (cb #40300, RSSI -64 dBm) After-merge follow-up: contributors should `rm -rf v2/target` once and let cargo regenerate from the new path.
78 lines
1.9 KiB
Rust
78 lines
1.9 KiB
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
/// A firmware binary to be flashed or OTA-pushed.
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct FirmwareBinary {
|
|
pub path: String,
|
|
pub size_bytes: u64,
|
|
pub version: Option<String>,
|
|
pub chip_type: Option<String>,
|
|
}
|
|
|
|
/// Lifecycle of a serial flash operation.
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
#[serde(rename_all = "lowercase")]
|
|
pub enum FlashPhase {
|
|
Connecting,
|
|
Erasing,
|
|
Writing,
|
|
Verifying,
|
|
Completed,
|
|
Failed,
|
|
}
|
|
|
|
/// A serial flash session aggregate.
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct FlashSession {
|
|
pub id: String,
|
|
pub port: String,
|
|
pub firmware: FirmwareBinary,
|
|
pub phase: FlashPhase,
|
|
pub bytes_written: u64,
|
|
pub bytes_total: u64,
|
|
}
|
|
|
|
/// Lifecycle of an OTA update.
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
#[serde(rename_all = "lowercase")]
|
|
pub enum OtaPhase {
|
|
Uploading,
|
|
Rebooting,
|
|
Verifying,
|
|
Completed,
|
|
Failed,
|
|
}
|
|
|
|
/// An OTA update session aggregate.
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct OtaSession {
|
|
pub id: String,
|
|
pub target_ip: String,
|
|
pub target_mac: Option<String>,
|
|
pub firmware: FirmwareBinary,
|
|
pub phase: OtaPhase,
|
|
pub bytes_uploaded: u64,
|
|
pub bytes_total: u64,
|
|
}
|
|
|
|
/// Strategy for batch OTA updates across a mesh.
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
#[serde(rename_all = "lowercase")]
|
|
pub enum OtaStrategy {
|
|
Sequential,
|
|
TdmSafe,
|
|
Parallel,
|
|
}
|
|
|
|
/// A batch OTA session coordinating updates across multiple nodes.
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct BatchOtaSession {
|
|
pub id: String,
|
|
pub firmware: FirmwareBinary,
|
|
pub strategy: OtaStrategy,
|
|
pub max_concurrent: usize,
|
|
pub node_count: usize,
|
|
pub completed: usize,
|
|
pub failed: usize,
|
|
}
|