Skip to content

Commit 97f5bec

Browse files
KonradBreitsprecherBkdMariusBgm
authored andcommitted
Signed-off-by: Konrad Breitsprecher <Konrad.Breitsprecher@vector.com>
Change TimeAdvanceMode::ByMinimalDuration to trigger SimTasks with timestamps of all other sync. participants; Add Integration Tests; Remove automatic creation of TimeSynService in SimTestHarness Signed-off-by: Konrad Breitsprecher <Konrad.Breitsprecher@vector.com> rework: reorganize and activate debug statements config: make default TimeAdvanceMode configurable (hacky boolean) remove API for dynsteps, enable dyn steps by default, allo opt out by config Signed-off-by: Marius Börschig <Marius.Boerschig@vector.com>
1 parent 46e4d4f commit 97f5bec

22 files changed

Lines changed: 544 additions & 36 deletions

SilKit/IntegrationTests/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ add_silkit_test_to_executable(SilKitIntegrationTests
118118
SOURCES ITest_SimTask.cpp
119119
)
120120

121+
add_silkit_test_to_executable(SilKitIntegrationTests
122+
SOURCES ITest_DynStepSizes.cpp
123+
)
124+
125+
121126
add_silkit_test_to_executable(SilKitFunctionalTests
122127
SOURCES FTest_WallClockCoupling.cpp
123128
)

SilKit/IntegrationTests/ITest_AsyncSimTask.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,11 +302,12 @@ auto MakeCompletionThread(SimParticipant* p, ParticipantData* d) -> std::thread
302302

303303
TEST(ITest_AsyncSimTask, test_async_simtask_other_simulation_steps_completed_handler)
304304
{
305-
SimTestHarness testHarness({"A", "B", "C"}, "silkit://localhost:0");
305+
SimTestHarness testHarness({"A", "B", "C", "D"}, "silkit://localhost:0");
306306

307307
const auto a = testHarness.GetParticipant("A");
308308
const auto b = testHarness.GetParticipant("B");
309309
const auto c = testHarness.GetParticipant("C");
310+
const auto d = testHarness.GetParticipant("D");
310311

311312
ParticipantData ad, bd, cd;
312313

@@ -316,6 +317,8 @@ TEST(ITest_AsyncSimTask, test_async_simtask_other_simulation_steps_completed_han
316317
b->GetOrCreateLifecycleService()->SetStopHandler([&bd] { bd.running = false; });
317318
c->GetOrCreateLifecycleService()->SetStopHandler([&cd] { cd.running = false; });
318319

320+
d->GetOrCreateTimeSyncService()->SetSimulationStepHandler([](auto, auto) {}, 1ms);
321+
319322
const auto aLifecycleService = a->GetOrCreateLifecycleService();
320323

321324
a->GetOrCreateTimeSyncService()->SetSimulationStepHandlerAsync([aLifecycleService, &ad](auto now, auto) {

0 commit comments

Comments
 (0)