Ejemplo n.º 1
0
        public static ISOTime ReadXML(XmlNode node)
        {
            ISOTime time = new ISOTime();

            time.Start    = node.GetXmlNodeValueAsNullableDateTime("@A");
            time.Stop     = node.GetXmlNodeValueAsNullableDateTime("@B");
            time.Duration = node.GetXmlNodeValueAsNullableUInt("@C");
            time.TypeInt  = node.GetXmlNodeValueAsInt("@D");

            time.HasStart    = node.IsAttributePresent("A");
            time.HasStop     = node.IsAttributePresent("B");
            time.HasDuration = node.IsAttributePresent("C");
            time.HasType     = node.IsAttributePresent("D");

            XmlNodeList ptnNodes = node.SelectNodes("PTN");

            if (ptnNodes != null)
            {
                time.Positions.AddRange(ISOPosition.ReadXML(ptnNodes));
            }

            XmlNodeList dlvNodes = node.SelectNodes("DLV");

            if (dlvNodes != null)
            {
                time.DataLogValues.AddRange(ISODataLogValue.ReadXML(dlvNodes));
            }

            return(time);
        }
Ejemplo n.º 2
0
        public static List <ISODataLogValue> ReadXML(XmlNodeList nodes)
        {
            List <ISODataLogValue> items = new List <ISODataLogValue>();

            foreach (XmlNode node in nodes)
            {
                items.Add(ISODataLogValue.ReadXML(node));
            }
            return(items);
        }
Ejemplo n.º 3
0
        public static ISODataLogValue ReadXML(XmlNode node)
        {
            if (node == null)
            {
                return(null);
            }

            ISODataLogValue dlv = new ISODataLogValue();

            dlv.ProcessDataDDI     = node.GetXmlNodeValue("@A");
            dlv.ProcessDataValue   = node.GetXmlNodeValueAsNullableInt("@B");
            dlv.DeviceElementIdRef = node.GetXmlNodeValue("@C");
            dlv.DataLogPGN         = node.GetXmlNodeValueAsNullableUInt("@D");
            dlv.DataLogPGNStartBit = node.GetXmlNodeValueAsNullableByte("@E");
            dlv.DataLogPGNStopBit  = node.GetXmlNodeValueAsNullableByte("@F");

            return(dlv);
        }