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> descriptionComments:Further information on the data provided by the function is given in the descriptionof the data structure LINLINESTATUS in section 5.3.2.4.4.1.5 linControlInitializeThe function sets the operating mode and bitrate of a LIN connection. The completesyntax of the function is:HRESULT linControlInitialize (HANDLE hLinCtl,UINT8 bMode,UINT16 wBitrate );Parameter:hLinCtl[in] Handle of the opened LIN control unit.bMode[in] Operating mode of the LIN controller. A combination of the followingconstants can be entered for the operating mode:LIN_OPMODE_SLAVE:Slave mode. This operating mode is active by default.LIN_OPMODE_MASTER:Activate master mode (if supported, see also LINCAPABILITIES).LIN_OPMODE_ERRORS:Errors are indicated to the application via special LIN messages.wBitrate[in] Bitrate in bits per second. The value entered here must be within thelimits defined by the constants LIN_BITRATE_MIN and LIN_BITRATE_MAX. Ifthe controller is operated as a slave, the bitrate is automatically determinedby the controller by entering the value LIN_BITRATE_AUTO if this issupported.Return value:If run successfully, the function returns the value <strong>VCI</strong>_OK, otherwise an errorcode not equal to <strong>VCI</strong>_OK. Further information on the error code is providedby the function vciFormatError.Comments:The function internally resets the controller hardware in accordance with thefunction linControlReset and then initializes the controller with the entered parameters.The function can be called from any controller status.79Copyright 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!