CSS-Electronics / api-examples

CANedge API Examples for MDF4/S3
MIT License
103 stars 35 forks source link

CAN ID Source Address should be matched automatically #15

Closed MarcosGuerrerou closed 1 year ago

MarcosGuerrerou commented 2 years ago

Hello, CSS Team

I've noticed that in the MultiFrame Decoder Class, the 8 bit source address is hardcoded to be 254 (EF). See L493 @ utils.py :

https://github.com/CSS-Electronics/api-examples/blob/3d2d0cb575e4c02a56e9249d13fc2e7e091ee2d7/examples/data-processing/utils.py#L493

This can cause some issues as the address of the original sender of the TP broadcast is lost, and can make the use with more than one source difficult.

Is there any way you could change it so the Source Address gets carried over from the BAM message with PGN EC00 to the final "joint" message?

Best regards,

MatinF commented 2 years ago

Hi Marcos, thanks for the suggestion. It's true that there is a limitation to the current approach for cases where the same PGN is used in ISO TP across two different 29 bit CAN IDs for example.

Most likely, the solution would be to still 'match' the relevant ISO TP identifiers based on the PGN matching, but ensure that the data is 'grouped' by the full 29 bit CAN IDs.

I don't have a short-term solution for this, but you're welcome to make a PR suggestion that we can review. Otherwise we may be able to look into this at a later stage.

MatinF commented 1 year ago

I believe this has been resolved now