Examples of IntToken


Examples of ptolemy.data.IntToken

        super(container, name);
        _setClassName();

        // Set the port orientation so the input ports are on the left
        // edge of the icon.
        rotatePorts.setToken(new IntToken(0));

        // Create an output port for packets.
        packetOut = new TypedIOPort(this, "packetOut", false, true);
        packetOut.setTypeEquals(BaseType.STRING);
View Full Code Here

Examples of ptolemy.data.IntToken

        angleSpan = new Parameter(this, "angleSpan");
        angleSpan.setTypeEquals(BaseType.DOUBLE);
        angleSpan.setExpression("2.0 * PI");

        slices = new Parameter(this, "slices", new IntToken(32));
        slices.setTypeEquals(BaseType.INT);

        slices.moveToFirst();
        angleSpan.moveToFirst();
        polyline.moveToFirst();
View Full Code Here

Examples of ptolemy.data.IntToken

    public final void fire() throws IllegalActionException {
        super.fire();

        int rate = ((IntToken) numberOfBits.getToken()).intValue();
        BooleanToken[] bits = new BooleanToken[rate];
        IntToken token = (IntToken) (input.get(0));
        int integer = token.intValue();

        if (integer < 0) {
            if (integer < -(1 << (rate - 1))) {
                throw new IllegalActionException(this,
                        "integer is out of range.");
View Full Code Here

Examples of ptolemy.data.IntToken

     */
    public void fire() throws IllegalActionException {
        super.fire();
        if (input.hasToken(0)) {
            ArrayToken token = (ArrayToken) input.get(0);
            output.broadcast(new IntToken(token.length()));
        }
    }
View Full Code Here

Examples of ptolemy.data.IntToken

     */
    public Recorder(CompositeEntity container, String name)
            throws NameDuplicationException, IllegalActionException {
        super(container, name);

        capacity = new Parameter(this, "capacity", new IntToken(-1));
        capacity.setTypeEquals(BaseType.INT);
    }
View Full Code Here

Examples of ptolemy.data.IntToken

        deadZone = new Parameter(this, "deadZone", new DoubleToken("0.01"));

        isPolling = new Parameter(this, "isPolling", new BooleanToken("true"));

        pollingInterval = new Parameter(this, "pollingInterval", new IntToken(
                "50"));

        x = new TypedIOPort(this, "x", false, true);
        x.setTypeEquals(BaseType.DOUBLE);
View Full Code Here

Examples of ptolemy.data.IntToken

    public SequenceScope(CompositeEntity container, String name)
            throws IllegalActionException, NameDuplicationException {
        super(container, name);

        // set the parameters
        width = new Parameter(this, "width", new IntToken(10));
        width.setTypeEquals(BaseType.INT);
        persistence = new Parameter(this, "persistence", new IntToken(10));
        persistence.setTypeEquals(BaseType.INT);
    }
View Full Code Here

Examples of ptolemy.data.IntToken

     *   an entity already in the container.
     */
    public ZeroOrderHold(CompositeEntity container, String name)
            throws IllegalActionException, NameDuplicationException {
        super(container, name);
        defaultValue = new Parameter(this, "defaultValue", new IntToken(0));
        output.setTypeAtLeast(input);
        output.setTypeAtLeast(defaultValue);
        new Parameter(input, "signalType", new StringToken("DISCRETE"));
        new Parameter(output, "signalType", new StringToken("CONTINUOUS"));

View Full Code Here

Examples of ptolemy.data.IntToken

        for (int i = 0; i < providers.length; i++) {
            provider.addChoice(providers[i].getName());
        }

        keySize = new Parameter(this, "keySize", new IntToken(56));
        keySize.setTypeEquals(BaseType.INT);
    }
View Full Code Here

Examples of ptolemy.data.IntToken

            throws NameDuplicationException, IllegalActionException {
        super(container, name);

        output.setTypeEquals(BaseType.INT);

        N = new PortParameter(this, "N", new IntToken(2));
        N.setTypeEquals(BaseType.INT);
        new SingletonParameter(N.getPort(), "_showName")
                .setToken(BooleanToken.TRUE);

        s = new PortParameter(this, "s", new IntToken(1));
        s.setTypeEquals(BaseType.INT);
        new SingletonParameter(s.getPort(), "_showName")
                .setToken(BooleanToken.TRUE);

        n = new PortParameter(this, "n", new IntToken(1));
        n.setTypeEquals(BaseType.INT);
        new SingletonParameter(n.getPort(), "_showName")
                .setToken(BooleanToken.TRUE);

        n.moveToFirst();
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.