EasyManua.ls Logo

Sys Tec Electronic GW-003 - Page 85

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...
Software Support
© SYS TEC electronic GmbH 2007 L-1032e_9 77
the returned address must not be NULL. The structure elements are to
be initialized with 0.
Return Value:
(see Section 7.3.3 and 7.3.4)
ETHCAN_SUCCESSFUL
ETHCAN_ERR_ILLPARAM
ETHCAN_ERR_ILLHANDLE
ETHCAN_ERR_HWNOINIT
ETHCAN_ERR_HWNOTCONNECTED
ETHCAN_CANERR_QXMTFULL
Application Example:
tEthCanHandle EthCanHandle;
tCANMsg CanMsg;
tCANTimestamp SendTime;
DWORD dwRetcode;
//Initialization of a Standard-RTR-Frame
CanMsg.m_dwId = 0x180; //CAN-ID
CanMsg.m_bMsgType = ETHCAN_MSGTYPE_STANDARD & ETHCAN_MSGTYPE_RTR;
CanMsg.m_bLen = 8;//8 Byte requested Data length
SendTime.m_dwMillis = 0;
//Send CAN-message
dwRetcode = EthCanWriteCanMsg(EthCanHandle,&CanMsg,&SendTime);
if(dwRetcode == ETHCAN_SUCCESSFUL)
{
//CAN-message sent
}
else
if(dwRetcode & ETHCAN_CANERR_ QXMTFULL)
{
//Overflow of the send buffer
}
else
{
//Error when sending the CAN-message
}

Table of Contents