Describe the bug
Using the (static) KvaserReadCbProxy object to store the instance of the KvaserCan object which has the user-defined read callback means that only one user-defined read callback can be stored at a time.
To Reproduce
Create two KvaserCan objects which read the same or different CAN channels and assign them different user-defined read callback functions.
Expected behavior
When a message is received on the channel associated with KvaserCan instance 1, the user-defined read callback function should be called for KvaserCan instance 1. When a message is received on the channel associated with KvaserCan instance 2, the user-defined read callback function should be called for KvaserCan instance 2.
Current Behavior
Whichever KvaserCan instance registered it's user-defined callback function last is the instance who's user-defined callback is always called.
Describe the bug Using the (static) KvaserReadCbProxy object to store the instance of the KvaserCan object which has the user-defined read callback means that only one user-defined read callback can be stored at a time.
To Reproduce Create two KvaserCan objects which read the same or different CAN channels and assign them different user-defined read callback functions.
Expected behavior When a message is received on the channel associated with KvaserCan instance 1, the user-defined read callback function should be called for KvaserCan instance 1. When a message is received on the channel associated with KvaserCan instance 2, the user-defined read callback function should be called for KvaserCan instance 2.
Current Behavior Whichever KvaserCan instance registered it's user-defined callback function last is the instance who's user-defined callback is always called.
Originally reported by @Daniel-Stanek.