Package ptolemy.data.expr

Examples of ptolemy.data.expr.Parameter


     */
    public RecursiveLattice(CompositeEntity container, String name) throws NameDuplicationException, IllegalActionException  {
        super(container, name);
        input.setTypeEquals(BaseType.DOUBLE);
        output.setTypeEquals(BaseType.DOUBLE);
        reflectionCoefficients = new Parameter(this, "reflectionCoefficients");
        reflectionCoefficients.setExpression("{0.804534, -0.820577, 0.521934, -0.205}");
    }
View Full Code Here


     * actor with this name.
     */
    public SequentialClock(CompositeEntity container, String name) throws NameDuplicationException, IllegalActionException  {
        super(container, name);
        output = new TypedIOPort(this, "output", false, true);
        period = new Parameter(this, "period", new DoubleToken(2.0));
        period.setTypeEquals(BaseType.DOUBLE);
        offsets = new Parameter(this, "offsets");
        offsets.setExpression("{0.0, 1.0}");
        offsets.setTypeEquals(new ArrayType(BaseType.DOUBLE));
        attributeChanged(offsets);
        IntToken[] defaultValues = new IntToken[2];
        defaultValues[0] = new IntToken(1);
        defaultValues[1] = new IntToken(0);
        ArrayToken defaultValueToken = new ArrayToken(BaseType.INT, defaultValues);
        values = new Parameter(this, "values", defaultValueToken);
        output.setTypeAtLeast(ArrayType.elementType(values));
        attributeChanged(values);
    }
View Full Code Here

     * @exception NameDuplicationException If the container already has an
     * actor with this name.
     */
    public IIR(CompositeEntity container, String name) throws NameDuplicationException, IllegalActionException  {
        super(container, name);
        numerator = new Parameter(this, "numerator");
        numerator.setExpression("{1.0}");
        attributeChanged(numerator);
        denominator = new Parameter(this, "denominator");
        denominator.setExpression("{1.0}");
        attributeChanged(denominator);
        output.setTypeAtLeast(ArrayType.elementType(numerator));
        output.setTypeAtLeast(ArrayType.elementType(denominator));
        input.setTypeAtLeast(output);
View Full Code Here

        super(container, name);

        _argumentsList = new NamedList(this);

        // FIXME: Should libraryDirectory be a FileParameter?
        libraryDirectory = new Parameter(this, "libraryDirectory",
                new StringToken("jni/lib"));
        nativeFunction = new Parameter(this, "nativeFunction", new StringToken(
                "unknownFunction"));
        nativeLibrary = new Parameter(this, "nativeLibrary", new StringToken(
                "unknownLibrary"));

        // Create our own custom editor
        new JNIActorEditorFactory(this, "_editorFactory");
View Full Code Here

     * @exception NameDuplicationException If the container already has an
     * actor with this name.
     */
    public Pulse(CompositeEntity container, String name) throws NameDuplicationException, IllegalActionException  {
        super(container, name);
        indexes = new Parameter(this, "indexes");
        indexes.setExpression("{0, 1}");
        indexes.setTypeEquals(new ArrayType(BaseType.INT));
        attributeChanged(indexes);
        values = new Parameter(this, "values");
        values.setExpression("{1, 0}");
        repeat = new Parameter(this, "repeat", new BooleanToken(false));
        repeat.setTypeEquals(BaseType.BOOLEAN);
        attributeChanged(repeat);
        output.setTypeAtLeast(ArrayType.elementType(values));
        attributeChanged(values);
    }
View Full Code Here

        super(container, name);
        input.setMultiport(true);
        reset = new TypedIOPort(this, "reset", true, false);
        reset.setTypeEquals(BaseType.BOOLEAN);
        reset.setMultiport(true);
        init = new Parameter(this, "init");
        init.setExpression("0");
        lowerBound = new Parameter(this, "lowerBound");
        lowerBound.setTypeSameAs(init);
        upperBound = new Parameter(this, "upperBound");
        upperBound.setTypeSameAs(init);
        output.setTypeAtLeast(init);
        output.setTypeAtLeast(input);
    }
View Full Code Here

     * @exception NameDuplicationException If the container already has an
     * actor with this name.
     */
    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

     * by the proposed container.
     */
    public Commutator(CompositeEntity container, String name) throws NameDuplicationException, IllegalActionException  {
        super(container, name);
        input.setMultiport(true);
        output_tokenProductionRate = new Parameter(output, "tokenProductionRate");
        output_tokenProductionRate.setExpression("0");
        input_tokenConsumptionRate = new Parameter(input, "tokenConsumptionRate");
        input_tokenConsumptionRate.setExpression("blockSize");
        blockSize = new Parameter(this, "blockSize");
        blockSize.setTypeEquals(BaseType.INT);
        blockSize.setExpression("1");
    }
View Full Code Here

     * @exception NameDuplicationException If the name coincides with
     * an actor already in the container.
     */
    public Sequence(CompositeEntity container, String name) throws IllegalActionException, NameDuplicationException  {
        super(container, name);
        values = new Parameter(this, "values");
        values.setExpression("{1}");
        repeat = new Parameter(this, "repeat", BooleanToken.FALSE);
        repeat.setTypeEquals(BaseType.BOOLEAN);
        holdLastOutput = new Parameter(this, "holdLastOutput", BooleanToken.FALSE);
        holdLastOutput.setTypeEquals(BaseType.BOOLEAN);
        enable = new TypedIOPort(this, "enable", true, false);
        enable.setTypeEquals(BaseType.BOOLEAN);
        output = new TypedIOPort(this, "output", false, true);
        output.setTypeAtLeast(ArrayType.elementType(values));
View Full Code Here

     * @exception IllegalActionException If the actor cannot be contained
     * by the proposed container.
     */
    public Distributor(CompositeEntity container, String name) throws NameDuplicationException, IllegalActionException  {
        super(container, name);
        blockSize = new Parameter(this, "blockSize");
        blockSize.setTypeEquals(BaseType.INT);
        blockSize.setExpression("1");
        input_tokenConsumptionRate = new Parameter(input, "tokenConsumptionRate", new IntToken(0));
        input_tokenConsumptionRate.setVisibility(Settable.NOT_EDITABLE);
        input_tokenConsumptionRate.setTypeEquals(BaseType.INT);
        input_tokenConsumptionRate.setPersistent(false);
        output_tokenProductionRate = new Parameter(output, "tokenProductionRate");
        output_tokenProductionRate.setVisibility(Settable.NOT_EDITABLE);
        output_tokenProductionRate.setTypeEquals(BaseType.INT);
        output_tokenProductionRate.setExpression("blockSize");
        output_tokenProductionRate.setPersistent(false);
        output.setMultiport(true);
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.