Skip to Main Content Skip to Search
Product Documentation

attachDatabase - Attach CAN database to messages and remove CAN database from messages

Syntax

attachDatabase (message, database)
attachDatabase (message, [])

Description

attachDatabase (message, database) attaches the specified database to the specified message. You can then use signal-based interaction with the message data, interpreting the message in its physical form.

attachDatabase (message, []) removes any attached database from the specified message. You can then interpret messages in their raw form.

Input Arguments

message

The name of the CAN message that you want to attach the database to or remove the database from.

database

Handle containing the database (.dbc file) that you want to attach to the message or remove from the message.

Tips

If the specified message is an array, then the database attaches itself to each entry in the array. The database attaches itself to the message even if the message you specified does not exist in the database. The message then appears and operates like a raw message. To attach the database to the CAN channel directly, edit the Database property of the channel object.

Examples

candb = canDatabase('C:\Database.dbc')
message = receive(canch, Inf)
attachDatabase(message, candb)
    

See Also

canDatabase | receive

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS