001package jmri.jmrix.sprog.pi.pisprogone;
002
003import jmri.jmrix.sprog.SprogConstants.SprogMode;
004import jmri.jmrix.sprog.update.SprogType;
005
006/**
007 * Implements SerialPortAdapter for the Sprog system.
008 * <p>
009 * This connects an SPROG DCC PI-SPROG One via a serial com port.
010 * <p>
011 * The current implementation only handles the 115,200 baud rate, and does not use
012 * any other options at configuration time.
013 *
014 * @author Andrew Crosland Copyright (C) 2016
015 */
016public class PiSprogOneSerialDriverAdapter
017        extends jmri.jmrix.sprog.serialdriver.SerialDriverAdapter {
018
019    public PiSprogOneSerialDriverAdapter() {
020        super(SprogMode.SERVICE, 115200, new SprogType(SprogType.PISPROGONE));
021        this.getSystemConnectionMemo().setUserName(Bundle.getMessage("PiSprog1ProgrammerTitle"));
022    }
023
024    /**
025     * {@inheritDoc}
026     * Currently only 115,200 bps
027     */
028    @Override
029    public String[] validBaudRates() {
030        return new String[]{"115,200 bps"};
031    }
032
033    /**
034     * {@inheritDoc}
035     */
036    @Override
037    public int[] validBaudNumbers() {
038        return new int[]{115200};
039    }
040    
041    // private final static Logger log = LoggerFactory.getLogger(PiSprogOneSerialDriverAdapter.class);
042
043}