Examples of CTEmbeddedDirector


Examples of ptolemy.domains.ct.kernel.CTEmbeddedDirector

        //ctIncS.input.link(ctIncR1);
        ctIncGFi.link(ctIncR1);
        ctIncSt.link(ctIncR1);

        CTEmbeddedDirector ctIncDir = new CTEmbeddedDirector(ctInc, "CTIncDir");

        //ctIncDir.addDebugListener(dbl);
        CTCompositeActor ctDec = new CTCompositeActor(hs, "Decreasing");

        //ctDec.addDebugListener(dbl);
        //ZeroOrderHold ctDecH = new ZeroOrderHold(ctDec, "Hold");
        Integrator ctDecI = new Integrator(ctDec, "Integrator");
        Scale ctGain = new Scale(ctDec, "Gain");
        ZeroCrossingDetector ctDecD = new ZeroCrossingDetector(ctDec, "ZD");

        Expression ctDecGF = new Expression(ctDec, "EXPRESSION");
        TypedIOPort ctDecGFi = (TypedIOPort) ctDecGF.newPort("in");
        ctDecGFi.setInput(true);
        ctDecGFi.setTypeEquals(BaseType.DOUBLE);
        ctDecGF.output.setTypeEquals(BaseType.DOUBLE);
        ctDecGF.expression.setExpression("in + 0.0");

        // the ports
        TypedIOPort ctDecIn = (TypedIOPort) ctDec.newPort("input");
        ctDecIn.setInput(true);
        ctDecIn.setTypeEquals(BaseType.DOUBLE);

        TypedIOPort ctDecOut = (TypedIOPort) ctDec.newPort("output");
        ctDecOut.setOutput(true);
        ctDecOut.setTypeEquals(BaseType.DOUBLE);

        TypedIOPort ctDecSt = (TypedIOPort) ctDec.newPort("state");
        ctDecSt.setOutput(true);
        ctDecSt.setTypeEquals(BaseType.DOUBLE);

        TypedIOPort ctDecTr = (TypedIOPort) ctDec.newPort("trig");
        ctDecTr.setOutput(true);
        ctDecTr.setTypeEquals(BaseType.DOUBLE);

        // connect ctDec
        //ctDec.connect(ctDecIn, ctDecH.input);
        //ctDec.connect(ctDecH.output, ctGain.input);
        ctDec.connect(ctDecIn, ctGain.input);
        ctDec.connect(ctGain.output, ctDecI.input);

        Relation ctDecR2 = ctDec.newRelation("R2");
        ctDecGF.output.link(ctDecR2);
        ctDecD.trigger.link(ctDecR2);
        ctDecTr.link(ctDecR2);
        ctDec.connect(ctDecD.output, ctDecOut);

        //ctDec.connect(ctDecS.output, ctDecSt);
        TypedIORelation ctDecR1 = (TypedIORelation) ctDec
                .newRelation("CTDecR1");
        ctDecI.output.link(ctDecR1);

        //ctDecS.input.link(ctDecR1);
        ctDecGFi.link(ctDecR1);
        ctDecSt.link(ctDecR1);

        CTEmbeddedDirector ctDecDir = new CTEmbeddedDirector(ctDec, "CTDecDir");

        //ctDecDir.addDebugListener(dbl);
        ctrlInc.refinementName.setExpression("Increasing");
        ctrlDec.refinementName.setExpression("Decreasing");
View Full Code Here

Examples of ptolemy.domains.ct.kernel.CTEmbeddedDirector

    ///////////////////////////////////////////////////////////////////
    ////                         private methods                   ////
    CTCompositeActor _createLinearizer(TypedCompositeActor container, int code)
            throws NameDuplicationException, IllegalActionException {
        CTCompositeActor sub = new CTCompositeActor(container, "dummy");
        CTEmbeddedDirector subdir = new CTEmbeddedDirector(sub,
                "CTInnerDirector");

        TypedIOPort subinPx = new TypedIOPort(sub, "inputPx");
        subinPx.setInput(true);
        subinPx.setOutput(false);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.