Polyconseil / libcanardbc

Library to read DBC files of CAN bus networks
GNU General Public License v3.0
74 stars 20 forks source link

Extended Frame ID #2

Open FPSUsername opened 7 years ago

FPSUsername commented 7 years ago

Hello,

I have the idea that the conversion with extended frames goes wrong. I have a DBC file which contains an extended ID (‭0x18EF20FF‬). When I read the DBC file myself, I see the value ‭2565808383‬, which is the same as 98EF20FF in hex. When I convert the DBC file to DBF using busmaster, I get the right ID in decimal, in this case ‭418324735‬. I tried using canmatrix to convert the DBC to JSON and it also gives me the right ID in decimal. Could you fix that?

rsebille commented 7 years ago

Hi @FPSUsername,

Thank you for the report. I could be wrong but I didn't find anything that tells that an extended frame identifier must be read differently than a normal one, so if you see 2565808383‬ in the DBC file it seems valid to get 0x98EF20FF as a result. Nonetheless I will be happy to fix this if you can give me informations on how extended frame identifier in DBC file must be read.