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