| Contents | Index |
| On this page… |
|---|
These sections provide procedures and background information about inspecting entities:
For an example, see the sedb.eninfo reference page.
If you expect all attributes of an entity to have scalar values or if knowing the sizes of nonscalar attribute values is sufficient, then this procedure is the simplest way to inspect the entity:
Find the entity identifier using the simulation log or one of the approaches listed in Obtaining Entity Identifiers.
At the sedebug>> prompt, enter this command, where enid is the entity identifier:
eninfo enid % enid is the identifier.
The resulting display includes this information:
Current simulation time
Location of the entity
Names of attributes of the entity
Scalar attribute values and sizes of nonscalar attribute values
Tags, scheduled times, and event identifiers of timeouts
Tags and elapsed times of timers
To inspect nonscalar values of attributes of an entity:
Find the entity identifier using the simulation log or one of the functions listed in Obtaining Entity Identifiers.
At the sedebug>> prompt, enter this command. enid is a string representing the entity identifier and en_struct is the name of a variable you want to create in the workspace:
en_struct = eninfo(enid); % enid is the identifier.
The output variable en_struct is a structure that stores this information:
Current simulation time
Location of the entity
Names and values of the attributes of the entity
Tags, scheduled times, and event identifiers of timeouts
Tags and elapsed times of timers
Use dot notation to access values of any attribute as part of the Attributes field of en_struct.
For example, to access the value of an attribute called Attribute1, use the notation en_struct.Attributes.Attribute1. The field name Attributes is fixed but the names en_struct and Attribute1 depend on names you choose for the variable and attribute.
Blocks that possess entity input ports act as storage or nonstorage blocks. Only storage blocks are capable of holding an entity for a nonzero duration. If the debugger reports a nonstorage block as the location of an entity, it means that the debugger has suspended the simulation while the entity is in the process of advancing through a nonstorage block toward a storage block or a block that destroys entities. Before the simulation clock moves ahead, the entity will either arrive at a storage block or be destroyed.
For lists of storage and nonstorage blocks, see Storage and Nonstorage Blocks.
To inspect blocks instead of entities, see Inspecting Blocks.
Before inspecting a block, determine if it is capable of providing information. One way to do this is to see whether the block appears in the output of blklist. If the block is capable of providing information, use this procedure to get the information:
Find a unique way to refer to the block using one of these approaches:
Find the block identifier using one of the approaches listed in Obtaining Block Identifiers.
Find the path name of the block by selecting the block and using gcb, or by typing the path name. If you type the path name, be careful to reflect space characters and line breaks accurately.
At the sedebug>> prompt, enter this command , where thisblk is a string representing the block identifier or path name:
blkinfo(thisblk); % thisblk is the identifier or path name.
The resulting information depends on the kind of block you are inspecting.
When you inspect queue blocks, the display includes this information:
Current simulation time
Identifiers of entities that the block is currently storing
Number of entities that the block can store at a time
Status of each stored entity with respect to the block
Length of time each stored entity has been in the queue
When you inspect server blocks, the display includes this information:
Current simulation time
Identifiers of entities that the block is currently storing
Number of entities that the block can store at a time
Status of each stored entity with respect to the block
Identifier and scheduled time of the service completion event for each entity
When you inspect storage blocks other than queues and servers, the display includes this information:
Current simulation time
Identifiers of entities that the block is currently storing
For the Output Switch block with the Store entity before switching option selected, the resulting display also indicates which entity output port is the selected port.
For a list of storage blocks, see Storage and Nonstorage Blocks.
When you inspect nonstorage blocks, the display includes this information:
Current simulation time
Identifier of an entity that is currently advancing through the block. To learn what it means for a nonstorage block to be the location of an entity, see Interpretation of Entity Location.
Depending on the block, the display might also include additional information. For details, see the Block and Description columns of the Fields of Output Structure table on the sedb.blkinfo reference page.
To get details about a particular event on the event calendar:
Find the event identifier using the simulation log or one of the approaches listed in Obtaining Event Identifiers.
At the sedebug>> prompt, enter this command, where evid is the event identifier:
evinfo evid % evid is the identifier.
Alternatively, at the sedebug>> prompt, enter evcal to get details about all events on the event calendar. For more information, see the sedb.evcal reference page.
In some state inspection functions, you must refer to an entity, block, or event using its identifier. For background information about identifiers, see Identifiers in the Debugger. The next tables suggest ways to obtain identifiers to use as input arguments in state inspection commands.
Obtaining Entity Identifiers
| To Display Identifier of Entity Associated with... | At sedebug>> Prompt, Enter... | Link to Reference Page |
|---|---|---|
| The current operation | gcen | sedb.gcen |
| A particular block whose identifier or path name you know | blkinfo(...). Look in the ID column in the resulting tabular display. | sedb.blkinfo |
| Events on the event calendar | evcal. Look in the Entity column in the resulting tabular display. | sedb.evcal |
| A particular event whose identifier you know | evinfo(...). Look at the Entity entry. | sedb.evinfo |
Obtaining Block Identifiers
| To Display Identifier of Block Associated with... | At sedebug>> Prompt, Enter... | Link to Reference Page |
|---|---|---|
| The current operation | gcebid | sedb.gcebid |
| All blocks whose states you can inspect | blklist. Look in the first column in the resulting tabular display. | sedb.blklist |
Obtaining Event Identifiers
| To Display Identifier of Event Associated with... | At sedebug>> Prompt, Enter... | Link to Reference Page |
|---|---|---|
| The current operation | gcev | sedb.gcev |
| Events on the event calendar | evcal. Look in the ID column in the resulting tabular display. | sedb.evcal |
![]() | Inspecting the Current Point in the Debugger | Working with Debugging Information in Variables | ![]() |

Model electronic system architectures, process flows, and logistics as queuing systems or agent-based systems.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |