Custom Entity Generator Block with Signal Input and Signal Output

This example shows how to create a custom source block that generates entities and to
manage discrete states when implementing the discrete-event System
object™ methods.

Suppose that you manage a facility that produces raw materials with a fixed
deterministic rate. The materials contain a 12-digit bar code for stock management and
priority values for order prioritization. To represent this behavior, this example shows
how to generate a custom entity storage block is generated with one signal input port,
one entity output port, one signal output port, and one storage element. The block
generates entities with distinct priority values. The entities carry data and depart the
block from its output port. The entity priority values are acquired from values of the
incoming signal.

Create the Discrete-Event System Object

The block is defined as a custom entity generator block that generates entities
with specified intergeneration periods. The generated entities carry data, and their
priority values are determined by the values of the input signal.