public Manipulator(XmlNode manipulatorNode) { if (manipulatorNode == null) { throw new ApplicationException("Invalid Environment xml file. No Manipulator node found"); } HomePosition = new ManipulatorPosition(manipulatorNode.SelectSingleNode("Position[@key='Home']")); Stations = new List <Station>(); foreach (XmlNode snode in manipulatorNode.SelectNodes("Stations/Station")) { Stations.Add(new Station(snode)); } }
public Station(XmlNode stationNode) { if (stationNode == null) { throw new ApplicationException("Invalid Environment xml file. No station node found"); } Type = (StationType)Enum.Parse(typeof(StationType), stationNode.Attributes["type"].Value); ID = stationNode.Attributes["id"].Value; Slots = new List <Slot>(); foreach (XmlNode slotNode in stationNode.SelectNodes("Slot")) { Slots.Add(new Slot(slotNode)); } Thresholds = new List <Threshold>(); LowestRegisteredPosition = new ManipulatorPosition(stationNode.SelectSingleNode("Positions/Position[@key='Lowest']")); RegisteredG4Position = new ManipulatorPosition(stationNode.SelectSingleNode("Positions//Position[@key='G4']")); RegisteredP4Position = new ManipulatorPosition(stationNode.SelectSingleNode("Positions//Position[@key='P4']")); if (Type == StationType.Casette) { HighestRegisteredPosition = new ManipulatorPosition(stationNode.SelectSingleNode("Positions//Position[@key='Highest']")); WaferWidth = double.Parse(stationNode["WaferWidth"].InnerText) * 0.001; LowestSlotPosition = double.Parse(stationNode["LowestSlotPosition"].InnerText) * 0.001; HighestSlotPosition = double.Parse(stationNode["HighestSlotPosition"].InnerText) * 0.001; foreach (XmlNode t in stationNode.SelectSingleNode("Thresholds").ChildNodes) { Thresholds.Add(new Threshold(t)); } } }