Package jmri.jmrix.bachrus
Class DccSpeedProfile
- java.lang.Object
-
- jmri.jmrix.bachrus.DccSpeedProfile
-
public class DccSpeedProfile extends java.lang.Object
Class to represent a dimensionless speed profile of a DCC decoder.
-
-
Field Summary
Fields Modifier and Type Field Description protected float[]
_dataPoints
protected int
_lastPoint
protected int
_length
protected float
_max
protected java.util.List<CSVRecord>
dccProfileData
-
Constructor Summary
Constructors Constructor Description DccSpeedProfile(int len)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
static void
export(DccSpeedProfile[] sp, int address, Speed.Unit unit)
static void
export(DccSpeedProfile sp, int address, java.lang.String dirString, Speed.Unit unit)
int
getLast()
int
getLength()
float
getMax()
float
getPoint(int idx)
int
importDccProfile(Speed.Unit unit)
static void
printHeading(CSVPrinter p, int address)
void
setMax(float m)
boolean
setPoint(int idx, float val)
-
-
-
Field Detail
-
_length
protected int _length
-
_dataPoints
protected float[] _dataPoints
-
_max
protected float _max
-
_lastPoint
protected int _lastPoint
-
dccProfileData
protected java.util.List<CSVRecord> dccProfileData
-
-
Constructor Detail
-
DccSpeedProfile
public DccSpeedProfile(int len)
-
-
Method Detail
-
setPoint
public boolean setPoint(int idx, float val)
-
clear
public void clear()
-
getPoint
public float getPoint(int idx)
-
getLength
public int getLength()
-
setMax
public void setMax(float m)
-
getMax
public float getMax()
-
getLast
public int getLast()
-
printHeading
public static void printHeading(@Nonnull CSVPrinter p, int address) throws java.io.IOException
- Throws:
java.io.IOException
-
export
public static void export(DccSpeedProfile sp, int address, java.lang.String dirString, Speed.Unit unit)
-
export
public static void export(DccSpeedProfile[] sp, int address, Speed.Unit unit)
-
importDccProfile
public int importDccProfile(Speed.Unit unit)
-
-