13.07.2015 Views

VCI - Virtual CAN Interface - Ixxat

VCI - Virtual CAN Interface - Ixxat

VCI - Virtual CAN Interface - Ixxat

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Interface</strong> description4.3.2.9 canChannelWaitRxEventThe function waits until the receive event has occurred or until a certain waitingtime has elapsed. The complete syntax of the function is:HRESULT canChannelWaitRxEvent (HANDLE hChannelUINT32 dwMsTimeout );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 receive event has not occured inthe time specified here. With the value INFINITE (0xFFFFFFFF), the functionwaits until the receive event has occured.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 receiveevent occurring, the function returns the error code <strong>VCI</strong>_E_TIMEOUT. In theevent of an error, the function returns an error code not equal to <strong>VCI</strong>_OK or<strong>VCI</strong>_E_TIMEOUT. Further information on the error code is provided by thefunction vciFormatError.Comments:The receive event is triggered as soon as the number of messages in the receivebuffer reaches or exceeds the set threshold. See the description of thefunction canChannelInitialize.To check whether the receive event has already occurred without blocking thecalling program, the value 0 can be specified in the parameter dwMsTimeoutwhen calling the function.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.66Copyright 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!