Skip to content

Add native Qt premium SMV Injector with direct SCL profile control - #57

Merged
masarray merged 24 commits into
mainfrom
agent/smv-injector-qt-premium
Aug 11, 2026
Merged

masarray merged 24 commits into
mainfrom
agent/smv-injector-qt-premium

Conversation

@masarray

Copy link
Copy Markdown
Owner

Purpose

Introduce the first native Qt 6 / C++ / QML SMV Injector desktop surface after the SCL-driven injector flow from #54 was merged to main.

This is a Draft evaluation PR. It does not replace/merge the existing web surface until the native workflow, visual quality, and hardware behavior are reviewed.

Architecture

The desktop app does not duplicate IEC 61850 semantics in QML/JavaScript:

SCL / CID / SCD / IID
  -> ARIEC61850 SclParser
  -> SvPublisherProfileCompiler
  -> shared ESP32-P4 support classifier
  -> Qt SclProfileModel
  -> Qt/QML operator workflow
  -> DeviceController / QSerialPort
  -> current ESP32-P4 PROFILE + live-control protocol

The ESP32-P4 remains the deterministic realtime Sampled Values publisher. The PC stays the engineering/control plane.

Latest SMV functionality carried into Qt

  • native SCL/CID/SCD/IID import through the repository C++ SCL parser;
  • resolved SampledValueControl stream selection;
  • Class A / B / C compatibility state;
  • explicit Class-B sample-counter modulus confirmation;
  • shared fail-closed ESP32-P4 deployment support classification;
  • explicit current counts/A and voltage counts/V engineering scaling;
  • STOP-only immutable profile deployment;
  • svID, DataSet, destination MAC, APPID, VLAN/PCP, confRev, publisher rate, counter modulus and supported ASDU-field flags;
  • native Qt SerialPort connection at 115200 8N1;
  • exact current firmware commands for PROFILE, SET, FREQ, ENABLE, QUALITY, ZERO, START, STOP and SHOW;
  • runtime fps / missed / TX-failure / signal-generation telemetry;
  • 4I + 4V keyboard-first injection matrices;
  • 3-phase linkage;
  • persistent generated phasor + waveform preview;
  • serial diagnostics surface;
  • profile-dirty / armed gating so imported identity/layout changes must be deployed before Start.

Shared deployment truth

This PR extracts the current ESP32-P4 4I+4V deployment boundary into esp32p4_profile_support.hpp and reuses it from both the existing profile inspector and the Qt model. The GUI therefore does not maintain a second copy of the device-support rule.

The current gate remains intentionally bounded to the physically proven one-ASDU, 16-leaf INT32+Quality, 64-byte SmpPerSec profile. Broader valid SCL structures may parse successfully while still reporting unsupported-layout.

UX direction

The native workspace follows the approved fast-workflow direction rather than reproducing the browser dashboard:

  • calm graphite instrument layout;
  • Current and Voltage as the primary side-by-side matrices;
  • arrow-key navigation between channels and Magnitude/Phase fields;
  • whole-value selection on focus;
  • fixed Start/Stop/Deploy actions;
  • SCL/profile data stays visible but secondary to injection;
  • phasor and waveform remain persistent;
  • no browser/local-web-server dependency in the desktop app.

The initial visualization uses lightweight Qt Quick Canvas. After workflow/visual approval, it can be promoted to custom QQuickItem/scene-graph rendering without changing the engineering model.

Visualization truthfulness

Phasor and waveform are explicitly generated setpoint previews. They are not independent Ethernet on-wire proof. smpSynch remains governed by the embedded timing/synchronization truth and is not inferred by the GUI.

Validation completed on this PR branch

Hosted ARStack Studio Qt CI now passes:

  • Qt 6 standalone configure;
  • ARIEC61850 C++ core build;
  • Qt/QML native app build;
  • Qt SerialPort linkage;
  • QML cache/type generation;
  • headless Qt Quick application launch smoke;
  • retained configure/build/launch logs.

Hardware validation still required

Before treating the desktop GUI as a proven replacement for the bench surface, retain physical evidence for:

  1. native serial connect + SHOW / PROFILE SHOW;
  2. 4000 fps START/STOP and live SET/FREQ/ENABLE/QUALITY;
  3. SCL Class-A PROFILE commit/armed confirmation;
  4. real 4800 fps profile deployment and expected counter cycle;
  5. live setpoint changes without unintended smpCnt restart;
  6. generated-vs-on-wire identity comparison using a trusted capture path.

See apps/arstack_studio/README.md for the build/run and acceptance boundary.

Scope

  • native desktop layer + shared device-support classification
  • no change to ESP32 realtime waveform timing
  • no claim of independent canonical on-wire verification
  • Draft only; no merge requested until operator review

@masarray
masarray merged commit d041391 into main Aug 11, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant