FLYNC Model

Hint

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

Expand for Schematic
        classDiagram

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

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

    class FLYNCBaseModel {
    }

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

    class FLYNCTopology {
        system_topology: SystemTopology
    }

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

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

    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 FLYNCGeneralConfig {
        tcp_profiles: list[TCPOption] = []
        someip_config: SOMEIPConfig | None = None
    }

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

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

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

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


    
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.

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

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.