MATLAB 帮助中心
Information about CAN database messages
msgInfo = messageInfo(candb)
msgInfo = messageInfo(candb,msgName)
msgInfo = messageInfo(candb,id,msgIsExtended)
msgInfo = messageInfo(candb) returns a structure with information about the CAN messages in the specified database candb.
msgInfo
candb
example
msgInfo = messageInfo(candb,msgName) returns information about the specified message 'msgName'.
msgName
'msgName'
msgInfo = messageInfo(candb,id,msgIsExtended) returns information about the message with the specified standard or extended ID.
id
msgIsExtended
collapse all
Get information from all messages in a CAN database.
candb = canDatabase('J1939DB.dbc'); msgInfo = messageInfo(candb)
msgInfo = 3x1 struct array with fields: Name Comment ID Extended J1939 Length Signals SignalInfo TxNodes Attributes AttributeInfo
You can index into the structure for information on a particular message.
Get information from one message in a CAN database using the message name.
candb = canDatabase('J1939DB.dbc'); msgInfo = messageInfo(candb,'A1')
msgInfo = Name: 'A1' Comment: 'This is an A1 message' ID: 419364350 Extended: 1 J1939: [1x1 struct] Length: 8 Signals: {2x1 cell} SignalInfo: [2x1 struct] TxNodes: {'AerodynamicControl'} Attributes: {4x1 cell} AttributeInfo: [4x1 struct]
Get information from one message in a CAN database using the message ID.
candb = canDatabase('J1939DB.dbc'); msgInfo = messageInfo(candb,419364350,true)
CAN database, specified as a CAN database object. candb identifies the database containing the CAN messages that you want information about.
Example: candb = canDatabase(_____)
candb = canDatabase(_____)
Message name, specified as a character vector or string. Provide the name of the message you want information about.
Example: 'A1'
'A1'
Data Types: char | string
char
string
Message ID, specified as a numeric value. id is the numeric identifier of the specified message, in either extended or standard form.
Example: 419364350
419364350
Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64
single
double
int8
int16
int32
int64
uint8
uint16
uint32
uint64
Message ID format, specified as a logical. Specify whether the message ID is in standard or extended type. Use the logical value true if extended, or false if standard. There is no default; you must provide this argument when using a message ID.
true
false
Example: true
Data Types: logical
logical
Message information, returned as a structure or array of structures for the specified CAN database and messages.
Introduced in R2009a
canDatabase
attributeInfo
nodeInfo
signalInfo
canMessage
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 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处