can.Database Properties
Properties of the can.Database object
Use the following properties to examine or configure CAN database settings. Use
canDatabase to create a CAN database object.
can.Database
This property is read-only.
The Name property displays the name of the database, as a
character vector value. This value is acquired from the database file name.
Data Types: char
This property is read-only.
The Path property displays the path of the database including
the DBC file, as a character vector.
Data Types: char
This property is read-only.
The Nodes property stores the names of all nodes defined in the
specified CAN database, as a cell array of character vectors. For example, to examine
and index into the database nodes:
db = canDatabase('CANex.dbc');
db.Nodes3×1 cell array
{'AerodynamicControl' }
{'Aftertreatment_1_GasIntake'}
{'Aftertreatment_1_GasOutlet'}db.Nodes{1}'AerodynamicControl'
Data Types: cell
This property is read-only.
The NodeInfo property is a structure with information about all
nodes defined in the specified CAN database. The NodeInfo property
is a read-only structure. Use indexing to access the information of each node. For
example:
db = canDatabase('CANex.dbc');
db.NodeInfo3×1 struct array with fields:
Name
Comment
Attributes
AttributeInfodb.NodeInfo(1).Name
'AerodynamicControl'
Data Types: struct
This property is read-only.
The Messages property stores the names of all messages defined
in the specified CAN database, as a cell array of character vectors.
db = canDatabase('CANex.dbc');
db.Messages3×1 cell array
{'A1' }
{'A1DEFI' }
{'A1DEFSI'}db.Messages{1}'A1'
Data Types: cell
This property is read-only.
The MessageInfo property is a structure with information about
all messages defined in the specified CAN database.
Use indexing to access the information of each message. For example:
db = canDatabase('CANFDex.dbc');
db.MessageInfo3×1 struct array with fields:
Name: 'CANFDMessage'
ProtocolMode: 'CAN FD'
Comment: ''
ID: 1
Extended: 0
J1939: []
Length: 48
DLC: 14
BRS: 1
Signals: {2×1 cell}
SignalInfo: [2×1 struct]
TxNodes: {0×1 cell}
Attributes: {2×1 cell}
AttributeInfo: [2×1 struct]db.MessageInfo(1).Name
'CANFDMessage'
Data Types: struct
This property is read-only.
The Attributes property stores the names of all attributes
defined in the specified CAN database, as a cell array of character vectors.
Use indexing to access the information of each attribute. For example:
db = canDatabase('CANex.dbc');
db.Attributes3×1 cell array
{'BusType' }
{'DatabaseVersion'}
{'ProtocolType' }db.Attributes{1}'BusType'
Data Types: cell
This property is read-only.
The Attributeinfo property is a structure with information
about all attributes defined in the specified CAN database.
Use indexing to access the information of each attribute.
db = canDatabase('CANex.dbc');
db.AttributeInfo3×1 struct array with fields:
Name
ObjectType
DataType
DefaultValue
Valuedb.AttributeInfo(1).Name
'BusType'
Data Types: struct
Enter custom data to be stored in your CAN message or a J1939 parameter group,
channel, or database object using the UserData property. When you
save an object with UserData specified, you automatically save the
custom data. When you load an object with UserData specified, you
automatically load the custom data.
Tip
To avoid unexpected results when you save and load an object with
UserData, specify your custom data in simple data types and
constructs.
Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | logical | char | string | struct | table | cell | function_handle | categorical | datetime | duration | calendarDuration | fi
Complex Number Support: Yes
Version History
Introduced in R2009a
MATLAB Command
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.
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.
América
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- 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)