MET08RESIMAPCDE - v2.43.4 - MethodBaseName

This commit is contained in:
2022-08-08 16:05:28 -07:00
parent 94b06b7de5
commit 1d7368c44e
69 changed files with 1763 additions and 356 deletions

View File

@ -22,7 +22,7 @@ public class CellInstanceConnectionName
nameof(OpenInsight) => new OpenInsight.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
nameof(OpenInsightMetrologyViewer) => new OpenInsightMetrologyViewer.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
nameof(OpenInsightMetrologyViewerAttachments) => new OpenInsightMetrologyViewerAttachments.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
nameof(pcl) => new pcl.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
nameof(txt) => new txt.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
nameof(Processed) => new Processed.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
nameof(RsM) => new RsM.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
nameof(SPaCe) => new SPaCe.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),

View File

@ -103,7 +103,7 @@ public class FileRead : Shared.FileRead, IFileRead
return results;
}
private static void SaveOpenInsightFile(string reportFullPath, DateTime dateTime, List<pcl.Description> descriptions, Test[] tests)
private static void SaveOpenInsightFile(string reportFullPath, DateTime dateTime, List<txt.Description> descriptions, Test[] tests)
{
if (reportFullPath is null)
{ }
@ -122,7 +122,7 @@ public class FileRead : Shared.FileRead, IFileRead
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
SetFileParameterLotIDToLogisticsMID();
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
List<pcl.Description> descriptions = pcl.ProcessData.GetDescriptions(jsonElements);
List<txt.Description> descriptions = txt.ProcessData.GetDescriptions(jsonElements);
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
SaveOpenInsightFile(reportFullPath, dateTime, descriptions, tests);

View File

@ -107,7 +107,7 @@ public class FileRead : Shared.FileRead, IFileRead
return results;
}
private void SendData(DateTime dateTime, List<pcl.Description> descriptions)
private void SendData(DateTime dateTime, List<txt.Description> descriptions)
{
if (dateTime == DateTime.MinValue)
{ }
@ -131,7 +131,7 @@ public class FileRead : Shared.FileRead, IFileRead
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
SetFileParameterLotIDToLogisticsMID();
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
List<pcl.Description> descriptions = pcl.ProcessData.GetDescriptions(jsonElements);
List<txt.Description> descriptions = txt.ProcessData.GetDescriptions(jsonElements);
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
SendData(dateTime, descriptions);

View File

@ -42,18 +42,18 @@ public class WSRequest
public string Temp { get; set; }
public string UniqueId { get; set; }
public string Zone { get; set; }
public List<pcl.Detail> Details { get; protected set; }
public List<txt.Detail> Details { get; protected set; }
[Obsolete("For json")] public WSRequest() { }
internal WSRequest(IFileRead fileRead, Logistics logistics, List<pcl.Description> descriptions)
internal WSRequest(IFileRead fileRead, Logistics logistics, List<txt.Description> descriptions)
{
Id = "-1";
if (fileRead is null)
{ }
CellName = logistics.MesEntity;
Details = new List<pcl.Detail>();
if (descriptions[0] is not pcl.Description x)
Details = new List<txt.Detail>();
if (descriptions[0] is not txt.Description x)
throw new Exception();
//Header
{
@ -81,10 +81,10 @@ public class WSRequest
UniqueId = x.UniqueId;
Zone = x.Zone;
}
pcl.Detail detail;
foreach (pcl.Description description in descriptions)
txt.Detail detail;
foreach (txt.Description description in descriptions)
{
detail = new pcl.Detail
detail = new txt.Detail
{
HeaderUniqueId = description.HeaderUniqueId,
Merit = description.Merit,
@ -104,7 +104,7 @@ public class WSRequest
FilePath = onlyWSRequest;
}
internal static void PostOpenInsightMetrologyViewerAttachments(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, DateTime dateTime, string json, List<pcl.Description> descriptions, string matchDirectory)
internal static void PostOpenInsightMetrologyViewerAttachments(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, DateTime dateTime, string json, List<txt.Description> descriptions, string matchDirectory)
{
if (dateTime == DateTime.MinValue)
{ }
@ -117,8 +117,8 @@ public class WSRequest
}
WS.Results metrologyWSRequest = JsonSerializer.Deserialize<WS.Results>(json);
long wsResultsHeaderID = metrologyWSRequest.HeaderID;
string[] pclFiles = Directory.GetFiles(matchDirectory, "*.pcl", SearchOption.TopDirectoryOnly);
if (pclFiles.Length != 1)
string[] txtFiles = Directory.GetFiles(matchDirectory, "*.txt", SearchOption.TopDirectoryOnly);
if (txtFiles.Length != 1)
throw new Exception($"Invalid source file count for <{wsResultsHeaderID}>!{Environment.NewLine}{json}");
List<string> pdfFiles = new();
pdfFiles.AddRange(Directory.GetFiles(matchDirectory, "*.pdf_old", SearchOption.TopDirectoryOnly));

View File

@ -108,7 +108,7 @@ public class FileRead : Shared.FileRead, IFileRead
return results;
}
private void PostOpenInsightMetrologyViewerAttachments(string reportFullPath, DateTime dateTime, List<pcl.Description> descriptions)
private void PostOpenInsightMetrologyViewerAttachments(string reportFullPath, DateTime dateTime, List<txt.Description> descriptions)
{
if (string.IsNullOrEmpty(reportFullPath))
{ }
@ -139,7 +139,7 @@ public class FileRead : Shared.FileRead, IFileRead
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
SetFileParameterLotIDToLogisticsMID();
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
List<pcl.Description> descriptions = pcl.ProcessData.GetDescriptions(jsonElements);
List<txt.Description> descriptions = txt.ProcessData.GetDescriptions(jsonElements);
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
PostOpenInsightMetrologyViewerAttachments(reportFullPath, dateTime, descriptions);

View File

@ -108,7 +108,7 @@ public class FileRead : Shared.FileRead, IFileRead
return results;
}
private void DirectoryMove(string reportFullPath, DateTime dateTime, List<pcl.Description> descriptions)
private void DirectoryMove(string reportFullPath, DateTime dateTime, List<txt.Description> descriptions)
{
if (dateTime == DateTime.MinValue)
{ }
@ -143,7 +143,7 @@ public class FileRead : Shared.FileRead, IFileRead
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
SetFileParameterLotIDToLogisticsMID();
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
List<pcl.Description> descriptions = pcl.ProcessData.GetDescriptions(jsonElements);
List<txt.Description> descriptions = txt.ProcessData.GetDescriptions(jsonElements);
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)

View File

@ -209,7 +209,7 @@ public class Description : IDescription, Shared.Properties.IDescription
MID = logistics.MID,
//
Date = processData.Date,
Employee = processData.Engineer,
Employee = processData.Employee,
Lot = processData.Lot,
PSN = processData.PSN,
Reactor = processData.Reactor,

View File

@ -0,0 +1,23 @@
namespace Adaptation.FileHandlers.RsM;
public class Descriptor
{
public string Layer { get; private set; }
public string PSN { get; private set; }
public string RDS { get; private set; }
public string Reactor { get; private set; }
public string Run { get; private set; }
public string Zone { get; private set; }
public Descriptor(string layer, string psn, string rds, string reactor, string run, string zone)
{
Layer = layer;
PSN = psn;
RDS = rds;
Reactor = reactor;
Run = run;
Zone = zone;
}
}

View File

@ -105,8 +105,14 @@ public class FileRead : Shared.FileRead, IFileRead
IProcessData iProcessData = new ProcessData(this, _Logistics, results.Item4);
if (iProcessData is not ProcessData processData)
throw new Exception(string.Concat("A) No Data - ", dateTime.Ticks));
string mid = string.Concat(processData.Reactor, "-", processData.RDS, "-", processData.PSN);
mid = Regex.Replace(mid, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
string mid;
if (!string.IsNullOrEmpty(processData.Employee) && string.IsNullOrEmpty(processData.Reactor) && string.IsNullOrEmpty(processData.RDS) && string.IsNullOrEmpty(processData.PSN))
mid = processData.Employee;
else
{
mid = string.Concat(processData.Reactor, "-", processData.RDS, "-", processData.PSN);
mid = Regex.Replace(mid, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
}
SetFileParameterLotID(mid);
_Logistics.Update(mid, processData.Reactor);
string logBody = processData.LogBody;

View File

@ -28,12 +28,12 @@ public class ProcessData : IProcessData
public string Date { get; set; }
public DateTime DateTime { get; set; }
public string Employee { get; set; }
public string EquipId { get; set; }
public string Engineer { get; set; }
public string EquipId { get; set; }
public string FileName { get; set; }
public string Layer { get; set; }
public string Lot { get; set; }
public string LogBody { get; set; }
public string Lot { get; set; }
public string PSN { get; set; }
public string Project { get; set; }
public string RDS { get; set; }
@ -86,37 +86,86 @@ public class ProcessData : IProcessData
return results;
}
private void SetTitleData(string[] segments)
public static Descriptor GetDescriptor(string text)
{
if (segments.Length > 0)
Descriptor result;
string psn;
string rds;
string run;
string zone;
string layer;
string title;
string reactor;
string[] segments;
const string defaultPSN = "0000";
const string defaultRDS = "000000";
const string defaultReactor = "00";
if (text.Length is 2 or 3)
{
run = text;
psn = defaultPSN;
rds = defaultRDS;
zone = string.Empty;
layer = string.Empty;
reactor = defaultReactor;
}
else
{
// Remove illegal characters \/:*?"<>| found in the title.
string title = Regex.Replace(segments[0], @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
title = Regex.Replace(text, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
if (title.StartsWith("1T") || title.StartsWith("1t"))
title = title.Substring(2);
Title = title;
Run = title;
string[] parsedBatch = title.Split('-');
if (parsedBatch.Length == 1)
RDS = title;
run = title;
segments = title.Split('-');
if (segments.Length == 0)
reactor = defaultReactor;
else
reactor = segments[0];
if (segments.Length <= 1)
rds = defaultRDS;
else
rds = segments[1];
if (reactor.Length > 3)
{
rds = reactor;
reactor = defaultReactor;
}
if (segments.Length <= 2)
psn = defaultPSN;
else
psn = segments[2];
if (segments.Length < 3)
layer = string.Empty;
else
{
if (parsedBatch.Length > 0)
Reactor = parsedBatch[0];
if (parsedBatch.Length > 1)
RDS = parsedBatch[1];
if (parsedBatch.Length > 2)
{
string[] parsedPSN = parsedBatch[2].Split('.');
if (parsedPSN.Length > 0)
PSN = parsedPSN[0];
if (parsedPSN.Length > 1)
Layer = parsedPSN[1];
}
if (parsedBatch.Length > 3)
Zone = parsedBatch[3];
string[] segmentsB = segments[2].Split('.');
if (segmentsB.Length > 1)
psn = segmentsB[0];
if (segmentsB.Length <= 1)
layer = string.Empty;
else
layer = segmentsB[1];
}
if (segments.Length <= 3)
zone = string.Empty;
else
zone = segments[3];
}
result = new(layer, psn, rds, reactor, run, zone);
return result;
}
private void SetTitleData(Logistics logistics, string text)
{
string timeFormat = "yyyyMMddHHmmss";
Descriptor descriptor = GetDescriptor(text);
PSN = descriptor.PSN;
RDS = descriptor.RDS;
Run = descriptor.Run;
Zone = descriptor.Zone;
Layer = descriptor.Layer;
Reactor = descriptor.Reactor;
UniqueId = string.Concat(logistics.JobID, "_", descriptor.Run, "_", logistics.DateTimeFromSequence.ToString(timeFormat));
}
private void SetFileNameData(string[] segments)
@ -174,9 +223,9 @@ public class ProcessData : IProcessData
StandardDeviationPercentage = Math.Round(standardDeviation / average, 4).ToString("0.00%");
}
private void SetOperatorData(string[] segments)
private void SetOperatorData(string[] segments, bool updateEmployee)
{
if (segments.Length > 1)
if (segments.Length > 1 && updateEmployee)
Employee = segments[0];
if (segments.Length > 2)
EquipId = segments[1];
@ -219,20 +268,19 @@ public class ProcessData : IProcessData
Lot = "LotID";
Detail detail;
string[] segments;
string timeFormat = "yyyyMMddHHmmss";
string[] separator = new string[] { " " };
string[] lines = File.ReadAllLines(logistics.ReportFullPath);
for (int i = 0; i < lines.Length; i++)
{
segments = lines[i].Split(separator, StringSplitOptions.RemoveEmptyEntries);
if (lines[i].Contains("<Title>"))
SetTitleData(segments);
if (lines[i].Contains("<Title>") && segments.Length > 0)
SetTitleData(logistics, segments[0]);
else if (lines[i].Contains("<FileName, Proj,Rcpe, LotID,WfrID"))
SetFileNameData(segments);
else if (lines[i].Contains("<DateTime,Temp,TCR%,N|P>"))
SetDateTimeData(logistics, segments);
else if (lines[i].Contains("<Operator, Epuipment>"))
SetOperatorData(segments);
SetOperatorData(segments, updateEmployee: string.IsNullOrEmpty(Employee));
else if (lines[i].Contains("<Engineer>"))
SetEngineerData(segments);
else if (lines[i].Contains("<NumProbePoints, SingleOrDualProbeConfig, #ActPrbPts, Rsens,IdrvMx,VinGain, DataRejectSigma, MeritThreshold"))
@ -249,7 +297,6 @@ public class ProcessData : IProcessData
}
}
}
UniqueId = string.Concat(EquipId, "_", Run, "_", logistics.DateTimeFromSequence.ToString(timeFormat));
for (int i = 0; i < _Details.Count; i++)
{
if (_Details[i] is not Detail item)

View File

@ -5,7 +5,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
namespace Adaptation.FileHandlers.pcl;
namespace Adaptation.FileHandlers.txt;
public class Description : IDescription, Shared.Properties.IDescription
{
@ -209,7 +209,7 @@ public class Description : IDescription, Shared.Properties.IDescription
MID = logistics.MID,
//
Date = processData.Date,
Employee = processData.Engineer,
Employee = processData.Employee,
Lot = processData.Lot,
PSN = processData.PSN,
Reactor = processData.Reactor,

View File

@ -0,0 +1,25 @@
namespace Adaptation.FileHandlers.txt;
public class Descriptor
{
public string Layer { get; private set; }
public string PSN { get; private set; }
public string RDS { get; private set; }
public string Reactor { get; private set; }
public string Run { get; private set; }
public string Title { get; private set; }
public string Zone { get; private set; }
public Descriptor(string layer, string psn, string rds, string reactor, string run, string title, string zone)
{
Layer = layer;
PSN = psn;
RDS = rds;
Reactor = reactor;
Run = run;
Title = title;
Zone = zone;
}
}

View File

@ -1,4 +1,4 @@
namespace Adaptation.FileHandlers.pcl;
namespace Adaptation.FileHandlers.txt;
public class Detail
{

View File

@ -9,7 +9,7 @@ using System.Linq;
using System.Text.Json;
using System.Text.RegularExpressions;
namespace Adaptation.FileHandlers.pcl;
namespace Adaptation.FileHandlers.txt;
public class FileRead : Shared.FileRead, IFileRead
{
@ -105,8 +105,14 @@ public class FileRead : Shared.FileRead, IFileRead
IProcessData iProcessData = new ProcessData(this, _Logistics, results.Item4);
if (iProcessData is not ProcessData processData)
throw new Exception(string.Concat("A) No Data - ", dateTime.Ticks));
string mid = string.Concat(processData.Reactor, "-", processData.RDS, "-", processData.PSN);
mid = Regex.Replace(mid, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
string mid;
if (!string.IsNullOrEmpty(processData.Employee) && string.IsNullOrEmpty(processData.Reactor) && string.IsNullOrEmpty(processData.RDS) && string.IsNullOrEmpty(processData.PSN))
mid = processData.Employee;
else
{
mid = string.Concat(processData.Reactor, "-", processData.RDS, "-", processData.PSN);
mid = Regex.Replace(mid, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
}
SetFileParameterLotID(mid);
_Logistics.Update(mid, processData.Reactor);
if (!iProcessData.Details.Any())

View File

@ -12,7 +12,7 @@ using System.Text.Json;
using System.Text.Json.Serialization;
using System.Text.RegularExpressions;
namespace Adaptation.FileHandlers.pcl;
namespace Adaptation.FileHandlers.txt;
public class ProcessData : IProcessData
{
@ -32,8 +32,8 @@ public class ProcessData : IProcessData
public string DataReject { get; set; }
public string Date { get; set; }
public string Employee { get; set; }
public string EquipId { get; set; }
public string Engineer { get; set; }
public string EquipId { get; set; }
public string FileName { get; set; }
public string Layer { get; set; }
public string Lot { get; set; }
@ -242,6 +242,152 @@ public class ProcessData : IProcessData
return result;
}
public static Descriptor GetDescriptor(string text)
{
Descriptor result;
string psn;
string rds;
string run;
string zone;
string title;
string layer;
string reactor;
string[] segments;
const string defaultPSN = "0000";
const string defaultRDS = "000000";
const string defaultReactor = "00";
if (text.Length is 2 or 3)
{
run = text;
title = text;
psn = defaultPSN;
rds = defaultRDS;
zone = string.Empty;
layer = string.Empty;
reactor = defaultReactor;
}
else
{
// Remove illegal characters \/:*?"<>| found in the run.
title = Regex.Replace(text.Trim(), @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
if (title.StartsWith("1T") || title.StartsWith("1t"))
title = title.Substring(2);
run = title;
segments = title.Split('-');
if (segments.Length == 0)
reactor = defaultReactor;
else
reactor = segments[0];
if (segments.Length <= 1)
rds = defaultRDS;
else
rds = segments[1];
if (reactor.Length > 3)
{
rds = reactor;
reactor = defaultReactor;
}
if (segments.Length <= 2)
psn = defaultPSN;
else
psn = segments[2];
if (segments.Length < 3)
layer = string.Empty;
else
{
string[] segmentsB = segments[2].Split('.');
if (segmentsB.Length > 1)
psn = segmentsB[0];
if (segmentsB.Length <= 1)
layer = string.Empty;
else
layer = segmentsB[1];
}
if (segments.Length <= 3)
zone = string.Empty;
else
zone = segments[3];
}
result = new(layer, psn, rds, reactor, run, title, zone);
return result;
}
private void Set(Logistics logistics, string receivedData)
{
string lot;
string psn;
string rds;
string run;
string date;
string temp;
string zone;
string layer;
string title;
string recipe;
string dlRatio;
string equipId;
string reactor;
string employee;
string engineer;
string resistivitySpec;
ScanPast("RUN:");
title = GetToEOL();
ScanPast("Recipe:");
recipe = GetBefore("RESISTIVITY SPEC:");
if (string.IsNullOrEmpty(recipe))
{
_I = 0;
_Data = receivedData;
ScanPast("RUN:");
title = GetToEOL();
ScanPast("DEVICE:");
recipe = GetBefore("RESISTIVITY SPEC:");
}
Descriptor descriptor = GetDescriptor(title);
psn = descriptor.PSN;
rds = descriptor.RDS;
run = descriptor.Run;
zone = descriptor.Zone;
layer = descriptor.Layer;
title = descriptor.Title;
reactor = descriptor.Reactor;
resistivitySpec = GetToEOL();
ScanPast("EQUIP#:");
equipId = GetBefore("Engineer:");
// Remove illegal characters \/:*?"<>| found in the equipId.
equipId = Regex.Replace(equipId, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
engineer = GetToEOL();
ScanPast("LotID:");
lot = GetBefore("D.L.RATIO:");
dlRatio = GetToEOL();
ScanPast("OPERATOR:");
employee = GetBefore("TEMP:");
temp = GetToken();
string dateTimeText = GetToEOL();
DateTime dateTime = GetDateTime(logistics, dateTimeText);
date = dateTime.ToString();
//create filename / unique id
string timeFormat = "yyyyMMddHHmmss";
_Log.Debug($"****ParseData - Title:{title}; EquipId:{equipId};");
if (string.IsNullOrEmpty(title))
throw new Exception("Batch (title) information does not exist");
Lot = lot;
PSN = psn;
RDS = rds;
Run = run;
Date = date;
Temp = temp;
Zone = zone;
Layer = layer;
Recipe = recipe;
DLRatio = dlRatio;
Reactor = reactor;
Employee = employee;
Engineer = engineer;
ResistivitySpec = resistivitySpec;
UniqueId = string.Concat(equipId, "_", title, "_", logistics.DateTimeFromSequence.ToString(timeFormat));
}
private void Parse(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection)
{
if (fileRead is null)
@ -277,60 +423,7 @@ public class ProcessData : IProcessData
Detail detail;
_I = 0;
_Data = receivedData;
ScanPast("RUN:");
string title = GetToEOL();
ScanPast("Recipe:");
Recipe = GetBefore("RESISTIVITY SPEC:");
if (string.IsNullOrEmpty(Recipe))
{
_I = 0;
_Data = receivedData;
ScanPast("RUN:");
title = GetToEOL();
ScanPast("DEVICE:");
Recipe = GetBefore("RESISTIVITY SPEC:");
}
// Remove illegal characters \/:*?"<>| found in the run.
title = Regex.Replace(title.Trim(), @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
if (title.StartsWith("1T") || title.StartsWith("1t"))
title = title.Substring(2);
Run = title;
string[] parsedBatch = title.Split('-');
if (parsedBatch.Length == 1)
RDS = title;
else
{
if (parsedBatch.Length > 0)
Reactor = parsedBatch[0];
if (parsedBatch.Length > 1)
RDS = parsedBatch[1];
if (parsedBatch.Length > 2)
{
string[] parsedPSN = parsedBatch[2].Split('.');
if (parsedPSN.Length >= 1)
PSN = parsedPSN[0];
if (parsedPSN.Length >= 2)
Layer = parsedPSN[1];
}
if (parsedBatch.Length > 3)
Zone = parsedBatch[3];
}
ResistivitySpec = GetToEOL();
ScanPast("EQUIP#:");
string equipId = GetBefore("Engineer:");
// Remove illegal characters \/:*?"<>| found in the equipId.
equipId = Regex.Replace(equipId, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
EquipId = equipId;
Engineer = GetToEOL();
ScanPast("LotID:");
Lot = GetBefore("D.L.RATIO:");
DLRatio = GetToEOL();
ScanPast("OPERATOR:");
Employee = GetBefore("TEMP:");
Temp = GetToken();
string dateTimeText = GetToEOL();
DateTime dateTime = GetDateTime(logistics, dateTimeText);
Date = dateTime.ToString();
Set(logistics, receivedData);
ScanPast("AutoOptimizeGain =");
AutoOptimizeGain = GetBefore("AutoProbeHeightSet =");
AutoProbeHeightSet = GetToEOL();
@ -400,12 +493,6 @@ public class ProcessData : IProcessData
}
}
}
//create filename / unique id
string timeFormat = "yyyyMMddHHmmss";
_Log.Debug($"****ParseData - Title:{title}; EquipId:{equipId};");
if (string.IsNullOrEmpty(title))
throw new Exception("Batch (title) information does not exist");
UniqueId = string.Concat(equipId, "_", title, "_", logistics.DateTimeFromSequence.ToString(timeFormat));
foreach (Detail item in _Details.Cast<Detail>())
{
item.HeaderUniqueId = UniqueId;