Documentation Center

  • 評価版
  • 製品アップデート

sedb.enbreak

Package: sedb

Set breakpoint on operation involving target entity

Syntax

enbreak(enid)
enbreak enid
benid = enbreak(enid)

Description

enbreak(enid) or enbreak enid sets a breakpoint for execution or cancellation of the entity with identifier enid in the simulation.

benid = enbreak(enid) returns the identifier of the entity breakpoint.

Input Arguments

enid

String that represents an entity identifier.

Output Arguments

benid

String that represents an entity breakpoint identifier.

Examples

Set a breakpoint on an advancing entity.

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

    sedebug('sedemo_timeout')
  2. Proceed in the simulation. At the sedebug>> prompt, enter:

    step over

    The output is:

    %==============================================================================%
    Initializing Time-Based Entity Generators
        %..........................................................................%
        Scheduling EntityGeneration Event (ev1)
        : EventTime = 0.500000000000000
        : Priority  = 1
        : Entity    = <none>
        : Block     = Time-Based Entity Generator
    %==============================================================================%
    Executing EntityGeneration Event (ev1)                Time = 0.500000000000000
    : Entity = <none>                                     Priority = 1
    : Block  = Time-Based Entity Generator
  3. Proceed further on in the simulation. At the sedebug>> prompt, again, enter:

    step over

    The output is:

     %..........................................................................%
        Generating Entity (en1)
        : Block = Time-Based Entity Generator
        %..........................................................................%
        Entity Advancing (en1)
        : From = Time-Based Entity Generator
        : To   = Schedule Timeout
        %..........................................................................%
        Scheduling Timeout Event (ev2)
        : EventTime = 1.500000000000000
        : Priority  = 1700
        : Entity    = en1
        : Block     = Schedule Timeout
        %..........................................................................%
        Entity Advancing (en1)
        : From = Schedule Timeout
        : To   = Infinite Server
        %..........................................................................%
        Scheduling ServiceCompletion Event (ev3)
        : EventTime = 0.596864516245641
        : Priority  = 1
        : Entity    = en1
        : Block     = Infinite Server
        %..........................................................................%
        Executing Scope
        : Block = Number of Entities Time-Stamped
        %..........................................................................%
        Scheduling EntityGeneration Event (ev4)
        : EventTime = 1.000000000000000
        : Priority  = 1
        : Entity    = <none>
        : Block     = Time-Based Entity Generator
    %==============================================================================%
    Executing ServiceCompletion Event (ev3)               Time = 0.596864516245641
    : Entity = en1                                        Priority = 1
    : Block  = Infinite Server
  4. Set a breakpoint that causes the debugger to stop when it is about to advance the entity, en1.

  5. The output confirms the operation:

    Set b1 : Breakpoint for operation involving entity en1
  6. Run the simulation until the breakpoint:

    cont
  7. The output shows that the debugger hits the entity and stops upon hitting the breakpoint at entity, en1.

    Hit b1 : Breakpoint for operation involving entity en1
    
        %..........................................................................%
        Entity Advancing (en1)
        : From = Infinite Server
        : To   = Cancel Timeout
  8. End the debugger session. At the prompt, enter:

    sedb.quit

See Also

|

Was this topic helpful?