Class TrafficController

java.lang.Object
jmri.jmrix.direct.TrafficController
All Implemented Interfaces:
CommandStation

public class TrafficController extends Object implements CommandStation
Converts Stream-based I/O to/from NMRA packets and controls sending to the direct interface.

This is much simpler than many other "TrafficHandler" classes, because

  • It's not handling mode information, or even any information back from the device; it's just sending.
  • It can work with the direct packets.
This actually bears more similarity to a pure implementation of the CommandStation interface, which is where the real guts of it is. In particular, note that transmission is not a threaded operation.