Esempio n. 1
0
        public static IEnumerable <ISODeviceProcessData> ReadXML(XmlNodeList nodes)
        {
            List <ISODeviceProcessData> items = new List <ISODeviceProcessData>();

            foreach (XmlNode node in nodes)
            {
                items.Add(ISODeviceProcessData.ReadXML(node));
            }
            return(items);
        }
Esempio n. 2
0
        public static ISODeviceProcessData ReadXML(XmlNode node)
        {
            ISODeviceProcessData item = new ISODeviceProcessData();

            item.ObjectID       = node.GetXmlNodeValueAsUInt("@A");
            item.DDI            = node.GetXmlNodeValue("@B");
            item.Property       = node.GetXmlNodeValueAsInt("@C");
            item.TriggerMethods = node.GetXmlNodeValueAsInt("@D");
            item.Designator     = node.GetXmlNodeValue("@E");
            item.DeviceValuePresentationObjectId = node.GetXmlNodeValueAsNullableUInt("@F");

            return(item);
        }
Esempio n. 3
0
        public static ISODeviceProcessData ReadXML(XmlNode node, List <ISODeviceValuePresentation> deviceValuePresentations)
        {
            ISODeviceProcessData item = new ISODeviceProcessData();

            item.ObjectID       = node.GetXmlNodeValueAsUInt("@A");
            item.DDI            = node.GetXmlNodeValue("@B");
            item.Property       = node.GetXmlNodeValueAsInt("@C");
            item.TriggerMethods = node.GetXmlNodeValueAsInt("@D");
            item.Designator     = node.GetXmlNodeValue("@E");
            item.DeviceValuePresentationObjectId = node.GetXmlNodeValueAsNullableUInt("@F");
            if (item.DeviceValuePresentationObjectId.HasValue)
            {
                item.DeviceValuePresentation = deviceValuePresentations.FirstOrDefault(d => d.ObjectID == item.DeviceValuePresentationObjectId.Value);
            }

            return(item);
        }
        public static ISODevice ReadXML(XmlNode node)
        {
            ISODevice device = new ISODevice();

            device.DeviceId                = node.GetXmlNodeValue("@A");
            device.DeviceDesignator        = node.GetXmlNodeValue("@B");
            device.DeviceSoftwareVersion   = node.GetXmlNodeValue("@C");
            device.ClientNAME              = node.GetXmlNodeValue("@D");
            device.DeviceSerialNumber      = node.GetXmlNodeValue("@E");
            device.DeviceStructureLabel    = node.GetXmlNodeValue("@F");
            device.DeviceLocalizationLabel = node.GetXmlNodeValue("@G");

            XmlNodeList detNodes = node.SelectNodes("DET");

            if (detNodes != null)
            {
                device.DeviceElements.AddRange(ISODeviceElement.ReadXML(detNodes, device));
            }

            XmlNodeList dpdNodes = node.SelectNodes("DPD");

            if (dpdNodes != null)
            {
                device.DeviceProcessDatas.AddRange(ISODeviceProcessData.ReadXML(dpdNodes));
            }

            XmlNodeList dptNodes = node.SelectNodes("DPT");

            if (dptNodes != null)
            {
                device.DeviceProperties.AddRange(ISODeviceProperty.ReadXML(dptNodes));
            }

            XmlNodeList dvpNodes = node.SelectNodes("DVP");

            if (dvpNodes != null)
            {
                device.DeviceValuePresentations.AddRange(ISODeviceValuePresentation.ReadXML(dvpNodes));
            }

            return(device);
        }