001package jmri.jmrix.can.adapters.gridconnect.pilcc.serialdriver;
002
003import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
004
005/**
006 * Definition of objects to handle configuring a layout connection via a PI-LCC
007 * SerialDriverAdapter object.
008 *
009 * @author Bob Jacobsen Copyright (C) 2001, 2003
010 * @author Andrew Crosland 2008
011 */
012@SuppressFBWarnings(value = "NM_SAME_SIMPLE_NAME_AS_SUPERCLASS", justification = "name assigned historically")
013public class ConnectionConfig extends jmri.jmrix.can.adapters.ConnectionConfig {
014
015    /**
016     * Create a connection configuration with a preexisting adapter. This is
017     * used principally when loading a configuration that defines this
018     * connection.
019     *
020     * @param p the adapter to create a connection configuration for
021     */
022    public ConnectionConfig(jmri.jmrix.SerialPortAdapter p) {
023        super(p);
024    }
025
026    // Needed for instantiation by reflection, do not remove.
027    /**
028     * Ctor for a connection configuration with no preexisting adapter.
029     * {@link #setInstance()} will fill the adapter member.
030     */
031    public ConnectionConfig() {
032        super();
033    }
034
035    @Override
036    public String name() {
037        return "CAN via SPROG DCC Ltd PI-LCC";
038    }
039
040    public boolean isOptList2Advanced() {
041        return false;
042    }
043
044    /**
045     * {@inheritDoc}
046     */
047    @Override
048    protected void setInstance() {
049        if (adapter == null) {
050            adapter = new PiLccSerialDriverAdapter();
051        }
052    }
053
054}