Common Use Cases

Note

The commands in the guide will use the flync_example directory. Try it out or update the path accordingly to your config path!

Setting a default workspace for a session

Every command’s path argument is optional: store a workspace once and omit it afterwards:

flync config set examples/flync_example
flync info ecus
flync validate

An explicit path always overrides the stored one. Use flync config show to see what is stored, and flync config clear to forget it.

Validate a workspace

flync validate examples/flync_example

CI/CD workspace validation

Run validation as a pipeline gate to catch configuration errors early:

flync validate examples/flync_example

Validate a node

Use –node or -n to validate just a part of a config such as an ECU directory, a SOME/IP config, a Switch config, etc. :

flync validate --node ECU examples/flync_example/ecus/eth_ecu
flync validate -n Switch examples/flync_example/ecus/high_performance_compute/switches/hpc_switch1/switch.flync.yaml

Debugging a workspace that fails to validate

Use --verbose to run the layered checks (folder structure, YAML syntax, schema, field values, system-wide) and see exactly where a workspace breaks:

flync validate examples/flync_example --verbose

Inspect ECUs in a workspace

flync info ecus examples/flync_example

Auditing IP address assignments

List every IP address across every ECU, with its VLAN and subnet, to spot conflicts:

flync info ip examples/flync_example

Use -e or –ecu-name to inspect a specific ECU:

flync info ip -e eth_ecu examples/flync_example

Reviewing socket endpoints

List socket endpoints grouped by ECU and VLAN, with their interface, MAC, IP, protocol and port:

flync info sockets examples/flync_example

Reviewing VLAN membership

Show VLAN membership grouped by VLAN, across the workspace or filtered to one VLAN or ECU:

flync info vlans examples/flync_example --vlan-id 10

Debugging SOME/IP service deployments

List every SOME/IP service with its ID, version, and providing/consuming ECUs:

flync info services examples/flync_example

Identify which ECUs provide or consume one specific service instance and verify IP/port configuration, by service ID and major version:

flync info instances 0x0101 1 examples/flync_example

Generating topology documentation

Produce a PlantUML diagram of the full ethernet topology for documentation or review:

flync generate-system-uml examples/flync_example --output topology.puml

Exporting the expected filetree

Export the expected filetree of a FLYNC configuration (or one of its model sub-trees) to a txt file:

flync filetree
flync filetree --class ecu

Exporting the JSON Schema

Export the FLYNC model as JSON Schema (draft 2020-12), with one file per Pydantic model class (ECU, Controller, EthernetInterface, …) plus one per enum. FLYNCModel.schema.json describes a whole workspace and is the entry point; every other file is named after its class and referenced with "$ref": "<ClassName>.schema.json":

flync schema schemas
flync schema schemas --mode serialization
flync schema schemas --base-uri https://example.com/flync/schemas

Registering a new error

Get the next free number, then add it (with a category) at the factory call site:

flync errors get-next-number
raise err_major("Port {name} is invalid.", category=Category.VALUE_RANGE, error_number="175")

Keeping the error catalog in sync

Check the code against the catalog, then regenerate it:

flync errors validate-catalog
flync errors generate-catalog