1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//! Persistent storage for the information bases.
//!
//! The NIB/AIB live in a RAM mirror; every setter marks its field dirty and
//! signals a change. The application only chooses where the state lives:
//! RAM-only via the plain `init()` functions, or NOR flash via
//! [`init_with_flash`] plus a spawned task running [`FlashStorage::run`] that
//! persists changes as they happen.
//!
//! Frame counters are persisted with headroom so a reboot can never reuse an
//! outgoing counter value: outgoing counters are stored rounded up two
//! `HEADROOM` boundaries ahead, incoming counters rounded down to a `WINDOW`
//! boundary. After a reboot up to `WINDOW` already-seen incoming counter
//! values may be accepted again — the cost of not writing flash on every
//! received frame.
//!
//! The per-IB restore/flush logic lives with the respective information base
//! (`nwk::nib::storage`, `aps::aib::storage`); this module only provides the
//! flash map plumbing.
/// Sink dirty information-base state is flushed into.
/// Lets a driver be shared: the stack can hold a reference to one the
/// application also flushes itself.
/// RAM-only operation: state is lost on reset.
;
pub
pub use FlashMap;
pub use FlashStorage;
pub use Shadow;
pub use init_with_flash;
pub use round_down;
pub use round_up;