skip to content
==> README.md <==
1# @ajax/mesh-host-block
2
3meshd's host status block (S_* fields) under one lock, with its uptime clock and the live network counters.
4
5The host status block (status.rs HostStatus): SNAP_HOST bytes, little-endian, written by meshd's threads under one lock, read whole by the snapshot with the uptime and the live network counters filled in at that moment (the counters' rates are timed by that uptime).
6
7```c
8#include "mesh/host_block.h"
9```
10
11## Ported from
12
13[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT): crates/mesh-host/src/status.rs: `HostStatus` (new, set_u32, set_f32, set_u64, set_many, add_u32, set_str, uptime_ms, get_u32, get_f32, bytes).
14
15## Tests
16
17- `tests/host_block.c`: every setter, the truncated string, a consistent set, and the copy with uptime and network counters.
18
19## Differences
20
21- `snapshot` (status.rs) is @ajax/mesh-snapshot.
22
23## Licence
24
25MIT. See the repository's LICENSE.