Main Content

linDatabase

Create LIN database from LDF file

Since R2025a

Description

LINdbObj = linDatabase(ldfFile) parses the specified LIN description file (LDF) for a Local Interconnect Network (LIN), and creates a linked database object. You can specify ldfFile as a full or relative path, or as only a file name on the path. This function supports LIN version 2.2 LDF files. You can use the returned LIN Database object as an input argument to blfread or linMessageTimetable for message decoding.

example

Examples

collapse all

Parse an LDF file and create a LIN database object in the workspace.

LINdbObj = linDatabase("LIN_CH6.ldf")
LINdbObj = 

  Database with properties:

   File Information
               Name: "LIN_CH6.ldf"
               Path: "C:\working\LIN_CH6.ldf"
    ProtocolVersion: 2.2000
    LanguageVersion: 2.2000
           BusSpeed: 19.2000

   Network Information
              Nodes: [3×3 table]
             Frames: [3×5 table]
            Signals: [6×5 table]

Use the Database object when decoding LIN messages.

LINmsgs = blfread("Logging_BLF.blf", 2, ProtocolMode="LIN", Database=LINdbObj);

Input Arguments

collapse all

LDF file specified as a string or character vector. It can be a full or relative path, or a file name on the path. This function supports LIN version 2.2 LDF files.

Example: "LINdbFile.ldf"

Data Types: char | string

Output Arguments

collapse all

LIN database object with properties describing LDF file and network information.

Version History

Introduced in R2025a