001package jmri.jmrix.can.adapters.gridconnect.usblcc.serialdriver;
002
003import jmri.jmrix.can.adapters.gridconnect.GcSerialDriverAdapter;
004
005/**
006 * Implements SerialPortAdapter for GridConnect adapters.
007 * <p>
008 * This connects a USB-LCC CAN adapter via a serial com port. Normally
009 * controlled by the SerialDriverFrame class.
010 *
011 * @author Andrew Crosland Copyright (C) 2008
012 * @author Bob Jacobsen Copyright (C) 2009
013 * @author Andrew Crosland Copyright (C) 2023
014 */
015public class SerialDriverAdapter extends GcSerialDriverAdapter {
016
017    /** 
018     * Force the flow control to RTS and CTS
019     */
020    @Override
021    protected void localSetFlowControl() {
022        setFlowControl(currentSerialPort, FlowControl.RTSCTS);
023    }
024
025    /**
026     * {@inheritDoc}
027     */
028    @Override
029    public String[] validBaudRates() {
030        return new String[]{Bundle.getMessage("Baud460800")};
031    }
032
033    /**
034     * And the corresponding values.
035     */
036    @Override
037    public int[] validBaudNumbers() {
038        return new int[]{460800};
039    }
040
041    @Override
042    public int defaultBaudIndex() {
043        return 0;
044    }
045
046}