Implementing ECUs
By default RemotiveTopology instantiates each ECU as a RemotiveBroker. The RemotiveBroker allows you to communicate as the ECU, for example using the correct IP address on a VLAN or using a CAN device. You decide what behavior the ECU should have, or replace RemotiveBroker with your own container.
| Option | Use when | Runs as |
|---|---|---|
| Behavioral model | You want a reusable component that emulates the behavior of a real ECU | RemotiveBroker and a model container |
| Mock | You need an ECU that sends its cyclic signals, for a realistic bus | RemotiveBroker and a mock |
| Virtual ECU | You want to run the production software of the ECU, or another implementation in a container | Your container instead of RemotiveBroker |
| External | The ECU runs as hardware or in a different runtime | Nothing, managed by you |
External ECUs
An external ECU plays a part in the instantiated topology, but runs separately and isn't controlled by the topology, for example as hardware or in a different runtime. Defining it as external makes RemotiveTopology aware of it without trying to manage it.
ecus:
FLCM:
external: {}
Since the instantiated ECUs decide which channels are instantiated, an external ECU also affects which channels are part of the topology.
Marking ECUs as external is required to be able to use TAP namespaces that reference an external ECU.
Namespaces
When working with the RemotiveTopology framework, for example in behavioral models, mocks, or test cases, you refer to namespaces. A namespace represents how an ECU sees a channel and is named <ECU>-<Channel>, for example BCM-DriverCan.
To list the available namespaces, start the topology and ask the TopologyBroker, which is forwarded to port 50051 on your host:
remotive broker signals namespaces --url http://localhost:50051
ECU channel configuration
By default an ECU is connected to all channels according to the platform. You can choose a subset of channels for each ECU.
Some channel types also have optional configuration per ECU.
Ethernet
When instantiating a RemotiveBroker-based ECU connected to Ethernet you can control which sockets and SOME/IP services are instantiated. By default all sockets and services belonging to the ECU according to the platform are instantiated. These settings only affect ECUs that are instantiated using RemotiveBroker.
ecus:
BCM:
channels:
BodyEth0:
config:
type: ethernet
sockets:
- BCM_socket1
- BCM_socket2
someip:
provided_service_instances:
- BCM_service1
consumed_service_instances:
- GWM_service2
sockets- which sockets (ports) the ECU opens.provided_service_instances- which SOME/IP service instances the ECU provides.consumed_service_instances- which SOME/IP service instances the ECU consumes. Only these services need to be provided by other ECUs in the instance.
VLAN trunk interface
When an Ethernet channel uses the remotivebus driver, the ECU gets both a trunk interface and a VLAN subinterface. For containers that need to handle VLAN tagging themselves and only require the trunk network interface, creation of the VLAN subinterface can be skipped:
ecus:
BCM:
channels:
BodyEth:
config:
type: ethernet
create_vlan_interface: false