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