Package net.percederberg.mibble.snmp

Examples of net.percederberg.mibble.snmp.SnmpCompliance


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

        SnmpCompliance  comp;
        MibValue        value;
        String          desc;

        value = (MibValue) getValue(getChildAt(node, 1), 0);
        desc = getStringValue(getChildAt(node, 2), 0);
        comp = new SnmpCompliance(true, value, null, null, null, desc);
        comp.setComment(MibAnalyzerUtil.getComments(node));
        node.addValue(comp);
        return node;
    }
View Full Code Here


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

        SnmpCompliance  comp;
        MibValue        value = null;
        MibType         syntax = null;
        MibType         write = null;
        SnmpAccess      access = null;
        String          desc = null;
        Node            child;

        for (int i = 0; i < node.getChildCount(); i++) {
            child = node.getChildAt(i);
            switch (child.getId()) {
            case Asn1Constants.VALUE:
                value = (MibValue) getValue(child, 0);
                break;
            case Asn1Constants.SNMP_SYNTAX_PART:
                syntax = (MibType) getValue(child, 0);
                syntax.setComment(MibAnalyzerUtil.getComments(child));
                break;
            case Asn1Constants.SNMP_WRITE_SYNTAX_PART:
                write = (MibType) getValue(child, 0);
                write.setComment(MibAnalyzerUtil.getComments(child));
                break;
            case Asn1Constants.SNMP_ACCESS_PART:
                access = (SnmpAccess) getValue(child, 0);
                break;
            case Asn1Constants.SNMP_DESCR_PART:
                desc = getStringValue(child, 0);
                break;
            }
        }
        comp = new SnmpCompliance(false, value, syntax, write, access, desc);
        comp.setComment(MibAnalyzerUtil.getComments(node));
        node.addValue(comp);
        return node;
    }
View Full Code Here

TOP

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

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.