Package ptolemy.actor.parameters

Examples of ptolemy.actor.parameters.PortParameter


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


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

        // Create the control port.
        control = new PortParameter(this, "control");
        // FIXME: This is awkward... If I provide some
        // non-boolean control input, I get obscure type
        // conflict error messages and have to change this
        // to match.
        control.setExpression("true");
View Full Code Here

        input_tokenConsumptionRate.setExpression("arrayLength");

        output.setMultiport(true);

        // Set parameters.
        arrayLength = new PortParameter(this, "arrayLength");
        arrayLength.setExpression("1");

        // Set the output type to be an ArrayType with element types
        // at least as general as the input type.
        output.setTypeAtLeast(ActorTypeUtil.arrayOf(input, arrayLength));
View Full Code Here

        input.setTypeEquals(BaseType.STRING);

        output = new TypedIOPort(this, "output", false, true);
        output.setTypeEquals(BaseType.STRING);

        prompt = new PortParameter(this, "prompt", new StringToken(">>"));

        // Make command be a StringParameter (no surrounding double quotes).
        prompt.setTypeEquals(BaseType.STRING);
        prompt.setStringMode(true);
View Full Code Here

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

        output.setTypeEquals(BaseType.INT);

        N = new PortParameter(this, "N", new IntToken(2));
        N.setTypeEquals(BaseType.INT);
        new SingletonParameter(N.getPort(), "_showName")
                .setToken(BooleanToken.TRUE);

        s = new PortParameter(this, "s", new IntToken(1));
        s.setTypeEquals(BaseType.INT);
        new SingletonParameter(s.getPort(), "_showName")
                .setToken(BooleanToken.TRUE);

        n = new PortParameter(this, "n", new IntToken(1));
        n.setTypeEquals(BaseType.INT);
        new SingletonParameter(n.getPort(), "_showName")
                .setToken(BooleanToken.TRUE);

        n.moveToFirst();
View Full Code Here

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

        output.setTypeEquals(BaseType.DOUBLE);

        p = new PortParameter(this, "p", new DoubleToken(0.5));
        p.setTypeEquals(BaseType.DOUBLE);
        new SingletonParameter(p.getPort(), "_showName")
                .setToken(BooleanToken.TRUE);

        p.moveToFirst();
View Full Code Here

        // To create the initial default KeyStore, do
        // cd $PTII; make ptKeystore
        // or set createFileOrURLIfNecessary to true.
        fileOrURL.setExpression("$PTII/ptKeystore");

        keyPassword = new PortParameter(this, "keyPassword");
        keyPassword.setTypeEquals(BaseType.STRING);
        keyPassword.setStringMode(true);
        keyPassword.setExpression("this.is.the.keyPassword,change.it");

        // Add the possible keystore types.
        keyStoreType = new StringParameter(this, "keyStoreType");
        keyStoreType.setExpression(KeyStore.getDefaultType());

        Iterator keyStoreTypes = Security.getAlgorithms("KeyStore").iterator();

        while (keyStoreTypes.hasNext()) {
            String keyStoreName = (String) keyStoreTypes.next();
            keyStoreType.addChoice(keyStoreName);
        }

        // Add the possible provider choices.
        provider = new StringParameter(this, "provider");
        provider.setExpression("SystemDefault");
        provider.addChoice("SystemDefault");

        Provider[] providers = Security.getProviders();

        for (int i = 0; i < providers.length; i++) {
            provider.addChoice(providers[i].getName());
        }

        storePassword = new PortParameter(this, "storePassword");
        storePassword.setTypeEquals(BaseType.STRING);
        storePassword.setStringMode(true);
        storePassword.setExpression("this.is.the.storePassword,change.it");
        _storePassword = storePassword.getExpression();
    }
View Full Code Here

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

        output.setTypeEquals(BaseType.INT);

        mean = new PortParameter(this, "mean", new DoubleToken(1.0));
        mean.setTypeEquals(BaseType.DOUBLE);
        new SingletonParameter(mean.getPort(), "_showName")
                .setToken(BooleanToken.TRUE);

        mean.moveToFirst();
View Full Code Here

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

        output.setTypeEquals(BaseType.DOUBLE);

        lambda = new PortParameter(this, "lambda", new DoubleToken(1.0));
        lambda.setTypeEquals(BaseType.DOUBLE);
        new SingletonParameter(lambda.getPort(), "_showName")
                .setToken(BooleanToken.TRUE);

        lambda.moveToFirst();
View Full Code Here

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

        output.setTypeEquals(BaseType.INT);

        n = new PortParameter(this, "n", new IntToken(1));
        n.setTypeEquals(BaseType.INT);
        new SingletonParameter(n.getPort(), "_showName")
                .setToken(BooleanToken.TRUE);

        p = new PortParameter(this, "p", new DoubleToken(0.5));
        p.setTypeEquals(BaseType.DOUBLE);
        new SingletonParameter(p.getPort(), "_showName")
                .setToken(BooleanToken.TRUE);

        p.moveToFirst();
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.