Class VariablePlotTimeSeriesDataSource<T extends MguiNumber>

java.lang.Object
mgui.interfaces.plots.PlotXYDataSource<T>
mgui.interfaces.plots.PlotTimeSeriesDataSource<T>
mgui.interfaces.plots.VariablePlotTimeSeriesDataSource<T>
All Implemented Interfaces:
InterfaceDataSource<T>, InterfaceDataSourceTimeSeries<T>, InterfaceDataSourceXY<T>, NamedDataSource, VariableListener

public class VariablePlotTimeSeriesDataSource<T extends MguiNumber>
extends PlotTimeSeriesDataSource<T>
implements VariableListener
An XY data source with a VariableInt as its source.
Since:
1.0
Version:
1.0
Author:
Andrew Reid
  • Constructor Details

    • VariablePlotTimeSeriesDataSource

      public VariablePlotTimeSeriesDataSource()
  • Method Details

    • setXVariable

      public void setXVariable​(java.lang.String var_string) throws java.io.IOException
      Set the X variable, as a string of the form:

      {variable='[var_name]' part='[part_string]'},

      where [part_string] has the syntax "x_start,y_start,..,n_start:x_start,y_start,..,n_start". E.g., "1,2:20,2". Use asterisk, "*" to indicate last element in a dimension. E.g,, "1,2:*,*".

      Parameters:
      var_string -
      Throws:
      java.io.IOException
      See Also:
      VariableInt
    • setX

      public void setX​(java.util.ArrayList<T> x)
      Description copied from class: PlotTimeSeriesDataSource
      Copies the X data series to this data source.
      Overrides:
      setX in class PlotTimeSeriesDataSource<T extends MguiNumber>
    • setXPart

      protected void setXPart​(java.lang.String part)
    • addYVariable

      public void addYVariable​(java.lang.String var_string) throws java.io.IOException
      Adds a Y variable, as a string of the form:

      {variable='[var_name]' part='[part_string]'},

      where [part_string] has the syntax "x_start,y_start,..,n_start:x_start,y_start,..,n_start". E.g., "1,2:20,2". Use asterisk, "*" to indicate last element in a dimension. E.g,, "1,2:*,*".

      Parameters:
      var_string -
      Throws:
      java.io.IOException
      See Also:
      VariableInt
    • setYPart

      protected void setYPart​(java.lang.String name, java.lang.String part) throws java.io.IOException
      Throws:
      java.io.IOException
    • getChannelNames

      public java.util.ArrayList<java.lang.String> getChannelNames()
      Specified by:
      getChannelNames in interface NamedDataSource
      Overrides:
      getChannelNames in class PlotTimeSeriesDataSource<T extends MguiNumber>
    • reset

      public void reset() throws java.io.IOException
      Resets this data source.
      Overrides:
      reset in class PlotXYDataSource<T extends MguiNumber>
      Throws:
      java.io.IOException
    • variableValuesUpdated

      public void variableValuesUpdated​(VariableEvent e)
      Description copied from interface: VariableListener
      Called when a variable's values are updated
      Specified by:
      variableValuesUpdated in interface VariableListener