Package ptolemy.actor

Examples of ptolemy.actor.Director


     *  to the buffer sizes calculated for this system.
     *  @param minimumBufferSizes A map from relation
     *  to the minimum possible buffer size of that relation.
     */
    protected void _saveBufferSizes(final Map minimumBufferSizes) {
        Director director = (Director) getContainer();
        final CompositeActor container = (CompositeActor) director
                .getContainer();

        // FIXME: These buffer sizes should be properties of input ports,
        // not properties of relations.
        ChangeRequest request = new ChangeRequest(this, "Record buffer sizes") {
View Full Code Here


     *   connected on the inside to ports that have different
     *   tokenInitProduction.
     */
    protected void _saveContainerRates(Map externalRates)
            throws NotSchedulableException, IllegalActionException {
        Director director = (Director) getContainer();
        CompositeActor container = (CompositeActor) director.getContainer();
        Iterator ports = container.portList().iterator();

        while (ports.hasNext()) {
            IOPort port = (IOPort) ports.next();

View Full Code Here

    /** Create and set a parameter in each actor according
     *  to the number of times it will fire in one execution of the schedule.
     *  @param entityToFiringsPerIteration A map from actor to firing count.
     */
    protected void _saveFiringCounts(final Map entityToFiringsPerIteration) {
        Director director = (Director) getContainer();
        final CompositeActor container = (CompositeActor) director
                .getContainer();

        ChangeRequest request = new ChangeRequest(this,
                "Record firings per iteration") {
            protected void _execute() throws KernelException {
View Full Code Here

        super.fire();
        if (input.getWidth() == 0) {
            throw new IllegalActionException(this,
                    "Barrier requires at least one input.");
        }
        Director director = getDirector();
        if (!(director instanceof RendezvousDirector)) {
            throw new IllegalActionException(this,
                    "Barrier can only be used with RendezvousDirector.");
        }
        if (_debugging) {
View Full Code Here

     @exception IllegalActionException If the parent class throws it.
     */
    public void attributeTypeChanged(Attribute attribute)
            throws IllegalActionException {
        if (attribute == value) {
            Director director = getDirector();

            if (director != null) {
                director.invalidateResolvedTypes();
            }
        } else {
            super.attributeTypeChanged(attribute);
        }
    }
View Full Code Here

        super.initialize();

        double eventTime = ((DoubleToken) time.getToken()).doubleValue();

        if (eventTime >= 0.0) {
            Director director = getDirector();

            if (director != null) {
                director.fireAt(this, new Time(director, eventTime));
            } else {
                throw new IllegalActionException(this, "No director.");
            }
        }
    }
View Full Code Here

        if (port == null) {
            _director = null;
        } else {
            Actor actor = (Actor) port.getContainer();
            Director director;

            // For a composite actor,
            // the receiver type of an input port is decided by
            // the executive director.
            // While the receiver type of an output is decided by the director.
View Full Code Here

                                    + "This is not legal in SDF.");
                }
            }
        }

        Director director = (Director) getContainer();
        CompositeActor model = (CompositeActor) director.getContainer();

        // Get the rate of this port.
        int currentRate;

        if (currentActor == model) {
View Full Code Here

        // Note that the actor parameter is ignored, because it does not
        // matter which actor requests firing.
        Nameable container = getContainer();
        if (container instanceof Actor) {
            Actor modalModel = (Actor) container;
            Director executiveDirector = modalModel.getExecutiveDirector();
            if (executiveDirector != null) {
                executiveDirector.fireAt(modalModel, time);
            } else {
                // FIXME: This does not look right!
                setModelTime(time);
            }
        }
View Full Code Here

        // If a transition was taken, then request a refiring at the current time
        // in case the destination state is a transient state.
        if (_enabledTransition != null) {
            CompositeActor container = (CompositeActor) getContainer();
            Director executiveDirector = container.getExecutiveDirector();
            if (executiveDirector != null) {
                if (_debugging) {
                    _debug("Request refiring by "
                            + executiveDirector.getFullName() + " at "
                            + getModelTime());
                }
                executiveDirector.fireAt(container, getModelTime());
            }
        }

        return result && !_stopRequested;
    }
View Full Code Here

TOP

Related Classes of ptolemy.actor.Director

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.