EasyManua.ls Logo

Sys Tec Electronic GW-003 - Ethcangetstatus; Figure 19: CAN-Status Structure

Default Icon
108 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
CAN – Ethernet Gateway
78 © SYS TEC electronic GmbH 2007 L-1032e_9
7.3.2.6 EthCanGetStatus
Syntax:
DWORD STDCALL EthCanGetStatus(
tEthCanHandle EthCanHandle_p,
tStatus* pStatus_p);
Usability:
HW_INIT
Description:
The function returns the error status of the CAN-driver as well as the
connection status of the CAN-Ethernet Gateway. If a CAN-error
occurs on the CAN-Ethernet Gateway (e.g. send or receive buffer
overflow), then this status will be returned via Ethernet and can be
called up with the help of this function. In addition to the CAN-status
the current connection status of the Ethernet connection between the
PC and the CAN-Ethernet Gateway is also returned. This function
should be called in specific time intervals in order to be able to react to
potential CAN-errors.
Parameter:
EthCanHandle_p: Instance Handle of the CAN-Ethernet Gateway
pStatus_p: Address to a status structure. This address must not
be NULL!
This status structure is defined as follows:
typedef struct
{
WORD m_wCanStatus; // current CAN state
WORD m_wConnectionStatus; // current connection state
} tStatus;
Figure 19: CAN-Status Structure

Table of Contents