Software
Support
©
SYS TEC electronic GmbH 2007 L-1032e_9
71
dwRetcode = EthCanInitHardware(&EthCanHandle,&EthCanHwParam,NULL,NULL);
if
(dwRetcode == ETHCAN_SUCCESSFUL)
{
printf("\n*** Successfully initialized! ***\n");
}
else
{
goto
Exit;
}
.
.
dwRetcode = EthCanDeinitHardware(EthCanHandle);
if
(dwRetcode == ETHCAN_SUCCESSFUL)
{
printf("\n*** Successfully closed! ***\n",
}
Exit:
return
(dwRetcode);
}
Non-blocking call
//Callback Function for the Connection Status
void
PUBLIC
EthCanConnectControlFct (tEthCanHandle EthCanHandle_p,
DWORD dwConnectionState_p,
void*
pArg_p)
{
switch
(dwConnectionState_p)
{
case
kEstablished:……………………
EthCanInst_g[EthCanHandle_p].fConnected
=
TRUE;
break
;
case
kConnecting:………………………
case
kClosing:………………………………
case
kClosed:…………………………………
EthCanInst_g[EthCanHandle_p].m_fConnected
=
FALSE;
break
;
}
}
void
main (
void
)
{
DWORD dwRetcode;
..tEthCanHandle EthCanHandle;
//initialize a CAN-Ethernet Gateway with callback function
dwRetcode = EthCanInitHardware (&EthCanHandle, &EthCanHwParam,
EthCanConnectControlFct,NULL);
if
(dwRetcode == ETHCAN_SUCCESSFUL)
{
printf("\n*** Successfully initialised! ***\n",
}
.
.
.
.
dwRetcode = EthCanDeinitHardware(EthCanHandle);
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 ...