| Contents | Index |
opts_struct = se_getdbopts
opts_struct = se_getdbopts returns an empty options structure that you can configure and then use as an input to the sedebug function. You can set the StartFcn field of opts_struct to a cell array of strings representing commands that the debugger executes after the debugger session begins.
opts_struct |
Structure that describes options for a SimEvents debugger session. The StartFcn field of the structure is a cell array of strings. |
Set breakpoints upon starting the debugger:
At the MATLAB command prompt, create an options structure to use in future debugger sessions:
opts_struct = se_getdbopts;
opts_struct.StartFcn = {'tbreak 1', 'tbreak 2'};For a particular model, begin a debugger session using a syntax that includes opts_struct as an input argument. Using this argument causes the debugger to execute the commands in the opts_struct.StartFcn field automatically:
sedebug('sedemo_outputswitch', opts_struct)The output in the MATLAB Command Window reflects model initialization followed by the setting of two breakpoints:
*** SimEvents Debugger *** Functions | Help | Watch Video Tutorial %==============================================================================% Initializing Model sedemo_outputswitch Set b1 : Breakpoint for first operation at or after time 1 Set b2 : Breakpoint for first operation at or after time 2
Proceed in the simulation until the first breakpoint. At the sedebug>> prompt, enter:
cont
The output is:
%==============================================================================%
Initializing Time-Based Entity Generators
%..........................................................................%
Scheduling EntityGeneration Event (ev1)
: EventTime = 1.000000000000000
: Priority = 500
: Entity = <none>
: Block = Time-Based Entity Generator
Hit b1 : Breakpoint for first operation at or after time 1
%==============================================================================%
Executing EntityGeneration Event (ev1) Time = 1.000000000000000
: Entity = <none> Priority = 500
: Block = Time-Based Entity GeneratorEnd the debugger session. At the sedebug>> prompt, enter:
sedb.quit

Learn how you can use SimEvents discrete-event simulation capabilities through these technical resources.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |