Commit graph

5 commits

Author SHA1 Message Date
6732ff0199 refactor: split network config into game_host and listen_addr
Replace RUSTY_TELEMETRY_BIND with two env vars:
- RUSTY_TELEMETRY_GAME_HOST: IP of the machine running the sim (for
  KSUDP handshake target). Default: 127.0.0.1
- RUSTY_TELEMETRY_LISTEN: local address to bind for incoming feeds
  (Telemetry Tool, PCARS). Default: 0.0.0.0 (accept from any interface)

Both fall back to RUSTY_TELEMETRY_BIND for backward compatibility.
This enables running rusty-telemetry on a separate machine from the game.
2026-06-04 10:28:52 +02:00
a50d3af290 feat: add PCARS 1 & 2 UDP telemetry parser (port 5606)
- Auto-detect PCARS1 (1367-byte V1) vs PCARS2 (559-byte V2) packet format
- Parse speed, RPM, gear, inputs, tyres, engine temps, damage, weather
- Map PCARS-specific fields to TelemetryFrame (oil/water temp, damage, etc.)
- Add FeedSource::Pcars + 16 PCARS-specific Option fields to TelemetryFrame
- Port 5606 as optional bind-listen feed (like Telemetry Tool)
- 5 new unit tests for PCARS parser (32 total)
- Shared binary_utils module for all parsers
2026-06-04 09:49:00 +02:00
7a1c37fc86 refactor: TUI multi-feed monitor with binary parsers
- Add ratatui/crossterm TUI replacing stdout data dump
- Add binary parsers for KSUDP RTCarInfo (port 9996) and Telemetry Tool (port 10101)
- Add shared binary_utils module for safe packet reading
- Add ring-buffer frequency calculation and feed health state machine
- Add parse_first_driver() to avoid unnecessary multi-driver allocation
- Add 27 unit tests (14 feed_state + 6 ksudp + 7 telemetry_tool)
- Move parsing outside mutex lock to minimize TUI contention
- Replace expect() on env var with graceful error handling
- Remove unused serde dependency
- Delete obsolete stats.rs and telemetry.rs
2026-06-04 08:48:35 +02:00
1731495197 feat: multi-port UDP listener with data dump
Listen on three AC telemetry ports simultaneously (9996, 10101, 5005).
Dump received data to per-feed files under ./data/<session>/.
Notify on console for each received packet.

- Port 9996: AC built-in (ksudp), binary with 4-byte length framing
- Port 10101: Telemetry Tool plugin, binary with 4-byte length framing
- Port 5005: AC Lua plugin, JSON with newline-separated records
- Configurable bind address via RUSTY_TELEMETRY_BIND (default 127.0.0.1)
- Buffered file I/O via tokio BufWriter
- Graceful shutdown with flush on Ctrl+C
- Startup banner showing feed status
- Bumped version to 0.2.0, added futures dependency
2026-06-03 11:50:06 +02:00
30543fd0ba feat: initial rusty-telemetry UDP listener
- Async UDP listener on configurable bind address (default 127.0.0.1:5005)
- RUSTY_TELEMETRY_BIND env var for cross-machine deployment
- Deserializes JSON telemetry frames with serde
- deny_unknown_fields for schema drift detection
- ReceiveStats tracker with packet rate and data rate
- Locked stdout writes for efficient output
- .gitignore for /target/ and .idea/
2026-06-01 15:13:13 +02:00