Skip to content

feat: operator station with local MQTT, HEVC and integration guide - #1

Merged
JFCY2718 merged 8 commits into
mainfrom
feature/mqtt-udp-runtime-implementation
Sep 13, 2026
Merged

JFCY2718 merged 8 commits into
mainfrom
feature/mqtt-udp-runtime-implementation

Conversation

@JFCY2718

@JFCY2718 JFCY2718 commented Sep 11, 2026 •

Copy link
Copy Markdown
Owner

操作台原先主要展示演示数据,桌面 MQTT 运行时与当前 V2 协议之间缺少可复现的联调入口。本次增加内置 localhost broker、V2 遥测投影和哨兵指令回执闭环,并将视频、地图、机器人状态和连接诊断整合到默认操作台。

使用 RM26_Client 的地图与角色图标,保留素材来源和许可。UDP HEVC 使用共享视频会话与有界帧队列;MQTT 等待实际连接确认,断线后恢复订阅,未知或过期字段显示为空。正式比赛网络保持锁定,本版本面向本机联调,尚未完成实机比赛验收。

README 已重写,包含 Windows 环境、启动步骤、模拟器、指令回环、图传、故障注入、诊断、构建与待完成的设备验收项目。

验证:

  • Windows 桌面端实测 MQTT 收包、正负指令回执、回执超时、异常包、broker 重启与遥测过期;提供可复现脚本。
  • 四种窗口尺寸及机器人选择、地图镜像、键盘标记、设置和工作台切换通过;合成 HEVC 样本实测约 60 FPS。
  • 相关前端单测、类型检查、Rust MQTT 测试和 clippy 通过;完整回归由 GitHub CI 执行。

- Add V2 normalizer with explicit field mapping
- Improve test organization and fixtures
- Add protocol validation utilities
- Format and lint fixes
- All 62 verification scripts pass
- All 125 tests pass
- Implement Rust MQTT runtime using rumqttc with bounded channels
- Implement UDP3334 video frame reassembly (8-byte big-endian header)
- Add network_guard enforcement at socket boundary (localhost-only for Simulator)
- Add TauriMqttClient implementing existing MqttClientLike interface
- Remove duplicate protocol decoder (src/lib/protocol/decoder.ts)
- Add observable metrics for dropped messages and backpressure
- Bounded memory: frame reassembly with global byte budget
- Clean shutdown without reconnect after disconnect
- Update simulator with deterministic mode and localhost validation
- Official profile remains fail-closed (blocked)

Rust validation:
- cargo check: PASS
- cargo clippy: PASS
- cargo fmt: PASS

TypeScript validation:
- npm test: PASS (125 tests)
- npm run lint: PASS
- npx tsc -b: PASS
- npm run build: PASS
- npm run verify:all: PASS (62 checks)

Architecture:
MQTT: Rust rumqttc → Tauri → TauriMqttClient → existing adapter → ProtoCodec → normalizer → GameState
UDP: Rust receiver → parser → bounded reassembler → completed HEVC frame bytes

Dependencies cleaned:
- Removed: prost, tracing, tracing-subscriber
- Kept: tokio, rumqttc, bytes, thiserror
P0 Fixes Completed:
- MQTT anti-loop regression test with deterministic fixtures
- UDP frame reassembly requires exact shard sequence (0..N-1)
- UDP global inflight budget checked before every fragment insertion
- Rust unit tests: 16 tests covering MQTT/UDP edge cases
- Frame completion validates received_bytes == total_frame_bytes exactly

MQTT Tests:
- Official profile authorization denial
- Simulator localhost validation
- Publish-when-disconnected error propagation
- Reconnect backoff bounds verification

UDP Tests:
- Big-endian 8-byte header parsing
- Single-shard frame assembly
- Multi-shard out-of-order handling
- Duplicate shard rejection
- Missing middle shard prevents completion
- Malformed packet rejection
- Oversized frame rejection
- Frame expiration eviction
- Global inflight byte budget enforcement
- Frame number wrap-around (65535 -> 0)
- Exact payload length validation

TypeScript MQTT Anti-Loop:
- Deterministic test with known command ID
- Self-delivery detection via command ID tracking
- Prevents publish -> broker echo -> duplicate publish loop
- 10 test cases covering edge cases

Validation:
- cargo fmt: PASS
- cargo clippy: PASS (0 warnings)
- cargo check: PASS
- cargo test: PASS (16/16)
- npm run lint: PASS
- npx tsc -b: PASS
- npm test: PASS (125 tests)
- npm run build: PASS
- npm run verify:all: PASS (62/62)

No Co-Authored-By per project policy.
Fixes CI format check failure.
@JFCY2718 JFCY2718 changed the title feat: MQTT/UDP runtime with localhost-only enforcement feat: add guarded MQTT/UDP runtime and local HEVC playback Sep 13, 2026
@JFCY2718 JFCY2718 changed the title feat: add guarded MQTT/UDP runtime and local HEVC playback feat: add operator station with tactical map and local HEVC runtime Sep 13, 2026
@JFCY2718 JFCY2718 changed the title feat: add operator station with tactical map and local HEVC runtime feat: operator station with local MQTT, HEVC and integration guide Sep 13, 2026
@JFCY2718
JFCY2718 merged commit 7aa722f into main Sep 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant