Package jmri.jmrix.loconet
Class LnPacketizerStrict
- java.lang.Object
-
- jmri.jmrix.loconet.LnTrafficController
-
- jmri.jmrix.loconet.LnPacketizer
-
- jmri.jmrix.loconet.LnPacketizerStrict
-
- All Implemented Interfaces:
LocoNetInterface
public class LnPacketizerStrict extends LnPacketizer
Converts Stream-based I/O to/from LocoNet messages. The "LocoNetInterface" side sends/receives LocoNetMessage objects. The connection to a LnPortController is via a pair of *Streams, which then carry sequences of characters for transmission.Messages come to this via the main GUI thread, and are forwarded back to listeners in that same thread. Reception and transmission are handled in dedicated threads by RcvHandler and XmtHandler objects. Those are internal classes defined here. The thread priorities are:
- RcvHandler - at highest available priority
- XmtHandler - down one, which is assumed to be above the GUI
- (everything else)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
LnPacketizerStrict.RcvHandlerStrict
Captive class to handle incoming characters.(package private) class
LnPacketizerStrict.XmtHandlerStrict
Captive class to handle transmission-
Nested classes/interfaces inherited from class jmri.jmrix.loconet.LnPacketizer
LnPacketizer.Echo, LnPacketizer.RcvHandler, LnPacketizer.XmtHandler
-
-
Field Summary
Fields Modifier and Type Field Description static int
maxWaitCount
-
Fields inherited from class jmri.jmrix.loconet.LnPacketizer
controller, echo, istream, ostream, rcvHandler, rcvThread, threadStopRequest, xmtHandler, xmtList, xmtThread
-
Fields inherited from class jmri.jmrix.loconet.LnTrafficController
listeners, memo, receivedByteCount, receivedMsgCount, transmittedMsgCount
-
Fields inherited from interface jmri.jmrix.loconet.LocoNetInterface
ALL, POWER, PROGRAMMING, SENSORS, SLOTINFO, TURNOUTS
-
-
Constructor Summary
Constructors Constructor Description LnPacketizerStrict(LocoNetSystemConnectionMemo m)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
startThreads()
Invoked at startup to start the threads needed here.-
Methods inherited from class jmri.jmrix.loconet.LnPacketizer
connectPort, disconnectPort, dispose, isXmtBusy, messageTransmitted, readByteProtected, sendLocoNetMessage, status, terminateThreads
-
Methods inherited from class jmri.jmrix.loconet.LnTrafficController
addLocoNetListener, getReceivedByteCount, getReceivedMsgCount, getSystemConnectionMemo, getTransmittedMsgCount, notify, removeLocoNetListener, resetStatistics, setSystemConnectionMemo
-
-
-
-
Field Detail
-
maxWaitCount
public static int maxWaitCount
-
-
Constructor Detail
-
LnPacketizerStrict
public LnPacketizerStrict(LocoNetSystemConnectionMemo m)
-
-
Method Detail
-
startThreads
public void startThreads()
Invoked at startup to start the threads needed here.- Overrides:
startThreads
in classLnPacketizer
-
-