Main Content

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:

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


Related Topics