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
ExternalConnection A list of ExternalConnection instances that define the links between ECU ports.
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
- class ExternalConnection¶
Bases:
FLYNCBaseModelRepresents a connection between two ECU (Electronic Control Unit) ports.
This model captures a directed or undirected link between two named ports on separate ECUs.
Parameters¶
- typeLiteral[“ecu_port_to_ecu_port”]
The type of the connection. Defaults to “ecu_port_to_ecu_port” for schema identification.
- idstr
A unique identifier for the external connection.
- ecu1_port_namestr
The name of the first ECU port (alias: “ecu1_port”).
- ecu2_port_namestr
The name of the second ECU port (alias: “ecu2_port”).
Private Attributes¶
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 CAN or LIN bus, 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 or LIN interface attached to the bus.
- roleLiteral[“can_node”, “lin_master”, “lin_slave”]
Role the interface plays on the bus.