001package jmri.jmrix.srcp.networkdriver; 002 003import jmri.jmrix.srcp.SRCPPortController; 004import jmri.jmrix.srcp.SRCPTrafficController; 005 006/** 007 * Implements SerialPortAdapter for the SRCP system network connection. 008 * <p> 009 * This connects an SRCP server (daemon) via a telnet connection. Normally 010 * controlled by the NetworkDriverFrame class. 011 * 012 * @author Bob Jacobsen Copyright (C) 2001, 2002, 2003, 2008 013 * @author Paul Bender Copyright (C) 2010 014 */ 015public class NetworkDriverAdapter extends SRCPPortController { 016 017 public NetworkDriverAdapter() { 018 super(new jmri.jmrix.srcp.SRCPSystemConnectionMemo()); 019 } 020 021 /** 022 * set up all of the other objects to operate with an SRCP command station 023 * connected to this port 024 */ 025 @Override 026 public void configure() { 027 // connect to the traffic controller 028 SRCPTrafficController control = new SRCPTrafficController(); 029 control.connectPort(this); 030 this.getSystemConnectionMemo().setTrafficController(control); 031 this.getSystemConnectionMemo().configureCommandStation(); 032 } 033 034 @Override 035 public boolean status() { 036 return opened; 037 } 038 039 // private control members 040 private boolean opened = false; 041 042 // private final static Logger log = LoggerFactory.getLogger(NetworkDriverAdapter.class); 043 044}