remotivelabs.topology.ecu_mock

ECU mock runner for RemotiveTopology.

remotivelabs.topology.ecu_mock.ECUMock creates a BehavioralModel with no actual behavior by starting a restbus that sends all frames each ECU is listed as sender of. Useful for putting 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:

Creates a BehavioralModel with no actual behavior which is sending all frames each ECU is listed as sender of via a restbus. Useful when you need ECUs on the network without writing behavioral logic.

ECUMock( namespaces: dict[str, list[str]], broker_url: str, delay_multiplier: float)

Create a new ECU mock capable of simulating multiple ECUs with different namespaces.

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) -> None: