001package jmri.jmrix.easydcc;
002
003import jmri.AddressedProgrammer;
004import jmri.Programmer;
005import jmri.managers.DefaultProgrammerManager;
006
007/**
008 * Extend DefaultProgrammerManager to provide ops mode programmers for EasyDCC
009 * systems.
010 *
011 * @see jmri.managers.DefaultProgrammerManager
012 * @author Bob Jacobsen Copyright (C) 2002
013 */
014public class EasyDccProgrammerManager extends DefaultProgrammerManager {
015
016    private EasyDccSystemConnectionMemo _memo = null;
017    //private Programmer localProgrammer;
018
019    public EasyDccProgrammerManager(Programmer serviceModeProgrammer, EasyDccSystemConnectionMemo memo) {
020        super(serviceModeProgrammer, memo);
021        _memo = memo;
022    }
023
024    /**
025     * Works with command station to provide Ops Mode, so say it works.
026     *
027     * @return always true
028     */
029    @Override
030    public boolean isAddressedModePossible() {
031        return true;
032    }
033
034    @Override
035    public AddressedProgrammer getAddressedProgrammer(boolean pLongAddress, int pAddress) {
036        return new EasyDccOpsModeProgrammer(pAddress, pLongAddress, _memo);
037    }
038
039    @Override
040    public AddressedProgrammer reserveAddressedProgrammer(boolean pLongAddress, int pAddress) {
041        return null;
042    }
043
044}