code wiki / (root) / nx_print_response.nx

nx_print_response.nx

buildroot/runtime/nx_print_response.nx

4429 B112 linesdepth 3pulls 4 transitivereach 3 importersview sourcekind librarytopic print
docsdependenciesstructsconstsfunctions

about

nx_print_response.nx -- map runtime-monitor issue verdicts to corrective actions on the printer. When the runtime monitor fires an NX_RT_ISSUE_*, the operator integration needs to actually DO something on the printer: pause, hard-stop, notify-only. This brick: 1. Maps each issue kind to a recommended response class (operator can override per-deployment). 2. Builds the HTTP wire bytes for the canonical Moonraker `/printer/print/pause` request, ready for nx_mr_post_ipv4 to send. Substrate stays pure: this function produces bytes, doesn't open sockets. Operator decides when/whether to actually send the wire bytes. license_tier: ORIGINAL

dependencies 3 imports · 3 importers

nx_syscalls.nx nx_moonraker_client.nx nx_print_runtime_monitor.nx nx_print_response.nx nx_moonraker_loop_e2e_test.nx nx_print_loop_e2e_test.nx nx_print_response_test.nx

imports: nx_syscalls.nxnx_moonraker_client.nxnx_print_runtime_monitor.nx

imported by: nx_moonraker_loop_e2e_test.nxnx_print_loop_e2e_test.nxnx_print_response_test.nx

structs

none

consts

26const NX_PRINT_RESPONSE_NONE: i64 = 0
27const NX_PRINT_RESPONSE_NOTIFY: i64 = 1 // log/page, do not pause
28const NX_PRINT_RESPONSE_PAUSE: i64 = 2 // PAUSE; operator inspects + resumes
29const NX_PRINT_RESPONSE_HARD_STOP: i64 = 3 // emergency stop (cancel; not resumable)
30const NX_PRINT_RESPONSE_N: i64 = 4

functions

36func nx_print_response_for_issue(kind: i64) -> i64
54func nx_print_build_pause_request(
73func nx_print_build_cancel_request(
94func nx_print_build_response_for_issue(