Package ptolemy.actor

Examples of ptolemy.actor.TypedCompositeActor.connect()


        TestSource source1 = new TestSource(toplevel, "source1");
        TestSource source2 = new TestSource(toplevel, "source2");
        _recorder = new Recorder(toplevel, "recorder");

        toplevel.connect(source1.output, source2.input);
        toplevel.connect(source2.output, _recorder.input);

        director.startTime.setToken(new DoubleToken(0.0));
        director.stopTime.setToken(new DoubleToken(1000.0));
        manager.initialize();
        manager.iterate();
View Full Code Here


        // Create 20 clocks.
        for (int i = 1; i < 20; i++) {
            Clock clock = new Clock(toplevel, "clock" + i);
            clock.period.setExpression("" + (i * 2));
            clock.values.setExpression("{" + i + ", " + i + "}");
            toplevel.connect(clock.output, merge.input);
        }

        Recorder recorder = new Recorder(toplevel, "recorder");
        recorder.capacity.setExpression("0");

View Full Code Here

        // TimedPlotter recorder = new TimedPlotter(toplevel, "recorder");
        // recorder.setPanel(null);
        // recorder.plot.setMarksStyle("dots");
        // recorder.plot.setConnected(false);
        toplevel.connect(merge.output, recorder.input);

        director.stopTime.setToken(new DoubleToken(1000.0));
        manager.run();
        manager.run();
        System.out.println("Total number of events seen by Recorder: "
View Full Code Here

            Chopstick f3 = new Chopstick(univ, "Chopstick3");
            Chopstick f4 = new Chopstick(univ, "Chopstick4");
            Chopstick f5 = new Chopstick(univ, "Chopstick5");

            // Now connect up the Actors
            univ.connect((TypedIOPort) p1.getPort("leftIn"), (TypedIOPort) f5
                    .getPort("rightOut"));
            univ.connect((TypedIOPort) p1.getPort("leftOut"), (TypedIOPort) f5
                    .getPort("rightIn"));
            univ.connect((TypedIOPort) p1.getPort("rightIn"), (TypedIOPort) f1
                    .getPort("leftOut"));
View Full Code Here

            Chopstick f5 = new Chopstick(univ, "Chopstick5");

            // Now connect up the Actors
            univ.connect((TypedIOPort) p1.getPort("leftIn"), (TypedIOPort) f5
                    .getPort("rightOut"));
            univ.connect((TypedIOPort) p1.getPort("leftOut"), (TypedIOPort) f5
                    .getPort("rightIn"));
            univ.connect((TypedIOPort) p1.getPort("rightIn"), (TypedIOPort) f1
                    .getPort("leftOut"));
            univ.connect((TypedIOPort) p1.getPort("rightOut"), (TypedIOPort) f1
                    .getPort("leftIn"));
View Full Code Here

            // Now connect up the Actors
            univ.connect((TypedIOPort) p1.getPort("leftIn"), (TypedIOPort) f5
                    .getPort("rightOut"));
            univ.connect((TypedIOPort) p1.getPort("leftOut"), (TypedIOPort) f5
                    .getPort("rightIn"));
            univ.connect((TypedIOPort) p1.getPort("rightIn"), (TypedIOPort) f1
                    .getPort("leftOut"));
            univ.connect((TypedIOPort) p1.getPort("rightOut"), (TypedIOPort) f1
                    .getPort("leftIn"));
            univ.connect((TypedIOPort) p2.getPort("leftIn"), (TypedIOPort) f1
                    .getPort("rightOut"));
View Full Code Here

                    .getPort("rightOut"));
            univ.connect((TypedIOPort) p1.getPort("leftOut"), (TypedIOPort) f5
                    .getPort("rightIn"));
            univ.connect((TypedIOPort) p1.getPort("rightIn"), (TypedIOPort) f1
                    .getPort("leftOut"));
            univ.connect((TypedIOPort) p1.getPort("rightOut"), (TypedIOPort) f1
                    .getPort("leftIn"));
            univ.connect((TypedIOPort) p2.getPort("leftIn"), (TypedIOPort) f1
                    .getPort("rightOut"));
            univ.connect((TypedIOPort) p2.getPort("leftOut"), (TypedIOPort) f1
                    .getPort("rightIn"));
View Full Code Here

                    .getPort("rightIn"));
            univ.connect((TypedIOPort) p1.getPort("rightIn"), (TypedIOPort) f1
                    .getPort("leftOut"));
            univ.connect((TypedIOPort) p1.getPort("rightOut"), (TypedIOPort) f1
                    .getPort("leftIn"));
            univ.connect((TypedIOPort) p2.getPort("leftIn"), (TypedIOPort) f1
                    .getPort("rightOut"));
            univ.connect((TypedIOPort) p2.getPort("leftOut"), (TypedIOPort) f1
                    .getPort("rightIn"));
            univ.connect((TypedIOPort) p2.getPort("rightIn"), (TypedIOPort) f2
                    .getPort("leftOut"));
View Full Code Here

                    .getPort("leftOut"));
            univ.connect((TypedIOPort) p1.getPort("rightOut"), (TypedIOPort) f1
                    .getPort("leftIn"));
            univ.connect((TypedIOPort) p2.getPort("leftIn"), (TypedIOPort) f1
                    .getPort("rightOut"));
            univ.connect((TypedIOPort) p2.getPort("leftOut"), (TypedIOPort) f1
                    .getPort("rightIn"));
            univ.connect((TypedIOPort) p2.getPort("rightIn"), (TypedIOPort) f2
                    .getPort("leftOut"));
            univ.connect((TypedIOPort) p2.getPort("rightOut"), (TypedIOPort) f2
                    .getPort("leftIn"));
View Full Code Here

                    .getPort("leftIn"));
            univ.connect((TypedIOPort) p2.getPort("leftIn"), (TypedIOPort) f1
                    .getPort("rightOut"));
            univ.connect((TypedIOPort) p2.getPort("leftOut"), (TypedIOPort) f1
                    .getPort("rightIn"));
            univ.connect((TypedIOPort) p2.getPort("rightIn"), (TypedIOPort) f2
                    .getPort("leftOut"));
            univ.connect((TypedIOPort) p2.getPort("rightOut"), (TypedIOPort) f2
                    .getPort("leftIn"));
            univ.connect((TypedIOPort) p3.getPort("leftIn"), (TypedIOPort) f2
                    .getPort("rightOut"));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.