jmri
Interface SignalMast

All Superinterfaces:
NamedBean
All Known Implementing Classes:
AbstractSignalMast, SignalHeadSignalMast

public interface SignalMast
extends NamedBean

Represent a signal mast. A signal mast is one or more signal heads that are treated as a single signal. (Imagine several heads attached to a single mast, though other implementations are possible)

A mast presents an Aspect, as that's a composite of the appearance of the entire signal.

This class has three bound parameters:

aspect
The specific aspect being shown.

Aspects are named by a user defined String name.

lit
Whether the head's lamps are lit or left dark.

This differs from the DARK color defined for the appearance parameter, in that it's independent of that. Lit is intended to allow you to extinquish a signal head for approach lighting, while still allowing it's color to be set to a definite value for e.g. display on a panel or evaluation in higher level logic.

held
Whether the head's lamps should be forced to the RED position in higher-level logic.

For use in signaling systems, this is a convenient way of storing whether a higher-level of control (e.g. non-vital system or dispatcher) has "held" the signal at stop. It does not effect how this signal head actually works; any appearance can be set and will be displayed even when "held" is set.

The integer state (getState(), setState()) is the index of the current aspect in the list of all defined aspects.
This file is part of JMRI.

JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.

JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Author:
Bob Jacobsen Copyright (C) 2002, 2008, Pete Cressman Copyright (C) 2009

Field Summary
 
Fields inherited from interface jmri.NamedBean
INCONSISTENT, UNKNOWN
 
Method Summary
 SignalAppearanceMap getAppearanceMap()
           
 String getAspect()
          Get current aspect name.
 boolean getHeld()
          Held is a bound parameter.
 boolean getLit()
          Lit is a bound parameter.
 SignalSystem getSignalSystem()
           
 Vector<String> getValidAspects()
           
 void setAspect(String aspect)
          Set aspect to a valid name in the current signal system definition.
 void setHeld(boolean newHeld)
           
 void setLit(boolean newLit)
           
 
Methods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, dispose, getComment, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyKeys, getState, getSystemName, getUserName, removePropertyChangeListener, setComment, setProperty, setState, setUserName, updateListenerRef
 

Method Detail

setAspect

void setAspect(String aspect)
Set aspect to a valid name in the current signal system definition.

Throws:
IllegalArgumentException - if not a valid aspect name

getAspect

String getAspect()
Get current aspect name. This is a bound property.

Returns:
null if not yet set

getValidAspects

Vector<String> getValidAspects()

getSignalSystem

SignalSystem getSignalSystem()

getAppearanceMap

SignalAppearanceMap getAppearanceMap()

getLit

boolean getLit()
Lit is a bound parameter. It controls whether the signal head's lamps are lit or left dark.


setLit

void setLit(boolean newLit)

getHeld

boolean getHeld()
Held is a bound parameter. It controls what mechanisms can control the head's appearance. The actual semantics are defined by those external mechanisms.


setHeld

void setHeld(boolean newHeld)


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