public static double ampMax(DevModelConfig devcfg, string sType) { System.Collections.Generic.List <stru_CommRange> ampcapicity = devcfg.ampcapicity; foreach (stru_CommRange current in ampcapicity) { if (string.Compare(current.type, sType, true) == 0) { return(CultureTransfer.ToDouble(devcfgUtil.Rang_max(current.range))); } } return(0.0); }
public static double ampMax(DevModelConfig devcfg, string sType, int selNo) { System.Collections.Generic.List <stru_CommRange> ampcapicity = devcfg.ampcapicity; foreach (stru_CommRange current in ampcapicity) { if (string.Compare(current.type, sType, true) == 0) { int num = System.Convert.ToInt32(devcfgUtil.Rang_min(current.id)); int num2 = System.Convert.ToInt32(devcfgUtil.Rang_max(current.id)); if (num <= selNo && selNo <= num2) { return(CultureTransfer.ToDouble(devcfgUtil.Rang_max(current.range))); } } } return(0.0); }
public static double getPUE(int index) { double result = 0.0; switch (index) { case 0: result = CultureTransfer.ToDouble(ClientAPI.getPueValue("CurrentIT")); break; case 1: result = CultureTransfer.ToDouble(ClientAPI.getPueValue("CurrentTotal")); break; case 2: result = CultureTransfer.ToDouble(ClientAPI.getPueValue("HourIT")); break; case 3: result = CultureTransfer.ToDouble(ClientAPI.getPueValue("HourTotal")); break; case 4: result = CultureTransfer.ToDouble(ClientAPI.getPueValue("DayIT")); break; case 5: result = CultureTransfer.ToDouble(ClientAPI.getPueValue("DayTotal")); break; case 6: result = CultureTransfer.ToDouble(ClientAPI.getPueValue("WeekIT")); break; case 7: result = CultureTransfer.ToDouble(ClientAPI.getPueValue("WeekTotal")); break; } return(result); }