コード例 #1
0
        /// <summary>
        /// Checks the state of charge.
        /// </summary>
        /// <param name="soc">The soc.</param>
        /// <returns></returns>
        static bool CheckStateOfCharge(float soc, string Language)
        {
            BatteryMeasureFactors measures = new BatteryMeasureFactors("State of Charge", soc, 20, 80, Language);

            BatteryMeasure.CheckLowBreach(measures);
            BatteryMeasure.CheckHighBreach(measures);
            if (soc < 20 || soc > 80)
            {
                BatteryMeasure.EvaluateBatteryMeasure(measures);
                return(false);
            }
            return(true);
        }
コード例 #2
0
        /// <summary>
        /// Checks the charge rate.
        /// </summary>
        /// <param name="chargeRate">The charge rate.</param>
        /// <returns></returns>
        static bool CheckChargeRate(float chargeRate, string Language)
        {
            BatteryMeasureFactors measures = new BatteryMeasureFactors("Charge Rate", chargeRate, 0.8f, 0.0f, Language);

            BatteryMeasure.CheckLowBreach(measures);
            BatteryMeasure.CheckHighBreach(measures);
            if (chargeRate > 0.8)
            {
                BatteryMeasure.EvaluateBatteryMeasure(measures);
                return(false);
            }
            return(true);
        }
コード例 #3
0
        /// <summary>
        /// Checks the temperature.
        /// </summary>
        /// <param name="temperature">The temperature.</param>
        /// <returns></returns>
        static bool CheckTemperature(float temperature, string Language)
        {
            BatteryMeasureFactors measures = new BatteryMeasureFactors("Temperature", temperature, 45, 0, Language);

            BatteryMeasure.CheckLowBreach(measures);
            BatteryMeasure.CheckHighBreach(measures);
            if (temperature < 0 || temperature > 45)
            {
                BatteryMeasure.EvaluateBatteryMeasure(measures);
                return(false);
            }
            return(true);
        }