jmri.jmrix.loconet.loconetovertcp
Class LnOverTcpPacketizer
java.lang.Object
jmri.jmrix.loconet.LnTrafficController
jmri.jmrix.loconet.LnPacketizer
jmri.jmrix.loconet.loconetovertcp.LnOverTcpPacketizer
- All Implemented Interfaces:
- LocoNetInterface
public class LnOverTcpPacketizer
- extends LnPacketizer
Converts Stream-based I/O to/from LocoNet messages. The "LocoNetInterface"
side sends/receives LocoNetMessage objects. The connection to
a LnPortnetworkController 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)
Some of the message formats used in this class are Copyright Digitrax, Inc.
and used with permission as part of the JMRI project. That permission
does not extend to uses in other software products. If you wish to
use this code, algorithm or these message formats outside of JMRI, please
contact Digitrax Inc for separate permission.
- Author:
- Bob Jacobsen Copyright (C) 2001, Alex Shepherd Copyright (C) 2003, 2006
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
networkController
public LnNetworkPortController networkController
LnOverTcpPacketizer
public LnOverTcpPacketizer()
isXmtBusy
public boolean isXmtBusy()
- Description copied from class:
LnPacketizer
- Implement abstract method to signal if there's a backlog
of information waiting to be sent.
- Overrides:
isXmtBusy in class LnPacketizer
- Returns:
- true if busy, false if nothing waiting to send
connectPort
public void connectPort(LnNetworkPortController p)
- Make connection to existing LnPortnetworkController object.
- Parameters:
p - Port networkController for connected. Save this for a later
disconnect call
disconnectPort
public void disconnectPort(LnNetworkPortController p)
- Break connection to existing LnPortnetworkController object. Once broken,
attempts to send via "message" member will fail.
- Parameters:
p - previously connected port
Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.
Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: