SWDataMonitor evaluates a function regularly and keeps track of the data that is output by the function. This class is primarily used underneath SWPlotterMonitor but can be useful for other applications as well.
Creates a new instance of SWDataMonitor.
updater |
The Function to evaluate to generate new data. This Function should either return a SimpleNumber, or an Array of numbers. |
length |
The amount of points to plot. |
plotter |
The function to plot or otherwise use the data obtained from the update function. |
nc |
The number of channels in the data - this should match what the updater function returns. |
dt |
The deltatime with which to evaluate the function. |
skip |
How often to plot, in multiples of dt. So if you set this to 5, the updater function will be evaluated 5 times at a time interval of dt, and then update the plot. |
The time interval for evaluating the function.
The function to obtain the data to be monitored.
The function that uses the data, e.g. to plot it in a Plotter window.
The amount of updates to skip before executing the plotFunction.
The gathered data.
The maximum length of the data.
The number of channels of the data.
Resets all data points with the value 0, and resets the skip counter.
Starts the SWDataMonitor.
Boolean to indicate whether the SWDataMonitor is currently running.
Stop the SWDataMonitor
The SkipJack that executes the updateFunction
, and every skip
times the plotFunction
an instance of SkipJack.