13.07.2015 Views

VCI - Virtual CAN Interface - Ixxat

VCI - Virtual CAN Interface - Ixxat

VCI - Virtual CAN Interface - Ixxat

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Interface</strong> description4.3.2.12 canChannelSendMessageThe function waits until a message channel is ready to receive a message andthen writes the specified <strong>CAN</strong> message in the transmit buffer of the messagechannel. The complete syntax of the function is:HRESULT canChannelSendMessage (HANDLE hChannel,UINT32 dwMsTimeout,P<strong>CAN</strong>MSG pCanMsg );Parameters:hChannel[in] Handle of the opened message channel.dwMsTimeoutMaximum waiting time in milliseconds. The function returns to the callerwith the error code <strong>VCI</strong>_E_TIMEOUT if the message could not be entered inthe transmit buffer within the specified time. With the value INFINITE(0xFFFFFFFF), the function waits until the transmit event occurs and themessagehas been written in the transmit buffer.pCanMsg[in] Pointer to an initialized structure of type <strong>CAN</strong>MSG with the <strong>CAN</strong>message to be transmitted.Return value:If run successfully, the function returns the value <strong>VCI</strong>_OK,. If the time periodspecified in the parameter dwMsTimeout has elapsed without the messagehaving been written in the transmit buffer, the function returns the error code<strong>VCI</strong>_E_TIMEOUT. In the event of an error, the function returns an error codenot equal to <strong>VCI</strong>_OK or <strong>VCI</strong>_E_TIMEOUT. Further information on the errorcode is provided by the function vciFormatError.The function only waits until the message has been written in the transmitbuffer, but not until the message has been transmitted on the bus.Comments:If the handle specified in hChannel is closed from another thread, the functionends the current function control and returns with a return value not equal to<strong>VCI</strong>_OK.69Copyright IXXAT Automation GmbH C-API Programming Manual, Version 1.5

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!