Full Library / Source / Interactive / SketchedSource
Block Name: SketchedSource
- 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.
legend
The legend is
a comma-separated list of labels to attach to each dataset. The number
of elements in this list should equal the number of input channels,
although this is not enforced.
xUnit
public Parameter xUnit
- The increment of the X axis.
xInit
public Parameter xInit
- The start point of the X axis.
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.
_count
private int _count
- Current position in the signal.
_data
private double[][] _data
_dataModified
private boolean _dataModified
- Indicator that the user has modified the data.
_initialTraceIsSet
private boolean _initialTraceIsSet
- Indicator that initial trace has been supplied.
_zero
private static DoubleToken _zero
Created with the Personal Edition of HelpNDoc: Create help files for the Qt Help Framework