Class GcPortController
- java.lang.Object
-
- jmri.jmrix.AbstractPortController
-
- jmri.jmrix.AbstractSerialPortController
-
- jmri.jmrix.can.adapters.gridconnect.GcPortController
-
- All Implemented Interfaces:
PortAdapter
,SerialPortAdapter
- Direct Known Subclasses:
GcSerialDriverAdapter
public abstract class GcPortController extends AbstractSerialPortController
Abstract base for classes representing a GridConnect communications port. Implementations will provide InputStream and OutputStream objects to CabrsTrafficController classes, who in turn will deal in messages.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jmri.jmrix.AbstractPortController
AbstractPortController.Option
-
-
Field Summary
-
Fields inherited from class jmri.jmrix.AbstractSerialPortController
mBaudRate, mPort
-
Fields inherited from class jmri.jmrix.AbstractPortController
allowConnectionRecovery, manufacturerName, opened, option1Name, option2Name, option3Name, option4Name, options, reconnectinterval, reconnectMaxAttempts, reconnectMaxInterval
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
GcPortController(CanSystemConnectionMemo connectionMemo)
Create a new GC PortController.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.io.DataInputStream
getInputStream()
Get the InputStream to the port.abstract java.io.DataOutputStream
getOutputStream()
Get the outputStream to the port.CanSystemConnectionMemo
getSystemConnectionMemo()
Get the CAN System Connection.-
Methods inherited from class jmri.jmrix.AbstractSerialPortController
closeConnection, configureBaudRate, configureBaudRateFromIndex, configureBaudRateFromNumber, configureLeadsAndFlowControl, configureLeadsAndFlowControl, connect, currentBaudNumber, defaultBaudIndex, getCurrentBaudIndex, getCurrentBaudNumber, getCurrentBaudRate, getCurrentPortName, getPortNames, handlePortBusy, handlePortNotFound, reconnectFromLoop, resetupConnection, setPort, setPortEventLogging, validBaudNumbers, validBaudRates
-
Methods inherited from class jmri.jmrix.AbstractPortController
configureOption1, configureOption2, configureOption3, configureOption4, dispose, getDisabled, getManufacturer, getOption1Name, getOption2Name, getOption3Name, getOption4Name, getOptionChoices, getOptionDisplayName, getOptions, getOptionState, getReconnectMaxAttempts, getReconnectMaxInterval, getSystemPrefix, getUserName, isDirty, isOptionAdvanced, isOptionTypePassword, isOptionTypeText, isRestartRequired, purgeStream, reconnect, recover, safeSleep, setClosed, setDisabled, setManufacturer, setOpened, setOptionState, setReconnectMaxAttempts, setReconnectMaxInterval, setSystemConnectionMemo, setSystemPrefix, setUserName, status
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jmri.jmrix.PortAdapter
dispose, getDisabled, getOption1Name, getOption2Name, getOption3Name, getOption4Name, getOptionChoices, getOptionDisplayName, getOptions, getOptionState, getReconnectMaxAttempts, getReconnectMaxInterval, getSystemPrefix, getUserName, isDirty, isOptionAdvanced, isOptionTypePassword, isOptionTypeText, isRestartRequired, recover, setDisabled, setOptionState, setReconnectMaxAttempts, setReconnectMaxInterval, setSystemConnectionMemo, setSystemPrefix, setUserName
-
Methods inherited from interface jmri.jmrix.SerialPortAdapter
configure, configureOption1, configureOption2, configureOption3, configureOption4, getManufacturer, openPort, setManufacturer, status
-
-
-
-
Constructor Detail
-
GcPortController
protected GcPortController(CanSystemConnectionMemo connectionMemo)
Create a new GC PortController.- Parameters:
connectionMemo
- CAN System Connection.
-
-
Method Detail
-
getInputStream
public abstract java.io.DataInputStream getInputStream()
Get the InputStream to the port. Get the InputStream from the port.- Specified by:
getInputStream
in interfacePortAdapter
- Specified by:
getInputStream
in classAbstractPortController
- Returns:
- the InputStream from the port
-
getOutputStream
public abstract java.io.DataOutputStream getOutputStream()
Get the outputStream to the port. Get the outputStream to the port.- Specified by:
getOutputStream
in interfacePortAdapter
- Specified by:
getOutputStream
in classAbstractPortController
- Returns:
- the outputStream to the port
-
getSystemConnectionMemo
public CanSystemConnectionMemo getSystemConnectionMemo()
Get the CAN System Connection. Get theSystemConnectionMemo
associated with this object.This method should only be overridden to ensure that a specific subclass of SystemConnectionMemo is returned. The recommended pattern is:
public MySystemConnectionMemo getSystemConnectionMemo() { return (MySystemConnectionMemo) super.getSystemConnectionMemo(); }
- Specified by:
getSystemConnectionMemo
in interfacePortAdapter
- Overrides:
getSystemConnectionMemo
in classAbstractPortController
- Returns:
- the currently associated SystemConnectionMemo
-
-