hardbyte / python-can

The can package provides controller area network support for Python developers
https://python-can.readthedocs.io
GNU Lesser General Public License v3.0
1.31k stars 604 forks source link

FEATURE REQUEST: Support for MDF4 CAN bus logging files [PR ready] #1883

Open MatinF opened 3 weeks ago

MatinF commented 3 weeks ago

Is your feature request related to a problem? Please describe.

The current MDF4 reader in the python-can project is only able to load MDF4 files generated by the MDF4 writer in the project, or MDF4 files having the exact same internal structure. This severely limits the number of MDF4 files with CAN data which can be loaded into the python-can ecosystem for analysis and playback.

Describe the solution you'd like

An expansion of the MDF4 reader capabilities to support MDF4 CAN bus logging files in general. I.e. instead of always expecting CAN DataFrames to be group 0, allow these to be any group, and even span multiple groups. The asammdf package the reader/writer leverages for the heavy lifting behind the scenes already supports loading of more complex files/other structures.

We can provide a PR for expanding the MDF4 readers capabilities to support more generalized CAN bus logging files (in fact we have already prepared and tested one).

Please let us know whether this is something you are open to, then we will formally prepare the PR.

MatinF commented 3 weeks ago

As an update, we have now made a PR for this: https://github.com/hardbyte/python-can/pull/1884