FLYNC ReferenceΒΆ
The source is structured in 3 main parts:
Core - Additional functionalities for the model, such as utils, field annotations and validators.
Model - The heart of FLYNC is a pydantic model. Find a comprehensive reference of the model in this section.
SDK - Pythonic API for developers to interact with the project modules and integrating FLYNC capabilities into applications.
Writing a FLYNC configΒΆ
Authoring configurations with FLYNC is fully YAML-based using the extension .flync.yaml.
The built-in loaders and validators expect a specific repository structure that weβll explore in this next section.
Repository Structure for FLYNC configsΒΆ
The root of a FLYNC config repository holds four main parts: System Metadata, Topology, ECUs, and Communication.
Guidelines
For better usability of any FLYNC configuration, the πdirectories, and πfiles are expected to follow a certain structure.
In this section any directory or file with βis mandatory.
Certain files should adhere to naming conventions, so make sure to follow the checklists below. β
System MetadataΒΆ
The system metadata file defines the system context for the configuration, such as platform, system variant, and config release.
πβ system_metadata.flync.yaml
Important
β The file name system_metadata must be respected.
β The file is placed in the root of the config repo.
See also
TopologyΒΆ
This directory describes the interconnections between nodes of the system.
π topology
β
βββ π(β) system_topology.flync.yaml
Important
β The file names system_topology must be respected.
β The files are placed in a directory named topology .
β A system_topology must be defined, if there is more than one ECU in the system.
See also
ECUsΒΆ
The ecus directory contains several sub-directories describing all the ECUs in the system and their configuration. This includes controllers of the ECU, port configuration, switches, and internal topology. All components inside the ECU are described in an internal topology where the structure inside an ECU is defined.
πβ ecus
β
βββ π ecu_1_name
β |
β βββ πβ ports.flync.yaml
β βββ πβ topology.flync.yaml
β βββ πβ ecu_metadata.flync.yaml
β βββ π mac_multicast_endpoints.flync.yaml
β |
β βββ πβ controllers
β β βββ ... (see next section)
β |
β βββ π switches
β βββ π switch1.flync.yaml
β βββ π switch2.flync.yaml
β
βββ π ecu_n_name
βββ ...
Important
β The directory names must be respected: ecus/, controllers/, and switches/
- β The file names must be respected:
ports,topology,ecu_metadataandmac_multicast_endpoints All others are suggested.
See also
Explore the whole ECU config further:
ECUs - ControllersΒΆ
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 described in this section.
Each controller of an ECU is represented as a directory.
Ethernet interfaces are grouped in the sub-directory ethernet_interfaces/, where each interface is its own named directory.
One interface directory consists of:
- an interface configuration
- optionally a sockets/ directory for socket deployments.
πβ ecus
β
βββ π ecu_1_name
|
βββ πβ controllers
β |
β βββ πβ ecu_1_controller_1
| β |
β β βββ πβ controller_metadata.flync.yaml
β β βββ π virtual_switch.flync.yaml
| β |
β β βββ πβ ethernet_interfaces
| β |
β β βββ π interface_1_name
β β β βββ πβ interface_config.flync.yaml
| β | |
β β β βββ π sockets
β β β βββ π socket_someip.flync.yaml
β β β βββ π ...
| β |
β β βββ π interface_n_name
β β βββ ...
| β
β βββ π ecu_1_controller_n
β βββ ...
|
βββ ... (see section above for other ECU config)
Important
β The directory names must be respected: controllers/, ethernet_interfaces/, sockets/.
- β The file names must be respected:
controller_metadataandinterface_config. All others are suggested.
β Each controller is a directory, not a file. The directory name is used as the controller name.
β Each ethernet interface is a directory inside ethernet_interfaces/. The directory name is used as the interface name.
β Sockets are defined per ethernet interface inside the sockets/ sub-directory of that interface.
CommunicationΒΆ
This directory contains several sub-directories and files that describe assets and configurations for communication protocols, such as CAN, LIN, PDU and SOME/IP. This is a non-mandatory directory for the FLYNC configuration. Omit the corresponding sub-folder entirely when the system does not use that channel type.
π communication
β
βββ π tcp_profiles.flync.yaml
β
βββ π channels
| |
| βββ π can
| β βββ π example_can.flync.yaml
| β βββ π ...
| |
| βββ π lin
| β βββ π example_lin.flync.yaml
| β βββ π ...
| |
| βββ π ethernet_pdu_containers
| β βββ π example_container.flync.yaml
| β βββ π ...
| |
| βββ π pdu
| β βββ π example_pdu.flync.yaml
| β βββ π ...
β
βββ π someip
|
βββ π services
β βββ π someip_service.flync.yaml
β βββ π ...
|
βββ π sd_config.flync.yaml
Important
β If this directory is added, namings of sub-directories must be respected.
β Each CAN or CAN-FD bus is defined in its own file inside channels/can.
β Each LIN Bus is defined in its own file inside channels/lin.
β Each Eth PDU Container is defined in its own file inside channels/ethernet_pdu_containers.
β Each PDU is defined in its own file inside channels/pdu.
See also
Explore the whole communication config further:
Validate your configurationΒΆ
After writing your FLYNC config you can use the CLI to validate it.
flync validate --help