Ejemplo n.º 1
0
        /// <summary>
        /// Writes an Energy 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 SetEnergyValue(ref SCSDevice device, string strValue)
        {
            ItronDeviceResult Result = ItronDeviceResult.SUCCESS;

            if (RegisterType == 0x00 || RegisterType == 0x02 || RegisterType == 0x03)
            {
                Result = device.SetFixedBCDValue(device.TranslateDisplayAddress(this), 4, 7, strValue);
            }
            else
            {
                Result = ItronDeviceResult.ERROR;
            }

            return(Result);
        }