Search in sources :

Example 16 with LenzCommandStation

use of jmri.jmrix.lenz.LenzCommandStation in project JMRI by JMRI.

the class ZTC611XNetInitializationManagerTest method testCtor.

public void testCtor() {
    // infrastructure objects
    XNetInterfaceScaffold t = new XNetInterfaceScaffold(new LenzCommandStation());
    XNetListenerScaffold l = new XNetListenerScaffold();
    XNetSystemConnectionMemo memo = new XNetSystemConnectionMemo(t);
    ZTC611XNetInitializationManager m = new ZTC611XNetInitializationManager(memo) {

        @Override
        protected int getInitTimeout() {
            // shorten, because this will fail & delay test
            return 50;
        }
    };
    Assert.assertNotNull("exists", t);
    Assert.assertNotNull("exists", l);
    Assert.assertNotNull("exists", m);
    Assert.assertNotNull("exists", memo);
}
Also used : XNetInterfaceScaffold(jmri.jmrix.lenz.XNetInterfaceScaffold) XNetListenerScaffold(jmri.jmrix.lenz.XNetListenerScaffold) XNetSystemConnectionMemo(jmri.jmrix.lenz.XNetSystemConnectionMemo) LenzCommandStation(jmri.jmrix.lenz.LenzCommandStation)

Example 17 with LenzCommandStation

use of jmri.jmrix.lenz.LenzCommandStation in project JMRI by JMRI.

the class XnTcpAdapter method configure.

/**
     * set up all of the other objects to operate with a XnTcp interface
     */
@Override
public void configure() {
    // connect to a packetizing traffic controller
    XNetTrafficController packets = new XnTcpXNetPacketizer(new LenzCommandStation());
    packets.connectPort(this);
    this.getSystemConnectionMemo().setXNetTrafficController(packets);
    new XNetInitializationManager(this.getSystemConnectionMemo());
}
Also used : XNetInitializationManager(jmri.jmrix.lenz.XNetInitializationManager) XNetTrafficController(jmri.jmrix.lenz.XNetTrafficController) LenzCommandStation(jmri.jmrix.lenz.LenzCommandStation)

Example 18 with LenzCommandStation

use of jmri.jmrix.lenz.LenzCommandStation in project JMRI by JMRI.

the class XNetSimulatorAdapter method configure.

/**
     * set up all of the other objects to operate with a XNetSimulator connected
     * to this port
     */
@Override
public void configure() {
    // connect to a packetizing traffic controller
    XNetTrafficController packets = new XNetPacketizer(new LenzCommandStation());
    packets.connectPort(this);
    // start operation
    // packets.startThreads();
    this.getSystemConnectionMemo().setXNetTrafficController(packets);
    sourceThread = new Thread(this);
    sourceThread.start();
    new XNetInitializationManager(this.getSystemConnectionMemo());
}
Also used : XNetInitializationManager(jmri.jmrix.lenz.XNetInitializationManager) XNetPacketizer(jmri.jmrix.lenz.XNetPacketizer) XNetTrafficController(jmri.jmrix.lenz.XNetTrafficController) LenzCommandStation(jmri.jmrix.lenz.LenzCommandStation)

Example 19 with LenzCommandStation

use of jmri.jmrix.lenz.LenzCommandStation in project JMRI by JMRI.

the class LI100Adapter method configure.

/**
     * set up all of the other objects to operate with a LI100 connected to this
     * port
     */
@Override
public void configure() {
    // connect to a packetizing traffic controller
    XNetTrafficController packets = new LI100XNetPacketizer(new LenzCommandStation());
    packets.connectPort(this);
    // start operation
    // packets.startThreads();
    this.getSystemConnectionMemo().setXNetTrafficController(packets);
    new LI100XNetInitializationManager(this.getSystemConnectionMemo());
}
Also used : XNetTrafficController(jmri.jmrix.lenz.XNetTrafficController) LenzCommandStation(jmri.jmrix.lenz.LenzCommandStation)

Example 20 with LenzCommandStation

use of jmri.jmrix.lenz.LenzCommandStation in project JMRI by JMRI.

the class LI100Adapter method configure.

/**
     * set up all of the other objects to operate with a LI100 connected to this
     * port
     */
@Override
public void configure() {
    // connect to a packetizing traffic controller
    XNetTrafficController packets = new XNetPacketizer(new LenzCommandStation());
    packets.connectPort(this);
    // start operation
    // packets.startThreads();
    this.getSystemConnectionMemo().setXNetTrafficController(packets);
    new XNetInitializationManager(this.getSystemConnectionMemo());
}
Also used : XNetInitializationManager(jmri.jmrix.lenz.XNetInitializationManager) XNetPacketizer(jmri.jmrix.lenz.XNetPacketizer) XNetTrafficController(jmri.jmrix.lenz.XNetTrafficController) LenzCommandStation(jmri.jmrix.lenz.LenzCommandStation)

Aggregations

LenzCommandStation (jmri.jmrix.lenz.LenzCommandStation)37 XNetInterfaceScaffold (jmri.jmrix.lenz.XNetInterfaceScaffold)26 XNetSystemConnectionMemo (jmri.jmrix.lenz.XNetSystemConnectionMemo)11 XNetReply (jmri.jmrix.lenz.XNetReply)10 XNetTrafficController (jmri.jmrix.lenz.XNetTrafficController)10 XNetInitializationManager (jmri.jmrix.lenz.XNetInitializationManager)8 Test (org.junit.Test)8 Before (org.junit.Before)6 XNetListenerScaffold (jmri.jmrix.lenz.XNetListenerScaffold)3 XNetPacketizer (jmri.jmrix.lenz.XNetPacketizer)3 XNetThrottleTest (jmri.jmrix.lenz.XNetThrottleTest)2 Turnout (jmri.Turnout)1 TurnoutManager (jmri.TurnoutManager)1