Software
Support
©
SYS TEC electronic GmbH 2007 L-1032e_9
73
7.3.2.4
EthCanReadCanMsg
Syntax:
BYTE STDCALL EthCanReadCanMsg(
tEthCanHandle EthCanHandle_p,
tCANMsg* pRcvCanMsg_p
tCANTimestamp* pRcvTime_p);
Usability:
HW_INIT
Description:
This function reads a CAN message from the DLL’s message buffer.
The CAN message is then deleted from the message buffer. If there is
no CAN message in the receive buffer, the function will return with
value
ETHCAN_CANERR_QRCVEMPTY
.
Parameter:
EthCanHandle_p:
Instance Handle of the CAN-Ethernet Gateway
pRcvCanMsg_p:
Address to a CAN message structure
This address must not be NULL!
The structure of the CAN message is as follows:
typedef struct
{
DWORD m_dwID;
// CAN-Identifier
BYTE m_bMsgType; // CAN-Frame-Format
BYTE m_bLen;;
// CAN-data length
BYTE m_bData[8]; // CAN-Data (max. 8 Bytes)
}tCANMsg;
Figure 17: CAN Message Structure
When formatting the CAN message, there is differentiation between
two types. CAN messages with 11-bit identifiers (Standard CAN
Frame) and CAN messages with 29-bit identifiers (Extended CAN
Frame) are supported. This also applies for so-called remote frames
Summary of Contents for GW-003
Page 5: ...Contents SYS TEC electronic GmbH 2007 L 1032e_9 Index 97 ...
Page 8: ...CAN Ethernet Gateway SYS TEC electronic GmbH 2007 L 1032e_9 ...
Page 14: ...CAN Ethernet Gateway 6 SYS TEC electronic GmbH 2007 L 1032e_9 ...
Page 56: ...CAN Ethernet Gateway 48 SYS TEC electronic GmbH 2007 L 1032e_9 ...
Page 66: ...CAN Ethernet Gateway 58 SYS TEC electronic GmbH 2007 L 1032e_9 ...
Page 100: ...CAN Ethernet Gateway 92 SYS TEC electronic GmbH 2007 L 1032e_9 ...
Page 108: ...Published by SYS TEC electronic GmbH 2007 Ordering No L 1032e_9 Printed in Germany ...