EasyManua.ls Logo

Sys Tec Electronic GW-003 - Ethcaninithardware

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
64 © SYS TEC electronic GmbH 2007 L-1032e_9
7.3.2.2 EthCanInitHardware
Syntax:
DWORD STDCALL EthCanInitHardware(
tEthCanHandle* pEthCanHandle_p,
tEthCanHwParam* pEthCanHwParam_p,
tEthCanCbConnectFct fpEthCanCbConnectFct_p
void* pArg_p);
Usage:
DLL_INIT
Description:
This function initializes all necessary data structures and establishes a
connection to the addressed CAN-Ethernet Gateway. The parameters
required for this such as the IP address, port number etc. are
transmitted in the form of an address to a hardware parameter
structure (parameter #2).
This function differentiates between two call modes:
1. The function operates in the so-called "Blocked Mode", if a
NULL pointer is given as the pointer for the callback function
(parameter #3). The function will only return if a successful
connection to the CAN-Ethernet Gateway was established or if
an error has occurred, e.g. in the form of a timeout.
2. The function operates in the so-called "Non-blocked Mode" if
a valid address has been sent to a callback function. The
function initializes all necessary data structures and initializes
the connection without having to wait for successful
completion. The status of the connection is determined over the
callback function, which must be created in the application
layer. It reports the current connection status and is always
called from the DLL if the connection status changes. It is
therefore possible to react accordingly to any breaks in the
connection within the application.

Table of Contents