Match TFS Changeset 303336
This commit is contained in:
45
Adaptation/Helpers/ConfigData.Level.cs
Normal file
45
Adaptation/Helpers/ConfigData.Level.cs
Normal file
@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Adaptation.Helpers
|
||||
{
|
||||
|
||||
public partial class ConfigData
|
||||
{
|
||||
public enum Level
|
||||
{
|
||||
IsXToOpenInsightMetrologyViewer, //MetrologyWS.SendData(logic, string.Concat("http://", serverName, "/api/inbound/TencorSP1"), headerAttachments, detailAttachments);
|
||||
IsXToIQSSi, //bool WriteFileSPC(Dictionary
|
||||
IsXToOpenInsight, //bool WriteFileOpenInsight(Dictionary
|
||||
IsXToOpenInsightMetrologyViewerAttachments, //Site-Two
|
||||
IsXToAPC,
|
||||
IsXToSPaCe,
|
||||
IsXToArchive,
|
||||
IsArchive,
|
||||
IsDummy,
|
||||
IsNaEDA
|
||||
}
|
||||
|
||||
public static List<Tuple<int, Enum, string>> LevelTuples
|
||||
{
|
||||
get
|
||||
{
|
||||
return new List<Tuple<int, Enum, string>>
|
||||
{
|
||||
new Tuple<int, Enum, string>(0, Level.IsNaEDA, @"\EC_EDA\Staging\Traces\~\Source"),
|
||||
new Tuple<int, Enum, string>(15, Level.IsXToOpenInsightMetrologyViewer, @"\EC_EAFLog\TracesMES\~\Source"),
|
||||
new Tuple<int, Enum, string>(36, Level.IsXToIQSSi, @"\EC_SPC_Si\Traces\~\PollPath"),
|
||||
new Tuple<int, Enum, string>(36, Level.IsXToOpenInsight, @"\\messa01ec.ec.local\APPS\Metrology\~\Source"),
|
||||
new Tuple<int, Enum, string>(36, Level.IsXToOpenInsightMetrologyViewerAttachments, @"\EC_Characterization_Si\In Process\~\Source"),
|
||||
new Tuple<int, Enum, string>(360, Level.IsXToAPC, @"\EC_APC\Staging\Traces\~\PollPath"),
|
||||
new Tuple<int, Enum, string>(-36, Level.IsXToSPaCe, @"\EC_SPC_Si\Traces\~\Source"),
|
||||
new Tuple<int, Enum, string>(180, Level.IsXToArchive, @"\EC_EAFLog\TracesArchive\~\Source"),
|
||||
new Tuple<int, Enum, string>(36, Level.IsArchive, @"\EC_Characterization_Si\Processed")
|
||||
//new Tuple<int, Enum, string>("IsDummy"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
520
Adaptation/Helpers/ConfigData.cs
Normal file
520
Adaptation/Helpers/ConfigData.cs
Normal file
@ -0,0 +1,520 @@
|
||||
using Adaptation.Eaf.Management.ConfigurationData.CellAutomation;
|
||||
using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration;
|
||||
using Adaptation.Shared;
|
||||
using Adaptation.Shared.Metrology;
|
||||
using Infineon.Monitoring.MonA;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
using System.Threading;
|
||||
|
||||
namespace Adaptation.Helpers
|
||||
{
|
||||
|
||||
public partial class ConfigData : ConfigDataBase
|
||||
{
|
||||
|
||||
internal const object NullData = null;
|
||||
internal const int MinFileLength = 100;
|
||||
|
||||
public string IqsFile { get; private set; }
|
||||
public string TracePath { get; private set; }
|
||||
public Level? Duplicator { get; private set; }
|
||||
public string MemoryPath { get; private set; }
|
||||
public string VillachPath { get; private set; }
|
||||
public string ProgressPath { get; private set; }
|
||||
public string IqsQueryFilter { get; private set; }
|
||||
public string GhostPCLFileName { get; private set; }
|
||||
public string OpenInsightSiViewer { get; private set; }
|
||||
public string OpenInsightFilePattern { get; private set; }
|
||||
public string OpenInsightMetrogyViewerAPI { get; private set; }
|
||||
public static Dictionary<string, List<long>> DummyRuns { get; private set; }
|
||||
|
||||
private Timer _Timer;
|
||||
private int _LastDummyRunIndex;
|
||||
private readonly Calendar _Calendar;
|
||||
private readonly string _ReportFullPath;
|
||||
|
||||
public ConfigData(ILogic logic, string cellName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, IList<ModelObjectParameterDefinition> modelObjectParameterDefinitions, string parameterizedModelObjectDefinitionType, bool isEAFHosted) :
|
||||
base(cellName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, isEAFHosted)
|
||||
{
|
||||
_LastDummyRunIndex = -1;
|
||||
UseCyclicalForDescription = false;
|
||||
CultureInfo cultureInfo = new CultureInfo("en-US");
|
||||
_Calendar = cultureInfo.Calendar;
|
||||
string firstSourceFileFilter = fileConnectorConfiguration.SourceFileFilter.Split('|')[0];
|
||||
if (DummyRuns is null)
|
||||
DummyRuns = new Dictionary<string, List<long>>();
|
||||
bool isDuplicator = cellInstanceConnectionName.StartsWith(cellName);
|
||||
int level = (cellInstanceConnectionName.Length - cellInstanceConnectionName.Replace("-", string.Empty).Length);
|
||||
if (!isDuplicator)
|
||||
Duplicator = null;
|
||||
else
|
||||
{
|
||||
CellNames.Add(cellName, cellName);
|
||||
MesEntities.Add(cellName, cellName);
|
||||
Duplicator = (Level)level;
|
||||
}
|
||||
if (isDuplicator)
|
||||
ProcessDataDescription = new Duplicator.Description();
|
||||
else
|
||||
ProcessDataDescription = new ProcessData.FileRead.Description();
|
||||
if (!isDuplicator)
|
||||
{
|
||||
//Verify(fileConnectorConfiguration, cellInstanceConnectionName);
|
||||
if (!EafHosted)
|
||||
VerifyProcessDataDescription(logic);
|
||||
else
|
||||
WriteExportAliases(logic, cellName, cellInstanceConnectionName);
|
||||
}
|
||||
GhostPCLFileName = string.Concat(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), @"\gpcl6win64.exe");
|
||||
if (EafHosted && Duplicator.HasValue && Duplicator.Value == Level.IsXToOpenInsightMetrologyViewerAttachments && !File.Exists(GhostPCLFileName))
|
||||
throw new Exception("Ghost PCL FileName doesn't Exist!");
|
||||
//LincPDFCFileName = string.Concat(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), @"\LincPDFC.exe");
|
||||
if (!modelObjectParameterDefinitions.Any())
|
||||
{
|
||||
CellNames.Add(cellName, "****");
|
||||
MesEntities.Add(cellName, "****");
|
||||
}
|
||||
else
|
||||
{
|
||||
int index;
|
||||
string key;
|
||||
string variable = string.Empty;
|
||||
Dictionary<string, string> iqsSection = new Dictionary<string, string>();
|
||||
Dictionary<string, string> pathSection = new Dictionary<string, string>();
|
||||
Dictionary<string, string> commonSection = new Dictionary<string, string>();
|
||||
Dictionary<string, string> openInsightSection = new Dictionary<string, string>();
|
||||
foreach (ModelObjectParameterDefinition modelObjectParameterDefinition in modelObjectParameterDefinitions)
|
||||
{
|
||||
if (!modelObjectParameterDefinition.Name.Contains('.'))
|
||||
continue;
|
||||
else if (modelObjectParameterDefinition.Name.StartsWith("Description.") && (modelObjectParameterDefinition.Name.EndsWith(".EventName") || modelObjectParameterDefinition.Name.EndsWith(".EquipmentType")))
|
||||
continue;
|
||||
index = modelObjectParameterDefinition.Name.IndexOf(".");
|
||||
if (index <= -1)
|
||||
continue;
|
||||
key = modelObjectParameterDefinition.Name.Substring(0, index);
|
||||
variable = modelObjectParameterDefinition.Name.Substring(index + 1);
|
||||
if (key == "COMMON")
|
||||
commonSection.Add(variable, modelObjectParameterDefinition.Value);
|
||||
//else if (key == "CONNECTION STRINGS")
|
||||
// connectionStringsSection.Add(variable, modelObjectParameterDefinition.Value);
|
||||
else if (key == "IQS")
|
||||
iqsSection.Add(variable, modelObjectParameterDefinition.Value);
|
||||
else if (key == "OpenInsight")
|
||||
openInsightSection.Add(variable, modelObjectParameterDefinition.Value);
|
||||
else if (key == "PATH")
|
||||
pathSection.Add(variable, modelObjectParameterDefinition.Value);
|
||||
//else if (key == "REACTOR")
|
||||
// reactorTuples.Add(new Tuple<string, string>(variable, modelObjectParameterDefinition.Value));
|
||||
//else if (key == "TIBCO")
|
||||
// tibcoSection.Add(variable, modelObjectParameterDefinition.Value);
|
||||
else
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
}
|
||||
if (!iqsSection.Any())
|
||||
throw new Exception("IQS section is missing from configuration");
|
||||
else
|
||||
{
|
||||
key = "FILE";
|
||||
if (iqsSection.ContainsKey(key))
|
||||
IqsFile = iqsSection[key];
|
||||
else
|
||||
throw new Exception(string.Concat("Missing IQS Configuration entry for ", key));
|
||||
if (string.IsNullOrEmpty(IqsFile))
|
||||
throw new Exception(string.Format("IQS key {0} is empty", key));
|
||||
key = "QUERY";
|
||||
if (iqsSection.ContainsKey(key))
|
||||
IqsQueryFilter = iqsSection[key];
|
||||
else
|
||||
throw new Exception(string.Concat("Missing IQS Configuration entry for ", key));
|
||||
if (string.IsNullOrEmpty(IqsQueryFilter))
|
||||
throw new Exception(string.Format("IQS key {0} is empty", key));
|
||||
}
|
||||
if (!pathSection.Any())
|
||||
throw new Exception("Path section is missing from configuration");
|
||||
else
|
||||
{
|
||||
key = "TRACE";
|
||||
if (pathSection.ContainsKey(key) && pathSection[key].StartsWith(@"\\"))
|
||||
TracePath = pathSection[key];
|
||||
if (!string.IsNullOrEmpty(TracePath) && !Directory.Exists(TracePath))
|
||||
Directory.CreateDirectory(TracePath);
|
||||
key = "VILLACH";
|
||||
if (pathSection.ContainsKey(key) && pathSection[key].StartsWith(@"\\"))
|
||||
VillachPath = pathSection[key];
|
||||
if (!string.IsNullOrEmpty(VillachPath) && !Directory.Exists(VillachPath))
|
||||
Directory.CreateDirectory(VillachPath);
|
||||
key = "Progress";
|
||||
if (pathSection.ContainsKey(key) && pathSection[key].StartsWith(@"\\"))
|
||||
ProgressPath = pathSection[key];
|
||||
if (!string.IsNullOrEmpty(ProgressPath) && Directory.Exists(Path.GetPathRoot(ProgressPath)) && !Directory.Exists(ProgressPath))
|
||||
Directory.CreateDirectory(ProgressPath);
|
||||
key = "Memory";
|
||||
if (pathSection.ContainsKey(key) && pathSection[key].StartsWith(@"\\"))
|
||||
MemoryPath = pathSection[key];
|
||||
if (!string.IsNullOrEmpty(MemoryPath) && !Directory.Exists(MemoryPath))
|
||||
Directory.CreateDirectory(MemoryPath);
|
||||
}
|
||||
if (!commonSection.Any())
|
||||
throw new Exception("Common section is missing from configuration");
|
||||
else
|
||||
{
|
||||
key = "CELL_NAMES";
|
||||
if (!commonSection.ContainsKey(key) || !commonSection[key].Contains(';') || !commonSection[key].Contains(':'))
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
else
|
||||
{
|
||||
string[] segments;
|
||||
string[] cellNames = commonSection[key].Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
foreach (string item in cellNames)
|
||||
{
|
||||
segments = item.Split(':');
|
||||
CellNames.Add(segments[0].Trim(), segments[1].Trim());
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(cellName) && !CellNames.ContainsKey(cellName))
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
key = "MES_ENTITIES";
|
||||
if (!commonSection.ContainsKey(key) || !commonSection[key].Contains(';') || !commonSection[key].Contains(':'))
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
else
|
||||
{
|
||||
string[] segments;
|
||||
string[] mesEntity = commonSection[key].Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
foreach (string item in mesEntity)
|
||||
{
|
||||
segments = item.Split(':');
|
||||
MesEntities.Add(segments[0].Trim(), segments[1].Trim());
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(cellName) && !MesEntities.ContainsKey(cellName))
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
}
|
||||
if (!MesEntities.Any())
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
if (!openInsightSection.Any())
|
||||
throw new Exception("OpenInsight section is missing from configuration");
|
||||
else
|
||||
{
|
||||
key = "MetrologyViewerAPI";
|
||||
if (openInsightSection.ContainsKey(key))
|
||||
OpenInsightMetrogyViewerAPI = openInsightSection[key];
|
||||
if (string.IsNullOrEmpty(OpenInsightMetrogyViewerAPI))
|
||||
throw new Exception(string.Format("OpenInsight key {0} is empty", key));
|
||||
if (!OpenInsightMetrogyViewerAPI.Contains(":") || !OpenInsightMetrogyViewerAPI.Contains("."))
|
||||
throw new Exception(string.Format("OpenInsight key {0} is invalid", key));
|
||||
key = "SiViewer";
|
||||
if (openInsightSection.ContainsKey(key))
|
||||
OpenInsightSiViewer = openInsightSection[key];
|
||||
if (string.IsNullOrEmpty(OpenInsightSiViewer))
|
||||
throw new Exception(string.Format("OpenInsight key {0} is empty", key));
|
||||
if (!OpenInsightSiViewer.Contains(":") || !OpenInsightSiViewer.Contains("."))
|
||||
throw new Exception(string.Format("OpenInsight key {0} is invalid", key));
|
||||
key = "FilePattern";
|
||||
if (openInsightSection.ContainsKey(key))
|
||||
OpenInsightFilePattern = openInsightSection[key];
|
||||
else
|
||||
throw new Exception(string.Concat("Missing OpenInsight Configuration entry for ", key));
|
||||
if (string.IsNullOrEmpty(OpenInsightFilePattern))
|
||||
throw new Exception(string.Format("OpenInsight key {0} is empty", key));
|
||||
}
|
||||
if (IsSourceTimer || IsDatabaseExportToIPDSF || (Duplicator.HasValue && Duplicator.Value == Level.IsDummy))
|
||||
{
|
||||
if (!Directory.Exists(fileConnectorConfiguration.SourceFileLocation))
|
||||
Directory.CreateDirectory(fileConnectorConfiguration.SourceFileLocation);
|
||||
_ReportFullPath = string.Concat(fileConnectorConfiguration.SourceFileLocation, firstSourceFileFilter.Replace("*", @"\"));
|
||||
if (Debugger.IsAttached || fileConnectorConfiguration.PreProcessingMode == FileConnectorConfiguration.PreProcessingModeEnum.Process)
|
||||
Callback(null);
|
||||
else
|
||||
{
|
||||
int milliSeconds;
|
||||
milliSeconds = (int)((fileConnectorConfiguration.FileScanningIntervalInSeconds * 1000) / 2);
|
||||
_Timer = new Timer(Callback, null, milliSeconds, Timeout.Infinite);
|
||||
milliSeconds += 2000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void CheckProcessDataDescription(Dictionary<Test, List<Duplicator.Description>> results, bool extra)
|
||||
{
|
||||
foreach (Test test in results.Keys)
|
||||
{
|
||||
if (test == Test.SP1)
|
||||
{
|
||||
if (!(ProcessDataDescription is ProcessData.FileRead.Description))
|
||||
ProcessDataDescription = new ProcessData.FileRead.Description();
|
||||
}
|
||||
else
|
||||
throw new Exception();
|
||||
}
|
||||
}
|
||||
|
||||
private void CallbackIsDummy(string traceDummyFile, List<Tuple<string, string, string, string, int>> tuples, bool fileConnectorConfigurationIncludeSubDirectories, bool includeSubDirectoriesExtra)
|
||||
{
|
||||
int fileCount;
|
||||
string[] files;
|
||||
string monARessource;
|
||||
string checkDirectory;
|
||||
string sourceArchiveFile;
|
||||
string inProcessDirectory;
|
||||
const string site = "sjc";
|
||||
const string monInURL = "http://moninhttp.sjc.infineon.com/input/text";
|
||||
MonIn monIn = MonIn.GetInstance(monInURL);
|
||||
string stateName = string.Concat("Dummy_", _EventName);
|
||||
foreach (Tuple<string, string, string, string, int> item in tuples)
|
||||
{
|
||||
monARessource = item.Item1;
|
||||
sourceArchiveFile = item.Item2;
|
||||
inProcessDirectory = item.Item3;
|
||||
checkDirectory = item.Item4;
|
||||
fileCount = item.Item5;
|
||||
try
|
||||
{
|
||||
if (fileCount > 0 || string.IsNullOrEmpty(checkDirectory))
|
||||
{
|
||||
File.AppendAllLines(traceDummyFile, new string[] { site, monARessource, stateName, State.Warning.ToString() });
|
||||
monIn.SendStatus(site, monARessource, stateName, State.Warning);
|
||||
for (int i = 1; i < 12; i++)
|
||||
Thread.Sleep(500);
|
||||
}
|
||||
else if (inProcessDirectory == checkDirectory)
|
||||
continue;
|
||||
if (!EafHosted)
|
||||
continue;
|
||||
if (!File.Exists(sourceArchiveFile))
|
||||
continue;
|
||||
if (!long.TryParse(Path.GetFileNameWithoutExtension(sourceArchiveFile).Replace("x", string.Empty), out long sequence))
|
||||
continue;
|
||||
ZipFile.ExtractToDirectory(sourceArchiveFile, inProcessDirectory);
|
||||
if (fileConnectorConfigurationIncludeSubDirectories && includeSubDirectoriesExtra)
|
||||
{
|
||||
if (_EventName == EventName.FileRead)
|
||||
checkDirectory = string.Concat(checkDirectory, @"\", sequence);
|
||||
else if (_EventName == EventName.FileReadDaily)
|
||||
checkDirectory = string.Concat(checkDirectory, @"\Source\", sequence);
|
||||
else
|
||||
throw new Exception();
|
||||
}
|
||||
if (fileConnectorConfigurationIncludeSubDirectories)
|
||||
files = Directory.GetFiles(inProcessDirectory, "*", SearchOption.AllDirectories);
|
||||
else
|
||||
files = Directory.GetFiles(inProcessDirectory, "*", SearchOption.TopDirectoryOnly);
|
||||
if (files.Length > 250)
|
||||
throw new Exception("Safety net!");
|
||||
foreach (string file in files)
|
||||
File.SetLastWriteTime(file, new DateTime(sequence));
|
||||
if (!fileConnectorConfigurationIncludeSubDirectories)
|
||||
{
|
||||
foreach (string file in files)
|
||||
File.Move(file, string.Concat(checkDirectory, @"\", Path.GetFileName(file)));
|
||||
}
|
||||
else
|
||||
{
|
||||
string[] directories = Directory.GetDirectories(inProcessDirectory, "*", SearchOption.AllDirectories);
|
||||
foreach (string directory in directories)
|
||||
Directory.CreateDirectory(string.Concat(checkDirectory, directory.Substring(inProcessDirectory.Length)));
|
||||
foreach (string file in files)
|
||||
File.Move(file, string.Concat(checkDirectory, file.Substring(inProcessDirectory.Length)));
|
||||
}
|
||||
File.AppendAllLines(traceDummyFile, new string[] { site, monARessource, stateName, State.Ok.ToString() });
|
||||
monIn.SendStatus(site, monARessource, stateName, State.Ok);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
File.AppendAllLines(traceDummyFile, new string[] { site, monARessource, stateName, State.Critical.ToString(), exception.Message, exception.StackTrace });
|
||||
monIn.SendStatus(site, monARessource, stateName, State.Critical);
|
||||
try
|
||||
{
|
||||
Eaf.Core.Smtp.ISmtp smtp = Eaf.Core.Backbone.Instance.GetBackboneComponentsOfType<Eaf.Core.Smtp.ISmtp>().SingleOrDefault();
|
||||
Eaf.Core.Smtp.EmailMessage emailMessage = new Eaf.Core.Smtp.EmailMessage(string.Concat("Exception:", EquipmentElementName), string.Concat(exception.Message, Environment.NewLine, Environment.NewLine, exception.StackTrace), Eaf.Core.Smtp.MailPriority.High);
|
||||
smtp.Send(emailMessage);
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void CallbackIsDummy()
|
||||
{
|
||||
DateTime dateTime = DateTime.Now;
|
||||
bool check = (dateTime.Hour > 7 && dateTime.Hour < 18 && dateTime.DayOfWeek != DayOfWeek.Sunday && dateTime.DayOfWeek != DayOfWeek.Saturday);
|
||||
if (check)
|
||||
{
|
||||
int fileCount;
|
||||
string[] files;
|
||||
string monARessource;
|
||||
string checkDirectory;
|
||||
string sourceArchiveFile;
|
||||
string sourceFileLocation;
|
||||
string targetFileLocation;
|
||||
string inProcessDirectory;
|
||||
string weekOfYear = _Calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
||||
string traceDummyDirectory = string.Concat(Path.GetPathRoot(TracePath), @"\TracesDummy\", CellName, @"\Source\", dateTime.ToString("yyyy"), "___Week_", weekOfYear);
|
||||
if (!Directory.Exists(traceDummyDirectory))
|
||||
Directory.CreateDirectory(traceDummyDirectory);
|
||||
string traceDummyFile = string.Concat(traceDummyDirectory, @"\", dateTime.Ticks, " - ", CellName, ".txt");
|
||||
File.AppendAllText(traceDummyFile, string.Empty);
|
||||
List<Tuple<string, string, string, string, int>> tuples = new List<Tuple<string, string, string, string, int>>();
|
||||
foreach (var keyValuePair in CellNames)
|
||||
{
|
||||
monARessource = keyValuePair.Key;
|
||||
if (!keyValuePair.Value.Contains(@"\"))
|
||||
continue;
|
||||
foreach (string sourceFileFilter in FileConnectorConfiguration.SourceFileFilter.Split('|'))
|
||||
{
|
||||
if (sourceFileFilter.ToLower().StartsWith(keyValuePair.Value.Replace(@"\", string.Empty)))
|
||||
sourceFileLocation = Path.GetFullPath(FileConnectorConfiguration.SourceFileLocation);
|
||||
else if (FileConnectorConfiguration.SourceFileLocation.ToLower().EndsWith(keyValuePair.Value))
|
||||
sourceFileLocation = Path.GetFullPath(FileConnectorConfiguration.SourceFileLocation);
|
||||
else
|
||||
sourceFileLocation = Path.GetFullPath(string.Concat(FileConnectorConfiguration.SourceFileLocation, @"\", keyValuePair.Value));
|
||||
sourceArchiveFile = Path.GetFullPath(string.Concat(sourceFileLocation, @"\", sourceFileFilter));
|
||||
targetFileLocation = Path.GetFullPath(string.Concat(FileConnectorConfiguration.TargetFileLocation, @"\", keyValuePair.Value));
|
||||
if (!File.Exists(sourceArchiveFile))
|
||||
continue;
|
||||
if (!DummyRuns.ContainsKey(monARessource))
|
||||
DummyRuns.Add(monARessource, new List<long>());
|
||||
tuples.Add(new Tuple<string, string, string, string, int>(monARessource, sourceFileLocation, targetFileLocation, sourceArchiveFile, 0));
|
||||
}
|
||||
}
|
||||
File.AppendAllLines(traceDummyFile, from l in tuples select l.Item4);
|
||||
if (tuples.Any())
|
||||
{
|
||||
_LastDummyRunIndex += 1;
|
||||
if (_LastDummyRunIndex >= tuples.Count)
|
||||
_LastDummyRunIndex = 0;
|
||||
monARessource = tuples[_LastDummyRunIndex].Item1;
|
||||
sourceFileLocation = tuples[_LastDummyRunIndex].Item2;
|
||||
targetFileLocation = tuples[_LastDummyRunIndex].Item3;
|
||||
sourceArchiveFile = tuples[_LastDummyRunIndex].Item4;
|
||||
//fileCount = tuples[_LastDummyRunIndex].Item5;
|
||||
tuples.Clear();
|
||||
if (long.TryParse(Path.GetFileNameWithoutExtension(sourceArchiveFile).Replace("x", string.Empty), out long sequence))
|
||||
{
|
||||
if (!DummyRuns[monARessource].Contains(sequence))
|
||||
DummyRuns[monARessource].Add(sequence);
|
||||
inProcessDirectory = string.Concat(ProgressPath, @"\", monARessource, @"\Dummy_in process\", sequence);
|
||||
checkDirectory = inProcessDirectory;
|
||||
if (!Directory.Exists(checkDirectory))
|
||||
Directory.CreateDirectory(checkDirectory);
|
||||
files = Directory.GetFiles(checkDirectory, "*", SearchOption.AllDirectories);
|
||||
fileCount = files.Length;
|
||||
if (files.Any())
|
||||
{
|
||||
if (files.Length > 250)
|
||||
throw new Exception("Safety net!");
|
||||
try
|
||||
{
|
||||
foreach (string file in files)
|
||||
File.Delete(file);
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
tuples.Add(new Tuple<string, string, string, string, int>(monARessource, sourceArchiveFile, inProcessDirectory, checkDirectory, fileCount));
|
||||
checkDirectory = targetFileLocation;
|
||||
files = Directory.GetFiles(checkDirectory, string.Concat("*", sequence, "*"), SearchOption.TopDirectoryOnly);
|
||||
fileCount = files.Length;
|
||||
tuples.Add(new Tuple<string, string, string, string, int>(monARessource, sourceArchiveFile, inProcessDirectory, checkDirectory, fileCount));
|
||||
}
|
||||
}
|
||||
if (tuples.Any())
|
||||
CallbackIsDummy(traceDummyFile, tuples, FileConnectorConfiguration.IncludeSubDirectories.Value, includeSubDirectoriesExtra: false);
|
||||
}
|
||||
}
|
||||
|
||||
private void Callback(object state)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Duplicator is null)
|
||||
{
|
||||
if (File.Exists(_ReportFullPath))
|
||||
File.Delete(_ReportFullPath);
|
||||
File.WriteAllText(_ReportFullPath, string.Empty);
|
||||
}
|
||||
else if (Duplicator.Value == Level.IsDummy)
|
||||
CallbackIsDummy();
|
||||
else
|
||||
throw new Exception();
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
try
|
||||
{
|
||||
Eaf.Core.Smtp.ISmtp smtp = Eaf.Core.Backbone.Instance.GetBackboneComponentsOfType<Eaf.Core.Smtp.ISmtp>().SingleOrDefault();
|
||||
Eaf.Core.Smtp.EmailMessage emailMessage = new Eaf.Core.Smtp.EmailMessage(string.Concat("Exception:", EquipmentElementName), string.Concat(exception.Message, Environment.NewLine, Environment.NewLine, exception.StackTrace), Eaf.Core.Smtp.MailPriority.High);
|
||||
smtp.Send(emailMessage);
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
try
|
||||
{
|
||||
TimeSpan timeSpan;
|
||||
if (IsDatabaseExportToIPDSF)
|
||||
timeSpan = new TimeSpan(DateTime.Now.AddMinutes(1).Ticks - DateTime.Now.Ticks);
|
||||
else if (IsSourceTimer)
|
||||
timeSpan = new TimeSpan(DateTime.Now.AddMinutes(15).Ticks - DateTime.Now.Ticks);
|
||||
else if (Duplicator.HasValue && Duplicator.Value == Level.IsDummy)
|
||||
timeSpan = new TimeSpan(DateTime.Now.AddSeconds(FileConnectorConfiguration.FileScanningIntervalInSeconds.Value).Ticks - DateTime.Now.Ticks);
|
||||
else if (Duplicator.HasValue)
|
||||
timeSpan = new TimeSpan(DateTime.Now.AddSeconds(30).Ticks - DateTime.Now.Ticks);
|
||||
else
|
||||
timeSpan = new TimeSpan(DateTime.Now.AddDays(.5).Ticks - DateTime.Now.Ticks);
|
||||
if (!(_Timer is null))
|
||||
_Timer.Change((long)timeSpan.TotalMilliseconds, Timeout.Infinite);
|
||||
else
|
||||
_Timer = new Timer(Callback, null, (long)timeSpan.TotalMilliseconds, Timeout.Infinite);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
try
|
||||
{
|
||||
Eaf.Core.Smtp.ISmtp smtp = Eaf.Core.Backbone.Instance.GetBackboneComponentsOfType<Eaf.Core.Smtp.ISmtp>().SingleOrDefault();
|
||||
Eaf.Core.Smtp.EmailMessage emailMessage = new Eaf.Core.Smtp.EmailMessage(string.Concat("Exception:", EquipmentElementName), string.Concat(exception.Message, Environment.NewLine, Environment.NewLine, exception.StackTrace), Eaf.Core.Smtp.MailPriority.High);
|
||||
smtp.Send(emailMessage);
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
}
|
||||
|
||||
public Tuple<string, JsonElement?, List<FileInfo>> IsManualOIEntry(string reportFullPath)
|
||||
{
|
||||
Tuple<string, JsonElement?, List<FileInfo>> results;
|
||||
string monARessource;
|
||||
const string site = "sjc";
|
||||
string equipment = string.Empty;
|
||||
string description = string.Empty;
|
||||
string stateName = "MANUAL_OI_ENTRY";
|
||||
string json = File.ReadAllText(reportFullPath);
|
||||
JsonElement jsonElement = JsonSerializer.Deserialize<JsonElement>(json);
|
||||
results = new Tuple<string, JsonElement?, List<FileInfo>>(string.Empty, jsonElement, new List<FileInfo>());
|
||||
foreach (JsonProperty jsonProperty in jsonElement.EnumerateObject())
|
||||
{
|
||||
if (jsonProperty.Name == "Equipment")
|
||||
equipment = jsonProperty.Value.ToString();
|
||||
else if (jsonProperty.Name == "Description")
|
||||
description = jsonProperty.Value.ToString();
|
||||
}
|
||||
if (string.IsNullOrEmpty(equipment))
|
||||
monARessource = CellName;
|
||||
else
|
||||
monARessource = equipment;
|
||||
const string monInURL = "http://moninhttp.sjc.infineon.com/input/text";
|
||||
MonIn monIn = MonIn.GetInstance(monInURL);
|
||||
if (EafHosted)
|
||||
monIn.SendStatus(site, monARessource, stateName, State.Warning, description);
|
||||
return results;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
86
Adaptation/Helpers/ProcessData.DataFile.cs
Normal file
86
Adaptation/Helpers/ProcessData.DataFile.cs
Normal file
@ -0,0 +1,86 @@
|
||||
namespace Adaptation.Helpers
|
||||
{
|
||||
|
||||
public partial class ProcessData
|
||||
{
|
||||
public class DataFile
|
||||
{
|
||||
|
||||
public string Grade { get; set; }
|
||||
public string HeaderUniqueID { get; set; }
|
||||
public string Side { get; set; }
|
||||
public string SrcDest { get; set; }
|
||||
public string UniqueID { get; set; }
|
||||
public string WaferID { get; set; }
|
||||
public string Data { get; set; }
|
||||
public string DcnAll { get; set; }
|
||||
public string DcnArea { get; set; }
|
||||
public string DcnAreaCount { get; set; }
|
||||
public string DcnBin1 { get; set; }
|
||||
public string DcnBin2 { get; set; }
|
||||
public string DcnBin3 { get; set; }
|
||||
public string DcnBin4 { get; set; }
|
||||
public string DcnBin5 { get; set; }
|
||||
public string DcnBin6 { get; set; }
|
||||
public string DcnBin7 { get; set; }
|
||||
public string DcnBin8 { get; set; }
|
||||
public string DcnHazeAvg { get; set; }
|
||||
public string DcnHazeMedian { get; set; }
|
||||
public string DcnHazeStdDev { get; set; }
|
||||
public string DcnLpd { get; set; }
|
||||
public string DcnLpdES { get; set; }
|
||||
public string DcnLpdN { get; set; }
|
||||
public string DcnMicroScr { get; set; }
|
||||
public string DcnScr { get; set; }
|
||||
public string DcnSlip { get; set; }
|
||||
public string DnnAll { get; set; }
|
||||
public string DnnArea { get; set; }
|
||||
public string DnnAreaCount { get; set; }
|
||||
public string DnnBin1 { get; set; }
|
||||
public string DnnBin2 { get; set; }
|
||||
public string DnnBin3 { get; set; }
|
||||
public string DnnBin4 { get; set; }
|
||||
public string DnnBin5 { get; set; }
|
||||
public string DnnBin6 { get; set; }
|
||||
public string DnnBin7 { get; set; }
|
||||
public string DnnBin8 { get; set; }
|
||||
public string DnnHazeAvg { get; set; }
|
||||
public string DnnHazeMedian { get; set; }
|
||||
public string DnnHazeStdDev { get; set; }
|
||||
public string DnnLpd { get; set; }
|
||||
public string DnnLpdES { get; set; }
|
||||
public string DnnLpdN { get; set; }
|
||||
public string DnnMicroScr { get; set; }
|
||||
public string DnnScr { get; set; }
|
||||
public string DnnSlip { get; set; }
|
||||
public string DwnAll { get; set; }
|
||||
public string DwnArea { get; set; }
|
||||
public string DwnAreaCount { get; set; }
|
||||
public string DwnBin1 { get; set; }
|
||||
public string DwnBin2 { get; set; }
|
||||
public string DwnBin3 { get; set; }
|
||||
public string DwnBin4 { get; set; }
|
||||
public string DwnBin5 { get; set; }
|
||||
public string DwnBin6 { get; set; }
|
||||
public string DwnBin7 { get; set; }
|
||||
public string DwnBin8 { get; set; }
|
||||
public string DwnHazeAvg { get; set; }
|
||||
public string DwnHazeMedian { get; set; }
|
||||
public string DwnHazeStdDev { get; set; }
|
||||
public string DwnLpd { get; set; }
|
||||
public string DwnLpdES { get; set; }
|
||||
public string DwnLpdN { get; set; }
|
||||
public string DwnMicroScr { get; set; }
|
||||
public string DwnScr { get; set; }
|
||||
public string DwnSlip { get; set; }
|
||||
|
||||
public DataFile()
|
||||
{
|
||||
Data = "*Data*";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
1418
Adaptation/Helpers/ProcessData.FileRead.Description.cs
Normal file
1418
Adaptation/Helpers/ProcessData.FileRead.Description.cs
Normal file
File diff suppressed because it is too large
Load Diff
267
Adaptation/Helpers/ProcessData.HeaderFile.cs
Normal file
267
Adaptation/Helpers/ProcessData.HeaderFile.cs
Normal file
@ -0,0 +1,267 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Adaptation.Helpers
|
||||
{
|
||||
|
||||
public partial class ProcessData
|
||||
{
|
||||
public class HeaderFile
|
||||
{
|
||||
|
||||
public string JobID { get; set; }
|
||||
public string MesEntity { get; set; }
|
||||
public string Date { get; set; }
|
||||
public string Lot { get; set; }
|
||||
public string Operator { get; set; }
|
||||
public string PSN { get; set; }
|
||||
public string RDS { get; set; }
|
||||
public string Reactor { get; set; }
|
||||
public string Recipe { get; set; }
|
||||
public string Session { get; set; }
|
||||
public string UniqueID { get; set; }
|
||||
public string DcnAllMax { get; set; }
|
||||
public string DcnAllMean { get; set; }
|
||||
public string DcnAllMin { get; set; }
|
||||
public string DcnAllStdDev { get; set; }
|
||||
public string DcnAreaCountMax { get; set; }
|
||||
public string DcnAreaCountMean { get; set; }
|
||||
public string DcnAreaCountMin { get; set; }
|
||||
public string DcnAreaCountStdDev { get; set; }
|
||||
public string DcnAreaMax { get; set; }
|
||||
public string DcnAreaMean { get; set; }
|
||||
public string DcnAreaMin { get; set; }
|
||||
public string DcnAreaStdDev { get; set; }
|
||||
public string DcnBin1Max { get; set; }
|
||||
public string DcnBin1Mean { get; set; }
|
||||
public string DcnBin1Min { get; set; }
|
||||
public string DcnBin1StdDev { get; set; }
|
||||
public string DcnBin2Max { get; set; }
|
||||
public string DcnBin2Mean { get; set; }
|
||||
public string DcnBin2Min { get; set; }
|
||||
public string DcnBin2StdDev { get; set; }
|
||||
public string DcnBin3Max { get; set; }
|
||||
public string DcnBin3Mean { get; set; }
|
||||
public string DcnBin3Min { get; set; }
|
||||
public string DcnBin3StdDev { get; set; }
|
||||
public string DcnBin4Max { get; set; }
|
||||
public string DcnBin4Mean { get; set; }
|
||||
public string DcnBin4Min { get; set; }
|
||||
public string DcnBin4StdDev { get; set; }
|
||||
public string DcnBin5Max { get; set; }
|
||||
public string DcnBin5Mean { get; set; }
|
||||
public string DcnBin5Min { get; set; }
|
||||
public string DcnBin5StdDev { get; set; }
|
||||
public string DcnBin6Max { get; set; }
|
||||
public string DcnBin6Mean { get; set; }
|
||||
public string DcnBin6Min { get; set; }
|
||||
public string DcnBin6StdDev { get; set; }
|
||||
public string DcnBin7Max { get; set; }
|
||||
public string DcnBin7Mean { get; set; }
|
||||
public string DcnBin7Min { get; set; }
|
||||
public string DcnBin7StdDev { get; set; }
|
||||
public string DcnBin8Max { get; set; }
|
||||
public string DcnBin8Mean { get; set; }
|
||||
public string DcnBin8Min { get; set; }
|
||||
public string DcnBin8StdDev { get; set; }
|
||||
public string DcnHazeAvgMax { get; set; }
|
||||
public string DcnHazeAvgMean { get; set; }
|
||||
public string DcnHazeAvgMin { get; set; }
|
||||
public string DcnHazeAvgStdDev { get; set; }
|
||||
public string DcnHazeMedianMax { get; set; }
|
||||
public string DcnHazeMedianMean { get; set; }
|
||||
public string DcnHazeMedianMin { get; set; }
|
||||
public string DcnHazeMedianStdDev { get; set; }
|
||||
public string DcnHazeStdDevMax { get; set; }
|
||||
public string DcnHazeStdDevMean { get; set; }
|
||||
public string DcnHazeStdDevMin { get; set; }
|
||||
public string DcnHazeStdDevStdDev { get; set; }
|
||||
public string DcnLpdESMax { get; set; }
|
||||
public string DcnLpdESMean { get; set; }
|
||||
public string DcnLpdESMin { get; set; }
|
||||
public string DcnLpdESStdDev { get; set; }
|
||||
public string DcnLpdMax { get; set; }
|
||||
public string DcnLpdMean { get; set; }
|
||||
public string DcnLpdMin { get; set; }
|
||||
public string DcnLpdNMax { get; set; }
|
||||
public string DcnLpdNMean { get; set; }
|
||||
public string DcnLpdNMin { get; set; }
|
||||
public string DcnLpdNStdDev { get; set; }
|
||||
public string DcnLpdStdDev { get; set; }
|
||||
public string DcnMicroScrMax { get; set; }
|
||||
public string DcnMicroScrMean { get; set; }
|
||||
public string DcnMicroScrMin { get; set; }
|
||||
public string DcnMicroScrStdDev { get; set; }
|
||||
public string DcnScrMax { get; set; }
|
||||
public string DcnScrMean { get; set; }
|
||||
public string DcnScrMin { get; set; }
|
||||
public string DcnScrStdDev { get; set; }
|
||||
public string DcnSlipMax { get; set; }
|
||||
public string DcnSlipMean { get; set; }
|
||||
public string DcnSlipMin { get; set; }
|
||||
public string DcnSlipStdDev { get; set; }
|
||||
public string DnnAllMax { get; set; }
|
||||
public string DnnAllMean { get; set; }
|
||||
public string DnnAllMin { get; set; }
|
||||
public string DnnAllStdDev { get; set; }
|
||||
public string DnnAreaCountMax { get; set; }
|
||||
public string DnnAreaCountMean { get; set; }
|
||||
public string DnnAreaCountMin { get; set; }
|
||||
public string DnnAreaCountStdDev { get; set; }
|
||||
public string DnnAreaMax { get; set; }
|
||||
public string DnnAreaMean { get; set; }
|
||||
public string DnnAreaMin { get; set; }
|
||||
public string DnnAreaStdDev { get; set; }
|
||||
public string DnnBin1Max { get; set; }
|
||||
public string DnnBin1Mean { get; set; }
|
||||
public string DnnBin1Min { get; set; }
|
||||
public string DnnBin1StdDev { get; set; }
|
||||
public string DnnBin2Max { get; set; }
|
||||
public string DnnBin2Mean { get; set; }
|
||||
public string DnnBin2Min { get; set; }
|
||||
public string DnnBin2StdDev { get; set; }
|
||||
public string DnnBin3Max { get; set; }
|
||||
public string DnnBin3Mean { get; set; }
|
||||
public string DnnBin3Min { get; set; }
|
||||
public string DnnBin3StdDev { get; set; }
|
||||
public string DnnBin4Max { get; set; }
|
||||
public string DnnBin4Mean { get; set; }
|
||||
public string DnnBin4Min { get; set; }
|
||||
public string DnnBin4StdDev { get; set; }
|
||||
public string DnnBin5Max { get; set; }
|
||||
public string DnnBin5Mean { get; set; }
|
||||
public string DnnBin5Min { get; set; }
|
||||
public string DnnBin5StdDev { get; set; }
|
||||
public string DnnBin6Max { get; set; }
|
||||
public string DnnBin6Mean { get; set; }
|
||||
public string DnnBin6Min { get; set; }
|
||||
public string DnnBin6StdDev { get; set; }
|
||||
public string DnnBin7Max { get; set; }
|
||||
public string DnnBin7Mean { get; set; }
|
||||
public string DnnBin7Min { get; set; }
|
||||
public string DnnBin7StdDev { get; set; }
|
||||
public string DnnBin8Max { get; set; }
|
||||
public string DnnBin8Mean { get; set; }
|
||||
public string DnnBin8Min { get; set; }
|
||||
public string DnnBin8StdDev { get; set; }
|
||||
public string DnnHazeAvgMax { get; set; }
|
||||
public string DnnHazeAvgMean { get; set; }
|
||||
public string DnnHazeAvgMin { get; set; }
|
||||
public string DnnHazeAvgStdDev { get; set; }
|
||||
public string DnnHazeMedianMax { get; set; }
|
||||
public string DnnHazeMedianMean { get; set; }
|
||||
public string DnnHazeMedianMin { get; set; }
|
||||
public string DnnHazeMedianStdDev { get; set; }
|
||||
public string DnnHazeStdDevMax { get; set; }
|
||||
public string DnnHazeStdDevMean { get; set; }
|
||||
public string DnnHazeStdDevMin { get; set; }
|
||||
public string DnnHazeStdDevStdDev { get; set; }
|
||||
public string DnnLpdESMax { get; set; }
|
||||
public string DnnLpdESMean { get; set; }
|
||||
public string DnnLpdESMin { get; set; }
|
||||
public string DnnLpdESStdDev { get; set; }
|
||||
public string DnnLpdMax { get; set; }
|
||||
public string DnnLpdMean { get; set; }
|
||||
public string DnnLpdMin { get; set; }
|
||||
public string DnnLpdNMax { get; set; }
|
||||
public string DnnLpdNMean { get; set; }
|
||||
public string DnnLpdNMin { get; set; }
|
||||
public string DnnLpdNStdDev { get; set; }
|
||||
public string DnnLpdStdDev { get; set; }
|
||||
public string DnnMicroScrMax { get; set; }
|
||||
public string DnnMicroScrMean { get; set; }
|
||||
public string DnnMicroScrMin { get; set; }
|
||||
public string DnnMicroScrStdDev { get; set; }
|
||||
public string DnnScrMax { get; set; }
|
||||
public string DnnScrMean { get; set; }
|
||||
public string DnnScrMin { get; set; }
|
||||
public string DnnScrStdDev { get; set; }
|
||||
public string DnnSlipMax { get; set; }
|
||||
public string DnnSlipMean { get; set; }
|
||||
public string DnnSlipMin { get; set; }
|
||||
public string DnnSlipStdDev { get; set; }
|
||||
public string DwnAllMax { get; set; }
|
||||
public string DwnAllMean { get; set; }
|
||||
public string DwnAllMin { get; set; }
|
||||
public string DwnAllStdDev { get; set; }
|
||||
public string DwnAreaCountMax { get; set; }
|
||||
public string DwnAreaCountMean { get; set; }
|
||||
public string DwnAreaCountMin { get; set; }
|
||||
public string DwnAreaCountStdDev { get; set; }
|
||||
public string DwnAreaMax { get; set; }
|
||||
public string DwnAreaMean { get; set; }
|
||||
public string DwnAreaMin { get; set; }
|
||||
public string DwnAreaStdDev { get; set; }
|
||||
public string DwnBin1Max { get; set; }
|
||||
public string DwnBin1Mean { get; set; }
|
||||
public string DwnBin1Min { get; set; }
|
||||
public string DwnBin1StdDev { get; set; }
|
||||
public string DwnBin2Max { get; set; }
|
||||
public string DwnBin2Mean { get; set; }
|
||||
public string DwnBin2Min { get; set; }
|
||||
public string DwnBin2StdDev { get; set; }
|
||||
public string DwnBin3Max { get; set; }
|
||||
public string DwnBin3Mean { get; set; }
|
||||
public string DwnBin3Min { get; set; }
|
||||
public string DwnBin3StdDev { get; set; }
|
||||
public string DwnBin4Max { get; set; }
|
||||
public string DwnBin4Mean { get; set; }
|
||||
public string DwnBin4Min { get; set; }
|
||||
public string DwnBin4StdDev { get; set; }
|
||||
public string DwnBin5Max { get; set; }
|
||||
public string DwnBin5Mean { get; set; }
|
||||
public string DwnBin5Min { get; set; }
|
||||
public string DwnBin5StdDev { get; set; }
|
||||
public string DwnBin6Max { get; set; }
|
||||
public string DwnBin6Mean { get; set; }
|
||||
public string DwnBin6Min { get; set; }
|
||||
public string DwnBin6StdDev { get; set; }
|
||||
public string DwnBin7Max { get; set; }
|
||||
public string DwnBin7Mean { get; set; }
|
||||
public string DwnBin7Min { get; set; }
|
||||
public string DwnBin7StdDev { get; set; }
|
||||
public string DwnBin8Max { get; set; }
|
||||
public string DwnBin8Mean { get; set; }
|
||||
public string DwnBin8Min { get; set; }
|
||||
public string DwnBin8StdDev { get; set; }
|
||||
public string DwnHazeAvgMax { get; set; }
|
||||
public string DwnHazeAvgMean { get; set; }
|
||||
public string DwnHazeAvgMin { get; set; }
|
||||
public string DwnHazeAvgStdDev { get; set; }
|
||||
public string DwnHazeMedianMax { get; set; }
|
||||
public string DwnHazeMedianMean { get; set; }
|
||||
public string DwnHazeMedianMin { get; set; }
|
||||
public string DwnHazeMedianStdDev { get; set; }
|
||||
public string DwnHazeStdDevMax { get; set; }
|
||||
public string DwnHazeStdDevMean { get; set; }
|
||||
public string DwnHazeStdDevMin { get; set; }
|
||||
public string DwnHazeStdDevStdDev { get; set; }
|
||||
public string DwnLpdESMax { get; set; }
|
||||
public string DwnLpdESMean { get; set; }
|
||||
public string DwnLpdESMin { get; set; }
|
||||
public string DwnLpdESStdDev { get; set; }
|
||||
public string DwnLpdMax { get; set; }
|
||||
public string DwnLpdMean { get; set; }
|
||||
public string DwnLpdMin { get; set; }
|
||||
public string DwnLpdNMax { get; set; }
|
||||
public string DwnLpdNMean { get; set; }
|
||||
public string DwnLpdNMin { get; set; }
|
||||
public string DwnLpdNStdDev { get; set; }
|
||||
public string DwnLpdStdDev { get; set; }
|
||||
public string DwnMicroScrMax { get; set; }
|
||||
public string DwnMicroScrMean { get; set; }
|
||||
public string DwnMicroScrMin { get; set; }
|
||||
public string DwnMicroScrStdDev { get; set; }
|
||||
public string DwnScrMax { get; set; }
|
||||
public string DwnScrMean { get; set; }
|
||||
public string DwnScrMin { get; set; }
|
||||
public string DwnScrStdDev { get; set; }
|
||||
public string DwnSlipMax { get; set; }
|
||||
public string DwnSlipMean { get; set; }
|
||||
public string DwnSlipMin { get; set; }
|
||||
public string DwnSlipStdDev { get; set; }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
612
Adaptation/Helpers/ProcessData.WSRequest.cs
Normal file
612
Adaptation/Helpers/ProcessData.WSRequest.cs
Normal file
@ -0,0 +1,612 @@
|
||||
using Adaptation.Shared.Metrology;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Adaptation.Helpers
|
||||
{
|
||||
|
||||
public partial class ProcessData
|
||||
{
|
||||
public class WSRequest
|
||||
{
|
||||
public bool SentToMetrology { get; set; }
|
||||
public bool SentToSPC { get; set; }
|
||||
//
|
||||
|
||||
public string CellName { get; set; }
|
||||
public string Date { get; set; }
|
||||
public string LotID { get; set; }
|
||||
public string Operator { get; set; }
|
||||
public string PSN { get; set; }
|
||||
public string RDS { get; set; }
|
||||
public string Reactor { get; set; }
|
||||
public string Recipe { get; set; }
|
||||
public string Session { get; set; }
|
||||
public string UniqueID { get; set; }
|
||||
public string DcnAllMax { get; set; }
|
||||
public string DcnAllMean { get; set; }
|
||||
public string DcnAllMin { get; set; }
|
||||
public string DcnAllStDev { get; set; }
|
||||
public string DcnAreaCntMax { get; set; }
|
||||
public string DcnAreaCntMean { get; set; }
|
||||
public string DcnAreaCntMin { get; set; }
|
||||
public string DcnAreaCntStDev { get; set; }
|
||||
public string DcnAreaMax { get; set; }
|
||||
public string DcnAreaMean { get; set; }
|
||||
public string DcnAreaMin { get; set; }
|
||||
public string DcnAreaStDev { get; set; }
|
||||
public string DcnBin1Max { get; set; }
|
||||
public string DcnBin1Mean { get; set; }
|
||||
public string DcnBin1Min { get; set; }
|
||||
public string DcnBin1StDev { get; set; }
|
||||
public string DcnBin2Max { get; set; }
|
||||
public string DcnBin2Mean { get; set; }
|
||||
public string DcnBin2Min { get; set; }
|
||||
public string DcnBin2StDev { get; set; }
|
||||
public string DcnBin3Max { get; set; }
|
||||
public string DcnBin3Mean { get; set; }
|
||||
public string DcnBin3Min { get; set; }
|
||||
public string DcnBin3StDev { get; set; }
|
||||
public string DcnBin4Max { get; set; }
|
||||
public string DcnBin4Mean { get; set; }
|
||||
public string DcnBin4Min { get; set; }
|
||||
public string DcnBin4StDev { get; set; }
|
||||
public string DcnBin5Max { get; set; }
|
||||
public string DcnBin5Mean { get; set; }
|
||||
public string DcnBin5Min { get; set; }
|
||||
public string DcnBin5StDev { get; set; }
|
||||
public string DcnBin6Max { get; set; }
|
||||
public string DcnBin6Mean { get; set; }
|
||||
public string DcnBin6Min { get; set; }
|
||||
public string DcnBin6StDev { get; set; }
|
||||
public string DcnBin7Max { get; set; }
|
||||
public string DcnBin7Mean { get; set; }
|
||||
public string DcnBin7Min { get; set; }
|
||||
public string DcnBin7StDev { get; set; }
|
||||
public string DcnBin8Max { get; set; }
|
||||
public string DcnBin8Mean { get; set; }
|
||||
public string DcnBin8Min { get; set; }
|
||||
public string DcnBin8StDev { get; set; }
|
||||
public string DcnHazeAvgMax { get; set; }
|
||||
public string DcnHazeAvgMean { get; set; }
|
||||
public string DcnHazeAvgMin { get; set; }
|
||||
public string DcnHazeAvgStDev { get; set; }
|
||||
public string DcnHazeMedMax { get; set; }
|
||||
public string DcnHazeMedMean { get; set; }
|
||||
public string DcnHazeMedMin { get; set; }
|
||||
public string DcnHazeMedStDev { get; set; }
|
||||
public string DcnHazeStDevMax { get; set; }
|
||||
public string DcnHazeStDevMean { get; set; }
|
||||
public string DcnHazeStDevMin { get; set; }
|
||||
public string DcnHazeStDevStDev { get; set; }
|
||||
public string DcnLpdESMax { get; set; }
|
||||
public string DcnLpdESMean { get; set; }
|
||||
public string DcnLpdESMin { get; set; }
|
||||
public string DcnLpdESStDev { get; set; }
|
||||
public string DcnLpdMax { get; set; }
|
||||
public string DcnLpdMean { get; set; }
|
||||
public string DcnLpdMin { get; set; }
|
||||
public string DcnLpdNMax { get; set; }
|
||||
public string DcnLpdNMean { get; set; }
|
||||
public string DcnLpdNMin { get; set; }
|
||||
public string DcnLpdNStDev { get; set; }
|
||||
public string DcnLpdStDev { get; set; }
|
||||
public string DcnMicroScrMax { get; set; }
|
||||
public string DcnMicroScrMean { get; set; }
|
||||
public string DcnMicroScrMin { get; set; }
|
||||
public string DcnMicroScrStDev { get; set; }
|
||||
public string DcnScrMax { get; set; }
|
||||
public string DcnScrMean { get; set; }
|
||||
public string DcnScrMin { get; set; }
|
||||
public string DcnScrStDev { get; set; }
|
||||
public string DcnSlipMax { get; set; }
|
||||
public string DcnSlipMean { get; set; }
|
||||
public string DcnSlipMin { get; set; }
|
||||
public string DcnSlipStDev { get; set; }
|
||||
public string DnnAllMax { get; set; }
|
||||
public string DnnAllMean { get; set; }
|
||||
public string DnnAllMin { get; set; }
|
||||
public string DnnAllStDev { get; set; }
|
||||
public string DnnAreaCntMax { get; set; }
|
||||
public string DnnAreaCntMean { get; set; }
|
||||
public string DnnAreaCntMin { get; set; }
|
||||
public string DnnAreaCntStDev { get; set; }
|
||||
public string DnnAreaMax { get; set; }
|
||||
public string DnnAreaMean { get; set; }
|
||||
public string DnnAreaMin { get; set; }
|
||||
public string DnnAreaStDev { get; set; }
|
||||
public string DnnBin1Max { get; set; }
|
||||
public string DnnBin1Mean { get; set; }
|
||||
public string DnnBin1Min { get; set; }
|
||||
public string DnnBin1StDev { get; set; }
|
||||
public string DnnBin2Max { get; set; }
|
||||
public string DnnBin2Mean { get; set; }
|
||||
public string DnnBin2Min { get; set; }
|
||||
public string DnnBin2StDev { get; set; }
|
||||
public string DnnBin3Max { get; set; }
|
||||
public string DnnBin3Mean { get; set; }
|
||||
public string DnnBin3Min { get; set; }
|
||||
public string DnnBin3StDev { get; set; }
|
||||
public string DnnBin4Max { get; set; }
|
||||
public string DnnBin4Mean { get; set; }
|
||||
public string DnnBin4Min { get; set; }
|
||||
public string DnnBin4StDev { get; set; }
|
||||
public string DnnBin5Max { get; set; }
|
||||
public string DnnBin5Mean { get; set; }
|
||||
public string DnnBin5Min { get; set; }
|
||||
public string DnnBin5StDev { get; set; }
|
||||
public string DnnBin6Max { get; set; }
|
||||
public string DnnBin6Mean { get; set; }
|
||||
public string DnnBin6Min { get; set; }
|
||||
public string DnnBin6StDev { get; set; }
|
||||
public string DnnBin7Max { get; set; }
|
||||
public string DnnBin7Mean { get; set; }
|
||||
public string DnnBin7Min { get; set; }
|
||||
public string DnnBin7StDev { get; set; }
|
||||
public string DnnBin8Max { get; set; }
|
||||
public string DnnBin8Mean { get; set; }
|
||||
public string DnnBin8Min { get; set; }
|
||||
public string DnnBin8StDev { get; set; }
|
||||
public string DnnHazeAvgMax { get; set; }
|
||||
public string DnnHazeAvgMean { get; set; }
|
||||
public string DnnHazeAvgMin { get; set; }
|
||||
public string DnnHazeAvgStDev { get; set; }
|
||||
public string DnnHazeMedMax { get; set; }
|
||||
public string DnnHazeMedMean { get; set; }
|
||||
public string DnnHazeMedMin { get; set; }
|
||||
public string DnnHazeMedStDev { get; set; }
|
||||
public string DnnHazeStDevMax { get; set; }
|
||||
public string DnnHazeStDevMean { get; set; }
|
||||
public string DnnHazeStDevMin { get; set; }
|
||||
public string DnnHazeStDevStDev { get; set; }
|
||||
public string DnnLpdESMax { get; set; }
|
||||
public string DnnLpdESMean { get; set; }
|
||||
public string DnnLpdESMin { get; set; }
|
||||
public string DnnLpdESStDev { get; set; }
|
||||
public string DnnLpdMax { get; set; }
|
||||
public string DnnLpdMean { get; set; }
|
||||
public string DnnLpdMin { get; set; }
|
||||
public string DnnLpdNMax { get; set; }
|
||||
public string DnnLpdNMean { get; set; }
|
||||
public string DnnLpdNMin { get; set; }
|
||||
public string DnnLpdNStDev { get; set; }
|
||||
public string DnnLpdStDev { get; set; }
|
||||
public string DnnMicroScrMax { get; set; }
|
||||
public string DnnMicroScrMean { get; set; }
|
||||
public string DnnMicroScrMin { get; set; }
|
||||
public string DnnMicroScrStDev { get; set; }
|
||||
public string DnnScrMax { get; set; }
|
||||
public string DnnScrMean { get; set; }
|
||||
public string DnnScrMin { get; set; }
|
||||
public string DnnScrStDev { get; set; }
|
||||
public string DnnSlipMax { get; set; }
|
||||
public string DnnSlipMean { get; set; }
|
||||
public string DnnSlipMin { get; set; }
|
||||
public string DnnSlipStDev { get; set; }
|
||||
public string DwnAllMax { get; set; }
|
||||
public string DwnAllMean { get; set; }
|
||||
public string DwnAllMin { get; set; }
|
||||
public string DwnAllStDev { get; set; }
|
||||
public string DwnAreaCntMax { get; set; }
|
||||
public string DwnAreaCntMean { get; set; }
|
||||
public string DwnAreaCntMin { get; set; }
|
||||
public string DwnAreaCntStDev { get; set; }
|
||||
public string DwnAreaMax { get; set; }
|
||||
public string DwnAreaMean { get; set; }
|
||||
public string DwnAreaMin { get; set; }
|
||||
public string DwnAreaStDev { get; set; }
|
||||
public string DwnBin1Max { get; set; }
|
||||
public string DwnBin1Mean { get; set; }
|
||||
public string DwnBin1Min { get; set; }
|
||||
public string DwnBin1StDev { get; set; }
|
||||
public string DwnBin2Max { get; set; }
|
||||
public string DwnBin2Mean { get; set; }
|
||||
public string DwnBin2Min { get; set; }
|
||||
public string DwnBin2StDev { get; set; }
|
||||
public string DwnBin3Max { get; set; }
|
||||
public string DwnBin3Mean { get; set; }
|
||||
public string DwnBin3Min { get; set; }
|
||||
public string DwnBin3StDev { get; set; }
|
||||
public string DwnBin4Max { get; set; }
|
||||
public string DwnBin4Mean { get; set; }
|
||||
public string DwnBin4Min { get; set; }
|
||||
public string DwnBin4StDev { get; set; }
|
||||
public string DwnBin5Max { get; set; }
|
||||
public string DwnBin5Mean { get; set; }
|
||||
public string DwnBin5Min { get; set; }
|
||||
public string DwnBin5StDev { get; set; }
|
||||
public string DwnBin6Max { get; set; }
|
||||
public string DwnBin6Mean { get; set; }
|
||||
public string DwnBin6Min { get; set; }
|
||||
public string DwnBin6StDev { get; set; }
|
||||
public string DwnBin7Max { get; set; }
|
||||
public string DwnBin7Mean { get; set; }
|
||||
public string DwnBin7Min { get; set; }
|
||||
public string DwnBin7StDev { get; set; }
|
||||
public string DwnBin8Max { get; set; }
|
||||
public string DwnBin8Mean { get; set; }
|
||||
public string DwnBin8Min { get; set; }
|
||||
public string DwnBin8StDev { get; set; }
|
||||
public string DwnHazeAvgMax { get; set; }
|
||||
public string DwnHazeAvgMean { get; set; }
|
||||
public string DwnHazeAvgMin { get; set; }
|
||||
public string DwnHazeAvgStDev { get; set; }
|
||||
public string DwnHazeMedMax { get; set; }
|
||||
public string DwnHazeMedMean { get; set; }
|
||||
public string DwnHazeMedMin { get; set; }
|
||||
public string DwnHazeMedStDev { get; set; }
|
||||
public string DwnHazeStDevMax { get; set; }
|
||||
public string DwnHazeStDevMean { get; set; }
|
||||
public string DwnHazeStDevMin { get; set; }
|
||||
public string DwnHazeStDevStDev { get; set; }
|
||||
public string DwnLpdESMax { get; set; }
|
||||
public string DwnLpdESMean { get; set; }
|
||||
public string DwnLpdESMin { get; set; }
|
||||
public string DwnLpdESStDev { get; set; }
|
||||
public string DwnLpdMax { get; set; }
|
||||
public string DwnLpdMean { get; set; }
|
||||
public string DwnLpdMin { get; set; }
|
||||
public string DwnLpdNMax { get; set; }
|
||||
public string DwnLpdNMean { get; set; }
|
||||
public string DwnLpdNMin { get; set; }
|
||||
public string DwnLpdNStDev { get; set; }
|
||||
public string DwnLpdStDev { get; set; }
|
||||
public string DwnMicroScrMax { get; set; }
|
||||
public string DwnMicroScrMean { get; set; }
|
||||
public string DwnMicroScrMin { get; set; }
|
||||
public string DwnMicroScrStDev { get; set; }
|
||||
public string DwnScrMax { get; set; }
|
||||
public string DwnScrMean { get; set; }
|
||||
public string DwnScrMin { get; set; }
|
||||
public string DwnScrStDev { get; set; }
|
||||
public string DwnSlipMax { get; set; }
|
||||
public string DwnSlipMean { get; set; }
|
||||
public string DwnSlipMin { get; set; }
|
||||
public string DwnSlipStDev { get; set; }
|
||||
public List<DataFile> Details { get; protected set; }
|
||||
|
||||
[Obsolete("For json")] public WSRequest() { }
|
||||
|
||||
internal WSRequest(ILogic logic, List<FileRead.Description> descriptions)
|
||||
{
|
||||
Details = new List<DataFile>();
|
||||
CellName = logic.Logistics.MesEntity;
|
||||
FileRead.Description x = descriptions[0];
|
||||
//Header
|
||||
{
|
||||
UniqueID = x.UniqueId;
|
||||
Date = x.Date;
|
||||
Reactor = x.Reactor;
|
||||
LotID = x.Lot;
|
||||
Session = x.Session;
|
||||
DcnAllMin = x.DcnAllMin;
|
||||
DcnAllMax = x.DcnAllMax;
|
||||
DcnAllMean = x.DcnAllMean;
|
||||
DcnAllStDev = x.DcnAllStdDev;
|
||||
DcnLpdMin = x.DcnLpdMin;
|
||||
DcnLpdMax = x.DcnLpdMax;
|
||||
DcnLpdMean = x.DcnLpdMean;
|
||||
DcnLpdStDev = x.DcnLpdStdDev;
|
||||
DcnLpdNMin = x.DcnLpdNMin;
|
||||
DcnLpdNMax = x.DcnLpdNMax;
|
||||
DcnLpdNMean = x.DcnLpdNMean;
|
||||
DcnLpdNStDev = x.DcnLpdNStdDev;
|
||||
DcnLpdESMin = x.DcnLpdESMin;
|
||||
DcnLpdESMax = x.DcnLpdESMax;
|
||||
DcnLpdESMean = x.DcnLpdESMean;
|
||||
DcnLpdESStDev = x.DcnLpdESStdDev;
|
||||
DcnMicroScrMin = x.DcnMicroScrMin;
|
||||
DcnMicroScrMax = x.DcnMicroScrMax;
|
||||
DcnMicroScrMean = x.DcnMicroScrMean;
|
||||
DcnMicroScrStDev = x.DcnMicroScrStdDev;
|
||||
DcnScrMin = x.DcnScrMin;
|
||||
DcnScrMax = x.DcnScrMax;
|
||||
DcnScrMean = x.DcnScrMean;
|
||||
DcnScrStDev = x.DcnScrStdDev;
|
||||
DcnSlipMin = x.DcnSlipMin;
|
||||
DcnSlipMax = x.DcnSlipMax;
|
||||
DcnSlipMean = x.DcnSlipMean;
|
||||
DcnSlipStDev = x.DcnSlipStdDev;
|
||||
DcnAreaCntMin = x.DcnAreaCountMin;
|
||||
DcnAreaCntMax = x.DcnAreaCountMax;
|
||||
DcnAreaCntMean = x.DcnAreaCountMean;
|
||||
DcnAreaCntStDev = x.DcnAreaCountStdDev;
|
||||
DcnAreaMin = x.DcnAreaMin;
|
||||
DcnAreaMax = x.DcnAreaMax;
|
||||
DcnAreaMean = x.DcnAreaMean;
|
||||
DcnAreaStDev = x.DcnAreaStdDev;
|
||||
DcnHazeAvgMin = x.DcnHazeAvgMin;
|
||||
DcnHazeAvgMax = x.DcnHazeAvgMax;
|
||||
DcnHazeAvgMean = x.DcnHazeAvgMean;
|
||||
DcnHazeAvgStDev = x.DcnHazeAvgStdDev;
|
||||
DcnHazeMedMin = x.DcnHazeMedianMin;
|
||||
DcnHazeMedMax = x.DcnHazeMedianMax;
|
||||
DcnHazeMedMean = x.DcnHazeMedianMean;
|
||||
DcnHazeMedStDev = x.DcnHazeMedianStdDev;
|
||||
DcnHazeStDevMin = x.DcnHazeStdDevMin;
|
||||
DcnHazeStDevMax = x.DcnHazeStdDevMax;
|
||||
DcnHazeStDevMean = x.DcnHazeStdDevMean;
|
||||
DcnHazeStDevStDev = x.DcnHazeStdDevStdDev;
|
||||
DcnBin1Min = x.DcnBin1Min;
|
||||
DcnBin1Max = x.DcnBin1Max;
|
||||
DcnBin1Mean = x.DcnBin1Mean;
|
||||
DcnBin1StDev = x.DcnBin1StdDev;
|
||||
DcnBin2Min = x.DcnBin2Min;
|
||||
DcnBin2Max = x.DcnBin2Max;
|
||||
DcnBin2Mean = x.DcnBin2Mean;
|
||||
DcnBin2StDev = x.DcnBin2StdDev;
|
||||
DcnBin3Min = x.DcnBin3Min;
|
||||
DcnBin3Max = x.DcnBin3Max;
|
||||
DcnBin3Mean = x.DcnBin3Mean;
|
||||
DcnBin3StDev = x.DcnBin3StdDev;
|
||||
DcnBin4Min = x.DcnBin4Min;
|
||||
DcnBin4Max = x.DcnBin4Max;
|
||||
DcnBin4Mean = x.DcnBin4Mean;
|
||||
DcnBin4StDev = x.DcnBin4StdDev;
|
||||
DcnBin5Min = x.DcnBin5Min;
|
||||
DcnBin5Max = x.DcnBin5Max;
|
||||
DcnBin5Mean = x.DcnBin5Mean;
|
||||
DcnBin5StDev = x.DcnBin5StdDev;
|
||||
DcnBin6Min = x.DcnBin6Min;
|
||||
DcnBin6Max = x.DcnBin6Max;
|
||||
DcnBin6Mean = x.DcnBin6Mean;
|
||||
DcnBin6StDev = x.DcnBin6StdDev;
|
||||
DcnBin7Min = x.DcnBin7Min;
|
||||
DcnBin7Max = x.DcnBin7Max;
|
||||
DcnBin7Mean = x.DcnBin7Mean;
|
||||
DcnBin7StDev = x.DcnBin7StdDev;
|
||||
DcnBin8Min = x.DcnBin8Min;
|
||||
DcnBin8Max = x.DcnBin8Max;
|
||||
DcnBin8Mean = x.DcnBin8Mean;
|
||||
DcnBin8StDev = x.DcnBin8StdDev;
|
||||
DwnAllMin = x.DwnAllMin;
|
||||
DwnAllMax = x.DwnAllMax;
|
||||
DwnAllMean = x.DwnAllMean;
|
||||
DwnAllStDev = x.DwnAllStdDev;
|
||||
DwnLpdMin = x.DwnLpdMin;
|
||||
DwnLpdMax = x.DwnLpdMax;
|
||||
DwnLpdMean = x.DwnLpdMean;
|
||||
DwnLpdStDev = x.DwnLpdStdDev;
|
||||
DwnLpdNMin = x.DwnLpdNMin;
|
||||
DwnLpdNMax = x.DwnLpdNMax;
|
||||
DwnLpdNMean = x.DwnLpdNMean;
|
||||
DwnLpdNStDev = x.DwnLpdNStdDev;
|
||||
DwnLpdESMin = x.DwnLpdESMin;
|
||||
DwnLpdESMax = x.DwnLpdESMax;
|
||||
DwnLpdESMean = x.DwnLpdESMean;
|
||||
DwnLpdESStDev = x.DwnLpdESStdDev;
|
||||
DwnMicroScrMin = x.DwnMicroScrMin;
|
||||
DwnMicroScrMax = x.DwnMicroScrMax;
|
||||
DwnMicroScrMean = x.DwnMicroScrMean;
|
||||
DwnMicroScrStDev = x.DwnMicroScrStdDev;
|
||||
DwnScrMin = x.DwnScrMin;
|
||||
DwnScrMax = x.DwnScrMax;
|
||||
DwnScrMean = x.DwnScrMean;
|
||||
DwnScrStDev = x.DwnScrStdDev;
|
||||
DwnSlipMin = x.DwnSlipMin;
|
||||
DwnSlipMax = x.DwnSlipMax;
|
||||
DwnSlipMean = x.DwnSlipMean;
|
||||
DwnSlipStDev = x.DwnSlipStdDev;
|
||||
DwnAreaCntMin = x.DwnAreaCountMin;
|
||||
DwnAreaCntMax = x.DwnAreaCountMax;
|
||||
DwnAreaCntMean = x.DwnAreaCountMean;
|
||||
DwnAreaCntStDev = x.DwnAreaCountStdDev;
|
||||
DwnAreaMin = x.DwnAreaMin;
|
||||
DwnAreaMax = x.DwnAreaMax;
|
||||
DwnAreaMean = x.DwnAreaMean;
|
||||
DwnAreaStDev = x.DwnAreaStdDev;
|
||||
DwnHazeAvgMin = x.DwnHazeAvgMin;
|
||||
DwnHazeAvgMax = x.DwnHazeAvgMax;
|
||||
DwnHazeAvgMean = x.DwnHazeAvgMean;
|
||||
DwnHazeAvgStDev = x.DwnHazeAvgStdDev;
|
||||
DwnHazeMedMin = x.DwnHazeMedianMin;
|
||||
DwnHazeMedMax = x.DwnHazeMedianMax;
|
||||
DwnHazeMedMean = x.DwnHazeMedianMean;
|
||||
DwnHazeMedStDev = x.DwnHazeMedianStdDev;
|
||||
DwnHazeStDevMin = x.DwnHazeStdDevMin;
|
||||
DwnHazeStDevMax = x.DwnHazeStdDevMax;
|
||||
DwnHazeStDevMean = x.DwnHazeStdDevMean;
|
||||
DwnHazeStDevStDev = x.DwnHazeStdDevStdDev;
|
||||
DwnBin1Min = x.DwnBin1Min;
|
||||
DwnBin1Max = x.DwnBin1Max;
|
||||
DwnBin1Mean = x.DwnBin1Mean;
|
||||
DwnBin1StDev = x.DwnBin1StdDev;
|
||||
DwnBin2Min = x.DwnBin2Min;
|
||||
DwnBin2Max = x.DwnBin2Max;
|
||||
DwnBin2Mean = x.DwnBin2Mean;
|
||||
DwnBin2StDev = x.DwnBin2StdDev;
|
||||
DwnBin3Min = x.DwnBin3Min;
|
||||
DwnBin3Max = x.DwnBin3Max;
|
||||
DwnBin3Mean = x.DwnBin3Mean;
|
||||
DwnBin3StDev = x.DwnBin3StdDev;
|
||||
DwnBin4Min = x.DwnBin4Min;
|
||||
DwnBin4Max = x.DwnBin4Max;
|
||||
DwnBin4Mean = x.DwnBin4Mean;
|
||||
DwnBin4StDev = x.DwnBin4StdDev;
|
||||
DwnBin5Min = x.DwnBin5Min;
|
||||
DwnBin5Max = x.DwnBin5Max;
|
||||
DwnBin5Mean = x.DwnBin5Mean;
|
||||
DwnBin5StDev = x.DwnBin5StdDev;
|
||||
DwnBin6Min = x.DwnBin6Min;
|
||||
DwnBin6Max = x.DwnBin6Max;
|
||||
DwnBin6Mean = x.DwnBin6Mean;
|
||||
DwnBin6StDev = x.DwnBin6StdDev;
|
||||
DwnBin7Min = x.DwnBin7Min;
|
||||
DwnBin7Max = x.DwnBin7Max;
|
||||
DwnBin7Mean = x.DwnBin7Mean;
|
||||
DwnBin7StDev = x.DwnBin7StdDev;
|
||||
DwnBin8Min = x.DwnBin8Min;
|
||||
DwnBin8Max = x.DwnBin8Max;
|
||||
DwnBin8Mean = x.DwnBin8Mean;
|
||||
DwnBin8StDev = x.DwnBin8StdDev;
|
||||
DnnAllMin = x.DnnAllMin;
|
||||
DnnAllMax = x.DnnAllMax;
|
||||
DnnAllMean = x.DnnAllMean;
|
||||
DnnAllStDev = x.DnnAllStdDev;
|
||||
DnnLpdMin = x.DnnLpdMin;
|
||||
DnnLpdMax = x.DnnLpdMax;
|
||||
DnnLpdMean = x.DnnLpdMean;
|
||||
DnnLpdStDev = x.DnnLpdStdDev;
|
||||
DnnLpdNMin = x.DnnLpdNMin;
|
||||
DnnLpdNMax = x.DnnLpdNMax;
|
||||
DnnLpdNMean = x.DnnLpdNMean;
|
||||
DnnLpdNStDev = x.DnnLpdNStdDev;
|
||||
DnnLpdESMin = x.DnnLpdESMin;
|
||||
DnnLpdESMax = x.DnnLpdESMax;
|
||||
DnnLpdESMean = x.DnnLpdESMean;
|
||||
DnnLpdESStDev = x.DnnLpdESStdDev;
|
||||
DnnMicroScrMin = x.DnnMicroScrMin;
|
||||
DnnMicroScrMax = x.DnnMicroScrMax;
|
||||
DnnMicroScrMean = x.DnnMicroScrMean;
|
||||
DnnMicroScrStDev = x.DnnMicroScrStdDev;
|
||||
DnnScrMin = x.DnnScrMin;
|
||||
DnnScrMax = x.DnnScrMax;
|
||||
DnnScrMean = x.DnnScrMean;
|
||||
DnnScrStDev = x.DnnScrStdDev;
|
||||
DnnSlipMin = x.DnnSlipMin;
|
||||
DnnSlipMax = x.DnnSlipMax;
|
||||
DnnSlipMean = x.DnnSlipMean;
|
||||
DnnSlipStDev = x.DnnSlipStdDev;
|
||||
DnnAreaCntMin = x.DnnAreaCountMin;
|
||||
DnnAreaCntMax = x.DnnAreaCountMax;
|
||||
DnnAreaCntMean = x.DnnAreaCountMean;
|
||||
DnnAreaCntStDev = x.DnnAreaCountStdDev;
|
||||
DnnAreaMin = x.DnnAreaMin;
|
||||
DnnAreaMax = x.DnnAreaMax;
|
||||
DnnAreaMean = x.DnnAreaMean;
|
||||
DnnAreaStDev = x.DnnAreaStdDev;
|
||||
DnnHazeAvgMin = x.DnnHazeAvgMin;
|
||||
DnnHazeAvgMax = x.DnnHazeAvgMax;
|
||||
DnnHazeAvgMean = x.DnnHazeAvgMean;
|
||||
DnnHazeAvgStDev = x.DnnHazeAvgStdDev;
|
||||
DnnHazeMedMin = x.DnnHazeMedianMin;
|
||||
DnnHazeMedMax = x.DnnHazeMedianMax;
|
||||
DnnHazeMedMean = x.DnnHazeMedianMean;
|
||||
DnnHazeMedStDev = x.DnnHazeMedianStdDev;
|
||||
DnnHazeStDevMin = x.DnnHazeStdDevMin;
|
||||
DnnHazeStDevMax = x.DnnHazeStdDevMax;
|
||||
DnnHazeStDevMean = x.DnnHazeStdDevMean;
|
||||
DnnHazeStDevStDev = x.DnnHazeStdDevStdDev;
|
||||
DnnBin1Min = x.DnnBin1Min;
|
||||
DnnBin1Max = x.DnnBin1Max;
|
||||
DnnBin1Mean = x.DnnBin1Mean;
|
||||
DnnBin1StDev = x.DnnBin1StdDev;
|
||||
DnnBin2Min = x.DnnBin2Min;
|
||||
DnnBin2Max = x.DnnBin2Max;
|
||||
DnnBin2Mean = x.DnnBin2Mean;
|
||||
DnnBin2StDev = x.DnnBin2StdDev;
|
||||
DnnBin3Min = x.DnnBin3Min;
|
||||
DnnBin3Max = x.DnnBin3Max;
|
||||
DnnBin3Mean = x.DnnBin3Mean;
|
||||
DnnBin3StDev = x.DnnBin3StdDev;
|
||||
DnnBin4Min = x.DnnBin4Min;
|
||||
DnnBin4Max = x.DnnBin4Max;
|
||||
DnnBin4Mean = x.DnnBin4Mean;
|
||||
DnnBin4StDev = x.DnnBin4StdDev;
|
||||
DnnBin5Min = x.DnnBin5Min;
|
||||
DnnBin5Max = x.DnnBin5Max;
|
||||
DnnBin5Mean = x.DnnBin5Mean;
|
||||
DnnBin5StDev = x.DnnBin5StdDev;
|
||||
DnnBin6Min = x.DnnBin6Min;
|
||||
DnnBin6Max = x.DnnBin6Max;
|
||||
DnnBin6Mean = x.DnnBin6Mean;
|
||||
DnnBin6StDev = x.DnnBin6StdDev;
|
||||
DnnBin7Min = x.DnnBin7Min;
|
||||
DnnBin7Max = x.DnnBin7Max;
|
||||
DnnBin7Mean = x.DnnBin7Mean;
|
||||
DnnBin7StDev = x.DnnBin7StdDev;
|
||||
DnnBin8Min = x.DnnBin8Min;
|
||||
DnnBin8Max = x.DnnBin8Max;
|
||||
DnnBin8Mean = x.DnnBin8Mean;
|
||||
DnnBin8StDev = x.DnnBin8StdDev;
|
||||
RDS = x.RDS;
|
||||
PSN = x.PSN;
|
||||
Recipe = x.Recipe;
|
||||
Operator = x.Employee;
|
||||
}
|
||||
DataFile dataFile;
|
||||
foreach (FileRead.Description description in descriptions)
|
||||
{
|
||||
dataFile = new DataFile
|
||||
{
|
||||
Grade = description.Grade,
|
||||
HeaderUniqueID = description.HeaderUniqueId,
|
||||
Side = description.Side,
|
||||
SrcDest = description.SrcDest,
|
||||
UniqueID = description.UniqueId,
|
||||
WaferID = description.WaferID,
|
||||
Data = "*Data*",
|
||||
DcnAll = description.DcnAll,
|
||||
DcnArea = description.DcnArea,
|
||||
DcnAreaCount = description.DcnAreaCount,
|
||||
DcnBin1 = description.DcnBin1,
|
||||
DcnBin2 = description.DcnBin2,
|
||||
DcnBin3 = description.DcnBin3,
|
||||
DcnBin4 = description.DcnBin4,
|
||||
DcnBin5 = description.DcnBin5,
|
||||
DcnBin6 = description.DcnBin6,
|
||||
DcnBin7 = description.DcnBin7,
|
||||
DcnBin8 = description.DcnBin8,
|
||||
DcnHazeAvg = description.DcnHazeAvg,
|
||||
DcnHazeMedian = description.DcnHazeMedian,
|
||||
DcnHazeStdDev = description.DcnHazeStdDev,
|
||||
DcnLpd = description.DcnLpd,
|
||||
DcnLpdES = description.DcnLpdES,
|
||||
DcnLpdN = description.DcnLpdN,
|
||||
DcnMicroScr = description.DcnMicroScr,
|
||||
DcnScr = description.DcnScr,
|
||||
DcnSlip = description.DcnSlip,
|
||||
DnnAll = description.DnnAll,
|
||||
DnnArea = description.DnnArea,
|
||||
DnnAreaCount = description.DnnAreaCount,
|
||||
DnnBin1 = description.DnnBin1,
|
||||
DnnBin2 = description.DnnBin2,
|
||||
DnnBin3 = description.DnnBin3,
|
||||
DnnBin4 = description.DnnBin4,
|
||||
DnnBin5 = description.DnnBin5,
|
||||
DnnBin6 = description.DnnBin6,
|
||||
DnnBin7 = description.DnnBin7,
|
||||
DnnBin8 = description.DnnBin8,
|
||||
DnnHazeAvg = description.DnnHazeAvg,
|
||||
DnnHazeMedian = description.DnnHazeMedian,
|
||||
DnnHazeStdDev = description.DnnHazeStdDev,
|
||||
DnnLpd = description.DnnLpd,
|
||||
DnnLpdES = description.DnnLpdES,
|
||||
DnnLpdN = description.DnnLpdN,
|
||||
DnnMicroScr = description.DnnMicroScr,
|
||||
DnnScr = description.DnnScr,
|
||||
DnnSlip = description.DnnSlip,
|
||||
DwnAll = description.DwnAll,
|
||||
DwnArea = description.DwnArea,
|
||||
DwnAreaCount = description.DwnAreaCount,
|
||||
DwnBin1 = description.DwnBin1,
|
||||
DwnBin2 = description.DwnBin2,
|
||||
DwnBin3 = description.DwnBin3,
|
||||
DwnBin4 = description.DwnBin4,
|
||||
DwnBin5 = description.DwnBin5,
|
||||
DwnBin6 = description.DwnBin6,
|
||||
DwnBin7 = description.DwnBin7,
|
||||
DwnBin8 = description.DwnBin8,
|
||||
DwnHazeAvg = description.DwnHazeAvg,
|
||||
DwnHazeMedian = description.DwnHazeMedian,
|
||||
DwnHazeStdDev = description.DwnHazeStdDev,
|
||||
DwnLpd = description.DwnLpd,
|
||||
DwnLpdES = description.DwnLpdES,
|
||||
DwnLpdN = description.DwnLpdN,
|
||||
DwnMicroScr = description.DwnMicroScr,
|
||||
DwnScr = description.DwnScr,
|
||||
DwnSlip = description.DwnSlip
|
||||
};
|
||||
Details.Add(dataFile);
|
||||
}
|
||||
Date = logic.Logistics.DateTimeFromSequence.ToString();
|
||||
if (UniqueID is null && Details.Any())
|
||||
UniqueID = Details[0].HeaderUniqueID;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
38
Adaptation/Helpers/ProcessData.WaferSummaryInfo.cs
Normal file
38
Adaptation/Helpers/ProcessData.WaferSummaryInfo.cs
Normal file
@ -0,0 +1,38 @@
|
||||
namespace Adaptation.Helpers
|
||||
{
|
||||
|
||||
public partial class ProcessData
|
||||
{
|
||||
public class WaferSummaryInfo
|
||||
{
|
||||
|
||||
public string All { get; set; }
|
||||
public string Area { get; set; }
|
||||
public string AreaNum { get; set; }
|
||||
public string Bin1 { get; set; }
|
||||
public string Bin2 { get; set; }
|
||||
public string Bin3 { get; set; }
|
||||
public string Bin4 { get; set; }
|
||||
public string Bin5 { get; set; }
|
||||
public string Bin6 { get; set; }
|
||||
public string Bin7 { get; set; }
|
||||
public string Bin8 { get; set; }
|
||||
public string Grade { get; set; }
|
||||
public string HazeAvg { get; set; }
|
||||
public string HazeMedian { get; set; }
|
||||
public string HazeStdDev { get; set; }
|
||||
public string Lpd { get; set; }
|
||||
public string LpdES { get; set; }
|
||||
public string LpdN { get; set; }
|
||||
public string MicroScr { get; set; }
|
||||
public string Scr { get; set; }
|
||||
public string Side { get; set; }
|
||||
public string Slip { get; set; }
|
||||
public string SrcDest { get; set; }
|
||||
public string WaferID { get; set; }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
819
Adaptation/Helpers/ProcessData.cs
Normal file
819
Adaptation/Helpers/ProcessData.cs
Normal file
@ -0,0 +1,819 @@
|
||||
using Adaptation.Shared;
|
||||
using Adaptation.Shared.Metrology;
|
||||
using log4net;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Adaptation.Helpers
|
||||
{
|
||||
|
||||
public partial class ProcessData : IProcessData
|
||||
{
|
||||
|
||||
public HeaderFile Header { get; private set; }
|
||||
public List<DataFile> Details { get; private set; }
|
||||
|
||||
private int _I;
|
||||
private readonly ILog _Log;
|
||||
private string _Data;
|
||||
|
||||
public ProcessData(ILogic logic, ConfigData configData, List<FileInfo> fileInfoCollection)
|
||||
{
|
||||
Header = null;
|
||||
fileInfoCollection.Clear();
|
||||
_I = 0;
|
||||
_Data = string.Empty;
|
||||
_Log = LogManager.GetLogger(typeof(ProcessData));
|
||||
Details = new List<DataFile>();
|
||||
Tuple<HeaderFile, List<DataFile>> tuple = Parse(logic, fileInfoCollection);
|
||||
Details.AddRange(tuple.Item2);
|
||||
Header = tuple.Item1;
|
||||
}
|
||||
|
||||
public Tuple<string, JsonElement?, List<FileInfo>> GetResults(ILogic logic, ConfigDataBase configDataBase, List<FileInfo> fileInfoCollection)
|
||||
{
|
||||
Tuple<string, JsonElement?, List<FileInfo>> results;
|
||||
if (!(configDataBase is ConfigData configData))
|
||||
throw new Exception();
|
||||
List<Test> tests = new List<Test>();
|
||||
List<IProcessDataDescription> descriptions;
|
||||
EventName eventName = configData.GetEventNameValue();
|
||||
if (eventName == EventName.FileRead && Details.Any())
|
||||
{
|
||||
foreach (var item in Details)
|
||||
tests.Add(Test.SP1);
|
||||
descriptions = configData.GetDescription(logic, tests, this);
|
||||
}
|
||||
else
|
||||
throw new Exception();
|
||||
if (!configData.EafHosted)
|
||||
{
|
||||
new FileRead.Description().GetDescription(logic, configData, tests, this);
|
||||
}
|
||||
if (tests.Count != descriptions.Count)
|
||||
throw new Exception();
|
||||
for (int i = 0; i < tests.Count; i++)
|
||||
{
|
||||
if (descriptions[i].Test != (int)tests[i])
|
||||
throw new Exception();
|
||||
}
|
||||
string json;
|
||||
if (descriptions[0] is Duplicator.Description)
|
||||
{
|
||||
List<Duplicator.Description> duplicatorDescriptions = (from l in descriptions select (Duplicator.Description)l).ToList();
|
||||
json = JsonSerializer.Serialize(duplicatorDescriptions, duplicatorDescriptions.GetType());
|
||||
}
|
||||
else if (descriptions[0] is FileRead.Description)
|
||||
{
|
||||
List<FileRead.Description> fileReadDescriptions = (from l in descriptions select (FileRead.Description)l).ToList();
|
||||
json = JsonSerializer.Serialize(fileReadDescriptions, fileReadDescriptions.GetType());
|
||||
}
|
||||
else
|
||||
throw new Exception();
|
||||
object @object = JsonSerializer.Deserialize<object>(json);
|
||||
if (!(@object is JsonElement jsonElement))
|
||||
throw new Exception();
|
||||
results = new Tuple<string, JsonElement?, List<FileInfo>>(logic.Logistics.Logistics1[0], jsonElement, fileInfoCollection);
|
||||
return results;
|
||||
}
|
||||
|
||||
public static Dictionary<Test, List<Duplicator.Description>> GetKeyValuePairs(ConfigData configData, JsonElement jsonElement, List<Duplicator.Description> processDataDescriptions, bool extra = false)
|
||||
{
|
||||
Dictionary<Test, List<Duplicator.Description>> results = configData.GetKeyValuePairs(processDataDescriptions);
|
||||
configData.CheckProcessDataDescription(results, extra);
|
||||
return results;
|
||||
}
|
||||
|
||||
public static List<FileRead.Description> GetProcessDataFileReadDescriptions(ConfigData configData, JsonElement jsonElement)
|
||||
{
|
||||
List<FileRead.Description> results = new List<FileRead.Description>();
|
||||
List<IProcessDataDescription> processDataDescriptions = configData.GetIProcessDataDescriptions(jsonElement);
|
||||
foreach (IProcessDataDescription processDataDescription in processDataDescriptions)
|
||||
{
|
||||
if (!(processDataDescription is FileRead.Description description))
|
||||
continue;
|
||||
results.Add(description);
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
public static Tuple<string, string> GetLines(ILogic logic, List<FileRead.Description> descriptions)
|
||||
{
|
||||
char del = '\t';
|
||||
StringBuilder result = new StringBuilder();
|
||||
FileRead.Description x = descriptions[0];
|
||||
result.Append(x.DcnLpdMin).Append(del). // 001 -
|
||||
Append(x.DcnLpdMax).Append(del). // 002 -
|
||||
Append(x.DcnLpdMean).Append(del). // 003 - DCN LPD
|
||||
Append(x.DcnAreaCountMin).Append(del). // 004 -
|
||||
Append(x.DcnAreaCountMax).Append(del). // 005 -
|
||||
Append(x.DcnAreaCountMean).Append(del).// 006 - DCN Area
|
||||
Append(x.DcnAreaMin).Append(del). // 007 -
|
||||
Append(x.DcnAreaMax).Append(del). // 008 -
|
||||
Append(x.Date).Append(del). // 009 -
|
||||
Append(x.DcnHazeAvgMean).Append(del). // 010 - Haze Average
|
||||
Append(string.Empty).Append(del). // 011 -
|
||||
Append(string.Empty).Append(del). // 012 -
|
||||
Append(string.Empty).Append(del). // 013 -
|
||||
Append(string.Empty).Append(del). // 014 -
|
||||
Append(string.Empty).Append(del). // 015 -
|
||||
Append(string.Empty).Append(del). // 016 -
|
||||
Append(string.Empty).Append(del). // 017 -
|
||||
Append(string.Empty).Append(del). // 018 -
|
||||
Append(string.Empty).Append(del). // 019 -
|
||||
Append(string.Empty).Append(del). // 020 -
|
||||
Append(string.Empty).Append(del). // 021 -
|
||||
Append(string.Empty).Append(del). // 022 -
|
||||
Append(string.Empty).Append(del). // 023 -
|
||||
Append(string.Empty).Append(del). // 024 -
|
||||
Append(string.Empty).Append(del). // 025 -
|
||||
Append(string.Empty).Append(del). // 026 -
|
||||
Append(string.Empty).Append(del). // 027 -
|
||||
Append(x.RDS).Append(del). // 028 - Lot
|
||||
Append(x.Reactor).Append(del). // 029 - Process
|
||||
Append(x.Recipe).Append(del). // 030 - Part
|
||||
Append(x.DcnScrMean).Append(del). // 031 - Scratch Count
|
||||
Append(string.Empty).Append(del). // 032 -
|
||||
Append(string.Empty).Append(del). // 033 -
|
||||
Append(string.Empty).Append(del). // 034 -
|
||||
Append(x.DcnMicroScrMean).Append(del). // 035 - Scratch Length
|
||||
Append(string.Empty).Append(del). // 036 -
|
||||
Append(string.Empty).Append(del). // 037 -
|
||||
Append(string.Empty).Append(del). // 038 -
|
||||
Append(x.DcnAllMean).Append(del). // 039 - Average Sum of Defects
|
||||
Append(x.DcnAllMax).Append(del). // 040 - Max Sum of defects
|
||||
Append(x.DcnAllMin).Append(del). // 041 - Min Sum of Defects
|
||||
Append(string.Empty).Append(del). // 042 -
|
||||
Append(logic.Logistics.MesEntity).Append(del). // 043 -
|
||||
Append(x.DcnAreaMean).Append(del). // 044 - DCN MM2
|
||||
AppendLine();
|
||||
return new Tuple<string, string>(result.ToString(), x.Date);
|
||||
}
|
||||
|
||||
internal static void PostOpenInsightMetrologyViewerAttachments(ILog log, ConfigData configData, Logistics logistics, DateTime dateTime, string logisticsSequenceMemoryDirectory, List<FileRead.Description> descriptions, string matchDirectory)
|
||||
{
|
||||
string[] summaryFiles = Directory.GetFiles(matchDirectory, "*.txt", SearchOption.TopDirectoryOnly);
|
||||
if (summaryFiles.Length != 1)
|
||||
throw new Exception("Invalid summary file count!");
|
||||
string wsResultsMemoryFile = string.Concat(logisticsSequenceMemoryDirectory, @"\", nameof(WS.Results), ".json");
|
||||
if (!File.Exists(wsResultsMemoryFile))
|
||||
throw new Exception(string.Concat("Memory file <", wsResultsMemoryFile, "> doesn't exist!"));
|
||||
string json = File.ReadAllText(wsResultsMemoryFile);
|
||||
WS.Results metrologyWSRequest = JsonSerializer.Deserialize<WS.Results>(json);
|
||||
long wsResultsHeaderID = metrologyWSRequest.HeaderID;
|
||||
string[] prnFiles = Directory.GetFiles(matchDirectory, "WaferMap*.prn", SearchOption.TopDirectoryOnly);
|
||||
if (prnFiles.Length == 0 || prnFiles.Length != descriptions.Count)
|
||||
log.Debug("Invalid WaferMap*.prn file count!");
|
||||
List<string> pdfFiles = new List<string>();
|
||||
foreach (string prnFile in prnFiles.OrderBy(l => l))
|
||||
pdfFiles.Add(ConvertSourceFileToPdf(configData, prnFile));
|
||||
if (pdfFiles.Count == 0 || pdfFiles.Count != descriptions.Count)
|
||||
log.Debug("Invalid *.pdf file count!");
|
||||
List<WS.Attachment> dataAttachments = new List<WS.Attachment>();
|
||||
List<WS.Attachment> headerAttachments = new List<WS.Attachment> { new WS.Attachment(descriptions[0].HeaderUniqueId, "Data.txt", summaryFiles[0]) };
|
||||
int count;
|
||||
if (pdfFiles.Count < descriptions.Count)
|
||||
count = pdfFiles.Count;
|
||||
else
|
||||
count = descriptions.Count;
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(pdfFiles[i]))
|
||||
dataAttachments.Add(new WS.Attachment(descriptions[i].UniqueId, "Image.pdf", pdfFiles[i]));
|
||||
}
|
||||
if (dataAttachments.Count == 0 || dataAttachments.Count != descriptions.Count)
|
||||
log.Debug("Invalid attachment count!");
|
||||
WS.AttachFiles(configData.OpenInsightMetrogyViewerAPI, wsResultsHeaderID, headerAttachments, dataAttachments);
|
||||
}
|
||||
|
||||
private void ScanPast(string text)
|
||||
{
|
||||
int num = _Data.IndexOf(text, _I);
|
||||
if (num > -1)
|
||||
_I = num + text.Length;
|
||||
else
|
||||
_I = _Data.Length;
|
||||
}
|
||||
|
||||
private string GetBefore(string text)
|
||||
{
|
||||
int num = _Data.IndexOf(text, _I);
|
||||
if (num > -1)
|
||||
{
|
||||
string str = _Data.Substring(_I, num - _I);
|
||||
_I = num + text.Length;
|
||||
return str.Trim();
|
||||
}
|
||||
string str1 = _Data.Substring(_I);
|
||||
_I = _Data.Length;
|
||||
return str1.Trim();
|
||||
}
|
||||
|
||||
private string GetBefore(string text, bool trim)
|
||||
{
|
||||
if (trim)
|
||||
return GetBefore(text);
|
||||
int num = _Data.IndexOf(text, _I);
|
||||
if (num > -1)
|
||||
{
|
||||
string str = _Data.Substring(_I, num - _I);
|
||||
_I = num + text.Length;
|
||||
return str;
|
||||
}
|
||||
string str1 = _Data.Substring(_I);
|
||||
_I = _Data.Length;
|
||||
return str1;
|
||||
}
|
||||
|
||||
private bool IsNullOrWhiteSpace(string text)
|
||||
{
|
||||
for (int index = 0; index < text.Length; ++index)
|
||||
{
|
||||
if (!char.IsWhiteSpace(text[index]))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool IsBlankLine()
|
||||
{
|
||||
int num = _Data.IndexOf("\n", _I);
|
||||
return IsNullOrWhiteSpace(num > -1 ? _Data.Substring(_I, num - _I) : _Data.Substring(_I));
|
||||
}
|
||||
|
||||
private string GetToEOL()
|
||||
{
|
||||
return GetBefore("\n");
|
||||
}
|
||||
|
||||
private string GetToEOL(bool trim)
|
||||
{
|
||||
if (trim)
|
||||
return GetToEOL();
|
||||
return GetBefore("\n", false);
|
||||
}
|
||||
|
||||
private string GetToText(string text)
|
||||
{
|
||||
return _Data.Substring(_I, _Data.IndexOf(text, _I) - _I).Trim();
|
||||
}
|
||||
|
||||
private string GetToken()
|
||||
{
|
||||
while (_I < _Data.Length && IsNullOrWhiteSpace(_Data.Substring(_I, 1)))
|
||||
++_I;
|
||||
int j = _I;
|
||||
while (j < _Data.Length && !IsNullOrWhiteSpace(_Data.Substring(j, 1)))
|
||||
++j;
|
||||
string str = _Data.Substring(_I, j - _I);
|
||||
_I = j;
|
||||
return str.Trim();
|
||||
}
|
||||
|
||||
private string PeekNextLine()
|
||||
{
|
||||
int j = _I;
|
||||
string toEol = GetToEOL();
|
||||
_I = j;
|
||||
return toEol;
|
||||
}
|
||||
|
||||
private void GetWaferSummaryInfo(List<WaferSummaryInfo> waferSummaryInfos, string whichInfo)
|
||||
{
|
||||
ScanPast(whichInfo);
|
||||
GetToEOL();
|
||||
GetToEOL();
|
||||
GetToEOL();
|
||||
GetToEOL();
|
||||
string[] segments;
|
||||
WaferSummaryInfo waferSummaryInfo;
|
||||
const string grade = "F Grade";
|
||||
const string rejct = "F Reject";
|
||||
const string overLoad = "F OverLoad";
|
||||
for (string line = PeekNextLine(); line[0] != '-'; line = PeekNextLine())
|
||||
{
|
||||
line = GetToEOL();
|
||||
waferSummaryInfo = new WaferSummaryInfo();
|
||||
if (line.StartsWith(grade))
|
||||
line = line.Replace(grade, string.Concat("F -1", grade.Substring(4)));
|
||||
else if (line.StartsWith(rejct))
|
||||
line = line.Replace(rejct, string.Concat("F -1", rejct.Substring(4)));
|
||||
else if (line.StartsWith(overLoad))
|
||||
line = line.Replace(overLoad, string.Concat("F -1", overLoad.Substring(4)));
|
||||
segments = line.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
waferSummaryInfo.Side = segments[0];
|
||||
waferSummaryInfo.WaferID = segments[1];
|
||||
waferSummaryInfo.Grade = segments[2];
|
||||
waferSummaryInfo.SrcDest = segments[3];
|
||||
if (segments.Length > 4)
|
||||
{
|
||||
waferSummaryInfo.Lpd = segments[5];
|
||||
waferSummaryInfo.LpdN = segments[6];
|
||||
waferSummaryInfo.LpdES = segments[7];
|
||||
waferSummaryInfo.MicroScr = segments[8];
|
||||
waferSummaryInfo.Scr = segments[9];
|
||||
waferSummaryInfo.Slip = segments[10];
|
||||
waferSummaryInfo.AreaNum = segments[11];
|
||||
waferSummaryInfo.Area = segments[12];
|
||||
waferSummaryInfo.HazeAvg = segments[13];
|
||||
waferSummaryInfo.HazeMedian = segments[14];
|
||||
waferSummaryInfo.HazeStdDev = segments[15];
|
||||
waferSummaryInfo.Bin1 = segments[16];
|
||||
waferSummaryInfo.Bin2 = segments[17];
|
||||
waferSummaryInfo.Bin3 = segments[18];
|
||||
waferSummaryInfo.Bin4 = segments[19];
|
||||
waferSummaryInfo.Bin5 = segments[20];
|
||||
waferSummaryInfo.Bin6 = segments[21];
|
||||
waferSummaryInfo.Bin7 = segments[22];
|
||||
waferSummaryInfo.Bin8 = segments[23];
|
||||
}
|
||||
if (waferSummaryInfo.WaferID == "-1")
|
||||
{
|
||||
segments = waferSummaryInfo.SrcDest.Split('-')[0].Split('/');
|
||||
waferSummaryInfo.WaferID = segments[segments.Length - 1];
|
||||
}
|
||||
waferSummaryInfos.Add(waferSummaryInfo);
|
||||
}
|
||||
}
|
||||
|
||||
private HeaderFile ParseHeader(ILogic logic, List<WaferSummaryInfo> dcnTotals, List<WaferSummaryInfo> dwnTotals, List<WaferSummaryInfo> dnnTotals)
|
||||
{
|
||||
HeaderFile result = new HeaderFile { JobID = logic.Logistics.JobID, MesEntity = logic.Logistics.MesEntity, Date = DateTime.Now.ToString() };
|
||||
_I = 0;
|
||||
_Data = string.Empty;
|
||||
string h = string.Empty;
|
||||
string summaryReportText = File.ReadAllText(logic.Logistics.ReportFullPath);
|
||||
if (!string.IsNullOrEmpty(summaryReportText))
|
||||
{
|
||||
_Log.Debug("HeaderFile() - Beginning");
|
||||
_I = 0;
|
||||
_Data = summaryReportText;
|
||||
ScanPast("Long Wafer Summary");
|
||||
GetToEOL();
|
||||
ScanPast("Session:");
|
||||
string toEOL = GetToEOL(true);
|
||||
string str = toEOL;
|
||||
result.Recipe = toEOL;
|
||||
result.Session = str;
|
||||
ScanPast("Lot ID:");
|
||||
result.Lot = GetToEOL(true);
|
||||
// Remove illegal characters \/:*?"<>| found in the Lot.
|
||||
result.Lot = Regex.Replace(result.Lot, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
|
||||
string[] segments = result.Lot.Split(new char[] { '-' });
|
||||
_Log.Debug("HeaderFile() - Debug A");
|
||||
if (segments.Length > 1)
|
||||
{
|
||||
result.Reactor = segments[0];
|
||||
result.RDS = segments[1];
|
||||
if (segments.Length > 2)
|
||||
{
|
||||
result.PSN = segments[2];
|
||||
if (segments.Length > 3)
|
||||
result.Operator = segments[3];
|
||||
}
|
||||
}
|
||||
_Log.Debug("HeaderFile() - Debug B");
|
||||
_I = 0;
|
||||
_Data = summaryReportText;
|
||||
GetWaferSummaryInfo(dcnTotals, "DCN Totals");
|
||||
ScanPast("Min");
|
||||
segments = GetToEOL().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
result.DcnAllMin = segments[0];
|
||||
result.DcnLpdMin = segments[1];
|
||||
result.DcnLpdNMin = segments[2];
|
||||
result.DcnLpdESMin = segments[3];
|
||||
result.DcnMicroScrMin = segments[4];
|
||||
result.DcnScrMin = segments[5];
|
||||
result.DcnSlipMin = segments[6];
|
||||
result.DcnAreaCountMin = segments[7];
|
||||
result.DcnAreaMin = segments[8];
|
||||
result.DcnHazeAvgMin = segments[9];
|
||||
result.DcnHazeMedianMin = segments[10];
|
||||
result.DcnHazeStdDevMin = segments[11];
|
||||
result.DcnBin1Min = segments[12];
|
||||
result.DcnBin2Min = segments[13];
|
||||
result.DcnBin3Min = segments[14];
|
||||
result.DcnBin4Min = segments[15];
|
||||
result.DcnBin5Min = segments[16];
|
||||
result.DcnBin6Min = segments[17];
|
||||
result.DcnBin7Min = segments[18];
|
||||
result.DcnBin8Min = segments[19];
|
||||
ScanPast("Max");
|
||||
segments = GetToEOL().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
result.DcnAllMax = segments[0];
|
||||
result.DcnLpdMax = segments[1];
|
||||
result.DcnLpdNMax = segments[2];
|
||||
result.DcnLpdESMax = segments[3];
|
||||
result.DcnMicroScrMax = segments[4];
|
||||
result.DcnScrMax = segments[5];
|
||||
result.DcnSlipMax = segments[6];
|
||||
result.DcnAreaCountMax = segments[7];
|
||||
result.DcnAreaMax = segments[8];
|
||||
result.DcnHazeAvgMax = segments[9];
|
||||
result.DcnHazeMedianMax = segments[10];
|
||||
result.DcnHazeStdDevMax = segments[11];
|
||||
result.DcnBin1Max = segments[12];
|
||||
result.DcnBin2Max = segments[13];
|
||||
result.DcnBin3Max = segments[14];
|
||||
result.DcnBin4Max = segments[15];
|
||||
result.DcnBin5Max = segments[16];
|
||||
result.DcnBin6Max = segments[17];
|
||||
result.DcnBin7Max = segments[18];
|
||||
result.DcnBin8Max = segments[19];
|
||||
ScanPast("Mean");
|
||||
segments = GetToEOL().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
result.DcnAllMean = segments[0];
|
||||
result.DcnLpdMean = segments[1];
|
||||
result.DcnLpdNMean = segments[2];
|
||||
result.DcnLpdESMean = segments[3];
|
||||
result.DcnMicroScrMean = segments[4];
|
||||
result.DcnScrMean = segments[5];
|
||||
result.DcnSlipMean = segments[6];
|
||||
result.DcnAreaCountMean = segments[7];
|
||||
result.DcnAreaMean = segments[8];
|
||||
result.DcnHazeAvgMean = segments[9];
|
||||
result.DcnHazeMedianMean = segments[10];
|
||||
result.DcnHazeStdDevMean = segments[11];
|
||||
result.DcnBin1Mean = segments[12];
|
||||
result.DcnBin2Mean = segments[13];
|
||||
result.DcnBin3Mean = segments[14];
|
||||
result.DcnBin4Mean = segments[15];
|
||||
result.DcnBin5Mean = segments[16];
|
||||
result.DcnBin6Mean = segments[17];
|
||||
result.DcnBin7Mean = segments[18];
|
||||
result.DcnBin8Mean = segments[19];
|
||||
ScanPast("Std. Dev.");
|
||||
segments = GetToEOL().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
result.DcnAllStdDev = segments[0];
|
||||
result.DcnLpdStdDev = segments[1];
|
||||
result.DcnLpdNStdDev = segments[2];
|
||||
result.DcnLpdESStdDev = segments[3];
|
||||
result.DcnMicroScrStdDev = segments[4];
|
||||
result.DcnScrStdDev = segments[5];
|
||||
result.DcnSlipStdDev = segments[6];
|
||||
result.DcnAreaCountStdDev = segments[7];
|
||||
result.DcnAreaStdDev = segments[8];
|
||||
result.DcnHazeAvgStdDev = segments[9];
|
||||
result.DcnHazeMedianStdDev = segments[10];
|
||||
result.DcnHazeStdDevStdDev = segments[11];
|
||||
result.DcnBin1StdDev = segments[12];
|
||||
result.DcnBin2StdDev = segments[13];
|
||||
result.DcnBin3StdDev = segments[14];
|
||||
result.DcnBin4StdDev = segments[15];
|
||||
result.DcnBin5StdDev = segments[16];
|
||||
result.DcnBin6StdDev = segments[17];
|
||||
result.DcnBin7StdDev = segments[18];
|
||||
result.DcnBin8StdDev = segments[19];
|
||||
_I = 0;
|
||||
_Data = summaryReportText;
|
||||
_Log.Debug("HeaderFile() - Debug C");
|
||||
if (!_Data.Contains("DWN Totals"))
|
||||
{
|
||||
foreach (WaferSummaryInfo dcnTotal in dcnTotals)
|
||||
dwnTotals.Add(new WaferSummaryInfo());
|
||||
}
|
||||
else
|
||||
{
|
||||
GetWaferSummaryInfo(dwnTotals, "DWN Totals");
|
||||
ScanPast("Min");
|
||||
segments = GetToEOL().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
result.DwnAllMin = segments[0];
|
||||
result.DwnLpdMin = segments[1];
|
||||
result.DwnLpdNMin = segments[2];
|
||||
result.DwnLpdESMin = segments[3];
|
||||
result.DwnMicroScrMin = segments[4];
|
||||
result.DwnScrMin = segments[5];
|
||||
result.DwnSlipMin = segments[6];
|
||||
result.DwnAreaCountMin = segments[7];
|
||||
result.DwnAreaMin = segments[8];
|
||||
result.DwnHazeAvgMin = segments[9];
|
||||
result.DwnHazeMedianMin = segments[10];
|
||||
result.DwnHazeStdDevMin = segments[11];
|
||||
result.DwnBin1Min = segments[12];
|
||||
result.DwnBin2Min = segments[13];
|
||||
result.DwnBin3Min = segments[14];
|
||||
result.DwnBin4Min = segments[15];
|
||||
result.DwnBin5Min = segments[16];
|
||||
result.DwnBin6Min = segments[17];
|
||||
result.DwnBin7Min = segments[18];
|
||||
result.DwnBin8Min = segments[19];
|
||||
ScanPast("Max");
|
||||
segments = GetToEOL().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
result.DwnAllMax = segments[0];
|
||||
result.DwnLpdMax = segments[1];
|
||||
result.DwnLpdNMax = segments[2];
|
||||
result.DwnLpdESMax = segments[3];
|
||||
result.DwnMicroScrMax = segments[4];
|
||||
result.DwnScrMax = segments[5];
|
||||
result.DwnSlipMax = segments[6];
|
||||
result.DwnAreaCountMax = segments[7];
|
||||
result.DwnAreaMax = segments[8];
|
||||
result.DwnHazeAvgMax = segments[9];
|
||||
result.DwnHazeMedianMax = segments[10];
|
||||
result.DwnHazeStdDevMax = segments[11];
|
||||
result.DwnBin1Max = segments[12];
|
||||
result.DwnBin2Max = segments[13];
|
||||
result.DwnBin3Max = segments[14];
|
||||
result.DwnBin4Max = segments[15];
|
||||
result.DwnBin5Max = segments[16];
|
||||
result.DwnBin6Max = segments[17];
|
||||
result.DwnBin7Max = segments[18];
|
||||
result.DwnBin8Max = segments[19];
|
||||
ScanPast("Mean");
|
||||
segments = GetToEOL().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
result.DwnAllMean = segments[0];
|
||||
result.DwnLpdMean = segments[1];
|
||||
result.DwnLpdNMean = segments[2];
|
||||
result.DwnLpdESMean = segments[3];
|
||||
result.DwnMicroScrMean = segments[4];
|
||||
result.DwnScrMean = segments[5];
|
||||
result.DwnSlipMean = segments[6];
|
||||
result.DwnAreaCountMean = segments[7];
|
||||
result.DwnAreaMean = segments[8];
|
||||
result.DwnHazeAvgMean = segments[9];
|
||||
result.DwnHazeMedianMean = segments[10];
|
||||
result.DwnHazeStdDevMean = segments[11];
|
||||
result.DwnBin1Mean = segments[12];
|
||||
result.DwnBin2Mean = segments[13];
|
||||
result.DwnBin3Mean = segments[14];
|
||||
result.DwnBin4Mean = segments[15];
|
||||
result.DwnBin5Mean = segments[16];
|
||||
result.DwnBin6Mean = segments[17];
|
||||
result.DwnBin7Mean = segments[18];
|
||||
result.DwnBin8Mean = segments[19];
|
||||
ScanPast("Std. Dev.");
|
||||
segments = GetToEOL().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
result.DwnAllStdDev = segments[0];
|
||||
result.DwnLpdStdDev = segments[1];
|
||||
result.DwnLpdNStdDev = segments[2];
|
||||
result.DwnLpdESStdDev = segments[3];
|
||||
result.DwnMicroScrStdDev = segments[4];
|
||||
result.DwnScrStdDev = segments[5];
|
||||
result.DwnSlipStdDev = segments[6];
|
||||
result.DwnAreaCountStdDev = segments[7];
|
||||
result.DwnAreaStdDev = segments[8];
|
||||
result.DwnHazeAvgStdDev = segments[9];
|
||||
result.DwnHazeMedianStdDev = segments[10];
|
||||
result.DwnHazeStdDevStdDev = segments[11];
|
||||
result.DwnBin1StdDev = segments[12];
|
||||
result.DwnBin2StdDev = segments[13];
|
||||
result.DwnBin3StdDev = segments[14];
|
||||
result.DwnBin4StdDev = segments[15];
|
||||
result.DwnBin5StdDev = segments[16];
|
||||
result.DwnBin6StdDev = segments[17];
|
||||
result.DwnBin7StdDev = segments[18];
|
||||
result.DwnBin8StdDev = segments[19];
|
||||
}
|
||||
_I = 0;
|
||||
_Data = summaryReportText;
|
||||
_Log.Debug("HeaderFile() - Debug D");
|
||||
if (!_Data.Contains("DNN Totals"))
|
||||
{
|
||||
foreach (WaferSummaryInfo waferSummaryInfo in dcnTotals)
|
||||
dnnTotals.Add(new WaferSummaryInfo());
|
||||
}
|
||||
else
|
||||
{
|
||||
GetWaferSummaryInfo(dnnTotals, "DNN Totals");
|
||||
ScanPast("Min");
|
||||
segments = GetToEOL().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
result.DnnAllMin = segments[0];
|
||||
result.DnnLpdMin = segments[1];
|
||||
result.DnnLpdNMin = segments[2];
|
||||
result.DnnLpdESMin = segments[3];
|
||||
result.DnnMicroScrMin = segments[4];
|
||||
result.DnnScrMin = segments[5];
|
||||
result.DnnSlipMin = segments[6];
|
||||
result.DnnAreaCountMin = segments[7];
|
||||
result.DnnAreaMin = segments[8];
|
||||
result.DnnHazeAvgMin = segments[9];
|
||||
result.DnnHazeMedianMin = segments[10];
|
||||
result.DnnHazeStdDevMin = segments[11];
|
||||
result.DnnBin1Min = segments[12];
|
||||
result.DnnBin2Min = segments[13];
|
||||
result.DnnBin3Min = segments[14];
|
||||
result.DnnBin4Min = segments[15];
|
||||
result.DnnBin5Min = segments[16];
|
||||
result.DnnBin6Min = segments[17];
|
||||
result.DnnBin7Min = segments[18];
|
||||
result.DnnBin8Min = segments[19];
|
||||
ScanPast("Max");
|
||||
segments = GetToEOL().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
result.DnnAllMax = segments[0];
|
||||
result.DnnLpdMax = segments[1];
|
||||
result.DnnLpdNMax = segments[2];
|
||||
result.DnnLpdESMax = segments[3];
|
||||
result.DnnMicroScrMax = segments[4];
|
||||
result.DnnScrMax = segments[5];
|
||||
result.DnnSlipMax = segments[6];
|
||||
result.DnnAreaCountMax = segments[7];
|
||||
result.DnnAreaMax = segments[8];
|
||||
result.DnnHazeAvgMax = segments[9];
|
||||
result.DnnHazeMedianMax = segments[10];
|
||||
result.DnnHazeStdDevMax = segments[11];
|
||||
result.DnnBin1Max = segments[12];
|
||||
result.DnnBin2Max = segments[13];
|
||||
result.DnnBin3Max = segments[14];
|
||||
result.DnnBin4Max = segments[15];
|
||||
result.DnnBin5Max = segments[16];
|
||||
result.DnnBin6Max = segments[17];
|
||||
result.DnnBin7Max = segments[18];
|
||||
result.DnnBin8Max = segments[19];
|
||||
ScanPast("Mean");
|
||||
segments = GetToEOL().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
result.DnnAllMean = segments[0];
|
||||
result.DnnLpdMean = segments[1];
|
||||
result.DnnLpdNMean = segments[2];
|
||||
result.DnnLpdESMean = segments[3];
|
||||
result.DnnMicroScrMean = segments[4];
|
||||
result.DnnScrMean = segments[5];
|
||||
result.DnnSlipMean = segments[6];
|
||||
result.DnnAreaCountMean = segments[7];
|
||||
result.DnnAreaMean = segments[8];
|
||||
result.DnnHazeAvgMean = segments[9];
|
||||
result.DnnHazeMedianMean = segments[10];
|
||||
result.DnnHazeStdDevMean = segments[11];
|
||||
result.DnnBin1Mean = segments[12];
|
||||
result.DnnBin2Mean = segments[13];
|
||||
result.DnnBin3Mean = segments[14];
|
||||
result.DnnBin4Mean = segments[15];
|
||||
result.DnnBin5Mean = segments[16];
|
||||
result.DnnBin6Mean = segments[17];
|
||||
result.DnnBin7Mean = segments[18];
|
||||
result.DnnBin8Mean = segments[19];
|
||||
ScanPast("Std. Dev.");
|
||||
segments = GetToEOL().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
result.DnnAllStdDev = segments[0];
|
||||
result.DnnLpdStdDev = segments[1];
|
||||
result.DnnLpdNStdDev = segments[2];
|
||||
result.DnnLpdESStdDev = segments[3];
|
||||
result.DnnMicroScrStdDev = segments[4];
|
||||
result.DnnScrStdDev = segments[5];
|
||||
result.DnnSlipStdDev = segments[6];
|
||||
result.DnnAreaCountStdDev = segments[7];
|
||||
result.DnnAreaStdDev = segments[8];
|
||||
result.DnnHazeAvgStdDev = segments[9];
|
||||
result.DnnHazeMedianStdDev = segments[10];
|
||||
result.DnnHazeStdDevStdDev = segments[11];
|
||||
result.DnnBin1StdDev = segments[12];
|
||||
result.DnnBin2StdDev = segments[13];
|
||||
result.DnnBin3StdDev = segments[14];
|
||||
result.DnnBin4StdDev = segments[15];
|
||||
result.DnnBin5StdDev = segments[16];
|
||||
result.DnnBin6StdDev = segments[17];
|
||||
result.DnnBin7StdDev = segments[18];
|
||||
result.DnnBin8StdDev = segments[19];
|
||||
}
|
||||
}
|
||||
//result.UniqueID = string.Format("{0}_{1}_Summary_{2}", logic.Logistics.JobID, result.Lot, result.Date);
|
||||
result.UniqueID = string.Format("{0}_{1}_{2}", logic.Logistics.JobID, result.Lot, Path.GetFileNameWithoutExtension(logic.Logistics.ReportFullPath));
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parse the wafer summary data
|
||||
/// </summary>
|
||||
/// <param name="headerFile">wafer data</param>
|
||||
/// <param name="i">wafer index</param>
|
||||
/// <returns></returns>
|
||||
private DataFile ParseWaferSummary(HeaderFile headerFile, int i, List<WaferSummaryInfo> dcnTotals, List<WaferSummaryInfo> dwnTotals, List<WaferSummaryInfo> dnnTotals)
|
||||
{
|
||||
DataFile result = new DataFile()
|
||||
{
|
||||
// NOTE: get the UniqueID during DataCalculation in order to retrieve the SPCToolID from the cell component Tag field.
|
||||
// id
|
||||
//runData.UniqueID = string.Format("{0}_{1}", sp1Header.UniqueId, i + 1);
|
||||
//runData.HeaderUniqueID = sp1Header.UniqueId;
|
||||
|
||||
// General Wafer Info
|
||||
Side = dcnTotals[i].Side,
|
||||
WaferID = dcnTotals[i].WaferID,
|
||||
Grade = dcnTotals[i].Grade,
|
||||
SrcDest = dcnTotals[i].SrcDest,
|
||||
|
||||
// Dcn Info
|
||||
DcnAll = dcnTotals[i].All ?? string.Empty,
|
||||
DcnLpd = dcnTotals[i].Lpd ?? string.Empty,
|
||||
DcnLpdN = dcnTotals[i].LpdN ?? string.Empty,
|
||||
DcnLpdES = dcnTotals[i].LpdES ?? string.Empty,
|
||||
DcnMicroScr = dcnTotals[i].MicroScr ?? string.Empty,
|
||||
DcnScr = dcnTotals[i].Scr ?? string.Empty,
|
||||
DcnSlip = dcnTotals[i].Slip ?? string.Empty,
|
||||
DcnAreaCount = dcnTotals[i].AreaNum ?? string.Empty,
|
||||
DcnArea = dcnTotals[i].Area ?? string.Empty,
|
||||
DcnHazeAvg = dcnTotals[i].HazeAvg ?? string.Empty,
|
||||
DcnHazeMedian = dcnTotals[i].HazeMedian ?? string.Empty,
|
||||
DcnHazeStdDev = dcnTotals[i].HazeStdDev ?? string.Empty,
|
||||
DcnBin1 = dcnTotals[i].Bin1 ?? string.Empty,
|
||||
DcnBin2 = dcnTotals[i].Bin2 ?? string.Empty,
|
||||
DcnBin3 = dcnTotals[i].Bin3 ?? string.Empty,
|
||||
DcnBin4 = dcnTotals[i].Bin4 ?? string.Empty,
|
||||
DcnBin5 = dcnTotals[i].Bin5 ?? string.Empty,
|
||||
DcnBin6 = dcnTotals[i].Bin6 ?? string.Empty,
|
||||
DcnBin7 = dcnTotals[i].Bin7 ?? string.Empty,
|
||||
DcnBin8 = dcnTotals[i].Bin8 ?? string.Empty,
|
||||
|
||||
// Dwn Info
|
||||
DwnAll = dwnTotals[i].All ?? string.Empty,
|
||||
DwnLpd = dwnTotals[i].Lpd ?? string.Empty,
|
||||
DwnLpdN = dwnTotals[i].LpdN ?? string.Empty,
|
||||
DwnLpdES = dwnTotals[i].LpdES ?? string.Empty,
|
||||
DwnMicroScr = dwnTotals[i].MicroScr ?? string.Empty,
|
||||
DwnScr = dwnTotals[i].Scr ?? string.Empty,
|
||||
DwnSlip = dwnTotals[i].Slip ?? string.Empty,
|
||||
DwnAreaCount = dwnTotals[i].AreaNum ?? string.Empty,
|
||||
DwnArea = dwnTotals[i].Area ?? string.Empty,
|
||||
DwnHazeAvg = dwnTotals[i].HazeAvg ?? string.Empty,
|
||||
DwnHazeMedian = dwnTotals[i].HazeMedian ?? string.Empty,
|
||||
DwnHazeStdDev = dwnTotals[i].HazeStdDev ?? string.Empty,
|
||||
DwnBin1 = dwnTotals[i].Bin1 ?? string.Empty,
|
||||
DwnBin2 = dwnTotals[i].Bin2 ?? string.Empty,
|
||||
DwnBin3 = dwnTotals[i].Bin3 ?? string.Empty,
|
||||
DwnBin4 = dwnTotals[i].Bin4 ?? string.Empty,
|
||||
DwnBin5 = dwnTotals[i].Bin5 ?? string.Empty,
|
||||
DwnBin6 = dwnTotals[i].Bin6 ?? string.Empty,
|
||||
DwnBin7 = dwnTotals[i].Bin7 ?? string.Empty,
|
||||
DwnBin8 = dwnTotals[i].Bin8 ?? string.Empty,
|
||||
|
||||
// Dnn Info
|
||||
DnnAll = dnnTotals[i].All ?? string.Empty,
|
||||
DnnLpd = dnnTotals[i].Lpd ?? string.Empty,
|
||||
DnnLpdN = dnnTotals[i].LpdN ?? string.Empty,
|
||||
DnnLpdES = dnnTotals[i].LpdES ?? string.Empty,
|
||||
DnnMicroScr = dnnTotals[i].MicroScr ?? string.Empty,
|
||||
DnnScr = dnnTotals[i].Scr ?? string.Empty,
|
||||
DnnSlip = dnnTotals[i].Slip ?? string.Empty,
|
||||
DnnAreaCount = dnnTotals[i].AreaNum ?? string.Empty,
|
||||
DnnArea = dnnTotals[i].Area ?? string.Empty,
|
||||
DnnHazeAvg = dnnTotals[i].HazeAvg ?? string.Empty,
|
||||
DnnHazeMedian = dnnTotals[i].HazeMedian ?? string.Empty,
|
||||
DnnHazeStdDev = dnnTotals[i].HazeStdDev ?? string.Empty,
|
||||
DnnBin1 = dnnTotals[i].Bin1 ?? string.Empty,
|
||||
DnnBin2 = dnnTotals[i].Bin2 ?? string.Empty,
|
||||
DnnBin3 = dnnTotals[i].Bin3 ?? string.Empty,
|
||||
DnnBin4 = dnnTotals[i].Bin4 ?? string.Empty,
|
||||
DnnBin5 = dnnTotals[i].Bin5 ?? string.Empty,
|
||||
DnnBin6 = dnnTotals[i].Bin6 ?? string.Empty,
|
||||
DnnBin7 = dnnTotals[i].Bin7 ?? string.Empty,
|
||||
DnnBin8 = dnnTotals[i].Bin8 ?? string.Empty
|
||||
};
|
||||
//result.HeaderUniqueID = string.Concat(headerFile.MesEntity, "_", headerFile.Lot, "_Summary_", headerFile.Date);
|
||||
result.HeaderUniqueID = headerFile.UniqueID;
|
||||
result.UniqueID = string.Concat(result.HeaderUniqueID, "_", result.WaferID.PadLeft(2, '0'));
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert the raw data file to parsable file format - in this case from PRN to PDF
|
||||
/// </summary>
|
||||
/// <param name="sourceFile">source file to be converted to PDF</param>
|
||||
/// <returns></returns>
|
||||
private static string ConvertSourceFileToPdf(ConfigData configData, string sourceFile)
|
||||
{
|
||||
string result = Path.ChangeExtension(sourceFile, ".pdf");
|
||||
if (!File.Exists(result))
|
||||
{
|
||||
//string arguments = string.Concat("-i \"", sourceFile, "\" -o \"", result, "\"");
|
||||
string arguments = string.Concat("-dSAFER -dBATCH -dNOPAUSE -sOutputFile=\"", result, "\" -sDEVICE=pdfwrite \"", sourceFile, "\"");
|
||||
//Process process = Process.Start(configData.LincPDFCFileName, arguments);
|
||||
Process process = Process.Start(configData.GhostPCLFileName, arguments);
|
||||
process.WaitForExit(30000);
|
||||
if (!File.Exists(result))
|
||||
throw new Exception("PDF file wasn't created");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private Tuple<HeaderFile, List<DataFile>> Parse(ILogic logic, List<FileInfo> fileInfoCollection)
|
||||
{
|
||||
Tuple<HeaderFile, List<DataFile>> result;
|
||||
DataFile dataFile;
|
||||
HeaderFile headerFile;
|
||||
foreach (string file in Directory.GetFiles(Path.GetDirectoryName(logic.Logistics.ReportFullPath), "WaferMap*.prn", SearchOption.TopDirectoryOnly))
|
||||
fileInfoCollection.Add(new FileInfo(file));
|
||||
List<WaferSummaryInfo> dcnTotals = new List<WaferSummaryInfo>();
|
||||
List<WaferSummaryInfo> dwnTotals = new List<WaferSummaryInfo>();
|
||||
List<WaferSummaryInfo> dnnTotals = new List<WaferSummaryInfo>();
|
||||
headerFile = ParseHeader(logic, dcnTotals, dwnTotals, dnnTotals);
|
||||
List<DataFile> details = new List<DataFile>();
|
||||
_Log.Debug($"Number of wafers: {dcnTotals.Count}");
|
||||
for (int i = 0; i < dcnTotals.Count; i++)
|
||||
{
|
||||
_Log.Debug($"****ParseData - Parsing wafer summary: {i}");
|
||||
dataFile = ParseWaferSummary(headerFile, i, dcnTotals, dwnTotals, dnnTotals);
|
||||
details.Add(dataFile);
|
||||
}
|
||||
fileInfoCollection.Add(new FileInfo(logic.Logistics.ReportFullPath));
|
||||
result = new Tuple<HeaderFile, List<DataFile>>(headerFile, details);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user