Package org.jnode.driver.system.acpi.aml

Examples of org.jnode.driver.system.acpi.aml.ParseNode


    }

    public void parse(NameSpace origin, ParseNode root) {
        if (root == null)
            return;
        ParseNode op = root.geChild();

        while (op != null) {
            switch (op.getType()) {
                case Aml.AML_SCOPE:
                    Scope scope = new Scope(origin, op.getNameToString());
                    parse(scope, op);
                    break;
                case Aml.AML_DEVICE:
                    Device device = new Device(origin, op.getNameToString());
                    Object address = op.findNameValue("_HID");
                    if (address instanceof String)
                        device.addAddress("_HID", (String) address);
                    else if (address instanceof Integer)
                        device.addAddress("_HID", PnP.eisaIdToString(((Integer) address).intValue()));
                    parse(device, op);
                    break;
            }
            op = op.getNext();
        }
    }
View Full Code Here


            root.dump(out);
        }
    }

    public void dumpBattery(PrintWriter out) {
        ParseNode battery;
        battery = sdt.getParsedAml().findName(new NameString("BAT0"),
            Aml.AML_DEVICE);
        if (battery != null) {
            out.println(battery.toString());
        }
        battery = sdt.getParsedAml().findName(new NameString("BAT1"),
            Aml.AML_DEVICE);
        if (battery != null) {
            out.println(battery.toString());
        }
    }
View Full Code Here

TOP

Related Classes of org.jnode.driver.system.acpi.aml.ParseNode

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.