flync_4_topology¶
- class FLYNCTopology¶
Bases:
FLYNCBaseModelRepresents the complete FLYNC system topology, including ECU connections and multicast routing configuration.
Parameters¶
- ethernet_topology
EthernetTopology, optional The system-wide ethernet topology between external ports of ECUs. Optional: a workspace with no ECU-to-ECU Ethernet wiring (or none yet authored) does not need one, but system-wide Ethernet features (e.g. multicast across multiple Ethernet ECUs) require it.
- can_bus_topologylist of
CANBusTopology System-wide CAN bus attachment topology. Runtime-derived from CAN bus definitions and ECU CAN interfaces; never authored in YAML.
- lin_bus_topologylist of
LINBusTopology System-wide LIN bus attachment topology. Runtime-derived from LIN bus definitions and ECU LIN interfaces; never authored in YAML.
- ethernet_topology
Ethernet Topology¶
Hint
All the connections listed in a ethernet topology shall be of the type : ecu_port_to_ecu_port.
- class EthernetTopology¶
Bases:
FLYNCBaseModelRepresents the system-wide ethernet topology consisting of external connections between ECUs.
Parameters¶
- connectionslist of
EthernetPointToPointConnectionorEthernetMultidropConnection The links between ECU ports, discriminated by
type:ecu_port_to_ecu_portwires two ports,ethernet_multidropwires N ports onto one shared medium.
Private Attributes¶
- _flync_model
FLYNCModel Internal reference to the FLYNC model that owns this topology. Managed internally and not part of the public API.
- connectionslist of
- ExternalConnection¶
Former name of
EthernetPointToPointConnection.
CAN and LIN Bus Topology¶
Note
Unlike the Ethernet topology, the CAN and LIN bus topology is never authored in YAML. There is no bus-topology
file. It is recomputed on every model load from the bus_ref declared on each controller’s CAN and LIN interfaces
(see flync_4_ecu), and every CAN/LIN bus declared under communication.channels.
The derived topology gives a system-wide view of which ECU interfaces attach to which bus. It is exposed on the model
via get_can_bus_topology() and
get_lin_bus_topology(), and stored on the can_bus_topology /
lin_bus_topology fields of FLYNCTopology.
Hint
The derivation runs the following consistency checks:
Unknown bus (major): a CAN/LIN interface references a
bus_refthat is not declared undercommunication.channels.LIN master cardinality (major): a LIN bus must have exactly one master interface.
LIN master missing (warning): a LIN bus has slave interfaces but no master.
Unused bus (warning): a bus is declared but no interface attaches to it.
Single node (warning): only one interface attaches to a bus.
- class BusTopology¶
Bases:
FLYNCBaseModelRuntime-derived attachment topology of a single CAN or LIN bus.
Parameters¶
- bus_namestr
Name of the bus or segment, matching
bus_refon the attached interfaces.- bus_typeLiteral[“can”, “lin”]
Kind of bus.
- attachmentslist of
BusAttachmentPoint ECU interfaces attached to this bus.
- class CANBusTopology¶
Bases:
BusTopologyRuntime-derived attachment topology of a single CAN bus.
- class LINBusTopology¶
Bases:
BusTopologyRuntime-derived attachment topology of a single LIN bus.
- class BusAttachmentPoint¶
Bases:
FLYNCBaseModelA single ECU controller interface attached to a CAN or LIN bus.
Parameters¶
- ecu_namestr
Name of the ECU that owns the attached interface.
- controller_namestr
Name of the controller that owns the attached interface.
- interface_namestr
Name of the CAN, LIN or Ethernet multidrop interface attached to the bus.
- roleLiteral[“can_node”, “lin_master”, “lin_slave”]
Role the interface plays on the bus.
Ethernet Multidrop¶
A point-to-point connection wires two ports. An ethernet_multidrop connection wires N onto one shared
medium, so it also carries the PLCA cycle those ports have to agree on: plca.transmit_opportunity_count
(how many slots one cycle has), plca.to_timer (how long a slot whose owner has nothing to send stays open,
in bit times of 100 ns, default 32), and each node’s node_id (which slot that port owns).
A node without a node_id takes no part in PLCA and competes for the medium instead. Node id
0 makes a node the coordinator, which opens each cycle; there is exactly one. Leaving the plca block off
altogether makes the segment a plain CSMA/CD medium.
What stays on each port is what nodes may legitimately differ in: the PHY itself, and burst_count and
burst_timer per node. The connection stores no PHY type, so a segment mixing PHY variants needs no model
change.
Each rule reports a FLYNC-TOP-... identifier that the
error catalog explains in full, with its severity and message.
- class EthernetMultidropConnection¶
Bases:
FLYNCBaseModelConnects N ECU ports on one shared medium.
Parameters¶
- typeLiteral[“ethernet_multidrop”]
The type of the connection. Defaults to
"ethernet_multidrop".- idstr
Unique identifier of the connection, and the name the segment is known by.
- plca
PLCACycle, optional The cycle shared by the nodes below. Leaving it off makes the segment a plain CSMA/CD medium, and no node may then claim a slot.
- nodeslist of
EthernetMultidropNode The ports sharing this medium.
- class EthernetMultidropNode¶
Bases:
FLYNCBaseModelOne ECU port on a multidrop segment and the slot of the cycle it transmits in.
Parameters¶
- ecu_port_namestr
Name of the ECU port on the segment (alias:
ecu_port).- node_idint, optional
Its slot in the PLCA cycle, counted from 0. Slot 0 makes it the coordinator. Leave it off to opt the node out of PLCA: it then competes for the medium by CSMA/CD.
- burst_countint, optional
How many extra frames this node may send back-to-back inside its own slot. Defaults to 0, one frame per slot.
- burst_timerint, optional
How long the node may keep the medium between those frames, in bit times. Defaults to 128. Has to stay above the 96 bit interframe gap, or the burst ends before the next frame starts.
- class PLCACycle¶
Bases:
FLYNCBaseModelThe PLCA parameters for a segment.
Parameters¶
- transmit_opportunity_countint
How many slots one cycle has, 1 to 255. May exceed the slots handed out: a spare one costs
to_timerbit times per cycle and leaves room for a node added later.- to_timerint, optional
How long an unused slot stays open, in bit times of 100 ns. Defaults to 32.
TSN on a shared medium is narrowed. gPTP works under two constraints
(rejects cmlds_linkport_enabled and two_step: false; errors 263,
264), several time transmitters must sit in different domains (warning
265), and an egress shaper loses its latency bound to the cycle (warning
259). Each rule’s severity and message live in the
error catalog.