Skip to main content

Module sequence

Module sequence 

Source
Expand description

Sequence (seq) and birth/death sequence (bdSeq) counters, plus bdSeq persistence (spec §6.4 sequence rules).

Both counters are 0..=255 and wrap 255 -> 0; u8::wrapping_add gives the spec’s wrap for free (ADR-6), avoiding the == 256 sentinel of the Java/Python references.

Structs§

BdSeq
The birth/death sequence number (bdSeq), incremented once per MQTT CONNECT (not per message) and persisted across restarts so the Host can correlate an NDEATH with its NBIRTH (tck-id-payloads-nbirth-bdseq*).
FileBdSeqStore
A file-backed bdSeq store. Writes atomically (temp file + rename) to a durable path (unlike Tahu’s OS temp dir).
InMemoryBdSeqStore
An in-memory bdSeq store (non-persistent; useful for tests and ephemeral nodes).
Seq
The payload sequence number (seq), reset to 0 on every (re)birth and incremented by one (mod 256) on every subsequent Edge Node message (tck-id-payloads-sequence-num-incrementing).

Traits§

BdSeqStore
Persistence for the bdSeq counter so it survives process restarts.