jmri.jmrix.rps
Class Measurement

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

public class Measurement
extends Object

Encodes a single measurement point for RPS

Immutable

Author:
Bob Jacobsen Copyright (C) 2006

Field Summary
protected  int code
           
 
Constructor Summary
Measurement(Reading r)
           
Measurement(Reading r, double x, double y, double z, double vsound, int code, String source)
           
 
Method Summary
 int getCode()
          Error code, defined specifically by generator
 String getID()
          Return the ID int of the transmitter this measurement describes
 Point3d getPoint()
           
 Reading getReading()
          Return the Reading this measurement made from.
 String getSource()
          Get name of the source
 Vector3d getVector()
           
 double getVSound()
           
 double getX()
           
 double getY()
           
 double getZ()
           
 boolean isOkPoint()
          Should this be considered a valid measurement?
 boolean isValidPosition()
           
 void setValidPosition(boolean val)
           
 String textCode()
          Get the error code as a human-readable string
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

code

protected int code
Constructor Detail

Measurement

public Measurement(Reading r)

Measurement

public Measurement(Reading r,
                   double x,
                   double y,
                   double z,
                   double vsound,
                   int code,
                   String source)
Method Detail

getReading

public Reading getReading()
Return the Reading this measurement made from.

By definition, Reading objects are immutable


getID

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


getX

public double getX()

getY

public double getY()

getZ

public double getZ()

getVSound

public double getVSound()

isValidPosition

public boolean isValidPosition()

setValidPosition

public void setValidPosition(boolean val)

getCode

public int getCode()
Error code, defined specifically by generator


isOkPoint

public boolean isOkPoint()
Should this be considered a valid measurement?


textCode

public String textCode()
Get the error code as a human-readable string


getPoint

public Point3d getPoint()

getVector

public Vector3d getVector()

getSource

public String getSource()
Get name of the source


toString

public String toString()
Overrides:
toString in class Object


Copyright © 1997 - 2011 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: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads