flync_4_bus¶
The flync_4_bus module defines the physical communication buses
that carry Frames across the vehicle network.
Each bus configuration file lives in its own sub-folder under
communication/channels/ and contains the bus-level parameters, the
participating nodes, and the full list of frames transmitted on that
bus.
Hint
Frames referenced inside a bus configuration are defined inline
within the bus YAML file. They reference PDUs by name
(pdu_ref) — the PDU definitions themselves live in
communication/channels/pdus/ (see PDU).
CAN Bus¶
- class CANBus¶
Bases:
FLYNCBaseModelCAN bus configuration.
Parameters¶
- namestr
Unique name of the CAN bus.
- descriptionstr, optional
Optional human-readable description.
- versionstr
Version string (maximum length 128). Defaults to
"".- baud_rateint
Nominal bit rate in bits/s. Must be one of: 10 000, 20 000, 50 000, 100 000, 125 000, 250 000, 500 000, or 1 000 000.
- fd_enabledbool
Whether CAN FD is enabled on this bus. Defaults to
False.- fd_baud_rateint, optional
Data-phase bit rate in bits/s. Required when
fd_enabledisTrue; must beNoneotherwise. Must be one of: 2 000 000, 4 000 000, 5 000 000, or 8 000 000.- frameslist of
CANFrame|CANFDFrame|J1939Frame Frames transmitted on this bus.
CANFDFrameentries are only permitted whenfd_enabledisTrue.- state_membershipslist of
StateMembershipRef, optional Assignments of this bus to a state management group. A bus membership enrolls the whole bus as one participant — the entire bus stays awake or sleeps as a unit, never expanded into per-attached-node participants. It contributes one relevance bit by default (the bus name) and may reference several when the bus serves several functions. On CAN you may instead give the individual nodes their own memberships for selective, per-function participation.
The frames of a CAN bus may mix classical CANFrame,
CANFDFrame and J1939Frame
entries. J1939 frames (CAN 2.0B extended identifiers) are identified by their PGN fields rather than a
can_id, so only the classical CAN/CAN-FD frames are considered for the duplicate can_id check.
LIN Bus¶
- class LINBus¶
Bases:
FLYNCBaseModelLIN bus configuration.
Models the complete LIN bus, including the protocol header information needed for LDF file generation, the schedule tables, and the set of frames on the bus. Node participation (master/slave role, NAD, timing parameters) is declared on the controller’s LIN interface, not here.
LDF file mapping:
lin_protocol_version→LIN_protocol_versionlin_language_version→LIN_language_versionbaud_rate→LIN_speed(bits/s)channel_name→Channel_nametime_base→Time_base(ms)jitter→Jitter(ms)frames→Framessectionschedule_tables→Schedule_tablessectionSignal encoding types and
Signal_representationare derived from theSignal.factor,Signal.offset,Signal.lower_limit,Signal.upper_limit,Signal.unit, andSignal.value_encodingfields during LDF export.
Parameters¶
- namestr
Unique name of the LIN bus.
- descriptionstr, optional
Optional human-readable description.
- lin_protocol_versionLiteral[“1.3”, “2.0”, “2.1”, “2.2A”]
LIN protocol version for the
LIN_protocol_versionLDF header field.- lin_language_versionLiteral[“1.3”, “2.0”, “2.1”, “2.2A”]
LIN description language version for the
LIN_language_versionLDF header field.- baud_rateint
Bus bit rate in bits/s. Must be one of the standard LIN baud rates: 1 200, 2 400, 4 800, 9 600, 10 400, or 19 200 bits/s. Written as-is to the LDF
LIN_speedfield.- channel_namestr, optional
Optional LIN channel name for the LDF
Channel_namefield.- time_basefloat
Scheduling time base in milliseconds. Defaults to
5.0. Corresponds to the LDFTime_basefield.- jitterfloat
Maximum scheduling jitter in milliseconds. Defaults to
0.0. Corresponds to the LDFJitterfield.- schedule_tableslist of
LINScheduleTable Named schedule tables for the LDF
Schedule_tablessection.- frameslist of
LINFrame Unconditional LIN frames for the LDF
Framessection.- state_membershipslist of
StateMembershipRef, optional Assignments of this bus to a state management group. A bus membership enrolls the whole bus as one participant — the entire bus stays awake or sleeps as a unit, never expanded into per-attached-node participants. It contributes one relevance bit by default (the bus name) and may reference several when the bus serves several functions. LIN has no per-node NM, so a LIN bus always participates as a whole.
Schedule Tables¶
- class LINScheduleTable¶
Bases:
FLYNCBaseModelLIN schedule table.
A named sequence of frame transmissions with associated slot periods. Corresponds to a single
Schedule_tablesentry in the LDF file.Parameters¶
- namestr
Unique name of the schedule table.
- descriptionstr, optional
Optional human-readable description.
- entrieslist of
LINScheduleEntry Ordered list of frame-slot entries.
- class LINScheduleEntry¶
Bases:
FLYNCBaseModelSingle entry in a LIN schedule table.
Each entry specifies a frame to be transmitted and the slot period after which the next frame is scheduled.
Parameters¶