CAPL Script

Can Set Channel Acc

Note This function can only be used with Vector drivers. Thevcndrvms.DLLmust be at least Version 4.2.40.

Syntax

long canSetChannelAcc(long channel, dword code, dword mask);

Function

Via an acceptance filter the CAN controllers control which received messages are sent through toCANoe.Some controller chips, such as the SJA 1000, expect partitioning into acceptance mask and acceptance code.

Parameters

CAN channel

Acceptance code for ID filtering

Acceptance mask for ID filtering

Return Values

0: ok

!=0: error

on key 'a'{/*To distinguish whether the filter is for standard orextended identifier. For extended identifiers the MSB of the code and mask are set.Description:Different ports may have different filters for a channel. If the CAN hardware cannot implement the filter, the driver virtualises filtering.Accept if ((id ^ code) & mask) == 0).*/long channel =2;dword code=0x10;dword mask=0x10;canSetChannelAcc(channel,code,mask);write("channel mask set");}

canSetChannelMode | canSetChannelOutput