jmri.jmrix.loconet.loconetovertcp
Class LnOverTcpPacketizer

java.lang.Object
  extended by jmri.jmrix.loconet.LnTrafficController
      extended by jmri.jmrix.loconet.LnPacketizer
          extended by 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 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:

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

Field Summary
 
Fields inherited from class jmri.jmrix.loconet.LnPacketizer
controller, echo, istream, ostream, rcvHandler, xmtHandler, xmtList
 
Fields inherited from class jmri.jmrix.loconet.LnTrafficController
listeners, receivedByteCount, receivedMsgCount, self, transmittedMsgCount
 
Fields inherited from interface jmri.jmrix.loconet.LocoNetInterface
ALL, POWER, PROGRAMMING, SENSORS, SLOTINFO, TURNOUTS
 
Constructor Summary
LnOverTcpPacketizer()
           
 
Method Summary
 
Methods inherited from class jmri.jmrix.loconet.LnPacketizer
connectPort, disconnectPort, isXmtBusy, readByteProtected, run, sendLocoNetMessage, startThreads, status
 
Methods inherited from class jmri.jmrix.loconet.LnTrafficController
addLocoNetListener, getReceivedByteCount, getReceivedMsgCount, getTransmittedMsgCount, instance, notify, removeLocoNetListener, resetStatistics
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LnOverTcpPacketizer

public LnOverTcpPacketizer()


Copyright © 1997 - 2009 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: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads