EasyManua.ls Logo

Sys Tec Electronic GW-003 - Page 78

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
70 © SYS TEC electronic GmbH 2007 L-1032e_9
Parameter:
EthCanHandle_p: Instance Handle of the CAN-Ethernet Gateway
Return Values:
(see Section 7.3.3)
ETHCAN_SUCCESSFUL
ETHCAN_ERR_ILLHANDLE
ETHCAN_ERR_ILLPARAM
ETHCAN_ERR_HWNOINIT
ETHCAN_ERR_HWDISCONNECT_FAILD
ETHCAN_ERR_SAL
ETHCAN_ERR_IFBTP
ETHCAN_ERR_RESOURCE
Note:
The function EthCanDeinitHardware() needs to be called as many
times, as the function EthCanInitHardware() was called previously
and returned without error. If the functions were called in „Non-
blocked Mode“ it is important to be sure in any case that before
ending the application the disconnect has been signaled via the
Callback function.
Application Example:
Both application examples below show the use of the function with a
blocking and non-blocking call.
Blocking call
#define IP_ADDR ((192 << 0)+(168 << 8)+ (10 << 16)+(111 << 24))
#define IP_PORT (8234)
void main (void)
{
DWORD dwRetcode;
tEthCanHandle EthCanHandle;
tEthCanHwParam EthCanHwParam;
EthCanHwParam.m_IpAdress = IP_ADDR;
EthCanHwParam.m_wPort = IP_PORT;
EthCanHwParam.m_UsedProtocol = kUseTCP;

Table of Contents