flync_4_ecu¶
ECU Config¶
- class ECU¶
Bases:
FLYNCBaseModelRepresents an Electronic Control Unit (ECU) in the network.
Parameters¶
- namestr
Name of the ECU.
- portslist of
ECUPort, optional List of physical Ethernet ECU ports. May be empty for a CAN/LIN-only ECU, but at least one port is required as soon as the ECU declares any Ethernet interface or switch.
- controllerslist of
Controller Controllers associated with this ECU.
- switcheslist of
Switch, optional Switches integrated within the ECU. If not provided, the ECU contains no internal switches.
- topology
InternalTopology, optional Internal topology defining the connectivity between ECU components. May be omitted for a CAN/LIN-only ECU, but is required as soon as the ECU declares any Ethernet interface or switch.
- multicast_groupslist of
MulticastGroupMembership, optional Multicast group memberships of the ECU. This field is populated automatically internally.
- mac_multicast_endpoints
MACMulticastEndpoints, optional MAC multicast endpoints configuration for the ECU.
- ecu_metadata
ECUMetadata Metadata information describing the ECU.
- state_membershipslist of
StateMembershipRef, optional Assignments of this ECU to state management groups (whole-ECU granularity). Stored in
state_memberships.flync.yamlinside the ECU folder.
ECU Ports Config¶
Hint
In case of a port with an external PHY, we need to include mdi_config (see Media-Dependent Interfaces), and mii_config (see Media-Independent Interfaces).
- class ECUPort¶
Bases:
FLYNCBaseModelRepresents an ECU port and its configuration.
This class encapsulates both the media-dependent (MDI) and media-independent (MII) interface configurations for a port.
Parameters¶
Private Attributes¶
- _ecu :
The ECU of which the ECU Port is a part of.
- _connected_component:
The switch port, controller interface or ecu port connected to the controller interface. This attribute is managed internally and is not part of the public API.
- _type:
The type of the object generated. Set to ecu_port.
Controller Config¶
Changed in version 0.11.0: The Structure of the Controller configuration was significantly updated with Version 0.11.0! Make sure to upgrade your config to the new structure as described in the reference: ECUs - Controllers
Note
All controllers of an ECU are configured in the respective directory inside 📁 controllers/.
This is a mandatory dir for the ECU configuration, since all ECUs need to define (at least) one controller.
- class Controller¶
Bases:
FLYNCBaseModelRepresents a controller device that contains multiple interfaces.
Parameters¶
- namestr
Name of the controller.
- controller_metadata
EmbeddedMetadata Metadata describing the embedded controller.
- ethernet_interfaceslist of
EthernetInterface, optional Ethernet interfaces of the controller.
- can_interfaceslist of
CANInterface, optional CAN bus interfaces of the controller.
- lin_interfaceslist of
AnyLINInterface, optional LIN bus interfaces of the controller.
- compute_nodeslist of
ComputeNode, optional Compute nodes hosted by this controller. Compute nodes nest arbitrarily deep; names must be unique across the whole subtree. Stored in the
compute_nodes/folder.- switcheslist of
Switch, optional Virtual switches hosted by this controller, modeled with the same class as a hardware switch. Stored in the
switches/folder.- controller_topology
ControllerTopology, optional Connectivity between the controller’s virtual switches and the Ethernet interfaces of the controller and of its compute nodes. Stored in
controller_topology.flync.yaml.- app_bindings
AppBindings, optional Applications a controller should bind to.
- state_membershipslist of
StateMembershipRef, optional Assignments of this controller to state management groups. Stored in
state_memberships.flync.yamlinside the controller folder.
Private Attributes¶
- _typeLiteral[“controller”]
The type of the object generated. Defaults to
"controller".
Ethernet Interfaces¶
Hint
For controller interfaces that have an external PHY, the mii_config (see Media-Independent Interfaces) for that interface must be provided.
For controller interfaces with integrated PHY, no mii_config is needed.
Warning
In any case, the MDI configuration is never configured on the controller interface, but on the ECU Ports. See ECU Ports Config for more details.
- class EthernetInterface¶
Bases:
ControllerInterfaceAn Ethernet Interface of a Controller.
Parameters¶
- namestr
Name of the ethernet interface, implied from the folder name on disk.
- interface_config
EthernetInterfaceConfig Configuration of the Ethernet interface.
- socketslist of
SocketContainer, optional Socket containers for this Ethernet interface.
Private Attributes¶
- _connected_component :
The switch port, controller interface, or ECU port connected to this interface. Managed internally; not part of the public API.
- _type :
Fixed to
"controller_interface".- _controller :
The
Controllerthat owns this interface. Managed internally.
- class ControllerInterface¶
Bases:
FLYNCBaseModelBase class for all controller interfaces (Ethernet, CAN, LIN).
Subclasses must declare
namewith an appropriateImpliedstrategy (FOLDER_NAMEfor Ethernet,FILE_NAMEfor the bus interfaces).Parameters¶
- namestr
Name of the interface, implied from its file or folder name on disk.
- class VirtualControllerInterface¶
Bases:
FLYNCBaseModelA VLAN-tagged virtual interface stacked on top of a physical controller interface or a compute node.
Each virtual interface represents one logical network endpoint, identified by a VLAN ID and assigned one or more IP addresses. Multiple virtual interfaces can be defined on the same physical interface or compute node to separate traffic across different VLANs.
Parameters¶
- namestr
Name of the virtual interface.
- vlanidint, optional
VLAN identifier. Values 0-4094 are accepted; 4095 is reserved by IEEE 802.1Q and emits a warning when used.
Nonedenotes an untagged virtual interface.- addresseslist of
IPv4AddressEndpointorIPv6AddressEndpoint Assigned IPv4 and IPv6 address endpoints.
- multicastlist of
IPvAnyAddressorMacAddress, optional Allowed multicast addresses.
CAN Interfaces¶
Note
CAN interfaces are optional per controller (a controller must declare at least one interface of any kind).
An ECU with only CAN/LIN/J1939 interfaces needs no ECU ports and no internal topology. Each interface’s
bus_ref attaches it to a declared CAN bus; the system-wide attachment view is derived automatically (see
CAN and LIN Bus Topology).
- class CANInterface¶
Bases:
ControllerInterfaceCAN interface of a controller, declaring which frames the controller sends, receives, and forwards on a CAN bus.
Parameters¶
- namestr
Name of the CAN interface, implied from the file name on disk.
- bus_refstr
Name of the
CANBusthis interface connects to.- sender_frameslist of
CANFrameRef Frames transmitted by this controller on the bus.
- receiver_frameslist of
CANFrameRef Frames received by this controller from the bus.
- forwarder_frameslist of
CANFrameForwarder Frames received by this controller and re-emitted on one or more egresses.
- j1939_sender_frameslist of
J1939FrameRef, optional J1939 frames (by PGN) transmitted by this node on the bus. Declaring any J1939 reference marks this interface as a J1939 node, so together with
j1939_name.- j1939_receiver_frameslist of
J1939FrameRef, optional J1939 frames (by PGN) received by this node from the bus.
- j1939_nameint, optional
64-bit J1939 NAME of the node this interface exposes; a node may be modeled by its NAME alone. Setting it marks the interface as a J1939 participant on
bus_ref, which must then only carryJ1939Frameframes.- source_addressint, optional
Preferred J1939 Source Address (SA) of the node, in the range [0, 253]. The SA is claimed at runtime through address claiming and may be left unset; when provided it is the address the node requests, not a hard assignment. Addresses 254 (NULL) and 255 (GLOBAL) are reserved by J1939.
- class CANFrameRef¶
Bases:
FLYNCBaseModelReference to a CAN frame by bus and CAN ID.
Parameters¶
- bus_refstr
Name of the
CANBusthat owns the frame.- frame_refint
CAN ID of the
CANFrameorCANFDFrameon the referenced bus.
J1939 over CAN¶
Note
J1939 rides on a regular CANInterface: a CAN interface
participates in J1939 on its bus when it declares a 64-bit j1939_name (used for address claiming) and/or a
source address (0-253; 254 NULL and 255 GLOBAL are reserved). A controller may be modeled with only J1939
CAN interfaces and still satisfy the “at least one interface” requirement. J1939 frames live on a
CAN bus and are of type J1939Frame; a bus reached by a
J1939-capable CAN interface may only carry J1939Frame frames.
LIN Interfaces¶
Note
A controller acts as either a LIN master or a LIN slave on a given bus. Exactly one master is required per LIN
bus; this is checked when the CAN and LIN Bus Topology is derived from the interfaces’ bus_ref.
- class LINMasterInterface¶
Bases:
ControllerInterfaceLIN interface for a controller acting as LIN master on a bus.
The master controls the schedule and initiates all frame transmissions.
Parameters¶
- namestr
Name of the LIN interface, implied from the file name on disk.
- node_typeLiteral[“master”]
Discriminator field. Always
"master".- bus_refstr
Name of the
LINBusthis interface connects to.- lin_protocolLiteral[“1.3”, “2.0”, “2.1”, “2.2A”]
LIN protocol version supported by this node.
- p2_minfloat
Minimum time (ms) between the end of a slave response and the start of the next frame header. Maps to
P2_minin the LDFNodes.Masterblock.- st_minfloat
Minimum separation time (ms) between consecutive frame headers transmitted by the master. Maps to
ST_minin the LDFNodes.Masterblock.- sender_frameslist of
LINFrameRef Frames transmitted (scheduled) by this master controller.
- class LINSlaveInterface¶
Bases:
ControllerInterfaceLIN interface for a controller acting as LIN slave on a bus.
The slave responds to frame headers issued by the master.
Parameters¶
- namestr
Name of the LIN interface, implied from the file name on disk.
- node_typeLiteral[“slave”]
Discriminator field. Always
"slave".- bus_refstr
Name of the
LINBusthis interface connects to.- lin_protocolLiteral[“1.3”, “2.0”, “2.1”, “2.2A”]
LIN protocol version supported by this node.
- configured_nadint
Configured Node Address (0x00 – 0xFF). Written as
configured_NADin the LDFNode_attributesblock.- initial_nadint
Initial Node Address (0x00 – 0xFF). Written as
initial_NADin the LDFNode_attributesblock.- product_idstr, optional
Product identification string. Written as
product_idin the LDFNode_attributesblock.- response_errorstr, optional
Name of the signal used to report response errors. Written as
response_errorin the LDFNode_attributesblock.- receiver_frameslist of
LINFrameRef Frames received by this slave controller from the bus.
- class LINFrameRef¶
Bases:
FLYNCBaseModelReference to a LIN frame by bus and LIN ID.
Parameters¶
Compute Nodes (experimental)¶
- class ComputeNode¶
Bases:
FLYNCBaseModelA compute node hosted by a controller, or nested inside another compute node.
A compute node may own virtual Ethernet interfaces (
EthernetInterfacewithout a PHY), may declare its own virtual switches to bridge them, and may host further compute nodes. It is wired to the rest of the controller through the controller’scontroller_topology.flync.yaml— a compute node never connects to anything outside its own controller.Parameters¶
- namestr
Name of the compute node, implied from the folder name on disk. Must be unique across the whole controller subtree.
- ethernet_interfaceslist of
EthernetInterface, optional Virtual Ethernet interfaces exposed by this compute node. These carry no
mii_config: a virtual NIC has no PHY.- app_bindings
AppBindings, optional Applications this compute node should bind to.
- compute_nodeslist of
ComputeNode, optional Compute nodes nested inside this one.
- virtual_switcheslist of
Switch, optional Software MAC bridges defined inside this compute node.
Note
A compute node’s virtual_switches reuse the same Switch /
SwitchPort model documented in Switch Config.
Socket Config¶
- class SocketContainer¶
Bases:
FLYNCBaseModelRepresents a socket container for the ecu.
Parameters¶
- class Socket¶
Bases:
FLYNCBaseModelDefines a virtual-interface socket that is bound to a specific IP address.
Parameters¶
- namestr
A readable identifier for the socket.
- endpoint_address
IPv4AddressorIPv6Address The IP address assigned to the socket.
- port_noint
The port number the socket uses for communication.
- deploymentslist of
DeploymentUnion, optional Deployments of the socket.
- endpoint_typeLiteral[“multicast”, “unicast”], optional
The type of the socket endpoint, which can be either “multicast” or “unicast”. This field is per default automatically determined based on the value of
endpoint_address, but can be overridden by explicitly providing a value.- multicast_txlist of
IPvAnyAddress, optional Multicast addresses that the socket is allowed to transmit to (only applicable for sockets with a multicast endpoint_type).
- class SocketUDP¶
Bases:
SocketRepresents a UDP socket.
Parameters¶
- protocolLiteral[“udp”]
Transport protocol for the socket. Defaults to
"udp".- udp_options
UDPOption, optional The UDP options that can be configured for this socket.
- class SocketTCP¶
Bases:
SocketRepresents a TCP socket.
Parameters¶
- protocolLiteral[“tcp”]
Transport protocol for the socket. Defaults to
"tcp".- tcp_profileint
The unique identifier of the TCP profile whose options are applied to the socket.
Endpoints¶
- class IPv4AddressEndpoint¶
Bases:
IPv4AddressEntryRepresents an IPv4 address endpoint for a network interface.
Parameters¶
- class IPv6AddressEndpoint¶
Bases:
IPv6AddressEntryRepresents an IPv6 address endpoint for a network interface.
Parameters¶
Deployments¶
- class DeploymentUnion¶
Bases:
RootModelUnion type representing a deployment configuration for a socket. This model wraps a union of different deployment models and uses the
deployment_typefield as a discriminator to determine which specific deployment model is present.Possible types¶
SOMEIPServiceConsumerorSOMEIPServiceProviderorSOMEIPSDDeploymentorPDUSenderorPDUReceiverorPDUForwarderorDoIPServerDeploymentorDoIPDiscoveryDeployment
Switch Config¶
Hint
A switch configuration contains key details regarding the following parameters:
switch (logical) ports
VLAN configuration
multicast configuration
TimeSync configuration
QoS configuration
Hint
Similar to controller config, each port of switch with an external PHY has an mii_config (see Media-Independent Interfaces),
describing the various properties of the MII connected to that port.
For switch ports using an integrated PHY, no mii_config is needed.
Note
Each switch folder holds a 📄 switch.flync.yaml file (the SwitchConfig — ports, VLANs, TCAM
rules, dynamic address aging) and, optionally, a 📁 switch_host_controller/ sub-folder. That sub-folder
is a regular Controller Config (name, ethernet interfaces, virtual interfaces, …) and models the switch’s
own host controller — the CPU that manages the switch via its CPU port. Because it is a full
Controller, its interfaces are linked to the switch’s CPU port
through a SwitchPortToHostControllerInterface connection
in the ECU’s internal topology.
- class Switch¶
Bases:
FLYNCBaseModelRepresents an automotive Ethernet network switch configuration.
Parameters¶
- namestr
Name of the switch. Implied from the folder name.
- switch_config
SwitchConfig The core switch configuration loaded from
switch.flync.yaml.- host_controller
Controller, optional The host controller managing the switch, stored in the
switch_host_controller/sub-folder.
- class SwitchConfig¶
Bases:
FLYNCBaseModelCore switch configuration data stored in
switch.flync.yaml.This model holds the switch metadata, ports, VLANs, and TCAM rules. It is loaded from the
switch.flync.yamlfile inside each switch folder.Parameters¶
- meta
EmbeddedMetadata Metadata associated with the switch.
- portslist of
SwitchPort List of switch ports.
- vlanslist of
VLANEntry List of VLAN entries configured on the switch.
- tcam_ruleslist of
TCAMRule, optional List of TCAM rules configured on the switch.
- dynamic_address_aging_timeint, optional
Aging time, in seconds, for dynamically learned address entries in the switch’s Filtering Database (FDB). A learned MAC address is removed if no matching frame is seen within this interval. Must be a positive value.
- meta
- class SwitchPort¶
Bases:
FLYNCBaseModelRepresents a Switch Port and its configuration.
Parameters¶
- namestr
Name of the Switch Port.
- silicon_port_noint
Silicon hardware port number (vendor-specific). Must be greater or equal to 0.
- default_vlan_idint
VLAN ID to be added to an untagged frame ingressing on the port (>= 0 and <= 4095). Use
Nonefor an untagged port (no default VLAN).- mii_config
MIIorRMIIorSGMIIorRGMII, optional Media-independent interface configuration (e.g., MII or RMII).
- ptp_config
PTPConfig, optional Precision Time Protocol configuration.
- ingress_streamslist of
Stream, optional Stream-based IEEE 802.1Qci configuration.
- traffic_classeslist of
TrafficClass, optional Traffic class definitions and traffic shaping configuration applied to egress port queues.
- macsec_config
MACsecConfig, optional MACsec configuration for the port.
Private Attributes¶
- _type :
The type of the object generated. Set to controller_interface.
_mdi_config :
BaseT1orBaseT1SorBaseT- _connected_component:
The switch port, controller interface or ecu port connected to the switch port. This attribute is managed internally and is not part of the public API.
- class VLANEntry¶
Bases:
FLYNCBaseModelRepresents a VLAN entry for a switch.
Parameters¶
- namestr
Human-readable name for the VLAN.
- idint
VLAN ID. Values 0-4094 are accepted; 4095 is reserved by IEEE 802.1Q and emits a warning when used.
- default_priorityint
Default frame priority for the VLAN (0-7).
- portslist of str
List of switch port names members of this VLAN.
- multicastlist of
MulticastGroup, optional List of multicast group configurations associated with this VLAN.
TCAM¶
- class TCAMRule¶
Bases:
FLYNCBaseModelDefinition of a TCAM (ternary content-addressable memory) rule for a switch.
Parameters¶
- namestr
Name for the description of the TCAM rule (minimum length 1).
- idStrictInt
Unique TCAM rule ID. Must be greater or equal to 0.
- match_filter
FrameFilter, optional Packet-matching filter for layer-based matching on MAC/IP/VLAN/ports. Mutually exclusive with
frame_mask.- frame_masklist of
FrameMask, optional Packet-matching criteria for byte-level pattern matching on raw frame data. The masks of one rule must inspect disjoint byte ranges of the frame.
- frame_windowint, optional
Maximum number of leading frame bytes the
frame_maskentries may inspect. Unbounded when omitted. Must be greater or equal to 1.- match_portslist of str, Optional
Ports to which the rule is bound. Defaults to all ports of the switch if kept empty or undefined.
- actionlist of
DroporMirrororForceEgressorVLANOverwriteorRemoveVLAN One or more actions performed when the rule matches. The
typefield of each action class acts as the discriminating key for Pydantic.A single port must not be targeted by more than one of drop, force_egress or mirror, nor by more than one of remove_vlan or vlan_overwrite.
- vehicle_state
Bitmask, optional Vehicle-state pattern the rule is gated on: it applies only when
(current_state & vehicle_state.mask) == vehicle_state.data. Bothdataandmaskmust fit in the 8-bit vehicle-state register.None(default) means the rule is not gated on vehicle state.
- class FrameMask¶
Bases:
BitmaskByte-level pattern matching of an Ethernet frame, i.e. a
Bitmaskbound to a frame position.A frame matches if
(frame[offset:offset + byte_length] & mask) == data, e.g. a two-byte pattern atoffset=12matches on the EtherType field.Parameters¶
- offsetint
Byte position in the frame where the pattern match begins. Must be greater or equal to 0.
Actions¶
- class Drop¶
Bases:
PortScopedActionAction that discards traffic on the selected egress ports.
Parameters¶
- typeLiteral[“drop”]
Discriminator used by Pydantic.
- portslist of str, Optional
Egress ports where the drop action should be applied. Defaults to all ports of the switch if kept empty or undefined.
- class Mirror¶
Bases:
PortScopedActionAction that mirrors incoming traffic to additional egress ports.
Parameters¶
- typeLiteral[“mirror”]
Discriminator used by Pydantic.
- portslist of str, Optional
Egress ports that will receive the mirrored traffic. Defaults to all ports of the switch if kept empty or undefined.
- class ForceEgress¶
Bases:
PortScopedActionAction that forces a packet to leave through a given set of ports, bypassing the normal forwarding decision.
Parameters¶
- typeLiteral[“force_egress”]
Discriminator used by Pydantic.
- portslist of str, Optional
Egress ports to which the messages are force-forwarded. Defaults to all ports of the switch if kept empty or undefined.
- class VLANOverwrite¶
Bases:
PortScopedActionAction that overwrites VLAN ID and/or PCP values on selected ports.
Parameters¶
- typeLiteral[“vlan_overwrite”]
Discriminator used by Pydantic.
- overwrite_vlan_idint, optional
New VLAN identifier (0-4095). If
None, the VLAN ID is left unchanged.- overwrite_vlan_pcpint, optional
New PCP value (0-7). If
None, the PCP value is left unchanged.- portslist of str, Optional
Egress ports at which the overwriting should take place. Defaults to all ports of the switch if kept empty or undefined.
- class RemoveVLAN¶
Bases:
PortScopedActionAction that removes the VLAN tag from packets on the given ports.
Parameters¶
- typeLiteral[“remove_vlan”]
Discriminator used by Pydantic.
- portslist of str, Optional
Egress ports where the VLAN tag will be removed. Defaults to all ports of the switch if kept empty or undefined.
Router Config¶
- class RouteEntry¶
Bases:
FLYNCBaseModelRepresents a static routing table entry.
Parameters¶
- destination
IPv4AddressEntryorIPv6AddressEntry The destination network expressed as address and mask (e.g.
address="10.0.0.0", ipv4netmask="255.255.255.0").- default_gateway
IPvAnyAddress Gateway IP for this route. If the next hop is a router, this is that router’s VCI address on the shared subnet. If the next hop is a controller interface (directly connected), this is the controller interface’s IP address.
- egress_interfacestr
Name of the
VirtualControllerInterfaceon this interface through which this route is forwarded.
- destination
PHY Config¶
Media-Dependent Interfaces¶
- class BASET¶
Bases:
FLYNCBaseModelRepresents a BASE-T Ethernet interface configuration.
Parameters¶
- modeLiteral[“base_t”]
Interface mode. Defaults to
"base_t".- speedint
Supported link speed in megabits per second. Valid values are 100 or 1000.
- duplexLiteral[“full”]
Duplex mode. Defaults to
"full".- roleLiteral[“master”, “slave”]
Role of the PHY, either master or slave. Defaults to
"slave".- autonegotiationbool, optional
Indicates whether autonegotiation is enabled (defaults to
False).
- class BASET1¶
Bases:
FLYNCBaseModelRepresents a BASE-T1 Ethernet interface configuration.
Parameters¶
- modeLiteral[“base_t1”]
Interface mode. Defaults to
"base_t1".- speedint
Supported link speed in megabits per second. Valid values are 100 or 1000.
- duplexLiteral[“full”]
Duplex mode. Defaults to
"full".- roleLiteral[“master”, “slave”]
Role of the PHY, either master or slave.
- autonegotiationbool, optional
Indicates whether autonegotiation is enabled (defaults to
False).
- class BASET1S¶
Bases:
FLYNCBaseModel10BASE-T1S PHY, IEEE 802.3-2022 Clause 147.
Half duplex on a shared multidrop segment (with PLCA) or full duplex on a point-to-point link.
There is no
rolefield. DME is self-clocked, so no side of the link supplies a clock; a config that still setsroleloads with a warning and drops the key.Parameters¶
- modeLiteral[“base_t1s”]
Interface mode. Defaults to
"base_t1s".- speedint
Link speed in megabits per second. Defaults to 10.
- duplexLiteral[“half”, “full”]
Duplex mode. Defaults to
"half"."full"is valid only withtopology="p2p": a shared medium is always half duplex.- topologyLiteral[“p2p”, “multidrop”]
Whether the PHY sits on a point-to-point link or a shared multidrop segment. Defaults to
"p2p".- autonegotiationbool, optional
Autonegotiation enabled (defaults to
False). Valid on a point-to-point link only: a mixing segment is shared, so there is no peer to negotiate with.
Media-Independent Interfaces¶
- class MII¶
Bases:
FLYNCBaseModelRepresents a Media Independent Interface (MII) configuration.
Parameters¶
- typeLiteral[“mii”]
Interface type. Defaults to
"mii".- speedint, optional
Highest link speed this interface carries, in megabits per second. Valid values are 10 or 100. Defaults to 100 Mbps. The clock scales with the link rate (25/2.5 MHz), so a port may pair this with a slower MDI.
- modeLiteral[“mac”, “phy”]
Operating mode, either MAC or PHY.
- class RMII¶
Bases:
FLYNCBaseModelRepresents a Reduced Media Independent Interface (RMII) configuration.
Parameters¶
- typeLiteral[“rmii”]
Interface type. Defaults to
"rmii".- speedint, optional
Highest link speed this interface carries, in megabits per second. Valid values are 10 or 100. Defaults to 100 Mbps. The 50 MHz reference clock never slows down; a 10 Mbps link is carried by holding each dibit for 10 clock cycles, so a port may pair this with a slower MDI.
- modeLiteral[“mac”, “phy”]
Operating mode, either MAC or PHY.
- class SGMII¶
Bases:
FLYNCBaseModelRepresents a Serial Gigabit Media Independent Interface (SGMII or SGMII+) configuration.
Parameters¶
- typeLiteral[“sgmii”]
Interface type. Defaults to
"sgmii".- speedint, optional
Highest link speed this interface carries, in megabits per second. Valid values are 10, 100, 1000, or 2500. Defaults to 1000 Mbps. The serdes never slows down; a slower link is carried by repeating each code group (10x at 100 Mbps, 100x at 10 Mbps), so a port may pair this with a slower MDI.
- modeLiteral[“mac”, “phy”]
Operating mode, either MAC or PHY.
- class RGMII¶
Bases:
FLYNCBaseModelRepresents a Reduced Gigabit Media Independent Interface (RGMII) configuration.
Parameters¶
- typeLiteral[“rgmii”]
Interface type. Defaults to
"rgmii".- speedint, optional
Highest link speed this interface carries, in megabits per second. Valid values are 10, 100, or 1000. Defaults to 1000 Mbps. The clock scales with the link rate (125/25/2.5 MHz), so a port may pair this with a slower MDI.
- modeLiteral[“mac”, “phy”]
Operating mode, either MAC or PHY.
- class XFI¶
Bases:
FLYNCBaseModelRepresents a 10-Gigabit Ethernet (10GbE) serial electrical interface (XFI) configuration.
Parameters¶
- typeLiteral[“xfi”]
Interface type. Defaults to “xfi”.
- speedLiteral[10000]
Supported speed in Mbps. Defaults to 10000.
- modeLiteral[“mac”, “phy”]
Operating mode of the interface, either MAC or PHY.
ECU Internal Topology¶
Internal Connection¶
Note
The fields of a connection will be different, depending on the kind of connection.
Types of Internal Connections¶
|
1st Attribute |
2nd Attribute |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- class InternalTopology¶
Bases:
FLYNCBaseModelParameters¶
- connectionslist of
InternalConnectionUnion List of internal connections between ECU components. Defaults to an empty list.
- connectionslist of
- class InternalConnectionUnion¶
Bases:
RootModelUnion type representing a connection between two internal ECU components.
This model wraps a union of different internal connection types and uses the
typefield as a discriminator to determine which specific connection type is present.Possible types¶
ECUPortToSwitchPortConnection from an ECU port to a switch port.
ECUPortToControllerInterfaceConnection from an ECU port to a controller interface.
SwitchPortToControllerInterfaceConnection from a switch port to a controller interface.
SwitchPortToHostControllerInterfaceOn-die connection from a switch’s CPU port to an interface of that switch’s own host controller.
SwitchPortToSwitchPortConnection between two switch ports on the same ECU.
ControllerInterfaceToControllerInterfaceConnection between two controller interfaces.
- class InternalConnection¶
Bases:
FLYNCBaseModelRepresents a base internal connection between two ECU components.
Parameters¶
- typestr
The type of the connection.
- idstr
Unique identifier for the connection.
Private Attributes¶
- _ecu
ECU The ECU object to which this connection belongs. Managed internally.
- class ECUPortToXConnection¶
Bases:
InternalConnectionBase class for connections from an ECU port to another ECU component.
Parameters¶
- ecu_port_namestr
Name of the ECU port (alias:
ecu_port).
Private Attributes¶
- _ecu_port
ECUPort Internal reference to the actual ECU port object. Managed privately.
- class SwitchPortToXConnection¶
Bases:
InternalConnectionBase class for connections from an ECU switch port to another component.
Parameters¶
- switch_port_namestr
Name of the ECU switch port (alias:
switch_port).- switch_namestr, optional
Name of the parent switch that owns
switch_port(alias:switch). Required only when the switch-port name alone is ambiguous within the ECU (i.e. more than one of the ECU’s switches defines a port with the same name). When omitted, the resolver scans all switches in the ECU and raises if the reference is ambiguous.
Private Attributes¶
- _switch_port
SwitchPort Internal reference to the actual switch port object. Managed privately.
- _switch
Switch Internal reference to the parent switch of
_switch_port. Managed privately.
- class ECUPortToSwitchPort¶
Bases:
ECUPortToXConnection,SwitchPortToXConnectionRepresents a connection from an ECU port to a switch port.
Parameters¶
- typeLiteral[“ecu_port_to_switch_port”]
Type of the connection. Defaults to
"ecu_port_to_switch_port".
- class ECUPortToControllerInterface¶
Bases:
ECUPortToXConnection,ControllerInterfaceToXConnectionRepresents a connection from an ECU port to a controller interface.
Parameters¶
- typeLiteral[“ecu_port_to_controller_interface”]
Type of the connection. Defaults to
"ecu_port_to_controller_interface".- iface_namestr
Name of the controller interface (alias:
controller_interface).- controller_namestr, optional
Name of the parent controller that owns
controller_interface(alias:controller). Required only whencontroller_interfacealone is ambiguous within the ECU (i.e. more than one of the ECU’s controllers defines an interface with the same name).
Private Attributes¶
- _iface
ControllerInterface Internal reference to the actual ControllerInterface object. Managed privately.
- _controller
Controller Internal reference to the parent controller of
_iface. Managed privately.
- class SwitchPortToControllerInterface¶
Bases:
SwitchPortToXConnection,ControllerInterfaceToXConnectionRepresents a connection from a switch port to a controller interface.
Parameters¶
- typeLiteral[“switch_port_to_controller_interface”]
Type of the connection. Defaults to
"switch_port_to_controller_interface".
- class SwitchPortToHostControllerInterface¶
Bases:
SwitchPortToXConnectionRepresents the on-die connection between a switch’s CPU port and an Ethernet interface of that same switch’s own host controller.
Unlike
SwitchPortToControllerInterface, this connection models an internal, on-die link — the switch and its host controller sit on the same die/package, so there is no PHY, MII, or cabling involved. No MII/MACsec/gPTP/HTB compatibility checks are performed for this connection type. The referenced interface must belong to the CPU port’s own switch; it can never reference the host controller of a different switch.Parameters¶
- typeLiteral[“switch_port_to_host_controller_interface”]
Type of the connection. Defaults to
"switch_port_to_host_controller_interface".- host_controller_interface_namestr
Name of the Ethernet interface on the switch’s own host controller (alias:
host_controller_interface).
Private Attributes¶
- _iface
EthernetInterface Internal reference to the resolved host-controller interface. Managed privately.
- class SwitchPortToSwitchPort¶
Bases:
SwitchPortToXConnectionRepresents a connection between two switch ports on the same ECU.
Parameters¶
- typeLiteral[“switch_to_switch_same_ecu”]
Type of the connection. Defaults to
"switch_to_switch_same_ecu".- switch2_port_namestr
Name of the second switch port (alias:
switch2_port).- switch2_namestr, optional
Name of the parent switch that owns
switch2_port(alias:switch2). Required only whenswitch2_portalone is ambiguous within the ECU. Mirrors the role ofswitchfor the first port; seeSwitchPortToXConnection.
Private Attributes¶
- _switch2_port
SwitchPort Internal reference to the second switch port object. Managed privately.
- _switch2
Switch Internal reference to the parent switch of
_switch2_port. Managed privately.
- class ControllerInterfaceToControllerInterface¶
Bases:
ControllerInterfaceToXConnectionRepresents a direct connection between two controller interfaces in an ECU.
Parameters¶
- typeLiteral[“controller_interface_to_controller_interface”]
Type of the connection. Defaults to
"controller_interface_to_controller_interface".- iface_namestr
Name of the first controller interface (alias:
controller_interface).- iface2_namestr
Name of the second controller interface (alias:
controller_interface2).- controller2_namestr, optional
Name of the parent controller that owns the second interface (alias:
controller2).
Private Attributes¶
- _iface
ControllerInterface Internal reference to the first controller interface. Managed privately.
- _iface2
ControllerInterface Internal reference to the second controller interface. Managed privately.
- _controller2
Controller Internal reference to the controller that owns the second interface. Managed privately.
MAC Multicast Endpoints¶
- class MACMulticastEndpoints¶
Bases:
FLYNCBaseModelRepresents a collection of multicast endpoints for an ECU.
Parameters¶
- endpointsList[
MACEndpointUnion] List of multicast endpoints associated with the ECU.
- endpointsList[
- class MACEndpointUnion¶
Bases:
RootModelUnion type for MAC multicast endpoints, discriminated by the ‘ethertype’ field.
Possible types¶
AVTPMulticastEndpoint: If ethertype is 0x22F0, the endpoint is treated as an AVTP multicast endpoint.
- class MACMulticastEndpoint¶
Bases:
FLYNCBaseModelRepresents a multicast endpoint that is bound to a specific controller.
Parameters¶
- namestr
Name of the multicast endpoint.
- mac_addressMacAddress
MAC address of the controller that this endpoint is bound to.
- protocolstr
Protocol that is expected on this endpoint.
- ethertypeint, optional
EtherType that is expected on this endpoint (defaults to
None). Must be between 0x0000 and 0xFFFF if provided.- vlan_idint, optional
VLAN ID that is expected on this endpoint (defaults to
None). Must be between 0 and 4095 if provided.- multicast_txlist of MacAddress, optional
List of multicast addresses that this endpoint should transmit to (defaults to
[]). Each address must be a valid multicast MAC address.
- class AVTPMulticastEndpoint¶
Bases:
MACMulticastEndpointRepresents an AVTP multicast endpoint that is bound to a specific controller. This is a specialized version of MACMulticastEndpoint with fixed EtherType and protocol values.
Parameters¶
- ethertypeLiteral[0x22F0]
EtherType for AVTP, fixed to 0x22F0.
- protocolLiteral[“avtp”] | Literal[“AVTP”]
Protocol for AVTP, fixed to “avtp” (case-insensitive).
Multicast Group Memberships¶
Hint
Multicast group memberships of an ECU are computed from several locations of a FLYNC Config. They are stored as a list in the field multicast_groups of an ECU. Mind that these multicast groups are not part of any YAML config, but are accessible fields in a FLYNC workspace.
Receiving nodes are listed in the multicast group membership with the mode “rx”.
These entries are computed from:
MAC, IPv4 or IPv6 addresses in the field multicast of a
VirtualControllerInterface,IPv6 addresses of a
VirtualControllerInterfaceas solicited-node multicast addresses.
Sender nodes are listed in the multicast group membership with the mode “tx”.
These entries are computed from:
IPv4 or IPv6 addresses in the field multicast_tx of a
Socket,MAC addresses in the field multicast_tx of a
MACMulticastEndpoint,IPv6 solicited-node multicast addresses per VLAN.
- class MulticastGroupMembership¶
Bases:
FLYNCBaseModelRepresents a multicast group membership for virtual controller interfaces.
Parameters¶
- group
IPvAnyAddressorMacAddress Multicast group address.
- descriptionstr, optional
Description of the multicast group membership.
- modeLiteral[“tx”] or Literal[“rx”], optional
Mode of multicast group membership.
- vlanint, optional
VLAN ID associated with the multicast group membership. Use
Nonefor untagged.- src_ip
IPvAnyAddress, optional Source IP address. Only applicable for “tx” mode.
- solicited_node_multicastbool, optional
Whether this is a solicited node multicast address (defaults to
False).
- group