예제 #1
0
  /**
   * @param base
   * @return
   */
  public SnmpValue getValue(SnmpObjId base) {
    for (SnmpResult result : getResults()) {
      if (base.equals(result.getBase())) {
        return result.getValue();
      }
    }

    return null;
  }
예제 #2
0
  /**
   * matches
   *
   * @param base a {@link org.opennms.netmgt.snmp.SnmpObjId} object.
   * @param inst a {@link org.opennms.netmgt.snmp.SnmpInstId} object.
   * @return a boolean.
   */
  public boolean matches(SnmpObjId base, SnmpInstId inst) {
    if (!base.equals(getSnmpObjId())) {
      return false;
    }

    if (getInstance().equals(MibObject.INSTANCE_IFINDEX) || m_mibObj.getResourceType() != null) {
      return true;
    } else {
      return getInstance().equals(inst.toString());
    }
  }