valueTableText
查找信号的表文本值
说明
示例
查看信号的表文本
创建一个 CAN 数据库对象,并选择一条报文和信号以检索其表文本。
标识一条报文。
db = canDatabase('J1939DB.dbc');
m = db.MessageInfo(1)
m = Name: 'A1' Comment: 'This is 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]
选择一个报文信号。
s = m.SignalInfo(2)
s = Name: 'EngGasSupplyPress' Comment: 'Gage pressure of gas supply to fuel metering device.' StartBit: 8 SignalSize: 16 ByteOrder: 'LittleEndian' Signed: 0 ValueType: 'Integer' Class: 'uint16' Factor: 0.5000 Offset: 0 Minimum: 0 Maximum: 3.2128e+04 Units: 'kPa' ValueTable: [4x1 struct] Multiplexor: 0 Multiplexed: 0 MultiplexMode: 0 RxNodes: {'Aftertreatment_1_GasIntake'} Attributes: {3x1 cell} AttributeInfo: [3x1 struct]
检索指定信号的第二个表文本。
vtt = valueTableText(db,m.Name,s.Name,2)
vtt = 'pump error'
输入参数
db
— CAN 数据库
CAN 数据库对象
CAN 数据库,指定为 CAN 数据库对象。
示例: db = canDatabase(_____)
MsgName
— 报文名称
字符向量 | 字符串
报文名称,指定为字符向量或字符串。您可以从 db.Messages
属性中查看可用的报文名称。
示例: 'A1'
数据类型: char
| string
SignalName
— 信号名称
字符向量 | 字符串
信号名称,指定为字符向量或字符串。您可以从 db.MessageInfo(n).Signals
属性中查看可用的信号名称。
示例: 'EngGasSupplyPress'
数据类型: char
| string
TableVal
— 表值
数值
表值,指定为数值。
示例: 2
数据类型: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
输出参量
vtt
— 表文本
表文本
表文本,以字符向量形式返回。
版本历史记录
在 R2015b 中推出
MATLAB 命令
您点击的链接对应于以下 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:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)