Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

attachDatabase

Attach CAN database to messages and remove CAN database from messages

Syntax

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

Description

example

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.

Examples

collapse all

Attach Database.dbc to a received CAN message.

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

Input Arguments

collapse all

The name of the CAN message that you want to attach the database to or remove the database from, specified as a CAN message object.

Example: message = receive(canch,Inf)

Handle of database (.dbc file) that you want to attach to the message or remove from the message, specified as a canDatabase handle.

Example: candb = canDatabase('C:\Database.dbc')

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.

See Also

Functions

Introduced in R2009a

Was this topic helpful?