49
PCI-1680U/1682U User Manual
Chapter 4
S
oftware
R
equirements
4.4.1
canmsg_t
When users directly use ReadFile or WriteFile interface of Windows Native API to
call drivers, this structure is needed.
typedef struct {
int flags;
int cob;
ULONG id;
short int length;
UCHAR data[ 8 ];
} canmsg_t;
Member Description
Remarks
8-bit flags are used to record types of messages during sending or receiving. The
meanings of these bits are:
ID shows type of CAN. When ID is 0xFFFFFFFF, it means error frame, which implies
that hardware overrun, error and busoff occur in drivers. Users can get the specific
type from flags.
If ID does not equal 0xFFFFFFFF, flags may be Remote frame, Extended frame,
Standard frame, Self Reception or software overrun.
Name Description
flags Types
of
messages.
cob Reserved.
id ID
of
message.
length
of messages (0~8).
data
Data transferred (Made up of 0°´8 Byte data).
Bit Declaration
Meaning
Description
0 MSG_RTR RTR
1 means Remote frame, 0 means data
frame.
1 MSG_OVR
Hardware OVER-
RUN
1 means receive buffer overrun of hardware.
2 MSG_EXT
Extension
1 means Extended frame(29 bit identifier), 0
means Standard frame(11 bit identifier).
3 MSG_SELF Self
Reception
1 means self sending and receiving frame, 0
means receiving frame from other ports.
4 MSG_PASSIVE
Error
1 means bus error.
5
MSG_BUSOFF
BUSOFF
1 means busoff.
6 Reserved
Reserved
7
MSG_BOVR
Software OVERRUN 1 means receive buffer overrun of software.
Содержание PCI-1680U
Страница 10: ...PCI 1680U 1682U User Manual 4 ...
Страница 16: ...PCI 1680U 1682U User Manual 10 5 Click Next as the following 6 Click Next as the following ...
Страница 22: ...PCI 1680U 1682U User Manual 16 ...
Страница 26: ...PCI 1680U 1682U User Manual 20 Figure 3 2 PCI 1682U Silk Screen ...
Страница 29: ...Chapter 4 4 Software Requirements This chapter has information on the software of PCI 1680U 1682U ...
Страница 85: ...79 PCI 1680U 1682U User Manual Chapter 4 Software Requirements WDM CE ...
Страница 89: ...83 PCI 1680U 1682U User Manual Chapter 4 Software Requirements CE 4 8 2 Flow Chart 4 8 2 1 Send flow chart ...
Страница 90: ...PCI 1680U 1682U User Manual 84 4 8 2 2 Receive flow chart ...
Страница 91: ...85 PCI 1680U 1682U User Manual Chapter 4 Software Requirements 4 8 2 3 Configure flow chart ...
Страница 92: ...PCI 1680U 1682U User Manual 86 4 8 2 4 Event flow chart Either flow chart of the two sub threads is as below ...
Страница 103: ...97 PCI 1680U 1682U User Manual Chapter 5 Pin Assignments and Wiring ...