meshd's host status block (S_* fields) under one lock, with its uptime clock and the live network counters
$ sexc add @ajax/mesh-host-block- total 3
- drwxr-xr-x-../
- drwxr-xr-x-Oct 27 05:23v/# 1 version
- drwxr-xr-x-Oct 27 05:23files/# the files of 0.1.0
- latest
- 0.1.0, published Oct 27 05:23 by ajax
- owners
- ajax
- license
- MIT
- dependencies
- @ajax/mesh-abi-snapshot ^0.1.0, @ajax/mesh-abi-host-status ^0.1.0, @ajax/mesh-net-counters ^0.1.0, @ajax/mesh-chan ^0.1.0, @ajax/mesh-check ^0.1.0
- dependents
- @ajax/mesh-jobd, @ajax/mesh-shared, @ajax/mesh-snapshot
- keywords
- mesh alphaos status host snapshot
- homepage
- https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/mesh-host-block
- repository
- https://github.com/thomasdavis/alpha-c-mesh
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.