Package ptolemy.actor

Examples of ptolemy.actor.TypedIOPort


        // Skip the function port.
        ports.next();

        while (ports.hasNext()) {
            TypedIOPort port = (TypedIOPort) ports.next();
            Type portType = type.getArgType(i);

            if (portType instanceof ArrayType) {
                port.setTypeEquals(((ArrayType) portType).getElementType());
                _rate[i] = DFUtilities.getTokenConsumptionRate(port);
            } else {
                port.setTypeEquals(portType);
                _rate[i] = -1;
            }

            i++;
        }
View Full Code Here


        // 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);

        // Create an input port for packets.
        packetIn = new TypedIOPort(this, "packetIn", true, false);
        packetOut.setTypeEquals(BaseType.STRING);
    }
View Full Code Here

        super(container, name);

        interpolation.setVisibility(Settable.NONE);
        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");
View Full Code Here

    /** Syntactic sugar for initializing parameters.
     */
    private void _setVariables() throws IllegalActionException,
            NameDuplicationException {
        input = new TypedIOPort(this, "input", true, false);
        output = new TypedIOPort(this, "output", false, true);
        input.setTypeEquals(BaseType.GENERAL);
        output.setTypeEquals(BaseType.GENERAL);

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

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

        xTranslate = new TypedIOPort(this, "xTranslate", true, false);
        xTranslate.setTypeEquals(BaseType.DOUBLE);
        yTranslate = new TypedIOPort(this, "yTranslate", true, false);
        yTranslate.setTypeEquals(BaseType.DOUBLE);
        zTranslate = new TypedIOPort(this, "zTranslate", true, false);
        zTranslate.setTypeEquals(BaseType.DOUBLE);

        initialXTranslation = new Parameter(this, "initialXTranslation",
                new DoubleToken(0.0));
        initialYTranslation = new Parameter(this, "initialYTranslation",
View Full Code Here

        super(container, name);

        blockSize = new Parameter(this, "blockSize");
        blockSize.setExpression("1");

        newTaps = new TypedIOPort(this, "newTaps");
        newTaps.setInput(true);

        newTaps.setTypeSameAs(taps);

        // The taps parameter is no longer of any use, so it is hidden.
View Full Code Here

            throws IllegalActionException, NameDuplicationException {
        super(container, name);

        input.setMultiport(true);

        select = new TypedIOPort(this, "select", true, false);
        select.setTypeEquals(BaseType.INT);
    }
View Full Code Here

                        updates.put(ColumnNames.COL_HIDE, Boolean.TRUE);
                    }
                }

                if (actualPort instanceof TypedIOPort) {
                    TypedIOPort tiop = (TypedIOPort) actualPort;

                    if (_columnNames.contains(ColumnNames.COL_TYPE)) {
                        String _type = null;
                        TypeAttribute _typeAttribute = (TypeAttribute) tiop
                                .getAttribute("_type");

                        if (_typeAttribute != null) {
                            _type = _typeAttribute.getExpression();
                        }
View Full Code Here

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

        privateKey = new TypedIOPort(this, "privateKey", true, false);
        privateKey.setTypeEquals(KeyToken.KEY);

        signature = new TypedIOPort(this, "signature", false, true);
        signature.setTypeEquals(new ArrayType(BaseType.UNSIGNED_BYTE));
    }
View Full Code Here

        isPolling = new Parameter(this, "isPolling", new BooleanToken("true"));

        pollingInterval = new Parameter(this, "pollingInterval", new IntToken(
                "50"));

        x = new TypedIOPort(this, "x", false, true);
        x.setTypeEquals(BaseType.DOUBLE);

        y = new TypedIOPort(this, "y", false, true);
        y.setTypeEquals(BaseType.DOUBLE);
    }
View Full Code Here

TOP

Related Classes of ptolemy.actor.TypedIOPort

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.