jmri
Class DccSignalHead

java.lang.Object
  extended by jmri.AbstractNamedBean
      extended by jmri.AbstractSignalHead
          extended by jmri.DccSignalHead
All Implemented Interfaces:
Serializable, NamedBean, SignalHead

public class DccSignalHead
extends AbstractSignalHead

This class implements a SignalHead the maps the various appearances values to aspect values in the Extended Accessory Decoder Control Packet Format and outputs that packet to the DCC System via the generic CommandStation interface

The mapping is as follows:

0 = DARK
1 = RED
2 = YELLOW
3 = GREEN
4 = FLASHRED
5 = FLASHYELLOW
6 = FLASHGREEN

The FLASH appearances are expected to be implemented in the decoder.

Author:
Alex Shepherd Copyright (c) 2008
See Also:
Serialized Form

Field Summary
 
Fields inherited from class jmri.AbstractSignalHead
mAppearance, mHeld, mLit
 
Fields inherited from interface jmri.SignalHead
DARK, FLASHGREEN, FLASHRED, FLASHYELLOW, GREEN, RED, YELLOW
 
Fields inherited from interface jmri.NamedBean
INCONSISTENT, UNKNOWN
 
Constructor Summary
DccSignalHead(String sys)
           
DccSignalHead(String sys, String user)
           
 
Method Summary
 void setAppearance(int newAppearance)
           
 void setHeld(boolean newHeld)
          Set the held parameter.
 void setLit(boolean newLit)
           
protected  void updateOutput()
           
 
Methods inherited from class jmri.AbstractSignalHead
getAppearance, getHeld, getLit, getState, setState
 
Methods inherited from class jmri.AbstractNamedBean
addPropertyChangeListener, dispose, firePropertyChange, getComment, getNumPropertyChangeListeners, getSystemName, getUserName, removePropertyChangeListener, setComment, setUserName
 
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, dispose, getComment, getNumPropertyChangeListeners, getSystemName, getUserName, removePropertyChangeListener, setComment, setUserName
 

Constructor Detail

DccSignalHead

public DccSignalHead(String sys,
                     String user)

DccSignalHead

public DccSignalHead(String sys)
Method Detail

setAppearance

public void setAppearance(int newAppearance)

setLit

public void setLit(boolean newLit)

setHeld

public void setHeld(boolean newHeld)
Set the held parameter.

Note that this does not directly effect the output on the layout; the held parameter is a local variable which effects the aspect only via higher-level logic


updateOutput

protected void updateOutput()


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