|
| 1 | +# M4 — ARStack Injector ↔ DigSubAnalyzer interoperability acceptance |
| 2 | + |
| 3 | +Date: 17 October 2026 |
| 4 | +Repositories: `masarray/DigSubAnalyzer` (consumer, **receive-only**) and |
| 5 | +`masarray/arstack61850` (ESP32-P4 SMV Injector). |
| 6 | + |
| 7 | +## Three different evidence levels |
| 8 | + |
| 9 | +1. **Software replay gate (automated):** anonymous synthetic PCAPs and SCL-intent |
| 10 | + fixtures exercise the **same production parser** used by live reception. |
| 11 | + This demonstrates decoder behavior but not a physical process bus. |
| 12 | +2. **Independent observed-wire gate (operator bench):** capture on an independent |
| 13 | + TAP or correctly configured SPAN port that preserves multicast and 802.1Q |
| 14 | + tags. Compare observed frames with the actually deployed SCL profile. |
| 15 | +3. **Device/IED gate (external equipment):** verify subscriber/IED acquisition, |
| 16 | + quality, synchronization and sustained operation with equipment-approved |
| 17 | + tools. DigSubAnalyzer alone cannot certify relay subscription, functional |
| 18 | + safety, protection action or hardware PTP synchronization. |
| 19 | + |
| 20 | +The M4 software utility intentionally reports **WIRE_FIELDS_MATCH** instead |
| 21 | +of “compliant”, “certified”, “locked” or “accepted by IED”. |
| 22 | + |
| 23 | +## Run the offline acceptance inspector |
| 24 | + |
| 25 | +Windows with .NET 8 SDK installed: |
| 26 | + |
| 27 | +```powershell |
| 28 | +dotnet build .\ProcessBusSuite.sln -c Release |
| 29 | +dotnet test .\ProcessBusSuite.sln -c Release --no-build --filter Category=M4Interop |
| 30 | +dotnet run --project .\tools\ProcessBus.InteropCli -c Release -- --pcap C:\lab\arstack-canonical.pcap --scl C:\lab\current-profile.scd --max-frames 20000000 --json C:\lab\interop-report.json |
| 31 | +``` |
| 32 | + |
| 33 | +The tool supports classic Ethernet PCAP 2.4 (microsecond/nanosecond). If the |
| 34 | +capture application creates PCAPNG, export/copy the packet recording as |
| 35 | +**classic PCAP** with full Ethernet headers before inspecting it. |
| 36 | + |
| 37 | +`--scl` is optional for wire fingerprint only; mandatory for automated |
| 38 | +expected-vs-observed verdicts. The CLI prints a short operator summary, |
| 39 | +keeps raw details in optional local JSON, and returns: |
| 40 | + |
| 41 | +- **0**: screening executed and no specified SCL comparison failed; **not** |
| 42 | + certification and **not** proof of capture-path visibility. For a capture |
| 43 | + without SCL, there are no configured fields to validate. |
| 44 | +- **3**: observed/configured mismatch, unresolved SCL identity or expected |
| 45 | + stream not observed; this includes **MIRROR_ONLY**. |
| 46 | +- **2**: malformed arguments, unreadable/unsupported PCAP, or no useful |
| 47 | + successfully decoded traffic. |
| 48 | + |
| 49 | +Bench files, identities, MAC addresses, PCAP, JSON logs and original SCL stay |
| 50 | +on the authorized **local machine**; do not push them to GitHub. |
| 51 | + |
| 52 | +### Verdicts |
| 53 | + |
| 54 | +| Verdict | Interpretation | Operator action | |
| 55 | +| --- | --- | --- | |
| 56 | +| `WIRE_FIELDS_MATCH` | Visible fields match configured SCL stream | Verify TAP/SPAN provenance and independent IED behavior | |
| 57 | +| `MIRROR_ONLY` | Only ARStack diagnostic broadcast identified | Fix capture visibility; do not infer canonical multicast/VLAN | |
| 58 | +| `NOT_OBSERVED` | Configured svID absent | Check VLAN membership, multicast filtering, SPAN/TAP and NIC | |
| 59 | +| `CONFLICT` | APPID/MAC/VID/PCP/confRev/nofASDU differs | Inspect deployed SCL and exact wire identity; do not normalize away | |
| 60 | +| `INCOMPLETE_INTENT` | Some observed fields match but SCL lacks authority | Load the deployed full SCL/profile; do not auto-fill defaults | |
| 61 | +| `UNRESOLVED` | No trustworthy SCL svID | Correct/resolve engineering intent before claiming match | |
| 62 | + |
| 63 | +Capture **VLAN absence on a Windows USB-NIC is not proof of untagged wire TX**. |
| 64 | +A mirrored `AR_DIAG_SV1`, APPID `0x4F01`, broadcast/untagged stream is diagnostic |
| 65 | +evidence only, always separate from the canonical SCL stream. |
| 66 | + |
| 67 | +## Physical bench procedure |
| 68 | + |
| 69 | +1. Record ARStack Injector firmware build/manifest, selected immutable profile, |
| 70 | + source identity, configured DataSet order, 4I+4V payload authority, APPID, |
| 71 | + multicast MAC, VLAN ID/PCP, confRev, nofASDU, sample cadence, smpCnt modulus |
| 72 | + policy and intended `smpSynch`. The SCL is **configured intent**, not |
| 73 | + automatically the deployed firmware identity. |
| 74 | +2. Connect a trusted independent TAP or SPAN that demonstrably retains VLAN |
| 75 | + tags, **without trusting a diagnostic mirror as a canonical substitute**. |
| 76 | + Capture timestamp source, precision, NIC/driver version and driver drops. |
| 77 | +3. With an ARStack `LAB_SOURCE` release-candidate profile, observe L2 PTPv2, |
| 78 | + domain 0, Announce ~1/s, two-step Sync ~4/s, matching Follow_Up and peer |
| 79 | + delay response **when requested**. clockClass 248 and clockAccuracy Unknown |
| 80 | + do **not** constitute external UTC traceability; AUTO `smpSynch=0` remains |
| 81 | + truthful for undisciplined source mode. |
| 82 | +4. With the same capture path, observe independent canonical SV and diagnostic |
| 83 | + mirror identities and intentionally verify **different** APPID, destination |
| 84 | + MAC, VLAN visibility and counters. Check `nofASDU`, channel layout, |
| 85 | + instMag/q quality and `smpCnt` continuity for the selected profile. |
| 86 | +5. Test nominal **4000 and 4800 samples/s**, including appropriate |
| 87 | + profile-validated counter rollover, TEST/bad-quality stimuli, stream restart |
| 88 | + and multi-source isolation. A PCAP's host-arrival jitter is |
| 89 | + screening only, not on-wire timestamp quality. |
| 90 | +6. Run mixed SV/PTP for at least **60 minutes** per acceptance scenario. |
| 91 | + A 4000 sample/s stream produces ~14.4m SV frames in 60 minutes if |
| 92 | + `nofASDU=1`; canonical plus mirror doubles the SV frames. Ensure |
| 93 | + `--max-frames` covers all traffic, or split recordings into explicitly |
| 94 | + indexed windows and inspect each. |
| 95 | +7. Record capture-driver counters alongside publisher firmware telemetry |
| 96 | + (TX failure, missed slots and timestamp quality). A zero sequence-gap result |
| 97 | + on the reader does **not** imply an independent NIC dropped zero frames. |
| 98 | +8. Independently verify receiving IED/subscriber behavior. A matched stream |
| 99 | + in DigSubAnalyzer is not proof the IED subscribed or acted on samples. |
| 100 | + |
| 101 | +## Performance and UX acceptance |
| 102 | + |
| 103 | +While the live analyzer displays mixed traffic, record every 5 seconds: |
| 104 | + |
| 105 | +```powershell |
| 106 | +.\\scripts\\measure-m4-bench.ps1 -DurationMinutes 60 -IntervalSeconds 5 -OutputPath C:\\lab\\m4-local-metrics.csv |
| 107 | +``` |
| 108 | + |
| 109 | +This is a local process CPU/working-set sampler, **not** a substitute for |
| 110 | +`dotnet-counters`, native Npcap driver statistics or hardware wire timestamps. |
| 111 | + |
| 112 | + |
| 113 | +- CPU utilization and process memory/working set; |
| 114 | +- .NET allocation rate and GC collections (`dotnet-counters` or equivalent); |
| 115 | +- NIC driver/interface drops where supported; |
| 116 | +- SV sample/counter anomalies, rejected frames and identity counts; |
| 117 | +- selection-to-coherent-snapshot latency and scope redraw responsiveness. |
| 118 | + |
| 119 | +Inspect the main workspace for these user-facing invariants: |
| 120 | + |
| 121 | +- changing selected SV publisher never carries waveform, RMS, phasor or |
| 122 | + engineering scaling from the previous publisher; |
| 123 | +- TEST and invalid quality are labeled; invalid data never appears as |
| 124 | + valid calibrated measurements; |
| 125 | +- canonical and mirror traffic remain distinct; |
| 126 | +- PTP observation, pairing, domain and freshness are not misrepresented as |
| 127 | + servo LOCKED; |
| 128 | +- the one-line status remains calm, and detailed raw evidence lives under |
| 129 | + Timing/Diagnostics/Advanced, not in an overwhelming initial screen. |
| 130 | + |
| 131 | +There is no synthetic CPU/heap reduction percentage quoted here. Measure |
| 132 | +**before/after** on the same hardware/NIC/driver/traffic scenario and record |
| 133 | +absolute values and drop counters. Without such measurements, resource |
| 134 | +optimization is implementation-level, not performance-certified. |
| 135 | + |
| 136 | +## Release gate and signed-off evidence |
| 137 | + |
| 138 | +The engineering reviewer should retain, locally or in an authorized evidence |
| 139 | +store: sanitizer-approved capture checksum, SCL version, firmware manifest, |
| 140 | +analyzer commit/build, report JSON, port/TAP diagram and VLAN settings, |
| 141 | +NIC/drop counters, 60-minute performance measurements and IED independent |
| 142 | +results. Publish only sanitized summaries. |
| 143 | + |
| 144 | +M4 cannot be called **physically complete** without this independently |
| 145 | +collected evidence. The automated replay suite is suitable for a software |
| 146 | +checkpoint and for detecting compatibility regressions. |
0 commit comments