001package jmri.jmrix.loconet.usb_dcs52; 002 003/** 004 * Definition of objects to handle configuring a DCS52 USB layout connection via a 005 * PR2Adapter object. 006 * <p> 007 * Copied from loconet.pr3.ConnectionConfig.java 008 * 009 * @author Bob Jacobsen Copyright (C) 2001, 2003, 2008, 2010 010 * @author B. Milhaupt Copyright (C) 2019 011 */ 012 013public class ConnectionConfig extends jmri.jmrix.AbstractSerialConnectionConfig { 014 015 /** 016 * Ctor for an object being created during load process; Swing init is 017 * deferred. 018 * 019 * @param p the SerialPortAdapter to associate with this connection 020 */ 021 public ConnectionConfig(jmri.jmrix.SerialPortAdapter p) { 022 super(p); 023 } 024 025 /** 026 * Ctor for a connection configuration with no preexisting adapter. 027 * {@link #setInstance()} will fill the adapter member. 028 */ 029 public ConnectionConfig() { 030 super(); 031 } 032 033 @Override 034 public String name() { 035 return "DCS52 USB Interface"; // NOI18N 036 } 037 038 /** 039 * {@inheritDoc} 040 */ 041 @Override 042 protected void setInstance() { 043 if (adapter == null) { 044 adapter = new UsbDcs52Adapter(); 045 } 046 } 047 048}