4.1.23 CAN_ReceiveWithoutStruct
Description:
This function is the same as
CAN_ReceiveMsg
. But this function
doesn’t use PacketStruct structure type. To provide this function is for
that the structure address of some application development is allocated
different from the PISOCAN.lib like dot Net 2003. So if users use
CAN_ReceiveMsg and can’t receive CAN message correctly, the
CAN_ReceiveWithoutStruct function can instead.
Syntax:
int CAN_ReceiveWithoutStruct(BYTE BoardNo, BYTE Port, BYTE
*Mode, DWORD *Id, BYTE *Rtr, BYTE *Dlen,
BYTE *Data, DWORD *H_MsgTimeStamps,
DWORD *L_MsgTimeStamps)
Parameter:
BoardNo: [input] PISO-CAN board number (0~7)
Port: [input] CAN port number (1~8)
*Mode: 0
→
11-bit identifier, 1
→
29-bit identifier.
*Id: Identifier
*Rtr: Remote transmission request
*Dlen: Data length
*Data: data byte
*H_MsgTimeStamps, *L_MsgTimeStamps: These parameters in
Windows 98/Me/NT4 will record the time with system clock
counter and in Windows 2000/XP will record the system
interrupt-time count of 100-ns unit when the CAN message is
received from SJA1000. The *H_MsgTimeStamps is the high
DWORD and the *L_MsgTimeStamps is the low DWORD The
system clock counter starts to count after the PC boots up. If
more than one CAN messages are received and stored in the
64-byte SJA1000 FIFO, the time stamps of these CAN
messages may be closed.
Return:
PISO-CAN/PEX-CAN/PCM-CAN Series User’s Manual (v2.6 Dec/2013) -------
58
CAN_NoError: OK
CAN_BoardNumberError: BoardNo is not correct or exceeds the current
ГК
Атлант
Инжиниринг
–
официальный
представитель
в
РФ
и
СНГ
+7(495)109-02-08 [email protected] www.bbrc.ru