// Path: src/main/java/com/yiji/falcon/agent/util/StringUtils.java
// public class StringUtils {
// 
//     /**
//      * 判断传入的String是否为空('' or null)
//      * @param str
//      * @return
//      */
//     public static boolean isEmpty(String str){
//         return str == null || str.length() == 0;
//     }
// 
//     /**
//      * 返回指定数字的字符串形式
//      * @param value
//      * @return
//      */
//     public static String getStringByInt(int value){
//         return String.valueOf(value).intern();
//     }
// 
// }


import com.yiji.falcon.agent.util.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.snmp4j.PDU;
import org.snmp4j.ScopedPDU;
import org.snmp4j.Snmp;
import org.snmp4j.Target;
import org.snmp4j.event.ResponseEvent;
import org.snmp4j.smi.Integer32;
import org.snmp4j.smi.Null;
import org.snmp4j.smi.OID;
import org.snmp4j.smi.VariableBinding;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

        return pduList;
    }

    private static boolean checkWalkFinished(OID targetOID, PDU pdu, VariableBinding vb) {
        boolean finished = false;
        if (pdu.getErrorStatus() != 0) {
            finished = true;
        } else if (vb.getOid() == null) {
            finished = true;
        } else if (vb.getOid().size() < targetOID.size()) {
            finished = true;
        } else if (targetOID.leftMostCompare(targetOID.size(), vb.getOid()) != 0) {
            finished = true;
        } else if (Null.isExceptionSyntax(vb.getVariable().getSyntax())) {
            finished = true;
        } else if (vb.getOid().compareTo(targetOID) <= 0) {
            finished = true;
        }
        return finished;

    }

    /**
     * 根据系统信息获取供应商
     *
     * @param sysDesc
     * @return
     */
    public static VendorType getVendorBySysDesc(String sysDesc) {
// Path: src/main/java/com/yiji/falcon/agent/util/StringUtils.java
// public class StringUtils {
// 
//     /**
//      * 判断传入的String是否为空('' or null)
//      * @param str
//      * @return
//      */
//     public static boolean isEmpty(String str){
//         return str == null || str.length() == 0;
//     }
// 
//     /**
//      * 返回指定数字的字符串形式
//      * @param value
//      * @return
//      */
//     public static String getStringByInt(int value){
//         return String.valueOf(value).intern();
//     }
// 
// }


// Path: src/main/java/com/yiji/falcon/agent/plugins/util/SNMPHelper.java
import com.yiji.falcon.agent.util.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.snmp4j.PDU;
import org.snmp4j.ScopedPDU;
import org.snmp4j.Snmp;
import org.snmp4j.Target;
import org.snmp4j.event.ResponseEvent;
import org.snmp4j.smi.Integer32;
import org.snmp4j.smi.Null;
import org.snmp4j.smi.OID;
import org.snmp4j.smi.VariableBinding;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;


        return pduList;
    }

    private static boolean checkWalkFinished(OID targetOID, PDU pdu, VariableBinding vb) {
        boolean finished = false;
        if (pdu.getErrorStatus() != 0) {
            finished = true;
        } else if (vb.getOid() == null) {
            finished = true;
        } else if (vb.getOid().size() < targetOID.size()) {
            finished = true;
        } else if (targetOID.leftMostCompare(targetOID.size(), vb.getOid()) != 0) {
            finished = true;
        } else if (Null.isExceptionSyntax(vb.getVariable().getSyntax())) {
            finished = true;
        } else if (vb.getOid().compareTo(targetOID) <= 0) {
            finished = true;
        }
        return finished;

    }

    /**
     * 根据系统信息获取供应商
     *
     * @param sysDesc
     * @return
     */
    public static VendorType getVendorBySysDesc(String sysDesc) {
        if(StringUtils.isEmpty(sysDesc)){