nx_moonraker_telemetry_parse_test.nx
buildroot/runtime/nx_moonraker_telemetry_parse_test.nx
about
nx_moonraker_telemetry_parse_test.nx -- parse canonical
Moonraker JSON responses into NxPrintTelemetry thermal fields.
Closed-form invariants:
(a) Empty/null body -> BAD_INPUT
(b) JSON with no extruder/heater_bed -> NO_OBJECT
(c) Canonical extruder+heater_bed body -> OK, fields populated
(d) Missing target -> setpoint = -1 (skip axis), actual still set
(e) Negative temperature (e.g. ambient probe) handled
(f) Nested objects don't confuse the brace matcher
(g) Same-key inside different scope: "temperature" inside the
extruder scope picks the extruder one, not heater_bed's
(h) has_thermal flag set when any value found
expect_exit: 0
license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_print_telemetry.nxnx_moonraker_telemetry_parse.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 22 | func cstr_len(s: *u8) -> i64 called by 1: main |
| 28 | func main() -> i64 |