Porting C++ code to Kotlin (ISO 15765-2)

This C++ library https://github.com/altelch/iso-tp is used for fragmenting and reassembling long messages so they can be sent over a CAN bus which is limited to 8 bytes per message as per the ISO 15765-2 standard https://en.wikipedia.org/wiki/ISO_15765-2.

This is the first time I’ve tried to port code to Kotlin. I’m self taught and it’s an unfamiliar experience.

I would appreciate it someone could have a quick look at the cpp and h files and tell me if there is anything weird that is likely to trip me up. I realise there is an external library for talking to the CAN bus chip. At the moment I’m just interested in the message fragmenting and reassembly process as I’ve never had to delve this deeply into this kind of thing before.

submitted by /u/mjbmikeb2
[link] [comments]