Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zariiii9003/vblf
A library to read and write Vector BLF files (binary log format).
https://github.com/zariiii9003/vblf
Last synced: 5 days ago
JSON representation
A library to read and write Vector BLF files (binary log format).
- Host: GitHub
- URL: https://github.com/zariiii9003/vblf
- Owner: zariiii9003
- License: mit
- Created: 2024-12-23T05:43:28.000Z (28 days ago)
- Default Branch: main
- Last Pushed: 2025-01-09T22:45:52.000Z (11 days ago)
- Last Synced: 2025-01-10T00:49:31.600Z (11 days ago)
- Language: Python
- Homepage:
- Size: 115 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Binary Logging Format Library for Python
[![PyPI - Version](https://img.shields.io/pypi/v/vblf.svg)](https://pypi.org/project/vblf)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/vblf.svg)](https://pypi.org/project/vblf)## Introduction
A Python library for reading and writing BLF files, a proprietary binary logging format of Vector Informatik GmbH. BLF files are commonly used in automotive logging and testing scenarios.
## Installation
```bash
pip install --pre vblf
```## Usage
### Reading BLF Files
```python
from vblf.can import CanMessage, CanMessage2
from vblf.reader import BlfReader# Open a BLF file
with BlfReader("example.blf") as reader:
# Iterate through all objects in the file
for obj in reader:
print(f"Type: {obj.header.base.object_type.name}")
print(f"Timestamp: {obj.header.object_time_stamp}")# Handle CAN messages
if isinstance(obj, (CanMessage, CanMessage2)):
print(f"CAN ID: {obj.id}")
print(f"Data: {obj.data.hex()}")
```### Writing BLF Files
```python
from vblf.can import CanMessage
from vblf.writer import BlfWriter# Create a new BLF file
with BlfWriter("output.blf") as writer:
# Create a CAN message
msg = CanMessage(...)# Write the message to the file
writer.write(msg)
```## License
This project is licensed under the MIT License.
## Acknowledgments
- Vector Informatik GmbH for the BLF file format
- Tobias Lorenz for his C++ library [vector_blf](https://bitbucket.org/tobylorenz/vector_blf/src/master/)