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.5 canChannelInitializeThe function initializes the receive and transmit buffers of a message channel. Thecomplete syntax of the function is:HRESULT canChannelInitialize (HANDLE hChannel,UINT16 wRxFifoSize,UINT16 wRxThreshold,UINT16 wTxFifoSize,UINT16 wTxThreshold );Parameters:hChannel[in] Handle of the opened message channel.wRxFifoSize[in] Size of the receive buffer in number of <strong>CAN</strong> messages.wRxThreshold[in] Threshold value for the receive event. The event is triggered when thenumber of messages in the receive buffer reaches or exceeds the numberspecified here.wTxFifoSize[in] Size of the transmit buffer in number of <strong>CAN</strong> messages.wTxThreshold[in] Threshold value for the transmit event. The event is triggered when thenumber of free entries in the transmit buffer reaches or exceeds the numberspecified here.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.A value greater than 0 must be specified for the size of the receive and of thetransmit buffer, otherwise the function returns an error code according to“Invalid parameter“.Comments:The values specified in the parameters wRxFifoSize and wTxFifoSize define thelower limit for the size of the buffers. The actual size of a buffer may be largerthan the specified value, as the memory used for this is reserved page-wise.If the function is called for an already initialized channel, the function firstdeactivates the channel, then releases the available FIFOs and creates two newFIFOs with the required dimensions.63Copyright 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!