Package ptolemy.data.expr

Examples of ptolemy.data.expr.StringParameter


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

        // Create and configure the parameters.
        inputChannelName = new StringParameter(this, "inputChannelName");
        inputChannelName.setExpression("InputChannel");

        outputChannelName = new StringParameter(this, "outputChannelName");
        outputChannelName.setExpression("OutputChannel");

        testChannelName = new StringParameter(this, "testChannelName");
        testChannelName.setExpression("testChannel");

        // Create and configure the ports.
        input = new WirelessIOPort(this, "input", true, false);
        input.outsideChannel.setExpression("$inputChannelName");
View Full Code Here


            errorTolerance.setExpression("1e-4");
            errorTolerance.setTypeEquals(BaseType.DOUBLE);

            iterations.setVisibility(Settable.NONE);

            ODESolver = new StringParameter(this, "ODESolver");
            ODESolver.setExpression("ExplicitRK23Solver");
            ODESolver.addChoice("ExplicitRK23Solver");
            ODESolver.addChoice("ExplicitRK45Solver");
            /* FIXME: These solvers are currently not implemented in this package.
             ODESolver.addChoice(new StringToken("BackwardEulerSolver")
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

            } else {
                tosDir.setExpression("$PTII/vendors/ptinyos/tinyos-1.x/tos");
            }

            // Set additional flags passed to the nesC compiler.
            pflags = new StringParameter(this, "pflags");
            pflags.setExpression("-I%T/lib/Counters");

            // Set number of nodes to be simulated to be equal to 1.
            // NOTE: only the top level value of this parameter matters.
            numberOfNodes = new Parameter(this, "numberOfNodes",
                    new IntToken(1));
            numberOfNodes.setTypeEquals(BaseType.INT);
            numberOfNodes.setVisibility(Settable.NOT_EDITABLE);

            // Set the boot up time range to the defaul to of 10 sec.
            // NOTE: only the top level value of this parameter matters.
            bootTimeRange = new Parameter(this, "bootTimeRange",
                    new IntToken(10));
            bootTimeRange.setTypeEquals(BaseType.INT);

            // Set compile target platform to ptII.
            // NOTE: only the top level value of this parameter matters.
            target = new StringParameter(this, "target");
            target.setExpression("ptII");

            // Set simulate to true.
            // NOTE: only the top level value of this parameter matters.
            simulate = new SharedParameter(this, "simulate", PtinyOSDirector.class, "true");
View Full Code Here

     *   actor with this name.
     */
    public TerrainProperty(CompositeEntity container, String name)
            throws NameDuplicationException, IllegalActionException {
        super(container, name);
        channelName = new StringParameter(this, "channelName");
        channelName.setExpression("TerrainChannel");

        xyPoints = new Parameter(this, "xyPoints");
        xyPoints.setExpression("{{0, 0}, {0, 5}, {20, 5}, {20, 0}}");

View Full Code Here

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

        // Create and configure the parameters.
        inputChannelName = new StringParameter(this, "inputChannelName");
        inputChannelName.setExpression("InputChannel");

        outputChannelName = new StringParameter(this, "outputChannelName");
        outputChannelName.setExpression("OutputChannel");

        // Create and configure the ports.
        input = new WirelessIOPort(this, "input", true, false);
        input.outsideChannel.setExpression("$inputChannelName");
View Full Code Here

        properties = new TypedIOPort(this, "properties", false, true);
        (new SingletonParameter(properties, "_showName"))
                .setToken(BooleanToken.TRUE);

        // Create and configure the parameters.
        inputChannelName = new StringParameter(this, "inputChannelName");
        inputChannelName.setExpression("AtomicWirelessChannel");

        // Create and configure the ports.
        input = new WirelessIOPort(this, "input", true, false);
        input.outsideChannel.setExpression("$inputChannelName");
View Full Code Here

     *  of this port throws it.
     */
    public WirelessIOPort(Workspace workspace) throws IllegalActionException,
            NameDuplicationException {
        super(workspace);
        outsideChannel = new StringParameter(this, "outsideChannel");
        outsideChannel.setExpression("");

        outsideTransmitProperties = new Parameter(this,
                "outsideTransmitProperties");

        insideChannel = new StringParameter(this, "insideChannel");
        insideChannel.setExpression("");

        insideTransmitProperties = new Parameter(this,
                "insideTransmitProperties");
    }
View Full Code Here

    public WirelessIOPort(ComponentEntity container, String name,
            boolean isInput, boolean isOutput) throws IllegalActionException,
            NameDuplicationException {
        super(container, name, isInput, isOutput);

        outsideChannel = new StringParameter(this, "outsideChannel");
        outsideChannel.setExpression("");

        outsideTransmitProperties = new Parameter(this,
                "outsideTransmitProperties");

        insideChannel = new StringParameter(this, "insideChannel");
        insideChannel.setExpression("");

        insideTransmitProperties = new Parameter(this,
                "insideTransmitProperties");
    }
View Full Code Here

        super(container, name);
        text = new PortParameter(this, "text");
        text.setStringMode(true);
        text.setExpression("Ptolemy");

        fontFamily = new StringParameter(this, "fontFamily");
        fontFamily.setExpression("SansSerif");

        // Get font family names from the Font class in Java.
        // This includes logical font names, per Font class in Java:
        // Dialog, DialogInput, Monospaced, Serif, SansSerif, or Symbol.
        String[] families = GraphicsEnvironment.getLocalGraphicsEnvironment()
                .getAvailableFontFamilyNames();

        for (int i = 0; i < families.length; i++) {
            fontFamily.addChoice(families[i]);
        }

        extrusionDepth = new Parameter(this, "extrusionDepth");
        extrusionDepth.setTypeEquals(BaseType.DOUBLE);
        extrusionDepth.setExpression("0.2");

        fontSize = new Parameter(this, "fontSize");
        fontSize.setTypeEquals(BaseType.DOUBLE);
        fontSize.setExpression("1.0");

        alignment = new StringParameter(this, "alignment");
        alignment.setExpression("center");
        alignment.addChoice("center");
        alignment.addChoice("first");
        alignment.addChoice("last");
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.