
PISO-CANFD series CAN FD card User Manual (version 1.0.0)
Page: 74
Copyright © 2021 ICP DAS Co., Ltd. All Rights Reserved.
E-mail: [email protected]
3.2.17.
CANFD_RecvCANMsgCnt
Description
This function is used to retrieve the count of the received CAN message for a specified
PISO-CANFD CAN port. When user using IRQ method (call CANFD_InstallIrq) to
receive CAN message, the value of “MsgCnt” will be the sum of message count in
receive buffer of driver and hardware buffer of CAN controller. If user not install IRQ, this
value will be the message count in hardware buffer of CAN controller.
Syntax
Parameters
BoardNo
[in] Specifies the number of the PISO-CANFD series board to be read. The valid
range is 0 to 15.
Port
[in] Specifies the number of the CAN port, where:
1: CAN port 1
2: CAN port 2.
3: CAN port 3
4: CAN port 4.
MsgCnt
[out] Indicates the count of the received CAN messages.
Return Value
If the function succeeds, the return value will be 0.
If the function fails, refer to Section 3.6 Error Code Definitions.
C#
Int16 CANFD_RecvCANMsgCnt (
Byte BoardNo,
Byte Port,
out Uint16 MsgCnt
);