python-can icon indicating copy to clipboard operation
python-can copied to clipboard

Add APP_TEXT object type to BLFReader

Open jonmon6691 opened this issue 7 months ago • 2 comments

BLF files have metadata objects that encode useful information such as CAN channel mapping configuration. This PR provides the minimal additions to the BLFReader class to support extracting that data along with the parsing of the message objects. Parsing the data structures used in the metadata objects is outside the scope of this PR. However this still provides a significant benefit to applications that are can perform context specific interpretation of the metadata without having to duplicate the BLF parsing performed by BLFReader.

jonmon6691 avatar May 27 '25 23:05 jonmon6691

Object type 65 should be APP_TEXT. You can look here or here for reference.

zariiii9003 avatar May 28 '25 12:05 zariiii9003

Thanks for pointing that out @zariiii9003 and I wasn't aware of the vblf project. Does it make sense to have this functionality in BLFReader? It seems like the API here is focused on just returning objects that appeared on the bus in the iterator, and abstracting away the fact that there are other object types in the BLF. It seems a little awkward to have a side channel in self.app_text that is only populated as a side-effect of iterating for messages.

jonmon6691 avatar May 28 '25 16:05 jonmon6691

Closing this PR since I think it makes more sense for users of python-can to consider vblf for the purpose of more protocol-specific usecases

jonmon6691 avatar Dec 10 '25 16:12 jonmon6691