Interface DiscreteSignal
-
public interface DiscreteSignal
A discrete time series signal data object, containing [time(ms),val] data points, and interpMode property. Data points are guaranteed to be in chronological order, and not null. Time Units are always milliseconds.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DiscreteSignal
exactTimeRange(java.lang.Number startTimeMillis, java.lang.Number endTimeMillis)
Returns a trimmed/extended copy, with end points interpolated/extended to match the time range specified.com.inductiveautomation.ignition.common.Dataset
getData()
Returns the [time(ms),value] points in this signal as an Ignition Dataset.com.inductiveautomation.ignition.common.Dataset
getDateData()
Returns the points in this signal as an Ignition Dataset, with timestamps converted to Date.java.lang.String
getInterpMode()
Get an indication of how the signal should be interpolated when estimating a data point between available points.int
getRowCount()
TimeRange
getTimeRange()
Convenience method to access this signal's time range without digging into the dataset.DiscreteSignal
resampled(int numPoints)
Creates a new signal by resampling at evenly spaced intervals.
-
-
-
Method Detail
-
getData
com.inductiveautomation.ignition.common.Dataset getData()
Returns the [time(ms),value] points in this signal as an Ignition Dataset.
-
getDateData
com.inductiveautomation.ignition.common.Dataset getDateData()
Returns the points in this signal as an Ignition Dataset, with timestamps converted to Date.
-
getInterpMode
java.lang.String getInterpMode()
Get an indication of how the signal should be interpolated when estimating a data point between available points. Data logged at a regular interval, or previously interpolated (i.e. "resampled") data should typically have this property set to 'linear'. Data that was logged on change should typically use 'step' interpolation. This property is important for simulations, model fitting, plotting, etc.- Returns:
- The interpolation mode. Valid values are 'linear' and 'step'.
-
getTimeRange
TimeRange getTimeRange()
Convenience method to access this signal's time range without digging into the dataset.
-
resampled
DiscreteSignal resampled(int numPoints)
Creates a new signal by resampling at evenly spaced intervals. The sampled value is interpolated according to the interpMode setting. NOTE: The returned signal interpMode will always be "linear".- Parameters:
numPoints
- the number of points in the returned signal.- Returns:
- A signal containing an interpolated copy of this signal.
-
exactTimeRange
DiscreteSignal exactTimeRange(java.lang.Number startTimeMillis, java.lang.Number endTimeMillis)
Returns a trimmed/extended copy, with end points interpolated/extended to match the time range specified. End values are interpolated if they fall within the existing time range. If outside the range, the nearest value is used at that time. Useful for display/charting purposes.- Parameters:
startTimeMillis
- the time of first point in the new signal (millis).endTimeMillis
- the time of first point in the new signal (millis).- Returns:
- A signal containing a "slice" of this signal, with the exact time range specified. (interpolated or extended end points).
-
getRowCount
int getRowCount()
- Returns:
- the number of data points in the signal.
-
-