Products & Services Solutions Academia Support User Community Company

Learn more about SimEvents   

sedb.evinfo - Package: sedb

Event information in discrete-event simulation

Syntax

ev_struct = evinfo(evid)

Description

ev_struct = evinfo(evid) returns a structure that stores information about the event with identifier evid. To obtain a list of events on the event calendar and their identifiers, use sedb.evcal.

Outputs

ev_struct

Structure that stores information about the event. The following table describes the ev_struct fields.

FieldDescription
IDEvent identifier
EventTypeType of event
EventTimeScheduled time of event
PriorityPriority of event
EntityIdentifier of entity associated with the event
BlockPath name of block that executes the event

Examples

View event information:

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

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

    step

    The output shows the identifier, ev1, in the display:

    %==============================================================================%
    Initializing Time-Based Entity Generators
        %..........................................................................%
        Scheduling EntityGeneration Event (ev1)
        : EventTime = 0.000000000000000 (Now)
        : Priority  = 1
        : Block     = Time-Based Entity Generator
  3. View information about the event that the application is about to schedule:

    evid = gcev
    evdetails = evinfo(evid)

    The output shows the same identifier, ev1, in the workspace variable, evid, and the ID field of the structure, evdetails:

    evid =
    
    ev1
    
    
    evdetails = 
    
               ID: 'ev1'
        EventType: 'EntityGeneration'
        EventTime: 0
         Priority: '1'
           Entity: ''
            Block: [1x51 char]
  4. End the debugger session. At the sedebug>> prompt, enter:

    sedb.quit

See Also

sedb.evcal | sedb.gcev

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