001package jmri.jmrix.easydcc;
002
003import java.io.DataInputStream;
004import java.io.DataOutputStream;
005import jmri.SystemConnectionMemo;
006
007/**
008 * Abstract base for classes representing an EasyDCC communications port.
009 *
010 * @author Bob Jacobsen Copyright (C) 2001
011 */
012public abstract class EasyDccPortController extends jmri.jmrix.AbstractSerialPortController {
013    // Base class. Implementations will provide InputStream and OutputStream
014    // objects to EasyDccTrafficController classes, who in turn will deal in messages.
015
016    protected EasyDccPortController(SystemConnectionMemo connectionMemo) {
017        super(connectionMemo);
018    }
019
020    // returns the InputStream from the port
021    @Override
022    abstract public DataInputStream getInputStream();
023
024    // returns the outputStream to the port
025    @Override
026    abstract public DataOutputStream getOutputStream();
027
028    // check that this object is ready to operate
029    @Override
030    abstract public boolean status();
031
032    @Override
033    public EasyDccSystemConnectionMemo getSystemConnectionMemo() {
034        return (EasyDccSystemConnectionMemo) super.getSystemConnectionMemo();
035    }
036
037}