001package jmri.jmrix.can.adapters.gridconnect;
002
003import java.io.DataInputStream;
004import java.io.DataOutputStream;
005import jmri.jmrix.can.CanSystemConnectionMemo;
006
007/**
008 * Abstract base for classes representing a GridConnect communications port.
009 *
010 * Implementations will provide InputStream and OutputStream
011 * objects to CabrsTrafficController classes, who in turn will deal in messages.
012 * 
013 * @author Bob Jacobsen Copyright (C) 2001
014 * @author Andrew Crosland 2008
015 */
016public abstract class GcPortController extends jmri.jmrix.AbstractSerialPortController {
017
018    /**
019     * Create a new GC PortController.
020     * @param connectionMemo CAN System Connection.
021     */
022    protected GcPortController(CanSystemConnectionMemo connectionMemo) {
023        super(connectionMemo);
024    }
025
026    /**
027     * Get the InputStream to the port.
028     * {@inheritDoc}
029     */
030    @Override
031    public abstract DataInputStream getInputStream();
032
033    /**
034     * Get the outputStream to the port.
035     * {@inheritDoc}
036     */
037    @Override
038    public abstract DataOutputStream getOutputStream();
039
040    /**
041     * Get the CAN System Connection.
042     * {@inheritDoc}
043     */
044    @Override
045    public CanSystemConnectionMemo getSystemConnectionMemo() {
046        return (CanSystemConnectionMemo) super.getSystemConnectionMemo();
047    }
048
049}
050
051
052