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[]_dataPointsprotected int_lastPointprotected int_lengthprotected float_maxprotected 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 voidclear()static voidexport(DccSpeedProfile[] sp, int address, Speed.Unit unit)static voidexport(DccSpeedProfile sp, int address, java.lang.String dirString, Speed.Unit unit)intgetLast()intgetLength()floatgetMax()floatgetPoint(int idx)intimportDccProfile(Speed.Unit unit)static voidprintHeading(CSVPrinter p, int address)voidsetMax(float m)booleansetPoint(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)
-
-