Produce a pulse with a shape specified by the parameters.
The <i>values</i> parameter contains an ArrayToken, which specifies
the sequence of values to produce at the output. The <i>indexes</i>
parameter contains an array of integers, which specifies when those values
should be produced. The array in the <i>indexes</i> parameter
must have the same length as that in the
<i>values</i> parameter or an exception will be thrown by the fire() method.
Also, the <i>indexes</i> array must be increasing and non-negative,
or an exception will be thrown when it is set.
<p>
Eventually, this actor will support various kinds of interpolation.
For now, it outputs a zero (of the same type as the values) whenever
the iteration count does not match an index in <i>indexes</i>.
<p>
The default for the <i>values</i> parameter is
an integer vector of form {1, 0}.
The default indexes array is {0, 1}.
Thus, the default output sequence will be 1, 0, 0, ...
<p>
However, the Pulse actor has a <I>repeat</i> parameter. When set to
true, the defined sequence is repeated indefinitely. Otherwise, the
default sequence of zero values result.
<p>
The type of the output can be any token type. This type is inferred
from the element type of the <i>values</i> parameter.
<p>The Ptolemy Expression language has several constructs that are
useful for creating arrays for use as values or indexes:
<dl>
<dt><code>[0:1:100].toArray()</code>
<dd>Matlab style array construction that creates an array of 100 elements,
0 through 99.
<dt><code>repeat(100, {1}(0))</code>
<dd>Creat a sequence of one hundred 1's.
</dl>
<p>
NOTE: A reset input for this actor would be useful. This would reset
the iterations count, to cause the pulse to emerge again.
Edward A. Lee
$Id: Pulse.java 70398 2014-10-22 23:44:32Z cxh $
Ptolemy II 0.2
Yellow (eal)
Yellow (cxh)
The indexes at which the specified values will be produced.
This parameter is an array of integers, with default value {0, 1}.
The flag that indicates whether the pulse sequence needs to be
repeated. This is a boolean, and defaults to false.
The values that will be produced at the specified indexes.
This parameter is an array, with default value {1, 0}.