Package ptolemy.codegen.c.domains.fsm.kernel.FSMActor

Examples of ptolemy.codegen.c.domains.fsm.kernel.FSMActor.TransitionRetriever


        // generate code for non-preemptive transition
        code.append(_codeGenerator.comment(1, "MultirateFSMDirector: "
                + "Nonpreemptive Transition."));
        controllerHelper.generateTransitionCode(code,
                new TransitionRetriever() {
                    public Iterator retrieveTransitions(State state) {
                        return state.nonpreemptiveTransitionList().iterator();
                    }
                });
        return code.toString();
View Full Code Here


        code.append(containerHelper.processCode("if ($actorSymbol(fired)) {"
                + _eol));
        // generate code for non-preemptive transition
        code.append(_eol + "/* Nonpreemptive Transition */" + _eol + _eol);
        controllerHelper.generateTransitionCode(code,
                new TransitionRetriever() {
                    public Iterator retrieveTransitions(State state) {
                        return state.nonpreemptiveTransitionList().iterator();
                    }
                });
        // reset the variable
View Full Code Here

        StringBuffer code = new StringBuffer();

        // generate code for preemptive transition
        code.append(_eol + "/* Preemptive Transition */" + _eol + _eol);
        controllerHelper.generateTransitionCode(code,
                new TransitionRetriever() {
                    public Iterator retrieveTransitions(State state) {
                        return state.preemptiveTransitionList().iterator();
                    }
                });

        code.append(_eol);

        // check to see if a preemptive transition is taken
        code.append("if ("
                + controllerHelper.processCode("$actorSymbol(transitionFlag)")
                + " == 0) {" + _eol);

        // generate code for refinements
        _generateRefinementCode(code);

        // generate code for non-preemptive transition
        code.append(_eol + "/* Nonpreemptive Transition */" + _eol + _eol);
        controllerHelper.generateTransitionCode(code,
                new TransitionRetriever() {
                    public Iterator retrieveTransitions(State state) {
                        return state.nonpreemptiveTransitionList().iterator();
                    }
                });

View Full Code Here

TOP

Related Classes of ptolemy.codegen.c.domains.fsm.kernel.FSMActor.TransitionRetriever

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.