Package ptolemy.actor.sched

Examples of ptolemy.actor.sched.Schedule$FiringIterator


            intervalArray[i] = _lcm / frequencyArray[i];
        }

        // Compute schedule
        // based on the frequencyArray and the actorList
        Schedule schedule = new Schedule();

        for (_giottoSchedulerTime = 0; _giottoSchedulerTime < _lcm;) {
            Schedule fireAtSameTimeSchedule = new Schedule();
            actorListIterator = actorList.listIterator();

            for (i = 0; i < actorCount; i++) {
                Actor actor = (Actor) actorListIterator.next();

                if ((_giottoSchedulerTime % intervalArray[i]) == 0) {
                    fireAtSameTimeSchedule.add(new Firing(actor));
                }
            }

            _giottoSchedulerTime += 1;
View Full Code Here


        boolean inline = ((BooleanToken) _codeGenerator.inline.getToken())
                .booleanValue();

        // Generate code for one iteration.
        ptolemy.actor.sched.StaticSchedulingDirector director = (ptolemy.actor.sched.StaticSchedulingDirector) getComponent();
        Schedule schedule = director.getScheduler().getSchedule();

        boolean isIDefined = false;
        Iterator actorsToFire = schedule.firingIterator();
        while (actorsToFire.hasNext()) {
            Firing firing = (Firing) actorsToFire.next();
            Actor actor = firing.getActor();

            // FIXME: Before looking for a helper class, we should check to
View Full Code Here

                    // iteration of the actor. This way we can relay the
                    // information of firings per global iteration to the inside.
                    if (localDirector instanceof ptolemy.domains.hdf.kernel.HDFDirector
                            || localDirector instanceof ptolemy.domains.hdf.kernel.HDFFSMDirector) {
                        int firingsPerLocalIteration = 0;
                        Schedule schedule = _schedules[configurationNumber];
                        if (schedule != null) {
                            Iterator firings = schedule.firingIterator();
                            while (firings.hasNext()) {
                                Firing firing = (Firing) firings.next();
                                if (firing.getActor() == actor) {
                                    firingsPerLocalIteration += firing
                                            .getIterationCount();
View Full Code Here

            }
            actorConfigurations[numberOfActors - 1] = remainder;

            code.append("case " + configurationNumber + ":" + _eol);

            Schedule schedule = _schedules[configurationNumber];

            if (schedule == null) {
                continue;
            }

            Iterator actorsToFire = schedule.firingIterator();
            while (actorsToFire.hasNext()) {
                Firing firing = (Firing) actorsToFire.next();
                Actor actor = firing.getActor();

                // Find the actor number for the given actor.
View Full Code Here

TOP

Related Classes of ptolemy.actor.sched.Schedule$FiringIterator

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.