I-7565M-FD USB to CAN/CAN FD converter User Manual (version 1.0.0)
Page: 60
Copyright © 2019 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
5.6.2 CANFD_GetCANRxMsg
This function is used to get a CAN/CAN FD message from the software received
buffer of the assigned CAN port of the I-7565M-FD device.
Syntax:
C++
int CANFD_GetCANRxMsg(WORD i_wDevice_id, BYTE i_byCANPort, BYTE*
o_byType, BYTE* o_byMode, DWORD* o_dwID, BYTE* o_byRTR, BYTE* o_byFDF,
BYTE* o_byDlen, BYTE *o_byData, DWORD *o_dw_TimeStamp_s, DWORD
*o_dw_TimeStamp_us);
C#
Int32 CANFD_GetCANRxMsg(UInt16 i_wDevice_id, Byte i_byCANPort, out Byte
o_byType, out Byte o_byMode, out UInt32 o_dwID, out Byte o_byRTR, out Byte
o_byFDF, out Byte o_byDlen, [In, Out] Byte[] o_byData, out UInt32
o_dw_TimeStamp_s, out UInt32 o_dw_TimeStamp_us);
Parameter:
i_wDevice_id
[in]
The assigned device ID of the I-7565M-FD device.
i_byCANPort
[in]
The assigned CAN port of the I-7565M-FD device.
*o_byType
[out]
Received messages format.
0: receive a stand/extended CAN/CAN FD message
1: receive a event message.
Event message format:
Mode: 1 (CAN 2.0B, 29-bit CAN ID)
ID:
0xEEEEEEE
RTR: 0 (No RTR)
FDF:
0
Dlen: 0x08
Data: D0~D3
CAN Bus status in little-endian format
(Please refer to appendix 7.3 for “CAN Status” definition.)
D4~D7
CAN Bus error counter in little-endian format