Sniffer: property record store, memory caps and text sensor rewrite

Aperta
#33 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
42/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp

Direzione di ricerca

Start with the linked .specs/sniffer.md sections for property records, memory caps, text sensor, and configuration, then inspect sec_touch_sniffer.h and the hub frame buffer to check the specified limits. The issue names no test file; use the GoogleTest harness from #39 for the record store, history pool, text sensor builder, and config cases. Done means acceptance criteria 1–6 and 9 pass.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Spec: Property records, Memory caps, Text sensor, Configuration

  • Store: 256 slots indexed by ID (fields block ~6 KB + raw block 256 × 48 B), u32 uptime seconds, change and query status rules. IDs above 255 are dropped and counted.
  • History pool: 2 KB of variable-length previous values, depth 8 per ID, evicts from the ID with the most entries. Allocated only with web_page: true.
  • static_assert ties the 48 B raw cap to the hub's frame buffer.
  • Text sensor: id=raw for unregistered records with a raw value, 2048 cap with , …+N more, built in a heap string. Remove time/RTC use.
  • Config errors: non-ESP32 target, time_id, scan_end > 255. Add the web_page boolean (no effect yet).
  • Drop the stale memory comments in sec_touch_sniffer.h.

Done: acceptance criteria 1–6 and 9 in the spec.

Tests (harness from #39): host GoogleTest for the record store (change rules, failures, IDs above 255), the history pool (depth, eviction from the ID with the most entries) and the text sensor builder (selection, 2048 cap, marker). Config tests for non-ESP32, time_id and scan_end > 255.

Lingua principale
C++
Stelle
8
Fork
4
Merge medio
15h 58m
PR unite (30g)
5

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di distante/esphome-components

Tutte le issue di distante/esphome-components

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.