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.
Could you check the question 1?
I attached test project file to help your support.
please review this file and let me know what is problem.
I use under code to send RTR .
The bus speed is 250KHz.
msg.id = atoi((CStringA)m_edtID);
msg.dataLen = atoi((CStringA)m_edtDLC);
msg.canMsgFlags = (m_chkRTR ? CanMsgFlags_RTR : 0);