3 Commits

Author SHA1 Message Date
Martino Ferrari 567ebda9cb fixed old references to Vec 2026-06-02 14:27:52 +02:00
Martino Ferrari b900f50d99 ignroe bin 2026-05-21 15:58:05 +02:00
Martino Ferrari 572009fa1d Removed binary 2026-05-21 15:57:36 +02:00
4 changed files with 111 additions and 16 deletions
+1
View File
@@ -8,3 +8,4 @@ dependency/
.cache/
target/
CLAUDE.md
Tools/go_web_client/marte2-web-client
+16 -16
View File
@@ -58,16 +58,16 @@ public:
// 3. Broker Active Status
volatile bool active = false;
Vec<uint32> indices;
Vec<uint32> sizes;
Vector<uint32> indices;
Vector<uint32> sizes;
FastPollingMutexSem mutex;
DebugSignalInfo* ptrs[1] = { service.signals[0] };
volatile bool anyBreak = false;
Vec<uint32> breakIdx;
Vector<uint32> breakIdx;
service.RegisterBroker(ptrs, 1, NULL_PTR(MemoryMapBroker*), &active, &indices, &sizes, &mutex, &anyBreak, &breakIdx);
service.UpdateBrokersActiveStatus();
assert(active == true);
assert(indices.Size() == 1);
assert(indices.GetNumberOfElements() == 1);
assert(indices[0] == 0);
// Helper Process
@@ -244,11 +244,11 @@ public:
// Register a broker whose signalPointers is NULL but numSignals > 0.
// Before the fix this dereferenced NULL → segfault.
volatile bool active = false;
Vec<uint32> indices;
Vec<uint32> sizes;
Vector<uint32> indices;
Vector<uint32> sizes;
FastPollingMutexSem mutex;
volatile bool anyBreak = false;
Vec<uint32> breakIdx;
Vector<uint32> breakIdx;
service.RegisterBroker(NULL_PTR(DebugSignalInfo**), 1u,
NULL_PTR(MemoryMapBroker*),
&active, &indices, &sizes, &mutex,
@@ -538,11 +538,11 @@ public:
assert(service.TraceSignal("Z", true) == 1);
volatile bool active = false;
Vec<uint32> indices;
Vec<uint32> sizes;
Vector<uint32> indices;
Vector<uint32> sizes;
FastPollingMutexSem mutex;
volatile bool anyBreak = false;
Vec<uint32> breakIdx;
Vector<uint32> breakIdx;
DebugSignalInfo *ptrs[3] = {
service.signals[0], service.signals[1], service.signals[2]
};
@@ -554,7 +554,7 @@ public:
// After Swap the broker's activeIndices must hold exactly indices 0 and 2
assert(active == true);
assert(indices.Size() == 2u);
assert(indices.GetNumberOfElements() == 2u);
// indices are in order of signal position in the broker (0 then 2)
assert(indices[0] == 0u);
assert(indices[1] == 2u);
@@ -563,7 +563,7 @@ public:
// Disable one; Swap again — only index 0 should remain
assert(service.TraceSignal("Z", false) == 1);
service.UpdateBrokersActiveStatus();
assert(indices.Size() == 1u);
assert(indices.GetNumberOfElements() == 1u);
assert(indices[0] == 0u);
printf(" -> PASS: After disabling Z, only index 0 remains\n");
}
@@ -592,11 +592,11 @@ public:
service.UpdateBrokersBreakStatus();
volatile bool active = false;
Vec<uint32> indices;
Vec<uint32> sizes;
Vector<uint32> indices;
Vector<uint32> sizes;
FastPollingMutexSem mutex;
volatile bool anyBreak = false;
Vec<uint32> breakIdx;
Vector<uint32> breakIdx;
DebugSignalInfo *ptrs[1] = { service.signals[0] };
service.RegisterBroker(ptrs, 1u, NULL_PTR(MemoryMapBroker *),
&active, &indices, &sizes, &mutex,
@@ -605,7 +605,7 @@ public:
// UpdateBrokersBreakStatus must propagate the break flag to the broker
service.UpdateBrokersBreakStatus();
assert(anyBreak == true);
assert(breakIdx.Size() == 1u);
assert(breakIdx.GetNumberOfElements() == 1u);
// Process() copies break indices, releases lock, evaluates break.
// val = 5 > 3 — service must become paused.
Binary file not shown.
+94
View File
@@ -183,5 +183,99 @@
],
"directory": "/home/martino/Projects/marte_debug/Source/Components/Interfaces/WebDebugService",
"output": "../../../..//Build/x86-linux/Components/Interfaces/WebDebugService/WebDebugService.o"
},
{
"file": "../../../..//Source/Components/Interfaces/DebugService/DebugServiceBase.cpp",
"arguments": [
"/usr/bin/g++",
"-c",
"-I../../../..//Source/Components/Interfaces/TCPLogger",
"-I../../../..//Source/Components/Interfaces/DebugService",
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types",
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability",
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects",
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams",
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Messages",
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Logger",
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration",
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs",
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L1Portability",
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L3Services",
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L4Messages",
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L4LoggerService",
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L5GAMs",
"-I/home/martino/workspace/MARTe2/Source/Core/FileSystem/L1Portability",
"-I/home/martino/workspace/MARTe2/Source/Core/FileSystem/L3Streams",
"-fPIC",
"-Wall",
"-std=c++98",
"-Werror",
"-Wno-invalid-offsetof",
"-Wno-unused-variable",
"-fno-strict-aliasing",
"-frtti",
"-DMARTe2_TEST_ENVIRONMENT=GTest",
"-DARCHITECTURE=x86_gcc",
"-DENVIRONMENT=Linux",
"-DUSE_PTHREAD",
"-pthread",
"-Wno-deprecated-declarations",
"-Wno-unused-value",
"-g",
"-ggdb",
"../../../..//Source/Components/Interfaces/DebugService/DebugServiceBase.cpp",
"-o",
"../../../..//Build/x86-linux/Components/Interfaces/WebDebugService/DebugServiceBase.o"
],
"directory": "/home/martino/Projects/marte_debug/Source/Components/Interfaces/WebDebugService",
"output": "../../../..//Build/x86-linux/Components/Interfaces/WebDebugService/DebugServiceBase.o"
},
{
"file": "UnitTests.cpp",
"arguments": [
"/usr/bin/g++",
"-c",
"-I../../Source/Core/Types/Result",
"-I../../Source/Core/Types/Vec",
"-I../../Source/Components/Interfaces/DebugService",
"-I../../Source/Components/Interfaces/TCPLogger",
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L0Types",
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L1Portability",
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L2Objects",
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L3Streams",
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Messages",
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Logger",
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L4Configuration",
"-I/home/martino/workspace/MARTe2/Source/Core/BareMetal/L5GAMs",
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L1Portability",
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L3Services",
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L4Messages",
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L4LoggerService",
"-I/home/martino/workspace/MARTe2/Source/Core/Scheduler/L5GAMs",
"-I/home/martino/workspace/MARTe2/Source/Core/FileSystem/L1Portability",
"-I/home/martino/workspace/MARTe2/Source/Core/FileSystem/L3Streams",
"-fPIC",
"-Wall",
"-std=c++98",
"-Werror",
"-Wno-invalid-offsetof",
"-Wno-unused-variable",
"-fno-strict-aliasing",
"-frtti",
"-DMARTe2_TEST_ENVIRONMENT=GTest",
"-DARCHITECTURE=x86_gcc",
"-DENVIRONMENT=Linux",
"-DUSE_PTHREAD",
"-pthread",
"-Wno-deprecated-declarations",
"-Wno-unused-value",
"-g",
"-ggdb",
"UnitTests.cpp",
"-o",
"../../Build/x86-linux/Test/UnitTests/UnitTests/UnitTests.o"
],
"directory": "/home/martino/Projects/marte_debug/Test/UnitTests",
"output": "../../Build/x86-linux/Test/UnitTests/UnitTests/UnitTests.o"
}
]