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 Bob Jacobsen Copyright (C) 2001, 2003
008 * @author Andrew Crosland 2008
009 * @author Andrew Crosland 2019
010 */
011public class PiSprog3ConnectionConfig extends jmri.jmrix.can.adapters.ConnectionConfig {
012
013    /**
014     * Create a connection configuration with a preexisting adapter. This is
015     * used principally when loading a configuration that defines this
016     * connection.
017     *
018     * @param p the adapter to create a connection configuration for
019     */
020    public PiSprog3ConnectionConfig(jmri.jmrix.SerialPortAdapter p) {
021        super(p);
022    }
023
024    // Needed for instantiation by reflection, do not remove.
025    /**
026     * Ctor for a connection configuration with no preexisting adapter.
027     * {@link #setInstance()} will fill the adapter member.
028     */
029    public PiSprog3ConnectionConfig() {
030        super();
031    }
032
033    @Override
034    public String name() {
035        return Bundle.getMessage("PiSprog3Title");
036    }
037
038    public boolean isOptList2Advanced() {
039        return false;
040    }
041
042    /**
043     * {@inheritDoc}
044     */
045    @Override
046    protected void setInstance() {
047        if (adapter == null) {
048            adapter = new PiSprog3SerialDriverAdapter();
049        }
050    }
051
052}