Package jmri

Interface SignalHead

All Superinterfaces:
Comparable<NamedBean>, NamedBean, PropertyChangeProvider, Signal
All Known Implementing Classes:
AbstractSignalHead, AcelaSignalHead, DccSignalHead, DefaultSignalHead, DoubleTurnoutSignalHead, LsDecSignalHead, MergSD2SignalHead, QuadOutputSignalHead, SE8cSignalHead, SE8cSignalHead, SerialSignalHead, SingleTurnoutSignalHead, TripleOutputSignalHead, TripleTurnoutSignalHead, VirtualSignalHead

public interface SignalHead
extends Signal
Represent a single signal head. (Try saying that ten times fast!) A signal may have more than one of these (e.g. a signal mast consisting of several heads) when needed to represent more complex aspects, e.g. Diverging Approach etc.

This allows access to explicit appearance information. We don't call this an Aspect, as that's a composite of the appearance of several heads.

This class has three bound parameters:

Appearance
The specific color being shown. Values are the various color constants defined in the class.

The appearance constants form a bit mask, so they can be used with hardware that can display e.g. more than one lit color at a time. Individual implementations may not be able to handle that, however; most of the early ones probably won't. If a particular implementation can't display a commanded color, it doesn't try to replace it, but rather just leaves that color off the resulting display.

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 extinguish 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 a specific appearance, e.g. RED 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.


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.