Exemplo n.º 1
0
        public double GetCurrentMeasureValue(Aquarium aquarium, string field)
        {
            QDecimal measure = QueryLastMeasure(aquarium, field);
            double   mVal    = (measure != null) ? measure.value : double.NaN;

            return(mVal);
        }
Exemplo n.º 2
0
        private double PrepareValue(Aquarium aquarium, IList <MeasureValue> measures, string field, string sign, string uom, ValueRange[] ranges)
        {
            if (aquarium == null)
            {
                return(double.NaN);
            }

            QDecimal measure = QueryLastMeasure(aquarium, field);
            double   mVal    = (measure != null) ? measure.value : double.NaN;

            PrepareValue(measures, mVal, sign, uom, ranges);

            return(mVal);
        }