public class Bti7000SnmpAlarmConsumer
extends org.onosproject.net.driver.AbstractHandlerBehaviour
implements org.onosproject.incubator.net.faultmanagement.alarm.AlarmConsumer
| Modifier and Type | Field and Description |
|---|---|
protected static com.btisystems.pronx.ems.core.model.IClassRegistry |
CLASS_REGISTRY |
| Constructor and Description |
|---|
Bti7000SnmpAlarmConsumer() |
| Modifier and Type | Method and Description |
|---|---|
static GregorianCalendar |
btiMakeCalendar(org.snmp4j.smi.OctetString dateAndTimeValue)
This method is similar to SNMP4J approach with some fixes for the 11-bytes version (ie the one with timezone
offset).
|
List<org.onosproject.incubator.net.faultmanagement.alarm.Alarm> |
consumeAlarms() |
static Date |
getLocalDateAndTime(String actAlarmDateAndTime,
String sysInfoTimeZone,
String swVersion)
Converts an SNMP string representation into a
Date object,
and applies time zone conversion to provide the time on the local machine, ie PSM server. |
handler, setHandlerprotected static final com.btisystems.pronx.ems.core.model.IClassRegistry CLASS_REGISTRY
public static Date getLocalDateAndTime(String actAlarmDateAndTime, String sysInfoTimeZone, String swVersion)
Date object,
and applies time zone conversion to provide the time on the local machine, ie PSM server.actAlarmDateAndTime - MIB-II DateAndTime formatted. May optionally contain
a timezone offset in 3 extra bytessysInfoTimeZone - Must be supplied if actAlarmDateAndTime is just local time (with no timezone)swVersion - Must be supplied if actAlarmDateAndTime is just local time (with no timezone)Date or a simple conversion if other fields are null.public static GregorianCalendar btiMakeCalendar(org.snmp4j.smi.OctetString dateAndTimeValue)
For original makeCalendar refer @see http://www.snmp4j.org/agent/doc/org/snmp4j/agent/mo/snmp/DateAndTime.html
Creates a GregorianCalendar from a properly formatted SNMP4J DateAndTime OctetString.
dateAndTimeValue - an OctetString conforming to the DateAndTime TC.GregorianCalendar instance.public List<org.onosproject.incubator.net.faultmanagement.alarm.Alarm> consumeAlarms()
consumeAlarms in interface org.onosproject.incubator.net.faultmanagement.alarm.AlarmConsumerCopyright © 2016. All rights reserved.