using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; namespace MECF.Framework.Common.Utilities { public interface INode { } public class SCValue4Block : SCValue { public class Block4Config : INode { public CSB Block1 { get; set; } = new CSB(); public PRB1 Block2 { get; set; } = new PRB1(); public PRB2 Block3 { get; set; } = new PRB2(); public IFB Block4 { get; set; } = new IFB(); } public Block4Config System_SetUp { get; set; } public SCValue4Block() { System_SetUp = new Block4Config(); } public override void SetKeys() { _fieldMap.Clear(); SetKeys(typeof(SCValue4Block), "", this); } public void SetKeys(Type type, string prefix, object objParent) { Dictionary items = new Dictionary(); PropertyInfo[] property = type.GetProperties(); foreach (PropertyInfo fiGroup in property) //System_SetUp_4Block { var ttt = fiGroup.PropertyType; object obj = null; if (objParent != null) obj = fiGroup.GetValue(objParent, null); if (ttt != typeof(double) && ttt != typeof(string) && ttt != typeof(bool) && ttt != typeof(int)) { string fiGroupName = fiGroup.Name; if (fiGroupName.Length > 6 && fiGroupName.Substring(0, 6) == "Module") { fiGroupName = fiGroupName.Replace("Module", ""); } SetKeys(ttt, prefix + fiGroupName + "_", obj); continue; } string name = $"{prefix}{fiGroup.Name}".Replace("_", "."); if (_fieldMap.Keys.Contains(name)) { _fieldMap[name] = Tuple.Create(objParent, fiGroup); } else { _fieldMap.Add(name, Tuple.Create(objParent, fiGroup)); } } } public override void SetParameterValue(MECF.Framework.Common.Utilities.Parameter parameter) { if (System_SetUp.Block1 != null) { System_SetUp.Block1.Module0.SetParameterValue(parameter.Blocks[0].Modules[0]); System_SetUp.Block1.Module1.SetParameterValue(parameter.Blocks[0].Modules[1]); System_SetUp.Block1.Module2.SetParameterValue(parameter.Blocks[0].Modules[2]); System_SetUp.Block1.Module3.SetParameterValue(parameter.Blocks[0].Modules[3]); System_SetUp.Block1.Module4.SetParameterValue(parameter.Blocks[0].Modules[4]); System_SetUp.Block1.Module5.SetParameterValue(parameter.Blocks[0].Modules[5]); parameter.Blocks[0].TransferArmAccessModules = ParameterManager.GetArmAccessModule(System_SetUp.Block1.Module0.TransferArm); System_SetUp.Block1.AccessHomePosition.SetParameterValue(parameter.Blocks[0].AccessHomePosition); System_SetUp.Block1.WaferCheckPosition.SetParameterValue(parameter.Blocks[0].WaferCheckPosition); } if (System_SetUp.Block2 != null) { System_SetUp.Block2.Module0.SetParameterValue(parameter.Blocks[1].Modules[0]); System_SetUp.Block2.Module1.SetParameterValue(parameter.Blocks[1].Modules[1]); System_SetUp.Block2.Module2.SetParameterValue(parameter.Blocks[1].Modules[2]); System_SetUp.Block2.Module3.SetParameterValue(parameter.Blocks[1].Modules[3]); System_SetUp.Block2.Module4.SetParameterValue(parameter.Blocks[1].Modules[4]); System_SetUp.Block2.Module5.SetParameterValue(parameter.Blocks[1].Modules[5]); System_SetUp.Block2.Module6.SetParameterValue(parameter.Blocks[1].Modules[6]); System_SetUp.Block2.Module7.SetParameterValue(parameter.Blocks[1].Modules[7]); System_SetUp.Block2.Module8.SetParameterValue(parameter.Blocks[1].Modules[8]); System_SetUp.Block2.Module9.SetParameterValue(parameter.Blocks[1].Modules[9]); System_SetUp.Block2.Module10.SetParameterValue(parameter.Blocks[1].Modules[10]); System_SetUp.Block2.Module11.SetParameterValue(parameter.Blocks[1].Modules[11]); System_SetUp.Block2.Module12.SetParameterValue(parameter.Blocks[1].Modules[12]); System_SetUp.Block2.Module13.SetParameterValue(parameter.Blocks[1].Modules[13]); System_SetUp.Block2.Module14.SetParameterValue(parameter.Blocks[1].Modules[14]); System_SetUp.Block2.Module15.SetParameterValue(parameter.Blocks[1].Modules[15]); System_SetUp.Block2.Module16.SetParameterValue(parameter.Blocks[1].Modules[16]); System_SetUp.Block2.Module17.SetParameterValue(parameter.Blocks[1].Modules[17]); System_SetUp.Block2.Module18.SetParameterValue(parameter.Blocks[1].Modules[18]); System_SetUp.Block2.Module19.SetParameterValue(parameter.Blocks[1].Modules[19]); System_SetUp.Block2.Module20.SetParameterValue(parameter.Blocks[1].Modules[20]); System_SetUp.Block2.Module21.SetParameterValue(parameter.Blocks[1].Modules[21]); System_SetUp.Block2.Module22.SetParameterValue(parameter.Blocks[1].Modules[22]); System_SetUp.Block2.Module23.SetParameterValue(parameter.Blocks[1].Modules[23]); System_SetUp.Block2.Module24.SetParameterValue(parameter.Blocks[1].Modules[24]); System_SetUp.Block2.Module25.SetParameterValue(parameter.Blocks[1].Modules[25]); System_SetUp.Block2.Module26.SetParameterValue(parameter.Blocks[1].Modules[26]); System_SetUp.Block2.Module27.SetParameterValue(parameter.Blocks[1].Modules[27]); System_SetUp.Block2.Module28.SetParameterValue(parameter.Blocks[1].Modules[28]); System_SetUp.Block2.Module29.SetParameterValue(parameter.Blocks[1].Modules[29]); parameter.Blocks[1].TransferArmAccessModules = ParameterManager.GetArmAccessModule(System_SetUp.Block2.Module0.TransferArm); System_SetUp.Block2.AccessHomePosition.SetParameterValue(parameter.Blocks[1].AccessHomePosition); System_SetUp.Block2.WaferCheckPosition.SetParameterValue(parameter.Blocks[1].WaferCheckPosition); ParameterManager.Instance.ModuleDispenseConfigList.Clear(); if (ParameterManager.IsSpinModule(System_SetUp.Block2.Module1.Name)) { ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[1].ID, GetDispenseConfigs(System_SetUp.Block2.Module1.DispenseConfig, System_SetUp.Block2.Module1.Name)); } if (ParameterManager.IsSpinModule(System_SetUp.Block2.Module2.Name)) { ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[2].ID, GetDispenseConfigs(System_SetUp.Block2.Module2.DispenseConfig, System_SetUp.Block2.Module2.Name)); } if (ParameterManager.IsSpinModule(System_SetUp.Block2.Module3.Name)) { ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[3].ID, GetDispenseConfigs(System_SetUp.Block2.Module3.DispenseConfig, System_SetUp.Block2.Module3.Name)); } if (ParameterManager.IsSpinModule(System_SetUp.Block2.Module4.Name)) { ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[4].ID, GetDispenseConfigs(System_SetUp.Block2.Module4.DispenseConfig, System_SetUp.Block2.Module4.Name)); } if (ParameterManager.IsADHModule(System_SetUp.Block2.Module5.Name)) { ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[5].ID, GetDispenseConfigs(System_SetUp.Block2.Module5.DispenseConfig, System_SetUp.Block2.Module5.Name)); } if (ParameterManager.IsADHModule(System_SetUp.Block2.Module15.Name)) { ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[15].ID, GetDispenseConfigs(System_SetUp.Block2.Module15.DispenseConfig, System_SetUp.Block2.Module15.Name)); } if (ParameterManager.IsADHModule(System_SetUp.Block2.Module17.Name)) { ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[17].ID, GetDispenseConfigs(System_SetUp.Block2.Module17.DispenseConfig, System_SetUp.Block2.Module17.Name)); } } if (System_SetUp.Block3 != null) { System_SetUp.Block3.Module0.SetParameterValue(parameter.Blocks[2].Modules[0]); System_SetUp.Block3.Module1.SetParameterValue(parameter.Blocks[2].Modules[1]); System_SetUp.Block3.Module2.SetParameterValue(parameter.Blocks[2].Modules[2]); System_SetUp.Block3.Module3.SetParameterValue(parameter.Blocks[2].Modules[3]); System_SetUp.Block3.Module4.SetParameterValue(parameter.Blocks[2].Modules[4]); System_SetUp.Block3.Module5.SetParameterValue(parameter.Blocks[2].Modules[5]); System_SetUp.Block3.Module6.SetParameterValue(parameter.Blocks[2].Modules[6]); System_SetUp.Block3.Module7.SetParameterValue(parameter.Blocks[2].Modules[7]); System_SetUp.Block3.Module8.SetParameterValue(parameter.Blocks[2].Modules[8]); System_SetUp.Block3.Module9.SetParameterValue(parameter.Blocks[2].Modules[9]); System_SetUp.Block3.Module10.SetParameterValue(parameter.Blocks[2].Modules[10]); System_SetUp.Block3.Module11.SetParameterValue(parameter.Blocks[2].Modules[11]); System_SetUp.Block3.Module12.SetParameterValue(parameter.Blocks[2].Modules[12]); System_SetUp.Block3.Module13.SetParameterValue(parameter.Blocks[2].Modules[13]); System_SetUp.Block3.Module14.SetParameterValue(parameter.Blocks[2].Modules[14]); System_SetUp.Block3.Module15.SetParameterValue(parameter.Blocks[2].Modules[15]); System_SetUp.Block3.Module16.SetParameterValue(parameter.Blocks[2].Modules[16]); System_SetUp.Block3.Module17.SetParameterValue(parameter.Blocks[2].Modules[17]); System_SetUp.Block3.Module18.SetParameterValue(parameter.Blocks[2].Modules[18]); System_SetUp.Block3.Module19.SetParameterValue(parameter.Blocks[2].Modules[19]); System_SetUp.Block3.Module20.SetParameterValue(parameter.Blocks[2].Modules[20]); System_SetUp.Block3.Module21.SetParameterValue(parameter.Blocks[2].Modules[21]); System_SetUp.Block3.Module22.SetParameterValue(parameter.Blocks[2].Modules[22]); System_SetUp.Block3.Module23.SetParameterValue(parameter.Blocks[2].Modules[23]); System_SetUp.Block3.Module24.SetParameterValue(parameter.Blocks[2].Modules[24]); System_SetUp.Block3.Module25.SetParameterValue(parameter.Blocks[2].Modules[25]); System_SetUp.Block3.Module26.SetParameterValue(parameter.Blocks[2].Modules[26]); System_SetUp.Block3.Module27.SetParameterValue(parameter.Blocks[2].Modules[27]); System_SetUp.Block3.Module28.SetParameterValue(parameter.Blocks[2].Modules[28]); System_SetUp.Block3.Module29.SetParameterValue(parameter.Blocks[2].Modules[29]); parameter.Blocks[2].TransferArmAccessModules = ParameterManager.GetArmAccessModule(System_SetUp.Block3.Module0.TransferArm); System_SetUp.Block3.AccessHomePosition.SetParameterValue(parameter.Blocks[2].AccessHomePosition); System_SetUp.Block3.WaferCheckPosition.SetParameterValue(parameter.Blocks[2].WaferCheckPosition); if (ParameterManager.IsSpinModule(System_SetUp.Block3.Module1.Name)) { ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[2].Modules[1].ID, GetDispenseConfigs(System_SetUp.Block3.Module1.DispenseConfig, System_SetUp.Block3.Module1.Name)); } if (ParameterManager.IsSpinModule(System_SetUp.Block3.Module2.Name)) { ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[2].Modules[2].ID, GetDispenseConfigs(System_SetUp.Block3.Module2.DispenseConfig, System_SetUp.Block3.Module2.Name)); } if (ParameterManager.IsSpinModule(System_SetUp.Block3.Module3.Name)) { ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[2].Modules[3].ID, GetDispenseConfigs(System_SetUp.Block3.Module3.DispenseConfig, System_SetUp.Block3.Module3.Name)); } if (ParameterManager.IsSpinModule(System_SetUp.Block3.Module4.Name)) { ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[2].Modules[4].ID, GetDispenseConfigs(System_SetUp.Block3.Module4.DispenseConfig, System_SetUp.Block3.Module4.Name)); } if (ParameterManager.IsADHModule(System_SetUp.Block3.Module5.Name)) { ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[2].Modules[5].ID, GetDispenseConfigs(System_SetUp.Block3.Module5.DispenseConfig, System_SetUp.Block3.Module5.Name)); } if (ParameterManager.IsADHModule(System_SetUp.Block3.Module15.Name)) { ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[2].Modules[15].ID, GetDispenseConfigs(System_SetUp.Block3.Module15.DispenseConfig, System_SetUp.Block3.Module15.Name)); } if (ParameterManager.IsADHModule(System_SetUp.Block3.Module17.Name)) { ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[2].Modules[17].ID, GetDispenseConfigs(System_SetUp.Block3.Module17.DispenseConfig, System_SetUp.Block3.Module17.Name)); } } if (System_SetUp.Block4 != null) { System_SetUp.Block4.Module0.SetParameterValue(parameter.Blocks[3].Modules[0]); System_SetUp.Block4.Module1.SetParameterValue(parameter.Blocks[3].Modules[1]); System_SetUp.Block4.Module2.SetParameterValue(parameter.Blocks[3].Modules[2]); System_SetUp.Block4.Module3.SetParameterValue(parameter.Blocks[3].Modules[3]); System_SetUp.Block4.Module4.SetParameterValue(parameter.Blocks[3].Modules[4]); System_SetUp.Block4.Module5.SetParameterValue(parameter.Blocks[3].Modules[5]); parameter.Blocks[3].TransferArmAccessModules = ParameterManager.GetArmAccessModule(System_SetUp.Block4.Module0.TransferArm); System_SetUp.Block4.AccessHomePosition.SetParameterValue(parameter.Blocks[3].AccessHomePosition); System_SetUp.Block4.WaferCheckPosition.SetParameterValue(parameter.Blocks[3].WaferCheckPosition); } } } public class SCValue3Block : SCValue { public class Block3Config : INode { public CSB Block1 { get; set; } = new CSB(); public PRB1 Block2 { get; set; } = new PRB1(); public IFB Block4 { get; set; } = new IFB(); } public Block3Config System_SetUp { get; set; } public SCValue3Block() { System_SetUp = new Block3Config(); } public override void SetKeys() { _fieldMap.Clear(); SetKeys(typeof(SCValue3Block), "", this); } public void SetKeys(Type type, string prefix, object objParent) { Dictionary items = new Dictionary(); PropertyInfo[] property = type.GetProperties(); foreach (PropertyInfo fiGroup in property) //System_SetUp_4Block { var ttt = fiGroup.PropertyType; object obj = null; if (objParent != null) obj = fiGroup.GetValue(objParent, null); if (ttt != typeof(double) && ttt != typeof(string) && ttt != typeof(bool) && ttt != typeof(int)) { string fiGroupName = fiGroup.Name; if (fiGroupName.Length > 6 && fiGroupName.Substring(0, 6) == "Module") { fiGroupName = fiGroupName.Replace("Module", ""); } SetKeys(ttt, prefix + fiGroupName + "_", obj); continue; } string name = $"{prefix}{fiGroup.Name}".Replace("_", "."); if (_fieldMap.Keys.Contains(name)) { _fieldMap[name] = Tuple.Create(objParent, fiGroup); } else { _fieldMap.Add(name, Tuple.Create(objParent, fiGroup)); } } } public override void SetParameterValue(MECF.Framework.Common.Utilities.Parameter parameter) { if (System_SetUp.Block1 != null) { System_SetUp.Block1.Module0.SetParameterValue(parameter.Blocks[0].Modules[0]); System_SetUp.Block1.Module1.SetParameterValue(parameter.Blocks[0].Modules[1]); System_SetUp.Block1.Module2.SetParameterValue(parameter.Blocks[0].Modules[2]); System_SetUp.Block1.Module3.SetParameterValue(parameter.Blocks[0].Modules[3]); System_SetUp.Block1.Module4.SetParameterValue(parameter.Blocks[0].Modules[4]); System_SetUp.Block1.Module5.SetParameterValue(parameter.Blocks[0].Modules[5]); parameter.Blocks[0].TransferArmAccessModules = ParameterManager.GetArmAccessModule(System_SetUp.Block1.Module0.TransferArm); System_SetUp.Block1.AccessHomePosition.SetParameterValue(parameter.Blocks[0].AccessHomePosition); System_SetUp.Block1.WaferCheckPosition.SetParameterValue(parameter.Blocks[0].WaferCheckPosition); } if (System_SetUp.Block2 != null) { System_SetUp.Block2.Module0.SetParameterValue(parameter.Blocks[1].Modules[0]); System_SetUp.Block2.Module1.SetParameterValue(parameter.Blocks[1].Modules[1]); System_SetUp.Block2.Module2.SetParameterValue(parameter.Blocks[1].Modules[2]); System_SetUp.Block2.Module3.SetParameterValue(parameter.Blocks[1].Modules[3]); System_SetUp.Block2.Module4.SetParameterValue(parameter.Blocks[1].Modules[4]); System_SetUp.Block2.Module5.SetParameterValue(parameter.Blocks[1].Modules[5]); System_SetUp.Block2.Module6.SetParameterValue(parameter.Blocks[1].Modules[6]); System_SetUp.Block2.Module7.SetParameterValue(parameter.Blocks[1].Modules[7]); System_SetUp.Block2.Module8.SetParameterValue(parameter.Blocks[1].Modules[8]); System_SetUp.Block2.Module9.SetParameterValue(parameter.Blocks[1].Modules[9]); System_SetUp.Block2.Module10.SetParameterValue(parameter.Blocks[1].Modules[10]); System_SetUp.Block2.Module11.SetParameterValue(parameter.Blocks[1].Modules[11]); System_SetUp.Block2.Module12.SetParameterValue(parameter.Blocks[1].Modules[12]); System_SetUp.Block2.Module13.SetParameterValue(parameter.Blocks[1].Modules[13]); System_SetUp.Block2.Module14.SetParameterValue(parameter.Blocks[1].Modules[14]); System_SetUp.Block2.Module15.SetParameterValue(parameter.Blocks[1].Modules[15]); System_SetUp.Block2.Module16.SetParameterValue(parameter.Blocks[1].Modules[16]); System_SetUp.Block2.Module17.SetParameterValue(parameter.Blocks[1].Modules[17]); System_SetUp.Block2.Module18.SetParameterValue(parameter.Blocks[1].Modules[18]); System_SetUp.Block2.Module19.SetParameterValue(parameter.Blocks[1].Modules[19]); System_SetUp.Block2.Module20.SetParameterValue(parameter.Blocks[1].Modules[20]); System_SetUp.Block2.Module21.SetParameterValue(parameter.Blocks[1].Modules[21]); System_SetUp.Block2.Module22.SetParameterValue(parameter.Blocks[1].Modules[22]); System_SetUp.Block2.Module23.SetParameterValue(parameter.Blocks[1].Modules[23]); System_SetUp.Block2.Module24.SetParameterValue(parameter.Blocks[1].Modules[24]); System_SetUp.Block2.Module25.SetParameterValue(parameter.Blocks[1].Modules[25]); System_SetUp.Block2.Module26.SetParameterValue(parameter.Blocks[1].Modules[26]); System_SetUp.Block2.Module27.SetParameterValue(parameter.Blocks[1].Modules[27]); System_SetUp.Block2.Module28.SetParameterValue(parameter.Blocks[1].Modules[28]); System_SetUp.Block2.Module29.SetParameterValue(parameter.Blocks[1].Modules[29]); parameter.Blocks[1].TransferArmAccessModules = ParameterManager.GetArmAccessModule(System_SetUp.Block2.Module0.TransferArm); System_SetUp.Block2.AccessHomePosition.SetParameterValue(parameter.Blocks[1].AccessHomePosition); System_SetUp.Block2.WaferCheckPosition.SetParameterValue(parameter.Blocks[1].WaferCheckPosition); ParameterManager.Instance.ModuleDispenseConfigList.Clear(); if (ParameterManager.IsSpinModule(System_SetUp.Block2.Module1.Name)) { ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[1].ID, GetDispenseConfigs(System_SetUp.Block2.Module1.DispenseConfig, System_SetUp.Block2.Module1.Name)); } if (ParameterManager.IsSpinModule(System_SetUp.Block2.Module2.Name)) { ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[2].ID, GetDispenseConfigs(System_SetUp.Block2.Module2.DispenseConfig, System_SetUp.Block2.Module2.Name)); } if (ParameterManager.IsSpinModule(System_SetUp.Block2.Module3.Name)) { ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[3].ID, GetDispenseConfigs(System_SetUp.Block2.Module3.DispenseConfig, System_SetUp.Block2.Module3.Name)); } if (ParameterManager.IsSpinModule(System_SetUp.Block2.Module4.Name)) { ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[4].ID, GetDispenseConfigs(System_SetUp.Block2.Module4.DispenseConfig, System_SetUp.Block2.Module4.Name)); } if (ParameterManager.IsADHModule(System_SetUp.Block2.Module5.Name)) { ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[5].ID, GetDispenseConfigs(System_SetUp.Block2.Module5.DispenseConfig, System_SetUp.Block2.Module5.Name)); } if (ParameterManager.IsADHModule(System_SetUp.Block2.Module15.Name)) { ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[15].ID, GetDispenseConfigs(System_SetUp.Block2.Module15.DispenseConfig, System_SetUp.Block2.Module15.Name)); } if (ParameterManager.IsADHModule(System_SetUp.Block2.Module17.Name)) { ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[17].ID, GetDispenseConfigs(System_SetUp.Block2.Module17.DispenseConfig, System_SetUp.Block2.Module17.Name)); } } if (System_SetUp.Block4 != null) { System_SetUp.Block4.Module0.SetParameterValue(parameter.Blocks[2].Modules[0]); System_SetUp.Block4.Module1.SetParameterValue(parameter.Blocks[2].Modules[1]); System_SetUp.Block4.Module2.SetParameterValue(parameter.Blocks[2].Modules[2]); System_SetUp.Block4.Module3.SetParameterValue(parameter.Blocks[2].Modules[3]); System_SetUp.Block4.Module4.SetParameterValue(parameter.Blocks[2].Modules[4]); System_SetUp.Block4.Module5.SetParameterValue(parameter.Blocks[2].Modules[5]); parameter.Blocks[2].TransferArmAccessModules = ParameterManager.GetArmAccessModule(System_SetUp.Block4.Module0.TransferArm); System_SetUp.Block4.AccessHomePosition.SetParameterValue(parameter.Blocks[2].AccessHomePosition); System_SetUp.Block4.WaferCheckPosition.SetParameterValue(parameter.Blocks[2].WaferCheckPosition); } } } public class SCValue2Block : SCValue { public class Block2Config : INode { public CSB Block1 { get; set; } = new CSB(); public PRB1 Block2 { get; set; } = new PRB1(); } public Block2Config System_SetUp { get; set; } public SCValue2Block() { System_SetUp = new Block2Config(); } public override void SetKeys() { _fieldMap.Clear(); SetKeys(typeof(SCValue2Block), "", this); } public void SetKeys(Type type, string prefix, object objParent) { Dictionary items = new Dictionary(); PropertyInfo[] property = type.GetProperties(); foreach (PropertyInfo fiGroup in property) //System_SetUp_4Block { var ttt = fiGroup.PropertyType; object obj = null; if (objParent != null) obj = fiGroup.GetValue(objParent, null); if (ttt != typeof(double) && ttt != typeof(string) && ttt != typeof(bool) && ttt != typeof(int)) { string fiGroupName = fiGroup.Name; if (fiGroupName.Length > 6 && fiGroupName.Substring(0, 6) == "Module") { fiGroupName = fiGroupName.Replace("Module", ""); } SetKeys(ttt, prefix + fiGroupName + "_", obj); continue; } string name = $"{prefix}{fiGroup.Name}".Replace("_", "."); if (_fieldMap.Keys.Contains(name)) { _fieldMap[name] = Tuple.Create(objParent, fiGroup); } else { _fieldMap.Add(name, Tuple.Create(objParent, fiGroup)); } } } public override void SetParameterValue(MECF.Framework.Common.Utilities.Parameter parameter) { if (System_SetUp.Block1 != null) { System_SetUp.Block1.Module0.SetParameterValue(parameter.Blocks[0].Modules[0]); System_SetUp.Block1.Module1.SetParameterValue(parameter.Blocks[0].Modules[1]); System_SetUp.Block1.Module2.SetParameterValue(parameter.Blocks[0].Modules[2]); System_SetUp.Block1.Module3.SetParameterValue(parameter.Blocks[0].Modules[3]); System_SetUp.Block1.Module4.SetParameterValue(parameter.Blocks[0].Modules[4]); System_SetUp.Block1.Module5.SetParameterValue(parameter.Blocks[0].Modules[5]); parameter.Blocks[0].TransferArmAccessModules = ParameterManager.GetArmAccessModule(System_SetUp.Block1.Module0.TransferArm); System_SetUp.Block1.AccessHomePosition.SetParameterValue(parameter.Blocks[0].AccessHomePosition); System_SetUp.Block1.WaferCheckPosition.SetParameterValue(parameter.Blocks[0].WaferCheckPosition); } if (System_SetUp.Block2 != null) { System_SetUp.Block2.Module0.SetParameterValue(parameter.Blocks[1].Modules[0]); System_SetUp.Block2.Module1.SetParameterValue(parameter.Blocks[1].Modules[1]); System_SetUp.Block2.Module2.SetParameterValue(parameter.Blocks[1].Modules[2]); System_SetUp.Block2.Module3.SetParameterValue(parameter.Blocks[1].Modules[3]); System_SetUp.Block2.Module4.SetParameterValue(parameter.Blocks[1].Modules[4]); System_SetUp.Block2.Module5.SetParameterValue(parameter.Blocks[1].Modules[5]); System_SetUp.Block2.Module6.SetParameterValue(parameter.Blocks[1].Modules[6]); System_SetUp.Block2.Module7.SetParameterValue(parameter.Blocks[1].Modules[7]); System_SetUp.Block2.Module8.SetParameterValue(parameter.Blocks[1].Modules[8]); System_SetUp.Block2.Module9.SetParameterValue(parameter.Blocks[1].Modules[9]); System_SetUp.Block2.Module10.SetParameterValue(parameter.Blocks[1].Modules[10]); System_SetUp.Block2.Module11.SetParameterValue(parameter.Blocks[1].Modules[11]); System_SetUp.Block2.Module12.SetParameterValue(parameter.Blocks[1].Modules[12]); System_SetUp.Block2.Module13.SetParameterValue(parameter.Blocks[1].Modules[13]); System_SetUp.Block2.Module14.SetParameterValue(parameter.Blocks[1].Modules[14]); System_SetUp.Block2.Module15.SetParameterValue(parameter.Blocks[1].Modules[15]); System_SetUp.Block2.Module16.SetParameterValue(parameter.Blocks[1].Modules[16]); System_SetUp.Block2.Module17.SetParameterValue(parameter.Blocks[1].Modules[17]); System_SetUp.Block2.Module18.SetParameterValue(parameter.Blocks[1].Modules[18]); System_SetUp.Block2.Module19.SetParameterValue(parameter.Blocks[1].Modules[19]); System_SetUp.Block2.Module20.SetParameterValue(parameter.Blocks[1].Modules[20]); System_SetUp.Block2.Module21.SetParameterValue(parameter.Blocks[1].Modules[21]); System_SetUp.Block2.Module22.SetParameterValue(parameter.Blocks[1].Modules[22]); System_SetUp.Block2.Module23.SetParameterValue(parameter.Blocks[1].Modules[23]); System_SetUp.Block2.Module24.SetParameterValue(parameter.Blocks[1].Modules[24]); System_SetUp.Block2.Module25.SetParameterValue(parameter.Blocks[1].Modules[25]); System_SetUp.Block2.Module26.SetParameterValue(parameter.Blocks[1].Modules[26]); System_SetUp.Block2.Module27.SetParameterValue(parameter.Blocks[1].Modules[27]); System_SetUp.Block2.Module28.SetParameterValue(parameter.Blocks[1].Modules[28]); System_SetUp.Block2.Module29.SetParameterValue(parameter.Blocks[1].Modules[29]); parameter.Blocks[1].TransferArmAccessModules = ParameterManager.GetArmAccessModule(System_SetUp.Block2.Module0.TransferArm); System_SetUp.Block2.AccessHomePosition.SetParameterValue(parameter.Blocks[1].AccessHomePosition); System_SetUp.Block2.WaferCheckPosition.SetParameterValue(parameter.Blocks[1].WaferCheckPosition); ParameterManager.Instance.ModuleDispenseConfigList.Clear(); if (ParameterManager.IsSpinModule(System_SetUp.Block2.Module1.Name)) { ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[1].ID, GetDispenseConfigs(System_SetUp.Block2.Module1.DispenseConfig, System_SetUp.Block2.Module1.Name)); } if (ParameterManager.IsSpinModule(System_SetUp.Block2.Module2.Name)) { ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[2].ID, GetDispenseConfigs(System_SetUp.Block2.Module2.DispenseConfig, System_SetUp.Block2.Module2.Name)); } if (ParameterManager.IsSpinModule(System_SetUp.Block2.Module3.Name)) { ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[3].ID, GetDispenseConfigs(System_SetUp.Block2.Module3.DispenseConfig, System_SetUp.Block2.Module3.Name)); } if (ParameterManager.IsSpinModule(System_SetUp.Block2.Module4.Name)) { ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[4].ID, GetDispenseConfigs(System_SetUp.Block2.Module4.DispenseConfig, System_SetUp.Block2.Module4.Name)); } if (ParameterManager.IsADHModule(System_SetUp.Block2.Module5.Name)) { ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[5].ID, GetDispenseConfigs(System_SetUp.Block2.Module5.DispenseConfig, System_SetUp.Block2.Module5.Name)); } if (ParameterManager.IsADHModule(System_SetUp.Block2.Module15.Name)) { ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[15].ID, GetDispenseConfigs(System_SetUp.Block2.Module15.DispenseConfig, System_SetUp.Block2.Module15.Name)); } if (ParameterManager.IsADHModule(System_SetUp.Block2.Module17.Name)) { ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[17].ID, GetDispenseConfigs(System_SetUp.Block2.Module17.DispenseConfig, System_SetUp.Block2.Module17.Name)); } } } } public class SCValue { public Dictionary GetDispenseConfigs(string strFileDispense, string noduleName) { Dictionary dispenseConfigList = new Dictionary(); if (strFileDispense != null && strFileDispense != "") { string[] listDispense = strFileDispense.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); Dictionary dictDispense = new Dictionary(); for (int x = 0; x < listDispense.Length; x++) { string[] sigDispense = listDispense[x].Split(':'); dictDispense.Add(sigDispense[0], sigDispense[1]); } switch (noduleName) { case "COT": for (int j = 0; j < ParameterManager.COTDispenseNozzleStrs.Length; j++) { if (ParameterManager.COTDispenseNozzleStrs[j] != "") { dispenseConfigList.Add(ParameterManager.COTDispenseNozzleStrs[j], new DispenseConfig(dictDispense[ParameterManager.COTDispenseNozzleStrs[j]])); } } break; case "DEV": for (int j = 0; j < ParameterManager.DEVDispenseNozzleStrs.Length; j++) { if (ParameterManager.DEVDispenseNozzleStrs[j] != "") { dispenseConfigList.Add(ParameterManager.DEVDispenseNozzleStrs[j], new DispenseConfig(dictDispense[ParameterManager.DEVDispenseNozzleStrs[j]])); } } break; case "ADH": for (int j = 0; j < ParameterManager.ADHDispenseNozzleStrs.Length; j++) { if (ParameterManager.ADHDispenseNozzleStrs[j] != "") { dispenseConfigList.Add(ParameterManager.ADHDispenseNozzleStrs[j], new DispenseConfig(dictDispense[ParameterManager.ADHDispenseNozzleStrs[j]])); } } break; default: break; } } if (strFileDispense == null || strFileDispense == "" || dispenseConfigList.Count == 0) { switch (noduleName) { case "COT": for (int j = 0; j < ParameterManager.COTDispenseNozzleStrs.Length; j++) { if (ParameterManager.COTDispenseNozzleStrs[j] != "") { dispenseConfigList.Add(ParameterManager.COTDispenseNozzleStrs[j], new DispenseConfig()); } } break; case "DEV": for (int j = 0; j < ParameterManager.DEVDispenseNozzleStrs.Length; j++) { if (ParameterManager.DEVDispenseNozzleStrs[j] != "") { dispenseConfigList.Add(ParameterManager.DEVDispenseNozzleStrs[j], new DispenseConfig()); } } break; case "ADH": for (int j = 0; j < ParameterManager.ADHDispenseNozzleStrs.Length; j++) { if (ParameterManager.ADHDispenseNozzleStrs[j] != "") { dispenseConfigList.Add(ParameterManager.ADHDispenseNozzleStrs[j], new DispenseConfig()); } } break; default: break; } } return dispenseConfigList; } protected Dictionary> _fieldMap = new Dictionary>(); public SCValue() { } public List GetKeys() { return _fieldMap.Keys.ToList(); } public void AddKey(string key) { PropertyInfo[] property = typeof(SCValue).GetProperties(); foreach (PropertyInfo fiGroup in property) { object objGroup = fiGroup.GetValue(this, null); foreach (PropertyInfo fiItem in objGroup.GetType().GetProperties()) { string name = String.Format("{0}_{1}", fiGroup.Name, fiItem.Name); if (key == name) { _fieldMap[name] = Tuple.Create(objGroup, fiItem); return; } } } } public virtual void SetKeys() { } public void SetKeys(Type type, string prefix, object objParent) { Dictionary items = new Dictionary(); PropertyInfo[] property = type.GetProperties(); foreach (PropertyInfo fiGroup in property) { var ttt = fiGroup.PropertyType; object obj = null; if (objParent != null) obj = fiGroup.GetValue(objParent, null); if (ttt != typeof(double) && ttt != typeof(string) && ttt != typeof(bool) && ttt != typeof(int)) { string fiGroupName = fiGroup.Name; SetKeys(ttt, prefix + fiGroupName + "_", obj); continue; } string name = $"{prefix}{fiGroup.Name}".Replace("_", "."); if (_fieldMap.Keys.Contains(name)) { _fieldMap[name] = Tuple.Create(objParent, fiGroup); } else { _fieldMap.Add(name, Tuple.Create(objParent, fiGroup)); } } } public virtual Dictionary GetScValue(string type, string filter) { Dictionary result = new Dictionary(); foreach (var tuple in _fieldMap) { if (tuple.Key.Contains(filter)) { result.Add(tuple.Key, tuple.Value.Item2.GetValue(tuple.Value.Item1).ToString()); } } return result; } public virtual void SetParameterValue(MECF.Framework.Common.Utilities.Parameter parameter) { } public void RetrieveAll() { SetKeys(); } public void Update(Dictionary result) { if (result == null) return; foreach (KeyValuePair item in result) { if (_fieldMap.ContainsKey(item.Key)) { Update(item.Key, item.Value.ToString()); //_fieldMap[item.Key].Item2.SetValue(_fieldMap[item.Key].Item1, item.Value, null); } } } public void Update(string key, string value) { if (!_fieldMap.ContainsKey(key)) return; if (_fieldMap[key].Item1 == null) return; try { if (_fieldMap[key].Item2.PropertyType == typeof(double)) { _fieldMap[key].Item2.SetValue(_fieldMap[key].Item1, Convert.ToDouble(value)); } else if (_fieldMap[key].Item2.PropertyType == typeof(int)) { _fieldMap[key].Item2.SetValue(_fieldMap[key].Item1, Convert.ToInt32(value)); } else if (_fieldMap[key].Item2.PropertyType == typeof(string)) { _fieldMap[key].Item2.SetValue(_fieldMap[key].Item1, value); } else if (_fieldMap[key].Item2.PropertyType == typeof(bool)) { _fieldMap[key].Item2.SetValue(_fieldMap[key].Item1, Convert.ToBoolean(value)); } } catch (Exception ex) { } } public Dictionary GetValue() { Dictionary result = new Dictionary(); foreach (var item in _fieldMap) { result[item.Key] = item.Value.Item2.GetValue(item.Value.Item1, null); } return result; } public class CSB : INode { public ArmPosition AccessHomePosition { get; set; } = new ArmPosition(); public ArmPosition WaferCheckPosition { get; set; } = new ArmPosition(); public ArmModule Module0 { get; set; } = new ArmModule(); public UNCModule Module1 { get; set; } = new UNCModule(); public UNCModule Module2 { get; set; } = new UNCModule(); public UNCModule Module3 { get; set; } = new UNCModule(); public UNCModule Module4 { get; set; } = new UNCModule(); public UNCModule Module5 { get; set; } = new UNCModule(); } public class ArmPosition { public int X1 { get; set; } public int X2 { get; set; } public int X3 { get; set; } public void SetParameterValue(MECF.Framework.Common.Utilities.ArmPosition armPosition) { armPosition.X1 = X1; armPosition.X2 = X2; armPosition.X3 = X3; } } public class PRB1 : INode { public ArmPosition AccessHomePosition { get; set; } = new ArmPosition(); public ArmPosition WaferCheckPosition { get; set; } = new ArmPosition(); public ArmModule Module0 { get; set; } = new ArmModule(); public COTAndDEVMoudle Module1 { get; set; } = new COTAndDEVMoudle(); public COTAndDEVMoudle Module2 { get; set; } = new COTAndDEVMoudle(); public COTAndDEVMoudle Module3 { get; set; } = new COTAndDEVMoudle(); public COTAndDEVMoudle Module4 { get; set; } = new COTAndDEVMoudle(); public CPLOrADHModule Module5 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module6 { get; set; } = new CPLOrADHModule(); public LinkCPLOrADHModule Module7 { get; set; } = new LinkCPLOrADHModule(); public LinkCPLOrADHModule Module8 { get; set; } = new LinkCPLOrADHModule(); public CPLOrADHModule Module9 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module10 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module11 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module12 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module13 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module14 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module15 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module16 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module17 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module18 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module19 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module20 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module21 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module22 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module23 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module24 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module25 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module26 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module27 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module28 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module29 { get; set; } = new CPLOrADHModule(); } public class PRB2 : INode { public ArmPosition AccessHomePosition { get; set; } = new ArmPosition(); public ArmPosition WaferCheckPosition { get; set; } = new ArmPosition(); public ArmModule Module0 { get; set; } = new ArmModule(); public COTAndDEVMoudle Module1 { get; set; } = new COTAndDEVMoudle(); public COTAndDEVMoudle Module2 { get; set; } = new COTAndDEVMoudle(); public COTAndDEVMoudle Module3 { get; set; } = new COTAndDEVMoudle(); public COTAndDEVMoudle Module4 { get; set; } = new COTAndDEVMoudle(); public CPLOrADHModule Module5 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module6 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module7 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module8 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module9 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module10 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module11 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module12 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module13 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module14 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module15 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module16 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module17 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module18 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module19 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module20 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module21 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module22 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module23 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module24 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module25 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module26 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module27 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module28 { get; set; } = new CPLOrADHModule(); public CPLOrADHModule Module29 { get; set; } = new CPLOrADHModule(); } public class IFB : INode { public ArmPosition AccessHomePosition { get; set; } = new ArmPosition(); public ArmPosition WaferCheckPosition { get; set; } = new ArmPosition(); public ArmModule Module0 { get; set; } = new ArmModule(); public IFBMoudle Module1 { get; set; } = new IFBMoudle(); public IFBMoudle Module2 { get; set; } = new IFBMoudle(); public IFBMoudle Module3 { get; set; } = new IFBMoudle(); public IFBMoudle Module4 { get; set; } = new IFBMoudle(); public IFBMoudle Module5 { get; set; } = new IFBMoudle(); } public class ArmModule : ModuleBase, INode { public string TransferArm { get; set; } public ArmAxis X1axis { get; set; } = new ArmAxis(); public ArmAxis X2axis { get; set; } = new ArmAxis(); public ArmAxis X3axis { get; set; } = new ArmAxis(); public ArmAxis Yaxis { get; set; } = new ArmAxis(); public ArmAxis Zaxis { get; set; } = new ArmAxis(); public ArmAxis Raxis { get; set; } = new ArmAxis(); public override void SetParameterValue(DeviceModule deviceModule) { base.SetParameterValue(deviceModule); deviceModule.ArmAxisList.Clear(); deviceModule.ArmAxisList.Add(X1axis.ChangedArmAxis()); deviceModule.ArmAxisList.Add(X2axis.ChangedArmAxis()); deviceModule.ArmAxisList.Add(X3axis.ChangedArmAxis()); deviceModule.ArmAxisList.Add(Yaxis.ChangedArmAxis()); deviceModule.ArmAxisList.Add(Zaxis.ChangedArmAxis()); deviceModule.ArmAxisList.Add(Raxis.ChangedArmAxis()); } } public class UNCModule : ModuleBase, INode { public string MappingType { get; set; } public int WaferThickness { get; set; } public int PositiveTolerance { get; set; } public int NegativeTolerance { get; set; } public int FirstSlotposition { get; set; } public string SlotEditingType { get; set; } public int SlotPitch { get; set; } public int MappingStartPosition { get; set; } public int MappingEndPosition { get; set; } public int SlotNo { get; set; } public TransferArmPosition TransferArmPosition { get; set; } = new TransferArmPosition(); public override void SetParameterValue(DeviceModule deviceModule) { base.SetParameterValue(deviceModule); deviceModule.MappingType.CurrentValue = MappingType; deviceModule.WaferThickness = WaferThickness; deviceModule.PositiveTolerance = PositiveTolerance; deviceModule.NegativeTolerance = NegativeTolerance; deviceModule.FirstSlotposition = FirstSlotposition; deviceModule.SlotEditingType.CurrentValue = SlotEditingType; deviceModule.SlotPitch = SlotPitch; deviceModule.MappingStartPosition = MappingStartPosition; deviceModule.MappingEndPosition = MappingEndPosition; deviceModule.SlotNo = SlotNo; deviceModule.ParameterTransferArmPosition = TransferArmPosition.ChangedTransferArmPosition(); } } public class CPLOrADHModule : ModuleBase, INode { public string ControlForm { get; set; } public double InitialData { get; set; } public double OverTemp { get; set; } public double SettlingDetermineTime { get; set; } public double SettlingTimeOut { get; set; } public double UsePointOffset { get; set; } public string BandStartMonitorForm { get; set; } public string BandInvalidTime { get; set; } public string BandProcessMonitorForm { get; set; } public string BandDeterminationTime { get; set; } public string BandProcessValue { get; set; } public string BandProcessPIDSetFormat { get; set; } public string BandProcessPIDP { get; set; } public string BandProcessPIDI { get; set; } public string BandProcessPIDD { get; set; } public string BandProcessOffset { get; set; } public string BandProcessOffsetValue { get; set; } public string AConstant { get; set; } public string SetValue { get; set; } public string RangeValueMin { get; set; } public string RangeValueMax { get; set; } public string DispenseConfig { get; set; } public TransferArmPosition TransferArmPosition { get; set; } = new TransferArmPosition(); public override void SetParameterValue(DeviceModule deviceModule) { base.SetParameterValue(deviceModule); deviceModule.ParameterTransferArmPosition = TransferArmPosition.ChangedTransferArmPosition(); } } public class LinkCPLOrADHModule : CPLOrADHModule, INode { public TransferArmPosition LinkTransferArmPosition { get; set; } = new TransferArmPosition(); public override void SetParameterValue(DeviceModule deviceModule) { base.SetParameterValue(deviceModule); deviceModule.ParameterTransferArmPosition = TransferArmPosition.ChangedTransferArmPosition(); deviceModule.LinkParameterTransferArmPosition = LinkTransferArmPosition.ChangedTransferArmPosition(); } } public class COTAndDEVMoudle : ModuleBase { public int ArmCount { get; set; } public int ShakeArmNo { get; set; } public int UpperLimitSpinSpeed { get; set; } public int UpperLimitAcceleration { get; set; } public int SpinOutSpeed { get; set; } public double SpinOutTime { get; set; } public NozzleChanger NozzleChanger { get; set; } = new NozzleChanger(); public NozzleArmInformat NozzleArmInformat1 { get; set; } = new NozzleArmInformat(); public NozzleArmInformat NozzleArmInformat2 { get; set; } = new NozzleArmInformat(); public TransferArmPosition TransferArmPosition { get; set; } = new TransferArmPosition(); public string DispenseConfig { get; set; } public override void SetParameterValue(DeviceModule deviceModule) { base.SetParameterValue(deviceModule); SpinerModule spinerModule = new SpinerModule() { ArmCount = this.ArmCount.ToString(), ShakeArmNo = this.ShakeArmNo.ToString(), UpperLimitSpinSpeed = this.UpperLimitSpinSpeed.ToString(), UpperLimitAcceleration = this.UpperLimitAcceleration.ToString(), SpinOutSpeed = this.SpinOutSpeed.ToString(), SpinOutTime = this.SpinOutTime.ToString(), NozzleChanger = this.NozzleChanger.ChangedNozzleChanger(), NozzleArmInformat1 = this.NozzleArmInformat1.ChangedNozzleArmInformat(), NozzleArmInformat2 = this.NozzleArmInformat2.ChangedNozzleArmInformat(), }; deviceModule.ParameterTransferArmPosition = TransferArmPosition.ChangedTransferArmPosition(); deviceModule.ModuleSpiner = spinerModule; } } public class IFBMoudle : ModuleBase { public TransferArmPosition TransferArmPosition { get; set; } = new TransferArmPosition(); public override void SetParameterValue(DeviceModule deviceModule) { base.SetParameterValue(deviceModule); deviceModule.ParameterTransferArmPosition = TransferArmPosition.ChangedTransferArmPosition(); } } public class NozzleChanger : INode { public string IsNozzleChangerEnable { get; set; } public double MotorPulseRate { get; set; } public int MaxSpeed { get; set; } public int MoveSpeed { get; set; } public string Data { get; set; } public MECF.Framework.Common.Utilities.NozzleChanger ChangedNozzleChanger() { var nozzleChanger = new MECF.Framework.Common.Utilities.NozzleChanger() { IsNozzleChangerEnable = IsNozzleChangerEnable, MotorPulseRate = this.MotorPulseRate.ToString(), MaxSpeed = this.MaxSpeed.ToString(), MoveSpeed = this.MoveSpeed.ToString(), }; nozzleChanger.SetNozzleChangerDataList(this.Data); return nozzleChanger; } } public class NozzleArmInformat : INode { public string IsNozzleArmEnable { get; set; } public string ArmDriveFormat { get; set; } public string NozzleForm { get; set; } public double MotorPulsesRate { get; set; } public double StartPosition { get; set; } public double EndPosition { get; set; } public double StartCupPosition { get; set; } public double EndCupPosition { get; set; } public double MaintenaceSpeed { get; set; } public string Home { get; set; } public string DmyDisp { get; set; } public string Standby { get; set; } public string Maintenace1 { get; set; } public string Maintenace2 { get; set; } public string Maintenace3 { get; set; } public string Begin { get; set; } public string Center { get; set; } public string Center2 { get; set; } public string End { get; set; } public string Dispense1 { get; set; } public string Dispense2 { get; set; } public string Dispense3 { get; set; } public string Dispense4 { get; set; } public string Dispense5 { get; set; } public MECF.Framework.Common.Utilities.NozzleArmInformat ChangedNozzleArmInformat() { var nozzleArmInformat = new MECF.Framework.Common.Utilities.NozzleArmInformat() { IsNozzleArmEnable = this.IsNozzleArmEnable, ArmDriveFormat = this.ArmDriveFormat, NozzleForm = this.NozzleForm, MotorPulsesRate = this.MotorPulsesRate.ToString(), StartPosition = this.StartPosition.ToString("f2"), EndPosition = this.EndPosition.ToString("f2"), StartCupPosition = this.StartCupPosition.ToString("f2"), EndCupPosition = this.EndCupPosition.ToString("f2"), MaintenaceSpeed = this.MaintenaceSpeed.ToString("f2"), Home = new TransferArmRecipePositionData(this.Home), DmyDisp = new TransferArmRecipePositionData(this.DmyDisp), Standby = new TransferArmRecipePositionData(this.Standby), Maintenace1 = new TransferArmRecipePositionData(this.Maintenace1), Maintenace2 = new TransferArmRecipePositionData(this.Maintenace2), Maintenace3 = new TransferArmRecipePositionData(this.Maintenace3), Begin = new TransferArmRecipePositionData(this.Begin), Center = new TransferArmRecipePositionData(this.Center), Center2 = new TransferArmRecipePositionData(this.Center2), End = new TransferArmRecipePositionData(this.End), Dispense1 = new TransferArmRecipePositionData(this.Dispense1), Dispense2 = new TransferArmRecipePositionData(this.Dispense2), Dispense3 = new TransferArmRecipePositionData(this.Dispense3), Dispense4 = new TransferArmRecipePositionData(this.Dispense4), Dispense5 = new TransferArmRecipePositionData(this.Dispense5), }; return nozzleArmInformat; } } public class TransferArmPosition : INode { public Zaxis Zaxis { get; set; } = new Zaxis(); public Pincette pincette1 { get; set; } = new Pincette(); public Pincette pincette2 { get; set; } = new Pincette(); public Pincette pincette3 { get; set; } = new Pincette(); public MECF.Framework.Common.Utilities.TransferArmPosition ChangedTransferArmPosition() { return new MECF.Framework.Common.Utilities.TransferArmPosition() { EndOffset = Zaxis.EndOffset, SlowSpeedRate = Zaxis.SlowSpeedRate, StartOffset = Zaxis.StartOffset, TransferMode = Zaxis.TransferMode, PincetteList = new Dictionary { { "pincette1", pincette1.ChangedPincette() }, { "pincette2", pincette2.ChangedPincette() }, { "pincette3", pincette3.ChangedPincette() }} }; } } public class Zaxis : INode { public string TransferMode { get; set; } public double StartOffset { get; set; } public double EndOffset { get; set; } public int SlowSpeedRate { get; set; } } public class Pincette : INode { public double XaxisReceive { get; set; } public double XaxisSend { get; set; } public double YaxisReceive { get; set; } public double YaxisSend { get; set; } public double ZaxisReceive { get; set; } public double ZaxisSend { get; set; } public double RaxisReceive { get; set; } public double RaxisSend { get; set; } public double StrokeZaxisReceive { get; set; } public double StrokeZaxisSend { get; set; } public int ZaxisReceivePer { get; set; } public int ZaxisSendPer { get; set; } public MECF.Framework.Common.Utilities.Pincette ChangedPincette() { return new MECF.Framework.Common.Utilities.Pincette() { XaxisReceive = this.XaxisReceive, XaxisSend = this.XaxisSend, YaxisReceive = this.YaxisReceive, YaxisSend = this.YaxisSend, ZaxisReceive = this.ZaxisReceive, ZaxisSend = this.ZaxisSend, RaxisReceive = this.RaxisReceive, RaxisSend = this.RaxisSend, StrokeZaxisReceive = this.StrokeZaxisReceive, StrokeZaxisSend = this.StrokeZaxisSend, ZaxisReceivePer = this.ZaxisReceivePer, ZaxisSendPer = this.ZaxisSendPer }; } } public class ModuleBase : INode { public string Name { get; set; } public string SYNEXC { get; set; } public int MaterialCount { get; set; } public int StartSlot { get; set; } public string AGVConnect { get; set; } public virtual void SetParameterValue(DeviceModule deviceModule) { deviceModule.Name = Name; deviceModule.SYNEXC.CurrentValue = SYNEXC; if (deviceModule.ID.Split('-')[0] == "2") { deviceModule.MaterialCount = 1; } else { deviceModule.MaterialCount = MaterialCount; } deviceModule.StartSlot = StartSlot; deviceModule.AGVConnect.CurrentValue = AGVConnect; } } public class ArmAxis : INode { public int SpeedInitial { get; set; } public int SpeedMovementbetweenmod { get; set; } public int SpeedReceive { get; set; } public int SpeedSend { get; set; } public int SpeedMapping { get; set; } public int SpeedMaintenance { get; set; } public int SpeedInching { get; set; } public string MultiMovementbetweenmod { get; set; } public int PassMovementbetweenmod { get; set; } public int PassReceive { get; set; } public int PassSpeedSend { get; set; } public int PassSpeedMapping { get; set; } public MECF.Framework.Common.Utilities.ArmAxis ChangedArmAxis() { return new MECF.Framework.Common.Utilities.ArmAxis() { SpeedInitial = this.SpeedInitial, SpeedMovementbetweenmod = this.SpeedMovementbetweenmod, SpeedReceive = this.SpeedReceive, SpeedSend = this.SpeedSend, SpeedMapping = this.SpeedMapping, SpeedMaintenance = this.SpeedMaintenance, SpeedInching = this.SpeedInching, MultiMovementbetweenmod = this.MultiMovementbetweenmod, PassMovementbetweenmod = this.PassMovementbetweenmod, PassReceive = this.PassReceive, PassSpeedSend = this.PassSpeedSend, PassSpeedMapping = this.PassSpeedMapping }; } } public class TransferConfigValue : INode { public double InitAllTimeout { get; set; } public double MotorPushBarInAcceleration { get; set; } public double MotorPushBarInDeceleration { get; set; } public double MotorPushBarInStartFrequency { get; set; } public double MotorPushBarInDefaultServoSpeed { get; set; } public double MotorPushBarInDefaultManualSpeed { get; set; } public double MotorPushBarInServoOnTimeout { get; set; } public double MotorPushBarInMoveTimeout { get; set; } public double MotorPushBarInStopTimeout { get; set; } public double MotorPushBarInResetAlarmTimeout { get; set; } public double MotorPushBarInHomeTimeout { get; set; } public double MotorLoadStationInAcceleration { get; set; } public double MotorLoadStationInDeceleration { get; set; } public double MotorLoadStationInStartFrequency { get; set; } public double MotorLoadStationInDefaultServoSpeed { get; set; } public double MotorLoadStationInDefaultManualSpeed { get; set; } public double MotorLoadStationInServoOnTimeout { get; set; } public double MotorLoadStationInMoveTimeout { get; set; } public double MotorLoadStationInStopTimeout { get; set; } public double MotorLoadStationInResetAlarmTimeout { get; set; } public double MotorLoadStationInHomeTimeout { get; set; } public double MotorPushBarChamberAcceleration { get; set; } public double MotorPushBarChamberDeceleration { get; set; } public double MotorPushBarChamberStartFrequency { get; set; } public double MotorPushBarChamberDefaultServoSpeed { get; set; } public double MotorPushBarChamberDefaultManualSpeed { get; set; } public double MotorPushBarChamberServoOnTimeout { get; set; } public double MotorPushBarChamberMoveTimeout { get; set; } public double MotorPushBarChamberStopTimeout { get; set; } public double MotorPushBarChamberResetAlarmTimeout { get; set; } public double MotorPushBarChamberHomeTimeout { get; set; } public double MotorLoadStationOutAcceleration { get; set; } public double MotorLoadStationOutDeceleration { get; set; } public double MotorLoadStationOutStartFrequency { get; set; } public double MotorLoadStationOutDefaultServoSpeed { get; set; } public double MotorLoadStationOutDefaultManualSpeed { get; set; } public double MotorLoadStationOutServoOnTimeout { get; set; } public double MotorLoadStationOutMoveTimeout { get; set; } public double MotorLoadStationOutStopTimeout { get; set; } public double MotorLoadStationOutResetAlarmTimeout { get; set; } public double MotorLoadStationOutHomeTimeout { get; set; } } } }