Ejemplo n.º 1
0
        /// <summary>
        /// This method retrieves a demand value from the meter and formats it according
        /// to the meter's formatting rules established in the meter's program
        /// </summary>
        /// <returns></returns>
        /// <remarks >
        /// MM/DD/YY who Version Issue# Description
        /// -------- --- ------- ------ ---------------------------------------
        /// 12/07/06 mah 8.00.00  N/A   Created
        /// </remarks>
        protected string GetDemandValue(ref SCSDevice device)
        {
            String strValue;

            if (RegisterType == 1)
            {
                strValue = device.ReadPresentDemandValue(this);
            }
            else
            {
                strValue = device.ReadPreviousDemandValue(this);
            }

            if (strValue.Length > 0)
            {
                // Now that we have a value that we can display we need to format it to match
                // the display format currently configured in the meter

                strValue = FormatDisplayValue(strValue, device.DemandFormat);
            }

            return(strValue);
        }