Package ptolemy.actor

Examples of ptolemy.actor.Director


         *   or null if it is not a specific receiver.
         *  @see #threadBlocked(Thread)
         */
        public synchronized void threadBlocked(Thread thread,
                ProcessReceiver receiver) {
            Director director = getExecutiveDirector();

            if (director instanceof PNDirector) {
                ((PNDirector) director).threadBlocked(thread, receiver);
            } else {
                throw new InternalErrorException(
View Full Code Here


         *   to indicate whether the thread is blocked on read or write.
         *  @see #threadBlocked(Thread)
         */
        public synchronized void threadBlocked(Thread thread,
                ProcessReceiver receiver, boolean readOrWrite) {
            Director director = getExecutiveDirector();

            if (director instanceof PNDirector) {
                ((PNDirector) director).threadBlocked(thread, receiver,
                        readOrWrite);
            } else {
View Full Code Here

        /** Override the base class to delegate to the executive director.
         *  This director does not keep track of threads.
         *  @param thread The thread.
         */
        public synchronized void threadHasPaused(Thread thread) {
            Director director = getExecutiveDirector();

            if (director instanceof PNDirector) {
                ((PNDirector) director).threadHasPaused(thread);
            } else {
                throw new InternalErrorException(
View Full Code Here

        /** Override the base class to delegate to the executive director.
         *  This director does not keep track of threads.
         *  @param thread The thread.
         */
        public synchronized void threadHasResumed(Thread thread) {
            Director director = getExecutiveDirector();

            if (director instanceof PNDirector) {
                ((PNDirector) director).threadHasResumed(thread);
            } else {
                throw new InternalErrorException(
View Full Code Here

         *   or null if it is not a specific receiver.
         *  @see #threadBlocked(Thread)
         */
        public synchronized void threadUnblocked(Thread thread,
                ProcessReceiver receiver) {
            Director director = getExecutiveDirector();

            if (director instanceof PNDirector) {
                ((PNDirector) director).threadUnblocked(thread, receiver);
            } else {
                throw new InternalErrorException(
View Full Code Here

         *   to indicate whether the thread is blocked on read or write.
         *  @see #threadBlocked(Thread)
         */
        public synchronized void threadUnblocked(Thread thread,
                ProcessReceiver receiver, boolean readOrWrite) {
            Director director = getExecutiveDirector();

            if (director instanceof PNDirector) {
                ((PNDirector) director).threadUnblocked(thread, receiver,
                        readOrWrite);
            } else {
View Full Code Here

            // Get the containing modal model.
            CompositeActor modalModel = (CompositeActor) container
                    .getContainer();
            if (modalModel != null) {
                // Get the director for the modal model.
                Director director = modalModel.getDirector();
                if (director instanceof FSMDirector) {
                    return (FSMDirector) director;
                }
            }
        }
View Full Code Here

                    // Force evaluation so that listeners are notified.
                    ((Variable) attribute).getToken();
                }

                Director director = model.getDirector();

                if (director != null) {
                    attribute = director.getAttribute(name);

                    if (attribute instanceof Variable) {
                        match = true;
                        ((Variable) attribute).setExpression(value);
View Full Code Here

    public void fire() throws IllegalActionException {
        super.fire();

        double firingPeriodValue = ((DoubleToken) firingPeriod.getToken())
                .doubleValue();
        Director director = getDirector();
        director.fireAt(this, director.getModelTime().add(firingPeriodValue));

        if (output.getWidth() > 0) {
            output.send(0, new IntToken(_count++));
        } else {
            ChangeRequest request = new ChangeRequest(this,
View Full Code Here

     @exception IllegalActionException If a derived class throws it.
     */
    public void initialize() throws IllegalActionException {
        super.initialize();

        Director director = getDirector();
        director.fireAtCurrentTime(this);

        _count = 1;
    }
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.