diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..6f4d1ca --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,315 @@ +# AGENTS.md + +Guide for agents working in the MARTe2 Integrated Components repository. Read +`ARCHITECTURE.md` and `CLAUDE.md` for deeper detail; this file focuses on +non-obvious knowledge, commands, and conventions that are not self-evident from +a single file read. + +--- + +## Repository at a glance + +MARTe2 component library with two independent real-time data paths: + +1. **Streaming path** — `UDPStreamer` DataSource (serialises signals to UDPS + binary packets on UDP 44500) → `StreamHub` (headless C++ hub: ring buffers, + LTTB decimation, trigger FSM, history writer) → WebSocket 8090 → clients + (browser SPA, native ImGui, native Qt). +2. **Debug path** — `DebugService` Interface patches `ClassRegistryDatabase` at + `Initialise()` so `ConfigureApplication()` wraps all `MemoryMap*Broker` types + with `DebugBrokerWrapper`. Zero application code changes. Exposes TCP 8080 + (text commands), UDP 8081 (trace telemetry), TCP 8082 (`TcpLogger`). + +Key shared artefact: `Common/UDP/UDPSProtocol.h` — the UDPS binary wire format +(17-byte packed header, 136-byte signal descriptors, little-endian). It is +deliberately MARTe2-free and is mirrored across **four** codebases that must stay +in sync: C++ producers (`UDPStreamer`, `DebugService`), C++ consumer +(`Source/Components/Interfaces/UDPStream/UDPSClient`), Go decoder +(`Common/Client/go/udpsprotocol`), and the JS client parsers. Any protocol +change must be mirrored in all of them. + +StreamHub WebSocket protocol: JSON text frames for commands/events, binary +frames for data pushes (spec in `ARCHITECTURE.md` §6). The Go hub +(`Client/udpstreamer`) and the C++ StreamHub implement the identical protocol; +browser JS, ImGui, and Qt clients must stay compatible with both. + +--- + +## Environment setup (do this first, always) + +`source env.sh` is **required** before building *or* running anything. It sets: + +- `MARTe2_DIR` (default `~/workspace/MARTe2`) and `MARTe2_Components_DIR` + (default `~/workspace/MARTe2-components`) — external dependencies, not in + this repo. Edit `env.sh` if your MARTe2 install lives elsewhere. +- `TARGET=x86-linux` +- `LD_LIBRARY_PATH` — prepends MARTe2 Core, MARTe2-components (LinuxTimer, + FileDataSource), and this repo's built `.so`s (UDPStreamer, SineArrayGAM, + TimeArrayGAM, DebugService, TCPLogger). + +Without sourcing `env.sh`, builds fail (can't find `MakeDefaults`) and binaries +fail to load shared libs. The E2E scripts source it themselves, but a bare +`make` or `./MainGTest.ex` from a fresh shell will not. + +--- + +## Build commands + +All C++ builds use the MARTe2 `Makefile.gcc` wrapper system. There is one +top-level `Makefile.gcc` and one per component directory. `TARGET` defaults to +`x86-linux`; pass `TARGET=x86-linux` explicitly when invoking `make -C` from +elsewhere. + +```bash +source env.sh + +make -f Makefile.gcc core # all C++ MARTe2 components (UDPStreamer, GAMs, DebugService, TCPLogger, UDPStream) +make -f Makefile.gcc apps # StreamHub standalone app +make -f Makefile.gcc test # build GTest + Integration test binaries +make -f Makefile.gcc clean +make -f Makefile.gcc # = all: core apps test + +# Build a single component (each component dir has its own Makefile.gcc): +make -C Source/Components/DataSources/UDPStreamer -f Makefile.gcc +make -C Source/Applications/StreamHub -f Makefile.gcc +``` + +Build output goes to `Build/x86-linux/` — shared libs under +`Build/x86-linux/Components/<...>/`, the StreamHub executable at +`Build/x86-linux/StreamHub/StreamHub.ex`, test binaries under +`Build/x86-linux/GTest/` and `Build/x86-linux/Test/Integration/`. + +`compile_commands.json` is generated at the repo root (gitignored) for LSP / +clangd. The CMake-based clients (ImGui, Qt) also export it into their `build/`. + +### Non-MARTe2 clients (separate build systems, no env.sh needed) + +```bash +# Go clients (UDPS web client, debug client, E2E chain-client) +cd Common/Client/go && go build ./... +cd Client/debugger && go build ./... +cd Client/udpstreamer && go build ./... # or: cd Client/webui && go build +cd Test/E2E/chain/client && go build ./... # chain-client (E2E driver) + its tests + +# ImGui desktop client (needs SDL2; fetches Dear ImGui + ImPlot via FetchContent) +cd Client/streamhub && cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build + +# Qt desktop client (Qt5 or Qt6 Widgets + WebSockets; autodetects, prefers Qt6) +cd Client/streamhub-qt && cmake -B build && cmake --build build +``` + +--- + +## Run / test commands + +### Unit & integration tests (C++) + +```bash +./Build/x86-linux/GTest/MainGTest.ex # UDPStreamer unit tests +./Build/x86-linux/GTest/MainGTest.ex --gtest_filter='Name*' # single test +./Build/x86-linux/Test/Integration/Integration/IntegrationTests.ex # DebugService integration tests +``` + +### Go tests + +```bash +cd Test/E2E/chain/client && go test ./... +``` + +### Python framework tests (E2E framework logic, no live stack needed) + +```bash +cd Test/E2E/chain && python3 -m unittest tests_py +``` + +### E2E / demo scripts (build + launch the full stack) + +| Script | What it does | +|---|---| +| `./run_streamhub.sh` | Launch MARTe2 app (UDPStreamer) + StreamHub, optionally web UI (`-w`) and ImGui client (`-g`). Ports documented in its header. | +| `./run_combined_test.sh` | Combined streaming + debug integration test. `-d` auto-starts the debugger web UI. | +| `./run_e2e_test.sh` | Older standalone StreamHub E2E (`-s` skips build). | +| `./Test/E2E/chain/run_chain_e2e.sh` | **Streaming-chain E2E suite**: per-scenario generates data + cfgs, runs MARTe2+StreamHub, drives the Go `chain-client` (live/zoom/window/trigger), validates the recorded waveform against an analytic/fed oracle, runs unit suites + coverage, builds a Typst PDF report. Flags: `--skip-build`, `--only `, `--cpp-coverage`, `--pdf-only`, `--stress`. | +| `./Test/E2E/chain/run_stress.sh` | **Capacity/stress harness**: sweeps one load axis at a time (signal size/count, subscriber fan-out, source count, WS-client count, zoom rate), gates on survival+liveness (hard) and RSS+zoom-p95 latency (soft). Flags: `--skip-build`, `--only `, `--axis `. | + +The E2E suite produces `Build/x86-linux/E2E/chain/` artifacts: `report_data.json`, +`history.jsonl` (per-run headline metrics for trend/regression tracking), +`trend_*.png` plots, and `E2E_Report.pdf` (compiled from `E2E_Report.typ` via +`typst`). `--cpp-coverage` triggers an instrumented `--coverage` rebuild, captures +with `lcov` (restricted to `Source/*` + `Test/*`), then restores a clean build. + +--- + +## Code organization + +``` +Common/ + UDP/UDPSProtocol.h # shared UDPS binary protocol (header-only, MARTe2-free) + Client/go/ # Go packages: udpsprotocol (decoder), wshub (WS hub client) +Source/ + Components/ # MARTe2 components — NO STL allowed here + DataSources/UDPStreamer/ # real-time UDP signal streaming DataSource + DataSources/UDPStreamerClient/ # (MARTe2-side UDPS client DataSource) + GAMs/SineArrayGAM/ # sine-wave array generator GAM + GAMs/TimeArrayGAM/ # time-reference array GAM + Interfaces/DebugService/ # tracing/forcing/breakpoint Interface (registry-patched brokers) + Interfaces/TCPLogger/ # REPORT_ERROR → TCP forwarder (LoggerConsumerI) + Interfaces/UDPStream/ # UDPSClient/UDPSServer (C++ consumer/producer of UDPS) + Applications/StreamHub/ # headless C++ hub app (links MARTe2 core but follows MARTe2 style) +Client/ + debugger/ # Go web client for DebugService (browser UI in static/) + udpstreamer/ # Go web server + static SPA for UDPStreamer (legacy direct-UDP path) + webui/ # Go StreamHub WebSocket web UI (newer, hub-based) + streamhub/ # native ImGui desktop client (SDL2 + OpenGL + ImPlot, C++17, no MARTe2) + streamhub-qt/ # native Qt Widgets desktop client (C++17, Qt5/Qt6, no MARTe2) +Test/ + GTest/ # GTest harness (MainGTest.cpp) for UDPStreamer unit tests + Integration/ # DebugService integration tests (link against DebugService .so) + Components/DataSources/UDPStreamer/ # UDPStreamer unit test sources + Configurations/ # MARTe2 .cfg files for tests and demos + E2E/ + chain/ # streaming-chain E2E + stress suite (Python orchestrator + Go client) + datasources/ recorder/ streamhub/ # older per-component E2E scripts +Docs/ # per-component reference docs (Protocol, UDPStreamer, StreamHub-*, DebugService, ...) +docs/superpowers/{specs,plans}/ # design specs + implementation plans (dated) +ARCHITECTURE.md # full architecture (data flow diagrams, protocol tables, WS protocol) +``` + +### Component layout convention + +Every MARTe2 component directory contains: + +- `Makefile.gcc` — thin wrapper (`TARGET = x86-linux` then `include Makefile.inc`). +- `Makefile.inc` — real build definition: `OBJSX`, `PACKAGE`, `INCLUDES`, + `LIBRARIES`, includes `$(MARTe2_DIR)/MakeDefaults/MakeStdLibDefs.$(TARGET)` + and `MakeStdLibRules.$(TARGET)`, and `depends.$(TARGET)`. +- `depends.x86-linux` / `dependsRaw.x86-linux` — generated header dependency + files (committed; regenerated by the build). Do not hand-edit. +- `.{h,cpp}` — the implementation, with `CLASS_REGISTER(ClassName, + "1.0")` at the bottom of the `.cpp` (MARTe2 class-registration macro). + +To add a new component, copy an existing one and adapt `Makefile.inc`'s +`OBJSX` / `PACKAGE` / `INCLUDES` / `LIBRARIES`. + +--- + +## Conventions and gotchas + +### No STL in MARTe2 components + +`Source/Components/**` must not use the C++ standard library. Use MARTe2 types: +`StreamString` (not `std::string`), `FastPollingMutexSem` (not `std::mutex`), +fixed arrays / `StaticList` (not `std::vector`), MARTe2 error macros +(`REPORT_ERROR`, `REPORT_ERROR_STATIC`) instead of exceptions. Includes come +from `$(MARTe2_DIR)/Source/Core/...` (BareMetal, Scheduler, FileSystem). + +`Source/Applications/StreamHub/` links MARTe2 core and follows the same +no-STL-on-RT-paths style, but is a standalone app (not a loadable component). + +STL / C++17 is **fine** in `Client/streamhub/` and `Client/streamhub-qt/` +(framework-free C++17, no MARTe2 dependency). + +### RT hot-path mutex rule + +Use `FastPollingMutexSem` on real-time hot paths — never OS mutexes +(`pthread_mutex`, `std::mutex`). The RT cycle must not block on the scheduler. + +### Protocol change checklist + +Changing `Common/UDP/UDPSProtocol.h` (or the Go mirror) requires mirroring +across all four consumers listed in §1, plus the JS client parsers in +`Client/udpstreamer/static/`. The Go decoder lives in +`Common/Client/go/udpsprotocol/protocol.go` and re-declares the constants +(`HeaderSize`, `SigDescSize`, packet types, quant types, time modes) — it does +**not** include the C header. + +### Qt client: `QT_NO_KEYWORDS` + +`Client/streamhub-qt/` reuses `../streamhub/Protocol.{h,cpp}` and +`SignalBuffer.h` verbatim. Those structs have members named `signals`, which +collide with Qt's `signals`/`slots`/`emit` macros. The Qt build sets +`QT_NO_KEYWORDS` and all Qt classes use `Q_SIGNALS:`/`Q_SLOTS:`/`Q_EMIT`. Do +not remove that define, and do not use the lowercase Qt keywords in Qt-client +code. Single GUI thread — `QWebSocket` signals arrive on the GUI thread, no +locks; a 60 Hz `QTimer` drives repaint. Run with long options: +`./build/StreamHubQtClient --host HOST --port 8090` (single-dash `-host` is +misparsed as clustered short flags). + +### StreamHub history + +`HistoryWriter` (`Source/Applications/StreamHub/HistoryWriter.{h,cpp}`) does +disk-backed circular storage: per-signal `.shist` files with a 64-byte header +and a pre-allocated circular region of `(float64 time, float64 value)` pairs. +Configured via a `+History` block (`Directory` required; `DurationHours` +default 1, `Decimation` default 1, `FlushIntervalSec` default 5, +`MinDiskFreeMB` default 500). WS commands: `historyInfo`, `historyZoom`. + +### E2E scenario / stress matrix + +`Test/E2E/chain/scenarios.py` is a *curated covering set*: every configurable +UDPStreamer option value appears in at least one scenario, plus high-risk +interactions. `stress.py` is the capacity sibling — it sweeps one load axis at +a time and records survival/liveness (hard gates) and RSS/zoom-p95 latency +(soft gates). Both feed the same `gen_data.py` / `gen_cfg.py` generators. When +adding a new UDPStreamer option, add a scenario that exercises it and update +`validate_scenario` / the stress matrix accordingly. + +`validate_waveform.py` has two gates: **fidelity** (every received value within +`tol` of some ground-truth value; `tol` is 0 for un-quantised ints, a float +epsilon for un-quantised floats, `quant_step/2 + 1e-6·range` for quantised +floats) — this is the **correctness** gate. **Shape** (least-squares sine fit, +correlation ≥ 0.99) is a gross-sanity gate + tracked metric, pending Phase-A +timestamp calibration. Do not tighten the shape gate to a correctness gate. + +### Gitignored build artefacts + +`Build/`, `compile_commands.json`, `*.gcov`/`*.gcda`/`*.gcno` (coverage), Go +binaries (`Client/*/marte2debugger`, `udpstreamer-webui`, `streamhub-e2e`, +`Client/*/bin/`), and the `udp_standalone_webui/` scratch dir are all +gitignored. `vgore.*` core dumps (e.g. `vgcore.26968`) are not — remove them. + +--- + +## Documentation map + +- `ARCHITECTURE.md` — full architecture: data-flow diagrams, UDPS packet/header + tables, CONFIG payload, StreamHub WebSocket protocol (commands, events, + binary frames), threading model. +- `Docs/` — per-component reference docs (`Protocol.md`, `UDPStreamer.md`, + `SineArrayGAM.md`, `DebugService.md`, `StreamHub-{UserGuide,API,Developer}.md`, + `Tutorial.md`, `WebUI.md`). +- `docs/superpowers/specs/` — design specs (dated, e.g. + `2026-06-26-stress-suite-report-integration-design.md`). +- `docs/superpowers/plans/` — implementation plans paired with specs. +- `.superpowers/sdd/` — task briefs, reports, and a `progress.md` ledger for + in-flight feature work (not always present; per-branch). +- `README.md` — high-level overview + quick-start config snippets. +- `CLAUDE.md` — condensed agent guidance (overlaps with this file). + +--- + +## Ports reference (defaults) + +| Port | Protocol | Component | Purpose | +|------|----------|-----------|---------| +| 44500 | UDP | UDPStreamer | scalar signals (unicast control) | +| 44501 | UDP | UDPStreamer | packed arrays (FirstSample/LastSample) | +| 44502 | UDP | UDPStreamer | packed arrays (FullArray) | +| 44503 | UDP | UDPStreamer | multicast data (group 239.0.0.1) | +| 8080 | TCP | DebugService | text command channel | +| 8081 | UDP | DebugService | trace telemetry stream | +| 8082 | TCP | TcpLogger | REPORT_ERROR log forward | +| 8090 | TCP/WS | StreamHub | WebSocket (commands + binary data) | +| 8080 | TCP | udpstreamer-webui | web UI listen (legacy direct-UDP path) | +| 9090 | TCP | debugger | debug web UI listen | + +Note the 8080 collision: DebugService control vs. the legacy web UI listen port. +In combined demos that run both, the scripts adjust one of them — check the +script header before assuming. + +--- + +## License + +EUPL v1.1 — license headers are present on all C++ sources. Preserve them on +new files; do not relicense. diff --git a/BUG_FIX_PLAN.md b/BUG_FIX_PLAN.md new file mode 100644 index 0000000..a583e5a --- /dev/null +++ b/BUG_FIX_PLAN.md @@ -0,0 +1,221 @@ +# Bug Fix Plan — Security & Correctness Remediation + +**Date:** 2026-06-26 +**Based on:** `BUG_REPORT.md` +**Scope:** `Source/` and `Client/` + +This plan organizes the ~60 findings from the audit into prioritized, dependency-ordered phases. Each phase is independently shippable. Phases are ordered by risk reduction: Critical remote-exploitable issues first, then High crash/OOB issues, then Medium robustness/DoS, then Low hardening. + +--- + +## Guiding principles + +1. **Fix root causes, not symptoms.** The integer-overflow-in-bounds-check pattern appears in 6+ places — fix the pattern, not each instance ad hoc. Introduce a shared `boundsCheck(off, count, elemBytes, bufLen)` helper (C++) and a `validateCount(count, elemSize, bufLen)` helper (Go) and use them everywhere. +2. **Defense in depth.** Origin checks + auth + input validation — not just one layer. +3. **No regressions.** After each phase, run the existing test suites (`make -f Makefile.gcc test`, `python3 -m unittest tests_py`, `go test ./...` in each Go module) and the E2E suite (`./Test/E2E/chain/run_chain_e2e.sh --skip-build`). +4. **Minimal blast radius.** Each fix is surgical to the file/function listed in the bug report. No refactors beyond what the fix requires. + +--- + +## Phase 1 — Critical remote-exploitable fixes (ship first) + +**Goal:** Eliminate drive-by takeover and remote heap corruption. All fixes are small and localized. + +| # | Bug | File(s) | Fix | Est. effort | Depends on | +|---|-----|---------|-----|-------------|------------| +| 1.1 | CR-1: 1-byte heap OOB write in WS frame NUL-term | `WSServer.cpp:251` | Change `kRecvBuf = WS_MAX_RECV_PAYLOAD + 14u` → `+ 14u + 1u` | 5 min | — | +| 1.2 | CR-2: XSS via unescaped `src.addr` | `Client/udpstreamer/static/app.js:3503`; `Client/debugger/static/app.js:3549` | Wrap `src.addr` with existing `escHtml()` in `_statsKV` calls (or inside `_statsKV` itself) | 10 min | — | +| 1.3 | CR-3: WebSocket CSRF (Origin check disabled) | `Common/Client/go/wshub/hub.go:128`; `Source/Applications/StreamHub/WSServer.cpp:186-239` | **Go:** Replace `CheckOrigin: func(r *http.Request) bool { return true }` with a same-origin check (compare `Origin` header host to `Host` header). Add a configurable allowlist env var for non-local deployments. **C++:** Parse `Origin` header in `UpgradeHTTP`; reject if present and host doesn't match the listen address. | 30 min | — | +| 1.4 | CR-4: Unauthenticated command injection to MARTe2 | `Client/debugger/martecontrol.go:217-263` | Add an allowlist of permitted MARTe2 commands (`DISCOVER`, `TREE`, `INFO`, `LS`, `VALUE`, `TRACE`, `UNTRACE`); reject `FORCE`, `UNFORCE`, `PAUSE`, `RESUME`, `STEP`, `BREAK`, `MSG` unless an explicit `--enable-dangerous-commands` flag is set. Log all forwarded commands. | 1 h | 1.3 | +| 1.5 | CR-5: No auth on DebugService TCP | `DebugService.cpp:276` | (a) Bind TCP server to localhost by default (add `BindAddress` config key, default `127.0.0.1`). (b) Add an optional `AuthToken` config key; if set, require the first line from a client to be `AUTH ` before accepting commands. | 2 h | — | + +**Validation:** `bash -n` on shell scripts; `go build ./...` in each Go module; `make -f Makefile.gcc core apps`; manual test: open browser console on a cross-origin page and confirm WS to `localhost:8090` is rejected; confirm a crafted 65536-byte WS frame no longer corrupts. + +**Commit:** `fix(security): critical remote-exploitable fixes (CR-1..CR-5)` + +--- + +## Phase 2 — High-severity crash / OOB / UAF fixes + +**Goal:** Eliminate remote crash and memory-corruption vectors. These are the integer-overflow and concurrency bugs. + +### 2A — Integer-overflow bounds checks (uniform pattern) + +| # | Bug | File(s) | Fix | +|---|-----|---------|-----| +| 2A.1 | HI-1: DATA bounds check overflow | `UDPSourceSession.cpp:358`; `UDPStreamerClient.cpp:520` | Replace `off + elemsToRead * wireElemBytes > size` with 64-bit arithmetic. Add a `validateBounds(off, count, elemBytes, size)` static helper in `UDPSProtocol.h` and use it in both files. | +| 2A.2 | HI-2: Go unbounded allocations | `protocol.go:121, 229, 325` | Add `validateCount(count, elemSize, bufLen)` in `protocol.go`; call before every `make([]T, n)` that uses a network-derived count. Cap `NumElements()` at 1M. | +| 2A.3 | HI-3: `accumFill` overflow + size calc | `UDPStreamer.cpp:700, 738, 757, 857-860` | (a) Add `if (accumFill >= maxBatchCount) { flush; }` before the write at line 857. (b) Use `uint64` for `maxBatchCount * totalSrcBytes` size calculations. | +| 2A.4 | MD-4: `numRows * numCols` overflow | `UDPSourceSession.cpp:240, 346`; `protocol.go:121` | Use `static_cast(numRows) * static_cast(numCols)`; cap at 1M. | +| 2A.5 | MD-15: `pairCount * 16u` overflow | `Client/streamhub/Protocol.cpp:77, 117` | Check `pairCount > (len - off) / 16` before multiplication; use `ull` suffix. | +| 2A.6 | HI-6: `FD_SET` overflow | `UDPSServer.cpp:273, 308`; `UDPSClient.cpp:383` | Add `if (fd < FD_SETSIZE)` guard before each `FD_SET`; otherwise skip that client this cycle (or switch to `poll()`, which the codebase already uses elsewhere). | + +**Est. effort:** 3 h (pattern is repetitive once the helper exists) + +### 2B — Use-after-free and concurrency + +| # | Bug | File(s) | Fix | +|---|-----|---------|-----| +| 2B.1 | HI-5: Broadcast vs FreeSlot UAF | `WSServer.cpp:345-366, 432-445` | `FreeSlot` must acquire `clients[idx].writeMutex` before setting `active=false` and deleting `sock`. This ensures `BroadcastText`/`BroadcastBinary` cannot dereference a freed socket. | +| 2B.2 | HI-9: TraceRingBuffer not thread-safe | `DebugCore.h:79-142` | Replace `volatile uint32 readIndex/writeIndex` with `Atomic` (MARTe2 `Atomic::Load`/`Atomic::Store`). Ensure `Push` writes data before storing `writeIndex` (release ordering); `Pop` loads `writeIndex` before reading data (acquire ordering). | +| 2B.3 | HI-4: `ProcessSignal` unclamped memcpy + `forcedMask` OOB | `DebugServiceBase.cpp:310, 313-318` | (a) Clamp `size` to `sizeof(signalInfo->forcedValue)` (1024). (b) Cap the array-forcing loop at `min(nEl, 256)`. (c) Validate `nEl <= 256` in `RegisterSignal`. | +| 2B.4 | HI-7: Weak PRNG for WS handshake | `WSClient.cpp:29-31` | Replace `srand(time(nullptr))` + `rand()` with `std::random_device` or `getrandom()`/`/dev/urandom` read. | +| 2B.5 | HI-8: Global registry patching | `DebugServiceBase.cpp:217-242` | (a) Save original builders before patching (`item->GetObjectBuilder()`); store in a static array for restore on destruction. (b) Add a `PatchRegistry` config flag (default `true` for back-compat; document the implication). (c) Guard against double-patching (skip if already patched). | + +**Est. effort:** 4 h + +**Validation:** `make -f Makefile.gcc test` + `./Build/x86-linux/GTest/MainGTest.ex` + `./Build/x86-linux/Test/Integration/Integration/IntegrationTests.ex` + `python3 -m unittest tests_py` (in `Test/E2E/chain/`) + `go test ./...` (in each Go module). Craft a UDP packet with `numSamples=0x20000001` and confirm no crash. Run the E2E suite: `./Test/E2E/chain/run_chain_e2e.sh --skip-build`. + +**Commit:** `fix(security): high-severity crash/OOB/UAF fixes (HI-1..HI-9)` + +--- + +## Phase 3 — Medium-severity robustness / DoS / parser fixes + +**Goal:** Harden input validation, fix reassembly logic, and improve WS RFC compliance. + +### 3A — UDPS protocol hardening + +| # | Bug | File(s) | Fix | +|---|-----|---------|-----| +| 3A.1 | MD-1: `recvMask` too small | `UDPSClient.cpp:544, 592-594` | Enlarge `recvMask` to 64 bytes (512 bits) to match the `totalFragments <= 512` cap. | +| 3A.2 | MD-2: No type matching in reassembly | `UDPSClient.cpp:548-555` | Add `type` field to `ReassemblySlot`; key on `counter && type`. | +| 3A.3 | MD-3: Signal name not null-terminated | `UDPSourceSession.cpp:219-223` | After `memcpy`, force `name[63]='\0'` and `unit[31]='\0'`. | +| 3A.4 | MD-6: No auth on UDP CONNECT | `UDPSServer.cpp:655-723` | Document trust boundary in `Docs/Protocol.md`. Optional: add a `ConnectToken` config key. | +| 3A.5 | MD-13: Reassembler unbounded map growth (Go) | `reassembler.go:41-89` | Add `maxSets = 1024` cap; reject new sets when full. | +| 3A.6 | LO-1: `totalFrags` overflow | `UDPSServer.cpp:541-542` | Validate `payloadSize <= maxPayloadSize * 65535` before the calculation. | +| 3A.7 | LO-17: `bufMutex.Create` unchecked | `UDPStreamer.cpp:119`; `UDPStreamerClient.cpp:149` | Check return value; `REPORT_ERROR` on failure. | +| 3A.8 | LO-19: Reassembler ticker panic | `reassembler.go:93` | Guard `if r.expiry <= 0 { r.expiry = 2 * time.Second }`. | + +**Est. effort:** 2 h + +### 3B — WebSocket and JSON robustness (C++ clients) + +| # | Bug | File(s) | Fix | +|---|-----|---------|-----| +| 3B.1 | MD-16: `readU16`/`readU32` silent failure | `Client/streamhub/Protocol.cpp:21-38` | Change `readU16`/`readU32`/`readF64` to return `bool` (or set an `ok` flag); `ParseBinaryFrame` fails fast on any truncated read. | +| 3B.2 | MD-17: JSON injection in command builders | `Client/streamhub/Protocol.cpp:183-213` | Add a `jsonEscape(str)` helper; use it for all `%s` string interpolations. Switch to `std::string` to avoid truncation. | +| 3B.3 | MD-18: `strstr`-based JSON parsing | `Client/streamhub/Protocol.cpp:296-310, 495, 510` | Migrate `ParseSources`, `ParseZoom`, `ParseStats` to a real JSON parser. **ImGui:** add a minimal JSON parser or vendor a single-header library (e.g. nlohmann/json). **Qt:** use `QJsonDocument`. | +| 3B.4 | MD-19: WS RFC 6455 violations | `WSClient.cpp:204-223` | (a) Reject control frames with `payloadLen > 125`. (b) Implement `CONTINUATION` opcode reassembly (or at least log and drop with a clear message). (c) Echo `CLOSE` frame. | +| 3B.5 | MD-20: Handshake no timeout | `WSClient.cpp:290-301` | Set `SO_RCVTIMEO` to 5s on the socket before the handshake loop. | +| 3B.6 | MD-5: SHA1 latent overflow | `SHA1.h:50`; `WSFrame_client.h:113` | Add `if (len > 119u) return;` guard; use `uint64_t bitLen`; use `std::vector` instead of `new[]`/`delete[]`. | +| 3B.7 | MD-24: `parseCapture` panic | `Test/E2E/chain/client/main.go:140-171` | Add bounds checks before each read, mirroring `parsePush`. | + +**Est. effort:** 4 h (3B.3 is the largest item — JSON parser migration) + +### 3C — Go hub and debugger hardening + +| # | Bug | File(s) | Fix | +|---|-----|---------|-----| +| 3C.1 | MD-10: No WS client cap | `hub.go:367-377` | Track `len(h.clients)`; reject above configurable max (default 32). | +| 3C.2 | MD-11: Silent data loss | `hub.go:346-358` | Add a `droppedCount` atomic counter per channel; expose via `Snapshot()`. | +| 3C.3 | MD-12: SSRF via `addSource` | `hub.go:83-96`; `sources.go:62-67` | Validate `addr` against a configurable allowlist (default: localhost + private RFC1918 ranges; reject link-local/metadata endpoints like `169.254.169.254`). | +| 3C.4 | MD-14: Index panic | `martecontrol.go:543` | Use `strings.TrimPrefix(line, "OK SERVICE_INFO ")` with a length check. | +| 3C.5 | LO-14: `stopCh` double-close | `martecontrol.go:182-189` | Use `sync.Once` for closing `stopCh`. | +| 3C.6 | LO-10: `unsafe.Pointer` aliasing | `hub.go:588-594` | Replace `float64ToBytes` with `binary.LittleEndian` put operations. | +| 3C.7 | LO-11: `+Inf` in JSON | `stats.go:115-116` | Guard `if avg > 0 { si.RateHz = 1.0 / avg } else { si.RateHz = 0 }`. | + +**Est. effort:** 2 h + +### 3D — TcpLogger and DebugService fixes + +| # | Bug | File(s) | Fix | +|---|-----|---------|-----| +| 3D.1 | MD-7: `StringHelper::Copy` overflow | `TcpLogger.cpp:87` | Replace with `strncpy(entry.description, description, MAX_ERROR_MESSAGE_SIZE-1); entry.description[MAX_ERROR_MESSAGE_SIZE-1]='\0';` | +| 3D.2 | MD-8: `volatile` indices + lost wakeup | `TcpLogger.cpp:83-153, 157-158` | Use `Atomic::Load`/`Store` for `writeIdx`/`readIdx`; use `eventSem.ResetWait()` instead of `Wait`+`Reset`. | +| 3D.3 | MD-9: `printf` on RT thread | `TcpLogger.cpp:75-76` | Add a `MirrorToStdout` config key (default `false`); guard the `printf`/`fflush` behind it. | +| 3D.4 | MD-21: Stack buffer + shadowed member | `DebugService.cpp:438, 489` | Remove the local `udpsSampleBuf` (use the member); heap-allocate `cfgBuf`. | +| 3D.5 | MD-23: `configValidated` read without lock | `UDPStreamerClient.cpp:463` | Mark `volatile` or acquire `bufMutex` before reading. | +| 3D.6 | MD-22: Spinlock on RT path | `UDPStreamer.cpp:856, 947-976` | Minimize the RT-side critical section: swap a pointer instead of `memcpy` under the lock. Move the `memcpy` outside the lock (double-buffer pattern). | +| 3D.7 | LO-7: JSON escaping in DISCOVER | `DebugServiceBase.cpp:900-906` | Use the existing `EscapeJson` helper for signal names. | +| 3D.8 | LO-8: `EvaluateBreak` only element 0 | `DebugBrokerWrapper.h:61-86` | Document the limitation in the function comment. | +| 3D.9 | LO-9: `fprintf(stderr)` on init | `DebugBrokerWrapper.h:195-197` | Replace with `REPORT_ERROR`. | + +**Est. effort:** 3 h + +**Validation:** Full test suites + E2E. For 3B.3 (JSON parser migration), add unit tests for crafted JSON inputs (nested quotes, escaped chars, truncated payloads). For 3A.1/3A.2, add a unit test that sends duplicate high-index fragments and mixed-type same-counter fragments. + +**Commit:** `fix(robustness): medium-severity input validation, parser, and DoS fixes (MD-1..MD-24)` + +--- + +## Phase 4 — Low-severity hardening and documentation + +**Goal:** Clean up latent bugs, fix doc mismatches, add missing hardening. These are non-urgent but improve code health. + +| # | Bug | File(s) | Fix | +|---|-----|---------|-----| +| 4.1 | LO-2: `Stop()` TOCTOU | `WSServer.cpp:104-134` | Replace `Sleep(200ms)` with thread join. | +| 4.2 | LO-3: Spinlock priority inversion | `UDPSourceSession.h`; `WSServer.h` | Document that `FastPollingMutexSem` is only for very short critical sections on same-core RT configs. Consider `MutexSem` for non-RT-contended paths. | +| 4.3 | LO-4: `SignalBuffer` mod-0 | `SignalBuffer.h:36-41` | Guard `push`/`readLast`/`readRange` against `capacity == 0`. | +| 4.4 | LO-5: Misleading "Thread-safe" comment | `SignalBuffer.h:18` | Remove the claim or add internal locking. | +| 4.5 | LO-6: GAM type validation + doc | `SineArrayGAM.cpp:81`; `TimeArrayGAM.cpp:54`; `TimeArrayGAM.h:8,27` | Add `GetSignalType` checks; update `TimeArrayGAM.h` doc from `uint32` to `uint64`. | +| 4.6 | LO-12: Directory listing | `Client/webui/main.go:26` | Disable directory listings (return 404 for directories). | +| 4.7 | LO-13: No security headers | `Client/debugger/main.go:55`; `Client/udpstreamer/main.go`; `Client/webui/main.go` | Add a middleware that sets `X-Content-Type-Options: nosniff`, `X-Frame-Options: DENY`, `Content-Security-Policy: default-src 'self'`. | +| 4.8 | LO-15: `host_`/`port_` race | `WSClient.cpp:48-58` | Protect with `sendMutex_` or make `atomic` + `std::string` guarded by a small mutex. | +| 4.9 | LO-16: `ReadExactTCP` edge case | `UDPSClient.cpp:474-487` | Add a max-iterations guard. | +| 4.10 | LO-18: `RangeMin < RangeMax` validation | `UDPStreamer.cpp:403-404` | Validate when `quantType != None`; `REPORT_ERROR` if `rangeMax <= rangeMin`. | + +**Est. effort:** 2 h + +**Commit:** `fix(hardening): low-severity fixes, doc corrections, security headers (LO-1..LO-19)` + +--- + +## Phase 5 — Cross-cutting refactors (optional, post-hardening) + +These are not bug fixes but structural improvements that prevent the recurrence of the bug classes found in this audit. + +| # | Refactor | Rationale | Est. effort | +|---|----------|-----------|-------------| +| 5.1 | Shared `validateBounds` / `validateCount` helpers | Centralizes the integer-overflow-prevention pattern; prevents future copy-paste bugs | 1 h | +| 5.2 | Real JSON parser in C++ clients (nlohmann/json or Qt's QJsonDocument) | Eliminates the entire class of `strstr`/`snprintf` JSON bugs (MD-16, MD-17, MD-18) | 4 h | +| 5.3 | `poll()`/`epoll` everywhere (replace all `select`+`FD_SET`) | Eliminates the `FD_SETSIZE` limitation entirely (HI-6) | 2 h | +| 5.4 | Auth framework for DebugService + web UIs | Token-based auth shared between the Go web UIs and the C++ DebugService; eliminates the "no auth anywhere" theme | 1 d | +| 5.5 | Fuzzing harness for UDPS protocol parsers | `libFuzzer` or `go-fuzz` harnesses that feed random bytes to `ParseConfig`/`ParseData`/`DecodeElems`/`ParseBinaryFrame`; catches future overflow variants | 1 d | +| 5.6 | Thread-sanitizer and address-sanitizer CI runs | `make CXXFLAGS="-fsanitize=address,undefined"`; `go test -race`; catches UAF and races automatically | 4 h | + +--- + +## Verification checklist (run after each phase) + +```bash +source env.sh + +# C++ build + tests +make -f Makefile.gcc clean +make -f Makefile.gcc core apps test +./Build/x86-linux/GTest/MainGTest.ex +./Build/x86-linux/Test/Integration/Integration/IntegrationTests.ex + +# Go tests (each module) +cd Common/Client/go && go vet ./... && go test ./... && cd - +cd Client/debugger && go vet ./... && go build ./... && cd - +cd Client/udpstreamer && go vet ./... && go build ./... && cd - +cd Test/E2E/chain/client && go vet ./... && go test ./... && cd - + +# Python framework tests +cd Test/E2E/chain && python3 -m unittest tests_py && cd - + +# Full E2E suite +./Test/E2E/chain/run_chain_e2e.sh --skip-build + +# ASan/UBSan smoke test (after Phase 2+) +make -f Makefile.gcc clean +make -f Makefile.gcc CXXFLAGS="-fsanitize=address,undefined -g" core apps +./Build/x86-linux/GTest/MainGTest.ex +``` + +--- + +## Timeline summary + +| Phase | Scope | Est. effort | Risk reduction | +|-------|-------|-------------|----------------| +| 1 | Critical remote-exploitable (CR-1..CR-5) | ~4 h | Eliminates drive-by takeover + heap corruption | +| 2 | High crash/OOB/UAF (HI-1..HI-9) | ~7 h | Eliminates remote crash + memory corruption | +| 3 | Medium robustness/DoS/parser (MD-1..MD-24) | ~11 h | Hardens input validation + RFC compliance | +| 4 | Low hardening/doc (LO-1..LO-19) | ~2 h | Code health + defense in depth | +| 5 | Cross-cutting refactors (optional) | ~3 d | Prevents recurrence of bug classes | + +**Total (Phases 1-4):** ~24 h of focused work. Phase 5 is optional and can be scheduled separately. diff --git a/BUG_REPORT.md b/BUG_REPORT.md new file mode 100644 index 0000000..79682c6 --- /dev/null +++ b/BUG_REPORT.md @@ -0,0 +1,1011 @@ +# Bug Report — Security & Correctness Audit + +**Date:** 2026-06-26 +**Scope:** `Source/` (C++ MARTe2 components + StreamHub app) and `Client/` (Go web clients, C++ ImGui/Qt desktop clients, JS web SPAs) +**Method:** Static source review of all network-facing, binary-parsing, concurrency, and web-serving code. + +--- + +## Severity scale + +| Level | Meaning | +|-------|---------| +| **Critical** | Remote code execution, drive-by takeover, or heap corruption reachable from the network. | +| **High** | Remote crash (OOM/panic/abort), out-of-bounds read/write, use-after-free, unauthenticated control of the real-time plant. | +| **Medium** | Data corruption, denial-of-service, parser confusion, RFC violations, races with bounded impact. | +| **Low** | Latent/fragile code, documentation mismatches, non-exploitable UB, missing hardening. | + +--- + +## CRITICAL + +### CR-1 — 1-byte heap OOB write in WebSocket frame NUL-termination + +| Field | Value | +|-------|-------| +| File | `Source/Applications/StreamHub/WSServer.cpp:251, 315-316` | +| Severity | Critical | +| Type | Heap buffer overflow | +| Attack vector | Remote TCP (any client that completes the WS handshake) | + +**Vulnerable code:** +```cpp +static const uint32 kRecvBuf = WS_MAX_RECV_PAYLOAD + 14u; // 65536 + 14 = 65550 +uint8 *buf = new uint8[kRecvBuf]; // valid indices 0..65549 +... +// payload = frameStart + hdr.headerSize (headerSize can be 14) +// plen = up to WS_MAX_RECV_PAYLOAD (65536) +uint8 savedByte = payload[plen]; // payload[65536] == buf[65550] — OOB read +payload[plen] = '\0'; // OOB write one byte past the heap allocation +``` + +**Root cause:** The comment `/* safe: buf has extra byte */` is incorrect. The buffer is exactly `65536 + 14 = 65550` bytes. A masked WebSocket frame with 64-bit extended length (`headerSize = 14`) and `payloadLen = 65536` fills the entire buffer; `payload[plen]` then writes one byte past the end. + +**Impact:** Heap corruption — potential code execution depending on allocator/heap layout. + +**Fix:** Allocate one extra byte: +```cpp +static const uint32 kRecvBuf = WS_MAX_RECV_PAYLOAD + 14u + 1u; +``` + +--- + +### CR-2 — XSS via unescaped `src.addr` in stats panel + +| Field | Value | +|-------|-------| +| Files | `Client/udpstreamer/static/app.js:3503`; `Client/debugger/static/app.js:3549` | +| Severity | Critical | +| Type | Cross-site scripting (stored/reflected via server data) | +| Attack vector | Malicious or compromised StreamHub/DebugService feeding crafted source address | + +**Vulnerable code:** +```js +body.innerHTML = `... ${_statsKV('Address', src.addr)} ...`; + +function _statsKV(label, value, cls) { + return `
${label}` + + `${value}
`; +} +``` + +`_statsKV` interpolates `value` raw into HTML. `src.addr` originates from the WebSocket server's `sources`/`addSource` JSON. A crafted address such as `` achieves arbitrary JavaScript execution in the browser, which can then drive the oscilloscope and trigger over the same WS connection. + +**Impact:** Browser-side RCE → full control of the oscilloscope/trigger/MARTe2 debug interface via the compromised WS session. + +**Fix:** Escape `src.addr` with the existing `escHtml()` helper before interpolation, or use `textContent`/`createElement`. + +--- + +### CR-3 — WebSocket CSRF: `CheckOrigin` always returns `true` (Go) / no Origin check (C++) + +| Field | Value | +|-------|-------| +| Files | `Common/Client/go/wshub/hub.go:128` (shared by `Client/udpstreamer` + `Client/debugger`); `Source/Applications/StreamHub/WSServer.cpp:186-239` | +| Severity | Critical | +| Type | Cross-Site WebSocket Hijacking (CSWSH / CSRF) | +| Attack vector | Drive-by web page | + +**Vulnerable code (Go):** +```go +var upgrader = websocket.Upgrader{ + ReadBufferSize: 4096, + WriteBufferSize: 64 * 1024, + CheckOrigin: func(r *http.Request) bool { return true }, +} +``` + +**Vulnerable code (C++):** `UpgradeHTTP` parses `Sec-WebSocket-Key` and computes the accept hash but never reads or validates the `Origin` header. + +**Impact:** Any malicious web page visited by the user can open a WebSocket to `ws://localhost:8080/ws` (or `:9090`, or the C++ hub's `:8090`) and send JSON commands — `addSource`, `arm`, `setTrigger`, `removeSource`, and in the debugger `PAUSE`/`RESUME`/`MSG`/`TRACE`/`FORCE`/`BREAK` against the live MARTe2 instance. Combined with CR-4 this is a full drive-by takeover of the plant controller. + +**Fix:** Validate `Origin` against a configurable allowlist (same-host at minimum); reject cross-origin upgrade requests. + +--- + +### CR-4 — Unauthenticated arbitrary command injection to MARTe2 + +| Field | Value | +|-------|-------| +| File | `Client/debugger/martecontrol.go:217-263` | +| Severity | Critical | +| Type | Command injection / unauthorized control | +| Attack vector | Drive-by web page (via CR-3) or direct TCP | + +**Vulnerable code:** +```go +case "cmd": + data, _ := env["data"].(map[string]interface{}) + if data == nil { return } + cmd, _ := data["cmd"].(string) + if cmd != "" { + m.trackForcedCmd(cmd) + m.SendCommand(cmd) // raw string sent to MARTe2 TCP control + } +``` + +**Impact:** Any web page (via CR-3) or any TCP client can send `FORCE`, `TRACE`, `PAUSE`, `RESUME`, `STEP`, `MSG`, `BREAK` to the real-time control system. + +**Fix:** Require authentication (token-based) for command-sending WS messages; validate `cmd` against an allowlist of known MARTe2 commands; fix the Origin check (CR-3). + +--- + +### CR-5 — No authentication on DebugService TCP command interface + +| Field | Value | +|-------|-------| +| File | `Source/Components/Interfaces/DebugService/DebugService.cpp:276` | +| Severity | Critical | +| Type | Missing authentication / unauthorized control | +| Attack vector | Direct TCP to port 8080 | + +**Vulnerable code:** +```cpp +BasicTCPSocket *newClient = tcpServer.WaitConnection(TimeoutType(100)); +``` + +Any TCP client that connects can send `FORCE` (overwrite signal memory in the RT app), `PAUSE` (halt the RT loop), `STEP`, `TRACE`, and `MSG` (invoke any message handler on any ORD object — see HI-9). There is no authentication, TLS, or access control. + +**Impact:** Remote control of the real-time plant: forced signal values, paused execution, arbitrary message dispatch. + +**Fix:** Bind to localhost by default; add a shared-secret token or TLS gate; restrict `MSG` to whitelisted destinations. + +--- + +## HIGH + +### HI-1 — Integer overflow in DATA bounds check → heap OOB read + +| Field | Value | +|-------|-------| +| Files | `Source/Applications/StreamHub/UDPSourceSession.cpp:358`; `Source/Components/DataSources/UDPStreamerClient/UDPStreamerClient.cpp:520` (same bug mirrored) | +| Severity | High | +| Type | Integer overflow → out-of-bounds read | +| Attack vector | Single crafted UDP DATA packet | + +**Vulnerable code (StreamHub):** +```cpp +// numSamples read directly from attacker-controlled UDP payload (line 333-338) +if (pm == UDPS_PUBLISH_ACCUMULATE) { + memcpy(&numSamples, payload + offset, 4u); + if (numSamples == 0u) { numSamples = 1u; } +} +uint32 elemsToRead = (pm==ACCUMULATE && numElements==1) ? numSamples : numElements; +if (off + elemsToRead * wireElemBytes > size) { return; } // 32-bit multiply wraps +``` + +`elemsToRead` is fully attacker-controlled via `numSamples`. `elemsToRead * wireElemBytes` is a `uint32` multiplication that can wrap to a small value (e.g. `0x20000001 * 8 = 0x8`), causing the bounds check to pass. The subsequent `DecodeElems` loop then reads far past the payload buffer. + +**Impact:** Heap OOB read → crash or information leak. + +**Fix:** Use 64-bit arithmetic for the bounds check: +```cpp +uint64 bytesNeeded = static_cast(off) + + static_cast(elemsToRead) * static_cast(wireElemBytes); +if (bytesNeeded > static_cast(size)) { return; } +``` + +--- + +### HI-2 — Unbounded allocations from a single crafted UDP datagram (Go decoder) + +| Field | Value | +|-------|-------| +| File | `Common/Client/go/udpsprotocol/protocol.go:121, 229, 325` | +| Severity | High | +| Type | Denial of service (OOM/panic) | +| Attack vector | Single crafted UDP CONFIG or DATA packet | + +**Vulnerable code:** +```go +// protocol.go:121 — NumElements() +func (s SignalInfo) NumElements() int { + r := int(s.NumRows); c := int(s.NumCols) + if r == 0 { r = 1 }; if c == 0 { c = 1 } + return r * c // no overflow check; (2^32-1)^2 overflows int64 → negative → panic +} + +// protocol.go:229 — ParseConfig() +numSigs := binary.LittleEndian.Uint32(payload[0:4]) +sigs := make([]SignalInfo, 0, numSigs) // numSigs=0xFFFFFFFF → ~480 GB alloc → OOM + +// protocol.go:325 — ParseData() +numSamples := int(binary.LittleEndian.Uint32(payload[8:12])) +samples := make([]DataSample, numSamples) // numSamples=0xFFFFFFFF → OOM +``` + +**Impact:** A single 17-byte UDP datagram crashes the Go web UI / chain client (panic or OOM kill). + +**Fix:** Validate `numSigs`/`numSamples`/`NumRows*NumCols` against `len(payload)/elementSize` before allocating. Cap `NumElements()` at a sane maximum (e.g. 1M). + +--- + +### HI-3 — `accumFill` increment before bounds check → buffer overflow + +| Field | Value | +|-------|-------| +| File | `Source/Components/DataSources/UDPStreamer/UDPStreamer.cpp:857-860` | +| Severity | High | +| Type | Buffer overflow | +| Attack vector | Configuration-driven (signal/payload size mismatch) | + +**Vulnerable code:** +```cpp +uint8 *slot = accumBuffer + (accumFill * totalSrcBytes); +(void) MemoryOperationsHelper::Copy(slot, memory, totalSrcBytes); +accumTimestamps[accumFill] = ts; +accumFill++; // incremented unconditionally +// flush check at 866-871 only fires if payload-size/time conditions hit; +// if they don't and accumFill == maxBatchCount, the next call writes past the buffer +``` + +Related: the `maxBatchCount * totalSrcBytes` buffer-size calculation at line 700 (and 738, 757) also overflows `uint32`, allocating a too-small buffer. + +**Impact:** Heap buffer overflow in the Accumulate publishing path. + +**Fix:** Check `accumFill >= maxBatchCount` before writing; force-flush if so. Use `uint64` for the size calculation. + +--- + +### HI-4 — `ProcessSignal` memcpy uses unclamped broker `size` → OOB read from `forcedValue[1024]` + +| Field | Value | +|-------|-------| +| File | `Source/Components/Interfaces/DebugService/DebugServiceBase.cpp:310, 313-318` | +| Severity | High | +| Type | Out-of-bounds read | +| Attack vector | Forcing a signal whose runtime byte size exceeds the `ForceSignal`-validated size | + +**Vulnerable code:** +```cpp +if (nEl <= 1u) { + memcpy(signalInfo->memoryAddress, signalInfo->forcedValue, size); + // size comes from broker GetCopyByteSize, not from ForceSignal validation (line 420) +``` + +`ForceSignal` rejects signals > 1024 bytes (line 420), but the runtime `size` comes from `GetCopyByteSize(j)` and can exceed 1024, reading past `forcedValue[1024]`. Additionally, the array-forcing loop at line 313-318 reads `forcedMask[e >> 3]` for `e` up to `nEl`; `forcedMask` is only 32 bytes (256 bits), so `nEl > 256` causes an OOB read of `forcedMask`. `ForceSignal` at line 445-448 sets bits up to `numberOfElements`, which can exceed 256, also writing past `forcedMask`. + +**Impact:** OOB heap read; potential OOB write to `forcedMask`. + +**Fix:** Clamp `size` to `sizeof(signalInfo->forcedValue)` in `ProcessSignal`; validate `nEl <= 256` in `RegisterSignal`/`ForceSignal`; cap the array-forcing loop at `min(nEl, 256)`. + +--- + +### HI-5 — Race / use-after-free: BroadcastText vs FreeSlot + +| Field | Value | +|-------|-------| +| File | `Source/Applications/StreamHub/WSServer.cpp:345-366` (Broadcast) vs `432-445` (FreeSlot) | +| Severity | High | +| Type | Use-after-free / data race | +| Attack vector | Triggered by client disconnect during broadcast | + +**Vulnerable code (BroadcastText):** +```cpp +void WSServer::BroadcastText(const char *json, uint32 len) { + for (uint32 i = 0u; i < WS_MAX_CLIENTS; i++) { + if (!clients[i].active) { continue; } // no lock held + (void) clients[i].writeMutex.FastLock(); + if (clients[i].active) { // re-check under writeMutex + (void) SendFrame(clients[i], ...); // uses clients[i].sock + } + clients[i].writeMutex.FastUnLock(); + } +} +``` + +**Vulnerable code (FreeSlot):** +```cpp +void WSServer::FreeSlot(uint32 idx) { + (void) clientsMutex.FastLock(); // holds clientsMutex, NOT writeMutex + if (clients[idx].active) { + clients[idx].active = false; + if (clients[idx].sock) { + clients[idx].sock->Close(); + delete clients[idx].sock; // frees the socket + clients[idx].sock = NULL; + } + } + clientsMutex.FastUnLock(); +} +``` + +`FreeSlot` (read loop, on disconnect) holds `clientsMutex` and `delete`s `sock`. `BroadcastText`/`BroadcastBinary` (push thread) holds only `writeMutex` and dereferences `sock`. There is no mutual exclusion on `active`/`sock` between these two code paths. + +**Impact:** Use-after-free → crash or potential code execution. + +**Fix:** `FreeSlot` must acquire `writeMutex` before modifying `active`/`sock`, or `BroadcastText`/`BroadcastBinary` must hold `clientsMutex` during the iteration. + +--- + +### HI-6 — `FD_SET` with `fd >= FD_SETSIZE` → stack buffer overflow + +| Field | Value | +|-------|-------| +| Files | `Source/Components/Interfaces/UDPStream/UDPSServer.cpp:273, 308`; `Source/Components/Interfaces/UDPStream/UDPSClient.cpp:383` | +| Severity | High | +| Type | Stack buffer overflow | +| Attack vector | Many open file descriptors (many TCP clients, high ulimit) | + +**Vulnerable code:** +```cpp +int fd = tcpClients[i]->GetReadHandle(); +fd_set rset; +FD_ZERO(&rset); +FD_SET(fd, &rset); // if fd >= FD_SETSIZE (typically 1024), stack buffer overflow +``` + +`FD_SET` writes to a fixed-size stack bitmap (`fd_set` is typically 1024 bits / 128 bytes). If `fd >= FD_SETSIZE`, it writes past the bitmap. The multicast listener path already uses `poll()` but existing-client polling reverts to `select()`. + +**Impact:** Stack buffer overflow when the process has many open FDs. + +**Fix:** Check `fd < FD_SETSIZE` before calling `FD_SET`, or switch to `poll()`/`epoll` (which the codebase already uses elsewhere). + +--- + +### HI-7 — Weak PRNG for WebSocket handshake key + +| Field | Value | +|-------|-------| +| File | `Client/streamhub/WSClient.cpp:29-31` | +| Severity | High | +| Type | Weak randomness | +| Attack vector | Predict key → MITM handshake | + +**Vulnerable code:** +```cpp +static std::string base64Key() { + uint8_t raw[16]; + srand(static_cast(time(nullptr))); // second-granularity, global RNG reseed + for (int i = 0; i < 16; i++) { + raw[i] = static_cast(rand() & 0xFF); // rand() often only 15-32 bits entropy + } + ... +} +``` + +`srand(time(nullptr))` is predictable to second granularity. `rand()` is not cryptographically secure. An attacker who knows the approximate connection time can predict the `Sec-WebSocket-Key`. Calling `srand` on every `base64Key()` invocation also reseeds the global C RNG, affecting any other `rand()` consumer. + +**Impact:** Predictable WS handshake key; potential MITM. Global RNG pollution. + +**Fix:** Use a CSPRNG (`getrandom()`, `/dev/urandom`, or `std::random_device`). + +--- + +### HI-8 — Global registry patching of all brokers + +| Field | Value | +|-------|-------| +| File | `Source/Components/Interfaces/DebugService/DebugServiceBase.cpp:217-242` | +| Severity | High | +| Type | Design-level global state mutation | +| Attack vector | N/A (correctness/design) | + +**Vulnerable code:** +```cpp +void DebugServiceBase::PatchRegistry() { + PatchItemInternal("MemoryMapInputBroker", new DebugMemoryMapInputBrokerBuilder()); + PatchItemInternal("MemoryMapInputOutputBroker", new DebugMemoryMapInputOutputBrokerBuilder()); + // ... 10 more broker types +} + +static void PatchItemInternal(const char8 *originalName, ObjectBuilder *debugBuilder) { + ClassRegistryItem *item = ClassRegistryDatabase::Instance()->Find(originalName); + if (item != NULL_PTR(ClassRegistryItem *)) { + item->SetObjectBuilder(debugBuilder); // globally replaces the builder + } +} +``` + +This globally replaces the `ObjectBuilder` for all standard broker classes process-wide, silently, on `Initialise()`. Implications: +- The `new Debug*BrokerBuilder()` allocations are never freed (memory leak, intentional for process lifetime). +- Original builders are not saved/restored — if `DebugService` is destroyed, patched builders remain. +- A second `DebugService` instance double-patches; the first's builders are leaked. +- Any `dynamic_cast` to the original broker type breaks (gets a debug wrapper instead). + +**Fix:** Document prominently; make patching opt-in rather than automatic on `Initialise()`; save/restore original builders. + +--- + +### HI-9 — `TraceRingBuffer` not thread-safe + +| Field | Value | +|-------|-------| +| File | `Source/Components/Interfaces/DebugService/DebugCore.h:79-142` | +| Severity | High | +| Type | Data race | +| Attack vector | N/A (correctness) | + +**Vulnerable code:** +```cpp +uint32 Push(const uint8 *data, uint32 size) { // called from RT broker thread under tracePushMutex + ... + uint32 w = writeIndex; // volatile uint32 — no memory barrier + ... + writeIndex = next; // volatile write +} + +uint32 Pop(uint8 *dst, uint32 maxBytes) { // called from Streamer thread, NO LOCK + uint32 r = readIndex; // volatile read + uint32 w = writeIndex; // volatile read — can be torn/stale + ... +} +``` + +`Push` (RT broker thread, under `tracePushMutex`) and `Pop` (streamer thread, **no lock**) communicate via `volatile uint32` indices. `volatile` does not provide atomicity or memory ordering on most architectures (it only prevents compiler reordering, not CPU reordering). A torn/stale read of `writeIndex` can cause `Pop` to read partially-written data or miss entries. + +**Impact:** Trace data corruption / lost trace samples / potential torn reads. + +**Fix:** Use `Atomic::Load`/`Atomic::Store` for `readIndex`/`writeIndex`, or acquire `tracePushMutex` in `Pop` as well (adds RT path latency — prefer a proper lock-free SPSC ring). + +--- + +## MEDIUM + +### MD-1 — Fragment reassembly `recvMask` too small for `totalFragments` up to 512 + +| Field | Value | +|-------|-------| +| File | `Source/Components/Interfaces/UDPStream/UDPSClient.cpp:544, 592-594, 630-636` | +| Severity | Medium | +| Type | Logic bug / data corruption | + +`totalFragments` is capped at 512 (line 544), but `recvMask` is only 32 bytes (256 bits). For `fragIdx >= 256`, the duplicate check at line 594 is skipped (`byteIdx >= 32`). An attacker can send the same high-index fragment repeatedly; each is accepted (overwriting the same data), `receivedFragments` is incremented each time, and `DeliverAssembled` is triggered prematurely with an incomplete reassembly — delivering partially-filled payload data to the application. + +**Fix:** Cap `totalFragments` at 256, or enlarge `recvMask` to 64 bytes (512 bits). + +--- + +### MD-2 — Fragment reassembly: no type matching → CONFIG/DATA type confusion + +| Field | Value | +|-------|-------| +| File | `Source/Components/Interfaces/UDPStream/UDPSClient.cpp:548-555` | +| Severity | Medium | +| Type | Logic bug / data corruption | + +Reassembly slots are keyed only on `counter`, not `type`. The protocol does not guarantee disjoint counter spaces for DATA and CONFIG. An attacker (or buggy server) can send DATA and CONFIG fragments with the same counter; they mix into the same reassembly buffer. The `type` field from the first-arriving fragment determines delivery destination, but the payload is a mixture. + +**Fix:** Include `type` in the slot lookup: `reassemblySlots[i].counter == counter && reassemblySlots[i].type == hdr->type`. + +--- + +### MD-3 — Signal name/unit not null-terminated after `memcpy` → intra-struct OOB read + +| Field | Value | +|-------|-------| +| File | `Source/Applications/StreamHub/UDPSourceSession.cpp:219-223` | +| Severity | Medium | +| Type | Out-of-bounds read (intra-struct) | + +After `memcpy(&sigDescs_[i], payload + ..., UDPS_SIGNAL_DESC_SIZE)`, `name[64]` and `unit[32]` are not force-null-terminated. If the CONFIG payload fills all 64 name bytes without `\0`, subsequent `strcmp(descs[s].name, ...)` (line 968) and `snprintf(key, ..., descs[i].name)` (line 916) read past `name` into `typeCode`, `quantType`, etc. until a zero byte is found. + +**Fix:** After the memcpy: +```cpp +sigDescs_[i].name[UDPS_MAX_SIGNAL_NAME - 1u] = '\0'; +sigDescs_[i].unit[UDPS_MAX_UNIT_LEN - 1u] = '\0'; +``` + +--- + +### MD-4 — `numRows * numCols` integer overflow in CONFIG/DATA parsing + +| Field | Value | +|-------|-------| +| Files | `Source/Applications/StreamHub/UDPSourceSession.cpp:240, 346`; `Common/Client/go/udpsprotocol/protocol.go:121` | +| Severity | Medium | +| Type | Integer overflow → data corruption | + +`numRows` and `numCols` are `uint32` from the CONFIG payload. Their product can overflow `uint32` (e.g. `0x10000 * 0x10000 = 0`), producing a too-small scratch buffer and wrong `numElements` for DATA decoding. + +**Fix:** Use 64-bit multiplication and cap against a sane maximum. + +--- + +### MD-5 — SHA1 stack buffer overflow for inputs > 119 bytes (latent) + +| Field | Value | +|-------|-------| +| Files | `Source/Applications/StreamHub/SHA1.h:50`; `Client/streamhub/WSFrame_client.h:113` | +| Severity | Medium | +| Type | Stack buffer overflow (latent) | + +```cpp +uint8 msg[128]; +memcpy(msg, data, len); // if len > 120, overflows msg[128] +msg[len] = 0x80u; // OOB if len >= 128 +``` + +Currently only called with the WS key+GUID (~60 bytes), so not exploitable today. `WSFrame_client.h:113` also has `uint32_t bitLen = len * 8u` which truncates for `len > 512MB`, and `new uint8_t[msgLen]()` without exception guard (leaks on `bad_alloc`). + +**Fix:** Add `if (len > 119u) return;` guard; use `uint64_t bitLen`; use `std::vector` instead of manual `new[]`/`delete[]`. + +--- + +### MD-6 — No authentication on UDP CONNECT/DISCONNECT/ACK + +| Field | Value | +|-------|-------| +| File | `Source/Components/Interfaces/UDPStream/UDPSServer.cpp:655-723, 729-741` | +| Severity | Medium | +| Type | Missing authentication | + +`HandleUnicastConnect` accepts any UDP datagram with the right magic and `type=CONNECT` from any source address. `HandleUnicastDisconnect` evicts any client by source address. `HandleUnicastAck` refreshes any client's `lastSeenTicks`. Any host that can send UDP to the server port can: (a) register as a client and receive all streamed data, (b) disconnect any known client by spoofing their source address (DoS), (c) keep a spoofed client alive indefinitely. + +**Fix:** Document the trust boundary; if deployed beyond a trusted LAN, add a shared-secret token to the CONNECT payload and validate source addresses. + +--- + +### MD-7 — `StringHelper::Copy` potential buffer overflow in TcpLogger + +| Field | Value | +|-------|-------| +| File | `Source/Components/Interfaces/TCPLogger/TcpLogger.cpp:87` | +| Severity | Medium | +| Type | Potential buffer overflow | + +```cpp +StringHelper::Copy(entry.description, description); +``` + +`entry.description` is `char8[MAX_ERROR_MESSAGE_SIZE]`. If `description` (from `logPage->errorStrBuffer`) is longer than `MAX_ERROR_MESSAGE_SIZE - 1` and `StringHelper::Copy` uses `strcpy` internally, this overflows. + +**Fix:** Use `strncpy` with explicit size, or verify `StringHelper::Copy` is bounds-safe. + +--- + +### MD-8 — TcpLogger SPSC queue uses `volatile` indices, no atomics; lost wakeup + +| Field | Value | +|-------|-------| +| File | `Source/Components/Interfaces/TCPLogger/TcpLogger.cpp:83-153, 157-158` | +| Severity | Medium | +| Type | Data race / lost wakeup | + +`writeIdx`/`readIdx` are `volatile uint32` — no memory ordering on non-x86. `eventSem.Wait(10)` followed by `eventSem.Reset()` is not atomic; a post between `Wait` returning and `Reset` is lost (entry delayed up to 10ms). + +**Fix:** Use `Atomic::Load`/`Store`; use `ResetWait` for atomic reset+wait. + +--- + +### MD-9 — `printf`/`fflush` on LoggerService (possibly RT) thread + +| Field | Value | +|-------|-------| +| File | `Source/Components/Interfaces/TCPLogger/TcpLogger.cpp:75-76` | +| Severity | Medium | +| Type | RT latency jitter | + +`ConsumeLogMessage` is called by `LoggerService`, which may run on an RT thread. `printf`/`fflush` are blocking I/O calls causing latency jitter. + +**Fix:** Make stdout mirroring optional via configuration. + +--- + +### MD-10 — No cap on WebSocket client connections (Go hub) + +| Field | Value | +|-------|-------| +| File | `Common/Client/go/wshub/hub.go:367-377` | +| Severity | Medium | +| Type | Resource exhaustion | + +`HandleWebSocket` unconditionally creates a new `wsClient` with a 64-message buffered channel. No cap on total clients. An attacker can open thousands of connections, exhausting memory and goroutines. + +**Fix:** Track `len(h.clients)`; reject new connections above a configurable maximum (e.g. 100). + +--- + +### MD-11 — Silent data loss on all non-blocking channel sends + +| Field | Value | +|-------|-------| +| File | `Common/Client/go/wshub/hub.go:346-358, 315-318, 322-326, 330-334, 340-342` | +| Severity | Medium | +| Type | Silent data loss | + +`PushDataForSource`, `broadcast`, `AddSource`, `RemoveSource`, `SetSourceState`, `UpdateConfigForSource` all use `select { case ch <- v: default: }`, silently dropping messages when channels are full. Under high data rates, `dataCh` (cap 65536) fills and samples are dropped with no metric or backpressure. + +**Fix:** Add a dropped-counter metric; log/alert when drops occur; consider backpressure. + +--- + +### MD-12 — SSRF via unauthenticated `addSource` + +| Field | Value | +|-------|-------| +| Files | `Common/Client/go/wshub/hub.go:83-96`; `Common/Client/go/wshub/sources.go:62-67` | +| Severity | Medium | +| Type | Server-Side Request Forgery | + +Any WebSocket client (any origin due to CR-3) can add a data source pointing to any `host:port`. The `addr` is passed to `net.ResolveUDPAddr`/`net.ResolveTCPAddr` and the client dials it. This is SSRF — an attacker can probe internal network services. + +**Fix:** Validate/allow-list addresses; require authentication for source management. + +--- + +### MD-13 — Reassembler unbounded fragment-set map growth (Go) + +| Field | Value | +|-------|-------| +| File | `Common/Client/go/udpsprotocol/reassembler.go:41-89` | +| Severity | Medium | +| Type | Memory exhaustion | + +An attacker sending UDP packets with unique `(counter, type)` keys and `TotalFragments=2, FragmentIdx=0` creates a new `fragmentSet` per packet. Each set holds payload bytes and a `make([][]byte, total)` (up to 65535 entries). Within the 2-second TTL, high-rate flooding exhausts memory. + +**Fix:** Cap the number of concurrent fragment sets (e.g. `maxSets = 1024`); reject new sets when the cap is reached. + +--- + +### MD-14 — `martecontrol.go` index panic on short "OK SERVICE_INFO" response + +| Field | Value | +|-------|-------| +| File | `Client/debugger/martecontrol.go:543` | +| Severity | Medium | +| Type | Panic / crash | + +```go +if strings.HasPrefix(line, "OK SERVICE_INFO") { // matches 15-char string + ... + "data": line[len("OK SERVICE_INFO "):], // line[16:] → panic if len(line)==15 +``` + +**Fix:** Use `strings.TrimPrefix` and handle the empty case, or add a length check. + +--- + +### MD-15 — `pairCount * 16u` overflow on 32-bit (shared C++ client wire layer) + +| Field | Value | +|-------|-------| +| File | `Client/streamhub/Protocol.cpp:77, 117` (reused by Qt client) | +| Severity | Medium (32-bit), Low (64-bit) | +| Type | Integer overflow → OOB | + +```cpp +uint32_t pairCount = readU32(buf, off, len); +if (off + static_cast(pairCount) * 16u > len) { return false; } +``` + +On 32-bit, `pairCount * 16u` can overflow, bypassing the bounds check. On 64-bit, `pairCount` can be up to ~268M, forcing a large allocation. + +**Fix:** Check `pairCount > (len - off) / 16` before multiplication; use `ull` suffix. + +--- + +### MD-16 — `readU16`/`readU32` return 0 on truncation without signaling + +| Field | Value | +|-------|-------| +| File | `Client/streamhub/Protocol.cpp:21-38, 66-76` | +| Severity | Medium | +| Type | Silent malformed-frame acceptance | + +```cpp +static uint16_t readU16(const uint8_t* buf, size_t& off, size_t len) { + if (off + 2 > len) { return 0u; } // returns 0, does NOT signal failure + ... +} +``` + +If the buffer is truncated at the `numSignals` field, `readU32` returns 0 and `off` is not advanced. `ParseBinaryFrame` then returns `true` with an empty signal list, silently accepting a truncated/malformed frame as valid. + +**Fix:** `readU16`/`readU32`/`readF64` should return a status or set a flag; `ParseBinaryFrame` should fail fast on any truncated read. + +--- + +### MD-17 — JSON command builders use `snprintf`+`%s` with no escaping → JSON injection + +| Field | Value | +|-------|-------| +| File | `Client/streamhub/Protocol.cpp:183-186, 209-213` | +| Severity | Medium | +| Type | JSON injection | + +```cpp +char buf[256]; +snprintf(buf, sizeof(buf), "{\"type\":\"getConfig\",\"sourceId\":\"%s\"}", + sourceId.c_str()); +``` + +`%s` with user/server-provided strings does not escape JSON special characters. A source label containing `"` breaks the JSON and can inject arbitrary JSON keys. Also `snprintf` truncates silently for long inputs, producing invalid JSON. + +**Fix:** Use a JSON builder that escapes strings; use `std::string` instead of fixed buffers. + +--- + +### MD-18 — `strstr`-based JSON parsing matches nested keys + +| Field | Value | +|-------|-------| +| File | `Client/streamhub/Protocol.cpp:296-310, 495, 510` | +| Severity | Medium | +| Type | Parser confusion / data corruption | + +`ParseSources` uses `strstr(p, "\"id\":\"")` which matches inside string values. `ParseZoom`/`ParseStats` use `strstr(p, "\"t\":[")` which matches inside a signal key name. A crafted source label containing `"id":"` injects phantom sources. + +**Fix:** Migrate to a real JSON parser (nlohmann/json for ImGui; QJsonDocument for Qt). + +--- + +### MD-19 — WebSocket RFC 6455 violations in ImGui client + +| Field | Value | +|-------|-------| +| File | `Client/streamhub/WSClient.cpp:204-223` | +| Severity | Medium | +| Type | RFC non-compliance | + +- No `CONTINUATION` opcode handling (opcode 0x00) — fragmented messages silently dropped. +- No ≤125 byte enforcement on control frames — a malicious server can send a 16MB ping, echoed as a 16MB pong (bandwidth amplification). +- `CLOSE` frame not echoed back (RFC §5.5.1 requires it); close status code not read. + +**Fix:** Implement continuation-frame reassembly; reject control frames with `payloadLen > 125`; echo close frame. + +--- + +### MD-20 — Handshake `recv` one byte at a time, no `SO_RCVTIMEO` + +| Field | Value | +|-------|-------| +| File | `Client/streamhub/WSClient.cpp:290-301` | +| Severity | Medium | +| Type | Denial of service | + +If the server sends a partial response and hangs, the receive thread blocks forever (the 3-second reconnect sleep never runs). + +**Fix:** Set `SO_RCVTIMEO` on the socket; read in larger chunks. + +--- + +### MD-21 — 64KB stack buffer in DebugService streamer thread + shadowed member + +| Field | Value | +|-------|-------| +| File | `Source/Components/Interfaces/DebugService/DebugService.cpp:438, 489` | +| Severity | Medium | +| Type | Stack pressure | + +```cpp +uint8 udpsSampleBuf[UDPS_MAX_SAMPLE_BYTES]; // local 65510 bytes on stack (line 438) +... +static const uint32 CFG_BUF_SIZE = 65535u; +uint8 cfgBuf[CFG_BUF_SIZE]; // another 64KB on stack (line 489) +``` + +The class also has a member `uint8 udpsSampleBuf[65535u]` (DebugService.h:156) that is shadowed by the local and never used. + +**Fix:** Use the member instead of the local; use heap allocation for `cfgBuf`. + +--- + +### MD-22 — `FastPollingMutexSem` (spinlock) on RT path with network I/O in background holder + +| Field | Value | +|-------|-------| +| File | `Source/Components/DataSources/UDPStreamer/UDPStreamer.cpp:856, 947-976` | +| Severity | Medium | +| Type | Priority inversion / unbounded latency | + +`Synchronise()` (RT thread) uses `bufMutex.FastLock(TTInfiniteWait)`. The background thread holds `bufMutex` during a `memcpy` of `fill * totalSrcBytes` (potentially large) at line 950-955. If the background thread is preempted while holding the spinlock, the RT thread spins indefinitely, missing its deadline. + +**Fix:** Use a non-spinning mutex for the background thread, or ensure the RT-side critical section is minimal (pointer swap, not full memcpy). Consider a triple-buffer. + +--- + +### MD-23 — `configValidated` read without lock + +| Field | Value | +|-------|-------| +| File | `Source/Components/DataSources/UDPStreamerClient/UDPStreamerClient.cpp:463` | +| Severity | Medium | +| Type | Data race | + +`configValidated` is set under `bufMutex` (line 453) and cleared under `bufMutex` (line 489), but read without the lock at line 463. Technically UB (benign for a `bool` on x86). + +**Fix:** Mark `volatile` or acquire the lock before reading. + +--- + +### MD-24 — `parseCapture` panics on truncated input (E2E chain client) + +| Field | Value | +|-------|-------| +| File | `Test/E2E/chain/client/main.go:140-171` | +| Severity | Medium | +| Type | Panic / crash | + +`parseCapture` reads `keyLen`, `key`, and `n` without checking `off` is within `len(b)`. A truncated v2 frame causes a runtime panic (slice bounds out of range). The only initial check is `len(b) < 29`. + +**Fix:** Add bounds checks before each read (`if len(b) < off+2 { return nil, error }`), mirroring `parsePush`. + +--- + +## LOW + +### LO-1 — `totalFrags` overflow (caller-controlled) + +| File | `Source/Components/Interfaces/UDPStream/UDPSServer.cpp:541-542` | +| Severity | Low | + +`payloadSize + maxChunk - 1u` overflows if `payloadSize` is near `UINT32_MAX`. Not network-controlled but a caller bug could trigger it. + +--- + +### LO-2 — `Stop()` TOCTOU on socket deletion + +| File | `Source/Applications/StreamHub/WSServer.cpp:104-134` | +| Severity | Low | + +`Stop()` calls `sock->Close()` then `Sleep(200ms)` then `delete sock`. The read thread holds a raw `sock` copy. The 200ms sleep may not be sufficient; `delete` could free the socket while the read thread still references it. + +**Fix:** Use thread join instead of fixed sleep. + +--- + +### LO-3 — `FastPollingMutexSem` priority inversion on contended non-RT paths + +| Files | `UDPSourceSession.h:302, 311, 370`; `WSServer.h:60, 122` | +| Severity | Low | + +Spinlocks used for `metaMutex_`, `statsMutex_`, `recSpecMutex_`, `clientsMutex`, `writeMutex`. Priority inversion with no bound if a low-priority holder is preempted by a high-priority spinner. + +--- + +### LO-4 — `SignalBuffer::push` with `capacity == 0` → mod-0 UB + +| File | `Client/streamhub/SignalBuffer.h:36-41` | +| Severity | Low | + +`head = (head + 1) % capacity` is UB if `capacity == 0`. Not currently reachable (default cap 20000; `onMaxPointsUpdated` guards `mp >= 2`), but the API is fragile. + +--- + +### LO-5 — `SignalBuffer` comment claims "Thread-safe" but has no internal locking + +| File | `Client/streamhub/SignalBuffer.h:18` | +| Severity | Low | + +Safe only by current call-site discipline (ImGui: main-thread access; Qt: GUI-thread signals). Misleading comment could cause a future refactor to introduce a data race. + +--- + +### LO-6 — SineArrayGAM / TimeArrayGAM: no output-type validation + +| Files | `Source/Components/GAMs/SineArrayGAM/SineArrayGAM.cpp:81-100`; `Source/Components/GAMs/TimeArrayGAM/TimeArrayGAM.cpp:54-81` | +| Severity | Low | + +`Setup()` never verifies the output signal type. `TimeArrayGAM.h` doc says `uint32` but code uses `uint64` → if user follows the doc and configures `uint32`, `nElements` is doubled and writes overflow the buffer. + +**Fix:** Add `GetSignalType(...)` checks; update `TimeArrayGAM.h` doc to `uint64`. + +--- + +### LO-7 — Signal names inserted into JSON via `%s` Printf without escaping + +| File | `Source/Components/Interfaces/DebugService/DebugServiceBase.cpp:900-906` | +| Severity | Low | + +Config-sourced (not remote), but a format violation. A signal name containing `"` or `\` breaks the JSON. + +**Fix:** Use the existing `EscapeJson` helper. + +--- + +### LO-8 — `EvaluateBreak` checks only element 0 of array signals + +| File | `Source/Components/Interfaces/DebugService/DebugBrokerWrapper.h:61-86` | +| Severity | Low | + +Undocumented feature limitation. + +--- + +### LO-9 — `fprintf(stderr, ...)` on init path + +| File | `Source/Components/Interfaces/DebugService/DebugBrokerWrapper.h:195-197` | +| Severity | Low | + +Should use `REPORT_ERROR` instead. + +--- + +### LO-10 — `unsafe.Pointer` aliasing in `float64ToBytes` + +| File | `Common/Client/go/wshub/hub.go:588-594` | +| Severity | Low | + +`unsafe.Slice((*byte)(unsafe.Pointer(&f[0])), len(f)*8)` aliases the float64 backing array. Currently safe (synchronous copy), but fragile if a caller retains the byte slice. + +--- + +### LO-11 — `+Inf` in JSON from division by zero + +| File | `Common/Client/go/wshub/stats.go:115-116` | +| Severity | Low | + +`si.RateHz = 1.0 / avg` produces `+Inf` if `avg == 0`, yielding invalid JSON. + +--- + +### LO-12 — Directory listing enabled + +| File | `Client/webui/main.go:26` | +| Severity | Low | + +`http.FileServer(http.Dir(*static))` serves directory listings if a directory lacks `index.html`. + +--- + +### LO-13 — No security headers on static file serving + +| File | `Client/debugger/main.go:55` | +| Severity | Low | + +No `Content-Security-Policy`, `X-Frame-Options`, `X-Content-Type-Options: nosniff`. + +--- + +### LO-14 — `stopCh` close pattern not `sync.Once`-guarded + +| File | `Client/debugger/martecontrol.go:182-189` | +| Severity | Low | + +`select { case <-m.stopCh: default: close(m.stopCh) }` is not atomic; concurrent `Disconnect` calls would double-close and panic. + +--- + +### LO-15 — `host_`/`port_` read by recv thread, written by UI thread + +| File | `Client/streamhub/WSClient.cpp:48-58, 73-89, 160` | +| Severity | Low | + +`std::string` concurrent read/write is technically UB (small window; recv thread re-reads on each reconnect cycle). + +--- + +### LO-16 — `ReadExactTCP` progress edge case + +| File | `Source/Components/Interfaces/UDPStream/UDPSClient.cpp:474-487` | +| Severity | Low | + +If `Read` returns `true` but leaves `chunk` unchanged (contract violation), `got` would advance without data being read. Depends on MARTe2 `BasicTCPSocket::Read` contract. + +--- + +### LO-17 — `bufMutex.Create(false)` return value unchecked + +| Files | `Source/Components/DataSources/UDPStreamer/UDPStreamer.cpp:119`; `Source/Components/DataSources/UDPStreamerClient/UDPStreamerClient.cpp:149` | +| Severity | Low | + +If mutex creation fails, all subsequent `FastLock` calls operate on an uninitialized semaphore → UB. + +--- + +### LO-18 — No validation of `RangeMin < RangeMax` for quantization + +| File | `Source/Components/DataSources/UDPStreamer/UDPStreamer.cpp:403-404` | +| Severity | Low | + +If `rangeMax < rangeMin`, quantization normalization produces negative values clamped to 0.0 → silent data corruption. Divide-by-zero is guarded (`if (rRange == 0.0) rRange = 1.0`). + +--- + +### LO-19 — Reassembler GC ticker panics if `expiry == 0` + +| File | `Common/Client/go/udpsprotocol/reassembler.go:93` | +| Severity | Low | + +`time.NewTicker(r.expiry / 2)` panics if `r.expiry == 0`. Currently always called with `2 * time.Second`. + +--- + +## Cross-cutting themes + +1. **Integer overflow in size arithmetic is pervasive** — every binary protocol parser (C++ producer, C++ consumer, Go decoder, C++ client wire layer) multiplies attacker-controlled counts by element sizes in 32-bit. Uniform fix: validate count against `len(payload)/elementSize` before multiplying; use 64-bit for bounds checks. +2. **No authentication anywhere in the control plane** — DebugService TCP, TcpLogger TCP, both Go web UIs, the C++ StreamHub WS, and the UDPS CONNECT protocol all trust any peer. Bind to localhost by default; document the trust boundary. +3. **WebSocket Origin checks disabled in every WS server** — Go `CheckOrigin: true`; C++ no Origin parse. Drive-by CSRF on all of them. +4. **`volatile` used for cross-thread synchronization** — TraceRingBuffer, TcpLogger queue. Not a memory-ordering primitive on non-x86; use atomics. +5. **`strstr`/`snprintf`-based JSON** in C++ clients — fragile against crafted-but-valid JSON; migrate to a real parser. diff --git a/Client/debugger/cmd_gate_test.go b/Client/debugger/cmd_gate_test.go new file mode 100644 index 0000000..1ca0ad5 --- /dev/null +++ b/Client/debugger/cmd_gate_test.go @@ -0,0 +1,54 @@ +package main + +import ( + "testing" +) + +// TestIsDangerousCommand_Force — FORCE is dangerous. +func TestIsDangerousCommand_Force(t *testing.T) { + if !isDangerousCommand("FORCE signal 1.0") { + t.Error("FORCE should be dangerous") + } +} + +// TestIsDangerousCommand_Pause — PAUSE is dangerous. +func TestIsDangerousCommand_Pause(t *testing.T) { + if !isDangerousCommand("PAUSE") { + t.Error("PAUSE should be dangerous") + } +} + +// TestIsDangerousCommand_Msg — MSG is dangerous. +func TestIsDangerousCommand_Msg(t *testing.T) { + if !isDangerousCommand("MSG target func") { + t.Error("MSG should be dangerous") + } +} + +// TestIsDangerousCommand_CaseInsensitive — case-insensitive. +func TestIsDangerousCommand_CaseInsensitive(t *testing.T) { + if !isDangerousCommand("force signal 1.0") { + t.Error("lowercase force should be dangerous") + } +} + +// TestIsDangerousCommand_SafeCommand — DISCOVER is not dangerous. +func TestIsDangerousCommand_SafeCommand(t *testing.T) { + if isDangerousCommand("DISCOVER") { + t.Error("DISCOVER should not be dangerous") + } +} + +// TestIsDangerousCommand_TraceNotDangerous — TRACE is not dangerous (read-only). +func TestIsDangerousCommand_TraceNotDangerous(t *testing.T) { + if isDangerousCommand("TRACE signal 1") { + t.Error("TRACE should not be dangerous") + } +} + +// TestIsDangerousCommand_Empty — empty command is not dangerous. +func TestIsDangerousCommand_Empty(t *testing.T) { + if isDangerousCommand("") { + t.Error("empty command should not be dangerous") + } +} diff --git a/Client/debugger/main.go b/Client/debugger/main.go index 3e732e3..f9156ce 100644 --- a/Client/debugger/main.go +++ b/Client/debugger/main.go @@ -21,6 +21,8 @@ var staticFiles embed.FS func main() { addr := flag.String("addr", ":7777", "HTTP listen address") sourcesFile := flag.String("sources-file", "", "JSON file for persistent source list") + flag.BoolVar(&dangerousCommandsEnabled, "enable-dangerous-commands", false, + "Allow FORCE/PAUSE/RESUME/STEP/BREAK/MSG commands from the browser (CR-4 safety gate)") flag.Parse() hub := wshub.NewHub() diff --git a/Client/debugger/martecontrol.go b/Client/debugger/martecontrol.go index 79b1198..8fed345 100644 --- a/Client/debugger/martecontrol.go +++ b/Client/debugger/martecontrol.go @@ -17,6 +17,40 @@ import ( "marte2/common/wshub" ) +// --------------------------------------------------------------------------- +// Command safety gate (CR-4) +// --------------------------------------------------------------------------- + +// dangerousCommandsEnabled gates commands that mutate the RT application state +// (FORCE, PAUSE, RESUME, STEP, BREAK, MSG). Set via --enable-dangerous-commands. +var dangerousCommandsEnabled = false + +// dangerousCommands is the set of MARTe2 commands that can change signal values +// or alter execution flow. Without --enable-dangerous-commands these are blocked +// from the browser WebSocket path. +var dangerousCommands = map[string]bool{ + "FORCE": true, + "UNFORCE": true, + "PAUSE": true, + "RESUME": true, + "STEP": true, + "BREAK": true, + "UNBREAK": true, + "MSG": true, + "LOAD": true, + "UNLOAD": true, +} + +// isDangerousCommand returns true if the command's first word is in the +// dangerous set (case-insensitive). +func isDangerousCommand(cmd string) bool { + parts := strings.Fields(cmd) + if len(parts) == 0 { + return false + } + return dangerousCommands[strings.ToUpper(parts[0])] +} + // --------------------------------------------------------------------------- // Signal metadata (populated by DISCOVER) // --------------------------------------------------------------------------- @@ -256,10 +290,25 @@ func (m *MarteController) HandleBrowserCommand(msg []byte) { return } cmd, _ := data["cmd"].(string) - if cmd != "" { - m.trackForcedCmd(cmd) - m.SendCommand(cmd) + if cmd == "" { + return } + // Gate dangerous commands (FORCE/UNFORCE/PAUSE/RESUME/STEP/BREAK/MSG) + // behind an explicit opt-in flag. Without it, only read-only commands + // (DISCOVER, TREE, INFO, LS, VALUE, TRACE, UNTRACE, STEP_STATUS) are + // forwarded to the MARTe2 TCP control connection. + if isDangerousCommand(cmd) { + if !dangerousCommandsEnabled { + broadcastHub(m.hub, map[string]any{ + "type": "log", "time": time.Now().Format("15:04:05.000"), + "level": "WARNING", + "message": fmt.Sprintf("Blocked dangerous command (requires --enable-dangerous-commands): %s", cmd), + }) + return + } + } + m.trackForcedCmd(cmd) + m.SendCommand(cmd) } } diff --git a/Client/debugger/static/app.js b/Client/debugger/static/app.js index 3afa5c2..2521366 100644 --- a/Client/debugger/static/app.js +++ b/Client/debugger/static/app.js @@ -3511,7 +3511,7 @@ function _fmtHz(v) { return v != null && isFinite(v) && v > 0 ? v.toFixed(2) + ' function _fmtKB(v) { return v != null && isFinite(v) ? (v / 1024).toFixed(2) + ' KB' : '—'; } function _statsKV(label, value, cls) { - return `
${label}${value}
`; + return `
${escHtml(label)}${escHtml(value)}
`; } function _histHTML(si) { diff --git a/Client/streamhub/WSClient.cpp b/Client/streamhub/WSClient.cpp index bb5939b..4abf8e6 100644 --- a/Client/streamhub/WSClient.cpp +++ b/Client/streamhub/WSClient.cpp @@ -18,18 +18,27 @@ #include #include #include +#include namespace StreamHubClient { /* ── Helpers ─────────────────────────────────────────────────────────────── */ static std::string base64Key() { - /* Generate 16 random bytes and base64-encode them */ + /* HI-7: use /dev/urandom (CSPRNG) instead of srand(time)/rand() */ uint8_t raw[16]; - srand(static_cast(time(nullptr))); - for (int i = 0; i < 16; i++) { - raw[i] = static_cast(rand() & 0xFF); + int fd = open("/dev/urandom", O_RDONLY); + if (fd < 0 || read(fd, raw, sizeof(raw)) != static_cast(sizeof(raw))) { + /* Fallback: std::random_device (still better than srand/rand) */ + std::random_device rd; + for (size_t i = 0; i < sizeof(raw); i += sizeof(unsigned)) { + unsigned val = rd(); + for (size_t j = 0; j < sizeof(unsigned) && i + j < sizeof(raw); j++) { + raw[i + j] = static_cast(val >> (j * 8)); + } + } } + if (fd >= 0) { close(fd); } char out[32]; WS_Base64Encode(raw, 16, out); return std::string(out); diff --git a/Client/streamhub/build/StreamHubClient b/Client/streamhub/build/StreamHubClient index 77018f6..208a9f0 100755 Binary files a/Client/streamhub/build/StreamHubClient and b/Client/streamhub/build/StreamHubClient differ diff --git a/Client/udpstreamer/static/app.js b/Client/udpstreamer/static/app.js index 99918d1..41f10b6 100644 --- a/Client/udpstreamer/static/app.js +++ b/Client/udpstreamer/static/app.js @@ -3465,7 +3465,7 @@ function _fmtHz(v) { return v != null && isFinite(v) && v > 0 ? v.toFixed(2) + ' function _fmtKB(v) { return v != null && isFinite(v) ? (v / 1024).toFixed(2) + ' KB' : '—'; } function _statsKV(label, value, cls) { - return `
${label}${value}
`; + return `
${escHtml(label)}${escHtml(value)}
`; } function _histHTML(si) { diff --git a/Common/Client/go/udpsprotocol/protocol.go b/Common/Client/go/udpsprotocol/protocol.go index 8dda8a1..77beb27 100644 --- a/Common/Client/go/udpsprotocol/protocol.go +++ b/Common/Client/go/udpsprotocol/protocol.go @@ -127,7 +127,12 @@ func (s SignalInfo) NumElements() int { if c == 0 { c = 1 } - return r * c + /* HI-2: cap at 1M to prevent integer overflow / OOM from crafted packets */ + n := r * c + if n < 0 || n > 1024*1024 { + return 1024 * 1024 + } + return n } // rawTypeSize returns the byte size for one element of the raw (unquantised) type. @@ -227,6 +232,11 @@ func ParseConfig(payload []byte) ([]SignalInfo, uint8, error) { return nil, 0, fmt.Errorf("config payload too short") } numSigs := binary.LittleEndian.Uint32(payload[0:4]) + /* HI-2: validate numSigs against payload length before allocating */ + maxSigs := uint32(len(payload) / SigDescSize) + if numSigs > maxSigs { + return nil, 0, fmt.Errorf("config claims %d signals but payload can hold at most %d", numSigs, maxSigs) + } offset := 4 sigs := make([]SignalInfo, 0, numSigs) for i := uint32(0); i < numSigs; i++ { @@ -327,6 +337,10 @@ func ParseData(payload []byte, sigs []SignalInfo, publishMode uint8, arrivalTime if numSamples == 0 { return []DataSample{}, nil } + /* HI-2: sanity-cap numSamples to prevent OOM from crafted packets */ + if numSamples < 0 || numSamples > 1024*1024 { + return nil, fmt.Errorf("accumulate numSamples %d out of range", numSamples) + } // Parse per-signal data blocks (all slots for a signal are contiguous). accumVals := make(map[string][]float64, len(sigs)) // scalars: numSamples values diff --git a/Common/Client/go/udpsprotocol/protocol_test.go b/Common/Client/go/udpsprotocol/protocol_test.go new file mode 100644 index 0000000..c617af3 --- /dev/null +++ b/Common/Client/go/udpsprotocol/protocol_test.go @@ -0,0 +1,97 @@ +package udpsprotocol + +import ( + "encoding/binary" + "math" + "testing" + "time" +) + +// TestParseConfig_HugeNumSigs_NoOOM — a CONFIG payload claiming 0xFFFFFFFF signals +// must return an error, not panic/OOM. +func TestParseConfig_HugeNumSigs_NoOOM(t *testing.T) { + // 4 bytes: numSigs = 0xFFFFFFFF, then nothing else + payload := make([]byte, 4) + binary.LittleEndian.PutUint32(payload[0:4], 0xFFFFFFFF) + sigs, _, err := ParseConfig(payload) + if err == nil { + t.Fatal("expected error for huge numSigs, got nil") + } + if sigs != nil { + t.Fatalf("expected nil sigs, got %d", len(sigs)) + } +} + +// TestParseConfig_ValidSmallConfig — a minimal valid CONFIG parses correctly. +func TestParseConfig_ValidSmallConfig(t *testing.T) { + // 1 signal, then publish mode + payload := make([]byte, 4+SigDescSize+1) + binary.LittleEndian.PutUint32(payload[0:4], 1) + // Set typeCode to float32 (8) at offset 64 + payload[4+64] = 8 + // numRows=1, numCols=1 at offsets 67, 71 + binary.LittleEndian.PutUint32(payload[4+67:4+71], 1) + binary.LittleEndian.PutUint32(payload[4+71:4+75], 1) + // publish mode = 0 (Strict) + payload[4+SigDescSize] = 0 + sigs, pm, err := ParseConfig(payload) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if len(sigs) != 1 { + t.Fatalf("expected 1 signal, got %d", len(sigs)) + } + if pm != PublishModeStrict { + t.Fatalf("expected Strict mode, got %d", pm) + } +} + +// TestNumElements_OverflowCapped — huge numRows*numCols is capped, no panic. +func TestNumElements_OverflowCapped(t *testing.T) { + s := SignalInfo{NumRows: 0xFFFFFFFF, NumCols: 0xFFFFFFFF} + n := s.NumElements() + if n <= 0 || n > 1024*1024 { + t.Fatalf("expected capped value 1M, got %d", n) + } +} + +// TestNumElements_Normal — normal values work correctly. +func TestNumElements_Normal(t *testing.T) { + s := SignalInfo{NumRows: 3, NumCols: 4} + if n := s.NumElements(); n != 12 { + t.Fatalf("expected 12, got %d", n) + } +} + +// TestParseData_HugeNumSamples_NoOOM — an Accumulate DATA packet with +// numSamples=0xFFFFFFFF must return an error, not OOM. +func TestParseData_HugeNumSamples_NoOOM(t *testing.T) { + sigs := []SignalInfo{ + {Name: "test", TypeCode: 8, NumRows: 1, NumCols: 1, QuantType: QuantNone}, + } + payload := make([]byte, 12) + binary.LittleEndian.PutUint64(payload[0:8], 0) // HRT + binary.LittleEndian.PutUint32(payload[8:12], 0xFFFFFFFF) + _, err := ParseData(payload, sigs, PublishModeAccumulate, time.Now()) + if err == nil { + t.Fatal("expected error for huge numSamples, got nil") + } +} + +// TestParseData_ValidStrict — a valid Strict DATA packet parses without error. +func TestParseData_ValidStrict(t *testing.T) { + sigs := []SignalInfo{ + {Name: "test", TypeCode: 8, NumRows: 1, NumCols: 1, QuantType: QuantNone}, + } + // 8 HRT + 4 bytes float32 + payload := make([]byte, 12) + binary.LittleEndian.PutUint64(payload[0:8], 1000) + binary.LittleEndian.PutUint32(payload[8:12], math.Float32bits(3.14)) + samples, err := ParseData(payload, sigs, PublishModeStrict, time.Now()) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if len(samples) != 1 { + t.Fatalf("expected 1 sample, got %d", len(samples)) + } +} diff --git a/Common/Client/go/wshub/hub.go b/Common/Client/go/wshub/hub.go index ce0f624..2f03b25 100644 --- a/Common/Client/go/wshub/hub.go +++ b/Common/Client/go/wshub/hub.go @@ -122,10 +122,48 @@ func (c *wsClient) readPump() { // ─── Hub ───────────────────────────────────────────────────────────────────── +// allowedOrigins is the set of Origin values (scheme://host[:port]) that are +// accepted for WebSocket upgrades. If empty, same-origin is enforced by +// comparing the Origin's host to the HTTP Host header. +var allowedOrigins []string + +// SetAllowedOrigins configures the WebSocket Origin allowlist. Pass an empty +// slice to enforce same-origin only (the default). +func SetAllowedOrigins(origins []string) { + allowedOrigins = origins +} + +// checkOrigin validates the Origin header against the allowlist, falling back +// to a same-origin check (Origin host == Host header) when no allowlist is +// configured. Requests with no Origin header (non-browser clients) are allowed. +func checkOrigin(r *http.Request) bool { + origin := r.Header.Get("Origin") + if origin == "" { + return true // non-browser client + } + // Check explicit allowlist first. + for _, allowed := range allowedOrigins { + if origin == allowed { + return true + } + } + // Fall back to same-origin: compare the Origin's host to the Host header. + // Origin format: "scheme://host[:port]" — strip scheme. + host := origin + if idx := strings.Index(host, "://"); idx >= 0 { + host = host[idx+3:] + } + // Strip path if present. + if idx := strings.Index(host, "/"); idx >= 0 { + host = host[:idx] + } + return host == r.Host +} + var upgrader = websocket.Upgrader{ ReadBufferSize: 4096, WriteBufferSize: 64 * 1024, - CheckOrigin: func(r *http.Request) bool { return true }, + CheckOrigin: checkOrigin, } // sourceHubState holds all data for one active data source. diff --git a/Common/Client/go/wshub/origin_test.go b/Common/Client/go/wshub/origin_test.go new file mode 100644 index 0000000..52b245b --- /dev/null +++ b/Common/Client/go/wshub/origin_test.go @@ -0,0 +1,72 @@ +package wshub + +import ( + "net/http" + "testing" +) + +// TestCheckOrigin_NoOriginHeader — non-browser clients (no Origin) are allowed. +func TestCheckOrigin_NoOriginHeader(t *testing.T) { + r := &http.Request{Header: http.Header{}} + if !checkOrigin(r) { + t.Fatal("non-browser client (no Origin header) should be allowed") + } +} + +// TestCheckOrigin_SameOrigin — Origin host matching Host header is allowed. +func TestCheckOrigin_SameOrigin(t *testing.T) { + r := &http.Request{ + Header: http.Header{ + "Origin": []string{"http://localhost:8090"}, + }, + Host: "localhost:8090", + } + if !checkOrigin(r) { + t.Fatal("same-origin request should be allowed") + } +} + +// TestCheckOrigin_CrossOriginBlocked — different Origin host is rejected. +func TestCheckOrigin_CrossOriginBlocked(t *testing.T) { + r := &http.Request{ + Header: http.Header{ + "Origin": []string{"http://evil.example.com:8090"}, + }, + Host: "localhost:8090", + } + if checkOrigin(r) { + t.Fatal("cross-origin request should be blocked") + } +} + +// TestCheckOrigin_Allowlist — explicitly allowed origins pass even if cross-origin. +func TestCheckOrigin_Allowlist(t *testing.T) { + SetAllowedOrigins([]string{"http://evil.example.com:8090"}) + defer SetAllowedOrigins(nil) // reset + + r := &http.Request{ + Header: http.Header{ + "Origin": []string{"http://evil.example.com:8090"}, + }, + Host: "localhost:8090", + } + if !checkOrigin(r) { + t.Fatal("allowlisted origin should be allowed") + } +} + +// TestCheckOrigin_AllowlistDoesNotMatch — non-allowlisted cross-origin is blocked. +func TestCheckOrigin_AllowlistDoesNotMatch(t *testing.T) { + SetAllowedOrigins([]string{"http://good.example.com"}) + defer SetAllowedOrigins(nil) + + r := &http.Request{ + Header: http.Header{ + "Origin": []string{"http://evil.example.com"}, + }, + Host: "localhost:8090", + } + if checkOrigin(r) { + t.Fatal("non-allowlisted cross-origin should be blocked") + } +} diff --git a/Makefile.gcc b/Makefile.gcc index 92b2e41..d142e2a 100644 --- a/Makefile.gcc +++ b/Makefile.gcc @@ -25,6 +25,7 @@ core: test: $(MAKE) -C Test/Components/DataSources/UDPStreamer -f Makefile.gcc + $(MAKE) -C Test/Components/DataSources/UDPStreamerClient -f Makefile.gcc $(MAKE) -C Test/Applications/StreamHub -f Makefile.gcc $(MAKE) -C Test/GTest -f Makefile.gcc $(MAKE) -C Test/Integration -f Makefile.gcc @@ -39,6 +40,7 @@ clean: $(MAKE) -C Source/Components/Interfaces/TCPLogger -f Makefile.gcc clean $(MAKE) -C Source/Components/Interfaces/DebugService -f Makefile.gcc clean $(MAKE) -C Test/Components/DataSources/UDPStreamer -f Makefile.gcc clean + $(MAKE) -C Test/Components/DataSources/UDPStreamerClient -f Makefile.gcc clean $(MAKE) -C Test/Applications/StreamHub -f Makefile.gcc clean $(MAKE) -C Test/GTest -f Makefile.gcc clean $(MAKE) -C Test/Integration -f Makefile.gcc clean diff --git a/Source/Applications/StreamHub/UDPSourceSession.cpp b/Source/Applications/StreamHub/UDPSourceSession.cpp index 7cd853a..fd26ec6 100644 --- a/Source/Applications/StreamHub/UDPSourceSession.cpp +++ b/Source/Applications/StreamHub/UDPSourceSession.cpp @@ -220,6 +220,9 @@ void UDPSourceSession::ParseConfigPayload(const uint8 *payload, uint32 size) { memcpy(&sigDescs_[i], payload + 4u + i * UDPS_SIGNAL_DESC_SIZE, UDPS_SIGNAL_DESC_SIZE); + /* MD-3: force null-termination of name/unit to prevent intra-struct OOB read */ + sigDescs_[i].name[sizeof(sigDescs_[i].name) - 1u] = '\0'; + sigDescs_[i].unit[sizeof(sigDescs_[i].unit) - 1u] = '\0'; } publishMode_ = payload[4u + numSigs * UDPS_SIGNAL_DESC_SIZE]; numSignals_ = numSigs; @@ -237,8 +240,11 @@ void UDPSourceSession::ParseConfigPayload(const uint8 *payload, uint32 size) { /* (Re)allocate the time-signal decode scratch to the largest element count. */ uint32 maxElems = 1u; for (uint32 i = 0u; i < numSigs; i++) { - uint32 ne = sigDescs_[i].numRows * sigDescs_[i].numCols; - if (ne > maxElems) { maxElems = ne; } + uint64 ne = static_cast(sigDescs_[i].numRows) * + static_cast(sigDescs_[i].numCols); + if (ne == 0u) { ne = 1u; } + if (ne > 0x100000u) { ne = 0x100000u; /* sanity cap */ } + if (ne > maxElems) { maxElems = static_cast(ne); } } if (maxElems > timeScratchLen_) { delete[] timeScratch_; @@ -343,22 +349,36 @@ void UDPSourceSession::ParseDataPayload(const uint8 *payload, uint32 size) { uint32 off = offset; for (uint32 s = 0u; s < nSigs; s++) { const UDPSSignalDescriptor &desc = descs[s]; - uint32 numElements = desc.numRows * desc.numCols; - if (numElements == 0u) { numElements = 1u; } + /* HI-1: use 64-bit multiply to avoid overflow on attacker-controlled numRows/numCols */ + uint64 numElements64 = static_cast(desc.numRows) * + static_cast(desc.numCols); + if (numElements64 == 0u) { numElements64 = 1u; } + if (numElements64 > 0x100000u) { return; /* sanity cap: 1M elements */ } + uint32 numElements = static_cast(numElements64); uint32 wireElemBytes = (desc.quantType != UDPS_QUANT_NONE) ? QuantWireBytes(desc.quantType) : MARTe::UDPSTypeCodeByteSize(desc.typeCode); if (wireElemBytes == 0u) { return; } - uint32 elemsToRead = ((pm == UDPS_PUBLISH_ACCUMULATE) && (numElements == 1u)) - ? numSamples - : numElements; + /* Accumulate mode batches one full snapshot (all elements) per RT + * cycle for every signal (scalar or array) — see UDPStreamer's + * SerializeAccumulated. HI-1: 64-bit multiply to avoid overflow on + * attacker-controlled numSamples. */ + uint64 elemsToRead64 = (pm == UDPS_PUBLISH_ACCUMULATE) + ? (numElements64 * static_cast(numSamples)) + : numElements64; + if (elemsToRead64 > 0x100000u) { return; /* sanity cap: 1M elements */ } + uint32 elemsToRead = static_cast(elemsToRead64); - if (off + elemsToRead * wireElemBytes > size) { return; } + /* HI-1: 64-bit bounds check to prevent uint32 multiply overflow */ + uint64 bytesNeeded = static_cast(off) + + static_cast(elemsToRead) * + static_cast(wireElemBytes); + if (bytesNeeded > static_cast(size)) { return; } sigOff[s] = off; sigElems[s] = elemsToRead; - off += elemsToRead * wireElemBytes; + off += static_cast(elemsToRead * wireElemBytes); } /* The decode scratch is sized at CONFIG time to the largest per-signal @@ -389,8 +409,10 @@ void UDPSourceSession::ParseDataPayload(const uint8 *payload, uint32 size) { for (uint32 s = 0u; s < nSigs; s++) { const UDPSSignalDescriptor &desc = descs[s]; - uint32 numElements = desc.numRows * desc.numCols; - if (numElements == 0u) { numElements = 1u; } + uint64 ne64 = static_cast(desc.numRows) * + static_cast(desc.numCols); + if (ne64 == 0u) { ne64 = 1u; } + uint32 numElements = static_cast(ne64); const uint32 nElems = sigElems[s]; const bool isFirstLast = (numElements > 1u) && diff --git a/Source/Applications/StreamHub/WSServer.cpp b/Source/Applications/StreamHub/WSServer.cpp index 977564b..5aa13d3 100644 --- a/Source/Applications/StreamHub/WSServer.cpp +++ b/Source/Applications/StreamHub/WSServer.cpp @@ -199,6 +199,52 @@ bool WSServer::UpgradeHTTP(BasicTCPSocket *sock) { if (strstr(hdrBuf, "\r\n\r\n") != static_cast(0)) { break; } } + /* Origin validation (CSWSH / CSRF defence, RFC 6455 §10.2). + * If an Origin header is present, its host must match the Host header + * (same-origin). Non-browser clients (no Origin) are allowed. */ + const char *originHdr = FindSubstr(hdrBuf, "Origin:"); + if (originHdr != static_cast(0)) { + originHdr += 7; /* skip "Origin:" */ + while (*originHdr == ' ') { originHdr++; } + /* Extract the host part of Origin: "scheme://host[:port]" */ + char originHost[256]; + uint32 ohLen = 0u; + const char *op = originHdr; + /* Skip scheme:// */ + const char *schemeEnd = strstr(op, "://"); + if (schemeEnd != static_cast(0)) { op = schemeEnd + 3; } + while (*op != '\r' && *op != '\n' && *op != '\0' && + *op != '/' && ohLen < 255u) { + originHost[ohLen++] = *op++; + } + originHost[ohLen] = '\0'; + + /* Extract Host header value */ + const char *hostHdr = FindSubstr(hdrBuf, "Host:"); + if (hostHdr != static_cast(0)) { + hostHdr += 5; /* skip "Host:" */ + while (*hostHdr == ' ') { hostHdr++; } + char hostVal[256]; + uint32 hvLen = 0u; + while (*hostHdr != '\r' && *hostHdr != '\n' && + *hostHdr != '\0' && hvLen < 255u) { + hostVal[hvLen++] = *hostHdr++; + } + hostVal[hvLen] = '\0'; + if (strcmp(originHost, hostVal) != 0) { + /* Cross-origin — reject the upgrade */ + const char *forbidden = + "HTTP/1.1 403 Forbidden\r\n" + "Content-Type: text/plain\r\n" + "Connection: close\r\n" + "\r\nOrigin not allowed\r\n"; + uint32 forbLen = static_cast(strlen(forbidden)); + (void) sock->Write(forbidden, forbLen); + return false; + } + } + } + /* Find Sec-WebSocket-Key */ const char *keyHdr = FindSubstr(hdrBuf, "Sec-WebSocket-Key:"); if (keyHdr == static_cast(0)) { return false; } @@ -246,8 +292,9 @@ void WSServer::ClientReadLoop(uint32 slotIdx) { WSClientSlot &slot = clients[slotIdx]; BasicTCPSocket *sock = slot.sock; - /* Receive buffer (grows as needed by simple state machine) */ - static const uint32 kRecvBuf = WS_MAX_RECV_PAYLOAD + 14u; + /* Receive buffer: WS_MAX_RECV_PAYLOAD + max header (14: 2 + 8 ext-length + + * 4 mask) + 1 spare byte for in-place NUL-termination of the payload. */ + static const uint32 kRecvBuf = WS_MAX_RECV_PAYLOAD + 14u + 1u; uint8 *buf = new uint8[kRecvBuf]; uint32 filled = 0u; @@ -431,6 +478,9 @@ uint32 WSServer::AllocSlot(BasicTCPSocket *sock) { void WSServer::FreeSlot(uint32 idx) { if (idx >= WS_MAX_CLIENTS) { return; } + /* HI-5: acquire writeMutex before modifying active/sock to prevent + * use-after-free when BroadcastText/BroadcastBinary are iterating. */ + (void) clients[idx].writeMutex.FastLock(); (void) clientsMutex.FastLock(); if (clients[idx].active) { clients[idx].active = false; @@ -442,6 +492,7 @@ void WSServer::FreeSlot(uint32 idx) { if (numClients > 0u) { numClients--; } } clientsMutex.FastUnLock(); + clients[idx].writeMutex.FastUnLock(); } } /* namespace StreamHub */ diff --git a/Source/Components/DataSources/UDPStreamer/UDPStreamer.cpp b/Source/Components/DataSources/UDPStreamer/UDPStreamer.cpp index ef5fd9f..c3e2ec6 100644 --- a/Source/Components/DataSources/UDPStreamer/UDPStreamer.cpp +++ b/Source/Components/DataSources/UDPStreamer/UDPStreamer.cpp @@ -102,7 +102,6 @@ UDPStreamer::UDPStreamer() : packetCounter = 0u; maxBatchCount = 0u; singleCycleWireBytes = 0u; - fixedWireBytes = 0u; lastPublishTs = 0u; accumBuffer = NULL_PTR(uint8 *); accumTimestamps = NULL_PTR(uint64 *); @@ -588,15 +587,21 @@ bool UDPStreamer::SetConfiguredDatabase(StructuredDataI &data) { /* --- Pass 5: Accumulate mode setup --- * - * Scalars (numElements == 1) are tagged accumulated = true and auto-assigned - * a FullArray time reference if a primary time signal exists. numCols / numRows - * are left at 1 — the actual per-packet element count is determined at runtime - * and transmitted as a 4-byte numSamples field in the DATA payload header. + * ALL signals (scalars and arrays alike) are tagged accumulated = true: + * one full snapshot (all elements) is captured and transmitted per RT + * cycle, for every cycle in the batch. This avoids silently discarding + * intermediate RT-cycle values for array ("passenger") signals — only the + * most recent slot used to be sent, whereas scalar signals always got a + * value from every slot. Scalars additionally get a FullArray time + * reference auto-assigned if a primary time signal exists. numCols / numRows + * are left at 1 for scalars — the actual per-packet element count is + * determined at runtime and transmitted as a 4-byte numSamples field in the + * DATA payload header. * - * Compute singleCycleWireBytes (accumulated signals) and fixedWireBytes - * (non-accumulated arrays that travel once per packet from the most-recent slot). - * Override totalWireBytes to the maximum possible DATA payload for wireBuffer - * allocation: 12 + maxBatchCount × singleCycleWireBytes + fixedWireBytes. + * Compute singleCycleWireBytes (sum of all signals' wireByteSize, i.e. the + * bytes needed for one RT-cycle snapshot of every signal). Override + * totalWireBytes to the maximum possible DATA payload for wireBuffer + * allocation: 12 + maxBatchCount × singleCycleWireBytes. */ if (ok && (publishMode == UDPStreamerPublishAccumulate)) { @@ -626,41 +631,36 @@ bool UDPStreamer::SetConfiguredDatabase(StructuredDataI &data) { signalInfos[primaryTsIdx].name.Buffer(), primaryTsIdx); } - /* Partition signals into accumulated (scalars) and fixed (arrays). - * Auto-assign FullArray time mode for scalars that had PacketTime. */ + /* Every signal (scalar or array) is accumulated: one full snapshot per + * RT cycle. Auto-assign FullArray time mode for scalars that had + * PacketTime. */ singleCycleWireBytes = 0u; - fixedWireBytes = 0u; for (uint32 i = 0u; i < numSigs; i++) { - if (signalInfos[i].numElements == 1u) { - signalInfos[i].accumulated = true; - singleCycleWireBytes += signalInfos[i].wireByteSize; /* = srcByteSize for 1 elem */ - /* Auto-assign time reference for non-primary, non-time scalars */ - if ((i != primaryTsIdx) && (primaryTsIdx != UDPS_NO_TIME_SIGNAL) && - (signalInfos[i].timeMode == UDPStreamerTimePacket)) { - signalInfos[i].timeMode = UDPStreamerTimeFullArray; - signalInfos[i].timeSignalIdx = primaryTsIdx; - } - } - else { - /* Non-scalar: not accumulated; wire size already computed in pass 4 */ - fixedWireBytes += signalInfos[i].wireByteSize; + signalInfos[i].accumulated = true; + singleCycleWireBytes += signalInfos[i].wireByteSize; + /* Auto-assign time reference for non-primary, non-time scalars */ + if ((signalInfos[i].numElements == 1u) && + (i != primaryTsIdx) && (primaryTsIdx != UDPS_NO_TIME_SIGNAL) && + (signalInfos[i].timeMode == UDPStreamerTimePacket)) { + signalInfos[i].timeMode = UDPStreamerTimeFullArray; + signalInfos[i].timeSignalIdx = primaryTsIdx; } } if (singleCycleWireBytes == 0u) { REPORT_ERROR(ErrorManagement::ParametersError, - "Accumulate mode: no scalar signals found to accumulate."); + "Accumulate mode: no signals found to accumulate."); ok = false; } if (ok) { - /* DATA payload: [8 HRT][4 numSamples][numSamples × singleCycle][fixed] */ + /* DATA payload: [8 HRT][4 numSamples][numSamples × singleCycle] */ static const uint32 ACCUM_HEADER = UDPS_TIMESTAMP_BYTES + 4u; /* 12 bytes */ - if ((ACCUM_HEADER + singleCycleWireBytes + fixedWireBytes) > maxPayloadSize) { + if ((ACCUM_HEADER + singleCycleWireBytes) > maxPayloadSize) { REPORT_ERROR(ErrorManagement::ParametersError, "Accumulate mode: even a single sample (%u B) exceeds " "MaxPayloadSize (%u B).", - ACCUM_HEADER + singleCycleWireBytes + fixedWireBytes, + ACCUM_HEADER + singleCycleWireBytes, maxPayloadSize); ok = false; } @@ -668,13 +668,13 @@ bool UDPStreamer::SetConfiguredDatabase(StructuredDataI &data) { if (ok) { static const uint32 ACCUM_HEADER = UDPS_TIMESTAMP_BYTES + 4u; - maxBatchCount = (maxPayloadSize - ACCUM_HEADER - fixedWireBytes) / singleCycleWireBytes; + maxBatchCount = (maxPayloadSize - ACCUM_HEADER) / singleCycleWireBytes; /* Override totalWireBytes: size of the largest possible DATA payload */ - totalWireBytes = ACCUM_HEADER + maxBatchCount * singleCycleWireBytes + fixedWireBytes; + totalWireBytes = ACCUM_HEADER + maxBatchCount * singleCycleWireBytes; REPORT_ERROR(ErrorManagement::Information, - "Accumulate mode: singleCycleWireBytes=%u, fixedWireBytes=%u, " + "Accumulate mode: singleCycleWireBytes=%u, " "maxBatchCount=%u, maxPayloadSize=%u, totalWireBytes=%u.", - singleCycleWireBytes, fixedWireBytes, + singleCycleWireBytes, maxBatchCount, maxPayloadSize, totalWireBytes); } } @@ -697,7 +697,17 @@ bool UDPStreamer::AllocateMemory() { /* In Accumulate mode, readyBuffer / scratchBuffer hold maxBatchCount consecutive * snapshots instead of a single one. */ - uint32 readyBufSize = (maxBatchCount > 0u) ? (maxBatchCount * totalSrcBytes) : totalSrcBytes; + /* HI-3: use 64-bit arithmetic to prevent overflow in maxBatchCount * totalSrcBytes */ + uint64 readyBufSize64 = (maxBatchCount > 0u) + ? (static_cast(maxBatchCount) * static_cast(totalSrcBytes)) + : static_cast(totalSrcBytes); + if (readyBufSize64 > 0xFFFFFFFFu) { + REPORT_ERROR(ErrorManagement::FatalError, + "Accumulate buffer size overflow (maxBatchCount=%u * totalSrcBytes=%u).", + maxBatchCount, totalSrcBytes); + return false; + } + uint32 readyBufSize = static_cast(readyBufSize64); /* readyBuffer: copy of signal memory shared with background thread */ readyBuffer = reinterpret_cast(heap->Malloc(readyBufSize)); @@ -854,6 +864,22 @@ bool UDPStreamer::Synchronise() { * readyTimestamps and dataSem is posted. The background thread sends * the ready batch without any additional timer check. */ bufMutex.FastLock(TTInfiniteWait); + /* HI-3: if accumFill reached maxBatchCount, force-flush before writing */ + if (accumFill >= maxBatchCount) { + uint32 filled = accumFill; + (void) MemoryOperationsHelper::Copy( + readyBuffer, accumBuffer, filled * totalSrcBytes); + (void) MemoryOperationsHelper::Copy( + reinterpret_cast(readyTimestamps), + reinterpret_cast(accumTimestamps), + filled * static_cast(sizeof(uint64))); + readyFill = filled; + accumFill = 0u; + lastPublishTs = ts; + bufMutex.FastUnLock(); + (void) dataSem.Post(); + bufMutex.FastLock(TTInfiniteWait); + } uint8 *slot = accumBuffer + (accumFill * totalSrcBytes); (void) MemoryOperationsHelper::Copy(slot, memory, totalSrcBytes); accumTimestamps[accumFill] = ts; @@ -863,7 +889,7 @@ bool UDPStreamer::Synchronise() { /* Check flush conditions (volatile read of lastPublishTs is safe on x86). */ static const uint32 ACCUM_HEADER = UDPS_TIMESTAMP_BYTES + 4u; /* 12 bytes */ - uint32 curPayload = ACCUM_HEADER + filled * singleCycleWireBytes + fixedWireBytes; + uint32 curPayload = ACCUM_HEADER + filled * singleCycleWireBytes; uint32 nextPayload = curPayload + singleCycleWireBytes; bool sizeCondition = (nextPayload >= maxPayloadSize); bool timeCondition = ((ts - lastPublishTs) >= flushPeriodTicks); @@ -959,7 +985,7 @@ ErrorManagement::ErrorType UDPStreamer::Execute(ExecutionInfo &info) { if (fill > 0u) { SerializeAccumulated(scratchBuffer, scratchTimestamps, fill); uint32 sendBytes = UDPS_TIMESTAMP_BYTES + 4u + - fill * singleCycleWireBytes + fixedWireBytes; + fill * singleCycleWireBytes; packetCounter++; if (!server.SendData(packetCounter, wireBuffer, sendBytes)) { REPORT_ERROR(ErrorManagement::Warning, @@ -1004,9 +1030,9 @@ void UDPStreamer::SerializeAccumulated(const uint8 *src, /* Wire layout (Accumulate mode DATA payload): * [8 bytes] : HRT of slot 0 (oldest sample) * [4 bytes] : numSamples (uint32, little-endian) - * for each signal: - * if accumulated : numSamples elements (one per slot) - * if non-accumulated (array): one copy from the most-recent slot + * for each signal : numSamples snapshots in order (slot 0 = oldest), + * each snapshot holding all of the signal's elements + * (1 for scalars, numElements for arrays) */ uint8 *dst = wireBuffer; @@ -1019,83 +1045,22 @@ void UDPStreamer::SerializeAccumulated(const uint8 *src, dst += 4u; for (uint32 i = 0u; i < numSigs; i++) { - if (signalInfos[i].accumulated) { - /* Scalar: pack one value from each slot in order */ - uint32 elemSrcBytes = signalInfos[i].srcByteSize; /* bytes for one element */ + const uint32 nelems = signalInfos[i].numElements; + const bool isSrcFloat32 = (signalInfos[i].type == Float32Bit); + const float64 rMin = signalInfos[i].rangeMin; + float64 rRange = signalInfos[i].rangeMax - rMin; + if (rRange == 0.0) { rRange = 1.0; } - for (uint32 k = 0u; k < numSamples; k++) { - const uint8 *slotSrc = src + (k * totalSrcBytes) + signalInfos[i].bufferOffset; - - if (signalInfos[i].quantType == UDPStreamerQuantNone) { - (void) MemoryOperationsHelper::Copy(dst, slotSrc, elemSrcBytes); - dst += elemSrcBytes; - } - else { - float64 rawVal = 0.0; - if (signalInfos[i].type == Float32Bit) { - float32 f32 = 0.0f; - (void) MemoryOperationsHelper::Copy(&f32, slotSrc, 4u); - rawVal = static_cast(f32); - } - else { - (void) MemoryOperationsHelper::Copy(&rawVal, slotSrc, 8u); - } - float64 rMin = signalInfos[i].rangeMin; - float64 rRange = signalInfos[i].rangeMax - rMin; - if (rRange == 0.0) { rRange = 1.0; } - float64 norm = (rawVal - rMin) / rRange; - if (norm < 0.0) { norm = 0.0; } - if (norm > 1.0) { norm = 1.0; } - switch (signalInfos[i].quantType) { - case UDPStreamerQuantUint8: { - uint8 q = static_cast(norm * 255.0); - *dst = q; dst += 1u; - break; - } - case UDPStreamerQuantInt8: { - int8 q = static_cast((norm * 254.0) - 127.0); - (void) MemoryOperationsHelper::Copy(dst, &q, 1u); - dst += 1u; - break; - } - case UDPStreamerQuantUint16: { - uint16 q = static_cast(norm * 65535.0); - (void) MemoryOperationsHelper::Copy(dst, &q, 2u); - dst += 2u; - break; - } - case UDPStreamerQuantInt16: { - int16 q = static_cast((norm * 65534.0) - 32767.0); - (void) MemoryOperationsHelper::Copy(dst, &q, 2u); - dst += 2u; - break; - } - default: { - (void) MemoryOperationsHelper::Copy(dst, slotSrc, elemSrcBytes); - dst += elemSrcBytes; - break; - } - } - } - } - } - else { - /* Non-accumulated array: send from the most-recent slot */ - const uint8 *slotSrc = src + ((numSamples - 1u) * totalSrcBytes) + - signalInfos[i].bufferOffset; + /* Pack one snapshot (all elements) from each slot, in order */ + for (uint32 k = 0u; k < numSamples; k++) { + const uint8 *slotSrc = src + (k * totalSrcBytes) + signalInfos[i].bufferOffset; if (signalInfos[i].quantType == UDPStreamerQuantNone) { (void) MemoryOperationsHelper::Copy(dst, slotSrc, signalInfos[i].srcByteSize); dst += signalInfos[i].srcByteSize; } else { - float64 rMin = signalInfos[i].rangeMin; - float64 rRange = signalInfos[i].rangeMax - rMin; - if (rRange == 0.0) { rRange = 1.0; } - bool isSrcFloat32 = (signalInfos[i].type == Float32Bit); - uint32 nelems = signalInfos[i].numElements; - const uint8 *s = slotSrc; - + const uint8 *s = slotSrc; for (uint32 e = 0u; e < nelems; e++) { float64 rawVal = 0.0; if (isSrcFloat32) { diff --git a/Source/Components/DataSources/UDPStreamer/UDPStreamer.h b/Source/Components/DataSources/UDPStreamer/UDPStreamer.h index 1eae741..20776cd 100644 --- a/Source/Components/DataSources/UDPStreamer/UDPStreamer.h +++ b/Source/Components/DataSources/UDPStreamer/UDPStreamer.h @@ -103,7 +103,7 @@ struct UDPStreamerSignalInfo { uint32 srcByteSize; /**< Bytes in MARTe2 memory */ uint32 wireByteSize; /**< Bytes on the wire (may differ when quantized) */ uint32 bufferOffset; /**< Byte offset in the flat MemoryDataSourceI memory buffer */ - bool accumulated; /**< True when this scalar was expanded to flushCount elements in Auto accumulation mode */ + bool accumulated; /**< True when this signal is batched (one snapshot per RT cycle) in Accumulate mode */ }; /** @@ -358,8 +358,7 @@ private: uint64 flushPeriodTicks; /**< HRT ticks per flush interval (computed from minRefreshRate) */ /* Accumulate mode — dynamic batch parameters */ uint32 maxBatchCount; /**< Max snapshots that fit in MaxPayloadSize (Accumulate) */ - uint32 singleCycleWireBytes; /**< Wire bytes for all accumulated signals per snapshot */ - uint32 fixedWireBytes; /**< Wire bytes for non-accumulated signals (arrays, once per packet) */ + uint32 singleCycleWireBytes; /**< Wire bytes for ALL signals (scalar and array) per snapshot */ volatile uint64 lastPublishTs; /**< HRT counter of last successful flush (Accumulate mode) */ uint8 *accumBuffer; /**< Heap: [maxBatchCount × totalSrcBytes] linear fill */ uint64 *accumTimestamps; /**< Heap: [maxBatchCount] HRT counter per snapshot */ diff --git a/Source/Components/DataSources/UDPStreamerClient/UDPStreamerClient.cpp b/Source/Components/DataSources/UDPStreamerClient/UDPStreamerClient.cpp index 2cf70b5..11b1910 100644 --- a/Source/Components/DataSources/UDPStreamerClient/UDPStreamerClient.cpp +++ b/Source/Components/DataSources/UDPStreamerClient/UDPStreamerClient.cpp @@ -517,7 +517,11 @@ void UDPStreamerClient::DecodeSnapshot(const uint8 *payload, uint32 size, const bool accScalar = (publishMode == UDPS_PUBLISH_ACCUMULATE) && (ne == 1u); const uint32 elemsToRead = accScalar ? numSamples : ne; - if ((off + (elemsToRead * wireElemBytes)) > size) { return; } + /* HI-1: 64-bit bounds check to prevent uint32 multiply overflow */ + uint64 bytesNeeded = static_cast(off) + + static_cast(elemsToRead) * + static_cast(wireElemBytes); + if (bytesNeeded > static_cast(size)) { return; } uint8 *d = dst + info.bufferOffset; diff --git a/Source/Components/Interfaces/DebugService/DebugCore.h b/Source/Components/Interfaces/DebugService/DebugCore.h index a7ce8a7..848896a 100644 --- a/Source/Components/Interfaces/DebugService/DebugCore.h +++ b/Source/Components/Interfaces/DebugService/DebugCore.h @@ -78,8 +78,9 @@ public: bool Push(uint32 signalID, uint64 timestamp, void* data, uint32 size) { uint32 packetSize = 4 + 8 + 4 + size; // ID + TS + Size + Data - uint32 read = readIndex; - uint32 write = writeIndex; + /* HI-9: use atomic loads for cross-thread index reads */ + uint32 read = __atomic_load_n(&readIndex, __ATOMIC_ACQUIRE); + uint32 write = __atomic_load_n(&writeIndex, __ATOMIC_ACQUIRE); uint32 available = 0; if (read <= write) { @@ -96,13 +97,15 @@ public: WriteToBuffer(&tempWrite, &size, 4); WriteToBuffer(&tempWrite, data, size); - writeIndex = tempWrite; + // HI-9: release store so data writes are visible before index update + __atomic_store_n(&writeIndex, tempWrite, __ATOMIC_RELEASE); return true; } bool Pop(uint32 &signalID, uint64 ×tamp, void* dataBuffer, uint32 &size, uint32 maxSize) { - uint32 read = readIndex; - uint32 write = writeIndex; + /* HI-9: acquire-load writeIndex to see data written by Push */ + uint32 read = __atomic_load_n(&readIndex, __ATOMIC_ACQUIRE); + uint32 write = __atomic_load_n(&writeIndex, __ATOMIC_ACQUIRE); if (read == write) return false; uint32 tempRead = read; @@ -124,9 +127,9 @@ public: // locate the next entry safely, so fall back to discarding everything // to avoid reading garbage as sample headers on future Pop() calls. if (tempSize >= bufferSize) { - readIndex = write; // corrupt ring — discard all + __atomic_store_n(&readIndex, write, __ATOMIC_RELEASE); // corrupt ring — discard all } else { - readIndex = (tempRead + tempSize) % bufferSize; + __atomic_store_n(&readIndex, (tempRead + tempSize) % bufferSize, __ATOMIC_RELEASE); } return false; } @@ -137,13 +140,14 @@ public: timestamp = tempTs; size = tempSize; - readIndex = tempRead; + // HI-9: release-store readIndex after reading data + __atomic_store_n(&readIndex, tempRead, __ATOMIC_RELEASE); return true; } uint32 Count() { - uint32 read = readIndex; - uint32 write = writeIndex; + uint32 read = __atomic_load_n(&readIndex, __ATOMIC_ACQUIRE); + uint32 write = __atomic_load_n(&writeIndex, __ATOMIC_ACQUIRE); if (write >= read) return write - read; return bufferSize - (read - write); } diff --git a/Source/Components/Interfaces/DebugService/DebugService.cpp b/Source/Components/Interfaces/DebugService/DebugService.cpp index 91af922..bbb8610 100644 --- a/Source/Components/Interfaces/DebugService/DebugService.cpp +++ b/Source/Components/Interfaces/DebugService/DebugService.cpp @@ -13,6 +13,7 @@ #include "Threads.h" #include "TimeoutType.h" #include "UDPSProtocol.h" +#include namespace MARTe { @@ -122,6 +123,12 @@ bool DebugService::Initialise(StructuredDataI &data) { suppressTimeoutLogs = (suppress == 1u); } + StreamString tempToken; + if (data.Read("AuthToken", tempToken)) { + authToken = tempToken; + } + clientAuthenticated = (authToken.Size() == 0u); + // Capture only the local subtree — do NOT call MoveToRoot() on the shared CDB. (void)data.Copy(fullConfig); @@ -281,6 +288,8 @@ ErrorManagement::ErrorType DebugService::Server(ExecutionInfo &info) { cmdCountInWindow = 0u; cmdWindowStartMs = nowMs; lastDataTimeMs = nowMs; + /* CR-5: require auth if an AuthToken is configured. */ + clientAuthenticated = (authToken.Size() == 0u); } } else { if (nowMs - lastDataTimeMs > CLIENT_IDLE_TIMEOUT_MS) { @@ -351,23 +360,101 @@ ErrorManagement::ErrorType DebugService::Server(ExecutionInfo &info) { uint32 cmdLen = len; command.Write(raw + lineStart, cmdLen); - // Dispatch via base HandleCommand, write response to socket. - StreamString out; - HandleCommand(command, out); - if (out.Size() > 0u) { - const char8 *wPtr = out.Buffer(); - uint32 remaining = (uint32)out.Size(); - lastDataTimeMs = (uint64)((float64)HighResolutionTimer::Counter() * - HighResolutionTimer::Period() * 1000.0); - while (remaining > 0u) { - uint32 wrote = remaining; - if (!activeClient->Write(wPtr, wrote) || wrote == 0u) { - break; + /* CR-5: Auth token gate. If an AuthToken is + * configured, the client must send + * "AUTH " before any other command. */ + if (authToken.Size() > 0u) { + const char8 *cmdPtr = command.Buffer(); + if (cmdLen >= 5u && + strncmp(cmdPtr, "AUTH ", 5u) == 0) { + const char8 *recvToken = cmdPtr + 5u; + uint32 recvLen = cmdLen - 5u; + /* Strip trailing \r if present */ + if (recvLen > 0u && + recvToken[recvLen - 1u] == '\r') { + recvLen--; } - wPtr += wrote; - remaining -= wrote; + if (recvLen == authToken.Size() && + strncmp(recvToken, + authToken.Buffer(), + recvLen) == 0) { + clientAuthenticated = true; + const char8 *okResp = + "OK AUTHENTICATED\n"; + uint32 respSz = + static_cast( + strlen(okResp)); + (void) activeClient->Write( + okResp, respSz); + } else { + const char8 *badResp = + "ERR AUTH_FAILED\n"; + uint32 respSz = + static_cast( + strlen(badResp)); + (void) activeClient->Write( + badResp, respSz); + } + } else if (!clientAuthenticated) { + const char8 *needAuth = + "ERR AUTH_REQUIRED\n"; + uint32 respSz = + static_cast( + strlen(needAuth)); + (void) activeClient->Write( + needAuth, respSz); + } else { + // Dispatch via base HandleCommand, + // write response to socket. + StreamString out; + HandleCommand(command, out); + if (out.Size() > 0u) { + const char8 *wPtr = out.Buffer(); + uint32 remaining = + (uint32)out.Size(); + lastDataTimeMs = + (uint64)((float64) + HighResolutionTimer::Counter() * + HighResolutionTimer::Period() * + 1000.0); + while (remaining > 0u) { + uint32 wrote = remaining; + if (!activeClient->Write( + wPtr, wrote) || + wrote == 0u) { + break; + } + wPtr += wrote; + remaining -= wrote; + lastDataTimeMs = + (uint64)((float64) + HighResolutionTimer::Counter() * + HighResolutionTimer::Period() * + 1000.0); + } + } + } + } else { + // No auth token configured — back-compat. + // Dispatch via base HandleCommand, write + // response to socket. + StreamString out; + HandleCommand(command, out); + if (out.Size() > 0u) { + const char8 *wPtr = out.Buffer(); + uint32 remaining = (uint32)out.Size(); lastDataTimeMs = (uint64)((float64)HighResolutionTimer::Counter() * HighResolutionTimer::Period() * 1000.0); + while (remaining > 0u) { + uint32 wrote = remaining; + if (!activeClient->Write(wPtr, wrote) || wrote == 0u) { + break; + } + wPtr += wrote; + remaining -= wrote; + lastDataTimeMs = (uint64)((float64)HighResolutionTimer::Counter() * + HighResolutionTimer::Period() * 1000.0); + } } } } diff --git a/Source/Components/Interfaces/DebugService/DebugService.h b/Source/Components/Interfaces/DebugService/DebugService.h index 3de994a..8b4eacb 100644 --- a/Source/Components/Interfaces/DebugService/DebugService.h +++ b/Source/Components/Interfaces/DebugService/DebugService.h @@ -76,6 +76,13 @@ private: bool isServer; bool suppressTimeoutLogs; + /** Optional authentication token (CR-5). If set (non-empty), the first + * command from a new TCP client must be "AUTH ". All other + * commands are rejected until the client authenticates. If empty + * (default), no authentication is required (back-compat). */ + StreamString authToken; + bool clientAuthenticated; + BasicTCPSocket tcpServer; UDPSServer udpsServer; ///< Handles fragmentation and multi-client sending diff --git a/Source/Components/Interfaces/DebugService/DebugServiceBase.cpp b/Source/Components/Interfaces/DebugService/DebugServiceBase.cpp index 601f97e..104dc8b 100644 --- a/Source/Components/Interfaces/DebugService/DebugServiceBase.cpp +++ b/Source/Components/Interfaces/DebugService/DebugServiceBase.cpp @@ -181,6 +181,12 @@ static void BuildCDBFromContainer(ReferenceContainer *container, } } +/* HI-8: Guard against double-patching (e.g. two DebugService instances). + * Once the registry has been patched, subsequent PatchRegistry() calls are + * no-ops. Original builders are not saved/restored — the debug wrappers + * persist for the process lifetime (intentional for transparent debugging). */ +static bool registryPatched = false; + static void PatchItemInternal(const char8 *originalName, ObjectBuilder *debugBuilder) { ClassRegistryItem *item = @@ -215,6 +221,14 @@ DebugServiceBase::~DebugServiceBase() { // --------------------------------------------------------------------------- void DebugServiceBase::PatchRegistry() { + /* HI-8: skip if already patched (prevents double-patch leak when multiple + * DebugService instances are created). */ + if (registryPatched) { + REPORT_ERROR_STATIC(ErrorManagement::Warning, + "PatchRegistry: registry already patched — skipping (double-patch guard)."); + return; + } + registryPatched = true; PatchItemInternal("MemoryMapInputBroker", new DebugMemoryMapInputBrokerBuilder()); PatchItemInternal("MemoryMapOutputBroker", @@ -305,13 +319,20 @@ void DebugServiceBase::ProcessSignal(DebugSignalInfo *signalInfo, uint32 size, return; if (signalInfo->isForcing) { uint32 nEl = signalInfo->numberOfElements; + /* HI-4: clamp size to forcedValue buffer to prevent OOB read */ + uint32 forceSize = size; + if (forceSize > static_cast(sizeof(signalInfo->forcedValue))) { + forceSize = static_cast(sizeof(signalInfo->forcedValue)); + } if (nEl <= 1u) { - // Scalar — single memcpy. - memcpy(signalInfo->memoryAddress, signalInfo->forcedValue, size); + // Scalar — single memcpy (clamped to forcedValue bounds). + memcpy(signalInfo->memoryAddress, signalInfo->forcedValue, forceSize); } else { // Array — copy only the elements whose bit is set in forcedMask. - uint32 elemBytes = size / nEl; - for (uint32 e = 0u; e < nEl; e++) { + // HI-4: cap loop at 256 elements (forcedMask is 32 bytes = 256 bits). + uint32 elemBytes = forceSize / nEl; + uint32 nElCapped = (nEl > 256u) ? 256u : nEl; + for (uint32 e = 0u; e < nElCapped; e++) { if (signalInfo->forcedMask[e >> 3u] & (uint8)(1u << (e & 7u))) { memcpy((uint8 *)signalInfo->memoryAddress + e * elemBytes, signalInfo->forcedValue + e * elemBytes, diff --git a/Source/Components/Interfaces/UDPStream/UDPSClient.cpp b/Source/Components/Interfaces/UDPStream/UDPSClient.cpp index 8bea22a..42ac3cd 100644 --- a/Source/Components/Interfaces/UDPStream/UDPSClient.cpp +++ b/Source/Components/Interfaces/UDPStream/UDPSClient.cpp @@ -9,6 +9,7 @@ #include "MemoryOperationsHelper.h" #include +#include #include namespace MARTe { @@ -26,6 +27,7 @@ UDPSClient::UDPSClient() maxPayloadSize(UDPS_CLIENT_DEFAULT_MAX_PAYLOAD), cpuMask(0xFFFFFFFFu), stackSize(65536u), + recvBufferSize(UDPS_CLIENT_DEFAULT_RECV_BUFFER), listener(NULL_PTR(UDPSClientListener *)), threadService(*this), connected(false), @@ -98,6 +100,9 @@ bool UDPSClient::Initialise(StructuredDataI &data) { (void) data.Read("CPUMask", cpuMask); (void) data.Read("StackSize", stackSize); + recvBufferSize = UDPS_CLIENT_DEFAULT_RECV_BUFFER; + (void) data.Read("RecvBufferSize", recvBufferSize); + return true; } @@ -209,6 +214,23 @@ bool UDPSClient::Connect() { return ok; } +void UDPSClient::SetRecvBufferSize(BasicUDPSocket &sock) { + /* BasicUDPSocket exposes no SO_RCVBUF API; the OS default (Linux + * rmem_default, typically ~208 KiB) is easily overrun by high-throughput + * sources, causing silent kernel-level datagram drops. Work around this + * by calling setsockopt() directly on the raw handle. Best-effort: a + * failure here just leaves the OS default in place. */ + Handle fd = sock.GetReadHandle(); + if (fd >= 0) { + int32 sz = static_cast(recvBufferSize); + if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &sz, sizeof(sz)) != 0) { + REPORT_ERROR_STATIC(ErrorManagement::Warning, + "UDPSClient: Could not set SO_RCVBUF to %u bytes.", + recvBufferSize); + } + } +} + bool UDPSClient::ConnectUnicast() { // Open a local UDP socket bound to an ephemeral port if (!recvSocket.Open()) { @@ -216,6 +238,7 @@ bool UDPSClient::ConnectUnicast() { "UDPSClient: Could not open receive socket."); return false; } + SetRecvBufferSize(recvSocket); if (!recvSocket.Listen(0u)) { REPORT_ERROR_STATIC(ErrorManagement::Warning, @@ -256,6 +279,7 @@ bool UDPSClient::ConnectMulticast() { "UDPSClient: Could not open multicast socket."); return false; } + SetRecvBufferSize(mcastSocket); bool ok = mcastSocket.Listen(dataPort); if (!ok) { @@ -378,6 +402,15 @@ bool UDPSClient::ReceiveAndProcess() { return false; } + /* HI-6: guard against FD_SETSIZE overflow */ + if (fd < 0 || fd >= FD_SETSIZE || + (tcpFd >= 0 && tcpFd >= FD_SETSIZE)) { + REPORT_ERROR_STATIC(ErrorManagement::Warning, + "UDPSClient: fd >= FD_SETSIZE (%d/%d) — skipping select.", + fd, tcpFd); + return false; + } + fd_set rset; FD_ZERO(&rset); FD_SET(fd, &rset); diff --git a/Source/Components/Interfaces/UDPStream/UDPSClient.h b/Source/Components/Interfaces/UDPStream/UDPSClient.h index f0320fe..d9691e7 100644 --- a/Source/Components/Interfaces/UDPStream/UDPSClient.h +++ b/Source/Components/Interfaces/UDPStream/UDPSClient.h @@ -95,6 +95,12 @@ public: /** Default maximum payload size (bytes, excluding 17-byte header). */ static const uint32 UDPS_CLIENT_DEFAULT_MAX_PAYLOAD = 1400u; + /** Default OS UDP receive socket buffer size (bytes). The Linux default + * (rmem_default, typically ~208 KiB) is easily overrun by high-throughput + * sources (e.g. multi-hundred-KiB bursts every few ms), causing silent + * kernel-level datagram drops. 4 MiB gives generous burst headroom. */ + static const uint32 UDPS_CLIENT_DEFAULT_RECV_BUFFER = 4194304u; // 4 MiB + UDPSClient(); virtual ~UDPSClient(); @@ -111,6 +117,7 @@ public: * - MaxPayloadSize (uint32) Max payload bytes per datagram, excluding header. Default 1400. * - CPUMask (uint32) CPU affinity mask for the receive thread. Default 0xFFFFFFFF. * - StackSize (uint32) Stack size for the receive thread. Default 65536. + * - RecvBufferSize (uint32) OS UDP receive socket buffer size (bytes). Default 4 MiB. */ bool Initialise(StructuredDataI &data); @@ -165,6 +172,9 @@ private: bool ConnectUnicast(); bool ConnectMulticast(); + /** Set the OS receive buffer size (SO_RCVBUF) on a UDP socket's raw handle. */ + void SetRecvBufferSize(BasicUDPSocket &sock); + void ProcessDatagram(const uint8 *buf, uint32 size); /** Read one full UDPS frame (header + payload) from the TCP control socket. */ bool ReceiveTCPFrame(); @@ -188,6 +198,7 @@ private: uint32 maxPayloadSize; uint32 cpuMask; uint32 stackSize; + uint32 recvBufferSize; // ------------------------------------------------------------------------- // Runtime state diff --git a/Source/Components/Interfaces/UDPStream/UDPSServer.cpp b/Source/Components/Interfaces/UDPStream/UDPSServer.cpp index b818959..84ed738 100644 --- a/Source/Components/Interfaces/UDPStream/UDPSServer.cpp +++ b/Source/Components/Interfaces/UDPStream/UDPSServer.cpp @@ -268,6 +268,7 @@ void UDPSServer::ServiceClients() { } // Non-blocking peek int fd = tcpClients[i]->GetReadHandle(); + if (fd < 0 || fd >= FD_SETSIZE) { continue; /* HI-6: skip FDs outside select range */ } fd_set rset; FD_ZERO(&rset); FD_SET(fd, &rset); @@ -303,6 +304,7 @@ void UDPSServer::ServiceClients() { return; } int fd = serverSocket.GetReadHandle(); + if (fd < 0 || fd >= FD_SETSIZE) { return; /* HI-6 */ } fd_set rset; FD_ZERO(&rset); FD_SET(fd, &rset); diff --git a/Test/Applications/StreamHub/BoundsCheckTest.cpp b/Test/Applications/StreamHub/BoundsCheckTest.cpp new file mode 100644 index 0000000..33c7793 --- /dev/null +++ b/Test/Applications/StreamHub/BoundsCheckTest.cpp @@ -0,0 +1,73 @@ +/** + * @file BoundsCheckTest.cpp + * @brief Reproduction tests for HI-1 (integer overflow in bounds check) and + * HI-4 (unclamped forcedValue memcpy). + * + * These tests verify that the 64-bit bounds check pattern correctly rejects + * crafted payloads whose 32-bit multiply would overflow, and that the + * forcedValue clamp prevents OOB reads. + */ + +#include +#include +#include + +// HI-1: Verify that a 64-bit bounds check rejects a payload where +// elemsToRead * wireElemBytes would overflow uint32. +TEST(BoundsCheckTest, OverflowRejected) { + // Simulate: numSamples = 0x20000001, wireElemBytes = 8 + // 32-bit: 0x20000001 * 8 = 0x8 (overflow!) + // 64-bit: 0x100000008 (correctly large, > any reasonable payload size) + uint32_t elemsToRead = 0x20000001u; + uint32_t wireElemBytes = 8u; + uint32_t off = 12u; // after HRT + numSamples + uint32_t size = 1400u; // typical max payload + + // This is the FIXED pattern (64-bit): + uint64_t bytesNeeded = static_cast(off) + + static_cast(elemsToRead) * + static_cast(wireElemBytes); + // Should reject (bytesNeeded >> size) + EXPECT_GT(bytesNeeded, static_cast(size)) + << "64-bit check should detect overflow that 32-bit would miss"; + + // Verify the OLD (buggy) 32-bit pattern would have passed: + uint32_t oldCheck = off + (elemsToRead * wireElemBytes); + // On 32-bit: 0x20000001 * 8 = 0x100000008 truncated to 0x8 + // off + 0x8 = 20, which is < 1400, so the old check would pass (bug!) + // On 64-bit: the multiply doesn't overflow, so oldCheck is huge + // This test documents that the 64-bit fix is necessary on 32-bit platforms + // and correct on 64-bit. +} + +// HI-1: Verify a normal (non-overflow) case passes the 64-bit check. +TEST(BoundsCheckTest, NormalCasePasses) { + uint32_t elemsToRead = 100u; + uint32_t wireElemBytes = 4u; + uint32_t off = 12u; + uint32_t size = 500u; + + uint64_t bytesNeeded = static_cast(off) + + static_cast(elemsToRead) * + static_cast(wireElemBytes); + EXPECT_LE(bytesNeeded, static_cast(size)) + << "normal case should pass the bounds check"; +} + +// HI-1: Verify numRows * numCols overflow is detected. +TEST(BoundsCheckTest, NumRowsNumColsOverflow) { + uint32_t numRows = 0x10000u; + uint32_t numCols = 0x10000u; + + // 32-bit: 0x10000 * 0x10000 = 0 (overflow!) + uint32_t oldResult = numRows * numCols; + EXPECT_EQ(oldResult, 0u) << "32-bit multiply should overflow to 0"; + + // 64-bit fix: + uint64_t newResult = static_cast(numRows) * + static_cast(numCols); + EXPECT_EQ(newResult, static_cast(0x100000000u)) + << "64-bit multiply should give correct result"; + EXPECT_GT(newResult, static_cast(0x100000u)) + << "should exceed the sanity cap, triggering rejection"; +} diff --git a/Test/Applications/StreamHub/WSServerBufferTest.cpp b/Test/Applications/StreamHub/WSServerBufferTest.cpp new file mode 100644 index 0000000..997393d --- /dev/null +++ b/Test/Applications/StreamHub/WSServerBufferTest.cpp @@ -0,0 +1,92 @@ +/** + * @file WSServerBufferTest.cpp + * @brief Reproduction test for CR-1: 1-byte heap OOB write in WSServer. + * + * Verifies that the receive buffer allocated in ClientReadLoop is large enough + * to hold a maximal masked WebSocket frame (14-byte header + 65536 payload) + * plus one extra byte for in-place NUL-termination, without overflowing. + * + * Build: linked into the GTest harness alongside MainGTest.cpp. + */ + +#include "WSFrame.h" +#include +#include +#include + +using namespace StreamHub; + +// Mirror the WSServer.h constant (TEST_WS_MAX_RECV_PAYLOAD = 65536). +static const uint32 TEST_WS_MAX_RECV_PAYLOAD = 65536u; + +// Test: A maximal masked WebSocket frame (64-bit extended length, masked) +// with payloadLen = TEST_WS_MAX_RECV_PAYLOAD must fit within kRecvBuf, and +// payload[plen] must be a valid in-bounds index (for NUL-termination). +TEST(WSServerBufferTest, MaximalFrameFitsInRecvBuffer) { + // Reproduce the exact buffer sizing logic from WSServer::ClientReadLoop. + const uint32 kRecvBuf = TEST_WS_MAX_RECV_PAYLOAD + 14u + 1u; + uint8 *buf = new uint8[kRecvBuf]; + + // Build a maximal masked frame: FIN + TEXT, payloadLen=65536 (64-bit ext), + // mask=1. + uint8 frame[14 + 65536]; + frame[0] = WS_FIN_BIT | WS_OPCODE_TEXT; // FIN + TEXT + frame[1] = WS_MASK_BIT | 127u; // masked + 64-bit length + // 8-byte extended length = 65536 + uint64 plen = TEST_WS_MAX_RECV_PAYLOAD; + for (int i = 7; i >= 0; i--) { + frame[2 + i] = static_cast(plen & 0xFFu); + plen >>= 8u; + } + // 4-byte mask key + frame[10] = 0xAA; frame[11] = 0xBB; frame[12] = 0xCC; frame[13] = 0xDD; + // Payload (doesn't matter, just fill with zeros) + memset(frame + 14, 0, 65536); + + // Copy into buf (simulating a TCP read) + ASSERT_LE(sizeof(frame), static_cast(kRecvBuf)); + memcpy(buf, frame, sizeof(frame)); + + // Parse the header + WSFrameHeader hdr; + ASSERT_TRUE(WSParseHeader(buf, sizeof(frame), hdr)); + ASSERT_EQ(hdr.headerSize, 14u); + ASSERT_EQ(hdr.payloadLen, static_cast(TEST_WS_MAX_RECV_PAYLOAD)); + ASSERT_TRUE(hdr.masked); + + // Unmask + uint8 *payload = buf + hdr.headerSize; + WSUnmask(payload, static_cast(hdr.payloadLen), hdr.maskKey); + + // The critical check: payload[plen] must be within the buffer. + // Before the fix, kRecvBuf was 65550 and payload[65536] = buf[65550] + // was one byte past the end. After the fix (+1), it's in bounds. + uint32 plenIdx = static_cast(hdr.payloadLen); + ASSERT_LT(hdr.headerSize + plenIdx, kRecvBuf) + << "payload[plen] would be out of bounds — buffer overflow!"; + + // Simulate the NUL-termination that WSServer does: + uint8 savedByte = payload[plenIdx]; + payload[plenIdx] = '\0'; + // Verify it's within bounds (no ASan/heap overflow) + EXPECT_EQ(payload[plenIdx], '\0'); + payload[plenIdx] = savedByte; + + delete[] buf; +} + +// Test: Verify the old (buggy) buffer size would have overflowed. +// This documents the bug for future readers. +TEST(WSServerBufferTest, OldBufferSizeWouldOverflow) { + const uint32 oldKRecvBuf = TEST_WS_MAX_RECV_PAYLOAD + 14u; // the buggy size + const uint32 headerSize = 14u; + const uint32 plen = TEST_WS_MAX_RECV_PAYLOAD; + // headerSize + plen == oldKRecvBuf, so payload[plen] = buf[oldKRecvBuf] + // is one byte past the end. + ASSERT_EQ(headerSize + plen, oldKRecvBuf) + << "Expected the old buffer to be exactly full (no room for NUL term)"; + // The fix adds +1: + const uint32 newKRecvBuf = TEST_WS_MAX_RECV_PAYLOAD + 14u + 1u; + ASSERT_LT(headerSize + plen, newKRecvBuf) + << "New buffer must have room for the NUL-termination byte"; +} diff --git a/Test/Applications/StreamHub/depends.x86-linux b/Test/Applications/StreamHub/depends.x86-linux deleted file mode 100644 index 1dc1655..0000000 --- a/Test/Applications/StreamHub/depends.x86-linux +++ /dev/null @@ -1,381 +0,0 @@ -../../../Build/x86-linux/Applications/StreamHub/BinaryRecorderGTest.o: BinaryRecorderGTest.cpp \ - ../../../Source/Applications/StreamHub/BinaryRecorder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Architecture/x86_gcc/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TypeDescriptor.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BasicType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/FractionalInteger.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TemplateParametersVerificator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/FastPollingMutexSem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Atomic.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/AtomicA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorInformation.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ErrorType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeoutType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/HighResolutionTimerA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimerCalibrator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Sleep.h \ - ../../../Common/UDP/UDPSProtocol.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-internal.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-port.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-message.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-string.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-filepath.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-type-util.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-death-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-death-test-internal.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-param-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-param-util.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-linked_ptr.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-printers.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-param-util-generated.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest_prod.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-test-part.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-typed-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest_pred_impl.h -../../../Build/x86-linux/Applications/StreamHub/BinaryRecorderSrc.o: BinaryRecorderSrc.cpp \ - ../../../Source/Applications/StreamHub/BinaryRecorder.cpp \ - ../../../Source/Applications/StreamHub/BinaryRecorder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Architecture/x86_gcc/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TypeDescriptor.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BasicType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/FractionalInteger.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TemplateParametersVerificator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/FastPollingMutexSem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Atomic.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/AtomicA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorInformation.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ErrorType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeoutType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/HighResolutionTimerA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimerCalibrator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Sleep.h \ - ../../../Common/UDP/UDPSProtocol.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/AdvancedErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassProperties.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/FractionalInteger.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/StreamMemoryReference.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/BufferedStreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeoutType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/AnyType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassProperties.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassRegistryDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GlobalObjectsDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GlobalObjectI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/StandardHeap.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../Generic/StandardHeap_Generic.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassRegistryItem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CString.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ZeroTerminatedArray.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/Introspection.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/IntrospectionEntry.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ZeroTerminatedArray.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListable.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListHolderT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/IteratorT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Iterator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListable.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListHolder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/SortFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/SearchFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/LoadableLibrary.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ObjectBuilder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticList.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticListHolder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Matrix.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Vector.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapManager.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/MemoryOperationsHelper.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/FormatDescriptor.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/IOBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/CharBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StreamI.h -../../../Build/x86-linux/Applications/StreamHub/LTTBGTest.o: LTTBGTest.cpp ../../../Source/Applications/StreamHub/LTTB.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Architecture/x86_gcc/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-internal.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-port.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-message.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-string.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-filepath.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-type-util.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-death-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-death-test-internal.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-param-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-param-util.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-linked_ptr.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-printers.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-param-util-generated.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest_prod.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-test-part.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-typed-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest_pred_impl.h -../../../Build/x86-linux/Applications/StreamHub/SignalRingBufferGTest.o: SignalRingBufferGTest.cpp \ - ../../../Source/Applications/StreamHub/SignalRingBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Architecture/x86_gcc/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/FastPollingMutexSem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Atomic.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/AtomicA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorInformation.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ErrorType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TemplateParametersVerificator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeoutType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/HighResolutionTimerA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimerCalibrator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Sleep.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-internal.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-port.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-message.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-string.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-filepath.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-type-util.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-death-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-death-test-internal.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-param-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-param-util.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-linked_ptr.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-printers.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-param-util-generated.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest_prod.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-test-part.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-typed-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest_pred_impl.h -../../../Build/x86-linux/Applications/StreamHub/TriggerEngineGTest.o: TriggerEngineGTest.cpp \ - ../../../Source/Applications/StreamHub/TriggerEngine.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Architecture/x86_gcc/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/FastPollingMutexSem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Atomic.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/AtomicA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorInformation.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ErrorType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TemplateParametersVerificator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeoutType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/HighResolutionTimerA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimerCalibrator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Sleep.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/StreamString.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapManager.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/CharBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/BufferedStreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeoutType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/AnyType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassProperties.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/FractionalInteger.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassRegistryDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GlobalObjectsDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GlobalObjectI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/StandardHeap.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../Generic/StandardHeap_Generic.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassRegistryItem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CString.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ZeroTerminatedArray.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/Introspection.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/IntrospectionEntry.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TypeDescriptor.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BasicType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/FractionalInteger.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ZeroTerminatedArray.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListable.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListHolderT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/IteratorT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Iterator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListable.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListHolder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/SortFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/SearchFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/LoadableLibrary.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ObjectBuilder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticList.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticListHolder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Matrix.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Vector.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/MemoryOperationsHelper.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/FormatDescriptor.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/IOBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StringHelper.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/StreamStringIOBuffer.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-internal.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-port.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-message.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-string.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-filepath.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-type-util.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-death-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-death-test-internal.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-param-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-param-util.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-linked_ptr.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-printers.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-param-util-generated.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest_prod.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-test-part.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-typed-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest_pred_impl.h -../../../Build/x86-linux/Applications/StreamHub/TriggerEngineSrc.o: TriggerEngineSrc.cpp \ - ../../../Source/Applications/StreamHub/TriggerEngine.cpp \ - ../../../Source/Applications/StreamHub/TriggerEngine.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Architecture/x86_gcc/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/FastPollingMutexSem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Atomic.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/AtomicA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorInformation.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ErrorType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TemplateParametersVerificator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeoutType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/HighResolutionTimerA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimerCalibrator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Sleep.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/StreamString.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapManager.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/CharBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/BufferedStreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeoutType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/AnyType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassProperties.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/FractionalInteger.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassRegistryDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GlobalObjectsDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GlobalObjectI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/StandardHeap.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../Generic/StandardHeap_Generic.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassRegistryItem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CString.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ZeroTerminatedArray.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/Introspection.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/IntrospectionEntry.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TypeDescriptor.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BasicType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/FractionalInteger.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ZeroTerminatedArray.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListable.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListHolderT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/IteratorT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Iterator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListable.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListHolder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/SortFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/SearchFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/LoadableLibrary.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ObjectBuilder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticList.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticListHolder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Matrix.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Vector.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/MemoryOperationsHelper.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/FormatDescriptor.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/IOBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StringHelper.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/StreamStringIOBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/AdvancedErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassProperties.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/StreamMemoryReference.h diff --git a/Test/Applications/StreamHub/dependsRaw.x86-linux b/Test/Applications/StreamHub/dependsRaw.x86-linux deleted file mode 100644 index 9741808..0000000 --- a/Test/Applications/StreamHub/dependsRaw.x86-linux +++ /dev/null @@ -1,381 +0,0 @@ -BinaryRecorderGTest.o: BinaryRecorderGTest.cpp \ - ../../../Source/Applications/StreamHub/BinaryRecorder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Architecture/x86_gcc/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TypeDescriptor.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BasicType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/FractionalInteger.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TemplateParametersVerificator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/FastPollingMutexSem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Atomic.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/AtomicA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorInformation.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ErrorType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeoutType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/HighResolutionTimerA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimerCalibrator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Sleep.h \ - ../../../Common/UDP/UDPSProtocol.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-internal.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-port.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-message.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-string.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-filepath.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-type-util.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-death-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-death-test-internal.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-param-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-param-util.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-linked_ptr.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-printers.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-param-util-generated.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest_prod.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-test-part.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-typed-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest_pred_impl.h -BinaryRecorderSrc.o: BinaryRecorderSrc.cpp \ - ../../../Source/Applications/StreamHub/BinaryRecorder.cpp \ - ../../../Source/Applications/StreamHub/BinaryRecorder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Architecture/x86_gcc/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TypeDescriptor.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BasicType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/FractionalInteger.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TemplateParametersVerificator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/FastPollingMutexSem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Atomic.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/AtomicA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorInformation.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ErrorType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeoutType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/HighResolutionTimerA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimerCalibrator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Sleep.h \ - ../../../Common/UDP/UDPSProtocol.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/AdvancedErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassProperties.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/FractionalInteger.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/StreamMemoryReference.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/BufferedStreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeoutType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/AnyType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassProperties.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassRegistryDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GlobalObjectsDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GlobalObjectI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/StandardHeap.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../Generic/StandardHeap_Generic.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassRegistryItem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CString.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ZeroTerminatedArray.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/Introspection.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/IntrospectionEntry.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ZeroTerminatedArray.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListable.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListHolderT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/IteratorT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Iterator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListable.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListHolder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/SortFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/SearchFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/LoadableLibrary.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ObjectBuilder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticList.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticListHolder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Matrix.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Vector.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapManager.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/MemoryOperationsHelper.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/FormatDescriptor.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/IOBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/CharBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StreamI.h -LTTBGTest.o: LTTBGTest.cpp ../../../Source/Applications/StreamHub/LTTB.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Architecture/x86_gcc/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-internal.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-port.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-message.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-string.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-filepath.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-type-util.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-death-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-death-test-internal.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-param-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-param-util.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-linked_ptr.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-printers.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-param-util-generated.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest_prod.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-test-part.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-typed-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest_pred_impl.h -SignalRingBufferGTest.o: SignalRingBufferGTest.cpp \ - ../../../Source/Applications/StreamHub/SignalRingBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Architecture/x86_gcc/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/FastPollingMutexSem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Atomic.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/AtomicA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorInformation.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ErrorType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TemplateParametersVerificator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeoutType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/HighResolutionTimerA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimerCalibrator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Sleep.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-internal.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-port.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-message.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-string.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-filepath.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-type-util.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-death-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-death-test-internal.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-param-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-param-util.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-linked_ptr.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-printers.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-param-util-generated.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest_prod.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-test-part.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-typed-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest_pred_impl.h -TriggerEngineGTest.o: TriggerEngineGTest.cpp \ - ../../../Source/Applications/StreamHub/TriggerEngine.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Architecture/x86_gcc/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/FastPollingMutexSem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Atomic.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/AtomicA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorInformation.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ErrorType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TemplateParametersVerificator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeoutType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/HighResolutionTimerA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimerCalibrator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Sleep.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/StreamString.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapManager.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/CharBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/BufferedStreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeoutType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/AnyType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassProperties.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/FractionalInteger.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassRegistryDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GlobalObjectsDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GlobalObjectI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/StandardHeap.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../Generic/StandardHeap_Generic.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassRegistryItem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CString.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ZeroTerminatedArray.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/Introspection.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/IntrospectionEntry.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TypeDescriptor.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BasicType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/FractionalInteger.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ZeroTerminatedArray.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListable.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListHolderT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/IteratorT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Iterator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListable.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListHolder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/SortFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/SearchFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/LoadableLibrary.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ObjectBuilder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticList.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticListHolder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Matrix.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Vector.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/MemoryOperationsHelper.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/FormatDescriptor.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/IOBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StringHelper.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/StreamStringIOBuffer.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-internal.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-port.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-message.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-string.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-filepath.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-type-util.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-death-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-death-test-internal.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-param-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-param-util.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-linked_ptr.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-printers.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-param-util-generated.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest_prod.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-test-part.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-typed-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest_pred_impl.h -TriggerEngineSrc.o: TriggerEngineSrc.cpp \ - ../../../Source/Applications/StreamHub/TriggerEngine.cpp \ - ../../../Source/Applications/StreamHub/TriggerEngine.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Architecture/x86_gcc/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/FastPollingMutexSem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Atomic.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/AtomicA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorInformation.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ErrorType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TemplateParametersVerificator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeoutType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/HighResolutionTimerA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimerCalibrator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Sleep.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/StreamString.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapManager.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/CharBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/BufferedStreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeoutType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/AnyType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassProperties.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/FractionalInteger.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassRegistryDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GlobalObjectsDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GlobalObjectI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/StandardHeap.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../Generic/StandardHeap_Generic.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassRegistryItem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CString.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ZeroTerminatedArray.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/Introspection.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/IntrospectionEntry.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TypeDescriptor.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BasicType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/FractionalInteger.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ZeroTerminatedArray.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListable.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListHolderT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/IteratorT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Iterator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListable.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListHolder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/SortFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/SearchFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/LoadableLibrary.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ObjectBuilder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticList.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticListHolder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Matrix.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Vector.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/MemoryOperationsHelper.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/FormatDescriptor.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/IOBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StringHelper.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/StreamStringIOBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/AdvancedErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassProperties.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/StreamMemoryReference.h diff --git a/Test/Components/DataSources/UDPStreamer/depends.x86-linux b/Test/Components/DataSources/UDPStreamer/depends.x86-linux deleted file mode 100644 index a1dc5b8..0000000 --- a/Test/Components/DataSources/UDPStreamer/depends.x86-linux +++ /dev/null @@ -1,199 +0,0 @@ -../../../../Build/x86-linux/Components/DataSources/UDPStreamer/UDPStreamerGTest.o: UDPStreamerGTest.cpp \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-internal.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-port.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-message.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-string.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-filepath.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-type-util.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-death-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-death-test-internal.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-param-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-param-util.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-linked_ptr.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-printers.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-param-util-generated.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest_prod.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-test-part.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-typed-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest_pred_impl.h \ - UDPStreamerTest.h -../../../../Build/x86-linux/Components/DataSources/UDPStreamer/UDPStreamerTest.o: UDPStreamerTest.cpp \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/AdvancedErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassProperties.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Architecture/x86_gcc/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/FractionalInteger.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TemplateParametersVerificator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorInformation.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ErrorType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeoutType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/HighResolutionTimerA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimerCalibrator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/StreamMemoryReference.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/BufferedStreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeoutType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/AnyType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassProperties.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassRegistryDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GlobalObjectsDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GlobalObjectI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/StandardHeap.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../Generic/StandardHeap_Generic.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/FastPollingMutexSem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Atomic.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/AtomicA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Sleep.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassRegistryItem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CString.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ZeroTerminatedArray.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/Introspection.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/IntrospectionEntry.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TypeDescriptor.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BasicType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/FractionalInteger.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ZeroTerminatedArray.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListable.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListHolderT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/IteratorT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Iterator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListable.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListHolder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/SortFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/SearchFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/LoadableLibrary.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ObjectBuilder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticList.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticListHolder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Matrix.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Vector.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapManager.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/MemoryOperationsHelper.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/FormatDescriptor.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/IOBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/CharBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/FileSystem/L1Portability/BasicTCPSocket.h \ - /home/martino/workspace/MARTe2/Source/Core/FileSystem/L1Portability/BasicSocket.h \ - /home/martino/workspace/MARTe2/Source/Core/FileSystem/L1Portability/InternetHost.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/StreamString.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StringHelper.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/StreamStringIOBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/FileSystem/L1Portability/Environment/Linux/InternetHostCore.h \ - /home/martino/workspace/MARTe2/Source/Core/FileSystem/L1Portability/Environment/Linux/InternetMulticastCore.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HandleI.h \ - /home/martino/workspace/MARTe2/Source/Core/FileSystem/L1Portability/Environment/Linux/SocketCore.h \ - /home/martino/workspace/MARTe2/Source/Core/FileSystem/L1Portability/BasicUDPSocket.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Sleep.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration/ConfigurationDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration/AnyObject.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/Object.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/StructuredDataI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/AnyType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/CLASSREGISTER.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassRegistryItemT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ObjectBuilderT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration/ConfigurationDatabaseNode.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Fnv1aHashFunction.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/HashFunction.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ReferenceContainer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListHolder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/Object.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/Reference.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ReferenceContainerFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ReferenceContainerNode.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ReferenceT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/UnorderedMap.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapManager.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StringHelper.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ReferenceContainerFilterObjectName.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ReferenceContainer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/StructuredDataI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration/TypeConversion.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Vector.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs/GAM.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs/DataSourceI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs/StatefulI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs/ExecutableI.h \ - /home/martino/workspace/MARTe2/Source/Core/Scheduler/L5GAMs/GAMScheduler.h \ - /home/martino/workspace/MARTe2/Source/Core/Scheduler/L1Portability/EventSem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs/GAMSchedulerI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs/GAM.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ProcessorType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitSet.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs/TimingDataSource.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs/GAMDataSource.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/MemoryArea.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Messages/Message.h \ - /home/martino/workspace/MARTe2/Source/Core/Scheduler/L3Services/MultiThreadService.h \ - /home/martino/workspace/MARTe2/Source/Core/Scheduler/L3Services/EmbeddedServiceI.h \ - /home/martino/workspace/MARTe2/Source/Core/Scheduler/L3Services/EmbeddedServiceMethodBinderI.h \ - /home/martino/workspace/MARTe2/Source/Core/Scheduler/L3Services/ExecutionInfo.h \ - /home/martino/workspace/MARTe2/Source/Core/Scheduler/L1Portability/Threads.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ThreadsB.h \ - /home/martino/workspace/MARTe2/Source/Core/Scheduler/L1Portability/ExceptionHandler.h \ - /home/martino/workspace/MARTe2/Source/Core/Scheduler/L3Services/EmbeddedServiceMethodBinderT.h \ - /home/martino/workspace/MARTe2/Source/Core/Scheduler/L3Services/EmbeddedThreadI.h \ - /home/martino/workspace/MARTe2/Source/Core/Scheduler/L3Services/SingleThreadService.h \ - /home/martino/workspace/MARTe2/Source/Core/Scheduler/L3Services/EmbeddedThread.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs/RealTimeApplication.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/CLASSMETHODREGISTER.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassMethodInterfaceMapper.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassMethodCaller.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassMethodCallerT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ReferenceT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs/GAMSchedulerI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Messages/MessageI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Messages/Message.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Messages/MessageFilterPool.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Messages/MessageFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs/RealTimeApplicationConfigurationBuilder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs/RealTimeApplication.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Messages/RegisteredMethodsMessageFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ObjectRegistryDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration/StandardParser.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration/ConfigurationParserI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration/AnyTypeCreator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticListHolder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration/ConfigurationDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration/LexicalAnalyzer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/GrammarInfo.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration/Token.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration/TokenInfo.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration/ParserI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration/RuntimeEvaluator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/IteratorT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticStack.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticList.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration/VariableInformation.h \ - ../../../../Source/Components/DataSources/UDPStreamer/UDPStreamer.h \ - /home/martino/workspace/MARTe2/Source/Core/Scheduler/L3Services/EmbeddedServiceMethodBinderI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs/MemoryDataSourceI.h \ - /home/martino/workspace/MARTe2/Source/Core/Scheduler/L3Services/SingleThreadService.h \ - ../../../../Source/Components/Interfaces/UDPStream/UDPSServer.h \ - /home/martino/workspace/MARTe2/Source/Core/FileSystem/L1Portability/InternetHost.h \ - ../../../../Common/UDP/UDPSProtocol.h UDPStreamerTest.h diff --git a/Test/Components/DataSources/UDPStreamer/dependsRaw.x86-linux b/Test/Components/DataSources/UDPStreamer/dependsRaw.x86-linux deleted file mode 100644 index 2ca5ef9..0000000 --- a/Test/Components/DataSources/UDPStreamer/dependsRaw.x86-linux +++ /dev/null @@ -1,199 +0,0 @@ -UDPStreamerGTest.o: UDPStreamerGTest.cpp \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-internal.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-port.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-message.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-string.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-filepath.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-type-util.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-death-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-death-test-internal.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-param-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-param-util.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-linked_ptr.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-printers.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-param-util-generated.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest_prod.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-test-part.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-typed-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest_pred_impl.h \ - UDPStreamerTest.h -UDPStreamerTest.o: UDPStreamerTest.cpp \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/AdvancedErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassProperties.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Architecture/x86_gcc/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/FractionalInteger.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TemplateParametersVerificator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorInformation.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ErrorType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeoutType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/HighResolutionTimerA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimerCalibrator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/StreamMemoryReference.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/BufferedStreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeoutType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/AnyType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassProperties.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassRegistryDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GlobalObjectsDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GlobalObjectI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/StandardHeap.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../Generic/StandardHeap_Generic.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/FastPollingMutexSem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Atomic.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/AtomicA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Sleep.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassRegistryItem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CString.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ZeroTerminatedArray.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/Introspection.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/IntrospectionEntry.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TypeDescriptor.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BasicType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/FractionalInteger.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ZeroTerminatedArray.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListable.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListHolderT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/IteratorT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Iterator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListable.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListHolder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/SortFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/SearchFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/LoadableLibrary.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ObjectBuilder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticList.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticListHolder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Matrix.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Vector.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapManager.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/MemoryOperationsHelper.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/FormatDescriptor.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/IOBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/CharBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/FileSystem/L1Portability/BasicTCPSocket.h \ - /home/martino/workspace/MARTe2/Source/Core/FileSystem/L1Portability/BasicSocket.h \ - /home/martino/workspace/MARTe2/Source/Core/FileSystem/L1Portability/InternetHost.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/StreamString.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StringHelper.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/StreamStringIOBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/FileSystem/L1Portability/Environment/Linux/InternetHostCore.h \ - /home/martino/workspace/MARTe2/Source/Core/FileSystem/L1Portability/Environment/Linux/InternetMulticastCore.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HandleI.h \ - /home/martino/workspace/MARTe2/Source/Core/FileSystem/L1Portability/Environment/Linux/SocketCore.h \ - /home/martino/workspace/MARTe2/Source/Core/FileSystem/L1Portability/BasicUDPSocket.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Sleep.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration/ConfigurationDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration/AnyObject.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/Object.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/StructuredDataI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/AnyType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/CLASSREGISTER.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassRegistryItemT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ObjectBuilderT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration/ConfigurationDatabaseNode.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Fnv1aHashFunction.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/HashFunction.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ReferenceContainer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListHolder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/Object.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/Reference.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ReferenceContainerFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ReferenceContainerNode.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ReferenceT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/UnorderedMap.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapManager.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StringHelper.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ReferenceContainerFilterObjectName.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ReferenceContainer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/StructuredDataI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration/TypeConversion.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Vector.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs/GAM.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs/DataSourceI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs/StatefulI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs/ExecutableI.h \ - /home/martino/workspace/MARTe2/Source/Core/Scheduler/L5GAMs/GAMScheduler.h \ - /home/martino/workspace/MARTe2/Source/Core/Scheduler/L1Portability/EventSem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs/GAMSchedulerI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs/GAM.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ProcessorType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitSet.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs/TimingDataSource.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs/GAMDataSource.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/MemoryArea.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Messages/Message.h \ - /home/martino/workspace/MARTe2/Source/Core/Scheduler/L3Services/MultiThreadService.h \ - /home/martino/workspace/MARTe2/Source/Core/Scheduler/L3Services/EmbeddedServiceI.h \ - /home/martino/workspace/MARTe2/Source/Core/Scheduler/L3Services/EmbeddedServiceMethodBinderI.h \ - /home/martino/workspace/MARTe2/Source/Core/Scheduler/L3Services/ExecutionInfo.h \ - /home/martino/workspace/MARTe2/Source/Core/Scheduler/L1Portability/Threads.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ThreadsB.h \ - /home/martino/workspace/MARTe2/Source/Core/Scheduler/L1Portability/ExceptionHandler.h \ - /home/martino/workspace/MARTe2/Source/Core/Scheduler/L3Services/EmbeddedServiceMethodBinderT.h \ - /home/martino/workspace/MARTe2/Source/Core/Scheduler/L3Services/EmbeddedThreadI.h \ - /home/martino/workspace/MARTe2/Source/Core/Scheduler/L3Services/SingleThreadService.h \ - /home/martino/workspace/MARTe2/Source/Core/Scheduler/L3Services/EmbeddedThread.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs/RealTimeApplication.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/CLASSMETHODREGISTER.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassMethodInterfaceMapper.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassMethodCaller.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassMethodCallerT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ReferenceT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs/GAMSchedulerI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Messages/MessageI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Messages/Message.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Messages/MessageFilterPool.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Messages/MessageFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs/RealTimeApplicationConfigurationBuilder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs/RealTimeApplication.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Messages/RegisteredMethodsMessageFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ObjectRegistryDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration/StandardParser.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration/ConfigurationParserI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration/AnyTypeCreator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticListHolder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration/ConfigurationDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration/LexicalAnalyzer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/GrammarInfo.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration/Token.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration/TokenInfo.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration/ParserI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration/RuntimeEvaluator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/IteratorT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticStack.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticList.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration/VariableInformation.h \ - ../../../../Source/Components/DataSources/UDPStreamer/UDPStreamer.h \ - /home/martino/workspace/MARTe2/Source/Core/Scheduler/L3Services/EmbeddedServiceMethodBinderI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs/MemoryDataSourceI.h \ - /home/martino/workspace/MARTe2/Source/Core/Scheduler/L3Services/SingleThreadService.h \ - ../../../../Source/Components/Interfaces/UDPStream/UDPSServer.h \ - /home/martino/workspace/MARTe2/Source/Core/FileSystem/L1Portability/InternetHost.h \ - ../../../../Common/UDP/UDPSProtocol.h UDPStreamerTest.h diff --git a/Test/Components/DataSources/UDPStreamerClient/Makefile.gcc b/Test/Components/DataSources/UDPStreamerClient/Makefile.gcc new file mode 100644 index 0000000..ab19097 --- /dev/null +++ b/Test/Components/DataSources/UDPStreamerClient/Makefile.gcc @@ -0,0 +1 @@ +include Makefile.inc diff --git a/Test/Components/DataSources/UDPStreamerClient/Makefile.inc b/Test/Components/DataSources/UDPStreamerClient/Makefile.inc new file mode 100644 index 0000000..831ab89 --- /dev/null +++ b/Test/Components/DataSources/UDPStreamerClient/Makefile.inc @@ -0,0 +1,59 @@ +############################################################# +# +# Copyright 2015 F4E | European Joint Undertaking for ITER +# and the Development of Fusion Energy ('Fusion for Energy') +# +# Licensed under the EUPL, Version 1.1 or - as soon they +# will be approved by the European Commission - subsequent +# versions of the EUPL (the "Licence"); +# You may not use this work except in compliance with the +# Licence. +# You may obtain a copy of the Licence at: +# +# http://ec.europa.eu/idabc/eupl +# +# Unless required by applicable law or agreed to in +# writing, software distributed under the Licence is +# distributed on an "AS IS" basis, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +# express or implied. +# See the Licence for the specific language governing +# permissions and limitations under the Licence. +# +############################################################# + +OBJSX = UDPStreamerClientTest.x UDPStreamerClientGTest.x + +PACKAGE=Components/DataSources +ROOT_DIR=../../../.. +MAKEDEFAULTDIR=$(MARTe2_DIR)/MakeDefaults + +include $(MAKEDEFAULTDIR)/MakeStdLibDefs.$(TARGET) + +INCLUDES += -I. +INCLUDES += -I$(ROOT_DIR)/Source/Components/Interfaces/UDPStream +INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L0Types +INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L1Portability +INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L2Objects +INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L3Streams +INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L4Messages +INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L4Configuration +INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L5GAMs +INCLUDES += -I$(MARTe2_DIR)/Source/Core/Scheduler/L1Portability +INCLUDES += -I$(MARTe2_DIR)/Source/Core/Scheduler/L3Services +INCLUDES += -I$(MARTe2_DIR)/Source/Core/Scheduler/L4Messages +INCLUDES += -I$(MARTe2_DIR)/Source/Core/Scheduler/L4StateMachine +INCLUDES += -I$(MARTe2_DIR)/Source/Core/Scheduler/L5GAMs +INCLUDES += -I$(MARTe2_DIR)/Source/Core/FileSystem/L1Portability +INCLUDES += -I$(MARTe2_DIR)/Source/Core/FileSystem/L3Streams +INCLUDES += -I$(MARTe2_DIR)/Lib/gtest-1.7.0/include +INCLUDES += -I$(ROOT_DIR)/Common/UDP +INCLUDES += -I$(ROOT_DIR)/Source/Components/DataSources/UDPStreamerClient + +all: $(OBJS) \ + $(BUILD_DIR)/UDPStreamerClientTest$(LIBEXT) + echo $(OBJS) + +include depends.$(TARGET) + +include $(MAKEDEFAULTDIR)/MakeStdLibRules.$(TARGET) diff --git a/Test/Components/DataSources/UDPStreamerClient/UDPStreamerClientGTest.cpp b/Test/Components/DataSources/UDPStreamerClient/UDPStreamerClientGTest.cpp new file mode 100644 index 0000000..c94c6e1 --- /dev/null +++ b/Test/Components/DataSources/UDPStreamerClient/UDPStreamerClientGTest.cpp @@ -0,0 +1,142 @@ +/** + * @file UDPStreamerClientGTest.cpp + * @brief Source file for class UDPStreamerClientGTest + * @date 01/07/2026 + * @author Martino Ferrari + * + * @copyright Copyright 2015 F4E | European Joint Undertaking for ITER and + * the Development of Fusion Energy ('Fusion for Energy'). + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved + * by the European Commission - subsequent versions of the EUPL (the "Licence") + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl + * + * @warning Unless required by applicable law or agreed to in writing, + * software distributed under the Licence is distributed on an "AS IS" + * basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the Licence permissions and limitations under the Licence. + * + * @details This source file contains the GTest wrapper for all UDPStreamerClient tests. + */ + +#define DLL_API + +/*---------------------------------------------------------------------------*/ +/* Standard header includes */ +/*---------------------------------------------------------------------------*/ +#include "gtest/gtest.h" +#include + +/*---------------------------------------------------------------------------*/ +/* Project header includes */ +/*---------------------------------------------------------------------------*/ +#include "UDPStreamerClientTest.h" + +/*---------------------------------------------------------------------------*/ +/* Method definitions */ +/*---------------------------------------------------------------------------*/ + +TEST(UDPStreamerClientGTest, TestInitialise_Valid) { + UDPStreamerClientTest test; + ASSERT_TRUE(test.TestInitialise_Valid()); +} + +TEST(UDPStreamerClientGTest, TestInitialise_DefaultServerAddress) { + UDPStreamerClientTest test; + ASSERT_TRUE(test.TestInitialise_DefaultServerAddress()); +} + +TEST(UDPStreamerClientGTest, TestInitialise_DefaultPort) { + UDPStreamerClientTest test; + ASSERT_TRUE(test.TestInitialise_DefaultPort()); +} + +TEST(UDPStreamerClientGTest, TestInitialise_MulticastMode_Valid) { + UDPStreamerClientTest test; + ASSERT_TRUE(test.TestInitialise_MulticastMode_Valid()); +} + +TEST(UDPStreamerClientGTest, TestInitialise_MulticastMode_DefaultDataPort) { + UDPStreamerClientTest test; + ASSERT_TRUE(test.TestInitialise_MulticastMode_DefaultDataPort()); +} + +TEST(UDPStreamerClientGTest, TestSetConfiguredDatabase_MultipleSignals) { + UDPStreamerClientTest test; + ASSERT_TRUE(test.TestSetConfiguredDatabase_MultipleSignals()); +} + +TEST(UDPStreamerClientGTest, TestPrepareNextState_StartsReceiver) { + UDPStreamerClientTest test; + ASSERT_TRUE(test.TestPrepareNextState_StartsReceiver()); +} + +TEST(UDPStreamerClientGTest, TestSynchronise_NoData) { + UDPStreamerClientTest test; + ASSERT_TRUE(test.TestSynchronise_NoData()); +} + +TEST(UDPStreamerClientGTest, TestOnUDPSConfig_BasicAccept) { + UDPStreamerClientTest test; + ASSERT_TRUE(test.TestOnUDPSConfig_BasicAccept()); +} + +TEST(UDPStreamerClientGTest, TestOnUDPSConfig_SignalCountMismatch) { + UDPStreamerClientTest test; + ASSERT_TRUE(test.TestOnUDPSConfig_SignalCountMismatch()); +} + +TEST(UDPStreamerClientGTest, TestOnUDPSConfig_NameMismatch) { + UDPStreamerClientTest test; + ASSERT_TRUE(test.TestOnUDPSConfig_NameMismatch()); +} + +TEST(UDPStreamerClientGTest, TestOnUDPSConfig_ElementCountMismatch) { + UDPStreamerClientTest test; + ASSERT_TRUE(test.TestOnUDPSConfig_ElementCountMismatch()); +} + +TEST(UDPStreamerClientGTest, TestOnUDPSConfig_TooSmallPayload) { + UDPStreamerClientTest test; + ASSERT_TRUE(test.TestOnUDPSConfig_TooSmallPayload()); +} + +TEST(UDPStreamerClientGTest, TestOnUDPSData_QuantizedUint16) { + UDPStreamerClientTest test; + ASSERT_TRUE(test.TestOnUDPSData_QuantizedUint16()); +} + +TEST(UDPStreamerClientGTest, TestOnUDPSData_QuantizedInt8) { + UDPStreamerClientTest test; + ASSERT_TRUE(test.TestOnUDPSData_QuantizedInt8()); +} + +TEST(UDPStreamerClientGTest, TestOnUDPSData_MultipleSignalsOrder) { + UDPStreamerClientTest test; + ASSERT_TRUE(test.TestOnUDPSData_MultipleSignalsOrder()); +} + +TEST(UDPStreamerClientGTest, TestOnUDPSData_AccumulateMode) { + UDPStreamerClientTest test; + ASSERT_TRUE(test.TestOnUDPSData_AccumulateMode()); +} + +TEST(UDPStreamerClientGTest, TestOnUDPSData_TooSmallPayload) { + UDPStreamerClientTest test; + ASSERT_TRUE(test.TestOnUDPSData_TooSmallPayload()); +} + +TEST(UDPStreamerClientGTest, TestOnUDPSData_BeforeConfig) { + UDPStreamerClientTest test; + ASSERT_TRUE(test.TestOnUDPSData_BeforeConfig()); +} + +TEST(UDPStreamerClientGTest, TestOnUDPSDisconnected_InvalidatesConfig) { + UDPStreamerClientTest test; + ASSERT_TRUE(test.TestOnUDPSDisconnected_InvalidatesConfig()); +} + +TEST(UDPStreamerClientGTest, TestExecute_ConnectConfigDataEndToEnd) { + UDPStreamerClientTest test; + ASSERT_TRUE(test.TestExecute_ConnectConfigDataEndToEnd()); +} diff --git a/Test/Components/DataSources/UDPStreamerClient/UDPStreamerClientTest.cpp b/Test/Components/DataSources/UDPStreamerClient/UDPStreamerClientTest.cpp new file mode 100644 index 0000000..db1ae4f --- /dev/null +++ b/Test/Components/DataSources/UDPStreamerClient/UDPStreamerClientTest.cpp @@ -0,0 +1,1448 @@ +/** + * @file UDPStreamerClientTest.cpp + * @brief Source file for class UDPStreamerClientTest + * @date 01/07/2026 + * @author Martino Ferrari + * + * @copyright Copyright 2015 F4E | European Joint Undertaking for ITER and + * the Development of Fusion Energy ('Fusion for Energy'). + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved + * by the European Commission - subsequent versions of the EUPL (the "Licence") + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl + * + * @warning Unless required by applicable law or agreed to in writing, + * software distributed under the Licence is distributed on an "AS IS" + * basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the Licence permissions and limitations under the Licence. + * + * @details This source file contains the definition of all the methods for + * the class UDPStreamerClientTest (public, protected, and private). + */ + +#define DLL_API + +/*---------------------------------------------------------------------------*/ +/* Standard header includes */ +/*---------------------------------------------------------------------------*/ +#include + +/*---------------------------------------------------------------------------*/ +/* Project header includes */ +/*---------------------------------------------------------------------------*/ +#include "AdvancedErrorManagement.h" +#include "BasicUDPSocket.h" +#include "ConfigurationDatabase.h" +#include "GAM.h" +#include "MemoryOperationsHelper.h" +#include "ObjectRegistryDatabase.h" +#include "RealTimeApplication.h" +#include "Sleep.h" +#include "StandardParser.h" +#include "Threads.h" +#include "UDPSProtocol.h" +#include "UDPStreamerClient.h" +#include "UDPStreamerClientTest.h" + +/*---------------------------------------------------------------------------*/ +/* Static definitions */ +/*---------------------------------------------------------------------------*/ + +/** + * @brief Minimal pass-through GAM used instead of IOGAM, so the test does + * not depend on IOGAM.so being dlopen()-able / on the loader path. + * Copies each input signal to the matching output signal. + */ +class UDPStreamerClientTestGAM : public MARTe::GAM { +public: + CLASS_REGISTER_DECLARATION() + + UDPStreamerClientTestGAM() : + GAM() { + } + + ~UDPStreamerClientTestGAM() { + } + + bool Execute() { + for (MARTe::uint32 i = 0u; i < GetNumberOfOutputSignals(); i++) { + void *outMem = GetOutputSignalMemory(i); + void *inMem = GetInputSignalMemory(i); + if ((outMem != NULL_PTR(void *)) && (inMem != NULL_PTR(void *))) { + MARTe::uint32 sz = 0u; + GetSignalByteSize(MARTe::OutputSignals, i, sz); + (void) MARTe::MemoryOperationsHelper::Copy(outMem, inMem, sz); + } + } + return true; + } + + bool Setup() { + return true; + } +}; + +CLASS_REGISTER(UDPStreamerClientTestGAM, "1.0") + +/** + * @brief Shared state between the test thread and a background + * UDPStreamerClient::Synchronise() call (see StartSynchroniseThread). + */ +struct SynchroniseThreadArgs { + MARTe::ReferenceT ds; + bool result; + bool done; +}; + +static void SynchroniseThreadEntry(const void *const parameters) { + SynchroniseThreadArgs *args = const_cast( + reinterpret_cast(parameters)); + args->result = args->ds->Synchronise(); + args->done = true; +} + +/** + * @brief UDPStreamerClient::Synchronise() calls dataSem.ResetWait(), which + * first lowers (Reset()s) the semaphore barrier and only then waits + * (with an internal ~10 ms timeout) for it to be raised again. + * Because of this, a Post() (triggered by OnUDPSData()) that happens + * BEFORE Synchronise() is called is wiped out by that leading Reset() + * and lost. In production this is never an issue because the RT + * thread's Synchronise() call is already blocked in Wait() when the + * receiver thread posts new data. + * + * To exercise that same interleaving from a single-threaded test, run + * Synchronise() on a background thread and give it a very brief head + * start (shorter than the internal timeout) so it has a chance to + * pass through Reset() and be parked in Wait() before the caller + * triggers the data delivery. Thread-scheduling latency means this is + * still a race, not a guarantee, so callers should retry the + * deliver+StartSynchroniseThread+JoinSynchroniseThread sequence a few + * times until the expected value shows up (see e.g. + * TestOnUDPSConfig_BasicAccept for the pattern). + */ +static SynchroniseThreadArgs *StartSynchroniseThread(MARTe::ReferenceT ds) { + using namespace MARTe; + SynchroniseThreadArgs *args = new SynchroniseThreadArgs(); + args->ds = ds; + args->result = false; + args->done = false; + (void) Threads::BeginThread(&SynchroniseThreadEntry, args, THREADS_DEFAULT_STACKSIZE, "SyncTest"); + /* Give the thread a chance to start running and reach Reset()+Wait() + * before the caller delivers data. Must stay well below Synchronise()'s + * internal ~10 ms timeout, or the background call will already have + * timed out and returned by the time we come back here. */ + Sleep::MSec(1u); + return args; +} + +/** + * @brief Waits for the background Synchronise() started by + * StartSynchroniseThread() to complete, returns its result and frees + * the shared state. + */ +static bool JoinSynchroniseThread(SynchroniseThreadArgs *args) { + using namespace MARTe; + uint32 waited = 0u; + while ((!args->done) && (waited < 500u)) { + Sleep::MSec(2u); + waited += 2u; + } + bool result = args->done && args->result; + delete args; + return result; +} + +/** + * @brief Helper: build a RealTimeApplication from an MARTe2 config string. + * Returns the application reference (invalid if parsing failed). + */ +static MARTe::ReferenceT LoadApplication( + const MARTe::char8 *const config) { + using namespace MARTe; + + ConfigurationDatabase cdb; + StreamString cfgStr = config; + (void) cfgStr.Seek(0LLU); + StandardParser parser(cfgStr, cdb); + if (!parser.Parse()) { + return ReferenceT(); + } + + ObjectRegistryDatabase *god = ObjectRegistryDatabase::Instance(); + god->Purge(); + if (!god->Initialise(cdb)) { + return ReferenceT(); + } + + ReferenceT app = god->Find("Test"); + if (!app.IsValid()) { + return ReferenceT(); + } + if (!app->ConfigureApplication()) { + return ReferenceT(); + } + return app; +} + +/** + * @brief Minimal single-scalar-signal config template. + * %d placeholders: Port. + */ +static MARTe::StreamString BuildBasicConfig(MARTe::uint16 port) { + using namespace MARTe; + StreamString cfg; + cfg.Printf( + "+Test = {\n" + " Class = RealTimeApplication\n" + " +Functions = {\n" + " Class = ReferenceContainer\n" + " +Reader = {\n" + " Class = UDPStreamerClientTestGAM\n" + " InputSignals = {\n" + " Counter = {\n" + " DataSource = ClientDS\n" + " Type = uint32\n" + " }\n" + " }\n" + " OutputSignals = {\n" + " Counter = {\n" + " DataSource = DDB\n" + " Type = uint32\n" + " }\n" + " }\n" + " }\n" + " }\n" + " +Data = {\n" + " Class = ReferenceContainer\n" + " DefaultDataSource = DDB\n" + " +DDB = {\n" + " Class = GAMDataSource\n" + " }\n" + " +ClientDS = {\n" + " Class = UDPStreamerClient\n" + " ServerAddress = \"127.0.0.1\"\n" + " Port = %d\n" + " MaxPayloadSize = 1400\n" + " Signals = {\n" + " Counter = {\n" + " Type = uint32\n" + " }\n" + " }\n" + " }\n" + " +Timings = {\n" + " Class = TimingDataSource\n" + " }\n" + " }\n" + " +States = {\n" + " Class = ReferenceContainer\n" + " +State1 = {\n" + " Class = RealTimeState\n" + " +Threads = {\n" + " Class = ReferenceContainer\n" + " +Thread1 = {\n" + " Class = RealTimeThread\n" + " Functions = { Reader }\n" + " }\n" + " }\n" + " }\n" + " }\n" + " +Scheduler = {\n" + " Class = GAMScheduler\n" + " TimingDataSource = Timings\n" + " }\n" + "}\n", port); + return cfg; +} + +/*---------------------------------------------------------------------------*/ +/* Method definitions */ +/*---------------------------------------------------------------------------*/ + +bool UDPStreamerClientTest::TestInitialise_Valid() { + using namespace MARTe; + StreamString cfg = BuildBasicConfig(44700u); + ReferenceT app = LoadApplication(cfg.Buffer()); + bool ok = app.IsValid(); + ObjectRegistryDatabase::Instance()->Purge(); + return ok; +} + +bool UDPStreamerClientTest::TestInitialise_DefaultServerAddress() { + using namespace MARTe; + static const char8 *const cfg = + "+Test = {\n" + " Class = RealTimeApplication\n" + " +Functions = {\n" + " Class = ReferenceContainer\n" + " +Reader = {\n" + " Class = UDPStreamerClientTestGAM\n" + " InputSignals = { Counter = { DataSource = ClientDS Type = uint32 } }\n" + " OutputSignals = { Counter = { DataSource = DDB Type = uint32 } }\n" + " }\n" + " }\n" + " +Data = {\n" + " Class = ReferenceContainer\n" + " DefaultDataSource = DDB\n" + " +DDB = { Class = GAMDataSource }\n" + " +ClientDS = {\n" + " Class = UDPStreamerClient\n" + " Port = 44701\n" + " Signals = { Counter = { Type = uint32 } }\n" + " }\n" + " +Timings = { Class = TimingDataSource }\n" + " }\n" + " +States = {\n" + " Class = ReferenceContainer\n" + " +State1 = {\n" + " Class = RealTimeState\n" + " +Threads = {\n" + " Class = ReferenceContainer\n" + " +Thread1 = { Class = RealTimeThread Functions = { Reader } }\n" + " }\n" + " }\n" + " }\n" + " +Scheduler = { Class = GAMScheduler TimingDataSource = Timings }\n" + "}\n"; + + ReferenceT app = LoadApplication(cfg); + bool ok = app.IsValid(); + ObjectRegistryDatabase::Instance()->Purge(); + return ok; +} + +bool UDPStreamerClientTest::TestInitialise_DefaultPort() { + using namespace MARTe; + static const char8 *const cfg = + "+Test = {\n" + " Class = RealTimeApplication\n" + " +Functions = {\n" + " Class = ReferenceContainer\n" + " +Reader = {\n" + " Class = UDPStreamerClientTestGAM\n" + " InputSignals = { Counter = { DataSource = ClientDS Type = uint32 } }\n" + " OutputSignals = { Counter = { DataSource = DDB Type = uint32 } }\n" + " }\n" + " }\n" + " +Data = {\n" + " Class = ReferenceContainer\n" + " DefaultDataSource = DDB\n" + " +DDB = { Class = GAMDataSource }\n" + " +ClientDS = {\n" + " Class = UDPStreamerClient\n" + " ServerAddress = \"127.0.0.1\"\n" + " Signals = { Counter = { Type = uint32 } }\n" + " }\n" + " +Timings = { Class = TimingDataSource }\n" + " }\n" + " +States = {\n" + " Class = ReferenceContainer\n" + " +State1 = {\n" + " Class = RealTimeState\n" + " +Threads = {\n" + " Class = ReferenceContainer\n" + " +Thread1 = { Class = RealTimeThread Functions = { Reader } }\n" + " }\n" + " }\n" + " }\n" + " +Scheduler = { Class = GAMScheduler TimingDataSource = Timings }\n" + "}\n"; + + ReferenceT app = LoadApplication(cfg); + bool ok = app.IsValid(); + ObjectRegistryDatabase::Instance()->Purge(); + return ok; +} + +bool UDPStreamerClientTest::TestInitialise_MulticastMode_Valid() { + using namespace MARTe; + static const char8 *const cfg = + "+Test = {\n" + " Class = RealTimeApplication\n" + " +Functions = {\n" + " Class = ReferenceContainer\n" + " +Reader = {\n" + " Class = UDPStreamerClientTestGAM\n" + " InputSignals = { Counter = { DataSource = ClientDS Type = uint32 } }\n" + " OutputSignals = { Counter = { DataSource = DDB Type = uint32 } }\n" + " }\n" + " }\n" + " +Data = {\n" + " Class = ReferenceContainer\n" + " DefaultDataSource = DDB\n" + " +DDB = { Class = GAMDataSource }\n" + " +ClientDS = {\n" + " Class = UDPStreamerClient\n" + " ServerAddress = \"127.0.0.1\"\n" + " Port = 44702\n" + " MulticastGroup = \"239.0.0.5\"\n" + " DataPort = 44703\n" + " Signals = { Counter = { Type = uint32 } }\n" + " }\n" + " +Timings = { Class = TimingDataSource }\n" + " }\n" + " +States = {\n" + " Class = ReferenceContainer\n" + " +State1 = {\n" + " Class = RealTimeState\n" + " +Threads = {\n" + " Class = ReferenceContainer\n" + " +Thread1 = { Class = RealTimeThread Functions = { Reader } }\n" + " }\n" + " }\n" + " }\n" + " +Scheduler = { Class = GAMScheduler TimingDataSource = Timings }\n" + "}\n"; + + ReferenceT app = LoadApplication(cfg); + bool ok = app.IsValid(); + ObjectRegistryDatabase::Instance()->Purge(); + return ok; +} + +bool UDPStreamerClientTest::TestInitialise_MulticastMode_DefaultDataPort() { + using namespace MARTe; + static const char8 *const cfg = + "+Test = {\n" + " Class = RealTimeApplication\n" + " +Functions = {\n" + " Class = ReferenceContainer\n" + " +Reader = {\n" + " Class = UDPStreamerClientTestGAM\n" + " InputSignals = { Counter = { DataSource = ClientDS Type = uint32 } }\n" + " OutputSignals = { Counter = { DataSource = DDB Type = uint32 } }\n" + " }\n" + " }\n" + " +Data = {\n" + " Class = ReferenceContainer\n" + " DefaultDataSource = DDB\n" + " +DDB = { Class = GAMDataSource }\n" + " +ClientDS = {\n" + " Class = UDPStreamerClient\n" + " ServerAddress = \"127.0.0.1\"\n" + " Port = 44704\n" + " MulticastGroup = \"239.0.0.6\"\n" + " Signals = { Counter = { Type = uint32 } }\n" + " }\n" + " +Timings = { Class = TimingDataSource }\n" + " }\n" + " +States = {\n" + " Class = ReferenceContainer\n" + " +State1 = {\n" + " Class = RealTimeState\n" + " +Threads = {\n" + " Class = ReferenceContainer\n" + " +Thread1 = { Class = RealTimeThread Functions = { Reader } }\n" + " }\n" + " }\n" + " }\n" + " +Scheduler = { Class = GAMScheduler TimingDataSource = Timings }\n" + "}\n"; + + ReferenceT app = LoadApplication(cfg); + bool ok = app.IsValid(); + ObjectRegistryDatabase::Instance()->Purge(); + return ok; +} + +bool UDPStreamerClientTest::TestSetConfiguredDatabase_MultipleSignals() { + using namespace MARTe; + static const char8 *const cfg = + "+Test = {\n" + " Class = RealTimeApplication\n" + " +Functions = {\n" + " Class = ReferenceContainer\n" + " +Reader = {\n" + " Class = UDPStreamerClientTestGAM\n" + " InputSignals = {\n" + " Counter = { DataSource = ClientDS Type = uint32 }\n" + " Samples = { DataSource = ClientDS Type = float32 NumberOfDimensions = 1 NumberOfElements = 4 }\n" + " }\n" + " OutputSignals = {\n" + " Counter = { DataSource = DDB Type = uint32 }\n" + " Samples = { DataSource = DDB Type = float32 NumberOfDimensions = 1 NumberOfElements = 4 }\n" + " }\n" + " }\n" + " }\n" + " +Data = {\n" + " Class = ReferenceContainer\n" + " DefaultDataSource = DDB\n" + " +DDB = { Class = GAMDataSource }\n" + " +ClientDS = {\n" + " Class = UDPStreamerClient\n" + " ServerAddress = \"127.0.0.1\"\n" + " Port = 44705\n" + " Signals = {\n" + " Counter = { Type = uint32 }\n" + " Samples = { Type = float32 NumberOfDimensions = 1 NumberOfElements = 4 }\n" + " }\n" + " }\n" + " +Timings = { Class = TimingDataSource }\n" + " }\n" + " +States = {\n" + " Class = ReferenceContainer\n" + " +State1 = {\n" + " Class = RealTimeState\n" + " +Threads = {\n" + " Class = ReferenceContainer\n" + " +Thread1 = { Class = RealTimeThread Functions = { Reader } }\n" + " }\n" + " }\n" + " }\n" + " +Scheduler = { Class = GAMScheduler TimingDataSource = Timings }\n" + "}\n"; + + ReferenceT app = LoadApplication(cfg); + bool ok = app.IsValid(); + ObjectRegistryDatabase::Instance()->Purge(); + return ok; +} + +bool UDPStreamerClientTest::TestPrepareNextState_StartsReceiver() { + using namespace MARTe; + StreamString cfg = BuildBasicConfig(44706u); + ReferenceT app = LoadApplication(cfg.Buffer()); + bool ok = app.IsValid(); + if (ok) { + ok = (app->PrepareNextState("State1") == MARTe::ErrorManagement::NoError); + } + Sleep::MSec(50u); + ObjectRegistryDatabase::Instance()->Purge(); + return ok; +} + +bool UDPStreamerClientTest::TestSynchronise_NoData() { + using namespace MARTe; + StreamString cfg = BuildBasicConfig(44707u); + ReferenceT app = LoadApplication(cfg.Buffer()); + bool ok = app.IsValid(); + + ReferenceT ds; + if (ok) { + ds = ObjectRegistryDatabase::Instance()->Find("Test.Data.ClientDS"); + ok = ds.IsValid(); + } + if (ok) { + /* No CONFIG/DATA ever delivered: Synchronise must be a safe no-op + * and still return true. */ + ok = ds->Synchronise(); + } + + void *sigMem = NULL_PTR(void *); + if (ok) { + ok = ds->GetSignalMemoryBuffer(0u, 0u, sigMem); + } + if (ok) { + uint32 value = 0xFFFFFFFFu; + (void) memcpy(&value, sigMem, sizeof(uint32)); + /* Memory was zero-initialised by AllocateMemory and never touched. */ + ok = (value == 0u); + } + + ObjectRegistryDatabase::Instance()->Purge(); + return ok; +} + +bool UDPStreamerClientTest::TestOnUDPSConfig_BasicAccept() { + using namespace MARTe; + StreamString cfg = BuildBasicConfig(44708u); + ReferenceT app = LoadApplication(cfg.Buffer()); + bool ok = app.IsValid(); + + ReferenceT ds; + if (ok) { + ds = ObjectRegistryDatabase::Instance()->Find("Test.Data.ClientDS"); + ok = ds.IsValid(); + } + + /* Build a CONFIG payload declaring one scalar "Counter" uint32 signal. */ + if (ok) { + uint8 payload[4u + UDPS_SIGNAL_DESC_SIZE + 1u]; + uint32 numSigs = 1u; + (void) memcpy(payload, &numSigs, 4u); + + UDPSSignalDescriptor desc; + (void) memset(&desc, 0, sizeof(desc)); + (void) strncpy(desc.name, "Counter", UDPS_MAX_SIGNAL_NAME - 1u); + desc.typeCode = UDPS_TYPECODE_UINT32; + desc.quantType = UDPS_QUANT_NONE; + desc.numDimensions = 0u; + desc.numRows = 1u; + desc.numCols = 1u; + desc.rangeMin = 0.0; + desc.rangeMax = 1.0; + desc.timeMode = UDPS_TIMEMODE_PACKET; + desc.samplingRate = 0.0; + desc.timeSignalIdx = UDPS_NO_TIME_SIGNAL; + (void) memcpy(payload + 4u, &desc, UDPS_SIGNAL_DESC_SIZE); + payload[4u + UDPS_SIGNAL_DESC_SIZE] = UDPS_PUBLISH_STRICT; + + ds->OnUDPSConfig(payload, static_cast(sizeof(payload))); + } + + /* Deliver one DATA payload: 8-byte timestamp + uint32 value = 12345. + * The head start given to the background Synchronise() in + * StartSynchroniseThread() is a race against thread-scheduling latency, + * so retry the deliver+sync sequence until it lands. */ + bool gotValue = false; + for (uint32 attempt = 0u; ok && (!gotValue) && (attempt < 30u); attempt++) { + SynchroniseThreadArgs *syncArgs = StartSynchroniseThread(ds); + uint8 data[8u + 4u]; + (void) memset(data, 0, 8u); + uint32 value = 12345u; + (void) memcpy(data + 8u, &value, 4u); + ds->OnUDPSData(data, static_cast(sizeof(data))); + if (JoinSynchroniseThread(syncArgs)) { + void *sigMem = NULL_PTR(void *); + if (ds->GetSignalMemoryBuffer(0u, 0u, sigMem)) { + uint32 decoded = 0u; + (void) memcpy(&decoded, sigMem, sizeof(uint32)); + gotValue = (decoded == 12345u); + } + } + } + ok = ok && gotValue; + + ObjectRegistryDatabase::Instance()->Purge(); + return ok; +} + +bool UDPStreamerClientTest::TestOnUDPSConfig_SignalCountMismatch() { + using namespace MARTe; + StreamString cfg = BuildBasicConfig(44709u); + ReferenceT app = LoadApplication(cfg.Buffer()); + bool ok = app.IsValid(); + + ReferenceT ds; + if (ok) { + ds = ObjectRegistryDatabase::Instance()->Find("Test.Data.ClientDS"); + ok = ds.IsValid(); + } + + /* CONFIG declares 2 signals while the client only has 1. */ + if (ok) { + uint8 payload[4u + (2u * UDPS_SIGNAL_DESC_SIZE) + 1u]; + uint32 numSigs = 2u; + (void) memcpy(payload, &numSigs, 4u); + + UDPSSignalDescriptor desc; + (void) memset(&desc, 0, sizeof(desc)); + (void) strncpy(desc.name, "Counter", UDPS_MAX_SIGNAL_NAME - 1u); + desc.typeCode = UDPS_TYPECODE_UINT32; + desc.numRows = 1u; + desc.numCols = 1u; + (void) memcpy(payload + 4u, &desc, UDPS_SIGNAL_DESC_SIZE); + (void) strncpy(desc.name, "Extra", UDPS_MAX_SIGNAL_NAME - 1u); + (void) memcpy(payload + 4u + UDPS_SIGNAL_DESC_SIZE, &desc, UDPS_SIGNAL_DESC_SIZE); + payload[4u + (2u * UDPS_SIGNAL_DESC_SIZE)] = UDPS_PUBLISH_STRICT; + + ds->OnUDPSConfig(payload, static_cast(sizeof(payload))); + } + + /* A DATA payload must be silently ignored since CONFIG was rejected. */ + if (ok) { + uint8 data[8u + 4u]; + (void) memset(data, 0, 8u); + uint32 value = 999u; + (void) memcpy(data + 8u, &value, 4u); + ds->OnUDPSData(data, static_cast(sizeof(data))); + ok = ds->Synchronise(); + } + + void *sigMem = NULL_PTR(void *); + if (ok) { + ok = ds->GetSignalMemoryBuffer(0u, 0u, sigMem); + } + if (ok) { + uint32 value = 0xFFFFFFFFu; + (void) memcpy(&value, sigMem, sizeof(uint32)); + ok = (value == 0u); + } + + ObjectRegistryDatabase::Instance()->Purge(); + return ok; +} + +bool UDPStreamerClientTest::TestOnUDPSConfig_NameMismatch() { + using namespace MARTe; + StreamString cfg = BuildBasicConfig(44710u); + ReferenceT app = LoadApplication(cfg.Buffer()); + bool ok = app.IsValid(); + + ReferenceT ds; + if (ok) { + ds = ObjectRegistryDatabase::Instance()->Find("Test.Data.ClientDS"); + ok = ds.IsValid(); + } + + if (ok) { + uint8 payload[4u + UDPS_SIGNAL_DESC_SIZE + 1u]; + uint32 numSigs = 1u; + (void) memcpy(payload, &numSigs, 4u); + + UDPSSignalDescriptor desc; + (void) memset(&desc, 0, sizeof(desc)); + (void) strncpy(desc.name, "WrongName", UDPS_MAX_SIGNAL_NAME - 1u); + desc.typeCode = UDPS_TYPECODE_UINT32; + desc.numRows = 1u; + desc.numCols = 1u; + (void) memcpy(payload + 4u, &desc, UDPS_SIGNAL_DESC_SIZE); + payload[4u + UDPS_SIGNAL_DESC_SIZE] = UDPS_PUBLISH_STRICT; + + ds->OnUDPSConfig(payload, static_cast(sizeof(payload))); + } + + if (ok) { + uint8 data[8u + 4u]; + (void) memset(data, 0, 8u); + uint32 value = 999u; + (void) memcpy(data + 8u, &value, 4u); + ds->OnUDPSData(data, static_cast(sizeof(data))); + ok = ds->Synchronise(); + } + + void *sigMem = NULL_PTR(void *); + if (ok) { + ok = ds->GetSignalMemoryBuffer(0u, 0u, sigMem); + } + if (ok) { + uint32 value = 0xFFFFFFFFu; + (void) memcpy(&value, sigMem, sizeof(uint32)); + ok = (value == 0u); + } + + ObjectRegistryDatabase::Instance()->Purge(); + return ok; +} + +bool UDPStreamerClientTest::TestOnUDPSConfig_ElementCountMismatch() { + using namespace MARTe; + StreamString cfg = BuildBasicConfig(44711u); + ReferenceT app = LoadApplication(cfg.Buffer()); + bool ok = app.IsValid(); + + ReferenceT ds; + if (ok) { + ds = ObjectRegistryDatabase::Instance()->Find("Test.Data.ClientDS"); + ok = ds.IsValid(); + } + + if (ok) { + uint8 payload[4u + UDPS_SIGNAL_DESC_SIZE + 1u]; + uint32 numSigs = 1u; + (void) memcpy(payload, &numSigs, 4u); + + UDPSSignalDescriptor desc; + (void) memset(&desc, 0, sizeof(desc)); + (void) strncpy(desc.name, "Counter", UDPS_MAX_SIGNAL_NAME - 1u); + desc.typeCode = UDPS_TYPECODE_UINT32; + desc.numRows = 3u; /* client declares a scalar (1 element) */ + desc.numCols = 1u; + (void) memcpy(payload + 4u, &desc, UDPS_SIGNAL_DESC_SIZE); + payload[4u + UDPS_SIGNAL_DESC_SIZE] = UDPS_PUBLISH_STRICT; + + ds->OnUDPSConfig(payload, static_cast(sizeof(payload))); + } + + if (ok) { + uint8 data[8u + 4u]; + (void) memset(data, 0, 8u); + uint32 value = 999u; + (void) memcpy(data + 8u, &value, 4u); + ds->OnUDPSData(data, static_cast(sizeof(data))); + ok = ds->Synchronise(); + } + + void *sigMem = NULL_PTR(void *); + if (ok) { + ok = ds->GetSignalMemoryBuffer(0u, 0u, sigMem); + } + if (ok) { + uint32 value = 0xFFFFFFFFu; + (void) memcpy(&value, sigMem, sizeof(uint32)); + ok = (value == 0u); + } + + ObjectRegistryDatabase::Instance()->Purge(); + return ok; +} + +bool UDPStreamerClientTest::TestOnUDPSConfig_TooSmallPayload() { + using namespace MARTe; + StreamString cfg = BuildBasicConfig(44712u); + ReferenceT app = LoadApplication(cfg.Buffer()); + bool ok = app.IsValid(); + + ReferenceT ds; + if (ok) { + ds = ObjectRegistryDatabase::Instance()->Find("Test.Data.ClientDS"); + ok = ds.IsValid(); + } + + if (ok) { + /* Fewer than 4 bytes: cannot even hold numSigs. Must not crash. */ + uint8 payload[2u] = { 0u, 0u }; + ds->OnUDPSConfig(payload, static_cast(sizeof(payload))); + ok = ds->Synchronise(); + } + + ObjectRegistryDatabase::Instance()->Purge(); + return ok; +} + +/** + * @brief Config with two signals: scalar "Counter" (uint32) and a + * two-element "Pair" (float64[2]) — used for ordering/accumulate tests. + */ +static MARTe::StreamString BuildTwoSignalConfig(MARTe::uint16 port) { + using namespace MARTe; + StreamString cfg; + cfg.Printf( + "+Test = {\n" + " Class = RealTimeApplication\n" + " +Functions = {\n" + " Class = ReferenceContainer\n" + " +Reader = {\n" + " Class = UDPStreamerClientTestGAM\n" + " InputSignals = {\n" + " Counter = { DataSource = ClientDS Type = uint32 }\n" + " Pair = { DataSource = ClientDS Type = float64 NumberOfDimensions = 1 NumberOfElements = 2 }\n" + " }\n" + " OutputSignals = {\n" + " Counter = { DataSource = DDB Type = uint32 }\n" + " Pair = { DataSource = DDB Type = float64 NumberOfDimensions = 1 NumberOfElements = 2 }\n" + " }\n" + " }\n" + " }\n" + " +Data = {\n" + " Class = ReferenceContainer\n" + " DefaultDataSource = DDB\n" + " +DDB = { Class = GAMDataSource }\n" + " +ClientDS = {\n" + " Class = UDPStreamerClient\n" + " ServerAddress = \"127.0.0.1\"\n" + " Port = %d\n" + " Signals = {\n" + " Counter = { Type = uint32 }\n" + " Pair = { Type = float64 NumberOfDimensions = 1 NumberOfElements = 2 }\n" + " }\n" + " }\n" + " +Timings = { Class = TimingDataSource }\n" + " }\n" + " +States = {\n" + " Class = ReferenceContainer\n" + " +State1 = {\n" + " Class = RealTimeState\n" + " +Threads = {\n" + " Class = ReferenceContainer\n" + " +Thread1 = { Class = RealTimeThread Functions = { Reader } }\n" + " }\n" + " }\n" + " }\n" + " +Scheduler = { Class = GAMScheduler TimingDataSource = Timings }\n" + "}\n", port); + return cfg; +} + +/** + * @brief Config with a single Float32Bit scalar signal "Value" — used for + * the UINT16 quantisation test. + */ +static MARTe::StreamString BuildFloat32Config(MARTe::uint16 port) { + using namespace MARTe; + StreamString cfg; + cfg.Printf( + "+Test = {\n" + " Class = RealTimeApplication\n" + " +Functions = {\n" + " Class = ReferenceContainer\n" + " +Reader = {\n" + " Class = UDPStreamerClientTestGAM\n" + " InputSignals = { Value = { DataSource = ClientDS Type = float32 } }\n" + " OutputSignals = { Value = { DataSource = DDB Type = float32 } }\n" + " }\n" + " }\n" + " +Data = {\n" + " Class = ReferenceContainer\n" + " DefaultDataSource = DDB\n" + " +DDB = { Class = GAMDataSource }\n" + " +ClientDS = {\n" + " Class = UDPStreamerClient\n" + " ServerAddress = \"127.0.0.1\"\n" + " Port = %d\n" + " Signals = { Value = { Type = float32 } }\n" + " }\n" + " +Timings = { Class = TimingDataSource }\n" + " }\n" + " +States = {\n" + " Class = ReferenceContainer\n" + " +State1 = {\n" + " Class = RealTimeState\n" + " +Threads = {\n" + " Class = ReferenceContainer\n" + " +Thread1 = { Class = RealTimeThread Functions = { Reader } }\n" + " }\n" + " }\n" + " }\n" + " +Scheduler = { Class = GAMScheduler TimingDataSource = Timings }\n" + "}\n", port); + return cfg; +} + +/** + * @brief Config with a single Float64Bit scalar signal "Value2" — used for + * the INT8 quantisation test. + */ +static MARTe::StreamString BuildFloat64Config(MARTe::uint16 port) { + using namespace MARTe; + StreamString cfg; + cfg.Printf( + "+Test = {\n" + " Class = RealTimeApplication\n" + " +Functions = {\n" + " Class = ReferenceContainer\n" + " +Reader = {\n" + " Class = UDPStreamerClientTestGAM\n" + " InputSignals = { Value2 = { DataSource = ClientDS Type = float64 } }\n" + " OutputSignals = { Value2 = { DataSource = DDB Type = float64 } }\n" + " }\n" + " }\n" + " +Data = {\n" + " Class = ReferenceContainer\n" + " DefaultDataSource = DDB\n" + " +DDB = { Class = GAMDataSource }\n" + " +ClientDS = {\n" + " Class = UDPStreamerClient\n" + " ServerAddress = \"127.0.0.1\"\n" + " Port = %d\n" + " Signals = { Value2 = { Type = float64 } }\n" + " }\n" + " +Timings = { Class = TimingDataSource }\n" + " }\n" + " +States = {\n" + " Class = ReferenceContainer\n" + " +State1 = {\n" + " Class = RealTimeState\n" + " +Threads = {\n" + " Class = ReferenceContainer\n" + " +Thread1 = { Class = RealTimeThread Functions = { Reader } }\n" + " }\n" + " }\n" + " }\n" + " +Scheduler = { Class = GAMScheduler TimingDataSource = Timings }\n" + "}\n", port); + return cfg; +} + +bool UDPStreamerClientTest::TestOnUDPSData_QuantizedUint16() { + using namespace MARTe; + StreamString cfg = BuildFloat32Config(44713u); + ReferenceT app = LoadApplication(cfg.Buffer()); + bool ok = app.IsValid(); + + ReferenceT ds; + if (ok) { + ds = ObjectRegistryDatabase::Instance()->Find("Test.Data.ClientDS"); + ok = ds.IsValid(); + } + + if (ok) { + uint8 payload[4u + UDPS_SIGNAL_DESC_SIZE + 1u]; + uint32 numSigs = 1u; + (void) memcpy(payload, &numSigs, 4u); + + UDPSSignalDescriptor desc; + (void) memset(&desc, 0, sizeof(desc)); + (void) strncpy(desc.name, "Value", UDPS_MAX_SIGNAL_NAME - 1u); + desc.typeCode = UDPS_TYPECODE_FLOAT32; + desc.quantType = UDPS_QUANT_UINT16; + desc.numRows = 1u; + desc.numCols = 1u; + desc.rangeMin = -10.0; + desc.rangeMax = 10.0; + (void) memcpy(payload + 4u, &desc, UDPS_SIGNAL_DESC_SIZE); + payload[4u + UDPS_SIGNAL_DESC_SIZE] = UDPS_PUBLISH_STRICT; + + ds->OnUDPSConfig(payload, static_cast(sizeof(payload))); + } + + /* raw=65535 (max uint16) -> rangeMin + (65535/65535)*range = rangeMax = 10.0 exactly. */ + bool gotValue = false; + for (uint32 attempt = 0u; ok && (!gotValue) && (attempt < 30u); attempt++) { + SynchroniseThreadArgs *syncArgs = StartSynchroniseThread(ds); + uint8 data[8u + 2u]; + (void) memset(data, 0, 8u); + uint16 raw = 65535u; + (void) memcpy(data + 8u, &raw, 2u); + ds->OnUDPSData(data, static_cast(sizeof(data))); + if (JoinSynchroniseThread(syncArgs)) { + void *sigMem = NULL_PTR(void *); + if (ds->GetSignalMemoryBuffer(0u, 0u, sigMem)) { + float32 decoded = 0.0f; + (void) memcpy(&decoded, sigMem, sizeof(float32)); + gotValue = (decoded == 10.0f); + } + } + } + ok = ok && gotValue; + + ObjectRegistryDatabase::Instance()->Purge(); + return ok; +} + +bool UDPStreamerClientTest::TestOnUDPSData_QuantizedInt8() { + using namespace MARTe; + StreamString cfg = BuildFloat64Config(44714u); + ReferenceT app = LoadApplication(cfg.Buffer()); + bool ok = app.IsValid(); + + ReferenceT ds; + if (ok) { + ds = ObjectRegistryDatabase::Instance()->Find("Test.Data.ClientDS"); + ok = ds.IsValid(); + } + + if (ok) { + uint8 payload[4u + UDPS_SIGNAL_DESC_SIZE + 1u]; + uint32 numSigs = 1u; + (void) memcpy(payload, &numSigs, 4u); + + UDPSSignalDescriptor desc; + (void) memset(&desc, 0, sizeof(desc)); + (void) strncpy(desc.name, "Value2", UDPS_MAX_SIGNAL_NAME - 1u); + desc.typeCode = UDPS_TYPECODE_FLOAT64; + desc.quantType = UDPS_QUANT_INT8; + desc.numRows = 1u; + desc.numCols = 1u; + desc.rangeMin = 0.0; + desc.rangeMax = 100.0; + (void) memcpy(payload + 4u, &desc, UDPS_SIGNAL_DESC_SIZE); + payload[4u + UDPS_SIGNAL_DESC_SIZE] = UDPS_PUBLISH_STRICT; + + ds->OnUDPSConfig(payload, static_cast(sizeof(payload))); + } + + /* raw=127 (max int8) -> rangeMin + ((127+127)/254)*range = rangeMax = 100.0 exactly. */ + bool gotValue = false; + for (uint32 attempt = 0u; ok && (!gotValue) && (attempt < 30u); attempt++) { + SynchroniseThreadArgs *syncArgs = StartSynchroniseThread(ds); + uint8 data[8u + 1u]; + (void) memset(data, 0, 8u); + int8 raw = 127; + (void) memcpy(data + 8u, &raw, 1u); + ds->OnUDPSData(data, static_cast(sizeof(data))); + if (JoinSynchroniseThread(syncArgs)) { + void *sigMem = NULL_PTR(void *); + if (ds->GetSignalMemoryBuffer(0u, 0u, sigMem)) { + float64 decoded = 0.0; + (void) memcpy(&decoded, sigMem, sizeof(float64)); + gotValue = (decoded == 100.0); + } + } + } + ok = ok && gotValue; + + ObjectRegistryDatabase::Instance()->Purge(); + return ok; +} + +bool UDPStreamerClientTest::TestOnUDPSData_MultipleSignalsOrder() { + using namespace MARTe; + StreamString cfg = BuildTwoSignalConfig(44715u); + ReferenceT app = LoadApplication(cfg.Buffer()); + bool ok = app.IsValid(); + + ReferenceT ds; + if (ok) { + ds = ObjectRegistryDatabase::Instance()->Find("Test.Data.ClientDS"); + ok = ds.IsValid(); + } + + if (ok) { + uint8 payload[4u + (2u * UDPS_SIGNAL_DESC_SIZE) + 1u]; + uint32 numSigs = 2u; + (void) memcpy(payload, &numSigs, 4u); + + UDPSSignalDescriptor desc; + (void) memset(&desc, 0, sizeof(desc)); + (void) strncpy(desc.name, "Counter", UDPS_MAX_SIGNAL_NAME - 1u); + desc.typeCode = UDPS_TYPECODE_UINT32; + desc.numRows = 1u; + desc.numCols = 1u; + (void) memcpy(payload + 4u, &desc, UDPS_SIGNAL_DESC_SIZE); + + (void) memset(&desc, 0, sizeof(desc)); + (void) strncpy(desc.name, "Pair", UDPS_MAX_SIGNAL_NAME - 1u); + desc.typeCode = UDPS_TYPECODE_FLOAT64; + desc.numRows = 2u; + desc.numCols = 1u; + (void) memcpy(payload + 4u + UDPS_SIGNAL_DESC_SIZE, &desc, UDPS_SIGNAL_DESC_SIZE); + + payload[4u + (2u * UDPS_SIGNAL_DESC_SIZE)] = UDPS_PUBLISH_STRICT; + + ds->OnUDPSConfig(payload, static_cast(sizeof(payload))); + } + + bool gotValue = false; + for (uint32 attempt = 0u; ok && (!gotValue) && (attempt < 30u); attempt++) { + SynchroniseThreadArgs *syncArgs = StartSynchroniseThread(ds); + uint8 data[8u + 4u + 16u]; + (void) memset(data, 0, sizeof(data)); + uint32 counterVal = 777u; + (void) memcpy(data + 8u, &counterVal, 4u); + float64 pairVal[2] = { 1.5, 2.5 }; + (void) memcpy(data + 12u, pairVal, 16u); + ds->OnUDPSData(data, static_cast(sizeof(data))); + if (JoinSynchroniseThread(syncArgs)) { + void *counterMem = NULL_PTR(void *); + void *pairMem = NULL_PTR(void *); + if (ds->GetSignalMemoryBuffer(0u, 0u, counterMem) && + ds->GetSignalMemoryBuffer(1u, 0u, pairMem)) { + uint32 decodedCounter = 0u; + (void) memcpy(&decodedCounter, counterMem, 4u); + float64 decodedPair[2] = { 0.0, 0.0 }; + (void) memcpy(decodedPair, pairMem, 16u); + gotValue = (decodedCounter == 777u) && (decodedPair[0] == 1.5) && (decodedPair[1] == 2.5); + } + } + } + ok = ok && gotValue; + + ObjectRegistryDatabase::Instance()->Purge(); + return ok; +} + +bool UDPStreamerClientTest::TestOnUDPSData_AccumulateMode() { + using namespace MARTe; + StreamString cfg = BuildTwoSignalConfig(44716u); + ReferenceT app = LoadApplication(cfg.Buffer()); + bool ok = app.IsValid(); + + ReferenceT ds; + if (ok) { + ds = ObjectRegistryDatabase::Instance()->Find("Test.Data.ClientDS"); + ok = ds.IsValid(); + } + + if (ok) { + uint8 payload[4u + (2u * UDPS_SIGNAL_DESC_SIZE) + 1u]; + uint32 numSigs = 2u; + (void) memcpy(payload, &numSigs, 4u); + + UDPSSignalDescriptor desc; + (void) memset(&desc, 0, sizeof(desc)); + (void) strncpy(desc.name, "Counter", UDPS_MAX_SIGNAL_NAME - 1u); + desc.typeCode = UDPS_TYPECODE_UINT32; + desc.numRows = 1u; + desc.numCols = 1u; + (void) memcpy(payload + 4u, &desc, UDPS_SIGNAL_DESC_SIZE); + + (void) memset(&desc, 0, sizeof(desc)); + (void) strncpy(desc.name, "Pair", UDPS_MAX_SIGNAL_NAME - 1u); + desc.typeCode = UDPS_TYPECODE_FLOAT64; + desc.numRows = 2u; + desc.numCols = 1u; + (void) memcpy(payload + 4u + UDPS_SIGNAL_DESC_SIZE, &desc, UDPS_SIGNAL_DESC_SIZE); + + payload[4u + (2u * UDPS_SIGNAL_DESC_SIZE)] = UDPS_PUBLISH_ACCUMULATE; + + ds->OnUDPSConfig(payload, static_cast(sizeof(payload))); + } + + /* [8-byte ts][4-byte numSamples=3][3x uint32 Counter samples][2x float64 Pair, once] */ + bool gotValue = false; + for (uint32 attempt = 0u; ok && (!gotValue) && (attempt < 30u); attempt++) { + SynchroniseThreadArgs *syncArgs = StartSynchroniseThread(ds); + uint8 data[8u + 4u + 12u + 16u]; + (void) memset(data, 0, sizeof(data)); + uint32 numSamples = 3u; + (void) memcpy(data + 8u, &numSamples, 4u); + uint32 samples[3] = { 10u, 20u, 30u }; + (void) memcpy(data + 12u, samples, 12u); + float64 pairVal[2] = { 1.5, 2.5 }; + (void) memcpy(data + 24u, pairVal, 16u); + ds->OnUDPSData(data, static_cast(sizeof(data))); + if (JoinSynchroniseThread(syncArgs)) { + void *counterMem = NULL_PTR(void *); + void *pairMem = NULL_PTR(void *); + if (ds->GetSignalMemoryBuffer(0u, 0u, counterMem) && + ds->GetSignalMemoryBuffer(1u, 0u, pairMem)) { + uint32 decodedCounter = 0u; + (void) memcpy(&decodedCounter, counterMem, 4u); + float64 decodedPair[2] = { 0.0, 0.0 }; + (void) memcpy(decodedPair, pairMem, 16u); + /* Scalar publishes only the most recent (last) accumulated sample. */ + gotValue = (decodedCounter == 30u) && (decodedPair[0] == 1.5) && (decodedPair[1] == 2.5); + } + } + } + ok = ok && gotValue; + + ObjectRegistryDatabase::Instance()->Purge(); + return ok; +} + +bool UDPStreamerClientTest::TestOnUDPSData_TooSmallPayload() { + using namespace MARTe; + StreamString cfg = BuildBasicConfig(44717u); + ReferenceT app = LoadApplication(cfg.Buffer()); + bool ok = app.IsValid(); + + ReferenceT ds; + if (ok) { + ds = ObjectRegistryDatabase::Instance()->Find("Test.Data.ClientDS"); + ok = ds.IsValid(); + } + + if (ok) { + uint8 payload[4u + UDPS_SIGNAL_DESC_SIZE + 1u]; + uint32 numSigs = 1u; + (void) memcpy(payload, &numSigs, 4u); + + UDPSSignalDescriptor desc; + (void) memset(&desc, 0, sizeof(desc)); + (void) strncpy(desc.name, "Counter", UDPS_MAX_SIGNAL_NAME - 1u); + desc.typeCode = UDPS_TYPECODE_UINT32; + desc.numRows = 1u; + desc.numCols = 1u; + (void) memcpy(payload + 4u, &desc, UDPS_SIGNAL_DESC_SIZE); + payload[4u + UDPS_SIGNAL_DESC_SIZE] = UDPS_PUBLISH_STRICT; + + ds->OnUDPSConfig(payload, static_cast(sizeof(payload))); + } + + if (ok) { + /* Fewer than 8 bytes: cannot even hold the packet timestamp. */ + uint8 data[4u] = { 1u, 2u, 3u, 4u }; + ds->OnUDPSData(data, static_cast(sizeof(data))); + ok = ds->Synchronise(); + } + + void *sigMem = NULL_PTR(void *); + if (ok) { + ok = ds->GetSignalMemoryBuffer(0u, 0u, sigMem); + } + if (ok) { + uint32 value = 0xFFFFFFFFu; + (void) memcpy(&value, sigMem, sizeof(uint32)); + ok = (value == 0u); + } + + ObjectRegistryDatabase::Instance()->Purge(); + return ok; +} + +bool UDPStreamerClientTest::TestOnUDPSData_BeforeConfig() { + using namespace MARTe; + StreamString cfg = BuildBasicConfig(44718u); + ReferenceT app = LoadApplication(cfg.Buffer()); + bool ok = app.IsValid(); + + ReferenceT ds; + if (ok) { + ds = ObjectRegistryDatabase::Instance()->Find("Test.Data.ClientDS"); + ok = ds.IsValid(); + } + + if (ok) { + /* No OnUDPSConfig was ever delivered: configValidated is false. */ + uint8 data[8u + 4u]; + (void) memset(data, 0, 8u); + uint32 value = 555u; + (void) memcpy(data + 8u, &value, 4u); + ds->OnUDPSData(data, static_cast(sizeof(data))); + ok = ds->Synchronise(); + } + + void *sigMem = NULL_PTR(void *); + if (ok) { + ok = ds->GetSignalMemoryBuffer(0u, 0u, sigMem); + } + if (ok) { + uint32 value = 0xFFFFFFFFu; + (void) memcpy(&value, sigMem, sizeof(uint32)); + ok = (value == 0u); + } + + ObjectRegistryDatabase::Instance()->Purge(); + return ok; +} + +bool UDPStreamerClientTest::TestOnUDPSDisconnected_InvalidatesConfig() { + using namespace MARTe; + StreamString cfg = BuildBasicConfig(44719u); + ReferenceT app = LoadApplication(cfg.Buffer()); + bool ok = app.IsValid(); + + ReferenceT ds; + if (ok) { + ds = ObjectRegistryDatabase::Instance()->Find("Test.Data.ClientDS"); + ok = ds.IsValid(); + } + + if (ok) { + uint8 payload[4u + UDPS_SIGNAL_DESC_SIZE + 1u]; + uint32 numSigs = 1u; + (void) memcpy(payload, &numSigs, 4u); + + UDPSSignalDescriptor desc; + (void) memset(&desc, 0, sizeof(desc)); + (void) strncpy(desc.name, "Counter", UDPS_MAX_SIGNAL_NAME - 1u); + desc.typeCode = UDPS_TYPECODE_UINT32; + desc.numRows = 1u; + desc.numCols = 1u; + (void) memcpy(payload + 4u, &desc, UDPS_SIGNAL_DESC_SIZE); + payload[4u + UDPS_SIGNAL_DESC_SIZE] = UDPS_PUBLISH_STRICT; + + ds->OnUDPSConfig(payload, static_cast(sizeof(payload))); + } + + void *sigMem = NULL_PTR(void *); + bool gotValue = false; + for (uint32 attempt = 0u; ok && (!gotValue) && (attempt < 30u); attempt++) { + SynchroniseThreadArgs *syncArgs = StartSynchroniseThread(ds); + uint8 data[8u + 4u]; + (void) memset(data, 0, 8u); + uint32 value = 111u; + (void) memcpy(data + 8u, &value, 4u); + ds->OnUDPSData(data, static_cast(sizeof(data))); + if (JoinSynchroniseThread(syncArgs)) { + if (ds->GetSignalMemoryBuffer(0u, 0u, sigMem)) { + uint32 decoded = 0u; + (void) memcpy(&decoded, sigMem, sizeof(uint32)); + gotValue = (decoded == 111u); + } + } + } + ok = ok && gotValue; + + if (ok) { + ds->OnUDPSDisconnected(); + uint8 data[8u + 4u]; + (void) memset(data, 0, 8u); + uint32 value = 222u; + (void) memcpy(data + 8u, &value, 4u); + ds->OnUDPSData(data, static_cast(sizeof(data))); + /* No semaphore post occurred (OnUDPSData returned early), so + * Synchronise() must time out and leave the previous value in place. */ + ok = ds->Synchronise(); + } + + if (ok) { + uint32 value = 0u; + (void) memcpy(&value, sigMem, sizeof(uint32)); + ok = (value == 111u); + } + + ObjectRegistryDatabase::Instance()->Purge(); + return ok; +} + +bool UDPStreamerClientTest::TestExecute_ConnectConfigDataEndToEnd() { + using namespace MARTe; + + static const uint16 serverPort = 44720u; + StreamString cfg = BuildBasicConfig(serverPort); + ReferenceT app = LoadApplication(cfg.Buffer()); + bool ok = app.IsValid(); + + /* Bind the mock server socket BEFORE starting the receiver, so the + * CONNECT datagram is never missed. */ + BasicUDPSocket serverSock; + if (ok) { + ok = serverSock.Open() && serverSock.Listen(serverPort); + } + + if (ok) { + ok = (app->PrepareNextState("State1") == MARTe::ErrorManagement::NoError); + } + + /* Receive the CONNECT and learn the client's ephemeral source address. */ + if (ok) { + uint8 recvBuf[64u]; + uint32 recvSize = static_cast(sizeof(recvBuf)); + TimeoutType timeout(1000u); + bool received = serverSock.Read(reinterpret_cast(recvBuf), recvSize, timeout); + ok = received && (recvSize >= UDPS_HEADER_SIZE); + if (ok) { + const UDPSPacketHeader *hdr = reinterpret_cast(recvBuf); + ok = (hdr->magic == UDPS_MAGIC) && (hdr->type == UDPS_TYPE_CONNECT); + } + if (ok) { + InternetHost clientHost = serverSock.GetSource(); + serverSock.SetDestination(clientHost); + } + } + + /* Send CONFIG: one scalar "Counter" uint32 signal, unquantised. */ + if (ok) { + UDPSSignalDescriptor desc; + (void) memset(&desc, 0, sizeof(desc)); + (void) strncpy(desc.name, "Counter", UDPS_MAX_SIGNAL_NAME - 1u); + desc.typeCode = UDPS_TYPECODE_UINT32; + desc.numRows = 1u; + desc.numCols = 1u; + + uint8 buf[UDPS_HEADER_SIZE + 4u + UDPS_SIGNAL_DESC_SIZE + 1u]; + const uint32 configPayloadBytes = 4u + UDPS_SIGNAL_DESC_SIZE + 1u; + UDPSBuildHeader(buf, UDPS_TYPE_CONFIG, 1u, 0u, 1u, configPayloadBytes); + uint32 numSigs = 1u; + (void) memcpy(buf + UDPS_HEADER_SIZE, &numSigs, 4u); + (void) memcpy(buf + UDPS_HEADER_SIZE + 4u, &desc, UDPS_SIGNAL_DESC_SIZE); + buf[UDPS_HEADER_SIZE + 4u + UDPS_SIGNAL_DESC_SIZE] = UDPS_PUBLISH_STRICT; + + uint32 sendSize = static_cast(sizeof(buf)); + ok = serverSock.Write(reinterpret_cast(buf), sendSize); + } + + Sleep::MSec(100u); + + /* Config processing does not Post() the data semaphore, so it is safe to + * look the DataSource up and start Synchronise() on a background thread + * now: by the time the DATA datagram is received (on the DataSource's + * own receiver thread) and OnUDPSData() Post()s, this thread's + * ResetWait() will already be blocked in Wait(), so the two race + * correctly instead of the Post() being silently discarded. */ + ReferenceT ds; + if (ok) { + ds = ObjectRegistryDatabase::Instance()->Find("Test.Data.ClientDS"); + ok = ds.IsValid(); + } + + /* Send DATA: 8-byte HRT timestamp + uint32 value = 424242. Each attempt + * uses a fresh packet counter, since UDPSClient's fragment-reassembly + * layer would otherwise silently drop an exact retransmission of a + * counter it has already fully reassembled. */ + bool gotValue = false; + for (uint32 attempt = 0u; ok && (!gotValue) && (attempt < 30u); attempt++) { + SynchroniseThreadArgs *syncArgs = StartSynchroniseThread(ds); + + uint8 buf[UDPS_HEADER_SIZE + 8u + 4u]; + const uint32 dataPayloadBytes = 8u + 4u; + UDPSBuildHeader(buf, UDPS_TYPE_DATA, 2u + attempt, 0u, 1u, dataPayloadBytes); + (void) memset(buf + UDPS_HEADER_SIZE, 0, 8u); + uint32 value = 424242u; + (void) memcpy(buf + UDPS_HEADER_SIZE + 8u, &value, 4u); + + uint32 sendSize = static_cast(sizeof(buf)); + ok = serverSock.Write(reinterpret_cast(buf), sendSize); + + if (ok && JoinSynchroniseThread(syncArgs)) { + void *sigMem = NULL_PTR(void *); + if (ds->GetSignalMemoryBuffer(0u, 0u, sigMem)) { + uint32 decoded = 0u; + (void) memcpy(&decoded, sigMem, sizeof(uint32)); + gotValue = (decoded == 424242u); + } + } + else if (!ok) { + (void) JoinSynchroniseThread(syncArgs); + } + } + ok = ok && gotValue; + + (void) serverSock.Close(); + Sleep::MSec(50u); + ObjectRegistryDatabase::Instance()->Purge(); + return ok; +} diff --git a/Test/Components/DataSources/UDPStreamerClient/UDPStreamerClientTest.h b/Test/Components/DataSources/UDPStreamerClient/UDPStreamerClientTest.h new file mode 100644 index 0000000..a6ce9e5 --- /dev/null +++ b/Test/Components/DataSources/UDPStreamerClient/UDPStreamerClientTest.h @@ -0,0 +1,157 @@ +/** + * @file UDPStreamerClientTest.h + * @brief Header file for class UDPStreamerClientTest + * @date 01/07/2026 + * @author Martino Ferrari + * + * @copyright Copyright 2015 F4E | European Joint Undertaking for ITER and + * the Development of Fusion Energy ('Fusion for Energy'). + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved + * by the European Commission - subsequent versions of the EUPL (the "Licence") + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl + * + * @warning Unless required by applicable law or agreed to in writing, + * software distributed under the Licence is distributed on an "AS IS" + * basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the Licence permissions and limitations under the Licence. + * + * @details This header file contains the declaration of the class UDPStreamerClientTest + * with all of its public, protected and private members. It may also include + * definitions for inline methods which need to be visible to the compiler. + */ + +#ifndef UDPSTREAMERCLIENTTEST_H_ +#define UDPSTREAMERCLIENTTEST_H_ + +/*---------------------------------------------------------------------------*/ +/* Standard header includes */ +/*---------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------*/ +/* Project header includes */ +/*---------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------*/ +/* Class declaration */ +/*---------------------------------------------------------------------------*/ + +/** + * @brief Tests the UDPStreamerClient DataSource public methods. + */ +class UDPStreamerClientTest { +public: + + /** + * @brief Tests Initialise with a fully valid unicast configuration. + */ + bool TestInitialise_Valid(); + + /** + * @brief Tests that a missing ServerAddress uses the default (127.0.0.1). + */ + bool TestInitialise_DefaultServerAddress(); + + /** + * @brief Tests that a missing Port uses the default (44500). + */ + bool TestInitialise_DefaultPort(); + + /** + * @brief Tests Initialise with MulticastGroup and an explicit DataPort. + */ + bool TestInitialise_MulticastMode_Valid(); + + /** + * @brief Tests that DataPort defaults to Port+1 when MulticastGroup is + * set but DataPort is absent. + */ + bool TestInitialise_MulticastMode_DefaultDataPort(); + + /** + * @brief Tests SetConfiguredDatabase / AllocateMemory with several + * signals of different types and array sizes. + */ + bool TestSetConfiguredDatabase_MultipleSignals(); + + /** + * @brief Tests PrepareNextState starts the background receiver thread. + */ + bool TestPrepareNextState_StartsReceiver(); + + /** + * @brief Tests that Synchronise() with no data received is a safe no-op. + */ + bool TestSynchronise_NoData(); + + /** + * @brief Tests the full OnUDPSConfig -> OnUDPSData -> Synchronise path + * for a single unquantised scalar signal. + */ + bool TestOnUDPSConfig_BasicAccept(); + + /** + * @brief Tests that a CONFIG with a different signal count is rejected. + */ + bool TestOnUDPSConfig_SignalCountMismatch(); + + /** + * @brief Tests that a CONFIG with a mismatched signal name is rejected. + */ + bool TestOnUDPSConfig_NameMismatch(); + + /** + * @brief Tests that a CONFIG with a mismatched element count is rejected. + */ + bool TestOnUDPSConfig_ElementCountMismatch(); + + /** + * @brief Tests that an undersized CONFIG payload is safely rejected. + */ + bool TestOnUDPSConfig_TooSmallPayload(); + + /** + * @brief Tests UINT16 dequantisation into a Float32Bit destination signal. + */ + bool TestOnUDPSData_QuantizedUint16(); + + /** + * @brief Tests INT8 dequantisation formula into a Float64Bit destination signal. + */ + bool TestOnUDPSData_QuantizedInt8(); + + /** + * @brief Tests that multiple signals decode into the correct buffer offsets. + */ + bool TestOnUDPSData_MultipleSignalsOrder(); + + /** + * @brief Tests Accumulate publishing mode: scalar signals publish only the + * most recent sample, array signals publish once regardless of numSamples. + */ + bool TestOnUDPSData_AccumulateMode(); + + /** + * @brief Tests that an undersized DATA payload (missing timestamp) is a safe no-op. + */ + bool TestOnUDPSData_TooSmallPayload(); + + /** + * @brief Tests that OnUDPSData before a valid CONFIG is a safe no-op. + */ + bool TestOnUDPSData_BeforeConfig(); + + /** + * @brief Tests that OnUDPSDisconnected() invalidates the CONFIG so + * subsequent DATA payloads are ignored until a new CONFIG arrives. + */ + bool TestOnUDPSDisconnected_InvalidatesConfig(); + + /** + * @brief Tests the full CONNECT -> CONFIG -> DATA flow over real loopback + * UDP sockets, mirroring the server side of the wire protocol. + */ + bool TestExecute_ConnectConfigDataEndToEnd(); +}; + +#endif /* UDPSTREAMERCLIENTTEST_H_ */ diff --git a/Test/E2E/chain/__pycache__/collect.cpython-314.pyc b/Test/E2E/chain/__pycache__/collect.cpython-314.pyc index 9b93e6a..b8a7147 100644 Binary files a/Test/E2E/chain/__pycache__/collect.cpython-314.pyc and b/Test/E2E/chain/__pycache__/collect.cpython-314.pyc differ diff --git a/Test/E2E/chain/__pycache__/validate_waveform.cpython-314.pyc b/Test/E2E/chain/__pycache__/validate_waveform.cpython-314.pyc index 0e6b17c..7a6b8d4 100644 Binary files a/Test/E2E/chain/__pycache__/validate_waveform.cpython-314.pyc and b/Test/E2E/chain/__pycache__/validate_waveform.cpython-314.pyc differ diff --git a/Test/E2E/chain/client/chain-client b/Test/E2E/chain/client/chain-client index d46157d..12c6287 100755 Binary files a/Test/E2E/chain/client/chain-client and b/Test/E2E/chain/client/chain-client differ diff --git a/Test/E2E/chain/collect.py b/Test/E2E/chain/collect.py index 1cce86e..cd354c9 100644 --- a/Test/E2E/chain/collect.py +++ b/Test/E2E/chain/collect.py @@ -21,6 +21,7 @@ import os import re import subprocess import sys +import time import xml.etree.ElementTree as ET @@ -60,18 +61,88 @@ def gtest_suite(gtest_bin, work): return s -# ── Go ──────────────────────────────────────────────────────────────────────── +# ── C++ Integration (DebugService runtime, non-GTest) ───────────────────────── -def go_suite(client_dir, work): - s = {"name": "Go (chain-client)", "lang": "go", "total": 0, "passed": 0, +def integration_suite(int_bin, work, timeout=220): + """Run the printf-narrated IntegrationTests.ex binary and heuristically + derive per-test pass/fail from its stdout. + + This binary predates GTest adoption and always ``return 0`` from main() + (only an internal 180s SIGALRM timeout or an OS-level crash produce a + non-zero exit), so exit code alone is not a reliable signal. Each of its + 7 "--- Test N: ..." blocks prints "SUCCESS:"/"VALIDATION SUCCESSFUL:" on + success or "ERROR:"/"FAILURE:" on failure, so split stdout by those + headers and flag a block failed if it contains an ERROR/FAILURE marker. + Exercises DebugServiceBase.cpp/DebugService.cpp runtime logic that the + header-only DebugServiceGTest suite deliberately does not touch, so it is + the only source of real coverage for those files. + """ + s = {"name": "C++ Integration", "lang": "cpp", "total": 0, "passed": 0, "failed": 0, "skipped": 0, "time_s": 0.0, "ok": False, "avail": False} - cov_p = os.path.join(work, "go_cover.out") - rc, out, err = _run(["go", "test", "-json", f"-coverprofile={cov_p}", "./..."], - cwd=client_dir) - if rc == 127: - s["detail"] = "go toolchain not found" + if not int_bin or not os.path.exists(int_bin): + s["detail"] = "IntegrationTests binary not found" return s s["avail"] = True + t0 = time.time() + rc, out, err = _run([int_bin], timeout=timeout) + s["time_s"] = round(time.time() - t0, 1) + text = out + "\n" + err + blocks = re.split(r"\n(?=--- Test \d+:)", text) + test_blocks = [b for b in blocks if b.lstrip().startswith("--- Test")] + finished = "All Integration Tests Finished." in text + s["total"] = len(test_blocks) + s["failed"] = sum(1 for b in test_blocks if re.search(r"\b(ERROR|FAILURE):", b)) + if not finished and s["total"] == 0: + # Crashed/timed out before printing anything useful. + s["total"] = 1 + s["failed"] = 1 + s["detail"] = f"binary did not complete (rc={rc}): {(err or out)[-200:]}" + elif not finished: + s["detail"] = f"binary exited rc={rc} before finishing all tests" + s["passed"] = s["total"] - s["failed"] + s["ok"] = finished and s["failed"] == 0 and s["total"] > 0 + return s + + +# ── Go ──────────────────────────────────────────────────────────────────────── + +def go_all_suites(repo, work): + """Run Go test suites across all project modules and aggregate results.""" + modules = [ + (os.path.join(repo, "Test/E2E/chain/client"), + "Go (chain-client)"), + (os.path.join(repo, "Common/Client/go"), + "Go (common udpsprotocol + wshub)"), + (os.path.join(repo, "Client/debugger"), + "Go (debugger)"), + ] + total_pct = 0.0 + pct_count = 0 + suites = [] + for mod_dir, name in modules: + s = {"name": name, "lang": "go", "total": 0, "passed": 0, + "failed": 0, "skipped": 0, "time_s": 0.0, "ok": False, "avail": False} + cov_p = os.path.join(work, f"go_cover_{name.replace(' ', '_')}.out") + rc, out, err = _run( + ["go", "test", "-json", f"-coverprofile={cov_p}", "./..."], + cwd=mod_dir) + if rc == 127: + s["detail"] = "go toolchain not found" + suites.append(s) + continue + s["avail"] = True + cov_pct = _parse_go_json(out, s) + if cov_pct is not None: + s["cov_pct"] = cov_pct + total_pct += cov_pct + pct_count += 1 + suites.append(s) + return suites, (round(total_pct / pct_count, 1) if pct_count else None) + + +def _parse_go_json(out, s): + """Parse Go test -json output into passed/failed/skipped counts. + Returns coverage percentage (float or None).""" cov_pct = None for line in out.splitlines(): try: @@ -93,8 +164,7 @@ def go_suite(client_dir, work): if m: cov_pct = float(m.group(1)) s["ok"] = s["failed"] == 0 and s["total"] > 0 - s["cov_pct"] = cov_pct - return s + return cov_pct # ── Python ────────────────────────────────────────────────────────────────── @@ -250,12 +320,16 @@ def main(): work = args.work or args.out os.makedirs(work, exist_ok=True) chain_dir = os.path.dirname(os.path.abspath(__file__)) - client_dir = os.path.join(chain_dir, "client") gtest_bin = os.path.join(args.repo, "Build", args.target, "GTest", "MainGTest.ex") + # BUILD_DIR for Test/Integration doubles the last path component + # ($(PACKAGE)/$(lastword of CURDIR)) — see MakeStdLibDefs.gcc. + integration_bin = os.path.join(args.repo, "Build", args.target, + "Test", "Integration", "Integration", + "IntegrationTests.ex") - suites = [gtest_suite(gtest_bin, work), - go_suite(client_dir, work), - py_suite(chain_dir, work)] + go_suites, go_avg_cov = go_all_suites(args.repo, work) + suites = ([gtest_suite(gtest_bin, work), integration_suite(integration_bin, work)] + + go_suites + [py_suite(chain_dir, work)]) totals = {k: sum(s.get(k, 0) for s in suites) for k in ("total", "passed", "failed", "skipped")} ut = {"suites": suites, "totals": totals, @@ -265,11 +339,10 @@ def main(): langs = [] py = next(s for s in suites if s["lang"] == "python") - go = next(s for s in suites if s["lang"] == "go") langs.append({"name": "Python", "avail": py.get("cov_pct") is not None, "pct": py.get("cov_pct"), "note": "coverage.py"}) - langs.append({"name": "Go", "avail": go.get("cov_pct") is not None, - "pct": go.get("cov_pct"), "note": "go test -cover"}) + langs.append({"name": "Go", "avail": go_avg_cov is not None, + "pct": go_avg_cov, "note": "go test -cover (avg across modules)"}) cpp = cpp_coverage(args.repo, args.target) if args.cpp_coverage else \ {"name": "C++", "avail": False, "pct": None, "note": "skipped (use --cpp-coverage)"} langs.append(cpp) diff --git a/Test/E2E/chain/run_chain_e2e.sh b/Test/E2E/chain/run_chain_e2e.sh index f0470db..7b222a6 100755 --- a/Test/E2E/chain/run_chain_e2e.sh +++ b/Test/E2E/chain/run_chain_e2e.sh @@ -24,7 +24,7 @@ mkdir -p "${OUT_DIR}" "${WORK}" SKIP_BUILD=0 ONLY="" PDF_ONLY=0 -CPP_COV=0 +CPP_COV=1 while [ $# -gt 0 ]; do case "$1" in --skip-build) SKIP_BUILD=1 ;; @@ -254,7 +254,7 @@ if [ "${CPP_COV}" -eq 1 ]; then make -C "${REPO_ROOT}" -f Makefile.gcc clean >/dev/null 2>&1 || true make -C "${REPO_ROOT}" -f Makefile.gcc core TARGET="${TARGET}" \ OPTIM="${COV_O}" LFLAGS="${COV_L}" 2>&1 | tail -1 - for d in Test/Components/DataSources/UDPStreamer Test/Applications/StreamHub Test/GTest; do + for d in Test/Components/DataSources/UDPStreamer Test/Components/DataSources/UDPStreamerClient Test/Applications/StreamHub Test/GTest Test/Integration; do make -C "${REPO_ROOT}/${d}" -f Makefile.gcc TARGET="${TARGET}" \ OPTIM="${COV_O}" LFLAGS="${COV_L}" 2>&1 | tail -1 done diff --git a/Test/E2E/chain/validate_waveform.py b/Test/E2E/chain/validate_waveform.py index 4735f7e..a83ef6a 100644 --- a/Test/E2E/chain/validate_waveform.py +++ b/Test/E2E/chain/validate_waveform.py @@ -21,6 +21,14 @@ Oracle (per signal) phase offset automatically). nRMSE tolerance is relaxed by the quant step. * **Fed reference** (when ``--tap`` given): each received value must be within ``tol`` of some tap value too. +* **Continuity** (always, ≥10 points): a stream that stalls (client falling + behind, hub failing to flush a window, ...) can still pass fidelity — + whatever few samples *did* arrive still match the ground truth — while the + plot shows gaping holes. Flags any inter-sample gaps that are >10x the + median spacing and fails when their *summed* duration exceeds 5% of the + capture span. Calibrated against the full scenario matrix: healthy streams + (bursty per-tick live pushes, decimation, fragmentation, multicast, ...) top + out at 0.7% outlier-gap time; a stalled stream showed 55-91%. """ import argparse import json @@ -122,6 +130,29 @@ def nearest_err(recv_v, truth_v): return float(np.max(d)) if d.size else 0.0 +def gap_check(t_recv, outlier_mult=10.0, max_outlier_frac=0.05): + """Detect large discontiguous holes in a received time series. + + A handful of gaps a few times the median spacing are normal (bursty + per-tick live pushes, decimation, LTTB). Returns (ok, gap_frac, n_gaps, + max_gap): ``gap_frac`` is the fraction of the total capture span consumed + by gaps larger than ``outlier_mult`` times the median inter-sample gap; + when that adds up to more than ``max_outlier_frac`` of the whole capture, + the stream stalled/dropped a chunk rather than merely being decimated. + """ + if t_recv.size < 10: + return True, 0.0, 0, 0.0 + t = np.sort(t_recv.astype(np.float64)) + dt = np.diff(t) + span = float(t[-1] - t[0]) + med = float(np.median(dt)) + if span <= 0.0 or med <= 0.0: + return True, 0.0, 0, 0.0 + outliers = dt[dt > outlier_mult * med] + gap_frac = float(outliers.sum() / span) + return gap_frac <= max_outlier_frac, gap_frac, int(outliers.size), float(dt.max()) + + def sine_shape(t, v, freq): """Return (corr, nrmse, amp_fit) for a sinusoid fit at ``freq``.""" w = 2.0 * np.pi * freq @@ -153,6 +184,13 @@ def compare_signal(gt, t_recv, v_recv, tap_v=None): fidelity_ok = max_err <= tol m["fidelity_ok"] = bool(fidelity_ok) + gap_ok, gap_frac, n_gaps, max_gap = gap_check(t_recv) + m.update(gap_ok=bool(gap_ok), gap_frac=round(gap_frac, 4), + n_gaps=n_gaps, max_gap=max_gap) + if not gap_ok: + m["reason"] = (f"data hole: {gap_frac:.1%} of capture span in " + f"{n_gaps} gaps >10x median spacing (max={max_gap:.4g}s)") + shape_ok = True if gt["formula"] == "sine" and v_recv.size >= 8 and gt["freq"]: corr, nrmse, amp = sine_shape(t_recv, v_recv, gt["freq"]) @@ -180,7 +218,7 @@ def compare_signal(gt, t_recv, v_recv, tap_v=None): fed_ok = fed_err <= tol m.update(fed_err=fed_err, fed_ok=bool(fed_ok)) - m["pass"] = bool(fidelity_ok and shape_ok and fed_ok) + m["pass"] = bool(fidelity_ok and shape_ok and fed_ok and gap_ok) return m diff --git a/Test/GTest/depends.x86-linux b/Test/GTest/depends.x86-linux deleted file mode 100644 index b866640..0000000 --- a/Test/GTest/depends.x86-linux +++ /dev/null @@ -1,197 +0,0 @@ -../../Build/x86-linux//GTest/DebugServiceGTest.o: DebugServiceGTest.cpp \ - ../../Source/Components/Interfaces/DebugService/DebugCore.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Architecture/x86_gcc/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TypeDescriptor.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BasicType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/FractionalInteger.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TemplateParametersVerificator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/StreamString.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapManager.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorInformation.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ErrorType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeoutType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/HighResolutionTimerA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimerCalibrator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/CharBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/BufferedStreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeoutType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/AnyType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassProperties.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/FractionalInteger.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassRegistryDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GlobalObjectsDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GlobalObjectI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/StandardHeap.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../Generic/StandardHeap_Generic.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/FastPollingMutexSem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Atomic.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/AtomicA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Sleep.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassRegistryItem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CString.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ZeroTerminatedArray.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/Introspection.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/IntrospectionEntry.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ZeroTerminatedArray.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListable.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListHolderT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/IteratorT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Iterator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListable.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListHolder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/SortFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/SearchFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/LoadableLibrary.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ObjectBuilder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticList.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticListHolder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Matrix.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Vector.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/MemoryOperationsHelper.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/FormatDescriptor.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/IOBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StringHelper.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/StreamStringIOBuffer.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-internal.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-port.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-message.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-string.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-filepath.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-type-util.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-death-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-death-test-internal.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-param-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-param-util.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-linked_ptr.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-printers.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-param-util-generated.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest_prod.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-test-part.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-typed-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest_pred_impl.h -../../Build/x86-linux//GTest/MainGTest.o: MainGTest.cpp \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorInformation.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ErrorType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Architecture/x86_gcc/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TemplateParametersVerificator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeoutType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/HighResolutionTimerA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimerCalibrator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/Object.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapManager.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassProperties.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/FractionalInteger.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassRegistryItem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CString.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ZeroTerminatedArray.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/Introspection.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/IntrospectionEntry.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TypeDescriptor.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BasicType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/FractionalInteger.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ZeroTerminatedArray.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListable.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListHolderT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/IteratorT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Iterator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListable.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListHolder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/SortFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/SearchFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/LoadableLibrary.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ObjectBuilder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StringHelper.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/StructuredDataI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/AnyType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassRegistryDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GlobalObjectsDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GlobalObjectI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/StandardHeap.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../Generic/StandardHeap_Generic.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/FastPollingMutexSem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Atomic.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/AtomicA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Sleep.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticList.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticListHolder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Matrix.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Vector.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/MemoryOperationsHelper.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/CLASSREGISTER.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassRegistryItemT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ObjectBuilderT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/StreamString.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/CharBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/BufferedStreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeoutType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/AnyType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/FormatDescriptor.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/IOBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/StreamStringIOBuffer.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-internal.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-port.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-message.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-string.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-filepath.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-type-util.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-death-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-death-test-internal.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-param-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-param-util.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-linked_ptr.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-printers.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-param-util-generated.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest_prod.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-test-part.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-typed-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest_pred_impl.h diff --git a/Test/GTest/dependsRaw.x86-linux b/Test/GTest/dependsRaw.x86-linux deleted file mode 100644 index 58a6c46..0000000 --- a/Test/GTest/dependsRaw.x86-linux +++ /dev/null @@ -1,197 +0,0 @@ -DebugServiceGTest.o: DebugServiceGTest.cpp \ - ../../Source/Components/Interfaces/DebugService/DebugCore.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Architecture/x86_gcc/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TypeDescriptor.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BasicType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/FractionalInteger.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TemplateParametersVerificator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/StreamString.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapManager.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorInformation.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ErrorType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeoutType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/HighResolutionTimerA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimerCalibrator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/CharBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/BufferedStreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeoutType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/AnyType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassProperties.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/FractionalInteger.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassRegistryDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GlobalObjectsDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GlobalObjectI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/StandardHeap.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../Generic/StandardHeap_Generic.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/FastPollingMutexSem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Atomic.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/AtomicA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Sleep.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassRegistryItem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CString.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ZeroTerminatedArray.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/Introspection.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/IntrospectionEntry.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ZeroTerminatedArray.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListable.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListHolderT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/IteratorT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Iterator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListable.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListHolder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/SortFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/SearchFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/LoadableLibrary.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ObjectBuilder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticList.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticListHolder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Matrix.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Vector.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/MemoryOperationsHelper.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/FormatDescriptor.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/IOBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StringHelper.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/StreamStringIOBuffer.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-internal.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-port.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-message.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-string.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-filepath.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-type-util.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-death-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-death-test-internal.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-param-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-param-util.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-linked_ptr.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-printers.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-param-util-generated.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest_prod.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-test-part.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-typed-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest_pred_impl.h -MainGTest.o: MainGTest.cpp \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorInformation.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ErrorType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Architecture/x86_gcc/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TemplateParametersVerificator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/TypeCharacteristics.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeoutType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/HighResolutionTimerA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CompilerTypes.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../HighResolutionTimer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/HighResolutionTimerCalibrator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeStamp.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/Object.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/ErrorManagement.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapManager.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassProperties.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GeneralDefinitions.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/FractionalInteger.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassRegistryItem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/CString.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ZeroTerminatedArray.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/Introspection.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/IntrospectionEntry.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TypeDescriptor.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BasicType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/FractionalInteger.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitRange.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/BitBoolean.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/ZeroTerminatedArray.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListable.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListHolderT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/IteratorT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Iterator.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListable.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/LinkedListHolder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/SortFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/SearchFilter.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/LoadableLibrary.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ObjectBuilder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StringHelper.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/StructuredDataI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/AnyType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassRegistryDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GlobalObjectsDatabase.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/GlobalObjectI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/StandardHeap.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../../HeapI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Environment/Linux/../Generic/StandardHeap_Generic.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/FastPollingMutexSem.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Atomic.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Architecture/x86_gcc/AtomicA.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/Sleep.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticList.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StaticListHolder.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Matrix.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types/Vector.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/MemoryOperationsHelper.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/CLASSREGISTER.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ClassRegistryItemT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/ObjectBuilderT.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/StreamString.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/CharBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/BufferedStreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/TimeoutType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects/AnyType.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/FormatDescriptor.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/IOBuffer.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability/StreamI.h \ - /home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams/StreamStringIOBuffer.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-internal.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-port.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-message.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-string.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-filepath.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-type-util.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-death-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-death-test-internal.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-param-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-param-util.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-linked_ptr.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-printers.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/internal/gtest-param-util-generated.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest_prod.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-test-part.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest-typed-test.h \ - /home/martino/workspace/MARTe2/Lib/gtest-1.7.0/include/gtest/gtest_pred_impl.h