This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

matlab.DiscreteEventSystem class

Package: matlab
Superclasses: matlab.System

Base class for discrete-event system objects


matlab.DiscreteEventSystem is the base class for discrete-event System objects. In your class definition file, you must subclass your object from this base class (or from another class that derives from this base class). Subclassing allows you to use the implementation and service methods provided by this base class to build your object. Type this syntax as the first line of your class definition file to directly inherit from the matlab.DiscreteEventSystem base class, where ObjectName is the name of your object:

classdef ObjectName < matlab.DiscreteEventSystem

Define as public these methods:

  • blocked

  • destroy

  • entry

  • exit

  • generate

  • iterate

  • setupEvents

  • timer

For other methods, set Access = protected.


This list contains the methods to implement and the utility methods.

blockedEvent action when entity forward fails
cancelDestroyCancel previously scheduled entity destroy event
cancelForwardCancel previously scheduled forward events
cancelGenerateCancel previously scheduled entity generation event
cancelIterateCancel previously scheduled iterate event
cancelTimerCancel previously scheduled timer event
destroyEvent action upon entity destruction
entityTypeDefine entity type
entryEvent action when entity enters storage element
eventDestroyCreate entity destroy event
eventForwardCreate entity forward event
eventGenerateCreate entity generate event
eventIterateCreate entity iterate event
eventTestEntryCreate an event to indicate that the acceptance policy for the storage has changed and the storage retests arriving entities
eventTimerCreate entity timer event
exitEvent action before entity exit from storage
generateEvent action upon entity creation
getEntityPortsImplDefine input ports and output ports of discrete-event system
getEntityStorageImplDefine entity storage elements of discrete-event system
getEntityTypesImplDefine entity types of discrete-event system
initEventArrayInitialize event array
iterateEvent action when entity iterates
modifiedEvent action upon entity modification by the Entity Find block
queueFIFODefine first-in first-out (FIFO) queue storage
queueLIFODefine last-in last-out (LIFO) queue storage
queuePriorityDefine priority queue storage
queueSysPriorityDefine system priority queue storage
setupEventsInitialize entity generation events
testEntryEvent action to accept or refuse entity
timerEvent action when timer completes

Inherited Methods

The matlab.DiscreteEventSystem class inherits a subset of the matlab.System methods. For more information about these methods, see Customize System Objects for Simulink (Simulink). Some methods require the inheritance of additional classes from matlab.system.mixin package. For example, to specify a discrete state by using getDiscreteStateSpecificationImpl, inherit the matlab.system.mixin.Propagates class. For an example of inheriting this class, see Selection Server - Select Specific Entities from Server.


Name to display as block icon


Header for System object display


Property groups for System object display


Inactive property status


Validate property values


Action when tunable properties change


Number of inputs to step method


 Names of System block input ports


Number of outputs from step method


Names of System block output ports


 Sizes of output ports


 Data types of output ports


Complexity of output ports


Discrete state size, data type, and complexity


Discrete state property values


Initialize event array


Initialize System object


Reset System object states


Release resources


Load System object from MAT file


 Save System object in MAT file


Information about System object


End-of-data flag

Introduced in R2016a