network.rs — UDP & Dummy Simulator
Exposes commands related to the UDP connection and the development simulator.
Commands
send_ping_cmd(packet_type) Intended to send a ping packet to the rover over UDP. Currently logs to console — full implementation pending.
start_dummy_streams() Starts the full multi-stream simulator. Sends fake protobuf packets to 127.0.0.1:9000 mimicking live rover data. Useful for UI development without hardware. Simulator config:
- Jitter: 30ms
- Simulated packet loss: 2%
start_dummy_imu_stream() Starts a single IMU-only simulator stream with no jitter and no packet loss. Useful for isolated IMU UI testing.
stop_dummy_streams() Signals the running simulator to stop by setting a shared cancellation flag.
The DummyStreamHandle struct (managed Tauri state) holds the cancellation handle so any command can stop the simulator.