code wiki / _hdl_build / nx_iot_ctl.nx

nx_iot_ctl.nx

buildroot/runtime/_hdl_build/nx_iot_ctl.nx

4082 B117 linesdepth 8pulls 15 transitivereach 0 importersview sourcekind tooltopic iot
docsdependenciesstructsconstsfunctions

about

nx_iot_ctl.nx -- sovereign HOME-ELECTRONICS identification ORGAN (CLI + MCP tool). The "home electronics" half of the operator's iot ask, as a first-class organ rather than a bolt-on to the printer tool (rule 9: one responsibility each -- nx_printer_ctl owns the printer, this owns the house). Verbs (JSON on stdout = the MCP/API/agent interchange): nx_iot_ctl services -- emit the loaded service manifest (no network) nx_iot_ctl scan <a.b.c> -- IoT-aware /24 sweep: kind + vendor per host nx_iot_ctl probe <ip> [port] -- READ-ONLY active identify (Kasa get_sysinfo) nx_iot_ctl contract -- security / never-brick contract (no network) NEVER-BRICK (rule 26): there is NO write verb. The verb map above is the entire reachable surface; no argument can steer this organ onto a path that mutates a device. Proven mechanically by nx_iot_ctl_gate. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_iot_ctl_lib.nx nx_iot_ctl.nx

imports: nx_syscalls.nxnx_iot_ctl_lib.nx

imported by: nobody (leaf or entry point)

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

main ic_usage ic_werr sys_write sys_exit iotc_verb_id iotc_streq iotm_new sys_mmap iotm_load sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close iotm_parse iotc_is_space iotc_word_num iotc_word_eq iotc_vendor_of iotc_word_eq ↻ iotc_kind_of iotc_word_eq ↻ sys_mmap ↻ iotm_add iotm_row iotm_label iotm_row ↻ iotm_defaults iotm_add ↻ iotm_count sys_mmap ↻ iotc_emit_services iotc_cat iotm_count ↻ iotc_catn sys_mmap ↻ iotm_port

structs

none

consts

21const IC_STDERR: i64 = 2
22const IC_EXIT_USAGE: i64 = 2

functions

24func ic_werr(s: *u8) -> i64
called by 2: ic_usagemain calls 1: sys_write
30func ic_usage() -> i64
called by 1: main calls 1: ic_werr
35func main(argc: i64, argv: *i64) -> i64