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 General.

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

SystemMetadata

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

System Topology

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_metadata and mac_multicast_endpoints

All others are suggested.

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_metadata and interface_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.

See also

Explore the whole Controller config further:

GeneralΒΆ

This directory contains several sub-directories and files that describe assets and configurations for the whole system, such as TCP profiles or SOME/IP services. This is a non-mandatory directory for the FLYNC configuration.

πŸ“‚ general
β”‚
β”œβ”€β”€ πŸ“„ tcp_profiles.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.

See also

Explore the whole ECU config further:

Validate your configurationΒΆ

After writing your FLYNC config you can use this helper script from the FLYNC SDK to validate it.

python3 src/flync/sdk/helpers/validate_workspace.py --help