|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrix.AbstractPortController
jmri.jmrix.loconet.LnPortController
jmri.jmrix.loconet.locobuffer.LocoBufferAdapter
public class LocoBufferAdapter
Provide access to LocoNet via a LocoBuffer attached to a serial comm port.
Normally controlled by the LocoBufferFrame class.
| Field Summary | |
|---|---|
protected String[] |
validOption1
|
protected String[] |
validSpeeds
|
protected int[] |
validSpeedValues
|
| Fields inherited from class jmri.jmrix.loconet.LnPortController |
|---|
commandStationName, commandStationNames, mCanRead, mProgPowersOff |
| Fields inherited from class jmri.jmrix.AbstractPortController |
|---|
mBaudRate, mOpt1, mOpt2, mPort |
| Constructor Summary | |
|---|---|
LocoBufferAdapter()
|
|
| Method Summary | |
|---|---|
void |
configure()
Set up all of the other objects to operate with a LocoBuffer connected to this port. |
void |
configureOption2(String value)
Set the second port option. |
DataInputStream |
getInputStream()
|
DataOutputStream |
getOutputStream()
|
Vector<String> |
getPortNames()
Provide a vector of valid port names, each a String. |
static boolean |
hasInstance()
|
static LocoBufferAdapter |
instance()
|
boolean |
okToSend()
Can the port accept additional characters? |
String |
openPort(String portName,
String appName)
Open a specified port. |
String |
option1Name()
Option 1 controls flow control option |
String |
option2Name()
Get a String that says what Option 2 represents May be an empty string, but will not be null |
protected void |
setSerialPort(SerialPort activeSerialPort)
Local method to do specific configuration, overridden in class |
boolean |
status()
Check that this object is ready to operate. |
int[] |
validBaudNumber()
Get an array of valid baud rates as integers. |
String[] |
validBaudRates()
Get an array of valid baud rates as strings. |
String[] |
validOption1()
Get an array of valid values for "option 1"; used to display valid options. |
String[] |
validOption2()
Get an array of valid values for "option 2"; used to display valid options. |
| Methods inherited from class jmri.jmrix.loconet.LnPortController |
|---|
configureCommandStation, configureManagers, setCommandStationType |
| Methods inherited from class jmri.jmrix.AbstractPortController |
|---|
configureBaudRate, configureOption1, currentBaudNumber, getCurrentBaudRate, getCurrentOption1Setting, getCurrentOption2Setting, getCurrentPortName, handlePortBusy, handlePortNotFound, reloadDriver, setPort |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface jmri.jmrix.SerialPortAdapter |
|---|
configureBaudRate, configureOption1, getCurrentBaudRate, getCurrentOption1Setting, getCurrentOption2Setting, getCurrentPortName, handlePortBusy, setPort |
| Field Detail |
|---|
protected String[] validSpeeds
protected int[] validSpeedValues
protected String[] validOption1
| Constructor Detail |
|---|
public LocoBufferAdapter()
| Method Detail |
|---|
public Vector<String> getPortNames()
SerialPortAdapter
getPortNames in interface SerialPortAdaptergetPortNames in class AbstractPortController
public String openPort(String portName,
String appName)
SerialPortAdapter
openPort in interface SerialPortAdapterpublic boolean okToSend()
okToSend in class LnPortControllerpublic void configure()
configure in interface PortAdapterconfigure in interface SerialPortAdapterpublic DataInputStream getInputStream()
getInputStream in interface PortAdaptergetInputStream in class LnPortControllerpublic DataOutputStream getOutputStream()
getOutputStream in interface PortAdaptergetOutputStream in class LnPortControllerpublic boolean status()
LnPortController
status in interface PortAdapterstatus in interface SerialPortAdapterstatus in class LnPortController
protected void setSerialPort(SerialPort activeSerialPort)
throws UnsupportedCommOperationException
UnsupportedCommOperationExceptionpublic String[] validBaudRates()
validBaudRates in interface SerialPortAdapterpublic int[] validBaudNumber()
validBaudNumber in class AbstractPortControllerpublic String option1Name()
option1Name in interface PortAdapteroption1Name in interface SerialPortAdapteroption1Name in class AbstractPortControllerpublic String[] validOption1()
AbstractPortController
validOption1 in interface PortAdaptervalidOption1 in interface SerialPortAdaptervalidOption1 in class AbstractPortControllerpublic String[] validOption2()
validOption2 in interface PortAdaptervalidOption2 in interface SerialPortAdaptervalidOption2 in class AbstractPortControllerpublic String option2Name()
option2Name in interface PortAdapteroption2Name in interface SerialPortAdapteroption2Name in class AbstractPortControllerpublic void configureOption2(String value)
configureOption2 in interface PortAdapterconfigureOption2 in interface SerialPortAdapterconfigureOption2 in class AbstractPortControllerpublic static boolean hasInstance()
public static LocoBufferAdapter instance()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||