Implemented qt port + e2e
This commit is contained in:
@@ -32,17 +32,22 @@ cd Client/debugger && go build ./...
|
||||
|
||||
# ImGui desktop client (not a MARTe2 component; needs SDL2)
|
||||
cd Client/streamhub && cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build
|
||||
|
||||
# Qt desktop client (not a MARTe2 component; needs Qt5 or Qt6 Widgets + WebSockets)
|
||||
cd Client/streamhub-qt && cmake -B build && cmake --build build
|
||||
```
|
||||
|
||||
End-to-end demo scripts (build + launch full stack, see headers for ports/options): `./run_combined_test.sh`, `./run_streamhub.sh`.
|
||||
|
||||
**Streaming-chain E2E suite** (`Test/E2E/chain/`): `./run_chain_e2e.sh [--skip-build] [--only <id>] [--cpp-coverage]` drives the full chain per scenario (`scenarios.py`) — generates typed/shaped input + both cfgs, runs MARTe2+StreamHub, records via the Go `chain-client` (live/zoom/window/trigger), and validates the recorded waveform against an analytic/fed oracle (`validate_waveform.py`: fidelity gates correctness, sine shape-fit is a gross-sanity gate + tracked metric pending Phase-A timestamp calibration). It then runs the unit suites + coverage (`collect.py`: C++ GTest, Go, Python; `--cpp-coverage` does an instrumented `--coverage` rebuild, captures with lcov restricted to `Source/*`+`Test/*`, then restores the clean build), consolidates everything into `report_data.json` with per-field progression/regression vs the previous run and trend plots (`report_build.py`, history in `Build/x86-linux/E2E/chain/history.jsonl`), and compiles a Typst PDF (`E2E_Report.typ`). Python framework unit tests: `python3 -m unittest tests_py` (in `Test/E2E/chain/`).
|
||||
|
||||
Build output goes to `Build/x86-linux/` (shared libs per component, `.ex` executables).
|
||||
|
||||
## Architecture
|
||||
|
||||
Two independent data paths:
|
||||
|
||||
1. **Streaming path**: `UDPStreamer` DataSource serialises signals each RT cycle to UDPS binary packets (UDP 44500, unicast/multicast) → `StreamHub` (`Source/Applications/StreamHub/`, headless C++ app: ring buffers, LTTB decimation, trigger FSM) → WebSocket 8090 → browser (`Client/udpstreamer`, Go) or native ImGui client (`Client/streamhub`).
|
||||
1. **Streaming path**: `UDPStreamer` DataSource serialises signals each RT cycle to UDPS binary packets (UDP 44500, unicast/multicast) → `StreamHub` (`Source/Applications/StreamHub/`, headless C++ app: ring buffers, LTTB decimation, trigger FSM) → WebSocket 8090 → browser (`Client/udpstreamer`, Go), native ImGui client (`Client/streamhub`), or native Qt client (`Client/streamhub-qt`).
|
||||
2. **Debug path**: `DebugService` patches the `ClassRegistryDatabase` at `Initialise()` so subsequent `ConfigureApplication()` instantiates `DebugBrokerWrapper<T>` around all `MemoryMap*Broker` types — no application changes. RT hot path goes through `DebugServiceI` (abstract singleton in `DebugServiceI.h`) for forcing/tracing/breakpoints. Exposes TCP 8080 (text commands), UDP 8081 (trace telemetry), works with `TcpLogger` on 8082. Web UI: `Client/debugger` (Go).
|
||||
|
||||
**Shared wire format**: `Common/UDP/UDPSProtocol.h` defines the UDPS binary protocol (17-byte packed header, 136-byte signal descriptors, little-endian). It is deliberately MARTe2-free so it's shared by C++ producers (`UDPStreamer`, `DebugService`), the C++ consumer (`Source/Components/Interfaces/UDPStream/UDPSClient`), and the Go decoder (`Common/Client/go/udpsprotocol`). Changes to the protocol must be mirrored across all of these, plus the JS client parsers.
|
||||
@@ -57,3 +62,5 @@ Two independent data paths:
|
||||
- `FastPollingMutexSem` on RT hot paths (never OS mutexes).
|
||||
- Each component dir has `Makefile.gcc` (wrapper), `Makefile.inc` (sources/includes), and `depends.x86-linux`/`dependsRaw.x86-linux` (generated dependency files).
|
||||
- EUPL v1.1 license headers on C++ sources.
|
||||
|
||||
**Qt client** (`Client/streamhub-qt/`): native Widgets oscilloscope, feature/UX-equivalent to the ImGui client, speaking the identical StreamHub WebSocket protocol. CMake autodetects Qt6 (preferred) or Qt5 (`find_package(QT NAMES Qt6 Qt5 ...)` then `Qt${QT_VERSION_MAJOR}::` targets) for old-Linux back-compat. It reuses `../streamhub/Protocol.{h,cpp}` and `SignalBuffer.h` verbatim (framework-free C++17); those structs have members named `signals`, which collide with Qt's `signals`/`slots`/`emit` macros, so the build sets `QT_NO_KEYWORDS` and all Qt classes use `Q_SIGNALS:`/`Q_SLOTS:`/`Q_EMIT`. Single GUI thread (QWebSocket signals arrive on the GUI thread, no locks); a 60 Hz QTimer drives repaint. Plotting is custom QPainter (no QtCharts/QCustomPlot) for ImPlot parity and zero extra deps. Run: `./build/StreamHubQtClient --host HOST --port 8090` (long `--` options; single-dash `-host` is misparsed as clustered short flags).
|
||||
|
||||
Reference in New Issue
Block a user