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