/*
 *  Do not modify this file; it is automatically 
 *  generated and any modifications will be overwritten.
 *
 * @(#) xdc-x20
 */
import java.util.*;
import org.mozilla.javascript.*;
import xdc.services.intern.xsr.*;
import xdc.services.spec.Session;

public class ti_uiactools_sysbios
{
    static final String VERS = "@(#) xdc-x20\n";

    static final Proto.Elm $$T_Bool = Proto.Elm.newBool();
    static final Proto.Elm $$T_Num = Proto.Elm.newNum();
    static final Proto.Elm $$T_Str = Proto.Elm.newStr();
    static final Proto.Elm $$T_Obj = Proto.Elm.newObj();

    static final Proto.Fxn $$T_Met = new Proto.Fxn(null, null, 0, -1, false);
    static final Proto.Map $$T_Map = new Proto.Map($$T_Obj);
    static final Proto.Arr $$T_Vec = new Proto.Arr($$T_Obj);

    static final XScriptO $$DEFAULT = Value.DEFAULT;
    static final Object $$UNDEF = Undefined.instance;

    static final Proto.Obj $$Package = (Proto.Obj)Global.get("$$Package");
    static final Proto.Obj $$Module = (Proto.Obj)Global.get("$$Module");
    static final Proto.Obj $$Instance = (Proto.Obj)Global.get("$$Instance");
    static final Proto.Obj $$Params = (Proto.Obj)Global.get("$$Params");

    static final Object $$objFldGet = Global.get("$$objFldGet");
    static final Object $$objFldSet = Global.get("$$objFldSet");
    static final Object $$proxyGet = Global.get("$$proxyGet");
    static final Object $$proxySet = Global.get("$$proxySet");
    static final Object $$delegGet = Global.get("$$delegGet");
    static final Object $$delegSet = Global.get("$$delegSet");

    Scriptable xdcO;
    Session ses;
    Value.Obj om;

    boolean isROV;
    boolean isCFG;

    Proto.Obj pkgP;
    Value.Obj pkgV;

    ArrayList<Object> imports = new ArrayList<Object>();
    ArrayList<Object> loggables = new ArrayList<Object>();
    ArrayList<Object> mcfgs = new ArrayList<Object>();
    ArrayList<Object> icfgs = new ArrayList<Object>();
    ArrayList<Object> proxies = new ArrayList<Object>();
    ArrayList<Object> sizes = new ArrayList<Object>();
    ArrayList<Object> tdefs = new ArrayList<Object>();

    void $$IMPORTS()
    {
        Global.callFxn("loadPackage", xdcO, "xdc");
        Global.callFxn("loadPackage", xdcO, "xdc.corevers");
        Global.callFxn("loadPackage", xdcO, "xdc.runtime");
    }

    void $$OBJECTS()
    {
        pkgP = (Proto.Obj)om.bind("ti.uiactools.sysbios.Package", new Proto.Obj());
        pkgV = (Value.Obj)om.bind("ti.uiactools.sysbios", new Value.Obj("ti.uiactools.sysbios", pkgP));
    }

    void LoggingSetupSTM$$OBJECTS()
    {
        Proto.Obj po, spo;
        Value.Obj vo;

        po = (Proto.Obj)om.bind("ti.uiactools.sysbios.LoggingSetupSTM.Module", new Proto.Obj());
        vo = (Value.Obj)om.bind("ti.uiactools.sysbios.LoggingSetupSTM", new Value.Obj("ti.uiactools.sysbios.LoggingSetupSTM", po));
        pkgV.bind("LoggingSetupSTM", vo);
        // decls 
        om.bind("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode", new Proto.Enm("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode"));
    }

    void LoggingSetupSTM$$CONSTS()
    {
        // module LoggingSetupSTM
        om.bind("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode_SIMULATOR", xdc.services.intern.xsr.Enum.make((Proto.Enm)om.findStrict("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode", "ti.uiactools.sysbios"), "ti.uiactools.sysbios.LoggingSetupSTM.UploadMode_SIMULATOR", xdc.services.intern.xsr.Enum.intValue(1L)+0));
        om.bind("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode_PROBEPOINT", xdc.services.intern.xsr.Enum.make((Proto.Enm)om.findStrict("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode", "ti.uiactools.sysbios"), "ti.uiactools.sysbios.LoggingSetupSTM.UploadMode_PROBEPOINT", xdc.services.intern.xsr.Enum.intValue(2L)+0));
        om.bind("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode_JTAGSTOPMODE", xdc.services.intern.xsr.Enum.make((Proto.Enm)om.findStrict("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode", "ti.uiactools.sysbios"), "ti.uiactools.sysbios.LoggingSetupSTM.UploadMode_JTAGSTOPMODE", xdc.services.intern.xsr.Enum.intValue(3L)+0));
        om.bind("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode_JTAGRUNMODE", xdc.services.intern.xsr.Enum.make((Proto.Enm)om.findStrict("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode", "ti.uiactools.sysbios"), "ti.uiactools.sysbios.LoggingSetupSTM.UploadMode_JTAGRUNMODE", xdc.services.intern.xsr.Enum.intValue(4L)+0));
        om.bind("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode_NONJTAGTRANSPORT", xdc.services.intern.xsr.Enum.make((Proto.Enm)om.findStrict("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode", "ti.uiactools.sysbios"), "ti.uiactools.sysbios.LoggingSetupSTM.UploadMode_NONJTAGTRANSPORT", xdc.services.intern.xsr.Enum.intValue(5L)+0));
        om.bind("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode_NONJTAG_AND_JTAGSTOPMODE", xdc.services.intern.xsr.Enum.make((Proto.Enm)om.findStrict("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode", "ti.uiactools.sysbios"), "ti.uiactools.sysbios.LoggingSetupSTM.UploadMode_NONJTAG_AND_JTAGSTOPMODE", xdc.services.intern.xsr.Enum.intValue(6L)+0));
        om.bind("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode_STREAMER", xdc.services.intern.xsr.Enum.make((Proto.Enm)om.findStrict("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode", "ti.uiactools.sysbios"), "ti.uiactools.sysbios.LoggingSetupSTM.UploadMode_STREAMER", xdc.services.intern.xsr.Enum.intValue(7L)+0));
        om.bind("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode_IDLE", xdc.services.intern.xsr.Enum.make((Proto.Enm)om.findStrict("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode", "ti.uiactools.sysbios"), "ti.uiactools.sysbios.LoggingSetupSTM.UploadMode_IDLE", xdc.services.intern.xsr.Enum.intValue(8L)+0));
        om.bind("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode_STM", xdc.services.intern.xsr.Enum.make((Proto.Enm)om.findStrict("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode", "ti.uiactools.sysbios"), "ti.uiactools.sysbios.LoggingSetupSTM.UploadMode_STM", xdc.services.intern.xsr.Enum.intValue(9L)+0));
    }

    void LoggingSetupSTM$$CREATES()
    {
        Proto.Fxn fxn;
        StringBuilder sb;

    }

    void LoggingSetupSTM$$FUNCTIONS()
    {
        Proto.Fxn fxn;

        // fxn LoggingSetupSTM.createLogger
        fxn = (Proto.Fxn)om.bind("ti.uiactools.sysbios.LoggingSetupSTM$$createLogger", new Proto.Fxn(om.findStrict("ti.uiactools.sysbios.LoggingSetupSTM.Module", "ti.uiactools.sysbios"), null, 0, -1, false));
    }

    void LoggingSetupSTM$$SIZES()
    {
    }

    void LoggingSetupSTM$$TYPES()
    {
        Scriptable cap;
        Proto.Obj po;
        Proto.Str ps;
        Proto.Typedef pt;
        Object fxn;

        cap = (Scriptable)Global.callFxn("loadCapsule", xdcO, "ti/uiactools/sysbios/LoggingSetupSTM.xs");
        om.bind("ti.uiactools.sysbios.LoggingSetupSTM$$capsule", cap);
        po = (Proto.Obj)om.findStrict("ti.uiactools.sysbios.LoggingSetupSTM.Module", "ti.uiactools.sysbios");
        po.init("ti.uiactools.sysbios.LoggingSetupSTM.Module", $$Module);
                po.addFld("$hostonly", $$T_Num, 1, "r");
        po.addFld("logger", (Proto)om.findStrict("xdc.runtime.ILogger.Handle", "ti.uiactools.sysbios"), null, "wh");
        po.addFld("loadLogging", $$T_Bool, true, "wh");
        po.addFld("loadLoggingRuntimeControl", $$T_Bool, true, "wh");
        po.addFld("mainLogging", $$T_Bool, true, "wh");
        po.addFld("mainLoggingRuntimeControl", $$T_Bool, true, "wh");
        po.addFld("sysbiosHwiLogging", $$T_Bool, false, "wh");
        po.addFld("sysbiosHwiLoggingRuntimeControl", $$T_Bool, false, "wh");
        po.addFld("sysbiosSwiLogging", $$T_Bool, false, "wh");
        po.addFld("sysbiosSwiLoggingRuntimeControl", $$T_Bool, false, "wh");
        po.addFld("sysbiosTaskLogging", $$T_Bool, true, "wh");
        po.addFld("sysbiosTaskLoggingRuntimeControl", $$T_Bool, true, "wh");
        po.addFld("eventUploadMode", (Proto)om.findStrict("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode", "ti.uiactools.sysbios"), om.find("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode_STM"), "wh");
        po.addFld("disableMulticoreEventCorrelation", $$T_Bool, false, "wh");
        fxn = Global.get(cap, "module$use");
        if (fxn != null) om.bind("ti.uiactools.sysbios.LoggingSetupSTM$$module$use", true);
        if (fxn != null) po.addFxn("module$use", $$T_Met, fxn);
        fxn = Global.get(cap, "module$meta$init");
        if (fxn != null) om.bind("ti.uiactools.sysbios.LoggingSetupSTM$$module$meta$init", true);
        if (fxn != null) po.addFxn("module$meta$init", $$T_Met, fxn);
        fxn = Global.get(cap, "module$validate");
        if (fxn != null) om.bind("ti.uiactools.sysbios.LoggingSetupSTM$$module$validate", true);
        if (fxn != null) po.addFxn("module$validate", $$T_Met, fxn);
                po.addFxn("createLogger", (Proto.Fxn)om.findStrict("ti.uiactools.sysbios.LoggingSetupSTM$$createLogger", "ti.uiactools.sysbios"), Global.get(cap, "createLogger"));
    }

    void LoggingSetupSTM$$ROV()
    {
    }

    void $$SINGLETONS()
    {
        pkgP.init("ti.uiactools.sysbios.Package", (Proto.Obj)om.findStrict("xdc.IPackage.Module", "ti.uiactools.sysbios"));
        pkgP.bind("$capsule", $$UNDEF);
        pkgV.init2(pkgP, "ti.uiactools.sysbios", Value.DEFAULT, false);
        pkgV.bind("$name", "ti.uiactools.sysbios");
        pkgV.bind("$category", "Package");
        pkgV.bind("$$qn", "ti.uiactools.sysbios.");
        pkgV.bind("$vers", Global.newArray("1, 0, 0, 0"));
        Value.Map atmap = (Value.Map)pkgV.getv("$attr");
        atmap.seal("length");
        imports.clear();
        pkgV.bind("$imports", imports);
        StringBuilder sb = new StringBuilder();
        sb.append("var pkg = xdc.om['ti.uiactools.sysbios'];\n");
        sb.append("if (pkg.$vers.length >= 3) {\n");
            sb.append("pkg.$vers.push(Packages.xdc.services.global.Vers.getDate(xdc.csd() + '/..'));\n");
        sb.append("}\n");
        sb.append("pkg.build.libraries = [\n");
            sb.append("'lib/release/ti.uiactools.sysbios.a64T',\n");
            sb.append("'lib/release/ti.uiactools.sysbios.a64P',\n");
            sb.append("'lib/release/ti.uiactools.sysbios.a674',\n");
            sb.append("'lib/release/ti.uiactools.sysbios.ae66',\n");
            sb.append("'lib/release/ti.uiactools.sysbios.ae66e',\n");
            sb.append("'lib/release/ti.uiactools.sysbios.aem3',\n");
        sb.append("];\n");
        sb.append("pkg.build.libDesc = [\n");
            sb.append("['lib/release/ti.uiactools.sysbios.a64T', {target: 'ti.targets.C64T', suffix: '64T'}],\n");
            sb.append("['lib/release/ti.uiactools.sysbios.a64P', {target: 'ti.targets.C64P', suffix: '64P'}],\n");
            sb.append("['lib/release/ti.uiactools.sysbios.a674', {target: 'ti.targets.C674', suffix: '674'}],\n");
            sb.append("['lib/release/ti.uiactools.sysbios.ae66', {target: 'ti.targets.elf.C66', suffix: 'e66'}],\n");
            sb.append("['lib/release/ti.uiactools.sysbios.ae66e', {target: 'ti.targets.elf.C66_big_endian', suffix: 'e66e'}],\n");
            sb.append("['lib/release/ti.uiactools.sysbios.aem3', {target: 'ti.targets.arm.elf.M3', suffix: 'em3'}],\n");
        sb.append("];\n");
        Global.eval(sb.toString());
    }

