帮助中心帮助中心
从第三方日志文件导入 CAN 报文
message = canMessageImport(file,vendor)
message = canMessageImport(file,vendor,candb)
message = canMessageImport(___,'OutputFormat','timetable')
示例
message = canMessageImport(file,vendor) 从第三方供应商 vendor 提供的日志文件 file 导入 CAN 报文。日志文件中的所有报文以一个 CAN 报文对象数组的形式导入。
message
file
vendor
导入后,您可以分析、传输或回放这些报文。
canMessageImport 假定导入的日志文件中的信息采用十六进制格式,并且导入的日志文件中的时间戳是绝对值。
canMessageImport
message = canMessageImport(file,vendor,candb) 将指定数据库中的信息应用于导入的 CAN 日志报文。
candb
要导入具有符号报文名称的 Vector 日志文件,请指定对应的数据库文件。
message = canMessageImport(___,'OutputFormat','timetable') 返回报文的时间表。这是推荐的输出格式,用于在 MATLAB® 内实现 CAN 报文的最佳性能和表示。
全部折叠
从日志文件导入原始报文。
message = canMessageImport('MsgLog.asc','Vector','OutputFormat','timetable');
使用物理报文的数据库信息从日志文件导入报文。
candb = canDatabase('myDatabase.dbc'); message = canMessageImport('MsgLog.txt','Kvaser',candb,'OutputFormat','timetable');
CAN 报文日志文件的名称,指定为字符向量或字符串。
示例: 'MsgLog.asc'
'MsgLog.asc'
数据类型: char | string
char
string
供应商的名称,指定为字符向量或字符串,将导入来自此供应商的 CAN 报文日志文件。
您只能以特定文件格式导入报文日志:来自 Vector 的必须是 ASCII 文件,来自 Kvaser 的必须是文本文件。
示例: 'Vector'
'Vector'
CAN 数据库,指定为数据库对象。此数据库的信息将应用于导入的日志文件报文。
示例: candb = canDatabase('CANdb.dbc')
candb = canDatabase('CANdb.dbc')
导入的报文,以 CAN 报文对象的数组或报文的时间表形式返回。
在 R2010b 中推出
canDatabase
receive
transmit
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office