void IGXDLMSBase.Load(GXXmlReader reader)
        {
            CurrentAverageValue = reader.ReadElementContentAsObject("CurrentAverageValue", null);
            LastAverageValue    = reader.ReadElementContentAsObject("LastAverageValue", null);
            Scaler = reader.ReadElementContentAsDouble("Scaler", 1);
            Unit   = (Unit)reader.ReadElementContentAsInt("Unit");
            Status = reader.ReadElementContentAsObject("Status", null);
            string str = reader.ReadElementContentAsString("CaptureTime");

            if (str == null)
            {
                CaptureTime = null;
            }
            else
            {
                CaptureTime = new GXDateTime(str);
            }
            str = reader.ReadElementContentAsString("StartTimeCurrent");
            if (str == null)
            {
                StartTimeCurrent = null;
            }
            else
            {
                StartTimeCurrent = new GXDateTime(str);
            }
            Period          = (UInt32)reader.ReadElementContentAsInt("Period");
            NumberOfPeriods = (UInt16)reader.ReadElementContentAsInt("NumberOfPeriods");
        }
 void IGXDLMSBase.Load(GXXmlReader reader)
 {
     Unit        = (Unit)reader.ReadElementContentAsInt("Unit", 0);
     Scaler      = reader.ReadElementContentAsDouble("Scaler", 1);
     Value       = reader.ReadElementContentAsObject("Value", null);
     Status      = reader.ReadElementContentAsObject("Status", null);
     CaptureTime = (GXDateTime)reader.ReadElementContentAsObject("CaptureTime", null);
 }
        void IGXDLMSBase.Load(GXXmlReader reader)
        {
            Unit   = (Unit)reader.ReadElementContentAsInt("Unit", 0);
            Scaler = reader.ReadElementContentAsDouble("Scaler", 1);
            Value  = reader.ReadElementContentAsObject("Value", null, this, 2);
            Status = reader.ReadElementContentAsObject("Status", null, this, 4);
            GXDateTime dt = reader.ReadElementContentAsDateTime("CaptureTime");

            if (dt == null)
            {
                CaptureTime = DateTime.MinValue;
            }
            else
            {
                CaptureTime = dt.Value.ToLocalTime().LocalDateTime;
            }
        }
Пример #4
0
 void IGXDLMSBase.Load(GXXmlReader reader)
 {
     Unit   = (Unit)reader.ReadElementContentAsInt("Unit", 0);
     Scaler = reader.ReadElementContentAsDouble("Scaler", 1);
     Value  = reader.ReadElementContentAsObject("Value", null);
 }