Пример #1
0
        public static float fMaxPowerD(DevModelConfig devcfg, string sType, int selNo = 0)
        {
            System.Collections.Generic.List <stru_CommRange> powerDissThresholds = devcfg.devThresholds.powerDissThresholds;
            if (powerDissThresholds != null)
            {
                foreach (stru_CommRange current in powerDissThresholds)
                {
                    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.ToSingle(devcfgUtil.Rang_max(current.range)));
                        }
                    }
                }
            }
            DevCommonThreshold commonThresholds = devcfg.devThresholds.commonThresholds;

            return(CultureTransfer.ToSingle(devcfgUtil.Rang_max(commonThresholds.powerDissipation)));
        }
Пример #2
0
        public static float fMaxPress(DevModelConfig devcfg)
        {
            DevCommonThreshold commonThresholds = devcfg.devThresholds.commonThresholds;

            return(CultureTransfer.ToSingle(devcfgUtil.Rang_max(commonThresholds.pressure)));
        }
Пример #3
0
        public static float fMinTemperature(DevModelConfig devcfg)
        {
            DevCommonThreshold commonThresholds = devcfg.devThresholds.commonThresholds;

            return(CultureTransfer.ToSingle(devcfgUtil.Rang_min(commonThresholds.temperature)));
        }