eDosStationFull/eDosStation_Backup_2025.02.19_01.14.34/Decoder.cs
2026-08-18 12:15:26 +02:00

58 lines
2.3 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
namespace eDosStation
{
static class Decoder
{
static StackPanel sp;
private static void tb_Add( string s)
{
TextBlock x = new TextBlock();
x.Text = s;
sp.Children.Add(x);
}
public static void AlarmToTextBox(StackPanel s,EpdBaseClr.Epd2 ep)
{
sp = s;
if (ep.DetectorsOn > 0) tb_Add("DetectorsOn");
if (ep.EPDIssued ) tb_Add("EPD Issued");
//if (ep.EPDLocked > 0) tb_Add("EPD Locked");
if (ep.EPDTesting > 0) tb_Add("EPD Detector test active");
if (ep.EPDProcSec > 0) tb_Add("EPD Processing every second");
if (ep.EPDFaulty > 0) tb_Add("EPD Faulty");
if (ep.EPDNewFault > 0) tb_Add("EPD New Fault in History");
if (ep.EPDComFault > 0) tb_Add("EPD Communication fault");
if (ep.EPDCalFault > 0) tb_Add("EPD Calibration factors faulty");
if (ep.EPDDetFault > 0) tb_Add("EPD Detector faulty");
if (ep.EPDEprFault > 0) tb_Add("EPD Eprom faulty");
if (ep.EPDTrhFault > 0) tb_Add("EPD Tresholds faulty");
if (ep.EPDOthFault > 0) tb_Add("EPD Other Fault");
if (ep.AlarmDoseHP101G > 0) tb_Add("Alarm Dose HP10l");
if (ep.AlarmDoseHP102G > 0) tb_Add("Alarm Dose HP10h");
if (ep.AlarmDoseHP07N > 0) tb_Add("Alarm Dose HP07");
if (ep.AlarmRateHP101G > 0) tb_Add("Alarm RateHP10 ");
if (ep.AlarmRateHP102G > 0) tb_Add("Alarm RateHP10 ");
if (ep.AlarmRateHP07N > 0) tb_Add("Alarm Rate HP07");
if (ep.OtherAlarmRateHp101G > 0) tb_Add("Alarm Rate Hp10 /G");
if (ep.OtherAlarmRateHp102G > 0) tb_Add("Alarm Rate Hp10 /G");
if (ep.OtherAlarmRateHp07N > 0) tb_Add("Alarm Rate Hp07 /HPN");
if (ep.OtherAlarmReturn > 0) tb_Add("Please Return");
if (ep.OtherAlarmBatLow > 0) tb_Add("Battery Low");
if (ep.OtherAlarmCarrier > 0) tb_Add("Carrier present");
if (ep.OtherAlarmBatVolt > 0) tb_Add("Battery Volt");
}
}
}