Package net.percederberg.mibble.snmp

Examples of net.percederberg.mibble.snmp.SnmpModule


     */
    private void printType(SnmpModuleCompliance type,
                           String indent,
                           int smiVersion) {

        SnmpModule  module;
        ArrayList   list;

        os.println("MODULE-COMPLIANCE");
        os.print("    STATUS          ");
        os.println(type.getStatus());
        printDescription(type.getDescription());
        if (type.getReference() != null) {
            os.println();
            os.print("    REFERENCE       ");
            os.print(getQuote(type.getReference()));
        }
        for (int i = 0; i < type.getModules().size(); i++) {
            module = (SnmpModule) type.getModules().get(i);
            os.println();
            printComment(module.getComment(), "    ", true);
            os.print("    MODULE          ");
            if (module.getModule() == null) {
                os.print("-- this module");
            } else {
                os.print(module.getModule());
            }
            if (module.getGroups().size() > 0) {
                os.println();
                os.print("    MANDATORY-GROUPS ");
                printReferenceList(module.getGroups(),
                                   "                    ");
            }
            list = module.getCompliances();
            for (int j = 0; j < list.size(); j++) {
                os.println();
                os.println();
                printModuleCompliance((SnmpCompliance) list.get(j),
                                      smiVersion);
View Full Code Here


     * @throws ParseException if the node analysis discovered errors
     */
    protected Node exitSnmpModulePart(Production node)
        throws ParseException {

        SnmpModule module;
        String     name = null;
        ArrayList  groups = new ArrayList();
        ArrayList  modules = new ArrayList();
        String     comment = null;
        Node       child;

        for (int i = 0; i < node.getChildCount(); i++) {
            child = node.getChildAt(i);
            switch (child.getId()) {
            case Asn1Constants.MODULE:
                comment = MibAnalyzerUtil.getComments(child);
                break;
            case Asn1Constants.SNMP_MODULE_IMPORT:
                name = getStringValue(child, 0);
                popContext();
                break;
            case Asn1Constants.SNMP_MANDATORY_PART:
                groups = (ArrayList) getValue(child, 0);
                break;
            case Asn1Constants.SNMP_COMPLIANCE_PART:
                modules.add(getValue(child, 0));
                break;
            }
        }
        module = new SnmpModule(name, groups, modules);
        module.setComment(comment);
        node.addValue(module);
        return node;
    }
View Full Code Here

TOP

Related Classes of net.percederberg.mibble.snmp.SnmpModule

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.