FLYNC Model¶
Hint
The main entry point for any FLYNC Model is this class.
- class FLYNCModel¶
Bases:
FLYNCBaseModelRepresents the top-level FLYNC configuration model for a system.
This model aggregates all ECUs, system topology, metadata, and communication configuration settings for the entire system.
Parameters¶
- appslist of
App, optional Applications of the system.
- ecuslist of
ECU List of ECU definitions included in the system.
- topology
FLYNCTopology The system-wide topology including external ECU connections and optional multicast paths.
- metadata
SystemMetadata System-level metadata including OEM, platform, and hardware/software information.
- communication
FLYNCCommunicationConfig, optional Optional communication configuration settings applicable system-wide.
- classmethod warn_experimental(data)¶
Experimental Classes
- classmethod default_absent_topology(data)¶
Treat an absent
topology/folder as the default (empty) topology for a CAN/LIN-only workspace.When no topology folder exists the workspace loader supplies
Nonefortopology; drop the key so thedefault_factorybuilds an emptyFLYNCTopology(with no ethernet topology) instead of raising a misleading “input should be a valid dictionary” error.
- 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:
Populate the solicited-node RX multicast group memberships for each IPv6 address configured in any ECU.
Populate the solicited-node TX multicast group memberships for each ECU based on the RX entries for the same multicast group and VLAN.
- require_ethernet_topology_when_used()¶
The ethernet topology (
topology/system_topology.flync.yaml) is optional, but system-wide features that rely on inter-ECU Ethernet connectivity (cross-ECU multicast, SOME/IP multicast) cannot be validated without it. Raise instead of silently skipping those checks.
- validate_unique_ips()¶
Validate all IPs are unique system wide
- validate_no_someip_multicast_on_tcp()¶
Validate that no SOME/IP eventgroup multicast is configured on a TCP socket.
TCP is a point-to-point transport, so it cannot carry the eventgroup multicast of a provided service - that deployment belongs on a UDP socket.
- validate_unique_macs()¶
Validate all MACs are unique system wide
- validate_bus_interface_frame_refs()¶
Workspace-level bus interface pass: every CAN / LIN interface names a declared bus of its own kind and resolves its frame refs.
- validate_forwarders()¶
Workspace-level forwarder/deployment pass: ref resolution, same-controller locality + direction safety, and cycle detection.
- validate_service_refs_in_apps()¶
Validate that applications are referencing existing services.
- validate_app_refs_in_controller_bindings()¶
Validate that app_bindings of ecu controllers are referencing existing apps.
- validate_state_management_groups()¶
Workspace-level state management pass: group refs, derived member sets, NM PDU binding, and reachability.
- build_and_validate_bus_topologies()¶
Derive the system-wide CAN/LIN bus topology from bus definitions and ECU interfaces, then validate it.
- get_can_bus_topology(bus_name: str) CANBusTopology | None¶
Return the derived CAN bus topology for
bus_name, orNoneif unknown.
- get_lin_bus_topology(bus_name: str) LINBusTopology | None¶
Return the derived LIN bus topology for
bus_name, orNoneif unknown.
- 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_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_ethernet_topology_info()¶
Return ethernet topology details, or
Noneif no ethernet topology is defined.
- validate_multicast_someip()¶
Validate multicast configuration for SOME/IP consumers and providers
For provider: check if the parent socket has a multicast_tx entry
Defined after
resolve_someip_deployments(): the message identifies the offending service through_service_ref, which only exists once the deployments have been bound.
- get_all_someip_services() List[SOMEIPServiceInterface]¶
Return all SOME/IP service interfaces declared in the system-wide someip_config.
- get_all_pdu_forwarders() List[PDUForwarder]¶
Return every PDUForwarder declared on any socket across all ECUs.
- get_all_can_frame_forwarders() List[CANFrameForwarder]¶
Return every CANFrameForwarder declared on any CAN interface across all ECUs.
- model_config = {'extra': 'forbid', 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- appslist of
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:
For a multicast group, at least one TX node is expected.
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.