MATLAB 도움말 센터
Look up value of table text for signal
vtt = valueTableText(db,MsgName,SignalName,TableVal)
vtt = valueTableText(db,MsgName,SignalName,TableVal) returns the text from the specified value table for a specified message signal.
vtt
db
MsgName
SignalName
TableVal
example
collapse all
Create a CAN database object, and select a message and signal to retrieve their table text.
Identify a message.
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]
Select one of the message signals.
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]
Retrieve second table text for a specified signal.
vtt = valueTableText(db,m.Name,s.Name,2)
vtt = 'pump error'
CAN database, specified as a CAN database object.
Example: db = canDatabase(_____)
db = canDatabase(_____)
Message name, specified as a character vector or string. You can view available message names from the db.Messages property.
db.Messages
Example: 'A1'
'A1'
Data Types: char | string
char
string
Signal name, specified as a character vector or string. You can view available signal names from the db.MessageInfo(n).Signals property.
db.MessageInfo(n).Signals
Example: 'EngGasSupplyPress'
'EngGasSupplyPress'
Table value, specified as a numeric value.
Example: 2
Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64
single
double
int8
int16
int32
int64
uint8
uint16
uint32
uint64
Table text, returned as a character vector.
Introduced in R2015b
nodeInfo
messageInfo
signalInfo
attributeInfo
canDatabase
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 사이트 방문이 최적화되지 않았습니다.
미주
유럽
아시아 태평양
지역별 지사에 문의