001package jmri.jmrix.ztc.ztc611;
002
003/**
004 * Handle configuring an XpressNet layout connection via a ZTC Controls ZTC611
005 * command station.
006 * <p>
007 * This uses the {@link ZTC611Adapter} class to do the actual connection.
008 *
009 * @author Bob Jacobsen Copyright (C) 2001, 2003
010 *
011 * @see ZTC611Adapter
012 */
013public class ConnectionConfig extends jmri.jmrix.lenz.AbstractXNetSerialConnectionConfig {
014
015    /**
016     * Create a connection configuration with an existing adapter.
017     *
018     * @param p the associated adapter
019     */
020    public ConnectionConfig(jmri.jmrix.SerialPortAdapter p) {
021        super(p);
022    }
023
024    /**
025     * Create a connection configuration without an existing adapter.
026     */
027    public ConnectionConfig() {
028        super();
029    }
030
031    @Override
032    public String name() {
033        return "ZTC Controls ZTC611";
034    }
035
036    String manufacturerName = "ZTC";
037
038    @Override
039    public String getManufacturer() {
040        return manufacturerName;
041    }
042
043    @Override
044    public void setManufacturer(String manu) {
045        manufacturerName = manu;
046    }
047
048    /**
049     * {@inheritDoc}
050     */
051    @Override
052    protected void setInstance() {
053        if (adapter == null) {
054            adapter = new ZTC611Adapter();
055        }
056    }
057
058}