jmri.jmrix.rps
Class Reading

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

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. Objects of this class are immutable once created.

Author:
Bob Jacobsen Copyright (C) 2006

Constructor Summary
Reading(int id, double[] values)
           
Reading(int id, double[] values, int time)
           
Reading(Reading r)
           
 
Method Summary
 int getID()
          Return the ID int of the transmitter this reading describes
 int getNSample()
           
 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()
           
 void setRawData(Object o)
          Preserve a reference to raw data for possible later logging
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Reading

public Reading(int id,
               double[] values)

Reading

public Reading(int id,
               double[] values,
               int time)

Reading

public Reading(Reading r)
Method Detail

getTime

public int getTime()
Return the time at which this Reading was requested


getID

public int getID()
Return the ID int of the transmitter this reading describes


getNSample

public int getNSample()

getValue

public double getValue(int i)
Convenience method to get a specific one of the values


getValues

public double[] getValues()

setRawData

public void setRawData(Object o)
Preserve a reference to raw data for possible later logging


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


Copyright © 1997 - 2008 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: SourceForge_Logo