Skip to main content
Each interface section in the rig TOML specifies a 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.
Best for: CI, local development, unit tests, any environment without CAN hardware.

socketcan

Linux SocketCAN. Uses the python-can SocketCAN interface. Requires the CAN interface to be configured in the OS before connecting:
Best for: Linux bench machines with SocketCAN adapters (Kvaser, EMS, or any native CAN interface). No extra install needed — python-can ships with the base package.

peak

PEAK PCAN adapters (PCAN-USB, PCAN-PCI). Uses the python-can PCAN interface.
For CAN-FD:
Best for: Windows and Linux benches with PEAK USB or PCIe adapters. No extra install needed — python-can ships with the base package.

Custom backend (module path)

Any Python class implementing AbstractCANBackend can be loaded by specifying its module path. Use "module.path:ClassName", or a bare module path that exports a Backend attribute:
CruciHiL resolves the path via 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:
Generate a stub with:

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.
Best for: ECUs with DoIP-capable diagnostic interfaces (many Tier 1 ECUs support ISO 13400-2).

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.
gpio_relay and bench_psu are reserved names whose hardware implementations have not shipped yet — using one fails at rig init with guidance. Until they ship, use a custom power backend via module path.

bench_psu

Controls a bench power supply over serial. Supported instruments include Keysight E3631A and compatible.

Custom power backend

Implement 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.
linux_gpio is a reserved name whose hardware implementation has not shipped yet — using it fails at rig init with guidance. Until it ships, use a custom GPIO backend via module path.

Custom GPIO backend

Implement 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:
Real-hardware transports are loaded via module path (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