Products & Services Solutions Academia Support User Community Company

Learn more about SimEvents   

sedb.detail - Package: sedb

Customize debugger simulation log in discrete-event simulation

Syntax

detail('none')
detail('default')
detail('all')
prev = detail(...)
detail(struc)
detail(paramname1, paramvalue1, paramname2, paramvalue2,...)
detail
curr = detail

Description

detail('none') configures the debugger to omit all simulation log messages, except upon reaching breakpoints. This syntax is the same as detail('en',0,'ev',0,'cal',0). You cannot use the step function to step to anything other than breakpoints when the debugger omits all simulation log messages.

detail('default') resets the detail settings to their default values. This syntax is the same as detail('en',1,'ev',1,'cal',0).

detail('all') configures the debugger to show all simulation log messages. This syntax is the same as detail('en',1,'ev',1,'cal',1).

prev = detail(...) configures the debugger based on the inputs, and also returns a structure that describes the previous detail settings.

detail(struc) uses the structure struc to establish detail settings.

detail(paramname1, paramvalue1, paramname2, paramvalue2,...) configures the debugger to show or omit certain kinds of messages in the simulation log. You can specify one, two, or three pairs of parameter names, paramnameN, and parameter values, paramvalueN.

detail displays the current detail settings.

curr = detail returns a structure that describes the current detail settings.

Inputs

paramnameN

Name of detail setting.

'ev'Event operations, except if at least one detail setting is 1, independent operations representing event executions appear. The exception holds true even if the 'ev' setting is 0.
'en'Entity operations
'cal'Event calendar information

paramvalueN

Value of detail setting.

0Omit messages, except upon reaching a breakpoint. Omitting entity messages or event messages also means that you cannot rely on the step function to step to an operation that corresponds to an omitted message.
1Show messages.

struc

Structure having three fields describing the detail settings that you want. Field names are the same as the names in the table that describes the paramnameN input. Field values are the same as the values in the table that describes the paramvalueN input.

Outputs

curr

Structure that describes the current detail settings. Field names are the same as the names in the table that describes the paramnameN input. Field values are the same as the values in the table that describes the paramvalueN input.

prev

Structure that describes the previous detail settings before changing them. Field names are the same as the names in the table that describes the paramnameN input. Field values are the same as the values in the table that describes the paramvalueN input.

Examples

Configure displays for breakpoints and stepping:

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

    sedebug('sedemo_timeout')
  2. Proceed in the simulation, suppressing the simulation log until the debugger reaches a breakpoint. At the sedebug>> prompt, enter:

    tbreak 2
    prev = detail('none')
    cont

    The output ends with the context of the simulation at T=2:

    Set b1 : Breakpoint for first operation at or after time 2.000000
    
    prev = 
    
         ev: 1
         en: 1
        cal: 0
    
    
    Hit b1 : Breakpoint for first operation at or after time 2.000000
    
    %==============================================================================%
    Executing EntityGeneration Event (ev10)               Time = 2.000000000000000
    : Entity = <none>                                     Priority = 1
    : Block  = Time-Based Entity Generator
  3. Now that the simulation is at a point of interest, configure the debugger to show the simulation log. This configuration makes subsequent step operations more informative. Then move forward in the simulation:

    detail(prev)
    step over

    The output confirms the change in detail settings and then shows the result of enabling the simulation log:

      Event Operations  (ev)   :  on
      Entity Operations (en)   :  on
      Event Calendar    (cal)  :  off
    
    
        %..........................................................................%
        Generating Entity (en4)
        : Block = Time-Based Entity Generator
        %..........................................................................%
        Entity Advancing (en4)
        : From = Time-Based Entity Generator
        : To   = Schedule Timeout
        %..........................................................................%
        Scheduling Timeout Event (ev11)
        : EventTime = 3.000000000000000
        : Priority  = 1700
        : Entity    = en4
        : Block     = Schedule Timeout
        %..........................................................................%
        Entity Advancing (en4)
        : From = Schedule Timeout
        : To   = Infinite Server
        %..........................................................................%
        Scheduling ServiceCompletion Event (ev12)
        : EventTime = 2.581301297500028
        : Priority  = 1
        : Entity    = en4
        : Block     = Infinite Server
        %..........................................................................%
        Scheduling EntityGeneration Event (ev13)
        : EventTime = 2.500000000000000
        : Priority  = 1
        : Block     = Time-Based Entity Generator
    %==============================================================================%
    Executing Timeout Event (ev5)                         Time = 2.000000000000000
    : Entity = en2                                        Priority = 1700
    : Block  = Infinite Server
  4. End the debugger session. At the sedebug>> prompt, enter:

    sedb.quit

See Also

sedb.cont | sedb.evbreak | sedb.tbreak

How To

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS