Cangeterrorwarninglimit(), Cangetrxerrorcount(), Cangeterrorwarninglimit() cangetrxerrorcount() – ADLINK PCI-7841/cPCI-7841 User Manual

Page 40

Advertising
background image

32

Function Reference

CanSetErrorWarning(handle, 96);
CanCloseDriver(handle);

CanGetErrorWarningLimit()

Purpose

Get the Error Warning Limit

Prototype

C/C++
BYTE CanGetErrorWarningLimit(int han-
dle)
Visual Basic(Windows 95/98/NT)

Parameters

handle : handle retrieve from CanOpen-
Driver()

Return Value

0-255 (Error warning limit value)

Remarks

Get the error warning limit

See Also

CanSetErrorWarningLimit()

Usage

C/C++

#include “pci7841.h
int handle = CanOpenDriver(0, 0);//open the port

0 of card 0

….
BYTE limit = CanClearOverrun(handle);
CanCloseDriver(handle);

CanGetRxErrorCount()

Purpose

Get the current value of the receive error
counter

Prototype

C/C++
BYTE CanGetRxErrorCount(int handle)

Parameters

handle : handle retrieve from CanOpen-
Driver()

Return Value

value

Remarks

This function reflects the current of the
receive error counter. After hardware reset
happened, the value returned would be ini-
tialized to 0. If a bus-off event occurs, the
returned value would be 0.

See Also

CanRcvMsg()

Usage

C/C++

Advertising