001package jmri.jmrix.lenz.lzv200;
002
003import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
004
005/**
006 * Handle configuring an XpressNet layout connection via a Lenz LZV200adapter.
007 * <p>
008 * This uses the {@link LZV200Adapter} class to do the actual connection.
009 *
010 * @author Paul Bender Copyright (C) 2005,2019
011 *
012 * @see LZV200Adapter
013 */
014@SuppressFBWarnings(value = "NM_SAME_SIMPLE_NAME_AS_SUPERCLASS", justification = "standard naming for ConnectionConfig objects in XpressNet")
015public class ConnectionConfig extends jmri.jmrix.lenz.liusb.ConnectionConfig {
016
017    /**
018     * Ctor for an object being created during load process.
019     * Swing init is deferred.
020     * @param p serial port adapter.
021     */
022    public ConnectionConfig(jmri.jmrix.SerialPortAdapter p) {
023        super(p);
024    }
025
026    /**
027     * Ctor for a connection configuration with no preexisting adapter.
028     * {@link #setInstance()} will fill the adapter member.
029     */
030    public ConnectionConfig() {
031        super();
032    }
033
034    @Override
035    public String name() {
036        return "Lenz LZV200"; // NOI18N
037    }
038
039    /**
040     * {@inheritDoc}
041     */
042    @Override
043    protected void setInstance() {
044        if (adapter == null) {
045            adapter = new LZV200Adapter();
046        }
047    }
048
049}