docs: reflect sender catch-up and local-date CSV/history behavior
This commit is contained in:
@@ -33,6 +33,7 @@ Function names below are C++ references. Rust naming/layout may differ, but the
|
||||
- Sampling/transmit cadence:
|
||||
- sender sample cadence 1 Hz.
|
||||
- sender batch cadence 30 s.
|
||||
- when sender backlog exists (`batch_count > 1`) and no ACK is pending, sender performs immediate catch-up sends (still stop-and-wait with one inflight batch).
|
||||
- sync-request cadence 15 s while unsynced.
|
||||
- sender retransmits reuse cached encoded payload bytes for same inflight batch.
|
||||
- sender ACK receive window is adaptive from airtime + observed ACK RTT, with expanded second window on miss.
|
||||
@@ -53,6 +54,8 @@ Function names below are C++ references. Rust naming/layout may differ, but the
|
||||
- diagnostics do not change LoRa payload schema or remap payload fields.
|
||||
- SD logging:
|
||||
- CSV columns include both `ts_utc` and `ts_hms_local`.
|
||||
- per-day CSV file partitioning uses local date (`TIMEZONE_TZ`) under `/dd3/<device_id>/YYYY-MM-DD.csv`.
|
||||
- history day-file resolution prefers local-date filenames and falls back to legacy UTC-date filenames.
|
||||
- history parser supports both current (`ts_utc,ts_hms_local,p_w,...`) and legacy (`ts_utc,p_w,...`) layouts.
|
||||
|
||||
## 3. Protocol and Data Contracts
|
||||
@@ -246,11 +249,11 @@ Function names below are C++ references. Rust naming/layout may differ, but the
|
||||
- `void sd_logger_init()`
|
||||
- `bool sd_logger_is_ready()`
|
||||
- `void sd_logger_log_sample(const MeterData&, bool include_error_text)`
|
||||
- append/create per-day CSV under `/dd3/<device_id>/YYYY-MM-DD.csv`.
|
||||
- append/create per-day CSV under `/dd3/<device_id>/YYYY-MM-DD.csv` using local calendar date from `TIMEZONE_TZ`.
|
||||
- Internal behavior-critical helpers:
|
||||
- `fault_text`
|
||||
- `ensure_dir`
|
||||
- `format_date_utc`
|
||||
- `format_date_local`
|
||||
- `format_hms_local`
|
||||
|
||||
## `src/display_ui.cpp`
|
||||
@@ -309,7 +312,8 @@ Internal route/state functions to preserve behavior:
|
||||
- `sanitize_history_device_id`
|
||||
- `sanitize_download_filename`
|
||||
- `history_reset`
|
||||
- `history_date_from_epoch`
|
||||
- `history_date_from_epoch_local`
|
||||
- `history_date_from_epoch_utc` (legacy fallback mapping)
|
||||
- `history_open_next_file`
|
||||
- `history_parse_line`
|
||||
- `history_tick`
|
||||
@@ -451,5 +455,7 @@ Suggested Rust primitives:
|
||||
- Duplicate batch handling updates counters and suppresses duplicate publish/log.
|
||||
- Web UI shows `epoch (HH:MM:SS TZ)` local time.
|
||||
- SD CSV header/fields match expected order.
|
||||
- SD daily files roll over at local midnight (`TIMEZONE_TZ`), not UTC midnight.
|
||||
- History endpoint reads current and legacy CSV layouts successfully.
|
||||
- History endpoint can read both local-date and legacy UTC-date day filenames.
|
||||
- MQTT state/fault payload fields match existing names and semantics.
|
||||
|
||||
Reference in New Issue
Block a user