Package jmri.jmrix.rps
Class Reading
- java.lang.Object
-
- jmri.jmrix.rps.Reading
-
@Immutable public class Reading extends java.lang.Object
Encodes a single set of input values (a "reading") for RPS.The values are in time units (nominally usec), and need to be converted to space units during later calculations.
The values are indexed by Receiver number, as known to the RPS system. For example, getValue(2) will return the time from RPS receiver 2.
Objects of this class are immutable once created.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getId()
Return the ID int of the transmitter this reading describes.int
getNValues()
NValues is really the highest receiver number possible.java.lang.Object
getRawData()
Get the raw data from which this Reading was made.int
getTime()
Return the time at which this Reading was requested.double
getValue(int i)
Convenience method to get a specific one of the values.double[]
getValues()
java.lang.String
toString()
-
-
-
Method Detail
-
getTime
public int getTime()
Return the time at which this Reading was requested.- Returns:
- read request time.
-
getId
public java.lang.String getId()
Return the ID int of the transmitter this reading describes.- Returns:
- ID of the transmitter.
-
getNValues
public int getNValues()
NValues is really the highest receiver number possible.- Returns:
- highest receiver number possible.
-
getValue
public double getValue(int i)
Convenience method to get a specific one of the values.- Parameters:
i
- value index.- Returns:
- value.
-
getValues
public double[] getValues()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getRawData
public java.lang.Object getRawData()
Get the raw data from which this Reading was made.- Returns:
- null if raw data was not preserved
-
-