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.

Accessing the busTo save system resources, after opening a component the handle of the device orof the interface board can be released again. For further accesses to the connection,only the handle of the control unit or of the message monitor is required.The functions linControlOpen and linMonitorOpen can be called in such a waythat a dialogue window is presented to the user where he can select the device orthe interface board or the LIN connection. This is done by entering the value0xFFFFFFFF for the connection number. In this case, the functions expect the handleof the higher order window (parent) or the value NULL, if no higher orderwindow is available, in the first parameter and not the handle of the device or theinterface board.If run successfully, all three functions return a handle to the opened component.If an error or an access conflict occurs, the functions return a corresponding errorcode.If an opened component is no longer required, it can be closed again by callingone of the functions linControlClose and linMonitorClose.The possibilities offered by a LIN connection, or how the LIN connection is to beused, is described in more detail in the following sub-sections.3.2.2 Control unitThe control unit provides functions for configuring the LIN controller and itstransmission properties as well as functions for requesting the current controllerstatus.The component is designed in such a way that it can always only be opened byone application. Simultaneous opening of the component by different programsis not possible. This prevents situations where, for example, an application wantsto start the LIN controller but another wants to stop it.The control unit is opened by calling the function linControlOpen. If the functionreturns an error code “Access denied”, the LIN controller is already being used byanother program.This generally only represents a problem if an application cannot be run withoutdirect control by the LIN controller. In all other cases, however, the applicationshould be able to continue working normally.With the function linControlClose, an opened control unit is closed again and istherefore available for other applications. A program should thus only release acontrol unit when it is no longer required.29Copyright 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!