---
title: "Restbus"
description: "Send every frame of an ECU from its database, and set signal values from Python"
source: https://developer.remotivelabs.com/docs/get-started/examples/restbus
last_updated: 2026-11-24
---

# Restbus

- Goal: Simulate
- From: [Topology examples v0.9.0](https://github.com/remotivelabs/remotivelabs-topology-examples/tree/v0.9.0)
- Protocols: CAN
- Vehicle domains: Chassis
- Requires: Linux with RemotiveBus

## Run it

```bash
git clone https://github.com/remotivelabs/remotivelabs-topology-examples.git
cd remotivelabs-topology-examples

remotive topology build -f basic_restbus/instances/mock.instance.yaml build

docker compose -f build/basic_restbus_mock/docker-compose.yml up --build
```

Open RemotiveStudio and select the SteeringAngle frame on the topology-DriverCan0 namespace.

Use RemotiveTopology to create a simple restbus, i.e. automatically send all frames by one or more ECUs.

You don't need a full vehicle platform for this. A minimal platform with one database, one CAN channel and one ECU is
enough to attach to a CAN bus and stimulate other ECUs. Running the ECU as a `mock` instantiates it as a restbus with no
extra logic:

```yaml
ecus:
  SCCM:
    mock: {}
```

- [Restbus example](https://github.com/remotivelabs/remotivelabs-topology-examples/blob/v0.9.0/basic_restbus/README.md)
- Platform: [topology.platform.yaml](https://github.com/remotivelabs/remotivelabs-topology-examples/blob/v0.9.0/basic_restbus/platform/topology.platform.yaml)
- Instance file: [mock.instance.yaml](https://github.com/remotivelabs/remotivelabs-topology-examples/blob/v0.9.0/basic_restbus/instances/mock.instance.yaml)
- Setting signal values from Python: [update_restbus](https://github.com/remotivelabs/remotivelabs-topology-examples/tree/v0.9.0/basic_restbus/python/update_restbus)

Build and start the restbus, then set a signal from Python:

```bash
remotive topology build -f basic_restbus/instances/mock.instance.yaml build
docker compose -f build/basic_restbus_mock/docker-compose.yml up --build

# in another terminal
cd basic_restbus/python
uv sync
uv run -m update_restbus --signal SCCM-DriverCan0:SteeringAngle.SteeringAngle --value 123.45
```

Notice:
- The restbus respects CRC and E2E profiles when they are present in the database, along with default values.
- By subscribing to frames as well, the ECU becomes bi-directional: a [behavioral model](https://github.com/remotivelabs/remotivelabs-remotive-car/blob/main/usecases/BEHAVIORAL_MODELS.md).
- The same restbus can [play back a recording](https://developer.remotivelabs.com/docs/get-started/examples/replay-can.md) or run on a [physical CAN device](https://developer.remotivelabs.com/docs/get-started/examples/hardware-can.md).

## Where it lives in the repo

- [basic_restbus/instances/mock.instance.yaml](https://github.com/remotivelabs/remotivelabs-topology-examples/blob/v0.9.0/basic_restbus/instances/mock.instance.yaml)
- [basic_restbus/platform/topology.platform.yaml](https://github.com/remotivelabs/remotivelabs-topology-examples/blob/v0.9.0/basic_restbus/platform/topology.platform.yaml)
- [basic_restbus/python/update_restbus/](https://github.com/remotivelabs/remotivelabs-topology-examples/tree/v0.9.0/basic_restbus/python/update_restbus)

[Read this use case on GitHub](https://github.com/remotivelabs/remotivelabs-topology-examples/blob/v0.9.0/usecases/RESTBUS.md)

## Works well with

- [Python behavioral models](https://developer.remotivelabs.com/docs/get-started/examples/python-models.md): Model ECUs that don't exist yet, in a few lines of Python
- [Replay candump or CSV](https://developer.remotivelabs.com/docs/get-started/examples/replay-can.md): Play a candump or CSV recording onto a CAN bus
- [Physical CAN device](https://developer.remotivelabs.com/docs/get-started/examples/hardware-can.md): Attach a simulated ECU to a real CAN interface on the host
