FLYNC Model

Hint

The main entry point for any FLYNC Model is this class.

Expand for Schematic
        classDiagram

    class VLANEntry {
        name: str
        id: int
        default_priority: int
        ports: list[str]
        multicast: list[MulticastGroup] | None = []
    }

    class NamingStrategy {
        <<Enumeration>>
        AUTO: int = 0
        FIELD_NAME: int = 0
        FIXED_PATH: int = 1
    }

    class OutputStrategy {
        <<Enumeration>>
        AUTO: int = 1
        FOLDER: int = 1
        SINGLE_FILE: int = 2
        OMMIT_ROOT: int = 4
        FIXED_ROOT: int = 8
    }

    class FLYNCModel {
        general: FLYNCGeneralConfig | None = None
        ecus: list[ECU]
        topology: FLYNCTopology
        metadata: SystemMetadata
    }

    class FLYNCTopology {
        system_topology: SystemTopology
    }

    class ECU {
        name: str
        ports: list[ECUPort] = list
        controllers: list[Controller]
        switches: list[Switch] | None = list
        topology: InternalTopology
        ecu_metadata: ECUMetadata
        mac_multicast_endpoints: MACMulticastEndpoints | None = None
        multicast_groups: list[MulticastGroupMembership] | None = list
    }

    class SystemMetadata {
        type: Literal['system'] = 'system'
        author: str
        compatible_flync_version: BaseVersion
        extensions: dict[str, str] | None = None
        oem: str | None = None
        platform: str | None = None
        variant: str | None = None
        release: BaseVersion
    }

    class ECUPort {
        name: str
        mdi_config: BASET1 | BASET1S | BASET = BASET1
        mii_config: MII | RMII | SGMII | RGMII | XFI | None = None
    }

    class FLYNCBaseModel {
    }

    class FLYNCGeneralConfig {
        tcp_profiles: list[TCPOption] = []
        someip_config: SOMEIPConfig | None = None
        channels: FLYNCChannelConfig | None = None
    }

    class VirtualControllerInterface {
        name: str
        vlanid: int | None = None
        addresses: list[IPv6AddressEndpoint | IPv4AddressEndpoint]
        multicast: list[IPvAnyAddress | MacAddress] | None = []
    }

    class MulticastGroup {
        address: IPvAnyAddress | MacAddress
        ports: list[str]
    }

    ECU ..> ECUPort
    ECU ..> InternalTopology
    ECU ..> Controller
    ECU ..> ECUMetadata
    ECU ..> MulticastGroupMembership
    ECU ..> MACMulticastEndpoints
    ECU ..> Switch
    ECUPort ..> BASET1S
    ECUPort ..> SGMII
    ECUPort ..> BASET1
    ECUPort ..> BASET
    ECUPort ..> RGMII
    ECUPort ..> XFI
    ECUPort ..> MII
    ECUPort ..> RMII
    MulticastGroup ..> IPvAnyAddress
    MulticastGroup ..> MacAddress
    VirtualControllerInterface ..> IPv6AddressEndpoint
    VirtualControllerInterface ..> IPv4AddressEndpoint
    VirtualControllerInterface ..> IPvAnyAddress
    VirtualControllerInterface ..> MacAddress
    VLANEntry ..> MulticastGroup
    FLYNCGeneralConfig ..> TCPOption
    FLYNCGeneralConfig ..> FLYNCChannelConfig
    FLYNCGeneralConfig ..> SOMEIPConfig
    SystemMetadata ..> BaseVersion
    FLYNCTopology ..> SystemTopology
    FLYNCModel ..> FLYNCTopology
    FLYNCModel ..> ECU
    FLYNCModel ..> SystemMetadata
    FLYNCModel ..> FLYNCGeneralConfig


    
class FLYNCModel

Bases: FLYNCBaseModel

Represents the top-level FLYNC configuration model for a system.

This model aggregates all ECUs, system topology, metadata, and general configuration settings for the entire system.

Parameters

ecuslist of ECU

List of ECU definitions included in the system.

topologyFLYNCTopology

The system-wide topology including external ECU connections and optional multicast paths.

metadataSystemMetadata

System-level metadata including OEM, platform, and hardware/software information.

generalFLYNCGeneralConfig, optional

Optional general configuration settings applicable system-wide.

classmethod skip_broken_ecus(data)

Remove None ECUs from the list before validation.

When an ECU file fails to load the workspace inserts None into the ecus list. JErrors are already reported at the ECU level, so the None entries are silently dropped here to prevent a cascade of FLYNCModel-level errors for the same root cause.

model_post_init(context)

Perform post-initialization processing after the model is created.

Following steps are performed:

  1. Populate the solicited-node RX multicast group memberships for each IPv6 address configured in any ECU.

  2. Populate the solicited-node TX multicast group memberships for each ECU based on the RX entries for the same multicast group and VLAN.

validate_unique_ips()

Validate all IPs are unique system wide

validate_unique_macs()

Validate all MACs are unique system wide

get_all_ecus()

Return a list of all ECU names.

get_ecu_by_name(ecu_name: str)

Retrieve an ECU by name.

get_all_controllers()

Return a list of all controllers in all ECUs.

get_all_ecu_ports() List[ECUPort]

Return a list of all ECU ports

get_all_interfaces_names()

Return all the controller interface names

get_interfaces_for_ecu(ecu_name: str)

Return a list of all interfaces for a given ECU.

get_system_topology_info()

Return system topology details.

model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Multicasting

See also

Multicast Group Memberships are dynamically collected per-ECU. Go to ECU Multicast Group Memberships to understand how they are populated.

On system-level these Multicast Groups are then validated:

  1. For a multicast group, at least one TX node is expected.

  2. A tx node must reach all rx nodes of the group.

Hint

After successful validation of the Multicast Groups, the switch config is automatically updated with the relevant group entries in the respective VLANEntry.