|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrix.direct.TrafficController
public class TrafficController
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
| Field Summary | |
|---|---|
protected DataInputStream |
istream
|
protected OutputStream |
ostream
|
| Constructor Summary | |
|---|---|
TrafficController()
|
|
| Method Summary | |
|---|---|
void |
connectPort(AbstractSerialPortController p)
Make connection to existing PortController object. |
void |
disconnectPort(AbstractSerialPortController p)
Break connection to existing PortController object. |
static TrafficController |
instance()
static function returning the instance to use. |
void |
sendPacket(byte[] packet,
int repeats)
Send a specific packet to the rails. |
protected void |
setInstance()
|
boolean |
status()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected DataInputStream istream
protected OutputStream ostream
| Constructor Detail |
|---|
public TrafficController()
| Method Detail |
|---|
public static TrafficController instance()
protected void setInstance()
public void sendPacket(byte[] packet,
int repeats)
sendPacket in interface CommandStationpacket - Byte array representing the packet, including
the error-correction byte. Must not be null.repeats - Number of times to repeat the transmission,
but is ignored in the current implementationpublic boolean status()
public void connectPort(AbstractSerialPortController p)
public void disconnectPort(AbstractSerialPortController p)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||