Package ptolemy.data

Examples of ptolemy.data.IntToken


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

        leftPadding = new Parameter(this, "leftPadding", new IntToken(0));
        rightPadding = new Parameter(this, "rightPadding", new IntToken(0));
        topPadding = new Parameter(this, "topPadding", new IntToken(0));
        bottomPadding = new Parameter(this, "bottomPadding", new IntToken(0));

        borderType = new StringAttribute(this, "borderType");
        borderType.setExpression("Zero");
        _borderType = _BORDER_ZERO;

View Full Code Here


        interpolationType = new StringAttribute(this, "interpolationType");
        interpolationType.setExpression("bilinear");
        _interpolationType = _BILINEAR;

        subSampleBits = new Parameter(this, "subSampleBits", new IntToken(8));

        input.setTypeEquals(BaseType.OBJECT);
        output.setTypeEquals(BaseType.OBJECT);
    }
View Full Code Here

            throws IllegalActionException, NameDuplicationException {
        super(container, name);
        setClassName("ptolemy.actor.lib.hoc.IterateOverArray");
        new IterateDirector(this, uniqueName("IterateDirector"));

        _iterationCount = new Variable(this, "iterationCount", new IntToken(0));
        _iterationCount.setTypeEquals(BaseType.INT);
    }
View Full Code Here

                int result = Executable.COMPLETED;
                int iterationCount = 0;

                while (result != Executable.NOT_READY) {
                    iterationCount++;
                    _iterationCount.setToken(new IntToken(iterationCount));

                    if (_debugging) {
                        _debug(new FiringEvent(this, actor,
                                FiringEvent.BEFORE_ITERATE, iterationCount));
                    }
View Full Code Here

        fileName.setExpression("file.jpg");

        quality = new IntRangeParameter(this, "quality");

        restartInterval = new Parameter(this, "restartInterval",
                new IntToken(0));

        writeJFIFHeader = new Parameter(this, "writeJFIFHeader");
        writeJFIFHeader.setTypeEquals(BaseType.BOOLEAN);
        writeJFIFHeader.setToken(BooleanToken.TRUE);
    }
View Full Code Here

        shape = new StringAttribute(this, "shape");
        shape.setExpression("Square");
        _shape = MedianFilterDescriptor.MEDIAN_MASK_SQUARE;

        size = new Parameter(this, "size", new IntToken(3));
    }
View Full Code Here

            NameDuplicationException {
        // During construction, create the scheduleCacheSize parameter
        // with default value of 100.
        int cacheSize = 100;
        scheduleCacheSize = new Parameter(this, "scheduleCacheSize",
                new IntToken(cacheSize));

        try {
            CachedSDFScheduler scheduler = new CachedSDFScheduler(this,
                    uniqueName("Scheduler"), cacheSize);
            setScheduler(scheduler);
View Full Code Here

        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

        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

    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

TOP

Related Classes of ptolemy.data.IntToken

Copyright © 2018 www.massapicom. 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.