code wiki / (root) / nx_print_telemetry.nx

nx_print_telemetry.nx

buildroot/runtime/nx_print_telemetry.nx

5135 B149 linesdepth 3pulls 3 transitivereach 6 importersview sourcekind librarytopic print
docsdependenciesstructsconstsfunctions

about

nx_print_telemetry.nx -- unified telemetry-event bridge for the print runtime monitor. Lets operator submit ONE event struct per telemetry tick (from Moonraker JSON, serial-port read, fake source for testing, etc.) and have it fanned into all 5 step* surfaces on the runtime monitor. has_* validity masks let the operator populate only the fields they actually have (e.g. Qidi without chamber heater leaves has_thermal = 1 but chamber_setpoint_c = -1; an MCU without mcu_position scaling leaves has_shift = 0). Pump returns the FIRST non-NONE verdict in priority order: 1. LAYER_SHIFT (most critical mid-print) 2. Z_BACKWARD (via step(), takes precedence over STUCK) 3. STUCK_LAYER (via step()) 4. FLOW_ANOMALY (via step()) 5. EXTRUDER_RUNAWAY (via step()) 6. BED_TEMP_DROP (via step_thermal()) 7. HOTEND_TEMP_DROP (via step_thermal()) 8. CHAMBER_TEMP_DROP (via step_thermal()) 9. FILAMENT_RUNOUT (via step_runout()) Note: step* surfaces independently increment n_issues_total, so if multiple kinds fire on one tick, the count tracks every fire even though the returned verdict is just the first one. license_tier: ORIGINAL

dependencies 2 imports · 5 importers

nx_syscalls.nx nx_print_runtime_monitor.nx nx_print_telemetry.nx nx_moonraker_loop_e2e_test.nx nx_moonraker_telemetry_parse.nx nx_moonraker_telemetry_parse_test. nx_print_loop_e2e_test.nx nx_print_telemetry_test.nx

imports: nx_syscalls.nxnx_print_runtime_monitor.nx

imported by: nx_moonraker_loop_e2e_test.nxnx_moonraker_telemetry_parse.nxnx_moonraker_telemetry_parse_test.nxnx_print_loop_e2e_test.nxnx_print_telemetry_test.nx

structs

34struct NxPrintTelemetry

consts

66const NX_PRINT_TELEMETRY_BYTES: i64 = 152 // 19 fields × 8

functions

70func nx_print_telemetry_new() -> *NxPrintTelemetry
called by 4: mainmainmainmain calls 1: sys_mmap
98func nx_runtime_monitor_pump_telemetry(