Package jmri.jmrix.rps
Class Reading
java.lang.Object
jmri.jmrix.rps.Reading
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.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetId()Return the ID int of the transmitter this reading describes.intNValues is really the highest receiver number possible.Get the raw data from which this Reading was made.intgetTime()Return the time at which this Reading was requested.doublegetValue(int i) Convenience method to get a specific one of the values.double[]toString()
-
Field Details
-
id
-
values
-
time
-
rawData
-
-
Constructor Details
-
Reading
-
Reading
-
Reading
-
Reading
-
-
Method Details
-
getTime
Return the time at which this Reading was requested.- Returns:
- read request time.
-
getId
Return the ID int of the transmitter this reading describes.- Returns:
- ID of the transmitter.
-
getNValues
NValues is really the highest receiver number possible.- Returns:
- highest receiver number possible.
-
getValue
Convenience method to get a specific one of the values.- Parameters:
i- value index.- Returns:
- value.
-
getValues
-
toString
-
getRawData
Get the raw data from which this Reading was made.- Returns:
- null if raw data was not preserved
-