Compare commits

..

1 Commits

Author SHA1 Message Date
65b8bc0e6f Infineon.EAF.Runtime v2.61.1 2025-10-13 17:10:50 -07:00
10 changed files with 30 additions and 66 deletions

View File

@ -9,7 +9,5 @@ internal class Constant
public string Date { get; } = "Date:"; public string Date { get; } = "Date:";
public string StdDev { get; } = "Std Dev:"; public string StdDev { get; } = "Std Dev:";
public string Average { get; } = "Average:"; public string Average { get; } = "Average:";
public string Statistics { get; } = "Statistics:";
public string DatabaseId { get; } = "Database ID:";
} }

View File

@ -1,7 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Linq;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Adaptation.FileHandlers.pcl; namespace Adaptation.FileHandlers.pcl;
@ -216,35 +215,17 @@ public class Header
return GetBefore(text, i, "\n", false); return GetBefore(text, i, "\n", false);
} }
private static string? GetText(ReadOnlyDictionary<string, string> pages, Constant constant) internal static Header Get(ReadOnlyDictionary<string, string> pages, Constant constant, string headerFileName)
{
string? text;
string? headerFileName = null;
foreach (KeyValuePair<string, string> keyValuePair in pages)
{
if (!pages.TryGetValue(keyValuePair.Key, out text))
throw new Exception();
if (!text.Contains(constant.Statistics))
continue;
headerFileName = keyValuePair.Key;
}
headerFileName ??= pages.Count == 0 ? string.Empty : pages.ElementAt(pages.Count - 1).Key;
if (pages.Count == 0 || !pages.TryGetValue(headerFileName, out text))
text = null;
return text;
}
internal static Header Get(ReadOnlyDictionary<string, string> pages, Constant constant)
{ {
Header? result; Header? result;
string id; string id;
string? text;
string[] segmentsB; string[] segmentsB;
string[] segmentsC; string[] segmentsC;
int[] i = new int[] { 0 }; int[] i = new int[] { 0 };
WaferSummary waferSummary; WaferSummary waferSummary;
List<WaferSummary> collection = new(); List<WaferSummary> collection = new();
string? text = GetText(pages, constant); if (!pages.TryGetValue(headerFileName, out text))
if (string.IsNullOrEmpty(text))
throw new Exception(); throw new Exception();
ScanPast(text, i, constant.Date); ScanPast(text, i, constant.Date);
string date = GetToEOL(text, i); string date = GetToEOL(text, i);

View File

@ -24,13 +24,13 @@ internal class Run
Wafers = wafers; Wafers = wafers;
} }
private static ReadOnlyCollection<Wafer> GetLastWaferForEachSlot(ReadOnlyDictionary<string, string> pages, Constant constant, Header header) private static ReadOnlyCollection<Wafer> GetLastWaferForEachSlot(ReadOnlyDictionary<string, string> pages, Constant constant, string headerFileName, Header header)
{ {
List<Wafer> results = new(); List<Wafer> results = new();
string id; string id;
Wafer wafer; Wafer wafer;
ReadOnlyCollection<Wafer>? wafers; ReadOnlyCollection<Wafer>? wafers;
ReadOnlyDictionary<string, ReadOnlyCollection<Wafer>> keyValuePairs = Wafer.Get(pages, constant); ReadOnlyDictionary<string, ReadOnlyCollection<Wafer>> keyValuePairs = Wafer.Get(pages, constant, headerFileName);
ReadOnlyCollection<string> waferIds = GetWaferIds(header); ReadOnlyCollection<string> waferIds = GetWaferIds(header);
for (int i = 0; i < waferIds.Count; i++) for (int i = 0; i < waferIds.Count; i++)
{ {
@ -123,12 +123,13 @@ internal class Run
{ {
Run? result; Run? result;
Constant constant = new(); Constant constant = new();
Header? header = Header.Get(pages, constant); string headerFileName = pages.ElementAt(pages.Count - 1).Key;
Header? header = Header.Get(pages, constant, headerFileName);
if (header is null) if (header is null)
result = null; result = null;
else else
{ {
ReadOnlyCollection<Wafer> wafers = GetLastWaferForEachSlot(pages, constant, header); ReadOnlyCollection<Wafer> wafers = GetLastWaferForEachSlot(pages, constant, headerFileName, header);
result = new(header, wafers); result = new(header, wafers);
WriteJson(logistics, fileInfoCollection, result); WriteJson(logistics, fileInfoCollection, result);
WriteCommaSeparatedValues(logistics, result); WriteCommaSeparatedValues(logistics, result);

View File

@ -114,7 +114,7 @@ public class Wafer
public string Thruput { get; } public string Thruput { get; }
public string Recipe { get; } public string Recipe { get; }
internal static ReadOnlyDictionary<string, ReadOnlyCollection<Wafer>> Get(ReadOnlyDictionary<string, string> pages, Constant constant) internal static ReadOnlyDictionary<string, ReadOnlyCollection<Wafer>> Get(ReadOnlyDictionary<string, string> pages, Constant constant, string headerFileName)
{ {
Dictionary<string, ReadOnlyCollection<Wafer>> results = new(); Dictionary<string, ReadOnlyCollection<Wafer>> results = new();
Wafer wafer; Wafer wafer;
@ -124,11 +124,15 @@ public class Wafer
Dictionary<string, List<Wafer>> keyValuePairs = new(); Dictionary<string, List<Wafer>> keyValuePairs = new();
foreach (KeyValuePair<string, string> keyValuePair in pages) foreach (KeyValuePair<string, string> keyValuePair in pages)
{ {
if (keyValuePair.Key == headerFileName)
continue;
if (!pages.ContainsKey(keyValuePair.Key))
throw new Exception();
i[0] = 0; i[0] = 0;
stringList = new(); stringList = new();
if (!pages.TryGetValue(keyValuePair.Key, out text)) if (!pages.TryGetValue(keyValuePair.Key, out text))
throw new Exception(); throw new Exception();
if (string.IsNullOrEmpty(text) || !text.Contains(constant.Id) || text.Contains(constant.Statistics) || text.Contains(constant.DatabaseId)) if (string.IsNullOrEmpty(text) || !text.Contains(constant.Id))
continue; continue;
Header.ScanPast(text, i, constant.Date); Header.ScanPast(text, i, constant.Date);
string date = Header.GetToEOL(text, i); string date = Header.GetToEOL(text, i);

View File

@ -9,7 +9,5 @@ internal class Constant
public string Date { get; } = "Date:"; public string Date { get; } = "Date:";
public string StdDev { get; } = "Std Dev:"; public string StdDev { get; } = "Std Dev:";
public string Average { get; } = "Average:"; public string Average { get; } = "Average:";
public string Statistics { get; } = "Statistics:";
public string DatabaseId { get; } = "Database ID:";
} }

View File

@ -1,7 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Linq;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Adaptation.FileHandlers.pdsf; namespace Adaptation.FileHandlers.pdsf;
@ -216,35 +215,17 @@ public class Header
return GetBefore(text, i, "\n", false); return GetBefore(text, i, "\n", false);
} }
private static string? GetText(ReadOnlyDictionary<string, string> pages, Constant constant) internal static Header Get(ReadOnlyDictionary<string, string> pages, Constant constant, string headerFileName)
{
string? text;
string? headerFileName = null;
foreach (KeyValuePair<string, string> keyValuePair in pages)
{
if (!pages.TryGetValue(keyValuePair.Key, out text))
throw new Exception();
if (!text.Contains(constant.Statistics))
continue;
headerFileName = keyValuePair.Key;
}
headerFileName ??= pages.Count == 0 ? string.Empty : pages.ElementAt(pages.Count - 1).Key;
if (pages.Count == 0 || !pages.TryGetValue(headerFileName, out text))
text = null;
return text;
}
internal static Header Get(ReadOnlyDictionary<string, string> pages, Constant constant)
{ {
Header? result; Header? result;
string id; string id;
string? text;
string[] segmentsB; string[] segmentsB;
string[] segmentsC; string[] segmentsC;
int[] i = new int[] { 0 }; int[] i = new int[] { 0 };
WaferSummary waferSummary; WaferSummary waferSummary;
List<WaferSummary> collection = new(); List<WaferSummary> collection = new();
string? text = GetText(pages, constant); if (!pages.TryGetValue(headerFileName, out text))
if (string.IsNullOrEmpty(text))
throw new Exception(); throw new Exception();
ScanPast(text, i, constant.Date); ScanPast(text, i, constant.Date);
string date = GetToEOL(text, i); string date = GetToEOL(text, i);

View File

@ -24,13 +24,13 @@ internal class Run
Wafers = wafers; Wafers = wafers;
} }
private static ReadOnlyCollection<Wafer> GetLastWaferForEachSlot(ReadOnlyDictionary<string, string> pages, Constant constant, Header header) private static ReadOnlyCollection<Wafer> GetLastWaferForEachSlot(ReadOnlyDictionary<string, string> pages, Constant constant, string headerFileName, Header header)
{ {
List<Wafer> results = new(); List<Wafer> results = new();
string id; string id;
Wafer wafer; Wafer wafer;
ReadOnlyCollection<Wafer>? wafers; ReadOnlyCollection<Wafer>? wafers;
ReadOnlyDictionary<string, ReadOnlyCollection<Wafer>> keyValuePairs = Wafer.Get(pages, constant); ReadOnlyDictionary<string, ReadOnlyCollection<Wafer>> keyValuePairs = Wafer.Get(pages, constant, headerFileName);
ReadOnlyCollection<string> waferIds = GetWaferIds(header); ReadOnlyCollection<string> waferIds = GetWaferIds(header);
for (int i = 0; i < waferIds.Count; i++) for (int i = 0; i < waferIds.Count; i++)
{ {
@ -123,12 +123,13 @@ internal class Run
{ {
Run? result; Run? result;
Constant constant = new(); Constant constant = new();
Header? header = Header.Get(pages, constant); string headerFileName = pages.ElementAt(pages.Count - 1).Key;
Header? header = Header.Get(pages, constant, headerFileName);
if (header is null) if (header is null)
result = null; result = null;
else else
{ {
ReadOnlyCollection<Wafer> wafers = GetLastWaferForEachSlot(pages, constant, header); ReadOnlyCollection<Wafer> wafers = GetLastWaferForEachSlot(pages, constant, headerFileName, header);
result = new(header, wafers); result = new(header, wafers);
WriteJson(logistics, fileInfoCollection, result); WriteJson(logistics, fileInfoCollection, result);
WriteCommaSeparatedValues(logistics, result); WriteCommaSeparatedValues(logistics, result);

View File

@ -114,7 +114,7 @@ public class Wafer
public string Thruput { get; } public string Thruput { get; }
public string Recipe { get; } public string Recipe { get; }
internal static ReadOnlyDictionary<string, ReadOnlyCollection<Wafer>> Get(ReadOnlyDictionary<string, string> pages, Constant constant) internal static ReadOnlyDictionary<string, ReadOnlyCollection<Wafer>> Get(ReadOnlyDictionary<string, string> pages, Constant constant, string headerFileName)
{ {
Dictionary<string, ReadOnlyCollection<Wafer>> results = new(); Dictionary<string, ReadOnlyCollection<Wafer>> results = new();
Wafer wafer; Wafer wafer;
@ -124,12 +124,10 @@ public class Wafer
Dictionary<string, List<Wafer>> keyValuePairs = new(); Dictionary<string, List<Wafer>> keyValuePairs = new();
foreach (KeyValuePair<string, string> keyValuePair in pages) foreach (KeyValuePair<string, string> keyValuePair in pages)
{ {
i[0] = 0; if (keyValuePair.Key == headerFileName)
stringList = new();
if (!pages.TryGetValue(keyValuePair.Key, out text))
throw new Exception();
if (string.IsNullOrEmpty(text) || !text.Contains(constant.Id) || text.Contains(constant.Statistics) || text.Contains(constant.DatabaseId))
continue; continue;
if (!pages.ContainsKey(keyValuePair.Key))
throw new Exception();
i[0] = 0; i[0] = 0;
stringList = new(); stringList = new();
if (!pages.TryGetValue(keyValuePair.Key, out text)) if (!pages.TryGetValue(keyValuePair.Key, out text))

View File

@ -54,7 +54,9 @@ public class TENCOR1
NonThrowTryCatch(); NonThrowTryCatch();
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Production__v2_61_1__TENCOR1__pcl638959627725124236__Extra() public void Production__v2_61_1__TENCOR1__pcl638959627725124236__Extra()
{ {

View File

@ -195,13 +195,13 @@
<Version>7.2.4630.5</Version> <Version>7.2.4630.5</Version>
</PackageReference> </PackageReference>
<PackageReference Include="Infineon.EAF.Runtime"> <PackageReference Include="Infineon.EAF.Runtime">
<Version>2.61.1</Version> <Version>2.60.0</Version>
</PackageReference> </PackageReference>
<PackageReference Include="Pdfbox"> <PackageReference Include="Pdfbox">
<Version>1.1.1</Version> <Version>1.1.1</Version>
</PackageReference> </PackageReference>
<PackageReference Include="System.Text.Json"> <PackageReference Include="System.Text.Json">
<Version>8.0.3</Version> <Version>8.0.5</Version>
</PackageReference> </PackageReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />