backend field. This determines which driver is used at runtime. Switching backends requires only a TOML change — test code is unaffected.
CAN backends
virtual
In-process simulation. No hardware or OS dependencies. Frames are passed through an in-memory queue.
socketcan
Linux SocketCAN. Uses the python-can SocketCAN interface. Requires the CAN interface to be configured in the OS before connecting:
python-can ships with the base package.
peak
PEAK PCAN adapters (PCAN-USB, PCAN-PCI). Uses the python-can PCAN interface.
python-can ships with the base package.
Custom backend (module path)
Any Python class implementingAbstractCANBackend can be loaded by specifying its module path. Use "module.path:ClassName", or a bare module path that exports a Backend attribute:
importlib. This works for every interface type — CAN, SOME/IP, DoIP, power, GPIO, UDP, and UDS sections all accept a module path in their backend field. The class must implement:
DoIP backends
virtual
In-process DoIP simulation. Responds to entity discovery and routing activation without network hardware.
python-doip
Real DoIP transport using the python-doip library. Requires an actual DoIP gateway on the network.
SOME/IP backends
python-someip
SOME/IP Events and Fields. Currently backed by the in-process virtual SOME/IP implementation — used in the virtual rig. Scope: Events and Fields only (Methods come later).
vsomeip
Real SOME/IP via the vsomeip wrapper backend.
Power backends
virtual_power
In-process power simulation. Tracks on/off state in memory. No hardware dependency.
gpio_relay
Controls power via a GPIO output pin. Typically used with a relay board connected to a GPIO header.
bench_psu
Controls a bench power supply over serial. Supported instruments include Keysight E3631A and compatible.
Custom power backend
AbstractPowerBackend:
GPIO backends
virtual_gpio
In-process GPIO simulation. Default for all GPIO pins in virtual mode.
linux_gpio
Linux GPIO for bench machines and single-board computers with a GPIO header.
Custom GPIO backend
AbstractGPIOBackend:
UDP backends
virtual_udp
In-process UDP simulation for [rig.udp.<name>] sections. Currently the only built-in UDP backend — a real UDP transport ships in a later phase. Custom module paths are accepted.
UDS backends
virtual_uds
In-process UDS simulation for the [rig.uds] section. Currently the only built-in UDS backend — custom module paths are accepted. UDS over DoIP does not use this section; it is handled by [rig.ethernet] + [rig.ecus].
Custom protocol transports
[rig.custom.<name>] sections pair a codec with a transport. Built-in transports are the virtual twins:
backend = "myorg.uart_bridge:UARTTransport"). Generate a stub with crucihil scaffold --adapter datagram|stream|transactional|codec. See Custom Protocols for the declarative wire-format YAML and the round-trip verification harness.
Backend selection summary
See also
- Rig Configuration Overview
crucihil scaffold --adapter— generate custom backend stubs