I am developer of fieldbus such as CANOpen, Modbus.
These day I tested your solution for implementation in our device.
but I found out some problem.
Please review this and advice me.
Receiving RTR was OK , but Can’t sent RTR.
The CanMsg always sent format of DATA.
When I sent the CanMsg has data length is zero.
First time, the CanMsg was sent without error, next time the CanMsg was sent with error. ( return FALSE)
When I received CanMsg without RTR, the CanMsg was updated according data length correctly.
But I received CanMsg with RTR, the CanMsg didn’t update according length.