Expand description
What info reports, subject by subject.
Each topic names the properties it needs, renders them as report lines, and renders them again as shell assignments. Nothing here touches a device: a topic is a function from fetched octets to text, which is what lets the whole report cost one exchange and lets every rendering be tested without a radio.
StructsΒ§
- Context
- What the renderers know beyond the properties themselves.
- Topic
- One subject the device can be asked about.
ConstantsΒ§
- STAT_
FIELDS π - TOPICS
- Every subject, in the order a bare report prints them.
FunctionsΒ§
- battery_
status π - bit π
- Booleans in
--envoutput are 0 or 1:[ "$RADIO_ENABLED" = 1 ]is the shellβs natural test, and βonβ would only invite string comparison against a word that might change. - capability_
list π - capability_
name π - The spec mnemonic, or the bare number for a capability this build has never heard of β a device newer than the tool still reports honestly.
- charge_
state_ πname - decode_
sint π - Decode the minimal-length signed integer
PROP_IDENT_ALTITUDEuses: as many octets as the value needs, big-endian, sign-extended from the first. - default_
region π - digest_
items π - Split a digest table of fixed-width items. A table whose length is not a multiple of the item width is not one this can read, and saying so beats printing a plausible-looking prefix.
- duty_
limit π - env_
advert π - env_
battery π - Kept exactly as it has always been spelled: scripts read these names,
and the point of an interface a shell
evals is that it does not move. - env_
device π - env_
gnss π - env_
host π - env_
identity π - env_
radio π - env_
repeater π - env_
sensors π - env_
stats π - env_
time π - filter_
list π - filters π
- host_
keys π - identity_
keys π - interval π
- on_off π
- ownership π
- Who this device answers to, and whether that is who was expected.
- precision_
cell π - The approximate cell size one precision names, at the equator. What makes a precision meaningful is how large an area it discloses.
- radio_
keys π - refusals
- A refusal worth reporting rather than passing over in silence.
- regions π
- render_
advert π - render_
battery π - render_
device π - render_
gnss π - render_
host π - render_
identity π - render_
radio π - render_
repeater π - render_
sensors π - render_
stats π - render_
time π - shell_
quote - Status codes and keys are safe by construction, but a device name is whatever somebody typed into it. Everything that could carry a space or a quote goes through this before a shell sees it.
- status_
token π - A status as the bare mnemonic, without the Rust path a debug format
carries.
[ "$DEVICE_STATUS" = RESET_POWER_ON ]is what a script wants to write, and a status this build cannot name still reads as something a script can compare. - topic
- The topic of that name, if there is one.
Type AliasesΒ§
- Line
- One line of a report: a label and what it says.