1f678fe87f
Reads SocketCAN and gpsd directly. Sessions start on the first frame or on 'ctl start', end after 15 s of bus idle or on 'ctl stop'; blips under 3 s are discarded. candump -L chunks fdatasync'd every second and zstd'd once closed; oldest sessions deleted to stay under 50 GB / above 20 GB free. Kernel and queue drops, link changes and clock steps are recorded as events. Bench-tested on vcan with the first car capture (byte-identical) and installed on the car Orin as yukart-recorder.service. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDwfd6Ki8UfG4hK6W5YpJz
1.4 KiB
1.4 KiB
type
| type |
|---|
| guidelines |
Core services guidelines
1. Listen-only until obd-poller exists
- Nothing here opens a CAN socket for writing. The recorder only reads, and the
host brings
can_pcanup listen-only. obd-pollerwill be the single writer. Until it lands, any transmit is a bug.
2. Capture never waits
- A frame missed is gone. Producers hand frames to the writer without blocking; what doesn't fit is counted, recorded as an event, and never silently lost.
- Capture reads SocketCAN and gpsd directly. It does not depend on the broker, a display, or any other service being up.
3. Every failure leaves complete files
- Append, flush and
fdatasyncabout once a second. Power loss costs at most the last second. - Replace files by write-temp, fsync, rename. Never rewrite in place.
- Anything found half-done at startup is repaired or marked, not deleted.
4. Raw stays raw
- Recordings are
candump -Ltext plus the gpsd JSON as received, socan-utils,canplayerand anything already written against the first captures keep working. - Decoding happens downstream of the recording, never instead of it.
5. Time is evidence, not truth
- The car unit's clock can boot stale and be stepped mid-drive. Record what is needed to correct it later (sync state, monotonic time, observed steps, GNSS time beside local receive time) rather than trusting it.