Removed IQS.Copy Dual write PDSF for Metrology Viewer Version Error Message MetrologyViewerFileShare Tests passed net8.0 v2_52_0-Tests editorconfig yml ec fix yml explict contents Delete File if Exists dotnet_diagnostic Removed Open Insight API IFX Directory from Save CA1862 and GetWeekOfYear for WritePDSF gitignore cellInstanceVersion.EdaConnection.PortNumber Added Climatec to Test.cs GetJobIdDirectory Remove and 5-Other-Small NETFRAMEWORK
317 lines
11 KiB
C#
317 lines
11 KiB
C#
using Adaptation.Shared;
|
|
using Adaptation.Shared.Methods;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text.Json;
|
|
|
|
namespace Adaptation.FileHandlers.txt;
|
|
|
|
public class Description : IDescription, Shared.Properties.IDescription
|
|
{
|
|
|
|
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; }
|
|
public string Employee { get; set; }
|
|
public string Lot { get; set; }
|
|
public string PSN { get; set; }
|
|
public string Reactor { get; set; }
|
|
public string Recipe { get; set; }
|
|
//
|
|
public string AutoOptimizeGain { get; set; }
|
|
public string AutoProbeHeightSet { get; set; }
|
|
public string Avg { get; set; }
|
|
public string DataReject { get; set; }
|
|
public string DLRatio { get; set; }
|
|
public string Merit { get; set; }
|
|
public string Pt { get; set; }
|
|
public string R { get; set; }
|
|
public string ResistivitySpec { get; set; }
|
|
public string Rs { get; set; }
|
|
public string SemiRadial { get; set; }
|
|
public string StdDev { get; set; }
|
|
public string T { get; set; }
|
|
public string Temp { get; set; }
|
|
//
|
|
public string Engineer { get; set; }
|
|
public string EquipId { get; set; }
|
|
public string FileName { get; set; }
|
|
public string HeaderUniqueId { get; set; }
|
|
public string Id { get; set; }
|
|
public string Layer { get; set; }
|
|
public string RDS { get; set; }
|
|
public string Run { get; set; }
|
|
public string UniqueId { get; set; }
|
|
public string Zone { get; set; }
|
|
//
|
|
public string SheetRhoVariation { get; set; }
|
|
|
|
string IDescription.GetEventDescription() => "File Has been read and parsed";
|
|
|
|
List<string> IDescription.GetNames(IFileRead fileRead, Logistics logistics)
|
|
{
|
|
List<string> results = new();
|
|
IDescription description = GetDefault(fileRead, logistics);
|
|
string json = JsonSerializer.Serialize(description, description.GetType());
|
|
object @object = JsonSerializer.Deserialize<object>(json);
|
|
if (@object is not JsonElement jsonElement)
|
|
throw new Exception();
|
|
foreach (JsonProperty jsonProperty in jsonElement.EnumerateObject())
|
|
results.Add(jsonProperty.Name);
|
|
return results;
|
|
}
|
|
|
|
List<string> IDescription.GetDetailNames()
|
|
{
|
|
List<string> results = new()
|
|
{
|
|
nameof(AutoOptimizeGain),
|
|
nameof(AutoProbeHeightSet),
|
|
nameof(Avg),
|
|
nameof(DataReject),
|
|
nameof(DLRatio),
|
|
nameof(Merit),
|
|
nameof(Pt),
|
|
nameof(R),
|
|
nameof(ResistivitySpec),
|
|
nameof(Rs),
|
|
nameof(SemiRadial),
|
|
nameof(StdDev),
|
|
nameof(T),
|
|
nameof(Temp)
|
|
};
|
|
return results;
|
|
}
|
|
|
|
List<string> IDescription.GetHeaderNames()
|
|
{
|
|
List<string> results = new()
|
|
{
|
|
nameof(Date),
|
|
nameof(Employee),
|
|
nameof(Lot),
|
|
nameof(PSN),
|
|
nameof(Reactor),
|
|
nameof(Recipe)
|
|
};
|
|
return results;
|
|
}
|
|
|
|
IDescription IDescription.GetDisplayNames()
|
|
{
|
|
Description result = GetDisplayNames();
|
|
return result;
|
|
}
|
|
|
|
List<string> IDescription.GetParameterNames()
|
|
{
|
|
List<string> results = new()
|
|
{
|
|
nameof(Engineer),
|
|
nameof(EquipId),
|
|
nameof(FileName),
|
|
nameof(HeaderUniqueId),
|
|
nameof(Id),
|
|
nameof(Layer),
|
|
nameof(RDS),
|
|
nameof(Run),
|
|
nameof(UniqueId),
|
|
nameof(Zone),
|
|
nameof(SheetRhoVariation),
|
|
};
|
|
return results;
|
|
}
|
|
|
|
JsonProperty[] IDescription.GetDefault(IFileRead fileRead, Logistics logistics)
|
|
{
|
|
JsonProperty[] results;
|
|
IDescription description = GetDefault(fileRead, logistics);
|
|
string json = JsonSerializer.Serialize(description, description.GetType());
|
|
object @object = JsonSerializer.Deserialize<object>(json);
|
|
results = ((JsonElement)@object).EnumerateObject().ToArray();
|
|
return results;
|
|
}
|
|
|
|
List<string> IDescription.GetPairedParameterNames()
|
|
{
|
|
List<string> results = new();
|
|
return results;
|
|
}
|
|
|
|
List<string> IDescription.GetIgnoreParameterNames(Test test)
|
|
{
|
|
List<string> results = new();
|
|
return results;
|
|
}
|
|
|
|
IDescription IDescription.GetDefaultDescription(IFileRead fileRead, Logistics logistics)
|
|
{
|
|
Description result = GetDefault(fileRead, logistics);
|
|
return result;
|
|
}
|
|
|
|
Dictionary<string, string> IDescription.GetDisplayNamesJsonElement(IFileRead fileRead)
|
|
{
|
|
Dictionary<string, string> results = new();
|
|
IDescription description = GetDisplayNames();
|
|
string json = JsonSerializer.Serialize(description, description.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;
|
|
}
|
|
|
|
List<IDescription> IDescription.GetDescriptions(IFileRead fileRead, Logistics logistics, List<Test> tests, IProcessData iProcessData)
|
|
{
|
|
List<IDescription> results = new();
|
|
if (iProcessData is null || iProcessData.Details.Count == 0 || iProcessData is not ProcessData processData)
|
|
results.Add(GetDefault(fileRead, logistics));
|
|
else
|
|
{
|
|
string nullData;
|
|
Description description;
|
|
object configDataNullData = fileRead.NullData;
|
|
if (configDataNullData is null)
|
|
nullData = string.Empty;
|
|
else
|
|
nullData = configDataNullData.ToString();
|
|
for (int i = 0; i < iProcessData.Details.Count; i++)
|
|
{
|
|
if (iProcessData.Details[i] is not Detail detail)
|
|
continue;
|
|
description = new Description
|
|
{
|
|
Test = (int)tests[i],
|
|
Count = tests.Count,
|
|
Index = i,
|
|
//
|
|
EventName = fileRead.EventName,
|
|
NullData = nullData,
|
|
JobID = fileRead.CellInstanceName,
|
|
Sequence = logistics.Sequence.ToString(),
|
|
MesEntity = logistics.MesEntity,
|
|
ReportFullPath = logistics.ReportFullPath,
|
|
ProcessJobID = logistics.ProcessJobID,
|
|
MID = logistics.MID,
|
|
//
|
|
Date = processData.Date.ToString(GetDateFormat()),
|
|
Employee = processData.Employee,
|
|
Lot = processData.Lot,
|
|
PSN = processData.PSN,
|
|
Reactor = processData.Reactor,
|
|
Recipe = processData.Recipe,
|
|
//
|
|
AutoOptimizeGain = processData.AutoOptimizeGain,
|
|
AutoProbeHeightSet = processData.AutoProbeHeightSet,
|
|
Avg = processData.Avg,
|
|
DataReject = processData.DataReject,
|
|
DLRatio = processData.DLRatio,
|
|
Merit = detail.Merit,
|
|
Pt = detail.Pt,
|
|
R = detail.R,
|
|
ResistivitySpec = processData.ResistivitySpec,
|
|
Rs = detail.Rs,
|
|
SemiRadial = processData.SemiRadial,
|
|
StdDev = processData.StdDev,
|
|
T = detail.T,
|
|
Temp = processData.Temp,
|
|
//
|
|
Engineer = processData.Engineer,
|
|
EquipId = processData.EquipId,
|
|
FileName = processData.FileName,
|
|
HeaderUniqueId = detail.HeaderUniqueId,
|
|
Id = processData.UniqueId,
|
|
Layer = processData.Layer,
|
|
RDS = processData.RDS,
|
|
Run = processData.Run,
|
|
UniqueId = detail.UniqueId,
|
|
Zone = processData.Zone,
|
|
//
|
|
SheetRhoVariation = string.Empty,
|
|
};
|
|
results.Add(description);
|
|
}
|
|
}
|
|
return results;
|
|
}
|
|
|
|
private static Description GetDisplayNames()
|
|
{
|
|
Description result = new();
|
|
return result;
|
|
}
|
|
|
|
private Description GetDefault(IFileRead fileRead, Logistics logistics)
|
|
{
|
|
Description result = new()
|
|
{
|
|
Test = -1,
|
|
Count = 0,
|
|
Index = -1,
|
|
//
|
|
EventName = fileRead.EventName,
|
|
NullData = fileRead.NullData,
|
|
JobID = fileRead.CellInstanceName,
|
|
Sequence = logistics.Sequence.ToString(),
|
|
MesEntity = fileRead.MesEntity,
|
|
ReportFullPath = logistics.ReportFullPath,
|
|
ProcessJobID = logistics.ProcessJobID,
|
|
MID = logistics.MID,
|
|
//
|
|
Date = nameof(Date),
|
|
Employee = nameof(Employee),
|
|
Lot = nameof(Lot),
|
|
PSN = nameof(PSN),
|
|
Reactor = nameof(Reactor),
|
|
Recipe = nameof(Recipe),
|
|
//
|
|
AutoOptimizeGain = nameof(AutoOptimizeGain),
|
|
AutoProbeHeightSet = nameof(AutoProbeHeightSet),
|
|
Avg = nameof(Avg),
|
|
DataReject = nameof(DataReject),
|
|
DLRatio = nameof(DLRatio),
|
|
Merit = nameof(Merit),
|
|
Pt = nameof(Pt),
|
|
R = nameof(R),
|
|
ResistivitySpec = nameof(ResistivitySpec),
|
|
Rs = nameof(Rs),
|
|
SemiRadial = nameof(SemiRadial),
|
|
StdDev = nameof(StdDev),
|
|
T = nameof(T),
|
|
Temp = nameof(Temp),
|
|
//
|
|
Engineer = nameof(Engineer),
|
|
EquipId = nameof(EquipId),
|
|
FileName = nameof(FileName),
|
|
HeaderUniqueId = nameof(HeaderUniqueId),
|
|
Id = nameof(Id),
|
|
Layer = nameof(Layer),
|
|
RDS = nameof(RDS),
|
|
Run = nameof(Run),
|
|
UniqueId = nameof(UniqueId),
|
|
Zone = nameof(Zone),
|
|
SheetRhoVariation = nameof(SheetRhoVariation),
|
|
};
|
|
return result;
|
|
}
|
|
|
|
internal static string GetDateFormat() => "MM/dd/yyyy hh:mm:ss tt";
|
|
|
|
} |