FlagDuplicates
CA1510 Complete
This commit is contained in:
parent
94c82f0894
commit
ca0e7d2030
@ -92,8 +92,9 @@ csharp_using_directive_placement = outside_namespace
|
|||||||
dotnet_code_quality_unused_parameters = all
|
dotnet_code_quality_unused_parameters = all
|
||||||
dotnet_code_quality_unused_parameters = non_public # IDE0060: Remove unused parameter
|
dotnet_code_quality_unused_parameters = non_public # IDE0060: Remove unused parameter
|
||||||
dotnet_code_quality.CAXXXX.api_surface = private, internal
|
dotnet_code_quality.CAXXXX.api_surface = private, internal
|
||||||
|
dotnet_diagnostic.CA1510.severity = none # CA1510: Use 'ArgumentNullException.ThrowIfNull' instead of explicitly throwing a new exception instance
|
||||||
dotnet_diagnostic.CA1816.severity = none # CA1816: Call GC.SuppressFinalize correctly
|
dotnet_diagnostic.CA1816.severity = none # CA1816: Call GC.SuppressFinalize correctly
|
||||||
dotnet_diagnostic.CA1825.severity = warning # CA1823: Avoid zero-length array allocations
|
dotnet_diagnostic.CA1825.severity = warning # CA1825: Avoid zero-length array allocations
|
||||||
dotnet_diagnostic.CA1829.severity = warning # CA1829: Use Length/Count property instead of Count() when available
|
dotnet_diagnostic.CA1829.severity = warning # CA1829: Use Length/Count property instead of Count() when available
|
||||||
dotnet_diagnostic.CA1834.severity = warning # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
|
dotnet_diagnostic.CA1834.severity = warning # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
|
||||||
dotnet_diagnostic.CA1846.severity = none # CA1846: Prefer AsSpan over Substring
|
dotnet_diagnostic.CA1846.severity = none # CA1846: Prefer AsSpan over Substring
|
||||||
|
2
Adaptation/.vscode/settings.json
vendored
2
Adaptation/.vscode/settings.json
vendored
@ -6,11 +6,13 @@
|
|||||||
"BIORAD",
|
"BIORAD",
|
||||||
"CICN",
|
"CICN",
|
||||||
"datauniqueid",
|
"datauniqueid",
|
||||||
|
"EPI",
|
||||||
"EQPT",
|
"EQPT",
|
||||||
"headerid",
|
"headerid",
|
||||||
"Hmmssffff",
|
"Hmmssffff",
|
||||||
"ipdsf",
|
"ipdsf",
|
||||||
"ISMTP",
|
"ISMTP",
|
||||||
|
"MEPI",
|
||||||
"messa",
|
"messa",
|
||||||
"ntities",
|
"ntities",
|
||||||
"PDSF",
|
"PDSF",
|
||||||
|
12
Adaptation/.vscode/tasks.json
vendored
12
Adaptation/.vscode/tasks.json
vendored
@ -49,6 +49,16 @@
|
|||||||
],
|
],
|
||||||
"problemMatcher": "$msCompile"
|
"problemMatcher": "$msCompile"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Format-Whitespaces",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"format",
|
||||||
|
"whitespace"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Nuget Clear",
|
"label": "Nuget Clear",
|
||||||
"command": "dotnet",
|
"command": "dotnet",
|
||||||
@ -68,7 +78,7 @@
|
|||||||
"args": [
|
"args": [
|
||||||
"/target:Build",
|
"/target:Build",
|
||||||
"/restore:True",
|
"/restore:True",
|
||||||
"/p:RestoreSources=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/%3Bhttps://packagemanagement.eu.infineon.com:4430/api/v2/%3Bhttps://tfs.intra.infineon.com/tfs/ManufacturingIT/_packaging/eaf/nuget/v3/index.json%3Bhttps://tfs.intra.infineon.com/tfs/FactoryIntegration/_packaging/EAF%40Local/nuget/v3/index.json%3Bhttps://api.nuget.org/v3/index.json",
|
"/p:RestoreSources=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/%3Bhttps://packagemanagement.eu.infineon.com:4430/api/v2/%3Bhttps://tfs.intra.infineon.com/tfs/FactoryIntegration/_packaging/EAF/nuget/v3/index.json%3Bhttps://tfs.intra.infineon.com/tfs/FactoryIntegration/_packaging/EAF%40Local/nuget/v3/index.json%3Bhttps://api.nuget.org/v3/index.json",
|
||||||
"/detailedsummary",
|
"/detailedsummary",
|
||||||
"/consoleloggerparameters:PerformanceSummary;ErrorsOnly;",
|
"/consoleloggerparameters:PerformanceSummary;ErrorsOnly;",
|
||||||
"/property:Configuration=Debug;TargetFrameworkVersion=v4.8",
|
"/property:Configuration=Debug;TargetFrameworkVersion=v4.8",
|
||||||
|
@ -227,7 +227,7 @@ public class FromIQS
|
|||||||
private static void FlagDuplicates(string connectionString, string json)
|
private static void FlagDuplicates(string connectionString, string json)
|
||||||
{
|
{
|
||||||
JsonElement[]? jsonElements = JsonSerializer.Deserialize<JsonElement[]>(json);
|
JsonElement[]? jsonElements = JsonSerializer.Deserialize<JsonElement[]>(json);
|
||||||
JsonSerializerOptions jsonSerializerOptions = new() { PropertyNameCaseInsensitive = true};
|
JsonSerializerOptions jsonSerializerOptions = new() { PropertyNameCaseInsensitive = true };
|
||||||
if (jsonElements is not null && jsonElements.Length != 0 && jsonElements[0].ValueKind == JsonValueKind.Object)
|
if (jsonElements is not null && jsonElements.Length != 0 && jsonElements[0].ValueKind == JsonValueKind.Object)
|
||||||
{
|
{
|
||||||
Root? root;
|
Root? root;
|
||||||
@ -242,14 +242,12 @@ public class FromIQS
|
|||||||
break;
|
break;
|
||||||
collection.Add(root.MaxSeSgrp);
|
collection.Add(root.MaxSeSgrp);
|
||||||
}
|
}
|
||||||
try
|
if (collection.Count > 0)
|
||||||
{
|
{
|
||||||
string commandText = GetCommandText(collection);
|
string commandText = GetCommandText(collection);
|
||||||
File.WriteAllText("D:/.sql", commandText);
|
File.WriteAllText("D:/.sql", commandText);
|
||||||
_ = ExecuteNonQuery(connectionString, commandText);
|
_ = ExecuteNonQuery(connectionString, commandText);
|
||||||
}
|
}
|
||||||
catch (Exception)
|
|
||||||
{ }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -268,9 +266,15 @@ public class FromIQS
|
|||||||
else
|
else
|
||||||
dateTime = logistics.DateTimeFromSequence;
|
dateTime = logistics.DateTimeFromSequence;
|
||||||
commandText = GetCommandText(dateTime);
|
commandText = GetCommandText(dateTime);
|
||||||
stringBuilder = GetForJsonPath(connectionString, commandText);
|
try
|
||||||
if (stringBuilder.Length > 0)
|
{
|
||||||
FlagDuplicates(connectionString, stringBuilder.ToString());
|
stringBuilder = GetForJsonPath(connectionString, commandText);
|
||||||
|
if (stringBuilder.Length > 0)
|
||||||
|
FlagDuplicates(connectionString, stringBuilder.ToString());
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{ stringBuilder = new(); }
|
||||||
|
_ = stringBuilder.Clear();
|
||||||
commandText = GetCommandText(logistics, description, dateTime.ToString("yyyy-MM-dd HH:mm:ss"), subGroupId: null);
|
commandText = GetCommandText(logistics, description, dateTime.ToString("yyyy-MM-dd HH:mm:ss"), subGroupId: null);
|
||||||
for (short i = 0; i < short.MaxValue; i++)
|
for (short i = 0; i < short.MaxValue; i++)
|
||||||
{
|
{
|
||||||
|
@ -2,27 +2,97 @@ using System.Collections.Generic;
|
|||||||
|
|
||||||
namespace Adaptation.FileHandlers.QS408M;
|
namespace Adaptation.FileHandlers.QS408M;
|
||||||
|
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
public class Body
|
public class Body
|
||||||
{
|
{
|
||||||
|
|
||||||
public List<Site> Sites { get; set; }
|
public Body(List<Site> sites, string waferMeanThickness, string stdDev, string passFail)
|
||||||
public string WaferMeanThickness { get; set; }
|
{
|
||||||
public string StdDev { get; set; }
|
Sites = sites;
|
||||||
public string PassFail { get; set; }
|
WaferMeanThickness = waferMeanThickness;
|
||||||
|
StdDev = stdDev;
|
||||||
|
PassFail = passFail;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
public List<Site> Sites { get; }
|
||||||
|
public string WaferMeanThickness { get; }
|
||||||
|
public string StdDev { get; }
|
||||||
|
public string PassFail { get; }
|
||||||
|
|
||||||
// Bio-Rad QS400MEPI Recipe: EP_8IN9PT Thu Apr 30 11:29:10 1970
|
private static bool IsNullOrWhiteSpace(string text)
|
||||||
// operator: J batch: BIORAD#2
|
{
|
||||||
// cassette: wafer: 52-589368-4445
|
bool flag;
|
||||||
// --------------------------------------------------------------------------------
|
int num = 0;
|
||||||
// position thickness position thickness position thickness
|
while (true)
|
||||||
// 1 45.735 2 46.536 3 46.742
|
{
|
||||||
// 4 46.015 5 46.648 6 45.366
|
if (num >= text.Length)
|
||||||
// 7 46.263 8 46.512 9 46.373
|
{
|
||||||
// wafer mean thickness = 46.2433, std. dev = 0.4564 PASS
|
flag = true;
|
||||||
// ================================================================================
|
break;
|
||||||
|
}
|
||||||
|
else if (char.IsWhiteSpace(text[num]))
|
||||||
|
{
|
||||||
|
num++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
flag = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
// Radial variation (computation B) PASS:
|
private static string GetToken(string text, int[] i)
|
||||||
|
{
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
if (i[0] >= text.Length || !IsNullOrWhiteSpace(text.Substring(i[0], 1)))
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
i[0]++;
|
||||||
|
}
|
||||||
|
int num = i[0];
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
if (num >= text.Length || IsNullOrWhiteSpace(text.Substring(num, 1)))
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
num++;
|
||||||
|
}
|
||||||
|
string str = text.Substring(i[0], num - i[0]);
|
||||||
|
i[0] = num;
|
||||||
|
return str.Trim();
|
||||||
|
}
|
||||||
|
|
||||||
// thickness -2.7474
|
internal static Body? Get(string text, int[] i)
|
||||||
|
{
|
||||||
|
Body? result;
|
||||||
|
Site site;
|
||||||
|
string thickness;
|
||||||
|
List<Site> sites = new();
|
||||||
|
string position = GetToken(text, i);
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(position) || !char.IsDigit(position[0]))
|
||||||
|
break;
|
||||||
|
thickness = GetToken(text, i);
|
||||||
|
site = new(position, thickness);
|
||||||
|
sites.Add(site);
|
||||||
|
position = GetToken(text, i);
|
||||||
|
}
|
||||||
|
i[0] = Complete.ScanPast(text, i, "mean thickness =");
|
||||||
|
string meanThickness = Complete.GetBefore(text, i, ", std. dev =");
|
||||||
|
string stdDev = GetToken(text, i);
|
||||||
|
string passFail = Complete.GetToEOL(text, i);
|
||||||
|
result = new(sites,
|
||||||
|
meanThickness,
|
||||||
|
stdDev,
|
||||||
|
passFail);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
108
Adaptation/FileHandlers/QS408M/Complete.cs
Normal file
108
Adaptation/FileHandlers/QS408M/Complete.cs
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
using System;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Adaptation.FileHandlers.QS408M;
|
||||||
|
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
|
internal class Complete
|
||||||
|
{
|
||||||
|
|
||||||
|
public Complete(Header header, Body body, Footer footer)
|
||||||
|
{
|
||||||
|
Header = header;
|
||||||
|
Body = body;
|
||||||
|
Footer = footer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Header Header { get; }
|
||||||
|
public Body Body { get; }
|
||||||
|
public Footer Footer { get; }
|
||||||
|
|
||||||
|
internal static string GetBefore(string text, int[] i, string search)
|
||||||
|
{
|
||||||
|
string str;
|
||||||
|
string str1;
|
||||||
|
int num = text.IndexOf(search, i[0]);
|
||||||
|
if (num <= -1)
|
||||||
|
{
|
||||||
|
str = text.Substring(i[0]);
|
||||||
|
i[0] = text.Length;
|
||||||
|
str1 = str.Trim();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
str = text.Substring(i[0], num - i[0]);
|
||||||
|
i[0] = num + search.Length;
|
||||||
|
str1 = str.Trim();
|
||||||
|
}
|
||||||
|
return str1;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static string GetToEOL(string text, int[] i)
|
||||||
|
{
|
||||||
|
string result;
|
||||||
|
if (text.IndexOf("\n", i[0]) > -1)
|
||||||
|
result = GetBefore(text, i, "\n");
|
||||||
|
else
|
||||||
|
result = GetBefore(text, i, Environment.NewLine);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static int ScanPast(string text, int[] i, string search)
|
||||||
|
{
|
||||||
|
int result;
|
||||||
|
int num = text.IndexOf(search, i[0]);
|
||||||
|
if (num <= -1)
|
||||||
|
result = text.Length;
|
||||||
|
else
|
||||||
|
result = num + search.Length;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static Complete? Get(Header lastHeader, string text)
|
||||||
|
{
|
||||||
|
Complete? result;
|
||||||
|
int[] i = new int[] { 0 };
|
||||||
|
Header? header = Header.Get(lastHeader, text, i);
|
||||||
|
if (header is null)
|
||||||
|
result = null;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Body? body = Body.Get(text, i);
|
||||||
|
if (body is null)
|
||||||
|
result = null;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Footer? footer = Footer.Get(text, i);
|
||||||
|
if (footer is null)
|
||||||
|
result = null;
|
||||||
|
else
|
||||||
|
result = new(header, body, footer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Bio-Rad QS400MEPI Recipe: EP_8IN9PT Thu Apr 30 11:29:10 1970
|
||||||
|
// operator: J batch: BIORAD#2
|
||||||
|
// cassette: wafer: 52-589368-4445
|
||||||
|
// --------------------------------------------------------------------------------
|
||||||
|
// position thickness position thickness position thickness
|
||||||
|
// 1 45.735 2 46.536 3 46.742
|
||||||
|
// 4 46.015 5 46.648 6 45.366
|
||||||
|
// 7 46.263 8 46.512 9 46.373
|
||||||
|
// wafer mean thickness = 46.2433, std. dev = 0.4564 PASS
|
||||||
|
// ================================================================================
|
||||||
|
|
||||||
|
// Radial variation (computation B) PASS:
|
||||||
|
|
||||||
|
// thickness -2.7474
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
|
[JsonSerializable(typeof(Complete))]
|
||||||
|
internal partial class CompleteSourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
|
}
|
@ -14,8 +14,8 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
{
|
{
|
||||||
|
|
||||||
private long? _TickOffset;
|
private long? _TickOffset;
|
||||||
|
private readonly Header[] _LastHeader;
|
||||||
private readonly string _OriginalDataBioRad;
|
private readonly string _OriginalDataBioRad;
|
||||||
private readonly LastProcessData _LastProcessData;
|
|
||||||
|
|
||||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||||
base(new Description(), true, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
|
base(new Description(), true, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
|
||||||
@ -30,8 +30,9 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
if (_IsDuplicator)
|
if (_IsDuplicator)
|
||||||
throw new Exception(cellInstanceConnectionName);
|
throw new Exception(cellInstanceConnectionName);
|
||||||
_OriginalDataBioRad = "OriginalDataBioRad_";
|
_OriginalDataBioRad = "OriginalDataBioRad_";
|
||||||
_LastProcessData = new();
|
_LastHeader = new Header[] { Header.Get() };
|
||||||
NestExistingFiles(_FileConnectorConfiguration);
|
if (_IsEAFHosted)
|
||||||
|
NestExistingFiles(_FileConnectorConfiguration);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception) => Move(extractResults);
|
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception) => Move(extractResults);
|
||||||
@ -83,7 +84,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
DateTime dateTime = DateTime.Now;
|
DateTime dateTime = DateTime.Now;
|
||||||
results = GetExtractResult(reportFullPath, dateTime);
|
results = GetExtractResult(reportFullPath, dateTime);
|
||||||
if (results.Item3 is null)
|
if (results.Item3 is null)
|
||||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(results.Item1, Array.Empty<Test>(), JsonSerializer.Deserialize<JsonElement[]>("[]"), results.Item4);
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(results.Item1, Array.Empty<Test>(), JsonSerializer.Deserialize<JsonElement[]>("[]") ?? throw new Exception(), results.Item4);
|
||||||
if (results.Item3.Length > 0 && _IsEAFHosted)
|
if (results.Item3.Length > 0 && _IsEAFHosted)
|
||||||
WritePDSF(this, results.Item3);
|
WritePDSF(this, results.Item3);
|
||||||
UpdateLastTicksDuration(DateTime.Now.Ticks - dateTime.Ticks);
|
UpdateLastTicksDuration(DateTime.Now.Ticks - dateTime.Ticks);
|
||||||
@ -101,7 +102,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
|
|
||||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||||
{
|
{
|
||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>());
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, Array.Empty<Test>(), JsonSerializer.Deserialize<JsonElement[]>("[]") ?? throw new Exception(), new List<FileInfo>());
|
||||||
_TickOffset ??= new FileInfo(reportFullPath).LastWriteTime.Ticks - dateTime.Ticks;
|
_TickOffset ??= new FileInfo(reportFullPath).LastWriteTime.Ticks - dateTime.Ticks;
|
||||||
_Logistics = new Logistics(this, _TickOffset.Value, reportFullPath, useSplitForMID: true);
|
_Logistics = new Logistics(this, _TickOffset.Value, reportFullPath, useSplitForMID: true);
|
||||||
SetFileParameterLotIDToLogisticsMID();
|
SetFileParameterLotIDToLogisticsMID();
|
||||||
@ -109,7 +110,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
results.Item4.Add(_Logistics.FileInfo);
|
results.Item4.Add(_Logistics.FileInfo);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
IProcessData iProcessData = new ProcessData(this, _Logistics, results.Item4, _OriginalDataBioRad, lastProcessData: _LastProcessData, tickOffset: _TickOffset.Value);
|
IProcessData iProcessData = new ProcessData(this, _Logistics, results.Item4, _OriginalDataBioRad, lastHeader: _LastHeader, tickOffset: _TickOffset.Value);
|
||||||
if (iProcessData is not ProcessData processData)
|
if (iProcessData is not ProcessData processData)
|
||||||
throw new Exception(string.Concat("A) No Data - ", dateTime.Ticks));
|
throw new Exception(string.Concat("A) No Data - ", dateTime.Ticks));
|
||||||
string mid;
|
string mid;
|
||||||
|
@ -1,10 +1,36 @@
|
|||||||
namespace Adaptation.FileHandlers.QS408M;
|
namespace Adaptation.FileHandlers.QS408M;
|
||||||
|
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
public class Footer
|
public class Footer
|
||||||
{
|
{
|
||||||
|
|
||||||
public string Line { get; set; }
|
public Footer(string line, string radialVariationThickness, string slot)
|
||||||
public string RadialVariationThickness { get; set; }
|
{
|
||||||
public string Slot { get; set; }
|
Line = line;
|
||||||
|
RadialVariationThickness = radialVariationThickness;
|
||||||
|
Slot = slot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Line { get; }
|
||||||
|
public string RadialVariationThickness { get; }
|
||||||
|
public string Slot { get; }
|
||||||
|
|
||||||
|
internal static Footer? Get(string text, int[] i)
|
||||||
|
{
|
||||||
|
Footer? result;
|
||||||
|
_ = Complete.GetToEOL(text, i);
|
||||||
|
_ = Complete.GetToEOL(text, i);
|
||||||
|
string line = Complete.GetToEOL(text, i);
|
||||||
|
i[0] = Complete.ScanPast(text, i, "thickness");
|
||||||
|
string radialVariationThickness = Complete.GetToEOL(text, i);
|
||||||
|
_ = Complete.GetToEOL(text, i);
|
||||||
|
i[0] = Complete.ScanPast(text, i, "Slot:");
|
||||||
|
string slot = Complete.GetBefore(text, i, ";");
|
||||||
|
result = new(line,
|
||||||
|
radialVariationThickness,
|
||||||
|
slot);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,30 +1,100 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
namespace Adaptation.FileHandlers.QS408M;
|
namespace Adaptation.FileHandlers.QS408M;
|
||||||
|
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
public class Header
|
public class Header
|
||||||
{
|
{
|
||||||
|
|
||||||
public string Title { get; set; }
|
public Header(string title, string recipe, string dateTime, string @operator, string batch, string cassette, bool usedLast, string wafer)
|
||||||
public string Recipe { get; set; }
|
{
|
||||||
public string DateTime { get; set; }
|
Title = title;
|
||||||
public string Operator { get; set; }
|
Recipe = recipe;
|
||||||
public string Batch { get; set; }
|
DateTime = dateTime;
|
||||||
public string Cassette { get; set; }
|
Operator = @operator;
|
||||||
public bool UsedLast { get; set; }
|
Batch = batch;
|
||||||
public string Wafer { get; set; }
|
Cassette = cassette;
|
||||||
|
UsedLast = usedLast;
|
||||||
|
Wafer = wafer;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
public string Title { get; }
|
||||||
|
public string Recipe { get; }
|
||||||
|
public string DateTime { get; }
|
||||||
|
public string Operator { get; }
|
||||||
|
public string Batch { get; }
|
||||||
|
public string Cassette { get; }
|
||||||
|
public bool UsedLast { get; }
|
||||||
|
public string Wafer { get; }
|
||||||
|
|
||||||
// Bio-Rad QS400MEPI Recipe: EP_8IN9PT Thu Apr 30 11:29:10 1970
|
internal static Header Get() =>
|
||||||
// operator: J batch: BIORAD#2
|
new(string.Empty,
|
||||||
// cassette: wafer: 52-589368-4445
|
string.Empty,
|
||||||
// --------------------------------------------------------------------------------
|
string.Empty,
|
||||||
// position thickness position thickness position thickness
|
string.Empty,
|
||||||
// 1 45.735 2 46.536 3 46.742
|
string.Empty,
|
||||||
// 4 46.015 5 46.648 6 45.366
|
string.Empty,
|
||||||
// 7 46.263 8 46.512 9 46.373
|
false,
|
||||||
// wafer mean thickness = 46.2433, std. dev = 0.4564 PASS
|
string.Empty);
|
||||||
// ================================================================================
|
|
||||||
|
|
||||||
// Radial variation (computation B) PASS:
|
internal static Header? Get(Header lastHeader, string text, int[] i)
|
||||||
|
{
|
||||||
|
Header? result;
|
||||||
|
// occasionally there are multiple blocks of details, get the last one as earlier ones may be aborted runs.
|
||||||
|
int index = text.LastIndexOf("Bio-Rad");
|
||||||
|
if (index > -1)
|
||||||
|
text = text.Substring(index);
|
||||||
|
if (string.IsNullOrEmpty(text))
|
||||||
|
result = null;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bool usedLast;
|
||||||
|
const string twoSpaces = " ";
|
||||||
|
string title = Complete.GetBefore(text, i, "Recipe:");
|
||||||
|
string recipeAndDateTime = Complete.GetToEOL(text, i);
|
||||||
|
string recipe = recipeAndDateTime.Length < twoSpaces.Length ? recipeAndDateTime.Trim() : !recipeAndDateTime.Contains(twoSpaces) ? recipeAndDateTime.Substring(0, 25).Trim() : recipeAndDateTime.Split(new string[] { twoSpaces }, StringSplitOptions.None)[0].Trim();
|
||||||
|
string dateTime = recipeAndDateTime.Substring(recipe.Length).Trim();
|
||||||
|
if (dateTime.EndsWith("."))
|
||||||
|
dateTime = dateTime.Remove(dateTime.Length - 1, 1);
|
||||||
|
i[0] = Complete.ScanPast(text, i, "operator:");
|
||||||
|
string @operator = Complete.GetBefore(text, i, "batch:");
|
||||||
|
string batch = Complete.GetToEOL(text, i);
|
||||||
|
i[0] = Complete.ScanPast(text, i, "cassette:");
|
||||||
|
if (!text.Contains("cassette:"))
|
||||||
|
title = string.Empty;
|
||||||
|
string cassette = Complete.GetBefore(text, i, "wafer:");
|
||||||
|
if (string.IsNullOrEmpty(batch))
|
||||||
|
{
|
||||||
|
i[0] = 0;
|
||||||
|
i[0] = Complete.ScanPast(text, i, "wafer:");
|
||||||
|
}
|
||||||
|
string wafer = Complete.GetToEOL(text, i);
|
||||||
|
_ = Complete.GetToEOL(text, i);
|
||||||
|
_ = Complete.GetToEOL(text, i);
|
||||||
|
if (string.IsNullOrEmpty(wafer))
|
||||||
|
throw new Exception("Wafer field is missing.");
|
||||||
|
if (!string.IsNullOrEmpty(title))
|
||||||
|
usedLast = false;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
title = lastHeader.Title;
|
||||||
|
recipe = lastHeader.Recipe;
|
||||||
|
@operator = lastHeader.Operator;
|
||||||
|
batch = lastHeader.Batch;
|
||||||
|
cassette = lastHeader.Cassette;
|
||||||
|
usedLast = true;
|
||||||
|
}
|
||||||
|
result = new(title: title,
|
||||||
|
recipe: recipe,
|
||||||
|
dateTime: dateTime,
|
||||||
|
@operator: @operator,
|
||||||
|
batch: batch,
|
||||||
|
cassette: cassette,
|
||||||
|
usedLast: usedLast,
|
||||||
|
wafer: wafer);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
// thickness -2.7474
|
}
|
@ -1,13 +0,0 @@
|
|||||||
namespace Adaptation.FileHandlers.QS408M;
|
|
||||||
|
|
||||||
public class LastProcessData
|
|
||||||
{
|
|
||||||
|
|
||||||
public string Title { get; set; }
|
|
||||||
public string Recipe { get; set; }
|
|
||||||
public string Date { get; set; }
|
|
||||||
public string Operator { get; set; }
|
|
||||||
public string Batch { get; set; }
|
|
||||||
public string Cassette { get; set; }
|
|
||||||
|
|
||||||
}
|
|
@ -58,16 +58,18 @@ public partial class ProcessData : IProcessData
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public ProcessData(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, string originalDataBioRad, LastProcessData lastProcessData, long tickOffset)
|
#nullable enable
|
||||||
|
|
||||||
|
public ProcessData(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, string originalDataBioRad, Header[] lastHeader, long tickOffset)
|
||||||
{
|
{
|
||||||
JobID = logistics.JobID;
|
JobID = logistics.JobID;
|
||||||
fileInfoCollection.Clear();
|
fileInfoCollection.Clear();
|
||||||
_Details = new List<object>();
|
_Details = new List<object>();
|
||||||
MesEntity = logistics.MesEntity;
|
MesEntity = logistics.MesEntity;
|
||||||
_Log = LogManager.GetLogger(typeof(ProcessData));
|
_Log = LogManager.GetLogger(typeof(ProcessData));
|
||||||
TXT txt = Parse(fileRead, logistics, fileInfoCollection, originalDataBioRad, lastProcessData);
|
Complete? complete = Parse(fileRead, logistics, fileInfoCollection, originalDataBioRad, lastHeader);
|
||||||
if (txt is not null)
|
if (complete is not null)
|
||||||
SetValues(logistics, tickOffset, txt);
|
SetValues(logistics, tickOffset, complete);
|
||||||
}
|
}
|
||||||
|
|
||||||
string IProcessData.GetCurrentReactor(IFileRead fileRead, Logistics logistics, Dictionary<string, string> reactors) => throw new Exception(string.Concat("See ", nameof(Parse)));
|
string IProcessData.GetCurrentReactor(IFileRead fileRead, Logistics logistics, Dictionary<string, string> reactors) => throw new Exception(string.Concat("See ", nameof(Parse)));
|
||||||
@ -90,7 +92,7 @@ public partial class ProcessData : IProcessData
|
|||||||
}
|
}
|
||||||
List<Description> fileReadDescriptions = (from l in descriptions select (Description)l).ToList();
|
List<Description> fileReadDescriptions = (from l in descriptions select (Description)l).ToList();
|
||||||
string json = JsonSerializer.Serialize(fileReadDescriptions, fileReadDescriptions.GetType());
|
string json = JsonSerializer.Serialize(fileReadDescriptions, fileReadDescriptions.GetType());
|
||||||
JsonElement[] jsonElements = JsonSerializer.Deserialize<JsonElement[]>(json);
|
JsonElement[] jsonElements = JsonSerializer.Deserialize<JsonElement[]>(json) ?? throw new Exception();
|
||||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(logistics.Logistics1[0], tests.ToArray(), jsonElements, fileInfoCollection);
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(logistics.Logistics1[0], tests.ToArray(), jsonElements, fileInfoCollection);
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
@ -245,49 +247,46 @@ public partial class ProcessData : IProcessData
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma warning disable IDE0060
|
private Complete? Parse(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, string originalDataBioRad, Header[] lastHeader)
|
||||||
private static TXT Parse(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, string originalDataBioRad, LastProcessData lastProcessData)
|
|
||||||
#pragma warning restore IDE0060
|
|
||||||
{
|
{
|
||||||
TXT result;
|
if (fileRead is null)
|
||||||
|
throw new ArgumentNullException(nameof(fileRead));
|
||||||
|
Complete? result;
|
||||||
List<string> moveFiles = new();
|
List<string> moveFiles = new();
|
||||||
string directoryName = Path.GetDirectoryName(logistics.ReportFullPath);
|
|
||||||
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(logistics.ReportFullPath);
|
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(logistics.ReportFullPath);
|
||||||
|
string directoryName = Path.GetDirectoryName(logistics.ReportFullPath) ?? throw new Exception();
|
||||||
moveFiles.AddRange(Directory.GetFiles(directoryName, string.Concat(originalDataBioRad, "*", logistics.Sequence, "*"), SearchOption.TopDirectoryOnly));
|
moveFiles.AddRange(Directory.GetFiles(directoryName, string.Concat(originalDataBioRad, "*", logistics.Sequence, "*"), SearchOption.TopDirectoryOnly));
|
||||||
moveFiles.AddRange(Directory.GetFiles(directoryName, string.Concat(originalDataBioRad, "*", fileNameWithoutExtension.Split('_').Last(), "*"), SearchOption.TopDirectoryOnly));
|
moveFiles.AddRange(Directory.GetFiles(directoryName, string.Concat(originalDataBioRad, "*", fileNameWithoutExtension.Split('_').Last(), "*"), SearchOption.TopDirectoryOnly));
|
||||||
foreach (string moveFile in moveFiles.Distinct())
|
foreach (string moveFile in moveFiles.Distinct())
|
||||||
fileInfoCollection.Add(new FileInfo(moveFile));
|
fileInfoCollection.Add(new FileInfo(moveFile));
|
||||||
string receivedData = File.ReadAllText(logistics.ReportFullPath);
|
string receivedData = File.ReadAllText(logistics.ReportFullPath);
|
||||||
// occasionally there are multiple blocks of details, get the last one as earlier ones may be aborted runs.
|
result = Complete.Get(lastHeader[0], receivedData);
|
||||||
int index = receivedData.LastIndexOf("Bio-Rad");
|
if (result is null)
|
||||||
if (index > -1)
|
_Log.Warn($"Could not get Complete from {fileNameWithoutExtension}");
|
||||||
receivedData = receivedData.Substring(index);
|
|
||||||
if (string.IsNullOrEmpty(receivedData))
|
|
||||||
result = null;
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
result = new TXT(lastProcessData, receivedData);
|
FileInfo fileInfo = new($"{fileNameWithoutExtension}.json");
|
||||||
string fileName = Path.Combine(directoryName, $"{Path.GetFileNameWithoutExtension(logistics.ReportFullPath)}.json");
|
string json = JsonSerializer.Serialize(result, CompleteSourceGenerationContext.Default.Complete);
|
||||||
string json = JsonSerializer.Serialize(result, new JsonSerializerOptions { WriteIndented = true });
|
File.WriteAllText(fileInfo.FullName, json);
|
||||||
File.WriteAllText(fileName, json);
|
fileInfoCollection.Add(fileInfo);
|
||||||
fileInfoCollection.Add(new(fileName));
|
lastHeader[0] = result.Header;
|
||||||
}
|
}
|
||||||
fileInfoCollection.Add(logistics.FileInfo);
|
fileInfoCollection.Add(logistics.FileInfo);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetValues(Logistics logistics, long tickOffset, TXT txt)
|
private void SetValues(Logistics logistics, long tickOffset, Complete complete)
|
||||||
{
|
{
|
||||||
int slot = 0;
|
int slot = 0;
|
||||||
Detail detail;
|
Detail detail;
|
||||||
int counter = 1;
|
int counter = 1;
|
||||||
List<Detail> details = new();
|
List<Detail> details = new();
|
||||||
DateTime dateTime = GetDateTime(logistics, tickOffset, txt.Header.DateTime);
|
DateTime dateTime = GetDateTime(logistics, tickOffset, complete.Header.DateTime);
|
||||||
bool isWaferSlot = !string.IsNullOrEmpty(txt.Header.Wafer) && txt.Header.Wafer.Length is 1 or 2 && int.TryParse(txt.Header.Wafer, out slot) && slot < 27;
|
bool isWaferSlot = !string.IsNullOrEmpty(complete.Header.Wafer) && complete.Header.Wafer.Length is 1 or 2 && int.TryParse(complete.Header.Wafer, out slot) && slot < 27;
|
||||||
string batch = !isWaferSlot ? logistics.JobID : Regex.Replace(txt.Header.Batch, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
|
string batch = !isWaferSlot ? logistics.JobID : Regex.Replace(complete.Header.Batch, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
|
||||||
Descriptor descriptor = isWaferSlot ? GetDescriptor(txt.Header.Batch) : GetDescriptor(txt.Header.Wafer);
|
Descriptor descriptor = isWaferSlot ? GetDescriptor(complete.Header.Batch) : GetDescriptor(complete.Header.Wafer);
|
||||||
string wafer = isWaferSlot ? slot.ToString("00") : descriptor.Wafer;
|
string wafer = isWaferSlot ? slot.ToString("00") : descriptor.Wafer;
|
||||||
string uniqueId = string.Concat(txt.Header.Title, '_', wafer, '_', logistics.DateTimeFromSequence.ToString("yyyyMMddHHmmssffff"), '_', logistics.TotalSecondsSinceLastWriteTimeFromSequence);
|
string uniqueId = string.Concat(complete.Header.Title, '_', wafer, '_', logistics.DateTimeFromSequence.ToString("yyyyMMddHHmmssffff"), '_', logistics.TotalSecondsSinceLastWriteTimeFromSequence);
|
||||||
Batch = batch;
|
Batch = batch;
|
||||||
Wafer = wafer;
|
Wafer = wafer;
|
||||||
Date = dateTime;
|
Date = dateTime;
|
||||||
@ -297,17 +296,17 @@ public partial class ProcessData : IProcessData
|
|||||||
Zone = descriptor.Zone;
|
Zone = descriptor.Zone;
|
||||||
JobID = logistics.JobID;
|
JobID = logistics.JobID;
|
||||||
Layer = descriptor.Layer;
|
Layer = descriptor.Layer;
|
||||||
StdDev = txt.Body.StdDev;
|
|
||||||
Title = txt.Header.Title;
|
|
||||||
Recipe = txt.Header.Recipe;
|
|
||||||
PassFail = txt.Body.PassFail;
|
|
||||||
Reactor = descriptor.Reactor;
|
Reactor = descriptor.Reactor;
|
||||||
Cassette = txt.Header.Cassette;
|
StdDev = complete.Body.StdDev;
|
||||||
RVThickness = txt.Footer.RadialVariationThickness;
|
Title = complete.Header.Title;
|
||||||
Slot = string.IsNullOrEmpty(txt.Footer.Slot) ? slot.ToString("00") : txt.Footer.Slot;
|
Recipe = complete.Header.Recipe;
|
||||||
Employee = string.IsNullOrEmpty(txt.Header.Operator) ? Employee : txt.Header.Operator;
|
PassFail = complete.Body.PassFail;
|
||||||
MeanThickness = string.IsNullOrEmpty(txt.Body.WaferMeanThickness) && txt.Body.Sites.Count == 1 ? txt.Body.Sites.First().Thickness : txt.Body.WaferMeanThickness;
|
Cassette = complete.Header.Cassette;
|
||||||
foreach (Site site in txt.Body.Sites)
|
RVThickness = complete.Footer.RadialVariationThickness;
|
||||||
|
Slot = string.IsNullOrEmpty(complete.Footer.Slot) ? slot.ToString("00") : complete.Footer.Slot;
|
||||||
|
Employee = string.IsNullOrEmpty(complete.Header.Operator) ? Employee : complete.Header.Operator;
|
||||||
|
MeanThickness = string.IsNullOrEmpty(complete.Body.WaferMeanThickness) && complete.Body.Sites.Count == 1 ? complete.Body.Sites.First().Thickness : complete.Body.WaferMeanThickness;
|
||||||
|
foreach (Site site in complete.Body.Sites)
|
||||||
{
|
{
|
||||||
detail = new()
|
detail = new()
|
||||||
{
|
{
|
||||||
|
@ -3,22 +3,13 @@ namespace Adaptation.FileHandlers.QS408M;
|
|||||||
public class Site
|
public class Site
|
||||||
{
|
{
|
||||||
|
|
||||||
public string Position { get; set; }
|
public Site(string position, string thickness)
|
||||||
public string Thickness { get; set; }
|
{
|
||||||
|
Position = position;
|
||||||
|
Thickness = thickness;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
public string Position { get; }
|
||||||
|
public string Thickness { get; }
|
||||||
|
|
||||||
// Bio-Rad QS400MEPI Recipe: EP_8IN9PT Thu Apr 30 11:29:10 1970
|
}
|
||||||
// operator: J batch: BIORAD#2
|
|
||||||
// cassette: wafer: 52-589368-4445
|
|
||||||
// --------------------------------------------------------------------------------
|
|
||||||
// position thickness position thickness position thickness
|
|
||||||
// 1 45.735 2 46.536 3 46.742
|
|
||||||
// 4 46.015 5 46.648 6 45.366
|
|
||||||
// 7 46.263 8 46.512 9 46.373
|
|
||||||
// wafer mean thickness = 46.2433, std. dev = 0.4564 PASS
|
|
||||||
// ================================================================================
|
|
||||||
|
|
||||||
// Radial variation (computation B) PASS:
|
|
||||||
|
|
||||||
// thickness -2.7474
|
|
@ -1,221 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Adaptation.FileHandlers.QS408M;
|
|
||||||
|
|
||||||
public class TXT
|
|
||||||
{
|
|
||||||
|
|
||||||
public Header Header { get; set; }
|
|
||||||
public Body Body { get; set; }
|
|
||||||
public Footer Footer { get; set; }
|
|
||||||
|
|
||||||
private int _I;
|
|
||||||
private readonly string _Data;
|
|
||||||
|
|
||||||
public TXT(LastProcessData lastProcessData, string receivedData)
|
|
||||||
{
|
|
||||||
_I = 0;
|
|
||||||
Site site;
|
|
||||||
bool usedLast;
|
|
||||||
_Data = receivedData;
|
|
||||||
List<Site> sites = new();
|
|
||||||
const string twoSpaces = " ";
|
|
||||||
string title = GetBefore("Recipe:");
|
|
||||||
string recipeAndDateTime = GetToEOL();
|
|
||||||
string recipe = recipeAndDateTime.Length < twoSpaces.Length ? recipeAndDateTime.Trim() : !recipeAndDateTime.Contains(twoSpaces) ? recipeAndDateTime.Substring(0, 25).Trim() : recipeAndDateTime.Split(new string[] { twoSpaces }, StringSplitOptions.None)[0].Trim();
|
|
||||||
string dateTime = recipeAndDateTime.Substring(recipe.Length).Trim();
|
|
||||||
if (dateTime.EndsWith("."))
|
|
||||||
dateTime = dateTime.Remove(dateTime.Length - 1, 1);
|
|
||||||
ScanPast("operator:");
|
|
||||||
string @operator = GetBefore("batch:");
|
|
||||||
string batch = GetToEOL();
|
|
||||||
ScanPast("cassette:");
|
|
||||||
if (!receivedData.Contains("cassette:"))
|
|
||||||
title = string.Empty;
|
|
||||||
string cassette = GetBefore("wafer:");
|
|
||||||
if (string.IsNullOrEmpty(batch))
|
|
||||||
{
|
|
||||||
_I = 0;
|
|
||||||
_Data = receivedData;
|
|
||||||
ScanPast("wafer:");
|
|
||||||
}
|
|
||||||
string wafer = GetToEOL();
|
|
||||||
_ = GetToEOL();
|
|
||||||
_ = GetToEOL();
|
|
||||||
if (string.IsNullOrEmpty(wafer))
|
|
||||||
throw new Exception("Wafer field is missing.");
|
|
||||||
if (!string.IsNullOrEmpty(title))
|
|
||||||
usedLast = false;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
title = lastProcessData.Title;
|
|
||||||
recipe = lastProcessData.Recipe;
|
|
||||||
@operator = lastProcessData.Operator;
|
|
||||||
batch = lastProcessData.Batch;
|
|
||||||
cassette = lastProcessData.Cassette;
|
|
||||||
usedLast = true;
|
|
||||||
}
|
|
||||||
string token = GetToken();
|
|
||||||
while (true)
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(token) || !char.IsDigit(token[0]))
|
|
||||||
break;
|
|
||||||
site = new()
|
|
||||||
{
|
|
||||||
Position = token,
|
|
||||||
Thickness = GetToken(),
|
|
||||||
};
|
|
||||||
sites.Add(site);
|
|
||||||
token = GetToken();
|
|
||||||
}
|
|
||||||
ScanPast("mean thickness =");
|
|
||||||
string meanThickness = GetBefore(", std. dev =");
|
|
||||||
string stdDev = GetToken();
|
|
||||||
string passFail = GetToEOL();
|
|
||||||
_ = GetToEOL();
|
|
||||||
_ = GetToEOL();
|
|
||||||
string line = GetToEOL();
|
|
||||||
ScanPast("thickness");
|
|
||||||
string radialVariationThickness = GetToEOL();
|
|
||||||
_ = GetToEOL();
|
|
||||||
ScanPast("Slot:");
|
|
||||||
string slot = GetBefore(";");
|
|
||||||
Header = new()
|
|
||||||
{
|
|
||||||
Title = title,
|
|
||||||
Recipe = recipe,
|
|
||||||
DateTime = dateTime,
|
|
||||||
Operator = @operator,
|
|
||||||
Batch = batch,
|
|
||||||
Cassette = cassette,
|
|
||||||
UsedLast = usedLast,
|
|
||||||
Wafer = wafer,
|
|
||||||
};
|
|
||||||
Body = new()
|
|
||||||
{
|
|
||||||
Sites = sites,
|
|
||||||
WaferMeanThickness = meanThickness,
|
|
||||||
StdDev = stdDev,
|
|
||||||
PassFail = passFail,
|
|
||||||
};
|
|
||||||
Footer = new()
|
|
||||||
{
|
|
||||||
Line = line,
|
|
||||||
RadialVariationThickness = radialVariationThickness,
|
|
||||||
Slot = slot,
|
|
||||||
};
|
|
||||||
lastProcessData.Title = title;
|
|
||||||
lastProcessData.Recipe = recipe;
|
|
||||||
lastProcessData.Operator = @operator;
|
|
||||||
lastProcessData.Batch = batch;
|
|
||||||
lastProcessData.Cassette = cassette;
|
|
||||||
}
|
|
||||||
|
|
||||||
private string GetBefore(string text)
|
|
||||||
{
|
|
||||||
string str;
|
|
||||||
string str1;
|
|
||||||
int num = _Data.IndexOf(text, _I);
|
|
||||||
if (num <= -1)
|
|
||||||
{
|
|
||||||
str = _Data.Substring(_I);
|
|
||||||
_I = _Data.Length;
|
|
||||||
str1 = str.Trim();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
str = _Data.Substring(_I, num - _I);
|
|
||||||
_I = num + text.Length;
|
|
||||||
str1 = str.Trim();
|
|
||||||
}
|
|
||||||
return str1;
|
|
||||||
}
|
|
||||||
|
|
||||||
private string GetToEOL()
|
|
||||||
{
|
|
||||||
string result;
|
|
||||||
if (_Data.IndexOf("\n", _I) > -1)
|
|
||||||
result = GetBefore("\n");
|
|
||||||
else
|
|
||||||
result = GetBefore(Environment.NewLine);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
private string GetToken()
|
|
||||||
{
|
|
||||||
while (true)
|
|
||||||
{
|
|
||||||
if (_I >= _Data.Length || !IsNullOrWhiteSpace(_Data.Substring(_I, 1)))
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
_I++;
|
|
||||||
}
|
|
||||||
int num = _I;
|
|
||||||
while (true)
|
|
||||||
{
|
|
||||||
if (num >= _Data.Length || IsNullOrWhiteSpace(_Data.Substring(num, 1)))
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
num++;
|
|
||||||
}
|
|
||||||
string str = _Data.Substring(_I, num - _I);
|
|
||||||
_I = num;
|
|
||||||
return str.Trim();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static bool IsNullOrWhiteSpace(string text)
|
|
||||||
{
|
|
||||||
bool flag;
|
|
||||||
int num = 0;
|
|
||||||
while (true)
|
|
||||||
{
|
|
||||||
if (num >= text.Length)
|
|
||||||
{
|
|
||||||
flag = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else if (char.IsWhiteSpace(text[num]))
|
|
||||||
{
|
|
||||||
num++;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
flag = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return flag;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ScanPast(string text)
|
|
||||||
{
|
|
||||||
int num = _Data.IndexOf(text, _I);
|
|
||||||
if (num <= -1)
|
|
||||||
{
|
|
||||||
_I = _Data.Length;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_I = num + text.Length;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Bio-Rad QS400MEPI Recipe: EP_8IN9PT Thu Apr 30 11:29:10 1970
|
|
||||||
// operator: J batch: BIORAD#2
|
|
||||||
// cassette: wafer: 52-589368-4445
|
|
||||||
// --------------------------------------------------------------------------------
|
|
||||||
// position thickness position thickness position thickness
|
|
||||||
// 1 45.735 2 46.536 3 46.742
|
|
||||||
// 4 46.015 5 46.648 6 45.366
|
|
||||||
// 7 46.263 8 46.512 9 46.373
|
|
||||||
// wafer mean thickness = 46.2433, std. dev = 0.4564 PASS
|
|
||||||
// ================================================================================
|
|
||||||
|
|
||||||
// Radial variation (computation B) PASS:
|
|
||||||
|
|
||||||
// thickness -2.7474
|
|
@ -49,23 +49,23 @@
|
|||||||
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="8.0.1" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.json" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.json" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
|
||||||
<PackageReference Include="Microsoft.Win32.SystemEvents" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Win32.SystemEvents" Version="8.0.0" />
|
||||||
<PackageReference Include="MSTest.TestAdapter" Version="3.5.1" />
|
<PackageReference Include="MSTest.TestAdapter" Version="3.6.1" />
|
||||||
<PackageReference Include="MSTest.TestFramework" Version="3.5.1" />
|
<PackageReference Include="MSTest.TestFramework" Version="3.6.1" />
|
||||||
<PackageReference Include="Pdfbox" Version="1.1.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
<PackageReference Include="Pdfbox" Version="1.1.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||||
<PackageReference Include="RoboSharp" Version="1.5.3" />
|
<PackageReference Include="RoboSharp" Version="1.5.3" />
|
||||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.0" />
|
<PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.1" />
|
||||||
<PackageReference Include="System.Data.OleDb" Version="8.0.0" />
|
<PackageReference Include="System.Data.OleDb" Version="8.0.1" />
|
||||||
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
|
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
|
||||||
<PackageReference Include="System.Drawing.Common" Version="8.0.7" />
|
<PackageReference Include="System.Drawing.Common" Version="8.0.10" />
|
||||||
<PackageReference Include="System.Text.Json" Version="8.0.4" />
|
<PackageReference Include="System.Text.Json" Version="8.0.5" />
|
||||||
<PackageReference Include="Tesseract" Version="5.2.0" />
|
<PackageReference Include="Tesseract" Version="5.2.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -503,7 +503,7 @@ public class FileRead : Properties.IFileRead
|
|||||||
foreach (string match in matches)
|
foreach (string match in matches)
|
||||||
{
|
{
|
||||||
fileName = Path.GetFileName(match);
|
fileName = Path.GetFileName(match);
|
||||||
File.Move(match, Path.Combine(fileConnectorConfiguration.SourceFileLocation, fileName));
|
File.Move(match, Path.Combine(nestedDirectory, fileName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -96,6 +96,27 @@ public class MET08THFTIRQS408M
|
|||||||
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
|
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
|
||||||
NonThrowTryCatch();
|
NonThrowTryCatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_57_0__MET08THFTIRQS408M__OpenInsight638662107339513927__Long()
|
||||||
|
{
|
||||||
|
DateTime dateTime;
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
_MET08THFTIRQS408M.Production__v2_57_0__MET08THFTIRQS408M__OpenInsight();
|
||||||
|
string[] variables = _MET08THFTIRQS408M.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
|
||||||
|
IFileRead fileRead = _MET08THFTIRQS408M.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||||
|
Logistics logistics = new(fileRead);
|
||||||
|
dateTime = FileHandlers.QS408M.ProcessData.GetDateTime(logistics, tickOffset: 0, dateTimeText: string.Empty);
|
||||||
|
Assert.IsTrue(dateTime == logistics.DateTimeFromSequence);
|
||||||
|
dateTime = FileHandlers.QS408M.ProcessData.GetDateTime(logistics, tickOffset: 0, dateTimeText: "Tue Nov 10 12:03:56 1970");
|
||||||
|
Assert.IsTrue(dateTime == logistics.DateTimeFromSequence);
|
||||||
|
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
|
||||||
|
NonThrowTryCatch();
|
||||||
|
}
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
|
@ -974,8 +974,8 @@ public class AdaptationTesting : ISMTP
|
|||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder))
|
if (!string.IsNullOrEmpty(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder))
|
||||||
{
|
{
|
||||||
if (!Directory.Exists(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder))
|
if (!Directory.Exists(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder.Split('|')[0]))
|
||||||
_ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder);
|
_ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder.Split('|')[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (IOException ex)
|
catch (IOException ex)
|
||||||
|
@ -117,16 +117,15 @@
|
|||||||
<Compile Include="Adaptation\FileHandlers\OpenInsight\Root.cs" />
|
<Compile Include="Adaptation\FileHandlers\OpenInsight\Root.cs" />
|
||||||
<Compile Include="Adaptation\FileHandlers\Processed\FileRead.cs" />
|
<Compile Include="Adaptation\FileHandlers\Processed\FileRead.cs" />
|
||||||
<Compile Include="Adaptation\FileHandlers\QS408M\Body.cs" />
|
<Compile Include="Adaptation\FileHandlers\QS408M\Body.cs" />
|
||||||
|
<Compile Include="Adaptation\FileHandlers\QS408M\Complete.cs" />
|
||||||
<Compile Include="Adaptation\FileHandlers\QS408M\Description.cs" />
|
<Compile Include="Adaptation\FileHandlers\QS408M\Description.cs" />
|
||||||
<Compile Include="Adaptation\FileHandlers\QS408M\Descriptor.cs" />
|
<Compile Include="Adaptation\FileHandlers\QS408M\Descriptor.cs" />
|
||||||
<Compile Include="Adaptation\FileHandlers\QS408M\Detail.cs" />
|
<Compile Include="Adaptation\FileHandlers\QS408M\Detail.cs" />
|
||||||
<Compile Include="Adaptation\FileHandlers\QS408M\FileRead.cs" />
|
<Compile Include="Adaptation\FileHandlers\QS408M\FileRead.cs" />
|
||||||
<Compile Include="Adaptation\FileHandlers\QS408M\Footer.cs" />
|
<Compile Include="Adaptation\FileHandlers\QS408M\Footer.cs" />
|
||||||
<Compile Include="Adaptation\FileHandlers\QS408M\Header.cs" />
|
<Compile Include="Adaptation\FileHandlers\QS408M\Header.cs" />
|
||||||
<Compile Include="Adaptation\FileHandlers\QS408M\LastProcessData.cs" />
|
|
||||||
<Compile Include="Adaptation\FileHandlers\QS408M\ProcessData.cs" />
|
<Compile Include="Adaptation\FileHandlers\QS408M\ProcessData.cs" />
|
||||||
<Compile Include="Adaptation\FileHandlers\QS408M\Site.cs" />
|
<Compile Include="Adaptation\FileHandlers\QS408M\Site.cs" />
|
||||||
<Compile Include="Adaptation\FileHandlers\QS408M\TXT.cs" />
|
|
||||||
<Compile Include="Adaptation\FileHandlers\SPaCe\FileRead.cs" />
|
<Compile Include="Adaptation\FileHandlers\SPaCe\FileRead.cs" />
|
||||||
<Compile Include="Adaptation\Ifx\Eaf\Common\Configuration\ConnectionSetting.cs" />
|
<Compile Include="Adaptation\Ifx\Eaf\Common\Configuration\ConnectionSetting.cs" />
|
||||||
<Compile Include="Adaptation\Ifx\Eaf\EquipmentConnector\File\Component\File.cs" />
|
<Compile Include="Adaptation\Ifx\Eaf\EquipmentConnector\File\Component\File.cs" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user