code wiki / (root) / nx_printer_health_test.nx

nx_printer_health_test.nx

buildroot/runtime/nx_printer_health_test.nx

6024 B106 linesdepth 2pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic printer
docsdependenciesstructsconstsfunctions

about

nx_printer_health_test.nx -- gate for the honest-status / anti-silent-failure model (R1). Builds real IPP responses with the codec and asserts the health verdict for each, with unique exit codes per invariant. This is the proof that we surface the truth a Brother UI hides. 1x idle + accepting + reasons='none' -> CAN_PRINT 2x STOPPED + media-jam(bare) + marker-supply-low-warning -> BLOCKED, worst=ERROR, 2 reasons 3x idle + marker-supply-low-warning + toner-low-report -> DEGRADED, worst=WARNING 4x idle but printer-is-accepting-jobs=false -> BLOCKED 7x per-reason severity classifier (suffix rules + bare/stopped vs bare/idle) 8x malformed reasons (value-length overrun) -> UNKNOWN (never a false "ready") expect_exit: 0 license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_ipp_codec.nx nx_printer_health.nx nx_printer_health_test.nx

imports: nx_syscalls.nxnx_ipp_codec.nxnx_printer_health.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap nx_ipp_begin nx_ipp_put_u16 nx_ipp_put_u32 nx_ipp_group nx_ipp_attr_int nx_ipp_put_u16 ↻ nx_ipp_memcpy nx_ipp_put_u32 ↻ nx_ipp_strlen nx_ipp_attr_bool nx_ipp_put_u16 ↻ nx_ipp_memcpy ↻ nx_ipp_attr nx_ipp_put_u16 ↻ nx_ipp_memcpy ↻ nx_ipp_end nx_printer_diagnose nx_ipp_get_enum nx_ipp_find nx_ipp_strlen ↻ nx_ipp_get_u16 nx_ipp_name_eq nx_ipp_get_u32 nx_ph_worst_reason_severit nx_ipp_get_u16 ↻ nx_ipp_name_eq ↻ nx_ph_reason_severity nx_ipp_name_eq ↻ nx_ph_ends_with nx_ipp_strlen ↻ nx_ipp_name_eq ↻ nx_ph_accepting nx_ipp_find ↻ nx_printer_can_print nx_ipp_attr_add nx_ipp_put_u16 ↻ nx_ipp_memcpy ↻ nx_ph_reason_severity ↻

structs

none

consts

none

functions

20func t_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main calls 1: sys_write
22func main() -> i64