Package ptolemy.actor

Examples of ptolemy.actor.Director


         @param actor The actor requesting firing.
         *  @param time The time at which to fire.
         */
        public void fireAtCurrentTime(Actor actor)
                throws IllegalActionException {
            Director director = IterateOverArray.this.getExecutiveDirector();

            if (director != null) {
                director.fireAtCurrentTime(actor);
            }
        }
View Full Code Here


        // 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 {
                setModelTime(time);
            }
        }
    }
View Full Code Here

        // connected to any actors on the inside.
        if (packetIn.getWidth() > 0) {
            if (packetIn.hasToken(0)) {
                StringToken token = (StringToken) packetIn.get(0);

                Director director = getDirector();
                if (director != null) {
                    if (director instanceof PtinyOSDirector) {
                        ((PtinyOSDirector)director).receivePacket(
                                token.stringValue());
View Full Code Here

                port.workspace().getReadAccess();

                Actor actor = (Actor) port.getContainer();

                if (actor != null) {
                    Director director;

                    if ((port.isOutput()) && (actor instanceof CompositeActor)
                            && ((CompositeActor) actor).isOpaque()) {
                        director = actor.getDirector();
                    } else {
View Full Code Here

        double periodValue = ((DoubleToken) period.getToken()).doubleValue();

        if (periodValue > 0.0) {
            Actor container = (Actor) getContainer();
            Director executiveDirector = container.getExecutiveDirector();
            Time currentTime = getModelTime();

            if (executiveDirector != null) {
                // Not at the top level.
                executiveDirector.fireAt(container, currentTime
                        .add(periodValue));
            } else {
                // At the top level.
                setModelTime(currentTime.add(periodValue));
            }
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("ModalDirector: Request refiring by "
                            + executiveDirector.getFullName() + " at "
                            + getModelTime());
                }
                executiveDirector.fireAt(container, getModelTime());
            }
        }

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

                        .isStepSizeAccurate()) {
                    return false;
                }
            } else if (actor instanceof CompositeActor) {
                // Delegate to the director.
                Director director = actor.getDirector();
                if (director instanceof ContinuousStepSizeController) {
                    if (!((ContinuousStepSizeController) director)
                            .isStepSizeAccurate()) {
                        return false;
                    }
View Full Code Here

            _debug("HybridModalDirector: Called prefire().");
        }
        _resetAllReceivers();
        Nameable container = getContainer();
        if (container instanceof Actor) {
            Director executiveDirector = ((Actor) container)
                    .getExecutiveDirector();
            if (executiveDirector != null) {
                Time outTime = executiveDirector.getModelTime();
                setModelTime(outTime);
                if (_debugging) {
                    _debug("HybridModalDirector: Setting local current time to: "
                            + outTime);
                }
View Full Code Here

                if (candidate < result) {
                    result = candidate;
                }
            } else if (actor instanceof CompositeActor) {
                // Delegate to the director.
                Director director = actor.getDirector();
                if (director instanceof ContinuousStepSizeController) {
                    double candidate = ((ContinuousStepSizeController) director)
                            .refinedStepSize();
                    if (candidate < result) {
                        result = candidate;
View Full Code Here

            if (actor instanceof ContinuousStatefulComponent) {
                ((ContinuousStatefulComponent) actor)
                        .rollBackToCommittedState();
            } else if (actor instanceof CompositeActor) {
                // Delegate to the director.
                Director director = actor.getDirector();
                if (director instanceof ContinuousDirector) {
                    ((ContinuousDirector) director).rollBackToCommittedState();
                }
            }
        }
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.