Class LinearDataFeed
- java.lang.Object
-
- io.patriot_framework.generator.dataFeed.LinearDataFeed
-
-
Constructor Summary
Constructors Constructor Description LinearDataFeed(double period)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getCurrentTime()
String
getLabel()
Returns label for DataFeedData
getNextValue(Object... params)
Returns value from DataFeed.double
getPeriod()
Data
getPreviousValue()
Returns last generated value from DataFeed.void
setCurrentTime(double currentTime)
void
setLabel(String label)
Sets label for DataFeedvoid
setPeriod(double period)
-
-
-
Method Detail
-
getPeriod
public double getPeriod()
-
setPeriod
public void setPeriod(double period)
-
getCurrentTime
public double getCurrentTime()
-
setCurrentTime
public void setCurrentTime(double currentTime)
-
getNextValue
public Data getNextValue(Object... params)
Description copied from interface:DataFeed
Returns value from DataFeed. This method is used to compute new data. Flexibility with number of parameters aims to provide freedom in implementation of whole DataFeed.- Specified by:
getNextValue
in interfaceDataFeed
- Parameters:
params
- for DataFeed computing- Returns:
- computed value
-
getPreviousValue
public Data getPreviousValue()
Description copied from interface:DataFeed
Returns last generated value from DataFeed. Important for easy comparison between new and previous values.- Specified by:
getPreviousValue
in interfaceDataFeed
- Returns:
- last generated value
-
setLabel
public void setLabel(String label)
Description copied from interface:DataFeed
Sets label for DataFeed
-
-