code wiki / (root) / nx_moonraker_telemetry_parse_test.nx

nx_moonraker_telemetry_parse_test.nx

buildroot/runtime/nx_moonraker_telemetry_parse_test.nx

4794 B99 linesdepth 5pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic moonraker
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_print_telemetry.nx nx_moonraker_telemetry_parse.nx nx_moonraker_telemetry_parse_t

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

main nx_print_telemetry_new sys_mmap nx_moonraker_parse_thermal mr_p_find mr_p_cstr_len mr_p_byte_eq mr_p_match_brace mr_p_extract_int_in_scope mr_p_find ↻ mr_p_cstr_len ↻ mr_p_parse_int_degrees cstr_len

structs

none

consts

none

functions

22func cstr_len(s: *u8) -> i64
called by 1: main
28func main() -> i64