Package ptolemy.actor.parameters

Examples of ptolemy.actor.parameters.PortParameter


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

        // Uncomment the next line to see debugging statements
        //addDebugListener(new ptolemy.kernel.util.StreamListener());
        command = new PortParameter(this, "command", new StringToken(
                "echo \"Hello, world.\""));

        // Make command be a StringParameter (no surrounding double quotes).
        command.setStringMode(true);
        new Parameter(command.getPort(), "_showName", BooleanToken.TRUE);
View Full Code Here


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

        period = new PortParameter(this, "period");
        period.setExpression("2.0");
        period.setTypeEquals(BaseType.DOUBLE);

        offsets = new Parameter(this, "offsets");
        offsets.setExpression("{0.0, 1.0}");
View Full Code Here

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

        searchFor = new PortParameter(this, "searchFor");
        searchFor.setStringMode(true);
        searchFor.setExpression("");
        (new SingletonParameter(searchFor.getPort(), "_showName"))
                .setToken(BooleanToken.TRUE);

        inText = new PortParameter(this, "inText");
        inText.setStringMode(true);
        inText.setExpression("");
        (new SingletonParameter(inText.getPort(), "_showName"))
                .setToken(BooleanToken.TRUE);

        ignoreCase = new Parameter(this, "ignoreCase");
        ignoreCase.setTypeEquals(BaseType.BOOLEAN);
        ignoreCase.setToken(new BooleanToken(false));

        startIndex = new PortParameter(this, "startIndex");
        startIndex.setTypeEquals(BaseType.INT);
        startIndex.setExpression("0");
        (new SingletonParameter(startIndex.getPort(), "_showName"))
                .setToken(BooleanToken.TRUE);

View Full Code Here

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

        // Create new parameters and ports.
        // Set default values of the parameters and type constraints.
        start = new PortParameter(this, "start");
        start.setExpression("0");
        start.setTypeEquals(BaseType.INT);
        (new SingletonParameter(start.getPort(), "_showName"))
                .setToken(BooleanToken.TRUE);

        stop = new PortParameter(this, "stop");
        stop.setExpression("0");
        stop.setTypeEquals(BaseType.INT);
        (new SingletonParameter(start.getPort(), "_showName"))
                .setToken(BooleanToken.TRUE);
View Full Code Here

        // set type constraints.
        output.setTypeAtLeast(ArrayType.elementType(input));

        // Set parameters.
        xOffset = new PortParameter(this, "xOffset");
        xOffset.setTypeEquals(BaseType.INT);
        xOffset.setExpression("1");

        yOffset = new PortParameter(this, "yOffset");
        yOffset.setTypeEquals(BaseType.INT);
        yOffset.setExpression("1");

        x = new PortParameter(this, "x");
        x.setTypeEquals(BaseType.INT);
        x.setExpression("0");

        y = new PortParameter(this, "y");
        y.setTypeEquals(BaseType.INT);
        y.setExpression("0");
    }
View Full Code Here

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

        index = new PortParameter(this, "index");
        index.setTypeEquals(BaseType.INT);
        index.setExpression("0");

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

     *   actor with this name.
     */
    public Sleep(CompositeEntity container, String name)
            throws NameDuplicationException, IllegalActionException {
        super(container, name);
        sleepTime = new PortParameter(this, "sleepTime");
        sleepTime.setExpression("0L");
        sleepTime.setTypeEquals(BaseType.LONG);

        Port sleepPort = sleepTime.getPort();
        StringAttribute sleepCardinal = new StringAttribute(sleepPort,
View Full Code Here

        scale.addChoice("absolute");
        scale.addChoice("relative linear");
        scale.addChoice("relative amplitude decibels");
        scale.addChoice("relative power decibels");

        startIndex = new PortParameter(this, "startIndex");
        startIndex.setExpression("0");
        startIndex.setTypeEquals(BaseType.INT);

        endIndex = new PortParameter(this, "endIndex");
        endIndex.setExpression("MaxInt");
        endIndex.setTypeEquals(BaseType.INT);

        maximumNumberOfPeaks = new Parameter(this, "maximumNumberOfPeaks");
        maximumNumberOfPeaks.setExpression("MaxInt");
View Full Code Here

        ignoreCase = new Parameter(this, "ignoreCase");
        ignoreCase.setTypeEquals(BaseType.BOOLEAN);
        ignoreCase.setToken(new BooleanToken(false));

        // Ports
        firstString = new PortParameter(this, "firstString");
        firstString.setExpression("");
        firstString.setStringMode(true);

        secondString = new PortParameter(this, "secondString");
        secondString.setExpression("");
        secondString.setStringMode(true);

        output = new TypedIOPort(this, "output");
        output.setOutput(true);
View Full Code Here

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

        // Create one matchString portParameter, one matchString port,
        // and one output port.
        pattern = new PortParameter(this, "pattern");
        pattern.setStringMode(true);
        pattern.setExpression("");
        (new SingletonParameter(pattern.getPort(), "_showName"))
                .setToken(BooleanToken.TRUE);

        matchString = new PortParameter(this, "matchString");
        matchString.setStringMode(true);
        matchString.setExpression("");
        (new SingletonParameter(matchString.getPort(), "_showName"))
                .setToken(BooleanToken.TRUE);
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.