Class SketchedSource

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

    public class SketchedSource
    extends SequencePlotter
    implements EditListener
    This actor is a plotter that also produces as its output a signal that has been sketched by the user on the screen. The length parameter specifies the number of samples in the sketched signal. The periodic parameter, if true, specifies that the signal should be repeated. If this parameter is false, then the sketched signal is produced exactly once, at the beginning of the execution of the model. If periodic is true and the sketch is modified during execution of the model, then the modification appears in the next cycle after the modification has been completed. In other words, the change does not appear mid-cycle.

    This actor is also a plotter, and will plot the input signals on the same plot as the sketched signal. It can be used in a feedback loop where the output affects the input. The first batch of outputs is produced in the initialize() method, so it can be put in a feedback loop in a dataflow model.

    Since:
    Ptolemy II 1.0
    Version:
    $Id$
    Author:
    Edward A. Lee
    Pt.AcceptedRating:
    Red (vogel)
    Pt.ProposedRating:
    Yellow (eal)
    • Field Detail

      • initialTrace

        public Parameter initialTrace
        The default signal to generate, prior to any user sketch. By default, this contains an array of zeros with the length given by the length parameter.
      • length

        public Parameter length
        The length of the output signal that will be generated. This parameter must contain an IntToken. By default, it has value 100.
      • output

        public TypedIOPort output
        The output port. The type of this port is double.
      • periodic

        public Parameter periodic
        An indicator of whether the signal should be periodically repeated. This parameter must contain a boolean token. By default, it has value true.
      • runOnModification

        public Parameter runOnModification
        If true, then when the user edits the plot, if the manager is currently idle, then run the model. This is a boolean that defaults to false.
      • yBottom

        public Parameter yBottom
        The bottom of the Y range. This is a double, with default value -1.0.
      • yTop

        public Parameter yTop
        The top of the Y range. This is a double, with default value 1.0.