001package jmri.jmrix.can.adapters.gridconnect.sproggen5.serialdriver;
002
003/**
004 * Definition of objects to handle configuring a layout connection via a SPROG 
005 * Generation 5 SerialDriverAdapter object.
006 *
007 * @author Andrew Crosland 2019
008 */
009public class PiSprog3PlusConnectionConfig extends jmri.jmrix.can.adapters.ConnectionConfig {
010
011    /**
012     * Create a connection configuration with a preexisting adapter. This is
013     * used principally when loading a configuration that defines this
014     * connection.
015     *
016     * @param p the adapter to create a connection configuration for
017     */
018    public PiSprog3PlusConnectionConfig(jmri.jmrix.SerialPortAdapter p) {
019        super(p);
020    }
021
022    // Needed for instantiation by reflection, do not remove.
023    /**
024     * Ctor for a connection configuration with no preexisting adapter.
025     * {@link #setInstance()} will fill the adapter member.
026     */
027    public PiSprog3PlusConnectionConfig() {
028        super();
029    }
030
031    @Override
032    public String name() {
033        return Bundle.getMessage("PiSprog3PlusTitle");
034    }
035
036    public boolean isOptList2Advanced() {
037        return false;
038    }
039
040    /**
041     * {@inheritDoc}
042     */
043    @Override
044    protected void setInstance() {
045        if (adapter == null) {
046            adapter = new Sprog3PlusSerialDriverAdapter();
047        }
048    }
049
050}