001package jmri.jmrix.can.adapters.gridconnect.lccbuffer.serialdriver;
002
003import jmri.jmrix.can.adapters.gridconnect.GcSerialDriverAdapter;
004
005/**
006 * Implements SerialPortAdapter for GridConnect adapters.
007 * <p>
008 * This connects a RR-Cirkits LCCBuffer CAN adapter via a serial com
009 * port. Normally controlled by the SerialDriverFrame class.
010 *
011 * @author Andrew Crosland Copyright (C) 2008
012 * @author Bob Jacobsen Copyright (C) 2009
013 */
014public class SerialDriverAdapter extends GcSerialDriverAdapter {
015
016    /**
017     * {@inheritDoc}
018     */
019    @Override
020    public String[] validBaudRates() {
021        return new String[]{Bundle.getMessage("Baud57600"),
022                Bundle.getMessage("Baud115200"), Bundle.getMessage("Baud230400"),
023                Bundle.getMessage("Baud250000"), Bundle.getMessage("Baud288000"),
024                Bundle.getMessage("Baud333333"), Bundle.getMessage("Baud460800")};
025    }
026
027    /**
028     * And the corresponding values.
029     */
030    @Override
031    public int[] validBaudNumbers() {
032        return new int[]{57600, 115200, 230400, 250000, 288000, 333333, 460800};
033    }
034
035    @Override
036    public int defaultBaudIndex() {
037        return 0;
038    }
039
040}