nx_modbus_pred_maint_pipeline.nx
buildroot/runtime/consumers/nx_modbus_pred_maint_pipeline.nx
about
nx_modbus_pred_maint_pipeline.nx -- Modbus + pred-maint composer.
Wires the Modbus shim (commit eee5855b) -> nx_pred_maint_consumer
(commit 87dca0a0) -> nx_telemetry bus (commit 469f822f), proving
the consumer is PROTOCOL-AGNOSTIC: the same Welford / 3-sigma /
drift-extrapolation pipeline that catches OBD coolant-temp
anomalies also catches industrial-sensor anomalies via Modbus.
This commit is the structural proof that the substrate-side
value-add layer (consumer) reuses across the ยง5 INTEROPERABILITY_CHARTER
catalog families. Future protocol shims (CAN raw / J1939 / BLE /
Modbus extensions / etc) all reuse the SAME consumer with the
SAME telemetry bus.
Operator use case (W0+W1 tier per WORKLOAD_TARGETS.md):
Industrial pressure sensor on a Modbus RTU bus. Sensor reading
normally hovers around register-value 1500 (e.g., 15.00 bar via
centibar Q2 scaling). Slow drift toward 2500 indicates a
diaphragm wear-out failure mode. Pipeline detects the drift
4-7 days before the sensor crosses its DTC-equivalent
threshold; operator schedules planned maintenance vs unplanned
outage. Same value-add proposition as OBD pred-maint; same
substrate code path.
Status: SEED v0.1.0. 2026-05-27.
WINNER-TIER: WINNER-S CANDIDATE (preserved from pred-maint;
this commit doesn't add new claims, it ports the
S-CANDIDATE pred-maint claim to the industrial tier)
INCUMBENTS: same as pred-maint (no incumbent matches the
cross-protocol value-add); within Modbus specifically,
vendor SCADA tools (Ignition, Wonderware, ClearSCADA)
have trend-tracking but not substrate-integrated
prediction
PLAN: M-next: paired bench on real Modbus RTU sensor data
with known failure-mode corpus
EXEMPTION REASON: n/a; provisional pending hardware measurement
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_telemetry.nxnx_modbus_shim.nxnx_pred_maint_consumer.nx
imported by: nobody (leaf or entry point)
structs
| 61 | struct NxModbusPMP |
consts
| 49 | const NX_MODPMP_OK: i64 = 0 |
| 50 | const NX_MODPMP_BAD_INPUT: i64 = 400 |
| 51 | const NX_MODPMP_NOT_INITIALIZED: i64 = 401 |
| 52 | const NX_MODPMP_WRONG_UNIT_ID: i64 = 402 // response unit_id != configured |
| 53 | const NX_MODPMP_NO_REG_EVENT: i64 = 403 // parsed frame had no register-read event |
functions
| 79 | func nx_modpmp_init(p: *NxModbusPMP, |
| 104 | func nx_modpmp_register(p: *NxModbusPMP, |
| 125 | func nx_modpmp_build_rtu_poll(p: *NxModbusPMP, out: *u8, out_cap: i64) -> i64 calls 1: nx_modbus_rtu_build_read_holding |
| 136 | func nx_modpmp_build_tcp_poll(p: *NxModbusPMP, txn_id: i64, calls 1: nx_modbus_tcp_build_read_holding |
| 152 | func nx_modpmp_on_rtu_response(p: *NxModbusPMP, |
| 181 | func nx_modpmp_on_tcp_response(p: *NxModbusPMP, |