Package jmri

Interface SignalMast

All Superinterfaces:
Comparable<NamedBean>, NamedBean, PropertyChangeProvider
All Known Implementing Classes:
AbstractSignalMast, DccSignalMast, LNCPSignalMast, MatrixSignalMast, OlcbSignalMast, SignalHeadSignalMast, TurnoutSignalMast, VirtualSignalMast

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(s) 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 mast'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 extinguish a signal mast for approach lighting, while still allowing its color to be set to a definite value for e.g. display on a panel or evaluation in higher level logic.
Held
Whether the mast's lamps should be forced to a specific aspect, e.g. Stop, 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 mast 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.