/**
  * Convert MIB to events.
  *
  * @param module the module object
  * @param ueibase the UEI base
  * @return the events
  */
 protected Events convertMibToEvents(SmiModule module, String ueibase) {
   Events events = new Events();
   for (SmiNotificationType trap : module.getNotificationTypes()) {
     events.addEvent(getTrapEvent(trap, ueibase));
   }
   for (SmiTrapType trap : module.getTrapTypes()) {
     events.addEvent(getTrapEvent(trap, ueibase));
   }
   return events;
 }
Example #2
0
  public Events convertMibToEvents(Mib mib, String ueibase) {
    Events events = new Events();
    for (MibSymbol sym : getAllSymbolsFromMib(mib)) {
      if (!(sym instanceof MibValueSymbol)) {
        continue;
      }

      MibValueSymbol vsym = (MibValueSymbol) sym;
      if ((!(vsym.getType() instanceof SnmpNotificationType))
          && (!(vsym.getType() instanceof SnmpTrapType))) {
        continue;
      }

      events.addEvent(getTrapEvent(vsym, ueibase));
    }
    return events;
  }