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> descriptionReturn value:If run successfully, the function returns the value <strong>VCI</strong>_OK,. If the time specifiedin the parameter dwMsTimeout has expired without the receive eventoccurring, the function returns the error code <strong>VCI</strong>_E_TIMEOUT. In the event ofan 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 the defined threshold. See also the description of thefunction linMonitorInitialize.To check whether the receive event has already occurred without blocking thecalling program, the value 0 can be entered in the parameter dwMsTimeoutwhen the function is called.If the handle used in hLinMon is closed from another thread, the functionends the current function call and returns with a return value not equal to<strong>VCI</strong>_OK.4.4.2.9 linMonitorReadMessageThe function reads the next LIN message from the receive buffer of a monitor.The complete syntax of the function is:HRESULT linMonitorReadMessage (HANDLE hLinMon,UINT32 dwMsTimeout,PLINMSG pLinMsg );hLinMon[in] Handle of the opened LIN message monitor.Parameter:dwMsTimeout[in] Maximum delay time in milliseconds. The function returns to the callerwith the error code <strong>VCI</strong>_E_TIMEOUT if no message is read or received within the defined time. With the value INFINITE (0xFFFFFFFF) the function waitsuntil a message has been read.pLinMsg[out] Pointer to a structure of type LINMSG. If run successfully, the functionsaves the read LIN message in the memory area defined here.87Copyright 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!