Implemented DebugService with TCPLogger injection

This commit is contained in:
Martino Ferrari
2026-04-09 22:22:39 +02:00
parent b86ede99b9
commit 96d98dfc3d
9 changed files with 894 additions and 245 deletions
+10 -12
View File
@@ -27,16 +27,18 @@ const char8 * const config_command_text =
" CustomGAMField = \"GAMValue\" "
" InputSignals = {"
" Counter = { DataSource = Timer Type = uint32 Frequency = 1000 PVName = \"PROC:VAR:1\" }"
" Time = { DataSource = Timer Type = uint32 }"
" }"
" OutputSignals = {"
" Counter = { DataSource = DDB Type = uint32 }"
" Time = { DataSource = DDB Type = uint32 }"
" }"
" }"
" }"
" +Data = {"
" Class = ReferenceContainer "
" +Timer = { Class = LinuxTimer SleepTime = 1000 Signals = { Counter = { Type = uint32 } } }"
" +DDB = { Class = GAMDataSource Signals = { Counter = { Type = uint32 } } }"
" +Timer = { Class = LinuxTimer SleepTime = 1000 Signals = { Counter = { Type = uint32 } Time = { Type = uint32 } } }"
" +DDB = { Class = GAMDataSource Signals = { Counter = { Type = uint32 } Time = { Type = uint32 } } }"
" +DAMS = { Class = TimingDataSource }"
" }"
" +States = {"
@@ -97,16 +99,12 @@ void TestConfigCommands() {
// Start the application to trigger broker execution and signal registration
ReferenceT<RealTimeApplication> app = ObjectRegistryDatabase::Instance()->Find("App");
if (app.IsValid()) {
if (app->ConfigureApplication()) {
if (app->PrepareNextState("State1") == ErrorManagement::NoError) {
if (app->StartNextStateExecution() == ErrorManagement::NoError) {
printf("Application started (for signal registration).\n");
Sleep::MSec(500); // Wait for some cycles
}
}
}
}
assert(app.IsValid());
assert(app->ConfigureApplication());
assert(app->PrepareNextState("State1") == ErrorManagement::NoError);
assert(app->StartNextStateExecution() == ErrorManagement::NoError);
printf("Application started (for signal registration).\n");
Sleep::MSec(500); // Wait for some cycles
ReferenceT<DebugService> service = ObjectRegistryDatabase::Instance()->Find("DebugService");
if (service.IsValid()) {
+1 -1
View File
@@ -21,7 +21,7 @@ void timeout_handler(int sig) {
}
void ErrorProcessFunction(const MARTe::ErrorManagement::ErrorInformation &errorInfo, const char8 * const errorDescription) {
// printf("[MARTe Error] %s: %s\n", errorInfo.className, errorDescription);
printf("[MARTe Error] %s: %s\n", errorInfo.className, errorDescription);
}
// Forward declarations of other tests
+4 -2
View File
@@ -39,17 +39,19 @@ void TestTreeCommand() {
" Class = IOGAM "
" InputSignals = {"
" Counter = { DataSource = Timer Type = uint32 Frequency = 1000 }"
" Time = { DataSource = Timer Type = uint32 }"
" }"
" OutputSignals = {"
" Counter = { DataSource = DDB Type = uint32 }"
" Time = { DataSource = DDB Type = uint32 }"
" }"
" }"
" }"
" +Data = {"
" Class = ReferenceContainer "
" DefaultDataSource = DDB "
" +Timer = { Class = LinuxTimer SleepTime = 1000 Signals = { Counter = { Type = uint32 } } }"
" +DDB = { Class = GAMDataSource Signals = { Counter = { Type = uint32 } } }"
" +Timer = { Class = LinuxTimer SleepTime = 1000 Signals = { Counter = { Type = uint32 } Time = { Type = uint32 } } }"
" +DDB = { Class = GAMDataSource Signals = { Counter = { Type = uint32 } Time = { Type = uint32 } } }"
" +DAMS = { Class = TimingDataSource }"
" }"
" +States = {"