Wafer Summary
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Adaptation.FileHandlers.pcl;
|
||||
|
||||
@ -12,6 +13,7 @@ public class Header
|
||||
public Header(string date,
|
||||
string recipe,
|
||||
string id,
|
||||
WaferSummary[] waferSummary,
|
||||
string lPDCountMin,
|
||||
string lPDCM2Min,
|
||||
string areaCountMin,
|
||||
@ -52,6 +54,7 @@ public class Header
|
||||
Date = date;
|
||||
Recipe = recipe;
|
||||
Id = id;
|
||||
WaferSummary = waferSummary;
|
||||
LPDCountMin = lPDCountMin;
|
||||
LPDCM2Min = lPDCM2Min;
|
||||
AreaCountMin = areaCountMin;
|
||||
@ -93,6 +96,7 @@ public class Header
|
||||
public string Date { get; }
|
||||
public string Recipe { get; }
|
||||
public string Id { get; }
|
||||
public WaferSummary[] WaferSummary { get; }
|
||||
public string LPDCountMin { get; }
|
||||
public string LPDCM2Min { get; }
|
||||
public string AreaCountMin { get; }
|
||||
@ -209,14 +213,16 @@ public class Header
|
||||
return GetBefore(text, i, "\n", false);
|
||||
}
|
||||
|
||||
internal static Header Get(string headerFileName, Dictionary<string, string> pages, Dictionary<string, List<Detail>> slots, Constant constant)
|
||||
internal static Header Get(string headerFileName, Dictionary<string, string> pages, Constant constant)
|
||||
{
|
||||
Header? result;
|
||||
string id;
|
||||
string slot;
|
||||
string toEOL;
|
||||
string? text;
|
||||
string[] segmentsB;
|
||||
string[] segmentsC;
|
||||
int[] i = new int[] { 0 };
|
||||
WaferSummary waferSummary;
|
||||
List<WaferSummary> collection = new();
|
||||
if (!pages.TryGetValue(headerFileName, out text))
|
||||
throw new Exception();
|
||||
ScanPast(text, i, constant.Date);
|
||||
@ -230,15 +236,25 @@ public class Header
|
||||
id = GetBefore(text, i, "[7]");
|
||||
else
|
||||
id = GetBefore(text, i, "[");
|
||||
int slotCount = text.Substring(i[0]).Split('*').Length - 1;
|
||||
for (int j = 0; j < slotCount; j++)
|
||||
ScanPast(text, i, "*");
|
||||
string[] segments = text.Substring(i[0]).Split('*');
|
||||
string[] split = new string[] { Environment.NewLine };
|
||||
foreach (string segment in segments)
|
||||
{
|
||||
i[0] = j;
|
||||
ScanPast(text, i, "*");
|
||||
toEOL = GetToEOL(text, i, false);
|
||||
slot = string.Concat("*", toEOL.Substring(0, 2));
|
||||
if (!slots.ContainsKey(slot))
|
||||
slots.Add(slot, new List<Detail>());
|
||||
segmentsB = segment.Split(split, StringSplitOptions.None);
|
||||
segmentsC = segmentsB[0].Split(' ');
|
||||
waferSummary = new(id: segmentsC[0].Trim(),
|
||||
lPDCount: segmentsC[1].Trim(),
|
||||
lPDCM2: segmentsC[2].Trim(),
|
||||
areaCount: segmentsC[3].Trim(),
|
||||
areaTotal: segmentsC[4].Trim(),
|
||||
scratchCount: segmentsC[5].Trim(),
|
||||
scratchTotal: segmentsC[6].Trim(),
|
||||
sumOfDefects: segmentsC[7].Trim(),
|
||||
hazeRegion: segmentsC[8].Trim(),
|
||||
hazeAverage: segmentsC[9].Trim(),
|
||||
grade: segmentsC[10].Trim());
|
||||
collection.Add(waferSummary);
|
||||
}
|
||||
ScanPast(text, i, constant.Min);
|
||||
string[] preToEol1 = GetToEOL(text, i, false).Trim().Split(' ');
|
||||
@ -255,6 +271,7 @@ public class Header
|
||||
result = new(date: date,
|
||||
recipe: recipe,
|
||||
id: id,
|
||||
waferSummary: collection.ToArray(),
|
||||
lPDCountMin: toEol1[0].Trim(),
|
||||
lPDCM2Min: toEol1[1].Trim(),
|
||||
areaCountMin: toEol1[2].Trim(),
|
||||
@ -294,4 +311,10 @@ public class Header
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||
[JsonSerializable(typeof(Header))]
|
||||
internal partial class HeaderSourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
}
|
Reference in New Issue
Block a user