Package ptolemy.data.expr

Examples of ptolemy.data.expr.Parameter


        rgbFillColor.setExpression("{1.0, 1.0, 1.0, 1.0}");

        rgbOutlineColor = new ColorAttribute(this, "rgbOutlineColor");
        rgbOutlineColor.setExpression("{0.0, 0.0, 0.0, 1.0}");

        outlineWidth = new Parameter(this, "outlineWidth", new DoubleToken(1.0));
        outlineWidth.setTypeEquals(BaseType.DOUBLE);
    }
View Full Code Here


    private void _init() throws IllegalActionException,
            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);
View Full Code Here

        super(container, name);

        input.setTypeEquals(BaseType.COMPLEX);
        output.setTypeEquals(BaseType.COMPLEX);

        order = new Parameter(this, "order");
        order.setExpression("8");
        order.setTypeEquals(BaseType.INT);

        input_tokenConsumptionRate.setExpression("2^order");
        output_tokenProductionRate.setExpression("2^order");
View Full Code Here

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

        polyline = new Parameter(this, "polyline");
        polyline.setTypeEquals(new ArrayType(BaseType.DOUBLE));
        polyline
                .setExpression("{0.5, 0.25, 0.5, -0.25, 0.25, -0.25, 0.25, 0.25, 0.5, 0.25}");

        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

            if (port == null) {
                throw new InternalErrorException(
                        "put() requires that the port has a container");
            }

            Parameter priority = (Parameter) port.getAttribute("priority");

            if (priority == null) {
                if (port.getContainer() == null) {
                    throw new InternalErrorException(
                            "put() requires that the port '"
                                    + port
                                    + "' that contains this receiver be itself "
                                    + "contained");
                }

                priority = (Parameter) port.getContainer().getAttribute(
                        "priority");
            }

            int priorityValue = 5;

            if (priority != null) {
                try {
                    priorityValue = ((IntToken) priority.getToken()).intValue();
                } catch (ClassCastException ex) {
                    throw new InternalErrorException(null, ex,
                            "priorityValue '" + priority.getToken()
                                    + "' must be an integer in "
                                    + getContainer());
                }
            }
View Full Code Here

    public DDEDirector() throws IllegalActionException,
            NameDuplicationException {
        super();

        double value = PrioritizedTimedQueue.ETERNITY;
        stopTime = new Parameter(this, "stopTime", new DoubleToken(value));
        timeResolution.setVisibility(Settable.FULL);
    }
View Full Code Here

    public DDEDirector(Workspace workspace) throws IllegalActionException,
            NameDuplicationException {
        super(workspace);

        double value = PrioritizedTimedQueue.ETERNITY;
        stopTime = new Parameter(this, "stopTime", new DoubleToken(value));
        timeResolution.setVisibility(Settable.FULL);
    }
View Full Code Here

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

        double value = PrioritizedTimedQueue.ETERNITY;
        stopTime = new Parameter(this, "stopTime", new DoubleToken(value));
        timeResolution.setVisibility(Settable.FULL);
    }
View Full Code Here

        super(container, name);

        input.setTypeEquals(BaseType.COMPLEX);
        output.setTypeEquals(BaseType.COMPLEX);

        order = new Parameter(this, "order");
        order.setExpression("8");
        order.setTypeEquals(BaseType.INT);

        input_tokenConsumptionRate.setExpression("2^order");
        output_tokenProductionRate.setExpression("2^order");
View Full Code Here

        taps.setVisibility(Settable.NONE);

        error = new TypedIOPort(this, "error", true, false);
        tapValues = new TypedIOPort(this, "tapValues", false, true);

        stepSize = new Parameter(this, "stepSize");
        stepSize.setExpression("0.01");

        errorDelay = new Parameter(this, "errorDelay");
        errorDelay.setExpression("1");
        errorDelay.setTypeEquals(BaseType.INT);

        // NOTE: This parameter is really just a renaming of the
        // taps parameter of the base class.  Setting it will just
        // cause the base class to be set.
        initialTaps = new Parameter(this, "initialTaps");
        initialTaps.setTypeAtLeast(ArrayType.ARRAY_BOTTOM);
        initialTaps.setExpression("{1.0, 0.0, 0.0, 0.0}");

        // set type constraints.
        error.setTypeSameAs(input);
View Full Code Here

TOP

Related Classes of ptolemy.data.expr.Parameter

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.