Updated with scheduler

This commit is contained in:
Martino Ferrari
2026-02-21 20:20:08 +01:00
parent 7cc4b81f05
commit 955eb02924
15 changed files with 664 additions and 102 deletions

View File

@@ -1,48 +1,43 @@
# MARTe2 Universal Debugging & Observability Suite
# MARTe2 Debug Suite
A professional-grade, zero-code-change debugging suite for the MARTe2 real-time framework.
## Features
- **Runtime Registry Patching**: Instruments all MARTe2 Brokers automatically at startup.
- **Hierarchical Tree Explorer**: Recursive visualization of the `ObjectRegistryDatabase`, including GAMs, DataSources, and Signals.
- **Real-Time Execution Control**: Pause and Resume application logic globally to perform static inspection.
- **High-Speed Telemetry**: Visual oscilloscope with sub-millisecond precision via UDP.
- **Persistent Forcing**: Type-aware signal overrides (Last-Writer-Wins) with persistent re-application.
- **Isolated Log Streaming**: Dedicated TCP channel for real-time framework logs to ensure command responsiveness.
## Components
### 1. C++ Core (`libmarte_dev.so`)
The core service that handles registry patching, TCP/UDP communication, and real-time safe data capture.
### 2. Rust GUI Client (`marte_debug_gui`)
A native, multi-threaded dashboard built with `egui`.
- **Side Panel**: Collapsible application tree and signal navigator.
- **Bottom Panel**: Advanced log terminal with Regex filtering and priority levels.
- **Right Panel**: Active Trace and Force management.
- **Central Pane**: High-frequency oscilloscope.
An interactive observability and debugging suite for the MARTe2 real-time framework.
## Quick Start
### Build
### 1. Build the project
```bash
# Build C++ Core
cd Build && cmake .. && make -j$(nproc)
# Build GUI Client
cd Tools/gui_client
cargo build --release
. ./env.sh
cd Build
cmake ..
make -j$(nproc)
```
### Run
1. Start your MARTe2 application with the `DebugService` enabled.
2. Launch the GUI:
```bash
./Tools/gui_client/target/release/marte_debug_gui
```
### 2. Run Integration Tests
```bash
./Test/Integration/ValidationTest # Verifies 100Hz tracing
./Test/Integration/SchedulerTest # Verifies execution control
```
## Communication Ports
- **8080 (TCP)**: Commands (TREE, FORCE, TRACE, PAUSE).
- **8082 (TCP)**: Real-time framework logs.
- **8081 (UDP)**: Signal telemetry data.
### 3. Launch GUI
```bash
cd Tools/gui_client
cargo run --release
```
## Features
- **Live Tree:** Explore the MARTe2 object database in real-time.
- **Oscilloscope:** Trace any signal at high frequency (100Hz+) with automatic scaling.
- **Signal Forcing:** Inject values directly into the real-time memory map.
- **Log Forwarding:** Integrated framework log viewer with regex filtering.
- **Execution Control:** Global pause/resume via scheduler-level hooks.
## Usage
To enable debugging in your application, add the following to your `.cfg`:
```text
+DebugService = {
Class = DebugService
ControlPort = 8080
UdpPort = 8081
}
```
The suite automatically patches the registry to instrument your existing Brokers and Schedulers.