public static List <LiveAlarm> ReadLiveAlarms(ushort handle) { List <LiveAlarm> alarms = new List <LiveAlarm>(); FocasLibBase.ODBALMMSG obj = new FocasLibBase.ODBALMMSG(); short num = 10; short ret = FocasLib.cnc_rdalmmsg(handle, -1, ref num, obj); if (ret == 0) { if (obj.msg1.alm_no > 0) { alarms.Add(AssignLiveAlarm(obj.msg1)); } if (obj.msg2.alm_no > 0) { alarms.Add(AssignLiveAlarm(obj.msg2)); } if (obj.msg3.alm_no > 0) { alarms.Add(AssignLiveAlarm(obj.msg3)); } if (obj.msg4.alm_no > 0) { alarms.Add(AssignLiveAlarm(obj.msg4)); } if (obj.msg5.alm_no > 0) { alarms.Add(AssignLiveAlarm(obj.msg5)); } if (obj.msg6.alm_no > 0) { alarms.Add(AssignLiveAlarm(obj.msg6)); } if (obj.msg7.alm_no > 0) { alarms.Add(AssignLiveAlarm(obj.msg7)); } if (obj.msg8.alm_no > 0) { alarms.Add(AssignLiveAlarm(obj.msg8)); } if (obj.msg9.alm_no > 0) { alarms.Add(AssignLiveAlarm(obj.msg9)); } if (obj.msg10.alm_no > 0) { alarms.Add(AssignLiveAlarm(obj.msg10)); } } return(alarms); }