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.
- 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 Ethernet interfaces of the controller.
- virtual_switch:
VirtualSwitch Represents a software switch inside a controller in case there are more than one interface or virtual machines/ compute nodes.
- 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¶
- _type:
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.
sockets: optional list of
SocketContainerPrivate 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 CAN and LIN).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
IPv4AddressorIPv6Addressor str, optional Allowed multicast addresses.
- class ComputeNodes¶
Bases:
FLYNCBaseModelWARNING: ComputeNode is currently experimental! Subject to change, please use with care.
A virtual machine (VM) attached to a controller interface.
Compute nodes are VMs that run on the same SoC as the controller. Each compute node has its own MAC address and one or more virtual interfaces (VLANs). Traffic between a compute node and the physical network is forwarded through the
VirtualSwitchdefined on the parentController— the Virtual Switch acts as a software MAC bridge that connects compute nodes to the controller interface and to each other.Network features such as PTP, MACsec, ingress stream policing, and traffic shaping can be configured either on the parent
EthernetInterfaceConfigor offloaded to individual compute nodes, but not on both simultaneously.Parameters¶
- namestr
Name of the compute node / VM.
- mac_address
MacAddress, optional MAC address of the compute node in standard notation.
- virtual_interfaceslist of
VirtualControllerInterface One or more VLAN-tagged virtual interfaces exposed by this compute node.
- ptp_config
PTPConfig, optional Precision Time Protocol configuration (offloaded from the interface).
- macsec_config
MACsecConfig, optional MACsec configuration (offloaded from the interface).
- firewall
Firewall, optional Firewall configuration for this compute node.
- htb
HTBInstance, optional Hierarchical Token Bucket (HTB) egress shaping configuration.
- ingress_streamslist of
Stream, optional IEEE 802.1Qci ingress stream policing configuration.
- traffic_classeslist of
TrafficClass, optional Traffic class definitions and egress queue shaping configuration.
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 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.
- 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.
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¶
Virtual Switch¶
- class VirtualSwitch¶
Bases:
FLYNCBaseModelWARNING: VirtualSwitch is currently experimental! Subject to change, please use with care.
A software MAC bridge inside a controller.
The Virtual Switch is the connectivity fabric that ties together the controller’s physical interfaces and their compute nodes. It must be defined on the
Controllerwhenever compute nodes are present or when multiple interfaces need to exchange traffic at Layer 2.Each
VirtualSwitchPortreferences either anEthernetInterfaceor aComputeNodesby name. VLANs defined on the bridge control which ports share broadcast domains, mirroring the role of VLANs on a hardware switch.Parameters¶
- namestr
Name of the Virtual Switch instance.
- portslist of
VirtualSwitchPort Ports of the virtual switch, each referencing a controller interface or compute node.
- vlanslist of
VLANEntry VLAN membership table: defines which ports belong to each VLAN and therefore which nodes can communicate at Layer 2.
- class VirtualSwitchPort¶
Bases:
FLYNCBaseModelA port on the
VirtualSwitch, referencing a connected node by name.Each port is bound to either an
EthernetInterfaceor aComputeNodesinstance. Thenode_connectedname must match thenamefield of one of those objects within the same controller.Parameters¶
- namestr
Name of the port.
- node_connectedstr
Name of the connected
EthernetInterfaceorComputeNodes.
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
IPv4MulticastorIPv6Multicast, 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¶
SOMEIPServiceConsumerorSOMEIPServiceProviderorSOMEIPSDDeploymentorPDUSenderorPDUReceiverorPDUForwarder
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.
- class Switch¶
Bases:
FLYNCBaseModelRepresents an automotive Ethernet network switch configuration.
Parameters¶
- meta
EmbeddedMetadata Metadata associated with the switch, such as vendor-specific or implementation-specific attributes.
- namestr
Name of the switch.
- portslist of
SwitchPort List of external (connected to ECU ports) or internal (connected to internal ECU interfaces) switch ports.
- vlanslist of
VLANEntry List of VLAN entries configured on the switch.
- host_controller
EthernetInterfaceConfig, optional Internal controller interface that manages the switch.
- tcam_ruleslist of
TCAMRule, optional List of TCAM rules configured on the switch. These rules define packet-matching conditions and associated actions applied to ingress or egress traffic.
- 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).
- default_vlan_idint
VLAN ID to be added to an untagged frame ingressing on the port. 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.
- idStrictInt
Unique TCAM rule ID.
- match_filter
FrameFilter Packet-matching filter for layer-based matching on MAC/IP/VLAN/ports. Mutually exclusive with
frame_mask. Eithermatch_filterorframe_maskmust be provided.- frame_mask
FrameMask, optional Packet-matching criterion for byte-level pattern matching on raw frame data. Mutually exclusive with
match_filter. Eithermatch_filterorframe_maskmust be provided.- 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.- vehicle_stateint, optional
Vehicle-state value (0-255) the rule is matched against. The rule applies only when
(current_state & vehicle_state_mask) == vehicle_state.None(default) means the rule is not gated on vehicle state.- vehicle_state_maskint, optional
Bitmask (1-255) selecting which bits of the vehicle-state register are significant. Defaults to
0xFF(all bits) whenvehicle_stateis set but no mask is given. Must not be set on its own withoutvehicle_state.
- class FrameMask¶
Bases:
FLYNCBaseModelByte-level pattern matching of an Ethernet frame. The inspectable frame window defaults to 96 bytes but may be overwritten with
frame_window.The rule matches frames by comparing raw byte patterns at a specific offset. The
maskcontrols which bits are checked: only bits set to 1 in the mask are significant for the comparison. Bits set to 0 in the mask are ignored.For example, a frame at byte offset 12 matches if
(frame[12:14] & mask) == (data & mask).Parameters¶
- offsetint
Byte position in the frame where the pattern match begins. Must be 0 to [frame_window - 1] to stay within the inspectable window. For example, offset=12 starts matching at the 13th byte (after MAC and EtherType headers).
- datastr
Expected byte pattern. Input format must be a quoted string to prevent serialization mismatches and loss of leading zeros. The string can represent either:
a hexadecimal value
"0x0800"(normalized to upper-case with a 0x prefix)binary representation like
"0101010101010101"(stored in verbatim).
- maskstr
Bitmask controlling which bits to check. Accepts the very same input formats as
dataand must describe the same number of bytes.- frame_windowint, Optional
Maximum number of leading frame bytes a
FrameMaskmay inspect. Defaults to 96.
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
Indicates whether autonegotiation is enabled.
- 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
Indicates whether autonegotiation is enabled.
- class BASET1S¶
Bases:
FLYNCBaseModelRepresents a BASE-T1S Ethernet interface configuration.
Parameters¶
- modeLiteral[“base_t1s”]
Interface mode. Defaults to
"base_t1s".- speedint
Supported link speed in megabits per second. Defaults to 10.
- duplexLiteral[“half”]
Duplex mode. Defaults to
"half".- roleLiteral[“master”, “slave”]
Role of the PHY, either master or slave.
- autonegotiationbool
Indicates whether autonegotiation is enabled.
Media-Independent Interfaces¶
- class MII¶
Bases:
FLYNCBaseModelRepresents a Media Independent Interface (MII) configuration.
Parameters¶
- typeLiteral[“mii”]
Interface type. Defaults to
"mii".- speedint
Supported link speed in megabits per second. Valid values are 10 or 100.
- 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
Supported link speed in megabits per second. Valid values are 10 or 100.
- 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
Supported link speed in megabits per second. Valid values are 10, 100, 1000, or 2500. Defaults to 1000 Mbps.
- 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
Supported link speed in megabits per second. Valid values are 10, 100, or 1000. Defaults to 1000 Mbps.
- 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.
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.
- component1_namestr, optional
Name of the first component in the connection.
- component2_namestr, optional
Name of the second component in 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 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).
Private Attributes¶
- _iface
ControllerInterface Internal reference to the first controller interface. Managed privately.
- _iface2
ControllerInterface Internal reference to the second controller 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.
- ethertypeOptional[int]
EtherType that is expected on this endpoint. Must be between 0x0000 and 0xFFFF if provided.
- vlan_idOptional[int]
VLAN ID that is expected on this endpoint. Must be between 0 and 4095 if provided.
- multicast_txOptional[List[MacAddress]]
List of multicast addresses that this endpoint should transmit 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, and additional validation to ensure that multicast addresses are within the AVTP range.
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¶
- groupIPv4Multicast or IPv6Multicast or MACAddressMulticast
Multicast group address.
- descriptionstr, optional
Description of the multicast group membership.
- mode“tx” or “rx”, optional
Mode of multicast group membership.
- vlanint, optional
VLAN ID associated with the multicast group membership. Use
Nonefor untagged.- src_ipstr, optional
Source IP address. Only applicable for “tx” mode.