Class When

  • All Implemented Interfaces:
    java.lang.Cloneable, Actor, Executable, FiringsRecordable, Initializable, TypedActor, Changeable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    public class When
    extends Transformer
    When the control input is true, copy the input to the output. If control is absent, false, or true with input being absent, then the output is absent. This actor is inspired by the "when" operator in the synchronous languages LUSTRE and SIGNAL.

    Note that this actor does not read the input at all if the control input is either absent or has value false. If you need an actor that always reads the input, use the BooleanSwitch.

    P. Caspi, D. Pilaud, N. Halbwachs, and J. A. Plaice, "LUSTRE: A Declarative Language for Programming Synchronous Systems," Conference Record of the 14th Annual ACM Symp. on Principles of Programming Languages, Munich, Germany, January, 1987.

    A. Benveniste and P. Le Guernic, "Hybrid Dynamical Systems Theory and the SIGNAL Language," IEEE Tr. on Automatic Control, Vol. 35, No. 5, pp. 525-546, May 1990.

    Since:
    Ptolemy II 4.1
    Version:
    $Id$
    Author:
    Edward A. Lee
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Yellow (eal)