# larsvoelker/fibexconverter architecture

> Architecture diagram of the GitHub repository larsvoelker/fibexconverter, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/larsvoelker/fibexconverter
- Repository: https://github.com/larsvoelker/fibexconverter

## Overview

1. **Repository purpose**
   FibexConverter is a Python 3 toolchain for reading **FIBEX 4** XML files that describe SOME/IP-related network/configuration data, then transforming that input into several downstream artifacts: plain text, topology views, Wireshark config files, CSV reports, and Peach-related output.

2. **Primary pipeline**
   The architecture is a simple one-way conversion flow:
   **FIBEX XML input** → **parser layer** → **shared configuration/model objects** → **format-specific exporters** → **files in an output directory**.
   The same parsed model is reused by all exporters, which keeps the output formats decoupled from parsing.

3. **Parsing subsystem**
   `fibex_parser.py` is the concrete FIBEX parser implementation.
   `abstract_parser.py` defines the parser contract/behavior expected by the rest of the system.
   `parser_dispatcher.py` acts as the routing layer that selects the right parser for a given input type such as `FIBEX`.
   This separation makes the parser swappable and gives the repo a plugin-friendly entry point.

4. **Shared domain/configuration layer**
   `configuration_base_classes.py` contains the core configuration/data abstractions that sit between parsing and export.
   These classes are the main boundary in the system: parsers populate them, exporters consume them, and tests validate their behavior.
   For an architecture diagram, this layer is the central “in-memory model” of the application.

5. **Export/output generators**
   Each `configuration_to_*.py` file is a separate conversion frontend targeting a specific artifact:
   - `configuration_to_text.py` for human-readable text
   - `configuration_to_topology.py` for topology-oriented output
   - `configuration_to_wireshark_config.py` for Wireshark configuration files
   - `configuration_to_reports.py` for CSV-style reporting
   - `configuration_to_peach.py` for Peach-related generation
   These scripts are not alternate parsers; they are alternate renderers over the same parsed configuration model.

6. **Wireshark integration boundary**
   The Wireshark exporter is especially important architecturally because it produces a directory of config files that are meant to be copied into Wireshark’s user config location.
   The README notes SOME/IP support in Wireshark 3.2+, which implies the generated files are intended to feed Wireshark’s runtime behavior rather than merely document the config.

7. **Plugin/extension point**
   `plugins/example_fibex_parser_plugin.py` indicates the parser subsystem can be extended externally or customized.
   This suggests a loose plugin boundary around parsing, likely used to adapt FIBEX handling without changing the exporter layer.

8. **Command-line entry points**
   The repository is organized as a set of direct Python scripts rather than a single monolithic app.
   Each `configuration_to_*.py` file can be invoked from the command line with a parser type like `FIBEX` plus an input XML file, making the workflow script-driven and batch-friendly.

9. **Test architecture**
   Tests are organized with `pytest` and cover both unit-level and real-file behavior.
   The suite includes tests for the abstract parser, configuration base classes, parser dispatcher, FIBEX parsing, and multiple output formats.
   `tests/fibex_files/` provides representative XML fixtures, including `someip_service.xml` and `ethernet_topology.xml`, which show the tool’s focus on realistic protocol/configuration data.

10. **Repository support and automation**
    `requirements.txt` and `tests/requirements.txt` separate runtime and test dependencies.
    `.github/workflows/push_and_pr.yaml` suggests CI runs on pushes and pull requests.
    `local_checkers.sh` implies local validation mirrors CI behavior, which is useful when diagramming the repo’s operational boundaries.

11. **Practical architecture summary**
    The core design is: **one parser layer, one shared model layer, many output-specific renderers**.
    That means the critical dependency direction is inward from format-specific scripts to the common configuration model, and then outward to generated artifacts.
    For an architecture diagram, the key boxes are: **input XML**, **dispatcher/parser**, **configuration model**, **exporters**, and **filesystem outputs**.

