MATLAB 도움말 센터
Configure CAN message filter to allow only specified messages
filterAllowOnly(canch,name)
filterAllowOnly(canch,IDs,type)
filterAllowOnly(canch,name) configures the filter on the channel canch to pass only messages with the specified name.
canch
name
Set the channel object Database property to attach a database to allow filtering by message names.
Database
example
filterAllowOnly(canch,IDs,type) configures the filter on the channel canch to pass only messages of the specified identifier type and values.
IDs
type
collapse all
Filter a database defined message with the name 'EngineMsg'.
'EngineMsg'
canch = canChannel('Vector','CANCaseXL 1',1); canch.Database = canDatabase('candatabase.dbc'); filterAllowOnly(canch,'EngineMsg')
Filter messages by identifiers.
canch = canChannel('Vector','CANCaseXL 1',1); filterAllowOnly(canch,[602 612],'Standard')
CAN device channel, specified as a CAN channel object, on which to filter.
Example: canch = canChannel('NI','CAN1')
canch = canChannel('NI','CAN1')
Name of CAN messages that you want to allow, specified as a character vector, string, or supporting array of these types.
Example: 'EngineMsg'
Data Types: char | string | cell
char
string
cell
CAN message IDs that you want to allow, specified as a numeric value or vector.
Specify IDs as a decimal value. To convert a hexadecimal to a decimal value, use the hex2dec function.
hex2dec
Example: 600, [600,610], [600:800], [200:400,600:800]
600
[600,610]
[600:800]
[200:400,600:800]
Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64
single
double
int8
int16
int32
int64
uint8
uint16
uint32
uint64
'standard'
'extended'
Identifier type by which to filter, specified as a character vector or string. CAN messages identifier types are 'Standard' and 'Extended'.
'Standard'
'Extended'
Example: 'Standard'
Data Types: char | string
Introduced in R2011b
canChannel
canDatabase
filterAllowAll
filterBlockAll
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
유럽
아시아 태평양
지역별 지사에 문의