Function Reference
29
un-send message would be stored in the
memory of the driver. The sequence of out-
going message is the FIRST-IN-FIRST-
OUT. According this algorithm, if your pro-
gram need to send an emergency data, you
can clear the transmit buffer and send it
again.
See Also
CanRcvMsg()
Usage
C/C++
#include “pci7841.h
int handle = CanOpenDriver(0, 0);//open the port
0 of card 0
….
CanClearTxBuffer(handle);
CanCloseDriver(handle);
CanGetErrorCode()
Purpose
Get the Error Code
Prototype
C/C++
BYTE CanGetErrorCode(int handle)
Parameters
handle : handle retrieve from CanOpen-
Driver()
Return Value
error code
Return error code is an 8-bit data
Bit Symbol
Name
Value
Function
7 ERRC1 Error Code 1
6 ERRC0 Error Code 0
5
DIR
Direction
1
Rx error occurred during reception
0
Tx error occurred during ransmission
4
SEG4
Segment 4
3
SEG3
Segment 3
2
SEG2
Segment 2
1
SEG1
Segment 1
0
SEG0
Segment 0
Содержание NuCOM cPCI-7841
Страница 4: ......
Страница 14: ...6 Introduction ...