Examples of AlarmT


Examples of v1.tmf854.fault.AlarmT

    private List<AlarmT> alarms = new Vector<AlarmT>();

    public void addAlarm(int alarmID) {

        AlarmT alarm = new AlarmT();

        EventInformationT eventInfo = new EventInformationT();
        ProbableCauseT probableCause = new ProbableCauseT();
        SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss.SSSZ");

        switch (alarmID % 2) {
        case 1:
            eventInfo.setNotificationId("0001239");
            eventInfo.setObjectType(ObjectTypeT.OT_EQUIPMENT);
            eventInfo.setObjectName(new NamingAttributesT());
            eventInfo.setOsTime(formatter.format(new Date()));
            eventInfo.setNeTime(formatter.format(new Date()));
            eventInfo.setEdgePointRelated(Boolean.FALSE);
            probableCause.setType("PROP_odd_probable_cause_type");
            alarm.setEventInfo(eventInfo);
            alarm.setIsClearable(false);
            alarm.setLayerRate("PROP_layer_rate_odd");
            alarm.setProbableCause(probableCause);
            alarm.setPerceivedSeverity("PROP_odd_perceived_severity");
            alarm.setServiceAffecting(ServiceAffectingT.SA_UNKNOWN);
            alarm.setRcaiIndicator(false);
            break;

        default:
            eventInfo.setNotificationId("9876543");
            eventInfo.setObjectType(ObjectTypeT.OT_OS);
            eventInfo.setObjectName(new NamingAttributesT());
            eventInfo.setOsTime(formatter.format(new Date()));
            eventInfo.setEdgePointRelated(Boolean.FALSE);
            probableCause.setType("PROP_even_probable_cause_type");
            alarm.setEventInfo(eventInfo);
            alarm.setIsClearable(true);
            alarm.setLayerRate("PROP_layer_rate_even");
            alarm.setProbableCause(probableCause);
            alarm.setPerceivedSeverity("PROP_even_perceived_severity");
            alarm.setServiceAffecting(ServiceAffectingT.SA_SERVICE_AFFECTING);
            alarm.setRcaiIndicator(false);
            break;

        }

        alarms.add(alarm);
View Full Code Here

Examples of v1.tmf854.fault.AlarmT

        GetActiveAlarmsResponseT.ActiveAlarmList alarmList = new GetActiveAlarmsResponseT.ActiveAlarmList();
       
        Long requestedCount = mtosiHeader.value.getRequestedBatchSize();
        if (requestedCount != null) {
            for (int i = 0; i < requestedCount && alarms.size() > 0; i++) {
                AlarmT alarm = alarms.remove(0);
                alarmList.getActiveAlarm().add(alarm);
            }
            // Indicate to the caller if there are more alarms remaining.
            if (alarms.size() > 0) {
                mtosiHeader.value.setBatchSequenceEndOfReply(Boolean.FALSE);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.