MET08RESIHGCV - v2.43.4 - MethodBaseName

This commit is contained in:
2022-08-08 16:26:42 -07:00
parent 8bb1dcded7
commit 5d15be7ce2
44 changed files with 1402 additions and 358 deletions

View File

@ -95,7 +95,7 @@ public class WSRequest
GradeMean = x.GradeMean;
GradeRadialGradient = x.GradeRadialGradient;
GradeStdDev = x.GradeStdDev;
Operator = x.Employee;
Operator = logistics.MesEntity;
Layer = x.Layer;
Lot = x.Lot;
Model = x.Model;

View File

@ -0,0 +1,25 @@
namespace Adaptation.FileHandlers.pcl;
public class Descriptor
{
public string Employee { get; private set; }
public string Layer { get; private set; }
public string Lot { get; private set; }
public string PSN { get; private set; }
public string RDS { get; private set; }
public string Reactor { get; private set; }
public string Zone { get; private set; }
public Descriptor(string employee, string layer, string lot, string psn, string rds, string reactor, string zone)
{
Employee = employee;
Layer = layer;
Lot = lot;
PSN = psn;
RDS = rds;
Reactor = reactor;
Zone = zone;
}
}

View File

@ -20,7 +20,7 @@ public class FileRead : Shared.FileRead, IFileRead
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, 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, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted)
{
_MinFileLength = 15;
_MinFileLength = 150;
_NullData = string.Empty;
_Logistics = new(this);
if (_FileParameter is null)
@ -107,18 +107,23 @@ public class FileRead : Shared.FileRead, IFileRead
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>());
_Logistics = new Logistics(this, reportFullPath, useSplitForMID: true);
SetFileParameterLotIDToLogisticsMID();
if (reportFullPath.Length < _MinFileLength)
results.Item4.Add(new FileInfo(reportFullPath));
if (_Logistics.FileInfo.Length < _MinFileLength)
results.Item4.Add(_Logistics.FileInfo);
else
{
IProcessData iProcessData = new ProcessData(this, _Logistics, results.Item4, _GhostPCLFileName, _PDFTextStripperFileName);
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];
_Logistics.MID = mid;
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.ProcessJobID = processData.Reactor;
_Logistics.Update(mid, processData.Reactor);
if (!iProcessData.Details.Any())
throw new Exception(string.Concat("B) No Data - ", dateTime.Ticks));
results = iProcessData.GetResults(this, _Logistics, results.Item4);

View File

@ -218,6 +218,112 @@ public class ProcessData : IProcessData
return result;
}
public static Descriptor GetDescriptor(string text)
{
Descriptor result;
string lot;
string rds;
string psn;
string zone;
string layer;
string reactor;
string employee;
const string defaultPSN = "0000";
const string defaultReactor = "00";
const string defaultRDS = "000000";
if (text.Length is 2 or 3)
{
lot = text;
employee = lot;
rds = defaultRDS;
psn = defaultPSN;
zone = string.Empty;
layer = string.Empty;
reactor = defaultReactor;
}
else
{
// Remove illegal characters \/:*?"<>| found in the Lot.
lot = Regex.Replace(text, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
string[] segments = lot.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];
if (segments.Length <= 4)
employee = string.Empty;
else
employee = segments[4];
}
result = new(employee, layer, lot, psn, rds, reactor, zone);
return result;
}
private void Set(Logistics logistics, string headerText)
{
string lot;
string rds;
string psn;
string zone;
string layer;
string reactor;
string employee;
ScanPast("Lot :");
if (headerText.Contains("Ramp Rate :"))
lot = GetBefore("Ramp Rate :");
else if (headerText.Contains("Forward Rate :"))
lot = GetBefore("Forward Rate :");
else if (headerText.Contains("Conduct Type:"))
lot = GetBefore("Conduct Type:");
else
lot = string.Empty;
Descriptor descriptor = GetDescriptor(lot);
lot = descriptor.Lot;
psn = descriptor.PSN;
rds = descriptor.RDS;
zone = descriptor.Zone;
layer = descriptor.Layer;
reactor = descriptor.Reactor;
employee = descriptor.Employee;
Lot = lot;
PSN = psn;
RDS = rds;
Zone = zone;
Layer = layer;
Reactor = reactor;
Employee = employee;
UniqueId = string.Format("{0}_{1}_{2}", logistics.JobID, lot, Path.GetFileNameWithoutExtension(logistics.ReportFullPath));
}
private void Parse(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, string ghostPCLFileName, string pdfTextStripperFileName)
{
if (fileRead is null)
@ -280,22 +386,12 @@ public class ProcessData : IProcessData
_Data = headerText;
_Log.Debug($"****MERCURY-DATA [002]= {headerText}");
ScanPast("Operator:");
Employee = GetBefore("Start Voltage:");
_ = GetBefore("Start Voltage:");
StartVoltage = GetBefore("V");
ScanPast("Wafer :");
Wafer = GetBefore("S Voltage :"); // This is actually "Stop Voltage"
StopVoltage = GetBefore("V");
ScanPast("Lot :");
if (headerText.Contains("Ramp Rate :"))
Lot = GetBefore("Ramp Rate :");
else if (headerText.Contains("Forward Rate :"))
Lot = GetBefore("Forward Rate :");
else if (headerText.Contains("Conduct Type:"))
Lot = GetBefore("Conduct Type:");
else
Lot = string.Empty;
// Remove illegal characters \/:*?"<>| found in the Lot.
Lot = Regex.Replace(Lot, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
Set(logistics, headerText);
RampRate = GetBefore("mV/sec");
ScanPast("Plan :");
Plan = GetBefore("G limit :");
@ -360,28 +456,6 @@ public class ProcessData : IProcessData
RsMean = GetToken();
RsStdDev = GetToken();
RsRadialGradient = GetToken();
string lot = Lot;
string[] segments = lot.Split('-');
if (segments.Length >= 1)
Reactor = segments[0];
if (segments.Length >= 2)
RDS = segments[1];
if (segments.Length >= 3)
{
string str = segments[2];
string[] segmentsB = str.Split('.');
if (segmentsB.Length >= 1)
PSN = segmentsB[0];
if (segmentsB.Length >= 2)
Layer = segmentsB[1];
}
if (segments.Length >= 4)
Zone = segments[3];
//ScanPast("Flat Z: Grade : % Flat Z: Grade : % Flat Z: Grade : %");
ScanPast("Flat Z: Grade : % Flat Z: Grade : % Flat Z: Grade : %");
string token = GetToken();
@ -403,7 +477,6 @@ public class ProcessData : IProcessData
hgProbeDetail.Phase = GetToken();
_ = GetToEOL();
hgProbeDetail.Grade = GetToken();
;
hgProbeDetail.UniqueId = string.Concat("_Point-", _Details.Count + 1);
_Details.Add(hgProbeDetail);
_ = GetToken();
@ -422,14 +495,12 @@ public class ProcessData : IProcessData
}
}
}
;
UniqueId = string.Format("{0}_{1}_{2}", logistics.JobID, Lot, Path.GetFileNameWithoutExtension(logistics.ReportFullPath));
foreach (Detail detail in _Details.Cast<Detail>())
{
detail.HeaderUniqueId = UniqueId;
detail.UniqueId = string.Concat(detail, detail.UniqueId);
}
fileInfoCollection.Add(new FileInfo(logistics.ReportFullPath));
fileInfoCollection.Add(logistics.FileInfo);
}
#nullable enable