001package jmri.jmrix.loconet.alm;
002
003import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
004
005/**
006 * Singleton used to allow, at most, one Digitrax 7th-generation Accessory
007 * Decoder "routes programmer" being instantiated.
008 *
009 * @author B. Milhaupt (C) 2024
010 */
011public enum RoutesProgSingleton {
012    INSTANCE;
013
014    private boolean devBeingProgForRoutes = false;
015
016    @SuppressFBWarnings(value="ME_ENUM_FIELD_SETTER")
017    public synchronized void setRoutesProgrammingActive(boolean t) {
018        devBeingProgForRoutes = t;
019    }
020    public synchronized boolean getRoutesProgrammingActive() {
021        return devBeingProgForRoutes;
022    }
023}