|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrix.AbstractPortController
jmri.jmrix.AbstractSerialPortController
jmri.jmrix.loconet.LnPortController
jmri.jmrix.loconet.hexfile.LnHexFilePort
public class LnHexFilePort
LnHexFilePort implements a LnPortController via a ASCII-hex input file. See below for the file format There are user-level controls for send next message how long to wait between messages An object of this class should run in a thread of its own so that it can fill the output pipe as needed. The input file is expected to have one message per line. Each line can contain as many bytes as needed, each represented by two Hex characters and separated by a space. Variable whitespace is not (yet) supported
| Field Summary |
|---|
| Fields inherited from class jmri.jmrix.loconet.LnPortController |
|---|
adaptermemo, commandStationName, commandStationNames, mCanRead, mProgPowersOff |
| Fields inherited from class jmri.jmrix.AbstractSerialPortController |
|---|
mBaudRate, mPort |
| Fields inherited from class jmri.jmrix.AbstractPortController |
|---|
mDisabled, mManufacturer, mOpt1, mOpt2, opened |
| Constructor Summary | |
|---|---|
LnHexFilePort()
|
|
| Method Summary | |
|---|---|
void |
configure()
Configure all of the other jmrix widgets needed to work with this adapter |
void |
dispose()
|
LocoNetSystemConnectionMemo |
getAdapterMemo()
|
DataInputStream |
getInputStream()
|
DataOutputStream |
getOutputStream()
|
Vector<String> |
getPortNames()
Provide a vector of valid port names, each a String. |
LocoNetSystemConnectionMemo |
getSystemConnectionMemo()
|
void |
load(File file)
|
boolean |
okToSend()
Can the port accept additional characters? |
String |
openPort(String portName,
String appName)
Open a specified port. |
void |
run()
|
boolean |
running()
|
void |
setDelay(int newDelay)
Provide a new message delay value, but don't allow it to go below 2 msec. |
boolean |
status()
Check that this object is ready to operate. |
String[] |
validBaudRates()
Get an array of valid baud rates; used to display valid options. |
| Methods inherited from class jmri.jmrix.loconet.LnPortController |
|---|
setCommandStationType, setDisabled |
| Methods inherited from class jmri.jmrix.AbstractSerialPortController |
|---|
configureBaudRate, currentBaudNumber, getCurrentBaudRate, getCurrentPortName, handlePortBusy, handlePortNotFound, setPort, validBaudNumber |
| Methods inherited from class jmri.jmrix.AbstractPortController |
|---|
configureOption1, configureOption2, getCurrentOption1Setting, getCurrentOption2Setting, getDisabled, getManufacturer, option1Name, option2Name, setManufacturer, validOption1, validOption2 |
| 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, configureOption2, getCurrentBaudRate, getCurrentOption1Setting, getCurrentOption2Setting, getCurrentPortName, getManufacturer, handlePortBusy, option1Name, option2Name, setManufacturer, setPort, validOption1, validOption2 |
| Methods inherited from interface jmri.jmrix.PortAdapter |
|---|
getDisabled, setDisabled |
| Constructor Detail |
|---|
public LnHexFilePort()
| Method Detail |
|---|
public void load(File file)
public void run()
run in interface Runnablepublic void setDelay(int newDelay)
public 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 LnPortControllerpublic boolean running()
public boolean okToSend()
LnPortControllerProvide a default implementation for the MS100, etc, in which this is _always_ true, as we rely on the queueing in the port itself.
okToSend in class LnPortControllerpublic Vector<String> getPortNames()
SerialPortAdapter
getPortNames in interface SerialPortAdaptergetPortNames in class AbstractSerialPortController
public String openPort(String portName,
String appName)
SerialPortAdapter
openPort in interface SerialPortAdapterpublic void configure()
SerialPortAdapter
configure in interface PortAdapterconfigure in interface SerialPortAdapterpublic String[] validBaudRates()
SerialPortAdapter
validBaudRates in interface SerialPortAdapterpublic void dispose()
dispose in interface PortAdapterdispose in class AbstractSerialPortControllerpublic LocoNetSystemConnectionMemo getAdapterMemo()
public LocoNetSystemConnectionMemo getSystemConnectionMemo()
getSystemConnectionMemo in interface PortAdaptergetSystemConnectionMemo in class AbstractSerialPortController
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||