public class TimedValues
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
TimedValues.Track |
Modifier and Type | Field and Description |
---|---|
(package private) int |
ix
The current index can be helpfully to fill.
|
private int |
length |
private Timeshort |
timeAbs
Association to the absolute time of all values of this series.
|
private int[] |
timeShort
Proper to the values: relative wrapping time associated to each measurement point.
|
private int[] |
timeShortAdd
This is the relation between #timeShort and the absolute time stored in #timeAbs.
|
private java.util.Map<java.lang.String,TimedValues.Track> |
tracks |
static int |
version
Version, history and license.
|
Constructor and Description |
---|
TimedValues(int capacity) |
Modifier and Type | Method and Description |
---|---|
TimedValues.Track |
addTrack(java.lang.String name,
char typeChar) |
void |
cleanSetCapacity(int length)
Defines the capacity for new tracks and cleans existing tracks.
|
int |
getIncrIx() |
int |
getIncrWrapIx() |
int |
getLength() |
int |
getsetTimeShort(int ix,
int timeShort,
int timeShortAdd) |
int |
getTimeShort(int ix) |
TimedValues.Track |
getTrack(java.lang.String name)
Get a track to work.
|
boolean |
increaseCapacity(int length)
Increases the capacity of all given tracks and set the length for new tracks.
|
void |
setTimeShort(int ix,
int timeShort,
int timeShortAdd)
Set the timeShort to the correspond value.
|
public static final int version
org.vishia.gral.base.GralCurveView
data. It is commonly usable.
private Timeshort timeAbs
private java.util.Map<java.lang.String,TimedValues.Track> tracks
private int[] timeShort
private int[] timeShortAdd
Timeshort.absTime_short
,
the timeShort
value and this value should be added.
Then Timeshort.absTime_short
should be subtract.
The result is the number of timeShort increments which should be added to the given Timeshort.absTime
.int ix
private int length
public int getLength()
public void cleanSetCapacity(int length)
length
- the number of values able to store.public boolean increaseCapacity(int length)
length
- new length If the length is equivalent to the given length, nothing else is done.public TimedValues.Track addTrack(java.lang.String name, char typeChar)
public TimedValues.Track getTrack(java.lang.String name)
name
- public int getIncrIx()
public int getIncrWrapIx()
public int getTimeShort(int ix)
public int getsetTimeShort(int ix, int timeShort, int timeShortAdd)
public void setTimeShort(int ix, int timeShort, int timeShortAdd)
ix
- to this indextimeShort
- given timeShort from the source (controller etc.) may be recount from 0 after resettimeShortAdd
- adding value either due to timeAbs adjustment or due to restart/recount. Maybe 0 if not used.