Module topics

Module topics 

Source
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 --env output 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_ALTITUDE uses: 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.