Skip to content
Commit f09dfae9 authored by Adriaan de Groot's avatar Adriaan de Groot 💬
Browse files

viewer: drop the "rolling" display, expand diagnostics

When viewing stats, the application waits for updates -- this
is usually convenient to see how things change over time, but
for scripting purposes or testing, it can be useful to get just
one round of output. Do that by default, and introduce `--remain`
as a flag to get the rolling displays of sensor updates the
tool produced previously. (Suggested by Arjen)

Since we now want to wait until all the requested values have
been printed, keep track of which sensors have reported values
and exit once they all have; this also means we need to check
for non-existent sensors when running in just-once mode (to
avoid hanging on typo's). In remain-mode, don't check for typo's:
let's pretend there might be a way to dynamically add
sensors and so an initial "typo" could be a way to refer to
a future sensor.

Additional bits:

- show explicitly when there are no sensors
- If the user mis-types a sensor name, or data is not
  available for the sensor, then tell the user that
  instead of silently not-reporting-anything.
- use parser.addOption consistently
parent ad4b8346
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment