Skip to content

Add Time Coordinator Integrationtests#375

Open
KonradBreitsprecherBkd wants to merge 1 commit into
mainfrom
dev/acceptance-test-central-coordinator
Open

Add Time Coordinator Integrationtests#375
KonradBreitsprecherBkd wants to merge 1 commit into
mainfrom
dev/acceptance-test-central-coordinator

Conversation

@KonradBreitsprecherBkd

Copy link
Copy Markdown
Contributor

Goal

Enable deterministic, runtime step-size adjustments in coordinated simulation so the new integration tests in SilKit/IntegrationTests/ITest_TimeCoordinator.cpp pass:

  • test_fixed_schedule_slowdown_by_time_coordinator
  • test_fixed_schedule_slowdown_by_participant

Functional Requirements

1. Runtime step-size change API

  • Provide an API on time synchronization service to request a new simulation step size at runtime (as referenced in tests):
    • SetStepSize(std::chrono::nanoseconds)
  • The API must be callable from within a simulation step handler.

2. Global schedule effect

  • A step-size change requested by one coordinated participant must affect the global coordinated schedule (not only the caller).
  • This must work for:
    • a dedicated coordinator participant (TimeCoordinator), and
    • a regular participant (Publisher).

3. Fixed slowdown sequence support

For the cycle around 10ms, the following requested sequence must be supported:

  1. At 10ms, set step size to 1us
  2. At 10ms + 1us, set step size to 999us
  3. At 11ms, set step size back to 1ms

The resulting simulation-step timestamps for all coordinated participants must include:

  • 0ms, 1ms, 2ms, ..., 10ms, 10ms+1us, 11ms, 12ms

4. Pub/Sub timing expectation

  • A message published at simulation time 10ms must be received and visible by 10ms+1us.
  • The tests validate this via subscriber bookkeeping in its simulation step handler.

Determinism / Consistency Requirements

  • All coordinated participants must observe the same global step timeline for the slowdown window.
  • No participant may skip the inserted 10ms+1us step when slowdown is active.

Compatibility Requirements

  • Existing coordinated simulations without SetStepSize(...) calls must preserve current behavior.

Signed-off-by: Konrad Breitsprecher <Konrad.Breitsprecher@vector.com>
@KonradBreitsprecherBkd KonradBreitsprecherBkd changed the title Add initial timecoordinator Itests Add Time Coordinator Integrationtests Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant