jmri.jmrix.rps
Class Engine
java.lang.Object
jmri.jmrix.rps.Engine
- All Implemented Interfaces:
- ReadingListener
public class Engine
- extends Object
- implements ReadingListener
Engine does basic computations of RPS system.
Holds all the alignment info. Receivers are indexed by their
RPS receiver number in all cases.
Gets a reading from the Distributor and passes back a Measurement
Bound properties:
- vSound - velocity of sound, in whatever units are in use
This class maintains a collection of "Transmitter" objects representing
the RPS-equipped rolling stock (usually engines) on the layout.
This is an extension to the common Roster, and every entry in this
class's collection must be present in the Roster.
- Author:
- Bob Jacobsen Copyright (C) 2006, 2008
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_instance
protected static volatile Engine _instance
Engine
public Engine()
dispose
public void dispose()
setVSound
public void setVSound(double v)
getVSound
public double getVSound()
setOffset
public void setOffset(int offset)
getOffset
public int getOffset()
setMaxReceiverNumber
public void setMaxReceiverNumber(int n)
- Set the maximum receiver number expected. If the highest value
in the hardware is 5, that's what's needed here.
getMaxReceiverNumber
public int getMaxReceiverNumber()
setReceiver
public void setReceiver(int address,
Receiver receiver)
- Get a particular reciever by address (starting at 1)
getReceiver
public Receiver getReceiver(int i)
setReceiverPosition
public void setReceiverPosition(int i,
Point3d p)
getReceiverPosition
public Point3d getReceiverPosition(int i)
setAlgorithm
public void setAlgorithm(String algorithm)
getAlgorithm
public String getAlgorithm()
notify
public void notify(Reading r)
- Specified by:
notify in interface ReadingListener
storeAlignment
public void storeAlignment(File file)
throws IOException
- Throws:
IOException
loadAlignment
public void loadAlignment(File file)
throws JDOMException,
IOException
- Throws:
JDOMException
IOException
setInitialAlignment
protected void setInitialAlignment()
setDefaultAlignment
protected void setDefaultAlignment()
setPollingInterval
public void setPollingInterval(int pollingInterval)
getPollingInterval
public int getPollingInterval()
setPolling
public void setPolling(boolean polling)
getPolling
public boolean getPolling()
storePollConfig
public void storePollConfig(File file)
throws IOException
- Throws:
IOException
loadPollConfig
public void loadPollConfig(File file)
throws JDOMException,
IOException
- Throws:
JDOMException
IOException
getTransmitterByAddress
public Transmitter getTransmitterByAddress(int addr)
getTransmitter
public Transmitter getTransmitter(int i)
getNumTransmitters
public int getNumTransmitters()
getPolledID
public String getPolledID()
getPolledAddress
public int getPolledAddress()
setBscPollMode
public void setBscPollMode()
setDirectPollMode
public void setDirectPollMode()
setThrottlePollMode
public void setThrottlePollMode()
getBscPollMode
public boolean getBscPollMode()
getThrottlePollMode
public boolean getThrottlePollMode()
getDirectPollMode
public boolean getDirectPollMode()
instance
public static Engine instance()
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener p)
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener p)
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: