Esempio n. 1
0
        /// <summary>
        /// Writes a Cum Value to the meter
        /// </summary>
        /// <param name="device">Device we are talking to</param>
        /// <param name="strValue">The value to set into the meter</param>
        /// <returns>ItronDeviceResult</returns>
        /// <remarks >
        /// MM/DD/YY who Version Issue# Description
        /// -------- --- ------- ------ ---------------------------------------
        /// 01/30/07 KRC 8.09.00  N/A   Getting Edit Registers working
        /// </remarks>
        protected ItronDeviceResult SetCumulativeValue(ref SCSDevice device, string strValue)
        {
            ItronDeviceResult Result = ItronDeviceResult.SUCCESS;

            if (RegisterType == 0x00 || RegisterType == 0x02 || RegisterType == 0x03)
            {
                Result = device.SetFloatingBCDValue(device.TranslateDisplayAddress(this), 4, strValue);
            }
            else if (RegisterType == 0x07)
            {
                Result = device.SetFloatingBCDValue(device.TranslateDisplayAddress(this), 3, strValue);
            }

            return(Result);
        }
Esempio n. 2
0
        /// <summary>
        /// Writes a Cum Value to the meter
        /// </summary>
        /// <param name="device">Device we are talking to</param>
        /// <param name="strValue">The value to set into the meter</param>
        /// <returns>ItronDeviceResult</returns>
        /// <remarks >
        /// MM/DD/YY who Version Issue# Description
        /// -------- --- ------- ------ ---------------------------------------
        /// 01/31/07 KRC 8.00.10  N/A   Getting Edit Registers working
        /// </remarks>
        override protected ItronDeviceResult SetCCumValue(ref SCSDevice device, string strValue)
        {
            ItronDeviceResult Result = ItronDeviceResult.SUCCESS;

            if (RegisterType == 0) // current season
            {
                Result = device.SetFloatingBCDValue(device.TranslateDisplayAddress(this), 4, strValue);
            }
            else if (RegisterType == 7) // last season
            {
                Result = device.SetFloatingBCDValue(device.TranslateDisplayAddress(this), 3, strValue);
            }

            return(Result);
        }