Ready to test
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -1,419 +0,0 @@
|
||||
using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Adaptation.Shared.Metrology
|
||||
{
|
||||
|
||||
public class ConfigDataBase
|
||||
{
|
||||
|
||||
public bool UseCyclicalForDescription { get; protected set; }
|
||||
public Dictionary<string, string> CellNames { get; protected set; }
|
||||
public Dictionary<string, string> MesEntities { get; protected set; }
|
||||
public IProcessDataDescription ProcessDataDescription { get; protected set; }
|
||||
|
||||
public bool IsEvent { get; private set; }
|
||||
public bool EafHosted { get; private set; }
|
||||
public string CellName { get; private set; }
|
||||
public bool IsSourceTimer { get; private set; }
|
||||
public EquipmentType EquipmentType => _EquipmentType;
|
||||
public string EquipmentElementName { get; private set; }
|
||||
public bool IsDatabaseExportToIPDSF { get; private set; }
|
||||
public EquipmentType? EquipmentConnection => _EquipmentConnection;
|
||||
public FileConnectorConfiguration FileConnectorConfiguration { get; private set; }
|
||||
|
||||
protected readonly EventName _EventName;
|
||||
protected readonly EquipmentType _EquipmentType;
|
||||
protected readonly EquipmentType? _EquipmentConnection;
|
||||
protected readonly Dictionary<string, string> _Reactors;
|
||||
|
||||
public ConfigDataBase(string cellName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, bool isEAFHosted)
|
||||
{
|
||||
CellName = cellName;
|
||||
EafHosted = isEAFHosted;
|
||||
EquipmentType equipmentTypeValue;
|
||||
_Reactors = new Dictionary<string, string>();
|
||||
CellNames = new Dictionary<string, string>();
|
||||
MesEntities = new Dictionary<string, string>();
|
||||
EquipmentElementName = cellInstanceConnectionName;
|
||||
FileConnectorConfiguration = fileConnectorConfiguration;
|
||||
string[] segments = parameterizedModelObjectDefinitionType.Split('.');
|
||||
IsSourceTimer = (fileConnectorConfiguration.SourceFileFilter.StartsWith("*Timer.txt"));
|
||||
string cellInstanceConnectionNameBase = cellInstanceConnectionName.Replace("-", string.Empty);
|
||||
IsDatabaseExportToIPDSF = (fileConnectorConfiguration.SourceFileLocation.Contains("DatabaseExport"));
|
||||
if (!Enum.TryParse(segments[segments.Length - 1], out EventName eventNameValue))
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
if (!Enum.TryParse(cellInstanceConnectionNameBase, out equipmentTypeValue))
|
||||
_EquipmentConnection = null;
|
||||
else
|
||||
_EquipmentConnection = equipmentTypeValue;
|
||||
string suffix;
|
||||
switch (eventNameValue)
|
||||
{
|
||||
case EventName.FileRead:
|
||||
suffix = string.Empty;
|
||||
break;
|
||||
case EventName.FileReadDaily:
|
||||
suffix = "_Daily";
|
||||
break;
|
||||
case EventName.FileReadWeekly:
|
||||
suffix = "_Weekly";
|
||||
break;
|
||||
case EventName.FileReadMonthly:
|
||||
suffix = "_Monthly";
|
||||
break;
|
||||
case EventName.FileReadVerification:
|
||||
suffix = "_Verification";
|
||||
break;
|
||||
default:
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
}
|
||||
string parameterizedModelObjectDefinitionTypeAppended = string.Concat(segments[0], suffix);
|
||||
IsEvent = cellInstanceConnectionNameBase != parameterizedModelObjectDefinitionTypeAppended;
|
||||
_EventName = eventNameValue;
|
||||
if (!Enum.TryParse(parameterizedModelObjectDefinitionTypeAppended, out equipmentTypeValue))
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
_EquipmentType = equipmentTypeValue;
|
||||
if (!isEAFHosted && equipmentTypeName != parameterizedModelObjectDefinitionTypeAppended)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
}
|
||||
|
||||
public string GetEventName()
|
||||
{
|
||||
string result = _EventName.ToString();
|
||||
return result;
|
||||
}
|
||||
|
||||
public EventName GetEventNameValue()
|
||||
{
|
||||
EventName result = _EventName;
|
||||
return result;
|
||||
}
|
||||
|
||||
public string GetEquipmentType()
|
||||
{
|
||||
string result;
|
||||
if (_EquipmentConnection is null)
|
||||
result = _EquipmentType.ToString();
|
||||
else
|
||||
result = _EquipmentConnection.Value.ToString();
|
||||
return result;
|
||||
}
|
||||
|
||||
public string GetEventDescription()
|
||||
{
|
||||
string result = ProcessDataDescription.GetEventDescription();
|
||||
return result;
|
||||
}
|
||||
|
||||
public IProcessDataDescription GetDefault(ILogic logic)
|
||||
{
|
||||
IProcessDataDescription result = ProcessDataDescription.GetDefault(logic, this);
|
||||
return result;
|
||||
}
|
||||
|
||||
public IProcessDataDescription GetDisplayNames(ILogic logic)
|
||||
{
|
||||
IProcessDataDescription result = ProcessDataDescription.GetDisplayNames(logic, this);
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<string> GetDetailNames(ILogic logic)
|
||||
{
|
||||
List<string> results = ProcessDataDescription.GetDetailNames(logic, this);
|
||||
return results;
|
||||
}
|
||||
|
||||
public List<string> GetHeaderNames(ILogic logic)
|
||||
{
|
||||
List<string> results = ProcessDataDescription.GetHeaderNames(logic, this);
|
||||
return results;
|
||||
}
|
||||
|
||||
public List<string> GetNames(ILogic logic)
|
||||
{
|
||||
List<string> results = ProcessDataDescription.GetNames(logic, this);
|
||||
return results;
|
||||
}
|
||||
|
||||
public List<string> GetPairedParameterNames(ILogic logic)
|
||||
{
|
||||
List<string> results = ProcessDataDescription.GetPairedParameterNames(logic, this);
|
||||
return results;
|
||||
}
|
||||
|
||||
public List<string> GetParameterNames(ILogic logic)
|
||||
{
|
||||
List<string> results = ProcessDataDescription.GetParameterNames(logic, this);
|
||||
return results;
|
||||
}
|
||||
|
||||
public List<IProcessDataDescription> GetDescription(ILogic logic, List<Test> tests, IProcessData iProcessData)
|
||||
{
|
||||
List<IProcessDataDescription> results = ProcessDataDescription.GetDescription(logic, this, tests, iProcessData);
|
||||
return results;
|
||||
}
|
||||
|
||||
public string GetCurrentReactor(ILogic logic)
|
||||
{
|
||||
string result = string.Empty;
|
||||
foreach (KeyValuePair<string, string> keyValuePair in _Reactors)
|
||||
{
|
||||
foreach (string filePrefix in keyValuePair.Value.Split('|'))
|
||||
{
|
||||
if (logic.Logistics.MID.StartsWith(filePrefix) || (_EventName != EventName.FileRead && MesEntities.ContainsKey(logic.Logistics.JobID) && keyValuePair.Value == MesEntities[logic.Logistics.JobID]))
|
||||
{
|
||||
result = keyValuePair.Key;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (string.IsNullOrEmpty(result) && _Reactors.Count == 1)
|
||||
result = _Reactors.ElementAt(0).Key;
|
||||
return result;
|
||||
}
|
||||
|
||||
protected JsonElement GetDefaultJsonElement(ILogic logic)
|
||||
{
|
||||
JsonElement result;
|
||||
IProcessDataDescription processDataDescription = ProcessDataDescription.GetDefault(logic, this);
|
||||
string json = JsonSerializer.Serialize(processDataDescription, processDataDescription.GetType());
|
||||
object @object = JsonSerializer.Deserialize<object>(json);
|
||||
result = (JsonElement)@object;
|
||||
return result;
|
||||
}
|
||||
|
||||
public Dictionary<string, List<Tuple<Enum, string, string, object>>> GetParameterInfo(ILogic logic, bool allowNull)
|
||||
{
|
||||
Dictionary<string, List<Tuple<Enum, string, string, object>>> results = new Dictionary<string, List<Tuple<Enum, string, string, object>>>();
|
||||
string description;
|
||||
Enum param;
|
||||
Tuple<Enum, string, string, object> tuple;
|
||||
JsonElement defaultJsonElement = GetDefaultJsonElement(logic);
|
||||
Dictionary<string, string> keyValuePairs = GetDisplayNamesJsonElement(logic);
|
||||
foreach (JsonProperty jsonProperty in defaultJsonElement.EnumerateObject())
|
||||
{
|
||||
if (jsonProperty.Value.ValueKind == JsonValueKind.Null && !allowNull)
|
||||
throw new Exception();
|
||||
if (jsonProperty.Value.ValueKind == JsonValueKind.Object || jsonProperty.Value.ValueKind == JsonValueKind.Array)
|
||||
{
|
||||
description = string.Empty;
|
||||
param = Description.Param.StructuredType;
|
||||
//jValue = jObject.Value<JValue>("Item1");
|
||||
throw new NotImplementedException("Item1");
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (jsonProperty.Value.ValueKind)
|
||||
{
|
||||
case JsonValueKind.String:
|
||||
param = Description.Param.String;
|
||||
break;
|
||||
case JsonValueKind.Number:
|
||||
param = Description.Param.Double;
|
||||
break;
|
||||
case JsonValueKind.True:
|
||||
case JsonValueKind.False:
|
||||
param = Description.Param.Boolean;
|
||||
break;
|
||||
case JsonValueKind.Null:
|
||||
param = Description.Param.String;
|
||||
break;
|
||||
default:
|
||||
param = Description.Param.StructuredType;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!keyValuePairs.ContainsKey(jsonProperty.Name))
|
||||
description = string.Empty;
|
||||
else
|
||||
description = keyValuePairs[jsonProperty.Name];
|
||||
tuple = new Tuple<Enum, string, string, object>(param, jsonProperty.Name, description, jsonProperty.Value.ToString());
|
||||
if (!results.ContainsKey(jsonProperty.Name))
|
||||
results.Add(jsonProperty.Name, new List<Tuple<Enum, string, string, object>>());
|
||||
results[jsonProperty.Name].Add(tuple);
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
protected void WriteExportAliases(ILogic logic, string cellName, string equipmentElementName)
|
||||
{
|
||||
int i = 0;
|
||||
Enum param;
|
||||
object value;
|
||||
Enum[] @params;
|
||||
string description;
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
string shareRoot = @"\\messv02ecc1.ec.local\EC_EDA";
|
||||
string shareDirectory = string.Concat(shareRoot, @"\Staging\Pdsf\", cellName, @"\ExportAliases\", equipmentElementName);
|
||||
Dictionary<string, List<Tuple<Enum, string, string, object>>> keyValuePairs;
|
||||
if (!(logic is null))
|
||||
keyValuePairs = GetParameterInfo(logic, allowNull: false);
|
||||
else
|
||||
keyValuePairs = new Dictionary<string, List<Tuple<Enum, string, string, object>>>();
|
||||
stringBuilder.AppendLine("\"AliasName\";\"Condition\";\"EventId\";\"ExceptionId\";\"Formula\";\"HardwareId\";\"OrderId\";\"ParameterName\";\"Remark\";\"ReportName\";\"SourceId\";\"Use\"");
|
||||
if (!Directory.Exists(shareRoot))
|
||||
return;
|
||||
if (!Directory.Exists(shareDirectory))
|
||||
Directory.CreateDirectory(shareDirectory);
|
||||
string shareFile = string.Concat(shareDirectory, @"\", DateTime.Now.Ticks, ".csv");
|
||||
foreach (KeyValuePair<string, List<Tuple<Enum, string, string, object>>> keyValuePair in keyValuePairs)
|
||||
{
|
||||
i += 1;
|
||||
@params = (from l in keyValuePair.Value select l.Item1).Distinct().ToArray();
|
||||
if (@params.Length != 1)
|
||||
throw new Exception();
|
||||
if (keyValuePair.Value[0].Item2 != keyValuePair.Key)
|
||||
throw new Exception();
|
||||
param = @params[0];
|
||||
if (!(param is Description.Param.String))
|
||||
stringBuilder.AppendLine($"\"{keyValuePair.Key}\";\"\";\"\";\"\";\"\";\"\";\"{i}\";\"{cellName}/{EquipmentElementName}/{keyValuePair.Key}\";\"\";\"{cellName}/{EquipmentElementName}/{_EventName}\";\"\";\"True\"");
|
||||
else
|
||||
{
|
||||
description = keyValuePair.Value[0].Item3.Split('|')[0];
|
||||
if (string.IsNullOrEmpty(description))
|
||||
continue;
|
||||
value = keyValuePair.Value[0].Item4;
|
||||
stringBuilder.AppendLine($"\"'{description}'\";\"\";\"\";\"\";\"\";\"\";\"{i}\";\"{cellName}/{EquipmentElementName}/{value}\";\"\";\"{cellName}/{EquipmentElementName}/{_EventName}\";\"\";\"True\"");
|
||||
}
|
||||
}
|
||||
if (keyValuePairs.Any())
|
||||
File.WriteAllText(shareFile, stringBuilder.ToString());
|
||||
}
|
||||
|
||||
public Dictionary<string, string> GetDisplayNamesJsonElement(ILogic logic)
|
||||
{
|
||||
Dictionary<string, string> results = new Dictionary<string, string>();
|
||||
IProcessDataDescription processDataDescription = ProcessDataDescription.GetDisplayNames(logic, this);
|
||||
string json = JsonSerializer.Serialize(processDataDescription, processDataDescription.GetType());
|
||||
JsonElement jsonElement = JsonSerializer.Deserialize<JsonElement>(json);
|
||||
foreach (JsonProperty jsonProperty in jsonElement.EnumerateObject())
|
||||
{
|
||||
if (!results.ContainsKey(jsonProperty.Name))
|
||||
results.Add(jsonProperty.Name, string.Empty);
|
||||
if (jsonProperty.Value is JsonElement jsonPropertyValue)
|
||||
results[jsonProperty.Name] = jsonPropertyValue.ToString();
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
public List<string> GetIgnoreParameterNames(ILogic logic, Test test, bool includePairedParameterNames)
|
||||
{
|
||||
List<string> results = ProcessDataDescription.GetIgnoreParameterNames(logic, this, test);
|
||||
if (includePairedParameterNames)
|
||||
{
|
||||
string value;
|
||||
List<string> pairedParameterNames = ProcessDataDescription.GetPairedParameterNames(logic, this);
|
||||
IProcessDataDescription processDataDescription = ProcessDataDescription.GetDisplayNames(logic, this);
|
||||
string json = JsonSerializer.Serialize(processDataDescription, processDataDescription.GetType());
|
||||
object @object = JsonSerializer.Deserialize<object>(json);
|
||||
if (!(@object is JsonElement jsonElement))
|
||||
throw new Exception();
|
||||
foreach (JsonProperty jsonProperty in jsonElement.EnumerateObject())
|
||||
{
|
||||
if (jsonProperty.Value.ValueKind == JsonValueKind.Object || jsonProperty.Value.ValueKind == JsonValueKind.Array)
|
||||
throw new Exception();
|
||||
value = jsonProperty.Value.ToString();
|
||||
if (!results.Contains(jsonProperty.Name) && pairedParameterNames.Contains(jsonProperty.Name) && (string.IsNullOrEmpty(value) || value[0] == '|'))
|
||||
results.Add(jsonProperty.Name);
|
||||
}
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
public List<Duplicator.Description> GetProcessDataDescriptions(JsonElement jsonElement)
|
||||
{
|
||||
List<Duplicator.Description> results;
|
||||
if (jsonElement.ValueKind != JsonValueKind.Array)
|
||||
throw new Exception();
|
||||
JsonSerializerOptions jsonSerializerOptions = new JsonSerializerOptions { NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString };
|
||||
results = JsonSerializer.Deserialize<List<Duplicator.Description>>(jsonElement.ToString(), jsonSerializerOptions);
|
||||
return results;
|
||||
}
|
||||
|
||||
public Dictionary<Test, List<Duplicator.Description>> GetKeyValuePairs(List<Duplicator.Description> processDataDescriptions)
|
||||
{
|
||||
Dictionary<Test, List<Duplicator.Description>> results = new Dictionary<Test, List<Duplicator.Description>>();
|
||||
Test testKey;
|
||||
for (int i = 0; i < processDataDescriptions.Count; i++)
|
||||
{
|
||||
testKey = (Test)processDataDescriptions[i].Test;
|
||||
if (!results.ContainsKey(testKey))
|
||||
results.Add(testKey, new List<Duplicator.Description>());
|
||||
results[testKey].Add(processDataDescriptions[i]);
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
public Dictionary<string, List<string>> GetKeyValuePairs(JsonElement jsonElement, List<Duplicator.Description> processDataDescriptions, Test test)
|
||||
{
|
||||
Dictionary<string, List<string>> results = new Dictionary<string, List<string>>();
|
||||
Test testKey;
|
||||
if (jsonElement.ValueKind != JsonValueKind.Array)
|
||||
throw new Exception();
|
||||
JsonElement[] jsonElements = jsonElement.EnumerateArray().ToArray();
|
||||
if (processDataDescriptions.Count != jsonElements.Length)
|
||||
throw new Exception();
|
||||
for (int i = 0; i < processDataDescriptions.Count; i++)
|
||||
{
|
||||
testKey = (Test)processDataDescriptions[i].Test;
|
||||
if (testKey != test)
|
||||
continue;
|
||||
foreach (JsonProperty jsonProperty in jsonElements[i].EnumerateObject())
|
||||
{
|
||||
if (jsonProperty.Value.ValueKind == JsonValueKind.Object || jsonProperty.Value.ValueKind == JsonValueKind.Array)
|
||||
throw new Exception();
|
||||
if (!results.ContainsKey(jsonProperty.Name))
|
||||
results.Add(jsonProperty.Name, new List<string>());
|
||||
results[jsonProperty.Name].Add(jsonProperty.Value.ToString());
|
||||
}
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
protected void VerifyProcessDataDescription(ILogic logic)
|
||||
{
|
||||
string description;
|
||||
bool allowNull = false;
|
||||
JsonElement defaultJsonElement = GetDefaultJsonElement(logic);
|
||||
Dictionary<string, string> keyValuePairs = GetDisplayNamesJsonElement(logic);
|
||||
JsonProperty[] jsonProperties = defaultJsonElement.EnumerateObject().ToArray();
|
||||
foreach (JsonProperty jsonProperty in jsonProperties)
|
||||
{
|
||||
if (jsonProperty.Value.ValueKind == JsonValueKind.Null && !allowNull)
|
||||
throw new Exception();
|
||||
if (!(jsonProperty.Value.ValueKind is JsonValueKind.String) || !keyValuePairs.ContainsKey(jsonProperty.Name))
|
||||
description = string.Empty;
|
||||
else
|
||||
description = keyValuePairs[jsonProperty.Name].Split('|')[0];
|
||||
}
|
||||
}
|
||||
|
||||
public List<IProcessDataDescription> GetIProcessDataDescriptions(JsonElement jsonElement)
|
||||
{
|
||||
List<IProcessDataDescription> results = new List<IProcessDataDescription>();
|
||||
if (jsonElement.ValueKind != JsonValueKind.Array)
|
||||
throw new Exception();
|
||||
object @object;
|
||||
Type type = ProcessDataDescription.GetType();
|
||||
JsonElement[] jsonElements = jsonElement.EnumerateArray().ToArray();
|
||||
JsonSerializerOptions jsonSerializerOptions = new JsonSerializerOptions { NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString };
|
||||
for (int i = 0; i < jsonElements.Length; i++)
|
||||
{
|
||||
@object = JsonSerializer.Deserialize(jsonElements[i].ToString(), type, jsonSerializerOptions);
|
||||
if (!(@object is IProcessDataDescription processDataDescription))
|
||||
continue;
|
||||
results.Add(processDataDescription);
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
namespace Adaptation.Shared.Metrology
|
||||
{
|
||||
|
||||
public enum EventName
|
||||
{
|
||||
FileRead,
|
||||
FileReadDaily,
|
||||
FileReadMonthly,
|
||||
FileReadVerification,
|
||||
FileReadWeekly
|
||||
}
|
||||
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
using Adaptation.Eaf.Management.ConfigurationData.CellAutomation;
|
||||
using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Adaptation.Shared.Metrology
|
||||
{
|
||||
|
||||
public interface ILogic
|
||||
{
|
||||
|
||||
ILogic ShallowCopy();
|
||||
Logistics Logistics { get; }
|
||||
|
||||
void ConfigurationRestore();
|
||||
string GetConfigurationErrorTargetFileLocation();
|
||||
string GetConfigurationSourceFileLocation();
|
||||
string GetConfigurationTarget2FileLocation();
|
||||
string GetConfigurationTargetFileLocation();
|
||||
string GetConfigurationTargetFileName();
|
||||
Tuple<string, JsonElement?, List<FileInfo>> GetExtractResult(string reportFullPath, string eventName);
|
||||
object GetFilePathGeneratorInfo(string reportFullPath, bool isErrorFile);
|
||||
string GetReportFullPath(Dictionary<string, object> keyValuePairs);
|
||||
string GetTarget2FileLocation();
|
||||
void Move(string reportFullPath, Tuple<string, JsonElement?, List<FileInfo>> extractResults, Exception exception = null);
|
||||
Tuple<string, JsonElement?, List<FileInfo>> ReExtract(string searchDirectory, string sourceFileFilter);
|
||||
void ReflectionCreateSelfDescription(string equipmentElementName, int? input, string cellName, string debugConfig, string[] strings, bool[] booleans, long[] numbers, string[] enums);
|
||||
ConfigDataBase ReflectionCreateSelfDescriptionV2(string json);
|
||||
string ResolveErrorTargetPlaceHolders(string reportFullPath, bool createDirectory = true, string fileFoundPath = "");
|
||||
string ResolveSourcePlaceHolders(string reportFullPath, bool createDirectory = true);
|
||||
string ResolveTarget2PlaceHolders(string reportFullPath, bool createDirectory = true, string fileFoundPath = "");
|
||||
string ResolveTargetPlaceHolders(string reportFullPath, bool createDirectory = true, string fileFoundPath = "");
|
||||
void SetFileParameter(string key, string value);
|
||||
void SetFileParameterLotID(string value, bool includeLogisticsSequence = false);
|
||||
void SetFileParameterLotIDToLogisticsMID(bool includeLogisticsSequence = true);
|
||||
void SetFileParameterSystemDateTimeToLogisticsSequence();
|
||||
void SetPlaceHolder(string reportFullPath, string key, string value);
|
||||
void SetTarget2FileLocation(string value);
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
namespace Adaptation.Shared.Metrology
|
||||
{
|
||||
|
||||
public class MET08DDUPSFS6420
|
||||
{
|
||||
|
||||
public enum Test
|
||||
{
|
||||
Tencor = Metrology.Test.Tencor
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
namespace Adaptation.Shared.Metrology
|
||||
{
|
||||
|
||||
public class MET08DDUPSP1TBI
|
||||
{
|
||||
|
||||
public enum Test
|
||||
{
|
||||
SP1 = Metrology.Test.SP1
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
namespace Adaptation.Shared.Metrology
|
||||
{
|
||||
|
||||
public class MET08RESIHGCV
|
||||
{
|
||||
|
||||
public enum Test
|
||||
{
|
||||
HgCV = Metrology.Test.HgCV
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
namespace Adaptation.Shared.Metrology
|
||||
{
|
||||
|
||||
public class MET08RESIMAPCDE
|
||||
{
|
||||
|
||||
public enum Test
|
||||
{
|
||||
CDE = Metrology.Test.CDE
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
namespace Adaptation.Shared.Metrology
|
||||
{
|
||||
|
||||
public class MET08THFTIRQS408M
|
||||
{
|
||||
|
||||
public enum Test
|
||||
{
|
||||
BioRadQS408M = Metrology.Test.BioRadQS408M
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
namespace Adaptation.Shared.Metrology
|
||||
{
|
||||
|
||||
public class MET08THFTIRSTRATUS
|
||||
{
|
||||
|
||||
public enum Test
|
||||
{
|
||||
BioRadStratus = Metrology.Test.BioRadStratus
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
namespace Adaptation.Shared.Metrology
|
||||
{
|
||||
|
||||
public class MET08XRDXPERTPROMRDXL
|
||||
{
|
||||
|
||||
public enum Test
|
||||
{
|
||||
XRDXY = Metrology.Test.XRDXY,
|
||||
XRDWeightedAverage = Metrology.Test.XRDWeightedAverage,
|
||||
MonthlyXRD = Metrology.Test.MonthlyXRD,
|
||||
WeeklyXRD = Metrology.Test.WeeklyXRD,
|
||||
WeeklyXRDAIcomp = Metrology.Test.WeeklyXRDAIcomp,
|
||||
WeeklyXRDFWHM002 = Metrology.Test.WeeklyXRDFWHM002,
|
||||
WeeklyXRDFWHM105 = Metrology.Test.WeeklyXRDFWHM105,
|
||||
WeeklyXRDSLStks = Metrology.Test.WeeklyXRDSLStks,
|
||||
WeeklyXRDXRR = Metrology.Test.WeeklyXRDXRR,
|
||||
JVXRD = Metrology.Test.JVXRD
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Adaptation.Shared.Metrology
|
||||
{
|
||||
|
||||
internal class OISiViewer
|
||||
{
|
||||
|
||||
private static System.Net.WebClient _WebClient;
|
||||
|
||||
internal static string WebClientDownloadString(string baseAddress, ConfigDataBase configDataBase, string reportFullPath, bool isErrorFile, string target)
|
||||
{
|
||||
string result = string.Empty;
|
||||
if (System.Diagnostics.Debugger.IsAttached)
|
||||
result = DateTime.Now.ToString();
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrEmpty(baseAddress) || !baseAddress.Contains(":") || !baseAddress.Contains("."))
|
||||
throw new Exception("Invalid URL");
|
||||
try
|
||||
{
|
||||
if (_WebClient is null)
|
||||
_WebClient = new System.Net.WebClient();
|
||||
string address = string.Concat(baseAddress, "/Home/ExtractMove/?equipment_connection=", configDataBase.GetEquipmentType(), "&is_error_file=", isErrorFile);
|
||||
_WebClient.OpenRead(address);
|
||||
result = _WebClient.ResponseHeaders["Date"];
|
||||
_WebClient.CancelAsync();
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,110 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Adaptation.Shared.Metrology
|
||||
{
|
||||
|
||||
public class Duplicator
|
||||
{
|
||||
|
||||
public class Description : IProcessDataDescription
|
||||
{
|
||||
|
||||
public int Test { get; set; }
|
||||
public int Count { get; set; }
|
||||
public int Index { get; set; }
|
||||
//
|
||||
public string EventName { get; set; }
|
||||
public string NullData { get; set; }
|
||||
public string JobID { get; set; }
|
||||
public string Sequence { get; set; }
|
||||
public string MesEntity { get; set; }
|
||||
public string ReportFullPath { get; set; }
|
||||
public string ProcessJobID { get; set; }
|
||||
public string MID { get; set; }
|
||||
public string Date { get; set; } //2021-02-22
|
||||
|
||||
public string GetEventDescription() { return "File Has been read and parsed"; }
|
||||
|
||||
public List<string> GetHeaderNames(ILogic logic, ConfigDataBase configDataBase)
|
||||
{
|
||||
List<string> results = new List<string>();
|
||||
return results;
|
||||
}
|
||||
|
||||
public List<string> GetDetailNames(ILogic logic, ConfigDataBase configDataBase)
|
||||
{
|
||||
List<string> results = new List<string>();
|
||||
return results;
|
||||
}
|
||||
|
||||
public List<string> GetParameterNames(ILogic logic, ConfigDataBase configDataBase)
|
||||
{
|
||||
List<string> results = new List<string>();
|
||||
return results;
|
||||
}
|
||||
|
||||
public List<string> GetPairedParameterNames(ILogic logic, ConfigDataBase configDataBase)
|
||||
{
|
||||
List<string> results = new List<string>();
|
||||
return results;
|
||||
}
|
||||
|
||||
public List<string> GetIgnoreParameterNames(ILogic logic, ConfigDataBase configDataBase, Test test)
|
||||
{
|
||||
List<string> results = new List<string>();
|
||||
return results;
|
||||
}
|
||||
|
||||
public List<string> GetNames(ILogic logic, ConfigDataBase configDataBase)
|
||||
{
|
||||
List<string> results = new List<string>();
|
||||
IProcessDataDescription processDataDescription = GetDefault(logic, configDataBase);
|
||||
string json = JsonSerializer.Serialize(processDataDescription, processDataDescription.GetType());
|
||||
object @object = JsonSerializer.Deserialize<object>(json);
|
||||
if (!(@object is JsonElement jsonElement))
|
||||
throw new Exception();
|
||||
foreach (JsonProperty jsonProperty in jsonElement.EnumerateObject())
|
||||
results.Add(jsonProperty.Name);
|
||||
return results;
|
||||
}
|
||||
|
||||
public IProcessDataDescription GetDisplayNames(ILogic logic, ConfigDataBase configDataBase)
|
||||
{
|
||||
Description result = new Description();
|
||||
return result;
|
||||
}
|
||||
|
||||
public IProcessDataDescription GetDefault(ILogic logic, ConfigDataBase configDataBase)
|
||||
{
|
||||
Description result = new Description
|
||||
{
|
||||
Test = -1,
|
||||
Count = 0,
|
||||
Index = -1,
|
||||
//
|
||||
EventName = configDataBase.GetEventName(),
|
||||
NullData = string.Empty,
|
||||
JobID = logic.Logistics.JobID,
|
||||
Sequence = logic.Logistics.Sequence.ToString(),
|
||||
MesEntity = logic.Logistics.MesEntity,
|
||||
ReportFullPath = logic.Logistics.ReportFullPath,
|
||||
ProcessJobID = logic.Logistics.ProcessJobID,
|
||||
MID = logic.Logistics.MID,
|
||||
Date = logic.Logistics.DateTimeFromSequence.ToUniversalTime().ToString("MM/dd/yyyy HH:mm:ss"),
|
||||
};
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<IProcessDataDescription> GetDescription(ILogic logic, ConfigDataBase configDataBase, List<Test> tests, IProcessData iProcessData)
|
||||
{
|
||||
List<IProcessDataDescription> results = new List<IProcessDataDescription>();
|
||||
return results;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,527 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Adaptation.Shared.Metrology
|
||||
{
|
||||
|
||||
public class ProcessDataStandardFormat
|
||||
{
|
||||
|
||||
public const string RecordStart = "RECORD_START";
|
||||
|
||||
public enum SearchFor
|
||||
{
|
||||
EquipmentIntegration = 1,
|
||||
BusinessIntegration = 2,
|
||||
SystemExport = 3,
|
||||
Archive = 4
|
||||
}
|
||||
|
||||
public static string GetPDSFText(ILogic logic, string eventName, string equipmentType, JsonElement jsonElement, string logisticsText)
|
||||
{
|
||||
string result;
|
||||
if (jsonElement.ValueKind != JsonValueKind.Array)
|
||||
result = string.Empty;
|
||||
else
|
||||
{
|
||||
int columns = 0;
|
||||
List<string> lines;
|
||||
string endOffset = "E#######T";
|
||||
string dataOffset = "D#######T";
|
||||
string headerOffset = "H#######T";
|
||||
string format = "MM/dd/yyyy HH:mm:ss";
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
lines = new string[] { "HEADER_TAG\tHEADER_VALUE", "FORMAT\t2.00", "NUMBER_PASSES\t0001", string.Concat("HEADER_OFFSET\t", headerOffset), string.Concat("DATA_OFFSET\t", dataOffset), string.Concat("END_OFFSET\t", endOffset) }.ToList();
|
||||
stringBuilder.Append("\"Time\"").Append('\t');
|
||||
stringBuilder.Append("\"A_LOGISTICS\"").Append('\t');
|
||||
stringBuilder.Append("\"B_LOGISTICS\"").Append('\t');
|
||||
JsonElement[] jsonElements = jsonElement.EnumerateArray().ToArray();
|
||||
for (int i = 0; i < jsonElements.Length;)
|
||||
{
|
||||
foreach (JsonProperty jsonProperty in jsonElements[0].EnumerateObject())
|
||||
{
|
||||
columns += 1;
|
||||
stringBuilder.Append("\"").Append(jsonProperty.Name).Append("\"").Append('\t');
|
||||
}
|
||||
break;
|
||||
}
|
||||
stringBuilder.Remove(stringBuilder.Length - 1, 1);
|
||||
lines.Add(stringBuilder.ToString());
|
||||
for (int i = 0; i < jsonElements.Length; i++)
|
||||
{
|
||||
stringBuilder.Clear();
|
||||
stringBuilder.Append("0.1").Append('\t');
|
||||
stringBuilder.Append("1").Append('\t');
|
||||
stringBuilder.Append("2").Append('\t');
|
||||
foreach (JsonProperty jsonProperty in jsonElements[i].EnumerateObject())
|
||||
stringBuilder.Append(jsonProperty.Value).Append('\t');
|
||||
stringBuilder.Remove(stringBuilder.Length - 1, 1);
|
||||
lines.Add(stringBuilder.ToString());
|
||||
}
|
||||
lines.Add(string.Concat("NUM_DATA_ROWS ", jsonElements.Length.ToString().PadLeft(9, '0')));
|
||||
lines.Add(string.Concat("NUM_DATA_COLUMNS ", (columns + 3).ToString().PadLeft(9, '0')));
|
||||
lines.Add("DELIMITER ;");
|
||||
lines.Add(string.Concat("START_TIME_FORMAT ", format));
|
||||
lines.Add(string.Concat("START_TIME ", logic.Logistics.DateTimeFromSequence.ToString(format))); //12/26/2019 15:22:44
|
||||
lines.Add(string.Concat("LOGISTICS_COLUMN", '\t', "A_LOGISTICS"));
|
||||
lines.Add(string.Concat("LOGISTICS_COLUMN", '\t', "B_LOGISTICS"));
|
||||
if (!string.IsNullOrEmpty(logisticsText))
|
||||
lines.Add(logisticsText);
|
||||
else
|
||||
{
|
||||
lines.Add(string.Concat("LOGISTICS_1", '\t', "A_CHAMBER=;A_INFO=", eventName, ";A_INFO2=", equipmentType, ";A_JOBID=", logic.Logistics.JobID, ";A_MES_ENTITY=", logic.Logistics.MesEntity, ";A_MID=", logic.Logistics.MID, ";A_NULL_DATA=", logic.Logistics.NullData, ";A_PPID=NO_PPID;A_PROCESS_JOBID=", logic.Logistics.ProcessJobID, ";A_PRODUCT=;A_SEQUENCE=", logic.Logistics.Sequence, ";A_WAFER_ID=;"));
|
||||
lines.Add(string.Concat("LOGISTICS_2", '\t', "B_CHAMBER=;B_INFO=", eventName, ";B_INFO2=", equipmentType, ";B_JOBID=", logic.Logistics.JobID, ";B_MES_ENTITY=", logic.Logistics.MesEntity, ";B_MID=", logic.Logistics.MID, ";B_NULL_DATA=", logic.Logistics.NullData, ";B_PPID=NO_PPID;B_PROCESS_JOBID=", logic.Logistics.ProcessJobID, ";B_PRODUCT=;B_SEQUENCE=", logic.Logistics.Sequence, ";B_WAFER_ID=;"));
|
||||
lines.Add("END_HEADER");
|
||||
}
|
||||
stringBuilder.Clear();
|
||||
foreach (string line in lines)
|
||||
stringBuilder.AppendLine(line);
|
||||
result = stringBuilder.ToString();
|
||||
result = result.Replace(headerOffset, result.IndexOf("NUM_DATA_ROWS").ToString().PadLeft(9, '0')).
|
||||
Replace(dataOffset, result.IndexOf('"').ToString().PadLeft(9, '0')).
|
||||
Replace(endOffset, result.Length.ToString().PadLeft(9, '0'));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Tuple<string, string[], string[]> GetLogisticsColumnsAndBody(string reportFullPath, string[] lines = null)
|
||||
{
|
||||
string segment;
|
||||
List<string> body = new List<string>();
|
||||
StringBuilder logistics = new StringBuilder();
|
||||
if (lines is null)
|
||||
lines = File.ReadAllLines(reportFullPath);
|
||||
string[] segments;
|
||||
if (lines.Length < 7)
|
||||
segments = new string[] { };
|
||||
else
|
||||
segments = lines[6].Trim().Split('\t');
|
||||
List<string> columns = new List<string>();
|
||||
for (int c = 0; c < segments.Length; c++)
|
||||
{
|
||||
segment = segments[c].Substring(1, segments[c].Length - 2);
|
||||
if (!columns.Contains(segment))
|
||||
columns.Add(segment);
|
||||
else
|
||||
{
|
||||
for (short i = 1; i < short.MaxValue; i++)
|
||||
{
|
||||
segment = string.Concat(segment, "_", i);
|
||||
if (!columns.Contains(segment))
|
||||
{
|
||||
columns.Add(segment);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
bool lookForLogistics = false;
|
||||
for (int r = 7; r < lines.Count(); r++)
|
||||
{
|
||||
if (lines[r].StartsWith("NUM_DATA_ROWS"))
|
||||
lookForLogistics = true;
|
||||
if (!lookForLogistics)
|
||||
{
|
||||
body.Add(lines[r]);
|
||||
continue;
|
||||
}
|
||||
if (lines[r].StartsWith("LOGISTICS_1"))
|
||||
{
|
||||
for (int i = r; i < lines.Count(); i++)
|
||||
{
|
||||
if (lines[r].StartsWith("END_HEADER"))
|
||||
break;
|
||||
logistics.AppendLine(lines[i]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return new Tuple<string, string[], string[]>(logistics.ToString(), columns.ToArray(), body.ToArray());
|
||||
}
|
||||
|
||||
public static JsonElement GetArray(Tuple<string, string[], string[]> pdsf, bool lookForNumbers = false)
|
||||
{
|
||||
JsonElement result;
|
||||
string logistics = pdsf.Item1;
|
||||
string[] columns = pdsf.Item2;
|
||||
string[] bodyLines = pdsf.Item3;
|
||||
if (!bodyLines.Any() || !bodyLines[0].Contains('\t'))
|
||||
result = JsonSerializer.Deserialize<JsonElement>("[]");
|
||||
else
|
||||
{
|
||||
string value;
|
||||
string[] segments;
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
foreach (string bodyLine in bodyLines)
|
||||
{
|
||||
stringBuilder.Append('{');
|
||||
segments = bodyLine.Trim().Split('\t');
|
||||
if (!lookForNumbers)
|
||||
{
|
||||
for (int c = 1; c < segments.Length; c++)
|
||||
{
|
||||
value = segments[c].Replace("\"", "\\\"").Replace("\\", "\\\\");
|
||||
stringBuilder.Append('"').Append(columns[c]).Append("\":\"").Append(value).Append("\",");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int c = 1; c < segments.Length; c++)
|
||||
{
|
||||
value = segments[c].Replace("\"", "\\\"").Replace("\\", "\\\\");
|
||||
if (string.IsNullOrEmpty(value))
|
||||
stringBuilder.Append('"').Append(columns[c]).Append("\":").Append(value).Append("null,");
|
||||
else if (value.All(char.IsDigit))
|
||||
stringBuilder.Append('"').Append(columns[c]).Append("\":").Append(value).Append(",");
|
||||
else
|
||||
stringBuilder.Append('"').Append(columns[c]).Append("\":\"").Append(value).Append("\",");
|
||||
}
|
||||
}
|
||||
stringBuilder.Remove(stringBuilder.Length - 1, 1);
|
||||
stringBuilder.AppendLine("},");
|
||||
}
|
||||
stringBuilder.Remove(stringBuilder.Length - 3, 3);
|
||||
result = JsonSerializer.Deserialize<JsonElement>(string.Concat("[", stringBuilder, "]"));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Dictionary<string, List<string>> GetDictionary(Tuple<string, string[], string[]> pdsf)
|
||||
{
|
||||
Dictionary<string, List<string>> results = new Dictionary<string, List<string>>();
|
||||
string[] segments;
|
||||
string[] columns = pdsf.Item2;
|
||||
string[] bodyLines = pdsf.Item3;
|
||||
foreach (string column in columns)
|
||||
results.Add(column, new List<string>());
|
||||
foreach (string bodyLine in bodyLines)
|
||||
{
|
||||
segments = bodyLine.Split('\t');
|
||||
for (int c = 1; c < segments.Length; c++)
|
||||
{
|
||||
if (c >= columns.Length)
|
||||
continue;
|
||||
results[columns[c]].Add(segments[c]);
|
||||
}
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
public static Tuple<string, Dictionary<Test, Dictionary<string, List<string>>>> GetTestDictionary(Tuple<string, string[], string[]> pdsf)
|
||||
{
|
||||
Dictionary<Test, Dictionary<string, List<string>>> results = new Dictionary<Test, Dictionary<string, List<string>>>();
|
||||
string testColumn = Description.RowColumn.Test.ToString();
|
||||
Dictionary<string, List<string>> keyValuePairs = GetDictionary(pdsf);
|
||||
if (!keyValuePairs.ContainsKey(testColumn))
|
||||
throw new Exception();
|
||||
int min;
|
||||
int max;
|
||||
Test testKey;
|
||||
List<string> vs;
|
||||
string columnKey;
|
||||
Dictionary<Test, List<int>> tests = new Dictionary<Test, List<int>>();
|
||||
for (int i = 0; i < keyValuePairs[testColumn].Count; i++)
|
||||
{
|
||||
if (Enum.TryParse(keyValuePairs[testColumn][i], out Test test))
|
||||
{
|
||||
if (!results.ContainsKey(test))
|
||||
{
|
||||
tests.Add(test, new List<int>());
|
||||
results.Add(test, new Dictionary<string, List<string>>());
|
||||
}
|
||||
tests[test].Add(i);
|
||||
}
|
||||
}
|
||||
foreach (KeyValuePair<Test, List<int>> testKeyValuePair in tests)
|
||||
{
|
||||
testKey = testKeyValuePair.Key;
|
||||
min = testKeyValuePair.Value.Min();
|
||||
max = testKeyValuePair.Value.Max() + 1;
|
||||
foreach (KeyValuePair<string, List<string>> keyValuePair in keyValuePairs)
|
||||
results[testKey].Add(keyValuePair.Key, new List<string>());
|
||||
foreach (KeyValuePair<string, List<string>> keyValuePair in keyValuePairs)
|
||||
{
|
||||
vs = keyValuePair.Value;
|
||||
columnKey = keyValuePair.Key;
|
||||
for (int i = min; i < max; i++)
|
||||
{
|
||||
if (vs.Count > i)
|
||||
results[testKey][columnKey].Add(vs[i]);
|
||||
else
|
||||
results[testKey][columnKey].Add(string.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
return new Tuple<string, Dictionary<Test, Dictionary<string, List<string>>>>(pdsf.Item1, results);
|
||||
}
|
||||
|
||||
private static string GetString(SearchFor searchFor, bool addSpaces, char separator = ' ')
|
||||
{
|
||||
if (!addSpaces)
|
||||
return string.Concat(((int)searchFor).ToString().PadLeft(2, '0'), searchFor);
|
||||
else
|
||||
return string.Concat(((int)searchFor).ToString().PadLeft(2, '0'), separator, searchFor.ToString().Replace("In", string.Concat(separator, "In")).Replace("Ex", string.Concat(separator, "Ex")));
|
||||
}
|
||||
|
||||
public static string EquipmentIntegration(bool addSpaces = true, char separator = ' ')
|
||||
{
|
||||
return GetString(SearchFor.EquipmentIntegration, addSpaces, separator);
|
||||
}
|
||||
|
||||
public static string BusinessIntegration(bool addSpaces = true, char separator = ' ')
|
||||
{
|
||||
return GetString(SearchFor.BusinessIntegration, addSpaces, separator);
|
||||
}
|
||||
|
||||
public static string SystemExport(bool addSpaces = true, char separator = ' ')
|
||||
{
|
||||
return GetString(SearchFor.SystemExport, addSpaces, separator);
|
||||
}
|
||||
|
||||
public static string Archive(bool addSpaces = true, char separator = ' ')
|
||||
{
|
||||
return GetString(SearchFor.Archive, addSpaces, separator);
|
||||
}
|
||||
|
||||
public static string GetLines(Logistics logistics, IScopeInfo scopeInfo, Dictionary<string, List<string>> keyValuePairs, Enum[] enumColumns, string dateFormat, string timeFormat, Column[] pairedColumns, bool useDateTimeFromSequence = true, string format = "", Dictionary<Column, string> alternateDisplayName = null, Enum[] ignoreColumns = null)
|
||||
{
|
||||
StringBuilder result = new StringBuilder();
|
||||
if (useDateTimeFromSequence && !string.IsNullOrEmpty(format))
|
||||
throw new Exception();
|
||||
else if (!useDateTimeFromSequence && string.IsNullOrEmpty(format))
|
||||
throw new Exception();
|
||||
int start;
|
||||
string ckey;
|
||||
string pKey;
|
||||
int pairedColumnsCount;
|
||||
string firstDuplicate = "_1";
|
||||
if (ignoreColumns is null)
|
||||
ignoreColumns = new Enum[] { };
|
||||
if (alternateDisplayName is null)
|
||||
alternateDisplayName = new Dictionary<Column, string>();
|
||||
string columnDate = Column.Date.ToString();
|
||||
string columnTime = Column.Time.ToString();
|
||||
List<string> columnKeys = new List<string>();
|
||||
foreach (Enum item in enumColumns)
|
||||
{
|
||||
if (ignoreColumns.Contains(item))
|
||||
continue;
|
||||
columnKeys.Add(item.ToString());
|
||||
}
|
||||
result.AppendLine(scopeInfo.Header);
|
||||
StringBuilder line = new StringBuilder();
|
||||
int count = keyValuePairs[Description.RowColumn.Count.ToString()].Count();
|
||||
string nullData;
|
||||
if (logistics.NullData is null)
|
||||
nullData = string.Empty;
|
||||
else
|
||||
nullData = logistics.NullData.ToString();
|
||||
if (pairedColumns is null)
|
||||
{
|
||||
start = -1;
|
||||
pairedColumnsCount = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
start = 0;
|
||||
pairedColumnsCount = pairedColumns.Length;
|
||||
}
|
||||
for (int r = 0; r < count; r++)
|
||||
{
|
||||
for (int p = start; p < pairedColumnsCount; p++)
|
||||
{
|
||||
if (pairedColumnsCount == 0)
|
||||
pKey = string.Empty;
|
||||
else if (!(ignoreColumns is null) && ignoreColumns.Contains(pairedColumns[p]))
|
||||
continue;
|
||||
else
|
||||
{
|
||||
pKey = pairedColumns[p].ToString();
|
||||
if (!keyValuePairs.ContainsKey(pKey))
|
||||
continue;
|
||||
else if (keyValuePairs[pKey][r] == nullData)
|
||||
continue;
|
||||
}
|
||||
if (pairedColumnsCount == 0 || !string.IsNullOrEmpty(pKey))
|
||||
{
|
||||
line.Clear();
|
||||
line.Append("!");
|
||||
for (int i = 0; i < columnKeys.Count; i++)
|
||||
{
|
||||
ckey = columnKeys[i];
|
||||
if (!keyValuePairs.ContainsKey(ckey))
|
||||
line.Append(string.Empty);
|
||||
else
|
||||
{
|
||||
if (useDateTimeFromSequence && ckey == columnDate)
|
||||
line.Append(logistics.DateTimeFromSequence.ToString(dateFormat));
|
||||
else if (useDateTimeFromSequence && ckey == columnTime)
|
||||
line.Append(logistics.DateTimeFromSequence.ToString(timeFormat));
|
||||
else if (!useDateTimeFromSequence && ckey == columnDate && keyValuePairs[ckey][r].Length == format.Length)
|
||||
line.Append(DateTime.ParseExact(keyValuePairs[ckey][r], format, CultureInfo.InvariantCulture).ToString(dateFormat));
|
||||
else if (!useDateTimeFromSequence && ckey == columnTime && keyValuePairs.ContainsKey(string.Concat(ckey, firstDuplicate)) && keyValuePairs[string.Concat(ckey, firstDuplicate)][r].Length == format.Length)
|
||||
line.Append(DateTime.ParseExact(keyValuePairs[string.Concat(ckey, firstDuplicate)][r], format, CultureInfo.InvariantCulture).ToString(timeFormat));
|
||||
else
|
||||
line.Append(keyValuePairs[ckey][r]);
|
||||
}
|
||||
line.Append(';');
|
||||
}
|
||||
if (pairedColumnsCount > 0)
|
||||
{
|
||||
if (!alternateDisplayName.ContainsKey(pairedColumns[p]))
|
||||
line.Append(pairedColumns[p].GetDiplayName());
|
||||
else
|
||||
line.Append(alternateDisplayName[pairedColumns[p]]);
|
||||
line.Append(';');
|
||||
line.Append(keyValuePairs[pKey][r]);
|
||||
line.Append(';');
|
||||
}
|
||||
line.Remove(line.Length - 1, 1);
|
||||
result.AppendLine(line.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
public static string GetLines(Logistics logistics, IScopeInfo scopeInfo, List<string> names, Dictionary<string, List<string>> keyValuePairs, string dateFormat, string timeFormat, List<string> pairedParameterNames, bool useDateTimeFromSequence = true, string format = "", List<string> ignoreParameterNames = null)
|
||||
{
|
||||
StringBuilder result = new StringBuilder();
|
||||
if (ignoreParameterNames is null)
|
||||
ignoreParameterNames = new List<string>();
|
||||
if (useDateTimeFromSequence && !string.IsNullOrEmpty(format))
|
||||
throw new Exception();
|
||||
else if (!useDateTimeFromSequence && string.IsNullOrEmpty(format))
|
||||
throw new Exception();
|
||||
string nullData;
|
||||
const string columnDate = "Date";
|
||||
const string columnTime = "Time";
|
||||
const string firstDuplicate = "_1";
|
||||
result.AppendLine(scopeInfo.Header);
|
||||
StringBuilder line = new StringBuilder();
|
||||
if (logistics.NullData is null)
|
||||
nullData = string.Empty;
|
||||
else
|
||||
nullData = logistics.NullData.ToString();
|
||||
int count = (from l in keyValuePairs select l.Value.Count).Min();
|
||||
for (int r = 0; r < count; r++)
|
||||
{
|
||||
line.Clear();
|
||||
line.Append("!");
|
||||
foreach (KeyValuePair<string, List<string>> keyValuePair in keyValuePairs)
|
||||
{
|
||||
if (!names.Contains(keyValuePair.Key))
|
||||
continue;
|
||||
if (ignoreParameterNames.Contains(keyValuePair.Key))
|
||||
continue;
|
||||
if (pairedParameterNames.Contains(keyValuePair.Key))
|
||||
{
|
||||
if (string.IsNullOrEmpty(keyValuePair.Value[r]) || keyValuePair.Value[r] == nullData)
|
||||
continue;
|
||||
else
|
||||
result.Append(line).Append(keyValuePair.Key).Append(';').AppendLine(keyValuePair.Value[r]);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (useDateTimeFromSequence && keyValuePair.Key == columnDate)
|
||||
line.Append(logistics.DateTimeFromSequence.ToString(dateFormat));
|
||||
else if (useDateTimeFromSequence && keyValuePair.Key == columnTime)
|
||||
line.Append(logistics.DateTimeFromSequence.ToString(timeFormat));
|
||||
else if (!useDateTimeFromSequence && keyValuePair.Key == columnDate && keyValuePair.Value[r].Length == format.Length)
|
||||
line.Append(DateTime.ParseExact(keyValuePair.Value[r], format, CultureInfo.InvariantCulture).ToString(dateFormat));
|
||||
else if (!useDateTimeFromSequence && keyValuePair.Key == columnTime && keyValuePairs.ContainsKey(string.Concat(keyValuePair.Key, firstDuplicate)) && keyValuePairs[string.Concat(keyValuePair.Key, firstDuplicate)][r].Length == format.Length)
|
||||
line.Append(DateTime.ParseExact(keyValuePairs[string.Concat(keyValuePair.Key, firstDuplicate)][r], format, CultureInfo.InvariantCulture).ToString(timeFormat));
|
||||
else if (string.IsNullOrEmpty(keyValuePair.Value[r]) || keyValuePair.Value[r] == nullData)
|
||||
line.Append(nullData);
|
||||
else
|
||||
line.Append(keyValuePair.Value[r]);
|
||||
line.Append(';');
|
||||
}
|
||||
}
|
||||
if (!pairedParameterNames.Any())
|
||||
{
|
||||
line.Remove(line.Length - 1, 1);
|
||||
result.AppendLine(line.ToString());
|
||||
}
|
||||
}
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
public static List<string> PDSFToFixedWidth(string reportFullPath)
|
||||
{
|
||||
List<string> results = new List<string>();
|
||||
if (!File.Exists(reportFullPath))
|
||||
throw new Exception();
|
||||
int[] group;
|
||||
string line;
|
||||
int startsAt = 0;
|
||||
string[] segments;
|
||||
int? currentGroup = null;
|
||||
char inputSeperator = '\t';
|
||||
char outputSeperator = '\t';
|
||||
List<int> vs = new List<int>();
|
||||
List<int[]> groups = new List<int[]>();
|
||||
string[] lines = File.ReadAllLines(reportFullPath);
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
for (int i = 0; i < lines.Length; i++)
|
||||
{
|
||||
if (string.IsNullOrEmpty(lines[i]))
|
||||
continue;
|
||||
segments = lines[i].Split(inputSeperator);
|
||||
if (currentGroup is null)
|
||||
currentGroup = segments.Length;
|
||||
if (segments.Length != currentGroup)
|
||||
{
|
||||
currentGroup = segments.Length;
|
||||
groups.Add(new int[] { startsAt, i - 1 });
|
||||
startsAt = i;
|
||||
}
|
||||
}
|
||||
if (startsAt == lines.Length - 1 && lines[0].Split(inputSeperator).Length != currentGroup)
|
||||
groups.Add(new int[] { lines.Length - 1, lines.Length - 1 });
|
||||
for (int g = 0; g < groups.Count; g++)
|
||||
{
|
||||
vs.Clear();
|
||||
group = groups[g];
|
||||
line = lines[group[0]];
|
||||
segments = line.Split(inputSeperator);
|
||||
for (int s = 0; s < segments.Length; s++)
|
||||
vs.Add(segments[s].Length);
|
||||
for (int i = group[0]; i <= group[1]; i++)
|
||||
{
|
||||
line = lines[i];
|
||||
segments = line.Split(inputSeperator);
|
||||
for (int s = 0; s < segments.Length; s++)
|
||||
{
|
||||
if (vs[s] < segments[s].Length)
|
||||
vs[s] = segments[s].Length;
|
||||
}
|
||||
}
|
||||
stringBuilder.Clear();
|
||||
for (int s = 0; s < segments.Length; s++)
|
||||
stringBuilder.Append((s + 1).ToString().PadLeft(vs[s], ' ')).Append(outputSeperator);
|
||||
stringBuilder.Remove(stringBuilder.Length - 1, 1);
|
||||
results.Add(stringBuilder.ToString());
|
||||
for (int i = group[0]; i <= group[1]; i++)
|
||||
{
|
||||
line = lines[i];
|
||||
stringBuilder.Clear();
|
||||
segments = line.Split(inputSeperator);
|
||||
for (int s = 0; s < segments.Length; s++)
|
||||
stringBuilder.Append(segments[s].PadLeft(vs[s], ' ')).Append(outputSeperator);
|
||||
stringBuilder.Remove(stringBuilder.Length - 1, 1);
|
||||
results.Add(stringBuilder.ToString());
|
||||
}
|
||||
results.Add(string.Empty);
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,409 +1,300 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Adaptation.Shared.Metrology
|
||||
namespace Adaptation.Shared.Metrology;
|
||||
|
||||
public class ScopeInfo : Properties.IScopeInfo
|
||||
{
|
||||
|
||||
public class ScopeInfo : IScopeInfo
|
||||
public Test Test { get; private set; }
|
||||
public Enum Enum { get; private set; }
|
||||
public string HTML { get; private set; }
|
||||
public string Title { get; private set; }
|
||||
public string FileName { get; private set; }
|
||||
public int TestValue { get; private set; }
|
||||
public string Header { get; private set; }
|
||||
public string QueryFilter { get; private set; }
|
||||
public string FileNameWithoutExtension { get; private set; }
|
||||
|
||||
public ScopeInfo(Test test, string fileName, string queryFilter = "", string title = "", string html = "")
|
||||
{
|
||||
|
||||
public Test Test { get; private set; }
|
||||
public Enum Enum { get; private set; }
|
||||
public string HTML { get; private set; }
|
||||
public string Title { get; private set; }
|
||||
public string FileName { get; private set; }
|
||||
public int TestValue { get; private set; }
|
||||
public string Header { get; private set; }
|
||||
public string QueryFilter { get; private set; }
|
||||
public string FileNameWithoutExtension { get; private set; }
|
||||
public EquipmentType EquipmentType { get; private set; }
|
||||
|
||||
public ScopeInfo(ILogic logic, ConfigDataBase configDataBase, Test test)
|
||||
{
|
||||
Enum = test;
|
||||
Test = test;
|
||||
TestValue = (int)test;
|
||||
if (configDataBase.EquipmentConnection is null)
|
||||
EquipmentType = configDataBase.EquipmentType;
|
||||
else
|
||||
EquipmentType = configDataBase.EquipmentConnection.Value;
|
||||
string eventName = GetEventNameAndSetRemaining();
|
||||
if (eventName != configDataBase.GetEventName())
|
||||
{
|
||||
File.Move(logic.Logistics.ReportFullPath, Path.ChangeExtension(logic.Logistics.ReportFullPath, eventName));
|
||||
throw new Exception();
|
||||
}
|
||||
else if (EquipmentType != configDataBase.EquipmentType && EquipmentType != configDataBase.EquipmentConnection)
|
||||
{
|
||||
File.Move(logic.Logistics.ReportFullPath, Path.ChangeExtension(logic.Logistics.ReportFullPath, EquipmentType.ToString()));
|
||||
throw new Exception();
|
||||
}
|
||||
}
|
||||
|
||||
public ScopeInfo(ILogic logic, ConfigDataBase configDataBase, Test test, string fileName, string queryFilter, string title = "", string html = "")
|
||||
{
|
||||
Enum = test;
|
||||
Test = test;
|
||||
TestValue = (int)test;
|
||||
if (configDataBase.EquipmentConnection is null)
|
||||
EquipmentType = configDataBase.EquipmentType;
|
||||
else
|
||||
EquipmentType = configDataBase.EquipmentConnection.Value;
|
||||
FileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileName);
|
||||
Header = string.Empty;
|
||||
QueryFilter = queryFilter;
|
||||
Title = title;
|
||||
HTML = html;
|
||||
FileName = fileName;
|
||||
}
|
||||
|
||||
public ScopeInfo ShallowCopy()
|
||||
{
|
||||
return (ScopeInfo)MemberwiseClone();
|
||||
}
|
||||
|
||||
private string GetEventNameAndSetRemaining()
|
||||
{
|
||||
EventName eventName;
|
||||
switch (Test)
|
||||
{
|
||||
case Test.AFMRoughness:
|
||||
EquipmentType = EquipmentType.MET08AFMD3100;
|
||||
eventName = EventName.FileRead;
|
||||
FileNameWithoutExtension = "afm_iqs_01";
|
||||
Header = string.Empty;
|
||||
QueryFilter = "AFM Roughness";
|
||||
Title = "AFM";
|
||||
HTML = @"GaN Epi Data\10 - afm.html";
|
||||
break;
|
||||
case Test.BreakdownVoltageCenter:
|
||||
EquipmentType = EquipmentType.MET08BVHGPROBE;
|
||||
eventName = EventName.FileRead;
|
||||
FileNameWithoutExtension = "bv_iqs_01";
|
||||
Header = "Reactor;fDate;fRecipeName;Lot;fPocketNumber;g4Scribe;BV Position;BV Value;Tool";
|
||||
QueryFilter = "Breakdown Voltage";
|
||||
Title = "Breakdown Voltage-Center";
|
||||
HTML = @"GaN Epi Data\03 - bv-production.html";
|
||||
break;
|
||||
case Test.BreakdownVoltageEdge:
|
||||
EquipmentType = EquipmentType.MET08BVHGPROBE;
|
||||
eventName = EventName.FileRead;
|
||||
FileNameWithoutExtension = "bv_iqs_01_Edge";
|
||||
Header = "Reactor;fDate;fRecipeName;Lot;fPocketNumber;g4Scribe;BV Position;BV Value;Tool";
|
||||
QueryFilter = "Breakdown Voltage - Edge";
|
||||
Title = "Breakdown Voltage-Edge";
|
||||
HTML = @"GaN Epi Data\03 - bv-production.html";
|
||||
break;
|
||||
case Test.BreakdownVoltageMiddle8in:
|
||||
EquipmentType = EquipmentType.MET08BVHGPROBE;
|
||||
eventName = EventName.FileRead;
|
||||
FileNameWithoutExtension = "bv_iqs_01_Middle";
|
||||
Header = "Reactor;fDate;fRecipeName;Lot;fPocketNumber;g4Scribe;BV Position;BV Value;Tool";
|
||||
QueryFilter = "Breakdown Voltage - Middle";
|
||||
Title = "Breakdown Voltage-Middle (8 in)";
|
||||
HTML = @"GaN Epi Data\03 - bv-production.html";
|
||||
break;
|
||||
case Test.CV:
|
||||
EquipmentType = EquipmentType.MET08CVHGPROBE802B150;
|
||||
eventName = EventName.FileRead;
|
||||
FileNameWithoutExtension = "cv_iqs_01";
|
||||
Header = "Reactor;fDate;fPart;Lot;pocketNumber;g4Scribe;Position;Vp;NdMin;Tool ID;CV Ns;CV Cap";
|
||||
QueryFilter = "CV_Ns";
|
||||
Title = "CV";
|
||||
HTML = @"GaN Epi Data\05 - cv.html";
|
||||
break;
|
||||
case Test.MonthlyCV:
|
||||
EquipmentType = EquipmentType.MET08CVHGPROBE802B150_Monthly;
|
||||
eventName = EventName.FileReadMonthly;
|
||||
FileNameWithoutExtension = "cv_iqs_01";
|
||||
Header = "Reactor;fDate;fPart;Lot;pocketNumber;g4Scribe;Position;Vp;NdMin;Tool ID;CV Ns;CV Cap";
|
||||
QueryFilter = "CV_Ns";
|
||||
Title = "CV Monthly Verification";
|
||||
HTML = @"Metrology\07 - cv_verif_monthly.html";
|
||||
break;
|
||||
case Test.WeeklyCV:
|
||||
EquipmentType = EquipmentType.MET08CVHGPROBE802B150_Weekly;
|
||||
eventName = EventName.FileReadWeekly;
|
||||
FileNameWithoutExtension = "cv_iqs_01";
|
||||
Header = "Reactor;fDate;fPart;Lot;pocketNumber;g4Scribe;Position;Vp;NdMin;Tool ID;CV Ns;CV Cap";
|
||||
QueryFilter = "CV_Ns";
|
||||
Title = "CV Weekly Verification";
|
||||
HTML = @"Metrology\16 - cv_verif_weekly.html";
|
||||
break;
|
||||
case Test.CandelaKlarfDC:
|
||||
EquipmentType = EquipmentType.MET08DDINCAN8620;
|
||||
eventName = EventName.FileRead;
|
||||
FileNameWithoutExtension = "candela_iqs_01";
|
||||
Header = "LotID;OperatorID;RecipeName;CandelaRecipe;WaferID;PocketNumber;RunDate;Epi;SlipLines;Cracks;EpiDef;HazeSpot;SmallLpd;MediumLpd;LargeLpd;Cracks_A;Spirals;Craters;8620 Small;Pits;Tool ID;Defect Count";
|
||||
QueryFilter = "Candela Cracking";
|
||||
Title = "Candela";
|
||||
HTML = @"GaN Epi Data\12 - candela.html";
|
||||
break;
|
||||
case Test.CandelaLaser:
|
||||
EquipmentType = EquipmentType.MET08DDINCAN8620;
|
||||
eventName = EventName.FileRead;
|
||||
FileNameWithoutExtension = "candela_iqs_01";
|
||||
Header = "LotID;OperatorID;RecipeName;CandelaRecipe;WaferID;PocketNumber;RunDate;Epi;SlipLines;Cracks;EpiDef;HazeSpot;SmallLpd;MediumLpd;LargeLpd;Cracks_A;Spirals;Craters;Pits;Tool ID;Defect Count";
|
||||
QueryFilter = "Candela Cracking";
|
||||
Title = "Candela";
|
||||
HTML = @"GaN Epi Data\12 - candela.html";
|
||||
break;
|
||||
case Test.CandelaVerify:
|
||||
EquipmentType = EquipmentType.MET08DDINCAN8620;
|
||||
eventName = EventName.FileRead;
|
||||
FileNameWithoutExtension = "candela_iqs_01";
|
||||
Header = string.Concat("LotID;OperatorID;RecipeName;CandelaRecipe;WaferID;PocketNumber;RunDate;RunID;Reactor;", "Slip Lines;Cracks;Epi Def;Haze Spot;Small LPD;Medium LPD;Large LPD;Cracks_A;Spirals;Craters;8620 Small;Pits;Tool ID;Defect Count");
|
||||
QueryFilter = "Candela Cracking";
|
||||
Title = "Candela";
|
||||
HTML = @"GaN Epi Data\12 - candela.html";
|
||||
break;
|
||||
case Test.CandelaPSL:
|
||||
EquipmentType = EquipmentType.MET08DDINCAN8620_Daily;
|
||||
eventName = EventName.FileReadDaily;
|
||||
FileNameWithoutExtension = "candela_iqs_01";
|
||||
Header = string.Empty;
|
||||
QueryFilter = "102-83nm";
|
||||
Title = "Candela";
|
||||
HTML = @"GaN Epi Data\12 - candela.html";
|
||||
break;
|
||||
case Test.CandelaProdU:
|
||||
EquipmentType = EquipmentType.MET08DDINCAN8620_Daily;
|
||||
eventName = EventName.FileReadDaily;
|
||||
FileNameWithoutExtension = "candela_iqs_01";
|
||||
Header = string.Empty;
|
||||
QueryFilter = "SPE verification";
|
||||
Title = "Candela";
|
||||
HTML = @"GaN Epi Data\12 - candela.html";
|
||||
break;
|
||||
case Test.Denton:
|
||||
EquipmentType = EquipmentType.MET08EBEAMINTEGRITY26;
|
||||
eventName = EventName.FileRead;
|
||||
FileNameWithoutExtension = "denton_iqs_01";
|
||||
Header = "Tool;fDate;Run;Recipe;Operator;Name;Value";
|
||||
QueryFilter = "Denton_Voltage_AVG";
|
||||
Title = "Denton Data";
|
||||
HTML = @"Support Process\03 - ebeam02_denton_v1.html";
|
||||
break;
|
||||
case Test.Hall:
|
||||
EquipmentType = EquipmentType.MET08HALLHL5580;
|
||||
eventName = EventName.FileRead;
|
||||
FileNameWithoutExtension = "hall_iqs_01";
|
||||
Header = "Lot;Tool;TimeDate;RunDate;RunID;Part;Reactor;Scribe;PocketNumber;Tool ID;Name;Value";
|
||||
QueryFilter = "Hall Rs";
|
||||
Title = "Hall Data";
|
||||
HTML = @"GaN Epi Data\04 - hall.html";
|
||||
break;
|
||||
case Test.MonthlyHall:
|
||||
EquipmentType = EquipmentType.MET08HALLHL5580_Monthly;
|
||||
eventName = EventName.FileReadMonthly;
|
||||
FileNameWithoutExtension = "hall_iqs_01";
|
||||
Header = "Lot;Tool;TimeDate;RunDate;RunID;Part;Reactor;Scribe;PocketNumber;Tool ID;Name;Value";
|
||||
QueryFilter = "Hall Rs";
|
||||
Title = "Hall Monthly Verification";
|
||||
HTML = @"Metrology\06 - hall_verif_monthly.html";
|
||||
break;
|
||||
case Test.WeeklyHall:
|
||||
EquipmentType = EquipmentType.MET08HALLHL5580_Weekly;
|
||||
eventName = EventName.FileReadWeekly;
|
||||
FileNameWithoutExtension = "hall_iqs_01";
|
||||
Header = "Lot;Tool;TimeDate;RunDate;RunID;Part;Reactor;Scribe;PocketNumber;Tool ID;Name;Value";
|
||||
QueryFilter = "Hall Rs";
|
||||
Title = "Hall Weekly Verification";
|
||||
HTML = @"Metrology\15 - hall_verif_weekly.html";
|
||||
break;
|
||||
case Test.Lehighton:
|
||||
EquipmentType = EquipmentType.MET08NDFRESIMAP151C;
|
||||
eventName = EventName.FileRead;
|
||||
FileNameWithoutExtension = "lei_iqs_01";
|
||||
Header = "Reactor;Date;Recipe;Lot;Pocket;Scribe;Tool;Name;Value";
|
||||
QueryFilter = "LEI RS Average value";
|
||||
Title = "Lehighton";
|
||||
HTML = @"GaN Epi Data\13 - lehighton.html";
|
||||
break;
|
||||
case Test.VerificationLehighton:
|
||||
EquipmentType = EquipmentType.MET08NDFRESIMAP151C_Verification;
|
||||
eventName = EventName.FileRead;
|
||||
FileNameWithoutExtension = "___";
|
||||
Header = "Reactor;Date;Recipe;Lot;Pocket;Scribe;Tool;Name;Value";
|
||||
QueryFilter = "___";
|
||||
Title = "LEI Weekly Verification 2 Ohm cm";
|
||||
HTML = @"Metrology\14 - lei_verif_weekly.html.html";
|
||||
break;
|
||||
case Test.Microscope:
|
||||
EquipmentType = EquipmentType.MET08MESMICROSCOPE;
|
||||
eventName = EventName.FileRead;
|
||||
FileNameWithoutExtension = string.Empty;
|
||||
Header = string.Empty;
|
||||
QueryFilter = "Microscope Center 5x";
|
||||
Title = "Total Microscope Defects";
|
||||
HTML = string.Empty;
|
||||
break;
|
||||
case Test.RPMXY:
|
||||
EquipmentType = EquipmentType.MET08PLMAPRPM;
|
||||
eventName = EventName.FileRead;
|
||||
FileNameWithoutExtension = "RPM_Data";
|
||||
Header = "Lot;Date;Recipe;Reactor;Scribe;Pocket;Tool;Name;Value";
|
||||
QueryFilter = "Barrier_Composition_RPM_XY";
|
||||
Title = "RPM XY Data ***&*** View Data";
|
||||
HTML = @"GaN Epi Data\09 - rpm --- 08 - photoluminescence.html";
|
||||
break;
|
||||
case Test.RPMAverage:
|
||||
EquipmentType = EquipmentType.MET08PLMAPRPM;
|
||||
eventName = EventName.FileRead;
|
||||
FileNameWithoutExtension = "RPMdata-short";
|
||||
Header = "fProductId;fDate;average;stdDev;fRecipeName;Reactor;g4Scribe;Pocket Number;Tool ID;Recipe From Rpm File";
|
||||
QueryFilter = "Epi Thickness Mean";
|
||||
Title = "RPM Average Data";
|
||||
HTML = @"GaN Epi Data\09 - rpm.html";
|
||||
break;
|
||||
case Test.RPMPLRatio:
|
||||
EquipmentType = EquipmentType.MET08PLMAPRPM;
|
||||
eventName = EventName.FileRead;
|
||||
FileNameWithoutExtension = "PHOTOLUMINESCENCE_data-short";
|
||||
Header = "fProductId;fDate;g4Scribe;fRecipeName;bandEdge_nm;bandEdge_V;yellowBand_Pmw;yellowBand_nm;yellowBand_V;Reactor;Pocket Number;Tool ID";
|
||||
QueryFilter = "PL Ratio";
|
||||
Title = "Photoluminescence: PL Ratio";
|
||||
HTML = @"GaN Epi Data\08 - photoluminescence.html";
|
||||
break;
|
||||
case Test.DailyRPMXY:
|
||||
EquipmentType = EquipmentType.MET08PLMAPRPM_Daily;
|
||||
eventName = EventName.FileReadDaily;
|
||||
FileNameWithoutExtension = "RPM_Data";
|
||||
Header = "Lot;Date;Recipe;Reactor;Scribe;Pocket;Tool;Name;Value";
|
||||
QueryFilter = "Barrier_Composition_RPM_XY";
|
||||
Title = "";
|
||||
HTML = @"Metrology\?";
|
||||
break;
|
||||
case Test.DailyRPMAverage:
|
||||
EquipmentType = EquipmentType.MET08PLMAPRPM_Daily;
|
||||
eventName = EventName.FileReadDaily;
|
||||
FileNameWithoutExtension = "RPMdata-short";
|
||||
Header = "fProductId;fDate;average;stdDev;fRecipeName;Reactor;g4Scribe;Pocket Number;Tool ID;Recipe From Rpm File";
|
||||
QueryFilter = "Epi Thickness Mean";
|
||||
Title = "";
|
||||
HTML = @"Metrology\?";
|
||||
break;
|
||||
case Test.DailyRPMPLRatio:
|
||||
EquipmentType = EquipmentType.MET08PLMAPRPM_Daily;
|
||||
eventName = EventName.FileReadDaily;
|
||||
FileNameWithoutExtension = "PHOTOLUMINESCENCE_data-short";
|
||||
Header = "fProductId;fDate;g4Scribe;fRecipeName;bandEdge_nm;bandEdge_V;yellowBand_Pmw;yellowBand_nm;yellowBand_V;Reactor;Pocket Number;Tool ID";
|
||||
QueryFilter = "PL Ratio";
|
||||
Title = "RPM Daily Verification";
|
||||
HTML = @"Metrology\17 - rpm_verif_daily.html";
|
||||
break;
|
||||
case Test.VerificationRPM:
|
||||
EquipmentType = EquipmentType.MET08PLMAPRPM_Verification;
|
||||
eventName = EventName.FileReadVerification;
|
||||
FileNameWithoutExtension = "PhotoLuminescence_Ver";
|
||||
Header = "Part;Process;Date;Test;Value";
|
||||
QueryFilter = "PL Edge Wavelength";
|
||||
Title = "PL Daily Verification - [PL Edge Wavelength]";
|
||||
HTML = @"Metrology\18 - photoluminescence_verif_daily.html";
|
||||
break;
|
||||
case Test.Photoreflectance:
|
||||
EquipmentType = EquipmentType.MET08PRFUSB4000;
|
||||
eventName = EventName.FileRead;
|
||||
FileNameWithoutExtension = "photoreflect_iqs_01";
|
||||
Header = "Lot;Date;Part;Reactor;Scribe;Pocket;Tool;Point;WaferPosition_PR;PR_Peak";
|
||||
QueryFilter = "PR Barrier Composition";
|
||||
Title = "Photoreflectance 6 in, Photoreflectance 8 in";
|
||||
HTML = @"GaN Epi Data\07 - photoreflectance.html";
|
||||
break;
|
||||
case Test.UV:
|
||||
EquipmentType = EquipmentType.MET08UVH44GS100M;
|
||||
eventName = EventName.FileRead;
|
||||
FileNameWithoutExtension = "uv_iqs_01";
|
||||
Header = string.Empty;
|
||||
QueryFilter = "UV Broken";
|
||||
Title = "UV";
|
||||
HTML = @"GaN Epi Data\15 - uv 2.1.html";
|
||||
break;
|
||||
case Test.VpdIcpmsAnalyte:
|
||||
EquipmentType = EquipmentType.MET08VPDSUBCON;
|
||||
eventName = EventName.FileRead;
|
||||
FileNameWithoutExtension = "VPD_iqs_01";
|
||||
Header = "Reactor;RunID;RunDate;PartNumber;PocketNumber;WaferScribe;Analyte;Value";
|
||||
QueryFilter = "Mg";
|
||||
Title = "VpdIcpmsAnalyteData";
|
||||
HTML = @"";
|
||||
break;
|
||||
case Test.WarpAndBow:
|
||||
EquipmentType = EquipmentType.MET08WGEOMX203641Q;
|
||||
eventName = EventName.FileRead;
|
||||
FileNameWithoutExtension = "warp_iqs_01";
|
||||
Header = "fDate;fRecipeName;fProductId;g4Scribe;warp;bow;tool;Reactor;Pocket ID;bow_range;BowX;BowY;CenterBow";
|
||||
QueryFilter = "BowCenter";
|
||||
Title = "Warp and Bow";
|
||||
HTML = @"GaN Epi Data\14 - warp.html";
|
||||
break;
|
||||
case Test.VerificationWarpAndBow:
|
||||
EquipmentType = EquipmentType.MET08WGEOMX203641Q_Verification;
|
||||
eventName = EventName.FileReadVerification;
|
||||
FileNameWithoutExtension = "warp_ver_iqs_01";
|
||||
Header = "Part;Process;Date;WaferScribe;totWarp;bow";
|
||||
QueryFilter = "Bow Calibration";
|
||||
Title = "6 Inch Warp/Bow Daily Verification, 8 Inch Warp/Bow Daily Verification";
|
||||
HTML = @"Metrology\19 - warp_cal_daily.html";
|
||||
break;
|
||||
case Test.XRDXY:
|
||||
EquipmentType = EquipmentType.MET08XRDXPERTPROMRDXL;
|
||||
eventName = EventName.FileRead;
|
||||
FileNameWithoutExtension = "xrd_iqs_NEW_01";
|
||||
Header = "Reactor;fDate;fRecipeName;Lot;pocketNumber;g4Scribe;ToolID;Name;Value;Group";
|
||||
QueryFilter = "SL Period";
|
||||
Title = "XRD XY Raw Data Viewer";
|
||||
HTML = @"GaN Epi Data\11 - xrd.html";
|
||||
break;
|
||||
case Test.XRDWeightedAverage:
|
||||
EquipmentType = EquipmentType.MET08XRDXPERTPROMRDXL;
|
||||
eventName = EventName.FileRead;
|
||||
FileNameWithoutExtension = "xrd_iqs_NEW_01_WtAVG";
|
||||
Header = "Reactor;fDate;fRecipeName;Lot;pocketNumber;g4Scribe;Name;Value;Group";
|
||||
//QueryFilter = "Al% Barrier WTAVG";
|
||||
QueryFilter = "SL Period WTAVG";
|
||||
Title = "XRD Weighted Average Data";
|
||||
HTML = @"GaN Epi Data\11 - xrd.html";
|
||||
break;
|
||||
case Test.MonthlyXRD:
|
||||
EquipmentType = EquipmentType.MET08XRDXPERTPROMRDXL_Monthly;
|
||||
eventName = EventName.FileReadMonthly;
|
||||
FileNameWithoutExtension = "xrd_monthly_ver_iqs_01";
|
||||
Header = "Part;Process;Date;TestName;Value";
|
||||
QueryFilter = "XRD 2-Theta Position";
|
||||
Title = "XRD Monthly Verification";
|
||||
HTML = @"Metrology\03 - xrd_verif_monthly.html";
|
||||
break;
|
||||
case Test.WeeklyXRD:
|
||||
EquipmentType = EquipmentType.MET08XRDXPERTPROMRDXL_Weekly;
|
||||
eventName = EventName.FileReadWeekly;
|
||||
FileNameWithoutExtension = "xrd_weekly_ver_iqs_01";
|
||||
Header = "Part;Process;Lot;Date;TestName;Value";
|
||||
QueryFilter = "XRD Weekly AL% Center";
|
||||
Title = "XRD Weekly Verification";
|
||||
HTML = @"Metrology\12 - xrd_verif_weekly.html";
|
||||
break;
|
||||
case Test.JVXRD:
|
||||
EquipmentType = EquipmentType.METBRXRAYJV7300L;
|
||||
eventName = EventName.FileRead;
|
||||
FileNameWithoutExtension = "xrd_iqs_NEW_01";
|
||||
Header = "Reactor;fDate;fRecipeName;Lot;pocketNumber;g4Scribe;ToolID;Name;Value;Group";
|
||||
QueryFilter = "SL Period";
|
||||
Title = "XRD XY Raw Data Viewer";
|
||||
HTML = @"GaN Epi Data\11 - xrd.html";
|
||||
break;
|
||||
default:
|
||||
throw new Exception();
|
||||
}
|
||||
FileName = string.Concat(FileNameWithoutExtension, ".txt");
|
||||
return eventName.ToString();
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Concat(EquipmentType, " - (", Enum, "");
|
||||
}
|
||||
|
||||
Enum = test;
|
||||
Test = test;
|
||||
HTML = html;
|
||||
Title = title;
|
||||
FileName = fileName;
|
||||
TestValue = (int)test;
|
||||
Header = string.Empty;
|
||||
QueryFilter = queryFilter;
|
||||
FileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileName);
|
||||
}
|
||||
|
||||
public ScopeInfo(Test test)
|
||||
{
|
||||
Enum = test;
|
||||
Test = test;
|
||||
TestValue = (int)test;
|
||||
switch (Test)
|
||||
{
|
||||
case Test.AFMRoughness:
|
||||
FileNameWithoutExtension = "afm_iqs_01";
|
||||
Header = string.Empty;
|
||||
QueryFilter = "AFM Roughness";
|
||||
Title = "AFM";
|
||||
HTML = @"GaN Epi Data\10 - afm.html";
|
||||
break;
|
||||
case Test.BreakdownVoltageCenter:
|
||||
FileNameWithoutExtension = "bv_iqs_01";
|
||||
Header = "Reactor;fDate;fRecipeName;Lot;fPocketNumber;g4Scribe;BV Position;BV Value;Tool";
|
||||
QueryFilter = "Breakdown Voltage";
|
||||
Title = "Breakdown Voltage-Center";
|
||||
HTML = @"GaN Epi Data\03 - bv-production.html";
|
||||
break;
|
||||
case Test.BreakdownVoltageEdge:
|
||||
FileNameWithoutExtension = "bv_iqs_01_Edge";
|
||||
Header = "Reactor;fDate;fRecipeName;Lot;fPocketNumber;g4Scribe;BV Position;BV Value;Tool";
|
||||
QueryFilter = "Breakdown Voltage - Edge";
|
||||
Title = "Breakdown Voltage-Edge";
|
||||
HTML = @"GaN Epi Data\03 - bv-production.html";
|
||||
break;
|
||||
case Test.BreakdownVoltageMiddle8in:
|
||||
FileNameWithoutExtension = "bv_iqs_01_Middle";
|
||||
Header = "Reactor;fDate;fRecipeName;Lot;fPocketNumber;g4Scribe;BV Position;BV Value;Tool";
|
||||
QueryFilter = "Breakdown Voltage - Middle";
|
||||
Title = "Breakdown Voltage-Middle (8 in)";
|
||||
HTML = @"GaN Epi Data\03 - bv-production.html";
|
||||
break;
|
||||
case Test.CV:
|
||||
FileNameWithoutExtension = "cv_iqs_01";
|
||||
Header = "Reactor;fDate;fPart;Lot;pocketNumber;g4Scribe;Position;Vp;NdMin;Tool ID;CV Ns;CV Cap";
|
||||
QueryFilter = "CV_Ns";
|
||||
Title = "CV";
|
||||
HTML = @"GaN Epi Data\05 - cv.html";
|
||||
break;
|
||||
case Test.MonthlyCV:
|
||||
FileNameWithoutExtension = "cv_iqs_01";
|
||||
Header = "Reactor;fDate;fPart;Lot;pocketNumber;g4Scribe;Position;Vp;NdMin;Tool ID;CV Ns;CV Cap";
|
||||
QueryFilter = "CV_Ns";
|
||||
Title = "CV Monthly Verification";
|
||||
HTML = @"Metrology\07 - cv_verif_monthly.html";
|
||||
break;
|
||||
case Test.WeeklyCV:
|
||||
FileNameWithoutExtension = "cv_iqs_01";
|
||||
Header = "Reactor;fDate;fPart;Lot;pocketNumber;g4Scribe;Position;Vp;NdMin;Tool ID;CV Ns;CV Cap";
|
||||
QueryFilter = "CV_Ns";
|
||||
Title = "CV Weekly Verification";
|
||||
HTML = @"Metrology\16 - cv_verif_weekly.html";
|
||||
break;
|
||||
case Test.CandelaKlarfDC:
|
||||
FileNameWithoutExtension = "candela_iqs_01";
|
||||
Header = "LotID;OperatorID;RecipeName;CandelaRecipe;WaferID;PocketNumber;RunDate;Epi;SlipLines;Cracks;EpiDef;HazeSpot;SmallLpd;MediumLpd;LargeLpd;Cracks_A;Spirals;Craters;8620 Small;Pits;Tool ID;Defect Count";
|
||||
QueryFilter = "Candela Cracking";
|
||||
Title = "Candela";
|
||||
HTML = @"GaN Epi Data\12 - candela.html";
|
||||
break;
|
||||
case Test.CandelaLaser:
|
||||
FileNameWithoutExtension = "candela_iqs_01";
|
||||
Header = "LotID;OperatorID;RecipeName;CandelaRecipe;WaferID;PocketNumber;RunDate;Epi;SlipLines;Cracks;EpiDef;HazeSpot;SmallLpd;MediumLpd;LargeLpd;Cracks_A;Spirals;Craters;Pits;Tool ID;Defect Count";
|
||||
QueryFilter = "Candela Cracking";
|
||||
Title = "Candela";
|
||||
HTML = @"GaN Epi Data\12 - candela.html";
|
||||
break;
|
||||
case Test.CandelaVerify:
|
||||
FileNameWithoutExtension = "candela_iqs_01";
|
||||
Header = string.Concat("LotID;OperatorID;RecipeName;CandelaRecipe;WaferID;PocketNumber;RunDate;RunID;Reactor;", "Slip Lines;Cracks;Epi Def;Haze Spot;Small LPD;Medium LPD;Large LPD;Cracks_A;Spirals;Craters;8620 Small;Pits;Tool ID;Defect Count");
|
||||
QueryFilter = "Candela Cracking";
|
||||
Title = "Candela";
|
||||
HTML = @"GaN Epi Data\12 - candela.html";
|
||||
break;
|
||||
case Test.CandelaPSL:
|
||||
FileNameWithoutExtension = "candela_iqs_01";
|
||||
Header = string.Empty;
|
||||
QueryFilter = "102-83nm";
|
||||
Title = "Candela";
|
||||
HTML = @"GaN Epi Data\12 - candela.html";
|
||||
break;
|
||||
case Test.CandelaProdU:
|
||||
FileNameWithoutExtension = "candela_iqs_01";
|
||||
Header = string.Empty;
|
||||
QueryFilter = "SPE verification";
|
||||
Title = "Candela";
|
||||
HTML = @"GaN Epi Data\12 - candela.html";
|
||||
break;
|
||||
case Test.Denton:
|
||||
FileNameWithoutExtension = "denton_iqs_01";
|
||||
Header = "Tool;fDate;Run;Recipe;Operator;Name;Value";
|
||||
QueryFilter = "Denton_Voltage_AVG";
|
||||
Title = "Denton Data";
|
||||
HTML = @"Support Process\03 - ebeam02_denton_v1.html";
|
||||
break;
|
||||
case Test.Hall:
|
||||
FileNameWithoutExtension = "hall_iqs_01";
|
||||
Header = "Lot;Tool;TimeDate;RunDate;RunID;Part;Reactor;Scribe;PocketNumber;Tool ID;Name;Value";
|
||||
QueryFilter = "Hall Rs";
|
||||
Title = "Hall Data";
|
||||
HTML = @"GaN Epi Data\04 - hall.html";
|
||||
break;
|
||||
case Test.MonthlyHall:
|
||||
FileNameWithoutExtension = "hall_iqs_01";
|
||||
Header = "Lot;Tool;TimeDate;RunDate;RunID;Part;Reactor;Scribe;PocketNumber;Tool ID;Name;Value";
|
||||
QueryFilter = "Hall Rs";
|
||||
Title = "Hall Monthly Verification";
|
||||
HTML = @"Metrology\06 - hall_verif_monthly.html";
|
||||
break;
|
||||
case Test.WeeklyHall:
|
||||
FileNameWithoutExtension = "hall_iqs_01";
|
||||
Header = "Lot;Tool;TimeDate;RunDate;RunID;Part;Reactor;Scribe;PocketNumber;Tool ID;Name;Value";
|
||||
QueryFilter = "Hall Rs";
|
||||
Title = "Hall Weekly Verification";
|
||||
HTML = @"Metrology\15 - hall_verif_weekly.html";
|
||||
break;
|
||||
case Test.Lehighton:
|
||||
FileNameWithoutExtension = "lei_iqs_01";
|
||||
Header = "Reactor;Date;Recipe;Lot;Pocket;Scribe;Tool;Name;Value";
|
||||
QueryFilter = "LEI RS Average value";
|
||||
Title = "Lehighton";
|
||||
HTML = @"GaN Epi Data\13 - lehighton.html";
|
||||
break;
|
||||
case Test.VerificationLehighton:
|
||||
FileNameWithoutExtension = "___";
|
||||
Header = "Reactor;Date;Recipe;Lot;Pocket;Scribe;Tool;Name;Value";
|
||||
QueryFilter = "___";
|
||||
Title = "LEI Weekly Verification 2 Ohm cm";
|
||||
HTML = @"Metrology\14 - lei_verif_weekly.html.html";
|
||||
break;
|
||||
case Test.Microscope:
|
||||
FileNameWithoutExtension = string.Empty;
|
||||
Header = string.Empty;
|
||||
QueryFilter = "Microscope Center 5x";
|
||||
Title = "Total Microscope Defects";
|
||||
HTML = string.Empty;
|
||||
break;
|
||||
case Test.RPMXY:
|
||||
FileNameWithoutExtension = "RPM_Data";
|
||||
Header = "Lot;Date;Recipe;Reactor;Scribe;Pocket;Tool;Name;Value";
|
||||
QueryFilter = "Barrier_Composition_RPM_XY";
|
||||
Title = "RPM XY Data ***&*** View Data";
|
||||
HTML = @"GaN Epi Data\09 - rpm --- 08 - photoluminescence.html";
|
||||
break;
|
||||
case Test.RPMAverage:
|
||||
FileNameWithoutExtension = "RPMdata-short";
|
||||
Header = "fProductId;fDate;average;stdDev;fRecipeName;Reactor;g4Scribe;Pocket Number;Tool ID;Recipe From Rpm File";
|
||||
QueryFilter = "Epi Thickness Mean";
|
||||
Title = "RPM Average Data";
|
||||
HTML = @"GaN Epi Data\09 - rpm.html";
|
||||
break;
|
||||
case Test.RPMPLRatio:
|
||||
FileNameWithoutExtension = "PHOTOLUMINESCENCE_data-short";
|
||||
Header = "fProductId;fDate;g4Scribe;fRecipeName;bandEdge_nm;bandEdge_V;yellowBand_Pmw;yellowBand_nm;yellowBand_V;Reactor;Pocket Number;Tool ID";
|
||||
QueryFilter = "PL Ratio";
|
||||
Title = "Photoluminescence: PL Ratio";
|
||||
HTML = @"GaN Epi Data\08 - photoluminescence.html";
|
||||
break;
|
||||
case Test.DailyRPMXY:
|
||||
FileNameWithoutExtension = "RPM_Data";
|
||||
Header = "Lot;Date;Recipe;Reactor;Scribe;Pocket;Tool;Name;Value";
|
||||
QueryFilter = "Barrier_Composition_RPM_XY";
|
||||
Title = "";
|
||||
HTML = @"Metrology\?";
|
||||
break;
|
||||
case Test.DailyRPMAverage:
|
||||
FileNameWithoutExtension = "RPMdata-short";
|
||||
Header = "fProductId;fDate;average;stdDev;fRecipeName;Reactor;g4Scribe;Pocket Number;Tool ID;Recipe From Rpm File";
|
||||
QueryFilter = "Epi Thickness Mean";
|
||||
Title = "";
|
||||
HTML = @"Metrology\?";
|
||||
break;
|
||||
case Test.DailyRPMPLRatio:
|
||||
FileNameWithoutExtension = "PHOTOLUMINESCENCE_data-short";
|
||||
Header = "fProductId;fDate;g4Scribe;fRecipeName;bandEdge_nm;bandEdge_V;yellowBand_Pmw;yellowBand_nm;yellowBand_V;Reactor;Pocket Number;Tool ID";
|
||||
QueryFilter = "PL Ratio";
|
||||
Title = "RPM Daily Verification";
|
||||
HTML = @"Metrology\17 - rpm_verif_daily.html";
|
||||
break;
|
||||
case Test.VerificationRPM:
|
||||
FileNameWithoutExtension = "PhotoLuminescence_Ver";
|
||||
Header = "Part;Process;Date;Test;Value";
|
||||
QueryFilter = "PL Edge Wavelength";
|
||||
Title = "PL Daily Verification - [PL Edge Wavelength]";
|
||||
HTML = @"Metrology\18 - photoluminescence_verif_daily.html";
|
||||
break;
|
||||
case Test.Photoreflectance:
|
||||
FileNameWithoutExtension = "photoreflect_iqs_01";
|
||||
Header = "Lot;Date;Part;Reactor;Scribe;Pocket;Tool;Point;WaferPosition_PR;PR_Peak";
|
||||
QueryFilter = "PR Barrier Composition";
|
||||
Title = "Photoreflectance 6 in, Photoreflectance 8 in";
|
||||
HTML = @"GaN Epi Data\07 - photoreflectance.html";
|
||||
break;
|
||||
case Test.UV:
|
||||
FileNameWithoutExtension = "uv_iqs_01";
|
||||
Header = string.Empty;
|
||||
QueryFilter = "UV Broken";
|
||||
Title = "UV";
|
||||
HTML = @"GaN Epi Data\15 - uv 2.1.html";
|
||||
break;
|
||||
case Test.VpdIcpmsAnalyte:
|
||||
FileNameWithoutExtension = "VPD_iqs_01";
|
||||
Header = "Reactor;RunID;RunDate;PartNumber;PocketNumber;WaferScribe;Analyte;Value";
|
||||
QueryFilter = "Mg";
|
||||
Title = "VpdIcpmsAnalyteData";
|
||||
HTML = @"";
|
||||
break;
|
||||
case Test.WarpAndBow:
|
||||
FileNameWithoutExtension = "warp_iqs_01";
|
||||
Header = "fDate;fRecipeName;fProductId;g4Scribe;warp;bow;tool;Reactor;Pocket ID;bow_range;BowX;BowY;CenterBow";
|
||||
QueryFilter = "BowCenter";
|
||||
Title = "Warp and Bow";
|
||||
HTML = @"GaN Epi Data\14 - warp.html";
|
||||
break;
|
||||
case Test.VerificationWarpAndBow:
|
||||
FileNameWithoutExtension = "warp_ver_iqs_01";
|
||||
Header = "Part;Process;Date;WaferScribe;totWarp;bow";
|
||||
QueryFilter = "Bow Calibration";
|
||||
Title = "6 Inch Warp/Bow Daily Verification, 8 Inch Warp/Bow Daily Verification";
|
||||
HTML = @"Metrology\19 - warp_cal_daily.html";
|
||||
break;
|
||||
case Test.XRDXY:
|
||||
FileNameWithoutExtension = "xrd_iqs_NEW_01";
|
||||
Header = "Reactor;fDate;fRecipeName;Lot;pocketNumber;g4Scribe;ToolID;Name;Value;Group";
|
||||
QueryFilter = "SL Period";
|
||||
Title = "XRD XY Raw Data Viewer";
|
||||
HTML = @"GaN Epi Data\11 - xrd.html";
|
||||
break;
|
||||
case Test.XRDWeightedAverage:
|
||||
FileNameWithoutExtension = "xrd_iqs_NEW_01_WtAVG";
|
||||
Header = "Reactor;fDate;fRecipeName;Lot;pocketNumber;g4Scribe;Name;Value;Group";
|
||||
//QueryFilter = "Al% Barrier WTAVG";
|
||||
QueryFilter = "SL Period WTAVG";
|
||||
Title = "XRD Weighted Average Data";
|
||||
HTML = @"GaN Epi Data\11 - xrd.html";
|
||||
break;
|
||||
case Test.MonthlyXRD:
|
||||
FileNameWithoutExtension = "xrd_monthly_ver_iqs_01";
|
||||
Header = "Part;Process;Date;TestName;Value";
|
||||
QueryFilter = "XRD 2-Theta Position";
|
||||
Title = "XRD Monthly Verification";
|
||||
HTML = @"Metrology\03 - xrd_verif_monthly.html";
|
||||
break;
|
||||
case Test.WeeklyXRD:
|
||||
FileNameWithoutExtension = "xrd_weekly_ver_iqs_01";
|
||||
Header = "Part;Process;Lot;Date;TestName;Value";
|
||||
QueryFilter = "XRD Weekly AL% Center";
|
||||
Title = "XRD Weekly Verification";
|
||||
HTML = @"Metrology\12 - xrd_verif_weekly.html";
|
||||
break;
|
||||
case Test.JVXRD:
|
||||
FileNameWithoutExtension = "xrd_iqs_NEW_01";
|
||||
Header = "Reactor;fDate;fRecipeName;Lot;pocketNumber;g4Scribe;ToolID;Name;Value;Group";
|
||||
QueryFilter = "SL Period";
|
||||
Title = "XRD XY Raw Data Viewer";
|
||||
HTML = @"GaN Epi Data\11 - xrd.html";
|
||||
break;
|
||||
default:
|
||||
throw new Exception();
|
||||
}
|
||||
FileName = string.Concat(FileNameWithoutExtension, ".txt");
|
||||
}
|
||||
|
||||
public ScopeInfo ShallowCopy() => (ScopeInfo)MemberwiseClone();
|
||||
|
||||
}
|
@ -1,57 +0,0 @@
|
||||
namespace Adaptation.Shared.Metrology
|
||||
{
|
||||
|
||||
public enum Test
|
||||
{
|
||||
AFMRoughness = 34,
|
||||
BioRadQS408M = 25,
|
||||
BioRadStratus = 26,
|
||||
BreakdownVoltageCenter = 0,
|
||||
BreakdownVoltageEdge = 1,
|
||||
BreakdownVoltageMiddle8in = 2,
|
||||
CandelaKlarfDC = 6,
|
||||
CandelaLaser = 36,
|
||||
CandelaProdU = 39,
|
||||
CandelaPSL = 38,
|
||||
CandelaVerify = 37,
|
||||
CDE = 24,
|
||||
CV = 3,
|
||||
DailyRPMAverage = 19,
|
||||
DailyRPMPLRatio = 20,
|
||||
DailyRPMXY = 18,
|
||||
Denton = 9,
|
||||
DiffusionLength = 45,
|
||||
Hall = 10,
|
||||
HgCV = 23,
|
||||
Lehighton = 13,
|
||||
Microscope = 46,
|
||||
MonthlyCV = 4,
|
||||
MonthlyHall = 11,
|
||||
MonthlyXRD = 32,
|
||||
Photoreflectance = 22,
|
||||
PlatoA = 48, //Largest
|
||||
RPMAverage = 16,
|
||||
RPMPLRatio = 17,
|
||||
RPMXY = 15,
|
||||
SP1 = 8,
|
||||
Tencor = 7,
|
||||
UV = 35,
|
||||
VerificationLehighton = 14,
|
||||
VerificationRPM = 21,
|
||||
VerificationWarpAndBow = 29,
|
||||
VpdIcpmsAnalyte = 27,
|
||||
WarpAndBow = 28,
|
||||
WeeklyCV = 5,
|
||||
WeeklyHall = 12,
|
||||
WeeklyXRD = 33,
|
||||
WeeklyXRDAIcomp = 40,
|
||||
WeeklyXRDFWHM002 = 41,
|
||||
WeeklyXRDFWHM105 = 42,
|
||||
WeeklyXRDSLStks = 43,
|
||||
WeeklyXRDXRR = 44,
|
||||
XRDWeightedAverage = 31,
|
||||
JVXRD = 47,
|
||||
XRDXY = 30
|
||||
}
|
||||
|
||||
}
|
@ -1,22 +1,19 @@
|
||||
namespace Adaptation.Shared.Metrology
|
||||
namespace Adaptation.Shared.Metrology;
|
||||
|
||||
public partial class WS
|
||||
{
|
||||
|
||||
public partial class WS
|
||||
public class Attachment
|
||||
{
|
||||
public class Attachment
|
||||
|
||||
public string UniqueId { get; set; }
|
||||
public string DestinationFileName { get; set; }
|
||||
public string SourceFileName { get; set; }
|
||||
|
||||
public Attachment(string uniqueId, string destinationFileName, string sourceFileName)
|
||||
{
|
||||
|
||||
public string UniqueId { get; set; }
|
||||
public string DestinationFileName { get; set; }
|
||||
public string SourceFileName { get; set; }
|
||||
|
||||
public Attachment(string uniqueId, string destinationFileName, string sourceFileName)
|
||||
{
|
||||
UniqueId = uniqueId;
|
||||
DestinationFileName = destinationFileName;
|
||||
SourceFileName = sourceFileName;
|
||||
}
|
||||
|
||||
UniqueId = uniqueId;
|
||||
DestinationFileName = destinationFileName;
|
||||
SourceFileName = sourceFileName;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,33 +1,27 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Adaptation.Shared.Metrology
|
||||
namespace Adaptation.Shared.Metrology;
|
||||
|
||||
public partial class WS
|
||||
{
|
||||
|
||||
public partial class WS
|
||||
// this class represents the response from the Inbound API endpoint
|
||||
public class Results
|
||||
{
|
||||
// this class represents the response from the Inbound API endpoint
|
||||
public class Results
|
||||
{
|
||||
// true or false if data was written to the database
|
||||
public bool Success { get; set; }
|
||||
// true or false if data was written to the database
|
||||
public bool Success { get; set; }
|
||||
|
||||
// if true, contains ID of the Header record in the database
|
||||
public long HeaderID { get; set; }
|
||||
// if true, contains ID of the Header record in the database
|
||||
public long HeaderID { get; set; }
|
||||
|
||||
// if false, this collection will contain a list of errors
|
||||
public List<string> Errors { get; set; }
|
||||
// if false, this collection will contain a list of errors
|
||||
public List<string> Errors { get; set; }
|
||||
|
||||
// this collection will contain a list of warnings, they will not prevent data from being saved
|
||||
public List<string> Warnings { get; set; }
|
||||
|
||||
// this is just a helper function to make displaying the results easier
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonSerializer.Serialize(this, GetType());
|
||||
}
|
||||
}
|
||||
// this collection will contain a list of warnings, they will not prevent data from being saved
|
||||
public List<string> Warnings { get; set; }
|
||||
|
||||
// this is just a helper function to make displaying the results easier
|
||||
public override string ToString() => JsonSerializer.Serialize(this, GetType());
|
||||
}
|
||||
|
||||
}
|
@ -1,127 +1,123 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Adaptation.Shared.Metrology
|
||||
namespace Adaptation.Shared.Metrology;
|
||||
|
||||
public partial class WS
|
||||
{
|
||||
|
||||
public partial class WS
|
||||
public static Tuple<string, Results> SendData(string url, object payload, int timeoutSeconds = 120)
|
||||
{
|
||||
|
||||
public static Tuple<string, Results> SendData(string url, object payload, int timeoutSeconds = 120)
|
||||
Results results = new();
|
||||
string resultsJson = string.Empty;
|
||||
try
|
||||
{
|
||||
Results results = new Results();
|
||||
string resultsJson = string.Empty;
|
||||
try
|
||||
string json = JsonSerializer.Serialize(payload, payload.GetType());
|
||||
if (string.IsNullOrEmpty(url) || !url.Contains(':') || !url.Contains('.'))
|
||||
throw new Exception("Invalid URL");
|
||||
using (HttpClient httpClient = new())
|
||||
{
|
||||
string json = JsonSerializer.Serialize(payload, payload.GetType());
|
||||
if (string.IsNullOrEmpty(url) || !url.Contains(":") || !url.Contains("."))
|
||||
throw new Exception("Invalid URL");
|
||||
using (HttpClient httpClient = new HttpClient())
|
||||
{
|
||||
httpClient.Timeout = new TimeSpan(0, 0, 0, timeoutSeconds, 0);
|
||||
HttpRequestMessage httpRequestMessage = new HttpRequestMessage
|
||||
{
|
||||
RequestUri = new Uri(url),
|
||||
Method = HttpMethod.Post,
|
||||
Content = new StringContent(json, Encoding.UTF8, "application/json")
|
||||
};
|
||||
HttpResponseMessage httpResponseMessage = httpClient.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseContentRead).Result;
|
||||
resultsJson = httpResponseMessage.Content.ReadAsStringAsync().Result;
|
||||
results = JsonSerializer.Deserialize<Results>(resultsJson);
|
||||
}
|
||||
if (!results.Success)
|
||||
results.Errors.Add(results.ToString());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Exception exception = e;
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
while (!(exception is null))
|
||||
{
|
||||
stringBuilder.AppendLine(exception.Message);
|
||||
exception = exception.InnerException;
|
||||
}
|
||||
if (results.Errors is null)
|
||||
results.Errors = new List<string>();
|
||||
results.Errors.Add(stringBuilder.ToString());
|
||||
}
|
||||
return new Tuple<string, Results>(resultsJson, results);
|
||||
}
|
||||
|
||||
// this method is a wrapper for attaching a file to either a header or data record
|
||||
// URL is the same URL used for SendData, ex: http://localhost/api/inbound/CDE
|
||||
// attachToHeaderId is the ID returned by SendData
|
||||
// attachToDataUniqueId is the string unique ID for the data record, aka the Title of the Sharepoint list entry
|
||||
// fileContents is a byte array with the contents of the file
|
||||
// fileName is which attachment this is, image.pdf, data.pdf, data.txt, header.pdf, etc
|
||||
// timeoutSeconds is configured as the request timeout
|
||||
// this method will either succeed or throw an exception
|
||||
// also, this has been made synchronous
|
||||
public static void AttachFile(string url, long attachToHeaderId, string attachToDataUniqueId, byte[] fileContents, string fileName, int timeoutSeconds = 60)
|
||||
{
|
||||
using (HttpClient httpClient = new HttpClient())
|
||||
{
|
||||
string requestUrl = url + "/attachment?headerid=" + attachToHeaderId.ToString();
|
||||
if (!string.IsNullOrWhiteSpace(attachToDataUniqueId))
|
||||
{
|
||||
requestUrl += "&datauniqueid=";
|
||||
requestUrl += System.Net.WebUtility.UrlEncode(attachToDataUniqueId);
|
||||
}
|
||||
requestUrl += "&filename="; // this is just so the web server log shows the filename
|
||||
requestUrl += System.Net.WebUtility.UrlEncode(fileName);
|
||||
|
||||
httpClient.Timeout = new TimeSpan(0, 0, 0, timeoutSeconds, 0);
|
||||
|
||||
MultipartFormDataContent multipartFormDataContent = new MultipartFormDataContent();
|
||||
ByteArrayContent byteArrayContent = new ByteArrayContent(fileContents);
|
||||
byteArrayContent.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/octet-stream");
|
||||
|
||||
multipartFormDataContent.Add(byteArrayContent, "attachment", fileName);
|
||||
|
||||
HttpResponseMessage httpResponseMessage = httpClient.PostAsync(requestUrl, multipartFormDataContent).Result;
|
||||
|
||||
if (httpResponseMessage.IsSuccessStatusCode)
|
||||
return;
|
||||
|
||||
string resultBody = httpResponseMessage.Content.ReadAsStringAsync().Result;
|
||||
|
||||
throw new Exception("Attachment failed: " + resultBody);
|
||||
HttpRequestMessage httpRequestMessage = new()
|
||||
{
|
||||
RequestUri = new Uri(url),
|
||||
Method = HttpMethod.Post,
|
||||
Content = new StringContent(json, Encoding.UTF8, "application/json")
|
||||
};
|
||||
HttpResponseMessage httpResponseMessage = httpClient.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseContentRead).Result;
|
||||
resultsJson = httpResponseMessage.Content.ReadAsStringAsync().Result;
|
||||
results = JsonSerializer.Deserialize<Results>(resultsJson);
|
||||
}
|
||||
if (!results.Success)
|
||||
results.Errors.Add(results.ToString());
|
||||
}
|
||||
|
||||
public static void AttachFiles(string url, long headerID, List<Attachment> headerAttachments = null, List<Attachment> dataAttachments = null)
|
||||
catch (Exception e)
|
||||
{
|
||||
try
|
||||
Exception exception = e;
|
||||
StringBuilder stringBuilder = new();
|
||||
while (exception is not null)
|
||||
{
|
||||
if (!(headerAttachments is null))
|
||||
{
|
||||
foreach (Attachment attachment in headerAttachments)
|
||||
AttachFile(url, headerID, "", System.IO.File.ReadAllBytes(attachment.SourceFileName), attachment.DestinationFileName);
|
||||
}
|
||||
if (!(dataAttachments is null))
|
||||
{
|
||||
foreach (Attachment attachment in dataAttachments)
|
||||
AttachFile(url, headerID, attachment.UniqueId, System.IO.File.ReadAllBytes(attachment.SourceFileName), attachment.DestinationFileName);
|
||||
}
|
||||
//MessageBox.Show(r.ToString());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Exception exception = e;
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
while (!(exception is null))
|
||||
{
|
||||
stringBuilder.AppendLine(exception.Message);
|
||||
exception = exception.InnerException;
|
||||
}
|
||||
//MessageBox.Show(msgs.ToString(), "Exception", //MessageBoxButtons.OK, //MessageBoxIcon.Error);
|
||||
throw new Exception(stringBuilder.ToString());
|
||||
_ = stringBuilder.AppendLine(exception.Message);
|
||||
exception = exception.InnerException;
|
||||
}
|
||||
if (results.Errors is null)
|
||||
results.Errors = new List<string>();
|
||||
results.Errors.Add(stringBuilder.ToString());
|
||||
}
|
||||
return new Tuple<string, Results>(resultsJson, results);
|
||||
}
|
||||
|
||||
// this method is a wrapper for attaching a file to either a header or data record
|
||||
// URL is the same URL used for SendData, ex: http://localhost/api/inbound/CDE
|
||||
// attachToHeaderId is the ID returned by SendData
|
||||
// attachToDataUniqueId is the string unique ID for the data record, aka the Title of the Sharepoint list entry
|
||||
// fileContents is a byte array with the contents of the file
|
||||
// fileName is which attachment this is, image.pdf, data.pdf, data.txt, header.pdf, etc
|
||||
// timeoutSeconds is configured as the request timeout
|
||||
// this method will either succeed or throw an exception
|
||||
// also, this has been made synchronous
|
||||
public static void AttachFile(string url, long attachToHeaderId, string attachToDataUniqueId, byte[] fileContents, string fileName, int timeoutSeconds = 60)
|
||||
{
|
||||
using HttpClient httpClient = new();
|
||||
string requestUrl = url + "/attachment?headerid=" + attachToHeaderId.ToString();
|
||||
if (!string.IsNullOrWhiteSpace(attachToDataUniqueId))
|
||||
{
|
||||
requestUrl += "&datauniqueid=";
|
||||
requestUrl += System.Net.WebUtility.UrlEncode(attachToDataUniqueId);
|
||||
}
|
||||
requestUrl += "&filename="; // this is just so the web server log shows the filename
|
||||
requestUrl += System.Net.WebUtility.UrlEncode(fileName);
|
||||
|
||||
httpClient.Timeout = new TimeSpan(0, 0, 0, timeoutSeconds, 0);
|
||||
|
||||
MultipartFormDataContent multipartFormDataContent = new();
|
||||
ByteArrayContent byteArrayContent = new(fileContents);
|
||||
byteArrayContent.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/octet-stream");
|
||||
|
||||
multipartFormDataContent.Add(byteArrayContent, "attachment", fileName);
|
||||
|
||||
HttpResponseMessage httpResponseMessage = httpClient.PostAsync(requestUrl, multipartFormDataContent).Result;
|
||||
|
||||
if (httpResponseMessage.IsSuccessStatusCode)
|
||||
return;
|
||||
|
||||
string resultBody = httpResponseMessage.Content.ReadAsStringAsync().Result;
|
||||
|
||||
throw new Exception("Attachment failed: " + resultBody);
|
||||
}
|
||||
|
||||
public static void AttachFiles(string url, long headerID, List<Attachment> headerAttachments = null, List<Attachment> dataAttachments = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (headerAttachments is not null)
|
||||
{
|
||||
foreach (Attachment attachment in headerAttachments)
|
||||
AttachFile(url, headerID, "", System.IO.File.ReadAllBytes(attachment.SourceFileName), attachment.DestinationFileName);
|
||||
}
|
||||
if (dataAttachments is not null)
|
||||
{
|
||||
foreach (Attachment attachment in dataAttachments)
|
||||
AttachFile(url, headerID, attachment.UniqueId, System.IO.File.ReadAllBytes(attachment.SourceFileName), attachment.DestinationFileName);
|
||||
}
|
||||
//MessageBox.Show(r.ToString());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Exception exception = e;
|
||||
StringBuilder stringBuilder = new();
|
||||
while (exception is not null)
|
||||
{
|
||||
_ = stringBuilder.AppendLine(exception.Message);
|
||||
exception = exception.InnerException;
|
||||
}
|
||||
//MessageBox.Show(msgs.ToString(), "Exception", //MessageBoxButtons.OK, //MessageBoxIcon.Error);
|
||||
throw new Exception(stringBuilder.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user