multi source

This commit is contained in:
Martino Ferrari
2026-05-19 13:14:26 +02:00
parent e6ab50e90e
commit b4d6e2443c
8 changed files with 862 additions and 436 deletions
+82 -19
View File
@@ -46,6 +46,23 @@ $TestApp = {
}
}
}
+FastTimerGAM = {
Class = IOGAM
InputSignals = {
Time = {
Frequency = 5000
DataSource = FastTimer
Type = uint32
}
}
OutputSignals = {
Time = {
DataSource = DDB2
Type = uint32
}
}
}
// ── 1 Hz sinusoidal signal ───────────────────────────────────────────
+SineGAM1 = {
@@ -99,7 +116,7 @@ $TestApp = {
SamplingRate = 1000000.0
OutputSignals = {
Ch1 = {
DataSource = DDB
DataSource = DDB2
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1000
@@ -117,7 +134,7 @@ $TestApp = {
SamplingRate = 1000000.0
OutputSignals = {
Ch2 = {
DataSource = DDB
DataSource = DDB2
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1000
@@ -145,18 +162,6 @@ $TestApp = {
DataSource = DDB
Type = float32
}
Ch1 = {
DataSource = DDB
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1000
}
Ch2 = {
DataSource = DDB
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1000
}
}
OutputSignals = {
Counter = {
@@ -175,14 +180,41 @@ $TestApp = {
DataSource = Streamer
Type = float32
}
}
}
+FastStreamerGAM = {
Class = IOGAM
InputSignals = {
Time = {
DataSource = DDB2
Type = uint32
}
Ch1 = {
DataSource = Streamer
DataSource = DDB2
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1000
}
Ch2 = {
DataSource = Streamer
DataSource = DDB2
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1000
}
}
OutputSignals = {
Time = {
DataSource = FastStreamer
Type = uint32
}
Ch1 = {
DataSource = FastStreamer
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1000
}
Ch2 = {
DataSource = FastStreamer
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1000
@@ -199,6 +231,9 @@ $TestApp = {
+DDB = {
Class = GAMDataSource
}
+DDB2 = {
Class = GAMDataSource
}
// ── Real-time clock / trigger source ─────────────────────────────────
+Timer = {
@@ -213,6 +248,18 @@ $TestApp = {
}
}
}
+FastTimer = {
Class = LinuxTimer
SleepNature = "Default"
Signals = {
Counter = {
Type = uint32
}
Time = {
Type = uint32
}
}
}
// ── UDP Streamer DataSource ──────────────────────────────────────────
+Streamer = {
@@ -240,6 +287,17 @@ $TestApp = {
RangeMin = -5.0
RangeMax = 5.0
}
}
}
+FastStreamer = {
Class = UDPStreamer
Port = 44501
MaxPayloadSize = 1400
Signals = {
Time = {
Type = uint32
Unit = "us"
}
Ch1 = {
Type = float32
Unit = "V"
@@ -247,7 +305,7 @@ $TestApp = {
NumberOfElements = 1000
TimeMode = FirstSample
TimeSignal = Time
SamplingRate = 1000000.0
SamplingRate = 5000000.0
}
Ch2 = {
Type = float32
@@ -256,7 +314,7 @@ $TestApp = {
NumberOfElements = 1000
TimeMode = FirstSample
TimeSignal = Time
SamplingRate = 1000000.0
SamplingRate = 5000000.0
}
}
}
@@ -276,7 +334,12 @@ $TestApp = {
+Thread1 = {
Class = RealTimeThread
CPUs = 0x1
Functions = {TimerGAM SineGAM1 SineGAM2 SineGAM3 SineGAM4 StreamerGAM}
Functions = {TimerGAM SineGAM1 SineGAM2 StreamerGAM}
}
+Thread2 = {
Class = RealTimeThread
CPUs = 0x2
Functions = {FastTimerGAM SineGAM3 SineGAM4 FastStreamerGAM}
}
}
}
+8 -4
View File
@@ -6,6 +6,10 @@
# ./run.sh --webui # also start the WebUI Go client in the background
# ./run.sh --help # show this message
#
# The WebUI is started with --source "TestApp@127.0.0.1:44500".
# Additional sources and a persistent source list file (--sources-file) can
# be configured directly in the WebUI or by editing this script.
#
# Prerequisites:
# - marte_env.sh must be present in the repo root (sets MARTe2_DIR, etc.)
# - MARTe2 and MARTe2-components must already be built
@@ -101,11 +105,11 @@ fi
# ── Optionally start WebUI ────────────────────────────────────────────────────
if [ "${START_WEBUI}" -eq 1 ]; then
echo "==> Starting WebUI on http://localhost:8080 (streamer at 127.0.0.1:44500)..."
echo "==> Starting WebUI on http://localhost:8080 (source: 127.0.0.1:44500)..."
"${WEBUI_BIN}" \
--streamer 127.0.0.1:44500 \
--listen :8080 \
--clientport 44900 &
--source "Streamer@127.0.0.1:44500" \
--source "FastStreamer@127.0.0.1:44501" \
--listen :8080 &
WEBUI_PID=$!
echo "==> WebUI PID ${WEBUI_PID}"
fi