CAN – Ethernet Gateway
76 © SYS TEC electronic GmbH 2007 L-1032e_9
7.3.2.5 EthCanWriteCanMsg
Syntax:
DWORD STDCALL EthCanWriteCanMsg(
tEthCanHandle EthCanHandle_p,
tCANMsg* pSendCanMsg_p,
tCANTimestamp* pSendTime_p);
Usability:
HW_INIT
Description:
This function writes a CAN-message to the send buffer located in the
EthCan.Dll. If the CAN-message could not be stored in the send
buffer (e.g. buffer overflow), the function returns with the error code
ETHCAN_CANERR_QXMTFULL, which means that a buffer
overflow occurred.
Parameter:
EthCanHandle_p: Instance handle of the CAN-Ethernet Gateway
pSendCanMsg_p: Address to a CAN-message structure.
This address must not be NULL!
pSendTime_p: Address to a Timestamp structure
This address must not be NULL!
The parameter pSendCanMsg_p corresponds to an address pointing to
the structure of a CAN-message, as explained for the function
EthCanReadCanMsg() (see Section
7.3.2.4). The message format
should be set (see Section
7.3.2.4) corresponding to the CAN-message
(29-Bit, 11-Bit, RTR) to be sent.
The parameter pSendTime_p is an address pointing to a Timestamp
structure. For this function, this parameter has no meaning, however