Skip to main content

ASAM ODS EXD-API MDF4 plugin

Build PyPI version Python versions License: MIT

This repository contains a ASAM ODS EXD-API plugin that uses asammdf to read the ASAM MDF4 files.

It is built on the ods-exd-api-box helper library which provides the gRPC server infrastructure and proto stubs.

Find more tools supporting your digital transformation in the Peak Solution Git Repo.

Content

Implementation

Tests

Development

Setup

Install uv and then install the project with dev dependencies:

uv sync --group dev

Run Tests

uv run python -m unittest discover tests

Run Plugin Locally

Use an explicit IPv4 bind address on Windows to avoid IPv6 bind issues:

uv run asam-ods-exd-api-mdf4 --bind-address 127.0.0.1 --port 50051

Stop the server with Ctrl+C. A non-zero exit code after interruption is expected.

Optional Parameters

The file handler accepts optional parameters in the EXD-API Identifier.parameters string. Parameters are separated with semicolons, for example:

parameters="values_raw=True;values_ignore_value2text_conversions=True"

values_raw

When set to True, the plugin reads the raw MDF samples without applying channel conversion rules. This is useful when you want the original stored values instead of the converted engineering values.

Example:

exd_api.Identifier(url=file_uri, parameters="values_raw=True")

values_ignore_value2text_conversions

When set to True, the plugin ignores value-to-text conversions and returns the underlying numeric or non-string values instead of the text labels created by the conversion tables. This is especially relevant for channels whose MDF conversion rules map numeric values to strings.

Example:

exd_api.Identifier(url=file_uri, parameters="values_ignore_value2text_conversions=True")

The behavior is covered by the conversion tests in tests/test_exd_api_string_conversion.py, where the same MDF file is read with and without these parameters to confirm the returned data types and sample values.

Run Plugin With uvx

Run the latest published package without installing it into the current project environment:

uvx asam-ods-exd-api-mdf4 --bind-address 127.0.0.1 --port 50051

Code Quality

uv sync --group dev                    # 1. Install all dependencies
uv run ruff format .                   # 2. Format code
uv run ruff check --fix .              # 3. Fix lint violations
uv run mypy src/asam_ods_exd_api_mdf4/external_data_file.py      # 4. Type check
uv run python -m unittest discover tests  # 5. Run tests

Docker

Docker Image Details

The Docker image for this project is available at:

ghcr.io/peak-solution/asam-ods-exd-api-mdf4:latest

This image is automatically built and pushed via a GitHub Actions workflow. To pull and run the image:

docker pull ghcr.io/peak-solution/asam-ods-exd-api-mdf4:latest
docker run -v /path/to/local/data:/data -p 50051:50051 ghcr.io/peak-solution/asam-ods-exd-api-mdf4:latest

Using the Docker Container

To build the Docker image locally:

docker build -t asam-ods-exd-api-mdf4 .

To start the Docker container:

docker run -v /path/to/local/data:/data -p 50051:50051 asam-ods-exd-api-mdf4

have a look at start options to figure out how to customize the behavior of the EXD-API plugin.

Architecture and Usage in ODS Server

sequenceDiagram

actor CLIENT as Client
participant PDTT as 🛠️Importer
participant PODS as 🗃️ASAM ODS server
participant PLUGIN as 📊EXD-API plugin
participant FILE as 🗂️File Storage

autonumber

opt Import phase
  FILE ->>+ PDTT: New file shows up
  PDTT ->>+ PLUGIN : Get Structure
  PLUGIN -> FILE: Extract content information
  PLUGIN ->> PLUGIN: Create Structure
  PLUGIN ->>- PDTT: Return Structure
  PDTT ->> PODS: Import ODS structure
  Note right of PDTT: Create hierarchy<br/>AoTest,AoMeasurement,...
  PDTT ->>- PODS: Add External Data info
  Note right of PDTT: Attach AoFile ... for external data<br/>AoFile,AoSubmatrix,AoLocalColumn,...
end

Note over CLIENT, FILE: Now we can work with the imported files

loop Runtime phase
  CLIENT ->> PODS: Establish ODS session
  CLIENT ->> PODS: Work with meta data imported from structure
  CLIENT ->> PODS: Access external channel in preview
  PODS ->> PLUGIN: GetValues
  PLUGIN ->> FILE: Get Channel values
  PLUGIN ->> PODS: Return values of channels
  PODS ->> CLIENT: Return values needed for plot
end

Metadata

Release files for asam-ods-exd-api-mdf4 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for asam-ods-exd-api-mdf4 1.4.0
File Size Uploaded Provenance Actions
asam_ods_exd_api_mdf4-1.4.0.tar.gz 28.9 kB Without provenance Details for asam_ods_exd_api_mdf4-1.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for asam-ods-exd-api-mdf4 1.4.0
File Interpreter ABI Platform Actions
asam_ods_exd_api_mdf4-1.4.0-py3-none-any.whl Python 3 none any Details for asam_ods_exd_api_mdf4-1.4.0-py3-none-any.whl

Total release size: 39.4 kB

Release files / asam_ods_exd_api_mdf4-1.4.0.tar.gz

Download URL asam_ods_exd_api_mdf4-1.4.0.tar.gz
Size 28.9 kB
Tags Source
SHA-256 checksum
How to use checksums
11bf985c79faf258e16e87d7a0f1a14d96b996d11eb631262c60b1c27c012093
BLAKE2b-256 checksum
How to use checksums
46f06f082a34932907065bd0ce6a52152b0d51b00a200b079e9457fb243e3e83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / asam_ods_exd_api_mdf4-1.4.0-py3-none-any.whl

Download URL asam_ods_exd_api_mdf4-1.4.0-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6ceb8dfd34852c951d2da47eb2a117d3c66d5871286bf1445e77d0aea7a01caa
BLAKE2b-256 checksum
How to use checksums
b3f21e1192a2ee8594c8b80f5aeadfb2279581f256257bf08b397c68feedd14b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for asam-ods-exd-api-mdf4 1.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page