sedb.blklist

Package: sedb

Blocks and their identifiers in discrete-event simulation

Syntax

blklist
blk_cell = blklist

Description

blklist displays a list of event-based blocks and block identifiers in the model that you are debugging. The list includes all blocks for which blkinfo or blkbreak is valid, including controlled Simulink® blocks and the gateway blocks. The list excludes virtual subsystems but includes relevant blocks inside virtual subsystems. In the Command Window, you can click hyperlinks to highlight the blocks in the model window.

blk_cell = blklist returns the same information as blklist in a cell array of strings.

Output Arguments

blk_cell

Cell array of strings. The first column of blk_cell contains block identifiers. In the second column, the corresponding cells contain block path names.

Examples

In the Command Window, view the block list and store it in a variable:

  1. Begin a debugger session for a particular model. At the MATLAB® command prompt, enter:

    sedebug('sedemo_count_attributes')
  2. View the list of blocks. At the sedebug>> prompt, enter:

    blklist

    The output is:

    List of blocks in model: sedemo_count_attributes
    
       blk1                Entity Data
       blk3                Entity Sink
       blk6                Event-Based Random Number
       blk2                Get Attribute
       blk4                Set Attribute
       blk5                Time-Based Entity Generator
    
  3. Store the list of blocks in a variable and examine one row of the cell array:

    x = blklist;
    x{1,:}

    The output indicates the identifier and path name of one block in the model:

    ans =
    
    blk1
    
    
    ans =
    
    sedemo_count_attributes/Entity Data
    
  4. End the debugger session. At the sedebug>> prompt, enter:

    sedb.quit

More About

Was this topic helpful?