API ReferenceveextensionstechLINBus
LIN Bus (PCAN)
Interface to PEAK-System PLIN hardware for LIN bus communication. Enables BeamNG to communicate with LIN slave devices like seat controls, window motors, and climate systems.
Interface to PEAK-System PLIN hardware for LIN bus communication. Enables BeamNG to communicate with LIN slave devices like seat controls, window motors, and climate systems for hardware-in-the-loop testing.
Public API
| Variable | Type | Description |
|---|---|---|
linBusAPI | userdata | Handle to the native PLIN API library. |
hardwareTypes | table | Supported LIN hardware types. |
modes | table | LIN bus operating modes (master, slave). |
directions | table | Message direction flags (publish, subscribe). |
checksumTypes | table | LIN checksum type options (classic, enhanced). |
errorCodes | table | LIN error code definitions. |
client | userdata | Active LIN client handle. |
hardware | userdata | Active LIN hardware handle. |
errorCodeLookup | table | Reverse lookup for error code names. |
isConnected | boolean | Whether a PLIN adapter is currently connected and initialized. |
Hooks
| Hook | Description |
|---|---|
onExtensionLoaded | Loads the PLIN DLL and initializes the LIN bus connection. |
Usage Example
-- Load the LIN bus extension
extensions.load("tech/LINBus/LINBusPeak")
if extensions.tech_LINBus_LINBusPeak.isConnected then
log("I", "LIN", "PLIN adapter connected")
endSee Also
- CAN Bus (PCAN) — CAN bus interface (same PEAK hardware)
- TechCore — External research API
Damage Evaluation
Analyzes vehicle crash damage by evaluating node displacements, beam breaks, and deformation energy. Provides quantitative crash severity metrics for safety research.
CSV Metrics
Test utility that exports vehicle metrics to CSV format for automated testing and validation pipelines. Provides structured output for CI/CD integration.