Behavioral model and test


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.
- Getting started example, which explains every file
- Platform: topology.platform.yaml
- Behavioral model of the
BCM: models/bcm and its instance file - Test case: test_hazard_light.py, run by tester.instance.yaml
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
SCCMmock to simulate the button and checks whatFLCMreceives, so it tests theBCMmodel through the bus only. - The same test can run against real ECU software or hardware by replacing the
bcminstance.