Class Reading

java.lang.Object
jmri.jmrix.rps.Reading

@Immutable public class Reading extends 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.

  • Field Details

  • Constructor Details

  • Method Details

    • getTime

      public int getTime()
      Return the time at which this Reading was requested.
      Returns:
      read request time.
    • getId

      public 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 String toString()
      Overrides:
      toString in class Object
    • getRawData

      public Object getRawData()
      Get the raw data from which this Reading was made.
      Returns:
      null if raw data was not preserved