Example #1
0
        protected override void HandleAlarms(BStruBase bData, SqlAlarmMap[] alarmMaps)
        {
            TDSC data = bData as TDSC;

            if (data == null && Tag == null)
            {
                return;
            }

            SqlAlarmRes valueAlarm = StruAlarm(data, alarmMaps.FirstOrDefault(a => a.alarmTypeCode == 0));

            valueAlarm.alarmType = 5;
            AlarmRess.Add(valueAlarm);
        }
Example #2
0
        protected override void HandleAlarms(BStruBase bData, SqlAlarmMap[] alarmMaps)
        {
            TDIC data = bData as TDIC;

            if (data == null && Tag == null || data.AlarmLevel == EnumAlarmLevel.NOALARM)
            {
                return;
            }

            if (data.AlarmThresbhold == EnumEnable.ENABLE)
            {
                SqlAlarmRes valueAlarm = StruAlarm(data, alarmMaps.FirstOrDefault(a => a.alarmTypeCode == 0));
                valueAlarm.alarmType = 5;
                AlarmRess.Add(valueAlarm);
            }
        }
Example #3
0
        protected override void HandleAlarms(BStruBase bData, SqlAlarmMap[] alarmMaps)
        {
            TAIC data = bData as TAIC;

            if (data == null && Tag == null || data.AlarmLevel == EnumAlarmLevel.NOALARM)
            {
                return;
            }

            if (!string.IsNullOrEmpty(data.LoLimit1) || !string.IsNullOrEmpty(data.HiLimit1))
            {
                SqlAlarmRes alarm = StruAlarm(data, alarmMaps.FirstOrDefault(a => a.alarmTypeCode == 1));
                alarm.lowLimit   = data.LoLimit1;
                alarm.upperLimit = data.HiLimit1;
                AlarmRess.Add(alarm);
            }
            if (!string.IsNullOrEmpty(data.LoLimit2) || !string.IsNullOrEmpty(data.HiLimit2))
            {
                SqlAlarmRes alarm = StruAlarm(data, alarmMaps.FirstOrDefault(a => a.alarmTypeCode == 2));
                alarm.lowLimit   = data.LoLimit2;
                alarm.upperLimit = data.HiLimit2;
                AlarmRess.Add(alarm);
            }
            if (!string.IsNullOrEmpty(data.LoLimit3) || !string.IsNullOrEmpty(data.HiLimit3))
            {
                SqlAlarmRes alarm = StruAlarm(data, alarmMaps.FirstOrDefault(a => a.alarmTypeCode == 3));
                alarm.lowLimit   = data.LoLimit3;
                alarm.upperLimit = data.HiLimit3;
                AlarmRess.Add(alarm);
            }

            SqlAlarmRes valueAlarm = StruAlarm(data, alarmMaps.FirstOrDefault(a => a.alarmTypeCode == 0));

            valueAlarm.alarmType = 5;
            AlarmRess.Add(valueAlarm);
        }