Package ptolemy.actor.parameters

Examples of ptolemy.actor.parameters.PortParameter


     * actor with this name.
     */
    public Gaussian(CompositeEntity container, String name) throws NameDuplicationException, IllegalActionException  {
        super(container, name);
        output.setTypeEquals(BaseType.DOUBLE);
        mean = new PortParameter(this, "mean", new DoubleToken(0.0));
        mean.setTypeEquals(BaseType.DOUBLE);
        standardDeviation = new PortParameter(this, "standardDeviation");
        standardDeviation.setExpression("1.0");
        standardDeviation.setTypeEquals(BaseType.DOUBLE);
    }
View Full Code Here


        maximumValue.setExpression("1.0");
        maximumValue.setTypeEquals(BaseType.DOUBLE);
        numberOfBins = new Parameter(this, "numberOfBins");
        numberOfBins.setExpression("10");
        numberOfBins.setTypeEquals(BaseType.INT);
        inputCount = new PortParameter(this, "inputCount");
        inputCount.setExpression("10");
        inputCount.setTypeEquals(BaseType.INT);
        input_tokenConsumptionRate = new Parameter(input, "tokenConsumptionRate");
        input_tokenConsumptionRate.setExpression("inputCount");
        input_tokenConsumptionRate.setTypeEquals(BaseType.INT);
View Full Code Here

     */
    public Ramp(CompositeEntity container, String name) throws NameDuplicationException, IllegalActionException  {
        super(container, name);
        init = new Parameter(this, "init");
        init.setExpression("0");
        step = new PortParameter(this, "step");
        step.setExpression("1");
        output.setTypeAtLeast(init);
        output.setTypeAtLeast(step);
        _attachText("_iconDescription", "<svg>\n" + "<rect x=\"-30\" y=\"-20\" "+"width=\"60\" height=\"40\" "+"style=\"fill:white\"/>\n"+"<polygon points=\"-20,10 20,-10 20,10\" "+"style=\"fill:grey\"/>\n"+"</svg>\n");
        $ASSIGN$_resultArray(new Token[1]);
View Full Code Here

        scale.setExpression("absolute");
        scale.addChoice("absolute");
        scale.addChoice("relative linear");
        scale.addChoice("relative amplitude decibels");
        scale.addChoice("relative power decibels");
        startIndex = new PortParameter(this, "startIndex");
        startIndex.setExpression("0");
        startIndex.setTypeEquals(BaseType.INT);
        endIndex = new PortParameter(this, "endIndex");
        endIndex.setExpression("MaxInt");
        endIndex.setTypeEquals(BaseType.INT);
        maximumNumberOfPeaks = new Parameter(this, "maximumNumberOfPeaks");
        maximumNumberOfPeaks.setExpression("MaxInt");
        maximumNumberOfPeaks.setTypeEquals(BaseType.INT);
View Full Code Here

        while (ports.hasNext()) {
            IOPort port = (IOPort) ports.next();

            // Do not
            if (port instanceof ParameterPort) {
                PortParameter parameter = ((ParameterPort) port).getParameter();

                if (_debugging) {
                    _debug("** Updating PortParameter: " + port.getName());
                }

                parameter.update();
                continue;
            }

            if ((port.getWidth() > 0) && port.hasToken(0)) {
                Token token = port.get(0);
View Full Code Here

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

        degrees = new PortParameter(this, "degrees");
        degrees.setTypeEquals(BaseType.DOUBLE);
        degrees.setExpression("0.0");

        input.setTypeEquals(BaseType.OBJECT);

View Full Code Here

        while (ports.hasNext()) {
            IOPort port = (IOPort) ports.next();

            if (port instanceof ParameterPort) {
                PortParameter parameter = ((ParameterPort) port).getParameter();

                if (_debugging) {
                    _debug("** Updating PortParameter: " + port.getName());
                }

                parameter.update();
                changeMade = true;
                continue;
            }

            if ((port.getWidth() > 0) && port.hasToken(0)) {
View Full Code Here

     */
    public ApplyFunction(Workspace workspace) throws IllegalActionException,
            NameDuplicationException {
        super(workspace);
        output = new TypedIOPort(this, "output", false, true);
        function = new PortParameter(this, "function");
    }
View Full Code Here

     */
    public ApplyFunction(CompositeEntity container, String name)
            throws IllegalActionException, NameDuplicationException {
        super(container, name);
        output = new TypedIOPort(this, "output", false, true);
        function = new PortParameter(this, "function");
    }
View Full Code Here

            Case container = (Case) getContainer();
            // Read from port parameters, including the control port.
            Iterator portParameters = container.attributeList(
                    PortParameter.class).iterator();
            while (portParameters.hasNext()) {
                PortParameter portParameter = (PortParameter) portParameters
                        .next();
                portParameter.update();
            }

            String controlValue = container.control.getToken().toString();
            ComponentEntity refinement = container.getEntity(controlValue);
            if (!(refinement instanceof Refinement)) {
View Full Code Here

TOP

Related Classes of ptolemy.actor.parameters.PortParameter

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.