Main entry points: [`configuration_base_classes.py`](https://github.com/larsvoelker/fibexconverter/blob/master/configuration_base_classes.py) (Config model), [`tests/fibex_files/someip_service.xml`](https://github.com/larsvoelker/fibexconverter/blob/master/tests/fibex_files/someip_service.xml) (FIBEX fixtures), [`parser_dispatcher.py`](https://github.com/larsvoelker/fibexconverter/blob/master/parser_dispatcher.py) (Dispatcher), [`fibex_parser.py`](https://github.com/larsvoelker/fibexconverter/blob/master/fibex_parser.py) (FIBEX parser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_g_core["Core pipeline"]
  node_input_xml["FIBEX XML<br/>source"]
  node_parser_dispatcher["Dispatcher<br/>routing layer"]
  node_abstract_parser["Parser API<br/>contract<br/>[abstract_parser.py]"]
  node_fibex_parser["FIBEX parser<br/>xml parser<br/>[fibex_parser.py]"]
  node_config_model[("Config model<br/>shared domain model")]
  node_text_exporter["Text export<br/>renderer"]
  node_topology_exporter["Topology export<br/>renderer"]
  node_wireshark_exporter["Wireshark export<br/>renderer"]
  node_reports_exporter["Reports export<br/>renderer"]
  node_peach_exporter["Peach export<br/>renderer"]
  node_output_files["Output files<br/>filesystem artifacts"]
end

subgraph group_g_support["Support"]
  node_plugin_example["Example plugin<br/>parser plugin"]
  node_ci_workflow["CI workflow<br/>automation<br/>[push_and_pr.yaml]"]
  node_local_checks["Local checks<br/>script<br/>[local_checkers.sh]"]
end

subgraph group_g_tests["Tests"]
  node_tests_parsers["Parser tests<br/>pytest suite"]
  node_tests_model["Model tests<br/>pytest suite"]
  node_tests_exports["Export tests<br/>pytest suite"]
  node_fixtures["FIBEX fixtures<br/>test data<br/>[someip_service.xml]"]
end

node_input_xml -->|"select parser"| node_parser_dispatcher
node_parser_dispatcher -->|"implements"| node_abstract_parser
node_parser_dispatcher -->|"loads"| node_fibex_parser
node_fibex_parser -->|"populate"| node_config_model
node_config_model -->|"consume"| node_text_exporter
node_config_model -->|"consume"| node_topology_exporter
node_config_model -->|"consume"| node_wireshark_exporter
node_config_model -->|"consume"| node_reports_exporter
node_config_model -->|"consume"| node_peach_exporter
node_text_exporter -->|"write"| node_output_files
node_topology_exporter -->|"write"| node_output_files
node_wireshark_exporter -->|"write"| node_output_files
node_reports_exporter -->|"write"| node_output_files
node_peach_exporter -->|"write"| node_output_files
node_plugin_example -.->|"extends"| node_fibex_parser
node_ci_workflow -.->|"runs"| node_tests_parsers
node_local_checks -.->|"mirrors"| node_tests_exports
node_fixtures -->|"feeds"| node_tests_parsers
node_fixtures -->|"feeds"| node_tests_exports
node_fixtures -->|"feeds"| node_tests_model

click node_parser_dispatcher "https://github.com/larsvoelker/fibexconverter/blob/master/parser_dispatcher.py"
click node_abstract_parser "https://github.com/larsvoelker/fibexconverter/blob/master/abstract_parser.py"
click node_fibex_parser "https://github.com/larsvoelker/fibexconverter/blob/master/fibex_parser.py"
click node_config_model "https://github.com/larsvoelker/fibexconverter/blob/master/configuration_base_classes.py"
click node_text_exporter "https://github.com/larsvoelker/fibexconverter/blob/master/configuration_to_text.py"
click node_topology_exporter "https://github.com/larsvoelker/fibexconverter/blob/master/configuration_to_topology.py"
click node_wireshark_exporter "https://github.com/larsvoelker/fibexconverter/blob/master/configuration_to_wireshark_config.py"
click node_reports_exporter "https://github.com/larsvoelker/fibexconverter/blob/master/configuration_to_reports.py"
click node_peach_exporter "https://github.com/larsvoelker/fibexconverter/blob/master/configuration_to_peach.py"
click node_plugin_example "https://github.com/larsvoelker/fibexconverter/blob/master/plugins/example_fibex_parser_plugin.py"
click node_ci_workflow "https://github.com/larsvoelker/fibexconverter/blob/master/.github/workflows/push_and_pr.yaml"
click node_local_checks "https://github.com/larsvoelker/fibexconverter/blob/master/local_checkers.sh"
click node_tests_parsers "https://github.com/larsvoelker/fibexconverter/blob/master/tests/test_abstract_parser.py"
click node_tests_model "https://github.com/larsvoelker/fibexconverter/blob/master/tests/test_configuration_base_classes.py"
click node_tests_exports "https://github.com/larsvoelker/fibexconverter/blob/master/tests/test_configuration_to_text.py"
click node_fixtures "https://github.com/larsvoelker/fibexconverter/blob/master/tests/fibex_files/someip_service.xml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_input_xml,node_parser_dispatcher,node_abstract_parser,node_fibex_parser,node_config_model,node_text_exporter,node_topology_exporter,node_wireshark_exporter,node_reports_exporter,node_peach_exporter,node_output_files toneBlue
class node_plugin_example,node_ci_workflow,node_local_checks toneAmber
class node_tests_parsers,node_tests_model,node_tests_exports,node_fixtures toneMint
```

## Components

### Core pipeline

Parsing, shared model, and export flow

- **FIBEX XML**: source · Input network/configuration XML files
- [Dispatcher](https://github.com/larsvoelker/fibexconverter/blob/master/parser_dispatcher.py): routing layer · Selects a parser for the given input type · `parser_dispatcher.py`
- [Parser API](https://github.com/larsvoelker/fibexconverter/blob/master/abstract_parser.py): contract · Defines the parser behavior expected by the system · `abstract_parser.py`
- [FIBEX parser](https://github.com/larsvoelker/fibexconverter/blob/master/fibex_parser.py): xml parser · Concrete parser for FIBEX 4 files · `fibex_parser.py`
- [Config model](https://github.com/larsvoelker/fibexconverter/blob/master/configuration_base_classes.py): shared domain model · In-memory configuration objects shared by parsers and exporters · `configuration_base_classes.py`
- [Text export](https://github.com/larsvoelker/fibexconverter/blob/master/configuration_to_text.py): renderer · Generates human-readable text output · `configuration_to_text.py`
- [Topology export](https://github.com/larsvoelker/fibexconverter/blob/master/configuration_to_topology.py): renderer · Generates topology-oriented output · `configuration_to_topology.py`
- [Wireshark export](https://github.com/larsvoelker/fibexconverter/blob/master/configuration_to_wireshark_config.py): renderer · Generates Wireshark configuration files and directories · `configuration_to_wireshark_config.py`
- [Reports export](https://github.com/larsvoelker/fibexconverter/blob/master/configuration_to_reports.py): renderer · Generates CSV-style reports · `configuration_to_reports.py`
- [Peach export](https://github.com/larsvoelker/fibexconverter/blob/master/configuration_to_peach.py): renderer · Generates Peach-related output · `configuration_to_peach.py`
- **Output files**: filesystem artifacts · Generated artifacts written to an output directory

### Support

Plugins and repository automation

- [Example plugin](https://github.com/larsvoelker/fibexconverter/blob/master/plugins/example_fibex_parser_plugin.py): parser plugin · Shows how the parser layer can be extended externally · `plugins/example_fibex_parser_plugin.py`
- [CI workflow](https://github.com/larsvoelker/fibexconverter/blob/master/.github/workflows/push_and_pr.yaml): automation · GitHub Actions checks for pushes and pull requests · `.github/workflows/push_and_pr.yaml`
- [Local checks](https://github.com/larsvoelker/fibexconverter/blob/master/local_checkers.sh): script · Local validation script mirroring CI behavior · `local_checkers.sh`

### Tests

Pytest coverage and fixtures

- [Parser tests](https://github.com/larsvoelker/fibexconverter/blob/master/tests/test_abstract_parser.py): pytest suite · Tests for parser contracts, dispatch, and FIBEX parsing · `tests/test_abstract_parser.py`
- [Model tests](https://github.com/larsvoelker/fibexconverter/blob/master/tests/test_configuration_base_classes.py): pytest suite · Tests for shared configuration base classes · `tests/test_configuration_base_classes.py`
- [Export tests](https://github.com/larsvoelker/fibexconverter/blob/master/tests/test_configuration_to_text.py): pytest suite · Tests for text, topology, Wireshark, reports, and Peach generation · `tests/test_configuration_to_text.py`
- [FIBEX fixtures](https://github.com/larsvoelker/fibexconverter/blob/master/tests/fibex_files/someip_service.xml): test data · Representative XML inputs used by the test suite · `tests/fibex_files/someip_service.xml`

## Connections

- FIBEX XML → Dispatcher: select parser · Input XML is routed to the appropriate parser
- Dispatcher → Parser API: implements · Dispatcher works against the parser contract
- Dispatcher → FIBEX parser: loads · Dispatches FIBEX input to the concrete parser
- FIBEX parser → Config model: populate · Parser builds the shared configuration objects
- Config model → Text export: consume · Text renderer reads the shared model
- Config model → Topology export: consume · Topology renderer reads the shared model
- Config model → Wireshark export: consume · Wireshark renderer reads the shared model
- Config model → Reports export: consume · Reports renderer reads the shared model
- Config model → Peach export: consume · Peach renderer reads the shared model
- Text export → Output files: write · Produces files in the output directory
- Topology export → Output files: write · Produces topology artifacts
- Wireshark export → Output files: write · Produces Wireshark config files and directories
- Reports export → Output files: write · Produces report artifacts
- Peach export → Output files: write · Produces Peach artifacts
- Example plugin → FIBEX parser: extends · Example plugin demonstrates parser extensibility
- CI workflow → Parser tests: runs · CI executes the test suite
- Local checks → Export tests: mirrors · Local checks mirror automated validation
- FIBEX fixtures → Parser tests: feeds · Representative XML files drive parser tests
- FIBEX fixtures → Export tests: feeds · Real files validate export behavior
- FIBEX fixtures → Model tests: feeds · Fixtures support model-related integration coverage
