Package ptolemy.data

Examples of ptolemy.data.StringToken


        _argumentsList = new NamedList(this);

        // FIXME: Should libraryDirectory be a FileParameter?
        libraryDirectory = new Parameter(this, "libraryDirectory",
                new StringToken("jni/lib"));
        nativeFunction = new Parameter(this, "nativeFunction", new StringToken(
                "unknownFunction"));
        nativeLibrary = new Parameter(this, "nativeLibrary", new StringToken(
                "unknownLibrary"));

        // Create our own custom editor
        new JNIActorEditorFactory(this, "_editorFactory");
View Full Code Here


                    if (_debugging) {
                        _debug("** Transferring parameter as string to output: "
                                + port.getName());
                    }

                    port.send(0, new StringToken(((Settable) attribute)
                            .getExpression()));
                }
            }
        }
    }
View Full Code Here

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

        // Create port and parameters.
        output = new TypedIOPort(this, "output", false, true);
        new Parameter(output, "signalType", new StringToken("DISCRETE"));

        period = new Parameter(this, "period");
        period.setExpression("2.0");
        period.setTypeEquals(BaseType.DOUBLE);
View Full Code Here

        blockAwaitingDatagram.setTypeEquals(BaseType.BOOLEAN);
        blockAwaitingDatagram.setExpression("true");

        defaultReturnAddress = new Parameter(this, "defaultReturnAddress");
        defaultReturnAddress.setTypeEquals(BaseType.STRING);
        defaultReturnAddress.setToken(new StringToken("localhost"));

        defaultReturnSocketNumber = new Parameter(this,
                "defaultReturnSocketNumber");
        defaultReturnSocketNumber.setTypeEquals(BaseType.INT);
        defaultReturnSocketNumber.setExpression("0");
View Full Code Here

            _syncFireAndThread.notifyAll();
        } // sync

        if (!useDefaultOutput) {
            returnAddress.broadcast(new StringToken(_returnAddress));
            returnSocketNumber.broadcast(new IntToken(_returnSocketNumber));
            output.broadcast(_outputToken);
        } else {
            // No fresh data, so use the default output.
            // (If repeat parameter were implemented,
            //  would test it here and, if true, would
            //  repeat the most recent output instead
            //  of outputting the default, provided
            //  there is a previous output to repeat.)
            // _defaultOutputToken == null when user has entered blank
            // parameter.  Take this as a directive to not broadcast a
            // token in this case.
            if (_defaultOutputToken == null) {
                if (_debugging) {
                    _debug("DO NOT Broadcast ANY output (blank default)");
                }
            } else {
                if (_debugging) {
                    _debug("Broadcast default outputs");
                }

                synchronized (_syncDefaultOutputs) {
                    // Ensure that any change to the default output parameters
                    // occurs atomically with respect to its use here.
                    returnAddress.broadcast(new StringToken(
                            _defaultReturnAddress));
                    returnSocketNumber.broadcast(new IntToken(
                            _defaultReturnSocketNumber));
                    output.broadcast(_defaultOutputToken);
                }
View Full Code Here

        defaultDerivative.setExpression("0.0");

        input.setTypeEquals(BaseType.DOUBLE);
        derivative.setTypeEquals(BaseType.DOUBLE);
        output.setTypeEquals(BaseType.DOUBLE);
        new Parameter(input, "signalType", new StringToken("DISCRETE"));
        new Parameter(derivative, "signalType", new StringToken("DISCRETE"));
        new Parameter(output, "signalType", new StringToken("CONTINUOUS"));
    }
View Full Code Here

        defaultValue.setExpression("0");

        // Override the signal type to be CONTINUOUS to indicate
        // that this actor produce outputs with state semantics.
        ((Parameter) output.getAttribute("signalType"))
                .setToken(new StringToken("CONTINUOUS"));

        // Override of the trigger signal type to CONTINUOUS.
        ((Parameter) trigger.getAttribute("signalType"))
                .setToken(new StringToken("CONTINUOUS"));
    }
View Full Code Here

     */
    public CTTriggeredSampler(CompositeEntity container, String name)
            throws IllegalActionException, NameDuplicationException {
        super(container, name);
        input.setMultiport(true);
        new Parameter(input, "signalType", new StringToken("CONTINUOUS"));
        output.setMultiport(true);
        output.setTypeAtLeast(input);
        new Parameter(output, "signalType", new StringToken("DISCRETE"));
        trigger = new TypedIOPort(this, "trigger", true, false);
        trigger.setMultiport(false);
        new Parameter(trigger, "signalType", new StringToken("DISCRETE"));

        // The trigger input has a generic type.
        _attachText("_iconDescription", "<svg>\n"
                + "<rect x=\"-30\" y=\"-20\" " + "width=\"60\" height=\"40\" "
                + "style=\"fill:white\"/>\n"
View Full Code Here

        // Set the output signal type as DISCRETE to indicate
        // that the outputs of this actor are discrete events.
        // NOTE: ContinuousClock, a subclass of this class overrides
        // the signal type to CONTINUOUS.
        new Parameter(output, "signalType", new StringToken("DISCRETE"));

        // Set the trigger signal type as DISCRETE.
        new Parameter(trigger, "signalType", new StringToken("DISCRETE"));
    }
View Full Code Here

            Clipboard clipboard = Toolkit.getDefaultToolkit()
                    .getSystemClipboard();
            Transferable transferable = clipboard.getContents(this);

            try {
                output.broadcast(new StringToken((String) transferable
                        .getTransferData(DataFlavor.stringFlavor)));

                // NullPointerException also possible //
                // Ignore this for now, allowing exception to go uncaught.
            } catch (IOException ex) {
View Full Code Here

TOP

Related Classes of ptolemy.data.StringToken

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.