Skip to content

BLF reader is missing direction of CAN FD Message #965

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fabiocrestani opened this issue Jan 8, 2021 · 7 comments · Fixed by #966
Closed

BLF reader is missing direction of CAN FD Message #965

fabiocrestani opened this issue Jan 8, 2021 · 7 comments · Fixed by #966
Labels
blocker bug file-io about reading & writing to files
Milestone

Comments

@fabiocrestani
Copy link
Contributor

When parsing a CAN_FD_MESSAGE_64, the direction byte is ignored:

channel, dlc, valid_bytes, _, can_id, _, fd_flags = members

@felixdivo felixdivo added blocker bug file-io about reading & writing to files labels Apr 26, 2021
@felixdivo felixdivo added this to the 4.0.0 Release milestone Apr 26, 2021
@mergify mergify bot closed this as completed in #966 Jun 8, 2021
@Matheus-Garbelini
Copy link

Matheus-Garbelini commented May 17, 2022

@fabiocrestani, @felixdivo Currently, direction of CAN messages are only parsed for CAN_FD_MESSAGE_64. Is there any way we can also save BLF with the direction information for CAN FD or normal CAN frames?
Perhaps there is some new format on the BLF spec that allows something like "CAN_MESSAGE_64" so we can save direction for classical CAN messages?

@felixdivo
Copy link
Collaborator

(I'm out, sorry.)

@Matheus-Garbelini
Copy link

@felixdivo you mean, you're out of this project?

@felixdivo
Copy link
Collaborator

@Matheus-Garbelini Yes. That's right. Just so that you don't wait for my feedback on this.

@fabiocrestani
Copy link
Contributor Author

fabiocrestani commented May 31, 2022

@Matheus-Garbelini By inspecting the code it seems that all CAN messages have a is_rx field that you can use to get the direction. Maybe you could provide a sample file for further investigation?

@Matheus-Garbelini
Copy link

Matheus-Garbelini commented Jun 1, 2022

Hi @fabiocrestani, thanks for the reply.
Unfortunatelly, the main point of my concern is that we cannot save the BLF with direction information.
Reading direction is fine trough the is_rx flag as you suggested, but informatino is lost if the user tries to save the same capture via BLF Writer api.

@fabiocrestani
Copy link
Contributor Author

@Matheus-Garbelini I have extended the tests to use BLFWriter to write a file and then open it again with BLFReader: develop...fabiocrestani:extend-blf-tests

Results are good and the direction is stored in the file.
Can you check if this works for you?
Unfortunately I don't have any Vector tool to try right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker bug file-io about reading & writing to files
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants