Skip to main content

Behavioral model and test

Topology graph of Behavioral model and testTopology graph of Behavioral model and test

Start here · Topology examples v0.9.0

  • CAN
  • Lighting

Run it​

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

remotive topology build \
-f getting_started/instances/main.instance.yaml \
-f getting_started/settings/can_over_udp.settings.instance.yaml \
build

docker compose -f build/getting-started/docker-compose.yml --profile tester up --build --abort-on-container-exit

The tester container runs the test and exits; run the command again to rerun it.

The hello world of RemotiveTopology: describe a small platform, write a behavioral model for one ECU, and test it.

The test checks that the front light control module (FLCM) gets the right signal when the hazard lights button is pressed. The button makes the steering column module (SCCM) send a message to the body control module (BCM), whose behavioral model forwards it to the light control modules.

Build and run the test:

remotive topology build \
-f getting_started/instances/main.instance.yaml \
-f getting_started/settings/can_over_udp.settings.instance.yaml \
build
docker compose -f build/getting-started/docker-compose.yml --profile tester up --abort-on-container-exit --build

Notice:

  • The test controls the SCCM mock to simulate the button and checks what FLCM receives, so it tests the BCM model through the bus only.
  • The same test can run against real ECU software or hardware by replacing the bcm instance.