Pulse
ptolemy.actor.lib.Pulse

Produce a pulse with a shape specified by the parameters. The values parameter contains an ArrayToken, which specifies the sequence of values to produce at the output. The indexes parameter contains an array of integers, which specifies when those values should be produced. The array in the indexes parameter must have the same length as that in the values parameter or an exception will be thrown by the fire() method. Also, the indexes array must be increasing and non-negative, or an exception will be thrown when it is set.

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 indexes.

The default for the values 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, ...

However, the Pulse actor has a repeat parameter. When set to true, the defined sequence is repeated indefinitely. Otherwise, the default sequence of zero values result.

The type of the output can be any token type. This type is inferred from the element type of the values parameter.

NOTE: A reset input for this actor would be useful. This would reset the iterations count, to cause the pulse to emerge again.

Author(s): Edward A. Lee
Version:$Id: Pulse.java,v 1.65 2005/07/08 19:56:03 cxh Exp $
Pt.Proposed Rating:Yellow (eal)
Pt.Accepted Rating:Yellow (cxh)




indexes
The indexes at which the specified values will be produced. This parameter is an array of integers, with default value {0, 1}.

repeat
The flag that indicates whether the pulse sequence needs to be repeated. This is a boolean, and defaults to false.

values
The values that will be produced at the specified indexes. This parameter is an array, with default value {1, 0}.