Skip to content

Conversation

@tuna-f1sh
Copy link
Contributor

I could not decode a mf4 file created by mdflib. It creates .Dir channels with string values not int: https://github.com/ihedvall/mdflib/blob/main/mdflib/src/canconfigadapter.cpp#L321

Not sure if this is standard in MDF but since the note said the reader iterators are based on the asammdf GUI code, I took a look. It does a check on the attached type.

Commit adds the same for python-can so that it can decode files with a string value for .Dir.

@zariiii9003
Copy link
Collaborator

According to the standard, it should be 0 or 1.

@tuna-f1sh
Copy link
Contributor Author

Ah ok - unfortunately I don't have access to the specification. I'll create an issue in mdflib instead then. Are you able to provide a snippet of the spec saying this? Do you know why asammdf would support values as string? Is there some legacy non-explicit definition here?

@zariiii9003
Copy link
Collaborator

The spec says it's a bit signal, not a string:
image

According to the asammdf commit message, it was added to fix CANalyzer measurements.

Anyhow, i guess there's no harm in merging, since this does not affect the files we produce. Could you fix the formatting?

@tuna-f1sh
Copy link
Contributor Author

Yes I've updated commit with black format.

@zariiii9003 zariiii9003 merged commit 51689bc into hardbyte:main Aug 5, 2025
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants