Main Content

canDatabase

Create handle to CAN database file

Description

example

candb = canDatabase('dbfile.dbc') creates a handle to the specified database file dbfile.dbc. You can specify a file name, a full path, or a relative path. MATLAB® looks for dbfile.dbc on the MATLAB path. Vehicle Network Toolbox™ supports Vector CAN database (.dbc) files.

Examples

collapse all

Create objects for example database files.

candb = canDatabase("C:\myVNTData\demoVNT_CANdbFiles.dbc");
candb = 

  Database with properties:

             Name: 'demoVNT_CANdbFiles'
             Path: 'C:\myVNTData\demoVNT_CANdbFiles.dbc'
            Nodes: {}
         NodeInfo: [0×0 struct]
         Messages: {5×1 cell}
      MessageInfo: [5×1 struct]
       Attributes: {}
    AttributeInfo: [0×0 struct]
         UserData: []
candb = canDatabase("C:\myVNTData\J1939.dbc")
candb = 

  Database with properties:

             Name: 'J1939'
             Path: 'C:\myVNTData\J1939.dbc'
            Nodes: {2×1 cell}
         NodeInfo: [2×1 struct]
         Messages: {2×1 cell}
      MessageInfo: [2×1 struct]
       Attributes: {3×1 cell}
    AttributeInfo: [3×1 struct]
         UserData: []

Input Arguments

collapse all

Database file name, specified as a character vector or string.. You can specify just the name or the full path of the database file.

Example: 'J1939.dbc'

Data Types: char | string

Output Arguments

collapse all

CAN database, returned as a database object with can.Database Properties.

Version History

Introduced in R2009a

See Also

Functions

Properties