Package ptolemy.data.expr

Examples of ptolemy.data.expr.StringParameter


        dip.setExpression("0.0");
        dip.setTypeEquals(BaseType.DOUBLE);
        squelch = new Parameter(this, "squelch");
        squelch.setExpression("-10.0");
        squelch.setTypeEquals(BaseType.DOUBLE);
        scale = new StringParameter(this, "scale");
        scale.setExpression("absolute");
        scale.addChoice("absolute");
        scale.addChoice("relative linear");
        scale.addChoice("relative amplitude decibels");
        scale.addChoice("relative power decibels");
View Full Code Here


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

        // parameters
        function = new StringParameter(this, "function");
        function.setExpression("sin");
        function.addChoice("acos");
        function.addChoice("asin");
        function.addChoice("atan");
        function.addChoice("cos");
View Full Code Here

        level = new Parameter(this, "level", new DoubleToken(0.0));
        level.setTypeEquals(BaseType.DOUBLE);

        // By default, this director detects both directions of leve crossings.
        direction = new StringParameter(this, "direction");
        direction.setExpression("both");
        _detectRisingCrossing = true;
        _detectFallingCrossing = true;

        direction.addChoice("both");
View Full Code Here

        // FIXME: Need a way to specify a filter for the file browser.
        modelFileOrURL = new FilePortParameter(this, "modelFileOrURL");

        // Create the executionOnFiring parameter.
        executionOnFiring = new StringParameter(this, "executionOnFiring");
        executionOnFiring.setExpression("run in calling thread");
        executionOnFiring.addChoice("run in calling thread");
        executionOnFiring.addChoice("run in a new thread");
        executionOnFiring.addChoice("do nothing");

        // Create the lingerTime parameter.
        lingerTime = new Parameter(this, "lingerTime");
        lingerTime.setTypeEquals(BaseType.LONG);
        lingerTime.setExpression("0L");

        // Create the postfireAction parameter.
        postfireAction = new StringParameter(this, "postfireAction");
        postfireAction.setExpression("do nothing");
        postfireAction.addChoice("do nothing");
        postfireAction.addChoice("stop executing");
    }
View Full Code Here

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

        algorithm = new StringParameter(this, "algorithm");

        Set algorithms = Security.getAlgorithms("KeyGenerator");
        Iterator algorithmsIterator = algorithms.iterator();

        for (int i = 0; algorithmsIterator.hasNext(); i++) {
            String algorithmName = (String) algorithmsIterator.next();

            algorithm.addChoice(algorithmName);
        }

        algorithm.setExpression("DES");

        output.setTypeEquals(KeyToken.KEY);

        provider = new StringParameter(this, "provider");
        provider.setExpression("SystemDefault");
        provider.addChoice("SystemDefault");

        Provider[] providers = Security.getProviders();

View Full Code Here

        // isn't really what we want.  What we want is an undeclared type
        // that can resolve to anything.
        // trigger.setTypeEquals(BaseType.GENERAL);
        trigger.setMultiport(true);

        signatureAlgorithm = new StringParameter(this, "signatureAlgorithm");
        signatureAlgorithm
                .setExpression("Unknown, will be set after first run");
        signatureAlgorithm.setVisibility(Settable.NOT_EDITABLE);
        signatureAlgorithm.setPersistent(false);
View Full Code Here

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

        // Parameters
        function = new StringParameter(this, "function");
        function.setExpression("exp");
        function.addChoice("exp");
        function.addChoice("log");
        function.addChoice("sign");
        function.addChoice("square");
View Full Code Here

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

        alias = new StringParameter(this, "alias");
        alias.setExpression("claudius");

        createFileOrURLIfNecessary = new Parameter(this,
                "createFileOrURLIfNecessary");
        createFileOrURLIfNecessary.setExpression("true");
        createFileOrURLIfNecessary.setTypeEquals(BaseType.BOOLEAN);

        fileOrURL = new FileParameter(this, "fileOrURL");

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

View Full Code Here

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

        // Add the possible algorithm choices.
        algorithm = new StringParameter(this, "algorithm");

        Set algorithms = Security.getAlgorithms("Cipher");
        Iterator algorithmsIterator = algorithms.iterator();

        for (int i = 0; algorithmsIterator.hasNext(); i++) {
            String algorithmName = (String) algorithmsIterator.next();

            if (i == 0) {
                algorithm.setExpression(algorithmName);
            }

            algorithm.addChoice(algorithmName);
        }

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

        Provider[] providers = Security.getProviders();
View Full Code Here

        input.setTypeEquals(new ArrayType(BaseType.UNSIGNED_BYTE));

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

        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());
        }

        signatureAlgorithm = new StringParameter(this, "signatureAlgorithm");

        Iterator signatureAlgorithms = Security.getAlgorithms("Signature")
                .iterator();

        for (int i = 0; signatureAlgorithms.hasNext(); i++) {
View Full Code Here

TOP

Related Classes of ptolemy.data.expr.StringParameter

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.