Package ptolemy.data

Examples of ptolemy.data.IntToken


            _queue.add(input.get(0));
        } else {
            output.broadcast((Token) _queue.removeFirst());
        }

        IntToken t = new IntToken(_queue.size());
        length.broadcast(t);
    }
View Full Code Here


            throws NameDuplicationException, IllegalActionException {
        super(container, name);
        input2 = new TypedIOPort(this, "input2", true, false);
        output2 = new TypedIOPort(this, "output2", false, true);

        value = new Parameter(this, "value", new IntToken(1));
        input_rate = new Parameter(this, "input_rate", new IntToken(1));
        output_rate = new Parameter(this, "output_rate", new IntToken(1));
        input2_rate = new Parameter(this, "input2_rate", new IntToken(1));
        output2_rate = new Parameter(this, "output2_rate", new IntToken(1));

        input_tokenConsumptionRate = new Parameter(input,
                "tokenConsumptionRate");
        input_tokenConsumptionRate.setExpression("input_rate");
View Full Code Here

            throws NameDuplicationException, IllegalActionException {
        super(container, name);
        channelName = new StringParameter(this, "channelName");
        channelName.setExpression("AtomicWirelessChannel");

        sleepTime = new Parameter(this, "sleepTime", new IntToken(500));
    }
View Full Code Here

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

        imageColumns = new Parameter(this, "imageColumns", new IntToken("176"));
        imageColumns.setTypeEquals(BaseType.INT);
        imageRows = new Parameter(this, "imageRows", new IntToken("144"));
        imageRows.setTypeEquals(BaseType.INT);
        partitionColumns = new Parameter(this, "partitionColumns",
                new IntToken("4"));
        partitionColumns.setTypeEquals(BaseType.INT);
        partitionRows = new Parameter(this, "partitionRows", new IntToken("2"));
        partitionRows.setTypeEquals(BaseType.INT);

        output_tokenProductionRate = new Parameter(output,
                "tokenProductionRate");
        output_tokenProductionRate.setTypeEquals(BaseType.INT);
View Full Code Here

     *   actor with this name.
     */
    public SDFTestZeroRate1(CompositeEntity container, String name)
            throws NameDuplicationException, IllegalActionException {
        super(container, name);
        value = new Parameter(this, "value", new IntToken(1));

        input_rate1 = new Parameter(this, "input_rate1", new IntToken(1));
        input_tokenConsumptionRate = new Parameter(input,
                "tokenConsumptionRate");
        input_tokenConsumptionRate.setExpression("input_rate1");

        output_rate1 = new Parameter(this, "output_rate1", new IntToken(1));
        output_tokenProductionRate = new Parameter(output,
                "tokenProductionRate");
        output_tokenProductionRate.setExpression("output_rate1");

        // Set the type constraint.
View Full Code Here

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

        imageColumns = new Parameter(this, "imageColumns", new IntToken("176"));
        imageColumns.setTypeEquals(BaseType.INT);
        imageRows = new Parameter(this, "imageRows", new IntToken("144"));
        imageRows.setTypeEquals(BaseType.INT);
        partitionColumns = new Parameter(this, "partitionColumns",
                new IntToken("4"));
        partitionColumns.setTypeEquals(BaseType.INT);
        partitionRows = new Parameter(this, "partitionRows", new IntToken("2"));
        partitionRows.setTypeEquals(BaseType.INT);

        input_tokenConsumptionRate = new Parameter(input,
                "tokenConsumptionRate");
        input_tokenConsumptionRate.setTypeEquals(BaseType.INT);
View Full Code Here

        sceneGraphIn.setInput(true);
        sceneGraphIn.setTypeEquals(SceneGraphToken.TYPE);
        sceneGraphIn.setMultiport(true);

        horizontalResolution = new Parameter(this, "horizontalResolution",
                new IntToken(400));
        horizontalResolution.setTypeEquals(BaseType.INT);

        verticalResolution = new Parameter(this, "verticalResolution",
                new IntToken(400));
        verticalResolution.setTypeEquals(BaseType.INT);

        rotatable = new Parameter(this, "rotatable", new BooleanToken(true));
        rotatable.setTypeEquals(BaseType.BOOLEAN);
View Full Code Here

                if (copernicusIterations.length() > 0) {
                    System.out.println("KernelMain: "
                            + "Setting number of iterations to "
                            + copernicusIterations);
                    iterations.setToken(new IntToken(copernicusIterations));
                }
            }
        }

        // Initialize the model to ensure type resolution and scheduling
View Full Code Here

    public void fire() {
        try {
            if (_iterationCount >= _seq.length) {
                output.broadcast(_zero);
            } else {
                output.broadcast(new IntToken(_seq[_iterationCount]));
            }
        } catch (IllegalActionException ex) {
            // Should not be thrown because this is an output port.
            throw new InternalErrorException(ex.getMessage());
        }
View Full Code Here

        codeBook = new Parameter(this, "codeBook", new StringToken(
                "/ptolemy/domains/sdf" + "/lib/vq/data/usc_hvq_s5.dat"));
        codeBook.setTypeEquals(BaseType.STRING);

        blockCount = new Parameter(this, "blockCount", new IntToken("1"));
        blockCount.setTypeEquals(BaseType.INT);

        blockWidth = new Parameter(this, "blockWidth", new IntToken("4"));
        blockWidth.setTypeEquals(BaseType.INT);

        blockHeight = new Parameter(this, "blockHeight", new IntToken("2"));
        blockHeight.setTypeEquals(BaseType.INT);

        input_tokenConsumptionRate = new Parameter(input,
                "tokenConsumptionRate");
        input_tokenConsumptionRate.setTypeEquals(BaseType.INT);
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.