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.6 canChannelActivateThe function activates or deactivates a message channel. The complete syntax ofthe function is:HRESULT canChannelActivate ( HANDLE hChannel, BOOL fEnable );Parameters:hChannel[in] Handle of the opened message channel.fEnableWith the value TRUE, the function activates the message flow between the<strong>CAN</strong> controller and the message channel, with the value FALSE the functiondeactivates the message flow.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:As a default setting, the message channel is deactivated after opening or initializing.For the channel to receive messages from the bus, or send messagesto the bus, the bus must be activated. At the same time, the <strong>CAN</strong> controllermust be in the “online” status. Further information on this is given in the descriptionof the function canControlStart and in section 3.1.2.After activation of the channel, messages can be written in the transmit bufferwith canChannelPostMessage or canChannelSendMessage in the transmit buffer,or read from the receive buffer with the functions canChannelPeekMessageand canChannelReadMessage.4.3.2.7 canChannelPeekMessageThe function reads the next <strong>CAN</strong> message from the receive buffer of a messagechannel. The complete syntax of the function is:HRESULT canChannelPeekMessage(HANDLE hChannel,P<strong>CAN</strong>MSG pCanMsg );Parameters:hChannel[in] Handle of the opened message channel.64Copyright 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!