    void LoggingSetupSTM$$SINGLETONS()
    {
        Proto.Obj po;
        Value.Obj vo;

        vo = (Value.Obj)om.findStrict("ti.uiactools.sysbios.LoggingSetupSTM", "ti.uiactools.sysbios");
        po = (Proto.Obj)om.findStrict("ti.uiactools.sysbios.LoggingSetupSTM.Module", "ti.uiactools.sysbios");
        vo.init2(po, "ti.uiactools.sysbios.LoggingSetupSTM", $$DEFAULT, false);
        vo.bind("Module", po);
        vo.bind("$category", "Module");
        vo.bind("$capsule", om.findStrict("ti.uiactools.sysbios.LoggingSetupSTM$$capsule", "ti.uiactools.sysbios"));
        vo.bind("$package", om.findStrict("ti.uiactools.sysbios", "ti.uiactools.sysbios"));
        tdefs.clear();
        proxies.clear();
        mcfgs.clear();
        icfgs.clear();
        vo.bind("UploadMode", om.findStrict("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode", "ti.uiactools.sysbios"));
        vo.bind("UploadMode_SIMULATOR", om.findStrict("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode_SIMULATOR", "ti.uiactools.sysbios"));
        vo.bind("UploadMode_PROBEPOINT", om.findStrict("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode_PROBEPOINT", "ti.uiactools.sysbios"));
        vo.bind("UploadMode_JTAGSTOPMODE", om.findStrict("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode_JTAGSTOPMODE", "ti.uiactools.sysbios"));
        vo.bind("UploadMode_JTAGRUNMODE", om.findStrict("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode_JTAGRUNMODE", "ti.uiactools.sysbios"));
        vo.bind("UploadMode_NONJTAGTRANSPORT", om.findStrict("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode_NONJTAGTRANSPORT", "ti.uiactools.sysbios"));
        vo.bind("UploadMode_NONJTAG_AND_JTAGSTOPMODE", om.findStrict("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode_NONJTAG_AND_JTAGSTOPMODE", "ti.uiactools.sysbios"));
        vo.bind("UploadMode_STREAMER", om.findStrict("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode_STREAMER", "ti.uiactools.sysbios"));
        vo.bind("UploadMode_IDLE", om.findStrict("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode_IDLE", "ti.uiactools.sysbios"));
        vo.bind("UploadMode_STM", om.findStrict("ti.uiactools.sysbios.LoggingSetupSTM.UploadMode_STM", "ti.uiactools.sysbios"));
        vo.bind("$$tdefs", Global.newArray(tdefs.toArray()));
        vo.bind("$$proxies", Global.newArray(proxies.toArray()));
        vo.bind("$$mcfgs", Global.newArray(mcfgs.toArray()));
        vo.bind("$$icfgs", Global.newArray(icfgs.toArray()));
        ((Value.Arr)pkgV.getv("$modules")).add(vo);
        ((Value.Arr)om.findStrict("$modules", "ti.uiactools.sysbios")).add(vo);
        vo.bind("$$instflag", 0);
        vo.bind("$$iobjflag", 1);
        vo.bind("$$sizeflag", 1);
        vo.bind("$$dlgflag", 0);
        vo.bind("$$iflag", 0);
        vo.bind("$$romcfgs", "|");
        vo.bind("$$nortsflag", 0);
        Proto.Str ps = (Proto.Str)vo.find("Module_State");
        if (ps != null) vo.bind("$object", ps.newInstance());
        vo.bind("$$meta_iobj", om.has("ti.uiactools.sysbios.LoggingSetupSTM$$instance$static$init", null) ? 1 : 0);
        vo.bind("$$fxntab", Global.newArray());
        vo.bind("$$logEvtCfgs", Global.newArray());
        vo.bind("$$errorDescCfgs", Global.newArray());
        vo.bind("$$assertDescCfgs", Global.newArray());
        Value.Map atmap = (Value.Map)vo.getv("$attr");
        atmap.seal("length");
        pkgV.bind("LoggingSetupSTM", vo);
        ((Value.Arr)pkgV.getv("$unitNames")).add("LoggingSetupSTM");
    }

    void $$INITIALIZATION()
    {
        Value.Obj vo;

        if (isCFG) {
        }//isCFG
        Global.callFxn("module$meta$init", (Scriptable)om.findStrict("ti.uiactools.sysbios.LoggingSetupSTM", "ti.uiactools.sysbios"));
        Global.callFxn("init", pkgV);
        ((Value.Obj)om.getv("ti.uiactools.sysbios.LoggingSetupSTM")).bless();
        ((Value.Arr)om.findStrict("$packages", "ti.uiactools.sysbios")).add(pkgV);
    }

    public void exec( Scriptable xdcO, Session ses )
    {
        this.xdcO = xdcO;
        this.ses = ses;
        om = (Value.Obj)xdcO.get("om", null);

        Object o = om.geto("$name");
        String s = o instanceof String ? (String)o : null;
        isCFG = s != null && s.equals("cfg");
        isROV = s != null && s.equals("rov");

        $$IMPORTS();
        $$OBJECTS();
        LoggingSetupSTM$$OBJECTS();
        LoggingSetupSTM$$CONSTS();
        LoggingSetupSTM$$CREATES();
        LoggingSetupSTM$$FUNCTIONS();
        LoggingSetupSTM$$SIZES();
        LoggingSetupSTM$$TYPES();
        if (isROV) {
            LoggingSetupSTM$$ROV();
        }//isROV
        $$SINGLETONS();
        LoggingSetupSTM$$SINGLETONS();
        $$INITIALIZATION();
    }
}
