Class XNetPacketizer

All Implemented Interfaces:
XNetInterface
Direct Known Subclasses:
LI100XNetPacketizer, LIUSBServerXNetPacketizer, LIUSBXNetPacketizer, XnTcpXNetPacketizer, Z21XNetPacketizer, ZTC611XNetPacketizer, ZTC640XNetPacketizer

public class XNetPacketizer
extends XNetTrafficController
Converts Stream-based I/O to/from XNet messages. The "XNetInterface" side sends/receives XNetMessage objects. The connection to an XNetPortController 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)