jmri.implementation
Class QuadOutputSignalHead

java.lang.Object
  extended by jmri.implementation.AbstractNamedBean
      extended by jmri.implementation.AbstractSignalHead
          extended by jmri.implementation.DefaultSignalHead
              extended by jmri.implementation.DoubleTurnoutSignalHead
                  extended by jmri.implementation.TripleTurnoutSignalHead
                      extended by jmri.implementation.QuadOutputSignalHead
All Implemented Interfaces:
Serializable, NamedBean, SignalHead

public class QuadOutputSignalHead
extends TripleTurnoutSignalHead

Drive a single signal head via four "Turnout" objects.

After much confusion, the user-level terminology was changed to call these "Triple Output"; the class name remains the same to reduce recoding.

The four Turnout objects are provided during construction, and each drives a specific color (RED, YELLOW, GREEN, and LUNAR). Normally, "THROWN" is on, and "CLOSED" is off.

This class doesn't currently listen to the Turnout's to see if they've been changed via some other mechanism.

Author:
Bob Jacobsen Copyright (C) 2009
See Also:
Serialized Form

Field Summary
 
Fields inherited from class jmri.implementation.DefaultSignalHead
mFlashOn
 
Fields inherited from class jmri.implementation.AbstractSignalHead
mAppearance, mHeld, mLit
 
Fields inherited from class jmri.implementation.AbstractNamedBean
mSystemName, mUserName
 
Fields inherited from interface jmri.SignalHead
DARK, FLASHGREEN, FLASHLUNAR, FLASHRED, FLASHYELLOW, GREEN, LUNAR, RED, YELLOW
 
Fields inherited from interface jmri.NamedBean
INCONSISTENT, UNKNOWN
 
Constructor Summary
QuadOutputSignalHead(String sys, NamedBeanHandle<Turnout> green, NamedBeanHandle<Turnout> yellow, NamedBeanHandle<Turnout> red, NamedBeanHandle<Turnout> lunar)
           
QuadOutputSignalHead(String sys, String user, NamedBeanHandle<Turnout> green, NamedBeanHandle<Turnout> yellow, NamedBeanHandle<Turnout> red, NamedBeanHandle<Turnout> lunar)
           
 
Method Summary
 void dispose()
          Remove references to and from this object, so that it can eventually be garbage-collected.
 NamedBeanHandle<Turnout> getLunar()
           
 String[] getValidStateNames()
           
 int[] getValidStates()
           
 void setLunar(NamedBeanHandle<Turnout> t)
           
protected  void updateOutput()
          Type-specific routine to handle output to the layout hardware.
 
Methods inherited from class jmri.implementation.TripleTurnoutSignalHead
getYellow, setYellow
 
Methods inherited from class jmri.implementation.DoubleTurnoutSignalHead
getGreen, getRed, setGreen, setRed
 
Methods inherited from class jmri.implementation.DefaultSignalHead
setAppearance, setHeld, setLit, startFlash, stopFlash
 
Methods inherited from class jmri.implementation.AbstractSignalHead
getAppearance, getAppearanceName, getAppearanceName, getDefaultStateName, getDefaultValidStateNames, getDefaultValidStates, getHeld, getLit, getState, setState
 
Methods inherited from class jmri.implementation.AbstractNamedBean
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, getComment, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyKeys, getSystemName, getUserName, removePropertyChangeListener, setComment, setProperty, setUserName, updateListenerRef
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, getComment, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyKeys, getSystemName, getUserName, removePropertyChangeListener, setComment, setProperty, setUserName, updateListenerRef
 

Constructor Detail

QuadOutputSignalHead

public QuadOutputSignalHead(String sys,
                            String user,
                            NamedBeanHandle<Turnout> green,
                            NamedBeanHandle<Turnout> yellow,
                            NamedBeanHandle<Turnout> red,
                            NamedBeanHandle<Turnout> lunar)

QuadOutputSignalHead

public QuadOutputSignalHead(String sys,
                            NamedBeanHandle<Turnout> green,
                            NamedBeanHandle<Turnout> yellow,
                            NamedBeanHandle<Turnout> red,
                            NamedBeanHandle<Turnout> lunar)
Method Detail

updateOutput

protected void updateOutput()
Description copied from class: DefaultSignalHead
Type-specific routine to handle output to the layout hardware. Does not notify listeners of changes; that's done elsewhere. Should use the following variables to determine what to send:

Overrides:
updateOutput in class TripleTurnoutSignalHead

dispose

public void dispose()
Remove references to and from this object, so that it can eventually be garbage-collected.

Specified by:
dispose in interface NamedBean
Overrides:
dispose in class TripleTurnoutSignalHead

getLunar

public NamedBeanHandle<Turnout> getLunar()

setLunar

public void setLunar(NamedBeanHandle<Turnout> t)

getValidStates

public int[] getValidStates()
Specified by:
getValidStates in interface SignalHead
Overrides:
getValidStates in class DefaultSignalHead

getValidStateNames

public String[] getValidStateNames()
Specified by:
getValidStateNames in interface SignalHead
Overrides:
getValidStateNames in class DefaultSignalHead


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