This is machine translation

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

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

View Message Information in a CAN Database

You can look up information on message definitions by a single message by name, or a single message by ID. You can also look up information on all message definitions in the database by typing:

msgInfo = messageInfo(database name)

This returns the message structure of information about messages in the database. For example:

msgInfo = messageInfo(db)
msgInfo = 

5x1 struct array with fields:
    Name
    Comment
    ID
    Extended
    Length
    Signals

To get information on a single message by message name, type:

msgInfo = messageInfo(database name,'message name')

This returns information about the message as defined in the database. For example:

msgInfo = messageInfo(db,'EngineMsg')
msgInfo = 

        Name: 'EngineMsg'
     Comment: ''
          ID: 100
    Extended: 0
      Length: 8
     Signals: {2x1 cell}

Here the function returns information about message with name EngineMsg in the database db. You can also use the message ID to get information about a message. For example, to view the example message given here by inputting the message ID, type:

msgInfo = messageInfo(db,100,false)

This command provides the database name, the message ID, and a Boolean value for the extended value of the ID.

See Also

Functions

Related Topics