remotivelabs.topology.ecu_mock

ECU mock runner for RemotiveTopology.

ECUMock spins up one remotivelabs.topology.behavioral_model.BehavioralModel per ECU, each configured with a remotivelabs.topology.namespaces.generic.GenericNamespace that starts a restbus sending all frames the ECU is listed as sender of. This is useful for simulating passive ECUs on the network without writing any behavioral logic.

Run directly from the command line via the mock CLI:

python -m remotivelabs.topology.cli.mock -n NAMESPACE=ECU1,ECU2 -u http://127.0.0.1:50051
class ECUMock:
ECUMock( namespaces: dict[str, list[str]], broker_url: str, delay_multiplier: float)
Arguments:
  • namespaces: Mapping from ECU name to the list of broker namespaces it participates in.
  • broker_url: URL of the RemotiveBroker gRPC endpoint (e.g. http://127.0.0.1:50051).
  • delay_multiplier: Scaling factor applied to all restbus frame intervals. Use 1.0 for real-time, values below 1.0 to speed up, above to slow down.
async def run(self):