001package jmri.jmrix.cmri.serial.networkdriver;
002
003import jmri.jmrix.cmri.CMRISystemConnectionMemo;
004import jmri.jmrix.cmri.serial.SerialNetworkPortAdapter;
005import jmri.jmrix.cmri.serial.SerialTrafficController;
006
007/**
008 * Implements SerialNetworkPortAdapter for a network connection.
009 * <p>
010 * This connects via a telnet connection. Normally
011 * controlled by the NetworkDriverFrame class.
012 *
013 * @author Bob Jacobsen Copyright (C) 2001, 2002, 2003, 2015
014 */
015public class NetworkDriverAdapter extends SerialNetworkPortAdapter {
016
017    public NetworkDriverAdapter() {
018        super(new CMRISystemConnectionMemo());
019        setManufacturer(jmri.jmrix.cmri.CMRIConnectionTypeList.CMRI);
020    }
021
022    /**
023     * Set up all of the other objects to operate connected to this port.
024     */
025    @Override
026    public void configure() {
027        // connect to the traffic controller
028        SerialTrafficController tc = new SerialTrafficController();
029        getSystemConnectionMemo().setTrafficController(tc);
030
031        tc.connectPort(this);
032
033        getSystemConnectionMemo().configureManagers();
034    }
035
036    // private final static org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(NetworkDriverAdapter.class);
037
038}