beautypg.com

7 software buffer function, 1 vci_get_rxmsgcnt, Software buffer function – B&B Electronics I-7565-H2 - Manual User Manual

Page 57: Vci_get_rxmsgcnt

background image

5.7 Software Buffer Function

When users’ program receives CAN messages, these received CAN

messages will be saved in software buffer provided by VCI_CAN library
first and users need to use “VCI_RecvCANMsg” function to get these
received CAN messages saved in software buffer. The software buffer
size is 65536 for each CAN port.

5.7.1 VCI_Get_RxMsgCnt

This function is used to get the count of these received CAN

messages saved in software buffer that are not received by users’
program in the assigned CAN port.

Syntax :

int

VCI_Get_RxMsgCnt (

BYTE

CAN_No,

DWORD*

RxMsgCnt

);

Parameter :
CAN_No:

[in] The assigned CAN port number.


RxMsgCnt:

[out] The pointer is used to receive the CAN message count saved in

software buffer.


Return Values :
Return 0 means success, others means failure.

Examples :
Int Ret;
BYTE CAN_No;
DWORD RxMsgCnt;

CAN_No=1;
Ret = VCI_Get_RxMsgCnt(CAN_No, &RxMsgCnt); // Recv RxMsg count

I-7565-H1/H2 High Speed USB/CAN Converter User’s Manual (Ver 1.1, Nov/2009) ------------- 57