Examples of IntToken


Examples of ptolemy.data.IntToken

                    }
                    if ((indata < dipThreshold) && (localMax > squelchValue)) {
                        if (_debugging) {
                            _debug("** Found a peak with value " + localMax+" at index "+localMaxIndex);
                        }
                        resultIndices.add(new IntToken(localMaxIndex));
                        resultPeaks.add(new DoubleToken(localMax));
                        if (resultPeaks.size() > maxPeaks) {
                            break;
                        }
                        localMin = indata;
View Full Code Here

Examples of ptolemy.data.IntToken

        attributeChanged(indexes);
        values = new Parameter(this, "values");
        values.setExpression("{1.0, 0.0}");
        values.setTypeEquals(new ArrayType(BaseType.DOUBLE));
        int defOrder = _interpolation.getOrder();
        IntToken defOrderToken = new IntToken(defOrder);
        order = new Parameter(this, "order", defOrderToken);
        order.setTypeEquals(BaseType.INT);
        int defPeriod = _interpolation.getPeriod();
        IntToken defPeriodToken = new IntToken(defPeriod);
        period = new Parameter(this, "period", defPeriodToken);
        period.setTypeEquals(BaseType.INT);
        output.setTypeEquals(BaseType.DOUBLE);
    }
View Full Code Here

Examples of ptolemy.data.IntToken

                _model = null;
                _manager = null;
                _throwable = null;
            }
        } else if (attribute == maxOutputLength) {
            IntToken length = (IntToken) maxOutputLength.getToken();

            if (length.intValue() > 0) {
                _outputLength = length.intValue();
            } else {
                throw new IllegalActionException(this,
                        "output array length is less than or equal 0?!");
            }
        } else {
View Full Code Here

Examples of ptolemy.data.IntToken

                } catch (NameDuplicationException e) {
                    throw new InternalErrorException(e);
                }
            }

            rate.setToken(new IntToken(1));

            String portName = port.getName();
            Attribute attribute = getAttribute(portName);

            if (attribute == null) {
View Full Code Here

Examples of ptolemy.data.IntToken

        trigger.setMultiport(true);

        // parameters - Ordering here sets the order they show up in Vergil
        localSocketNumber = new Parameter(this, "localSocketNumber");
        localSocketNumber.setTypeEquals(BaseType.INT);
        localSocketNumber.setToken(new IntToken(4004));

        actorBufferLength = new Parameter(this, "actorBufferLength");
        actorBufferLength.setTypeEquals(BaseType.INT);
        actorBufferLength.setToken(new IntToken(440));

        platformBufferLength = new Parameter(this, "platformBufferLength");
        platformBufferLength.setTypeEquals(BaseType.INT);
        platformBufferLength.setToken(new IntToken(64));

        setPlatformBufferLength = new Parameter(this,
                "setPlatformBufferLength", new BooleanToken(false));
        setPlatformBufferLength.setTypeEquals(BaseType.BOOLEAN);
View Full Code Here

Examples of ptolemy.data.IntToken

            _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

Examples of ptolemy.data.IntToken

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

        width = new Parameter(this, "width", new IntToken(3));
        height = new Parameter(this, "height", new IntToken(3));
    }
View Full Code Here

Examples of ptolemy.data.IntToken

     */
    public JAIConstant(CompositeEntity container, String name)
            throws IllegalActionException, NameDuplicationException {
        super(container, name);
        output.setTypeEquals(BaseType.OBJECT);
        width = new Parameter(this, "width", new IntToken(0));
        height = new Parameter(this, "height", new IntToken(0));
        bandValues = new Parameter(this, "bandValues", new ArrayToken(
                BaseType.INT, _defaultValues));
        dataFormat = new StringAttribute(this, "dataFormat");
        dataFormat.setExpression("byte");
        _dataFormat = _BYTE;
View Full Code Here

Examples of ptolemy.data.IntToken

    public void fire() throws IllegalActionException {
        super.fire();
        // Broadcast key presses.
        if (_upKeyPressed) {
            _upKeyPressed = false;
            upArrow.broadcast(new IntToken(1));
        }

        if (_leftKeyPressed) {
            _leftKeyPressed = false;
            leftArrow.broadcast(new IntToken(1));
        }

        if (_rightKeyPressed) {
            _rightKeyPressed = false;
            rightArrow.broadcast(new IntToken(1));
        }

        if (_downKeyPressed) {
            _downKeyPressed = false;
            downArrow.broadcast(new IntToken(1));
        }

        // Broadcast key releases.
        if (_upKeyReleased) {
            _upKeyReleased = false;
            upArrow.broadcast(new IntToken(0));
        }

        if (_leftKeyReleased) {
            _leftKeyReleased = false;
            leftArrow.broadcast(new IntToken(0));
        }

        if (_rightKeyReleased) {
            _rightKeyReleased = false;
            rightArrow.broadcast(new IntToken(0));
        }

        if (_downKeyReleased) {
            _downKeyReleased = false;
            downArrow.broadcast(new IntToken(0));
        }
    }
View Full Code Here

Examples of ptolemy.data.IntToken

        interpolationType = new StringAttribute(this, "interpolationType");
        interpolationType.setExpression("bilinear");
        _interpolationType = _BILINEAR;

        subSampleBits = new Parameter(this, "subSampleBits", new IntToken(8));

        input.setTypeEquals(BaseType.OBJECT);
        output.setTypeEquals(BaseType.OBJECT);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.