001package jmri;
002
003import javax.annotation.CheckReturnValue;
004
005/**
006 * Interface for {@link NamedBean} indicating that the bean may control more than one output.
007 * <p>
008 * Originally just used by {@link Turnout},
009 * this is available for any bean type with variable output span.
010 *
011 * @author Bob Jacobsen Copyright 2022
012 */
013public interface VariableControlSpanBean extends NamedBean {
014
015    /**
016     * Provide the number of input/output bits this bean controls.
017     * <p>
018     * Typically just one, some systems provide outputs that control two outputs, e.g. C/MRI.
019     *
020     * @return the number of bits
021     */
022    @CheckReturnValue
023    public int getNumberControlBits();
024
025    /**
026     * Set number of input/output bits this bean controls.
027     *
028     * @param num the size of the input/output, currently 1 or 2
029     */
030    @InvokeOnLayoutThread
031    public void setNumberControlBits(int num);
032
033}