Пример #1
0
        public static GeneratorSystemWarning ToGeneratorSystemWarning(ushort[] regData)
        {
            GeneratorSystemWarning warning = new GeneratorSystemWarning();

            byte[] bytes = GetBytes(regData);
            for (int i = 0; i < bytes.Length; i++)
            {
                SystemWarning index = (SystemWarning)i;
                warning[index] = (WarningErrorKey)bytes[i];
            }
            return(warning);
        }
Пример #2
0
        public WarningErrorKey this[SystemWarning warning] {
            set {
                switch (warning)
                {
                case SystemWarning.W01: this.DI_WQ_SENSOR_FAIL_WARN = value; break;

                case SystemWarning.W02: this.DI_WQ_WARN = value; break;

                case SystemWarning.W03: this.WATER_QUAL_WARN = value; break;

                case SystemWarning.W04: this.A200_LOW_FLOW_WARNING = value; break;

                case SystemWarning.W05: this.BAD_GURAD_WARN = value; break;

                case SystemWarning.W06: this.COOL_TEMP_LOW_WARN = value; break;

                case SystemWarning.W07: this.COOL_TEMP_HIGH_WARN = value; break;

                case SystemWarning.W08: this.SYSTEM_TEMP_WARN = value; break;

                case SystemWarning.W09: this.CG220_LEVEL_HIGH = value; break;

                case SystemWarning.W10: this.CG120_LEVEL_HIGH = value; break;

                case SystemWarning.W11: this.CAL_GAS_PRESSURE_LOW = value; break;

                case SystemWarning.W12: this.PRODUCT_PRESS_HIGH_WARN = value; break;

                case SystemWarning.W13: this.HEAT_SINK_TEMP_HIGH = value; break;

                case SystemWarning.W14: this.COOL_FLOW_LOW_WARN = value; break;

                case SystemWarning.W15: this.CG120_LOW = value; break;

                case SystemWarning.W16: this.STACK_WATER_FLOW_WARN = value; break;

                case SystemWarning.W17: this.SYSTEM_PRESSURE_LOW = value; break;

                case SystemWarning.W18: this.CABINET_TEMP_HIGH = value; break;

                case SystemWarning.W19: this.PURGE_PRESSURE_WARN = value; break;

                case SystemWarning.W20: this.CG_CAL_CANCEL_WARN = value; break;

                case SystemWarning.W21: this.CG_CAL_DUE_WARN = value; break;

                case SystemWarning.W22: this.CG_LEVEL_LOW = value; break;
                }
            }
            get {
                switch (warning)
                {
                case SystemWarning.W01: return(this.DI_WQ_SENSOR_FAIL_WARN);

                case SystemWarning.W02: return(this.DI_WQ_WARN);

                case SystemWarning.W03: return(this.WATER_QUAL_WARN);

                case SystemWarning.W04: return(this.A200_LOW_FLOW_WARNING);

                case SystemWarning.W05: return(this.BAD_GURAD_WARN);

                case SystemWarning.W06: return(this.COOL_TEMP_LOW_WARN);

                case SystemWarning.W07: return(this.COOL_TEMP_HIGH_WARN);

                case SystemWarning.W08: return(this.SYSTEM_TEMP_WARN);

                case SystemWarning.W09: return(this.CG220_LEVEL_HIGH);

                case SystemWarning.W10: return(this.CG120_LEVEL_HIGH);

                case SystemWarning.W11: return(this.CAL_GAS_PRESSURE_LOW);

                case SystemWarning.W12: return(this.PRODUCT_PRESS_HIGH_WARN);

                case SystemWarning.W13: return(this.HEAT_SINK_TEMP_HIGH);

                case SystemWarning.W14: return(this.COOL_FLOW_LOW_WARN);

                case SystemWarning.W15: return(this.CG120_LOW);

                case SystemWarning.W16: return(this.STACK_WATER_FLOW_WARN);

                case SystemWarning.W17: return(this.SYSTEM_PRESSURE_LOW);

                case SystemWarning.W18: return(this.CABINET_TEMP_HIGH);

                case SystemWarning.W19: return(this.PURGE_PRESSURE_WARN);

                case SystemWarning.W20: return(this.CG_CAL_CANCEL_WARN);

                case SystemWarning.W21: return(this.CG_CAL_DUE_WARN);

                case SystemWarning.W22: return(this.CG_LEVEL_LOW);

                default:
                    return(0);
                }
            }
        }
Пример #3
0
 public void WarningAsync(SystemWarning warning)
 {
     _hub.Clients.All.SendAsync("Warning", warning);
 }
Пример #4
0
 public async Task Warning(SystemWarning warning)
 {
     await Clients.All.SendAsync("Warning", warning);
 }