MET08THFTIRQS408M - v2.39.0 - DevOps Dummy Update references

This commit is contained in:
Mike Phares 2022-03-02 09:10:37 -07:00
parent d3099dddd9
commit ad688483ed
20 changed files with 35 additions and 1176 deletions

View File

@ -220,61 +220,47 @@ public class FileRead : Shared.FileRead, IFileRead
{
try
{
string pathSegment;
string monARessource;
string sourceParentDirectory;
string targetParentDirectory;
DateTime dateTime = DateTime.Now;
if (!_FileConnectorConfiguration.TargetFileLocation.Contains(_FileConnectorConfiguration.SourceFileLocation))
throw new Exception("Target must start with source");
if (!string.IsNullOrEmpty(Path.GetFileName(_FileConnectorConfiguration.SourceFileLocation)))
sourceParentDirectory = Path.GetDirectoryName(_FileConnectorConfiguration.SourceFileLocation);
else
sourceParentDirectory = Path.GetDirectoryName(Path.GetDirectoryName(_FileConnectorConfiguration.SourceFileLocation));
if (!string.IsNullOrEmpty(Path.GetFileName(_FileConnectorConfiguration.TargetFileLocation)))
targetParentDirectory = Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation);
else
targetParentDirectory = Path.GetDirectoryName(Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation));
if (sourceParentDirectory != targetParentDirectory)
throw new Exception("Target and source must have the same parent for Si Dummy FileConnectorConfiguration!");
bool check = dateTime.Hour > 7 && dateTime.Hour < 18 && dateTime.DayOfWeek != DayOfWeek.Sunday && dateTime.DayOfWeek != DayOfWeek.Saturday;
if (!_IsEAFHosted || check)
{
string checkSegment;
string checkDirectory;
string monARessource;
string sourceFileFilter;
string sourceArchiveFile;
string sourceFileLocation;
string weekOfYear = _Calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
string traceDummyDirectory = Path.Combine(Path.GetPathRoot(_TracePath), "TracesDummy", _CellInstanceName, "Source", $"{dateTime:yyyy}___Week_{weekOfYear}");
if (!Directory.Exists(traceDummyDirectory))
_ = Directory.CreateDirectory(traceDummyDirectory);
string traceDummyFile = Path.Combine(traceDummyDirectory, $"{dateTime.Ticks} - {_CellInstanceName}.txt");
File.AppendAllText(traceDummyFile, string.Empty);
if (_FileConnectorConfiguration.SourceFileLocation.EndsWith("\\"))
sourceFileLocation = _FileConnectorConfiguration.SourceFileLocation;
else
sourceFileLocation = string.Concat(_FileConnectorConfiguration.SourceFileLocation, '\\');
for (int i = 0; i < _FileConnectorConfiguration.SourceFileFilters.Count; i++)
{
_LastDummyRunIndex += 1;
if (_LastDummyRunIndex >= _FileConnectorConfiguration.SourceFileFilters.Count)
_LastDummyRunIndex = 0;
sourceFileFilter = _FileConnectorConfiguration.SourceFileFilters[_LastDummyRunIndex];
sourceArchiveFile = Path.GetFullPath(string.Concat(sourceFileLocation, sourceFileFilter));
sourceArchiveFile = Path.Combine(_FileConnectorConfiguration.SourceFileLocation, sourceFileFilter);
if (File.Exists(sourceArchiveFile))
{
checkSegment = _FileConnectorConfiguration.TargetFileLocation.Substring(sourceFileLocation.Length);
checkDirectory = Path.GetDirectoryName(sourceArchiveFile);
for (int z = 0; z < int.MaxValue; z++)
{
if (checkDirectory.Length < sourceFileLocation.Length || !checkDirectory.StartsWith(sourceFileLocation))
break;
checkDirectory = Path.GetDirectoryName(checkDirectory);
if (Directory.Exists(Path.Combine(checkDirectory, checkSegment)))
{
checkDirectory = Path.Combine(checkDirectory, checkSegment);
break;
}
}
if (!checkDirectory.EndsWith(checkSegment))
throw new Exception("Could not determine dummy target directory for extract!");
if (!long.TryParse(Path.GetFileNameWithoutExtension(sourceArchiveFile).Replace("x", string.Empty), out long sequence))
throw new Exception("Invalid file name for source archive file!");
pathSegment = checkDirectory.Substring(sourceFileLocation.Length);
monARessource = GetCellName(pathSegment);
monARessource = GetCellName(sourceArchiveFile);
if (string.IsNullOrEmpty(monARessource))
throw new Exception("Could not determine which cell archive file is associated with!");
if (_IsEAFHosted)
CallbackFileExists(sourceArchiveFile, traceDummyFile, checkDirectory, monARessource, sequence);
CallbackFileExists(sourceArchiveFile, traceDummyFile, _FileConnectorConfiguration.TargetFileLocation, monARessource, sequence);
break;
}
}

View File

@ -287,123 +287,4 @@ public class FileRead : Shared.FileRead, IFileRead
return results;
}
private void CallbackIsDummy(string traceDummyFile, List<Tuple<string, string, string, string, int>> tuples, bool fileConnectorConfigurationIncludeSubDirectories, bool includeSubDirectoriesExtra)
{}
private void Callback(object state)
{
if (!_IsDummy)
throw new Exception();
try
{
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 inProcessDirectory;
string weekOfYear = _Calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
string traceDummyDirectory = string.Concat(Path.GetPathRoot(_TracePath), @"\TracesDummy\", _CellInstanceName, @"\Source\", dateTime.ToString("yyyy"), "___Week_", weekOfYear);
if (!Directory.Exists(traceDummyDirectory))
_ = Directory.CreateDirectory(traceDummyDirectory);
string traceDummyFile = string.Concat(traceDummyDirectory, @"\", dateTime.Ticks, " - ", _CellInstanceName, ".txt");
File.AppendAllText(traceDummyFile, string.Empty);
List<Tuple<string, string, string, string, int>> tuples = new();
string progressDirectory = Path.GetFullPath(string.Concat(_FileConnectorConfiguration.SourceFileLocation, @"\_ Progress"));
if (progressDirectory != _ProgressPath || !Directory.Exists(progressDirectory))
throw new Exception("Invalid progress path");
foreach (KeyValuePair<string, string> 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));
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, sourceFileFilter, sourceFileLocation, 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;
string sourceFileFilter = tuples[_LastDummyRunIndex].Item2;
sourceFileLocation = 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(progressDirectory, @"\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 = sourceFileLocation;
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);
CallbackIsDummy(traceDummyFile, tuples, fileConnectorConfigurationIncludeSubDirectories: true, includeSubDirectoriesExtra: true);
}
}
catch (Exception exception)
{
string subject = string.Concat("Exception:", _CellInstanceConnectionName);
string body = string.Concat(exception.Message, Environment.NewLine, Environment.NewLine, exception.StackTrace);
try
{ _SMTP.SendHighPriorityEmailMessage(subject, body); }
catch (Exception) { }
}
try
{
TimeSpan timeSpan = new(DateTime.Now.AddSeconds(_FileConnectorConfiguration.FileScanningIntervalInSeconds.Value).Ticks - DateTime.Now.Ticks);
_ = _Timer.Change((long)timeSpan.TotalMilliseconds, Timeout.Infinite);
}
catch (Exception exception)
{
string subject = string.Concat("Exception:", _CellInstanceConnectionName);
string body = string.Concat(exception.Message, Environment.NewLine, Environment.NewLine, exception.StackTrace);
try
{ _SMTP.SendHighPriorityEmailMessage(subject, body); }
catch (Exception) { }
}
}
}

View File

@ -400,7 +400,7 @@ public partial class ProcessData : IProcessData
Wafer = waferFixed.ToString();
//create filename / unique id
UniqueId = string.Concat(Title, "_", Wafer, "_", logistics.DateTimeFromSequence.ToString("yyyyMMddHHmmssffff"));
UniqueId = string.Concat(Title, '_', Wafer, '_', logistics.DateTimeFromSequence.ToString("yyyyMMddHHmmssffff"), '_', logistics.TotalSecondsSinceLastWriteTimeFromSequence);
foreach (Detail detail in details)
{
detail.HeaderUniqueId = UniqueId;

View File

@ -113,9 +113,9 @@ public class FileRead : Shared.FileRead, IFileRead
{
if (dateTime == DateTime.MinValue)
{ }
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>());
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>());
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
SetFileParameterLotIDToLogisticsMID();
return results;
}

View File

@ -1 +0,0 @@


View File

@ -1,514 +0,0 @@
//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.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 OriginalDataBioRad { 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;
// OriginalDataBioRad = "OriginalDataBioRad_";
// 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);
// }
// 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.BioRadQS408M)
// {
// 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;
// }
// }
//}

View File

@ -1 +0,0 @@


View File

@ -1 +0,0 @@


View File

@ -1 +0,0 @@


View File

@ -1,442 +0,0 @@
//using Adaptation.Shared;
//using Adaptation.Shared.Metrology;
//using log4net;
//using System;
//using System.Collections.Generic;
//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 BioRadFile Header { get; private set; }
// public List<BioRadDetail> Details { get; private set; }
// private int _I;
// private readonly ILog _Log;
// private string _Data;
// public ProcessData(ILogic logic, ConfigData configData, List<FileInfo> fileInfoCollection, BioRadFile lastBioRadFile)
// {
// Header = null;
// fileInfoCollection.Clear();
// _I = 0; _Data = string.Empty;
// Details = new List<BioRadDetail>();
// _Log = LogManager.GetLogger(typeof(ProcessData));
// Tuple<BioRadFile, List<BioRadDetail>> tuple = Parse(logic, configData, fileInfoCollection, lastBioRadFile);
// 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.BioRadQS408M);
// 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 string GetLines(ILogic logic, List<FileRead.Description> descriptions)
// {
// char del = '\t';
// StringBuilder results = new StringBuilder();
// FileRead.Description x = descriptions[0];
// results.Append(x.UniqueId).Append(del).
// Append(x.Date).Append(del).
// Append(x.Employee).Append(del).
// Append(x.Recipe).Append(del).
// Append(x.Reactor).Append(del).
// Append(x.RDS).Append(del).
// Append(x.PSN).Append(del).
// Append(x.Layer).Append(del).
// Append(x.Zone).Append(del).
// Append(x.Cassette).Append(del).
// Append(x.Wafer).Append(del).
// Append(x.RVThickness);
// return results.ToString();
// }
// internal static void PostOpenInsightMetrologyViewerAttachments(ILog log, ConfigData configData, Logistics logistics, DateTime dateTime, string logisticsSequenceMemoryDirectory, List<FileRead.Description> descriptions, string matchDirectory)
// {
// }
// private string GetBefore(string text)
// {
// string str;
// string str1;
// int num = _Data.IndexOf(text, _I);
// if (num <= -1)
// {
// str = _Data.Substring(_I);
// _I = _Data.Length;
// str1 = str.Trim();
// }
// else
// {
// str = _Data.Substring(_I, num - _I);
// _I = num + text.Length;
// str1 = str.Trim();
// }
// return str1;
// }
// private string GetBefore(string text, bool trim)
// {
// string str;
// string before;
// if (!trim)
// {
// int num = _Data.IndexOf(text, _I);
// if (num <= -1)
// {
// str = _Data.Substring(_I);
// _I = _Data.Length;
// before = str;
// }
// else
// {
// str = _Data.Substring(_I, num - _I);
// _I = num + text.Length;
// before = str;
// }
// }
// else
// {
// before = GetBefore(text);
// }
// return before;
// }
// private string GetToEOL()
// {
// return GetBefore("\n");
// }
// private string GetToEOL(bool trim)
// {
// string str;
// str = (!trim ? GetBefore("\n", false) : GetToEOL());
// return str;
// }
// private string GetToken()
// {
// while (true)
// {
// if ((_I >= _Data.Length ? true : !IsNullOrWhiteSpace(_Data.Substring(_I, 1))))
// {
// break;
// }
// _I++;
// }
// int num = _I;
// while (true)
// {
// if ((num >= _Data.Length ? true : IsNullOrWhiteSpace(_Data.Substring(num, 1))))
// {
// break;
// }
// num++;
// }
// string str = _Data.Substring(_I, num - _I);
// _I = num;
// return str.Trim();
// }
// private string GetToText(string text)
// {
// string str = _Data.Substring(_I, _Data.IndexOf(text, _I) - _I).Trim();
// return str;
// }
// private bool IsBlankLine()
// {
// int num = _Data.IndexOf("\n", _I);
// return IsNullOrWhiteSpace((num > -1 ? _Data.Substring(_I, num - _I) : _Data.Substring(_I)));
// }
// private bool IsNullOrWhiteSpace(string text)
// {
// bool flag;
// int num = 0;
// while (true)
// {
// if (num >= text.Length)
// {
// flag = true;
// break;
// }
// else if (char.IsWhiteSpace(text[num]))
// {
// num++;
// }
// else
// {
// flag = false;
// break;
// }
// }
// return flag;
// }
// private string PeekNextLine()
// {
// int num = _I;
// string toEOL = GetToEOL();
// _I = num;
// return toEOL;
// }
// private void ScanPast(string text)
// {
// int num = _Data.IndexOf(text, _I);
// if (num <= -1)
// {
// _I = _Data.Length;
// }
// else
// {
// _I = num + text.Length;
// }
// }
// private Tuple<BioRadFile, List<BioRadDetail>> Parse(ILogic logic, ConfigData configData, List<FileInfo> fileInfoCollection, BioRadFile lastBioRadFile)
// {
// Tuple<BioRadFile, List<BioRadDetail>> result;
// BioRadFile bioRadFile = new BioRadFile { JobID = logic.Logistics.JobID, MesEntity = logic.Logistics.MesEntity };
// _I = 0; _Data = string.Empty;
// string h = string.Empty;
// List<BioRadDetail> bioRadDetails = new List<BioRadDetail>();
// string receivedData = File.ReadAllText(logic.Logistics.ReportFullPath);
// _Log.Debug($"****ParseData - Source file contents:");
// _Log.Debug(receivedData);
// string[] files = Directory.GetFiles(Path.GetDirectoryName(logic.Logistics.ReportFullPath), string.Concat(configData.OriginalDataBioRad, logic.Logistics.Sequence, "*"), SearchOption.TopDirectoryOnly);
// foreach (string file in files)
// fileInfoCollection.Add(new FileInfo(file));
// // occasionally there are multiple blocks of results, get the last one as earlier ones may be aborted runs.
// int index = receivedData.LastIndexOf("Bio-Rad");
// if (index > -1)
// receivedData = receivedData.Substring(index);
// _Log.Debug($"****ParseData - Source file contents to be parsed:");
// _Log.Debug(receivedData);
// if (!string.IsNullOrEmpty(receivedData))
// {
// _I = 0; _Data = receivedData;
// bioRadFile.Title = GetBefore("Recipe:");
// bioRadFile.Recipe = GetToken();
// bioRadFile.Date = GetToEOL();
// ScanPast("operator:");
// bioRadFile.Employee = GetBefore("batch:");
// bioRadFile.Batch = GetToEOL();
// // Remove illegal characters \/:*?"<>| found in the Batch
// bioRadFile.Batch = Regex.Replace(bioRadFile.Batch, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
// ScanPast("cassette:");
// bioRadFile.Cassette = GetBefore("wafer:");
// if (string.IsNullOrEmpty(bioRadFile.Batch))
// {
// _I = 0; _Data = receivedData;
// ScanPast("wafer:");
// }
// bioRadFile.Wafer = GetToEOL();
// GetToEOL();
// GetToEOL();
// string token = GetToken();
// int counter = 1;
// while (true)
// {
// if ((string.IsNullOrEmpty(token) ? true : !char.IsDigit(token[0])))
// break;
// BioRadDetail bioRadDetail = new BioRadDetail()
// {
// Position = token,
// Thickness = GetToken(),
// UniqueId = string.Concat("_Point-", counter)
// };
// bioRadDetails.Add(bioRadDetail);
// token = GetToken();
// counter++;
// }
// ScanPast("mean thickness =");
// bioRadFile.MeanThickness = GetBefore(", std. dev =");
// bioRadFile.StdDev = GetToken();
// bioRadFile.PassFail = GetToEOL();
// ScanPast("thickness");
// bioRadFile.RVThickness = GetToEOL();
// }
// if (string.IsNullOrEmpty(bioRadFile.Wafer))
// throw new Exception("Wafer field is missing.");
// //parse out batch and validate
// string[] parsedBatch = bioRadFile.Wafer.Split('-');
// if (parsedBatch.Length >= 1)
// bioRadFile.Reactor = parsedBatch[0];
// if (parsedBatch.Length >= 2)
// bioRadFile.RDS = parsedBatch[1];
// if (parsedBatch.Length >= 3)
// {
// string[] parsedPSN = parsedBatch[2].Split('.');
// if (parsedPSN.Length >= 1)
// bioRadFile.PSN = parsedPSN[0];
// if (parsedPSN.Length >= 2)
// bioRadFile.Layer = parsedPSN[1];
// }
// if (parsedBatch.Length >= 4)
// bioRadFile.Zone = parsedBatch[3];
// bioRadFile.JobID = logic.Logistics.JobID;
// if (logic.Logistics.DateTimeFromSequence > DateTime.Now.AddHours(-24))
// {
// if (string.IsNullOrEmpty(lastBioRadFile.Wafer))
// {
// lastBioRadFile.Batch = bioRadFile.JobID;
// lastBioRadFile.Cassette = bioRadFile.JobID;
// lastBioRadFile.Employee = bioRadFile.JobID;
// lastBioRadFile.Recipe = bioRadFile.JobID;
// lastBioRadFile.Title = bioRadFile.JobID;
// }
// lastBioRadFile.Wafer = bioRadFile.Wafer;
// lastBioRadFile.Reactor = bioRadFile.Reactor;
// lastBioRadFile.RDS = bioRadFile.RDS;
// string check = "--------";
// if (string.IsNullOrEmpty(bioRadFile.Batch) || bioRadFile.Batch.Contains(check))
// bioRadFile.Batch = lastBioRadFile.Batch;
// else
// lastBioRadFile.Batch = bioRadFile.Batch;
// if (string.IsNullOrEmpty(bioRadFile.Cassette) || bioRadFile.Cassette.Contains(check))
// bioRadFile.Cassette = lastBioRadFile.Cassette;
// else
// lastBioRadFile.Cassette = bioRadFile.Cassette;
// if (string.IsNullOrEmpty(bioRadFile.Employee) || bioRadFile.Employee.Contains(check))
// bioRadFile.Employee = lastBioRadFile.Employee;
// else
// lastBioRadFile.Employee = bioRadFile.Employee;
// if (string.IsNullOrEmpty(bioRadFile.Recipe) || bioRadFile.Recipe.Contains(check))
// bioRadFile.Recipe = lastBioRadFile.Recipe;
// else
// lastBioRadFile.Recipe = bioRadFile.Recipe;
// if (string.IsNullOrEmpty(bioRadFile.Title) || bioRadFile.Title.Contains(check))
// bioRadFile.Title = lastBioRadFile.Title;
// else
// lastBioRadFile.Title = bioRadFile.Title;
// }
// //fix title
// StringBuilder titleFixed = new StringBuilder();
// foreach (char c in bioRadFile.Title)
// {
// if (char.IsLetterOrDigit(c) || c == '-' || c == '.')
// titleFixed.Append(c);
// }
// bioRadFile.Title = titleFixed.ToString();
// //fix wafer
// StringBuilder waferFixed = new StringBuilder();
// foreach (char c in bioRadFile.Wafer)
// {
// if (char.IsLetterOrDigit(c) || c == '-' || c == '.')
// waferFixed.Append(c);
// }
// bioRadFile.Wafer = waferFixed.ToString();
// //overwrite incorrect datetime from tool
// bioRadFile.Date = DateTime.Now.ToString(); // defaults to format "G"
// //create filename / unique id
// bioRadFile.UniqueId = string.Concat(bioRadFile.Title, "_", bioRadFile.Wafer, "_", DateTime.Now.ToString("yyyyMMddHHmmssffff"));
// foreach (BioRadDetail detail in bioRadDetails)
// {
// detail.HeaderUniqueId = bioRadFile.UniqueId;
// detail.UniqueId = string.Concat(bioRadFile.UniqueId, detail.UniqueId);
// }
// //trace datatype
// _Log.Debug("BioRad parsed infomation:");
// _Log.Debug(string.Format("Batch: {0}", bioRadFile.Batch));
// _Log.Debug(string.Format("Cassette: {0}", bioRadFile.Cassette));
// _Log.Debug(string.Format("Date: {0}", bioRadFile.Date));
// foreach (BioRadDetail bioRadDetail in bioRadDetails)
// _Log.Debug(string.Format("Details: {0} - {1}", bioRadDetail.Position, bioRadDetail.Thickness));
// _Log.Debug(string.Format("Mean Thickness: {0}", bioRadFile.MeanThickness));
// _Log.Debug(string.Format("Operator: {0}", bioRadFile.Employee));
// _Log.Debug(string.Format("Pass/Fail: {0}", bioRadFile.PassFail));
// _Log.Debug(string.Format("Recipe: {0}", bioRadFile.Recipe));
// _Log.Debug(string.Format("RV Thickness: {0}", bioRadFile.RVThickness));
// _Log.Debug(string.Format("Std Dev: {0}", bioRadFile.StdDev));
// _Log.Debug(string.Format("Title: {0}", bioRadFile.Title));
// _Log.Debug(string.Format("Wafer: {0}", bioRadFile.Wafer));
// fileInfoCollection.Add(new FileInfo(logic.Logistics.ReportFullPath));
// result = new Tuple<BioRadFile, List<BioRadDetail>>(bioRadFile, bioRadDetails);
// return result;
// }
// }
//}

View File

@ -6,6 +6,10 @@
<SccLocalPath>SAK</SccLocalPath>
</PropertyGroup>
<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>10.0</LangVersion>
<Nullable>disable</Nullable>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<TargetFramework>net6.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

View File

@ -58,9 +58,4 @@ public class BIORAD2 : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
}
// dotnet build --runtime win-x64
// dotnet test --runtime win-x64 --no-build --filter "FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_36_3" --% -- TestRunParameters.Parameter(name=\"Debug\", value=\"Debugger.IsAttached\")
// dotnet test --runtime win-x64 --no-build --filter "FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_36_3 & ClassName~BIORAD2" --% -- TestRunParameters.Parameter(name=\"Debug\", value=\"Debugger.IsAttached\")
// dotnet test --runtime win-x64 --no-build --filter "FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_36_3 & ClassName~BIORAD2 & Staging__v2_36_3__BIORAD2__QS408M" --% -- TestRunParameters.Parameter(name=\"Debug\", value=\"Debugger.IsAttached\")
}

View File

@ -58,9 +58,4 @@ public class BIORAD3 : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
}
// dotnet build --runtime win-x64
// dotnet test --runtime win-x64 --no-build --filter "FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_36_3" --% -- TestRunParameters.Parameter(name=\"Debug\", value=\"Debugger.IsAttached\")
// dotnet test --runtime win-x64 --no-build --filter "FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_36_3 & ClassName~BIORAD3" --% -- TestRunParameters.Parameter(name=\"Debug\", value=\"Debugger.IsAttached\")
// dotnet test --runtime win-x64 --no-build --filter "FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_36_3 & ClassName~BIORAD3 & Staging__v2_36_3__BIORAD3__QS408M" --% -- TestRunParameters.Parameter(name=\"Debug\", value=\"Debugger.IsAttached\")
}

View File

@ -138,9 +138,4 @@ public class MET08THFTIRQS408M : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
}
// dotnet build --runtime win-x64
// dotnet test --runtime win-x64 --no-build --filter "FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_36_3" --% -- TestRunParameters.Parameter(name=\"Debug\", value=\"Debugger.IsAttached\")
// dotnet test --runtime win-x64 --no-build --filter "FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_36_3 & ClassName~MET08THFTIRQS408M" --% -- TestRunParameters.Parameter(name=\"Debug\", value=\"Debugger.IsAttached\")
// dotnet test --runtime win-x64 --no-build --filter "FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_36_3 & ClassName~MET08THFTIRQS408M & Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M________" --% -- TestRunParameters.Parameter(name=\"Debug\", value=\"Debugger.IsAttached\")
}

View File

@ -21,9 +21,4 @@ public class BIORAD2
[TestMethod]
public void Staging__v2_36_3__BIORAD2__QS408M() => _BIORAD2.Staging__v2_36_3__BIORAD2__QS408M();
}
// dotnet build --runtime win-x64
// dotnet test --runtime win-x64 --no-build --filter "FullyQualifiedName~_Tests.Extract.Staging.v2_36_3" --% -- TestRunParameters.Parameter(name=\"Debug\", value=\"Debugger.IsAttached\")
// dotnet test --runtime win-x64 --no-build --filter "FullyQualifiedName~_Tests.Extract.Staging.v2_36_3 & ClassName~BIORAD2" --% -- TestRunParameters.Parameter(name=\"Debug\", value=\"Debugger.IsAttached\")
// dotnet test --runtime win-x64 --no-build --filter "FullyQualifiedName~_Tests.Extract.Staging.v2_36_3 & ClassName~BIORAD2 & Staging__v2_36_3__BIORAD2__QS408M" --% -- TestRunParameters.Parameter(name=\"Debug\", value=\"Debugger.IsAttached\")
}

View File

@ -38,24 +38,12 @@ public class BIORAD3
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD3.AdaptationTesting.GetVariables(methodBase, check);
IFileRead fileRead = _BIORAD3.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
dateTime = Adaptation.FileHandlers.QS408M.ProcessData.GetDateTime(logistics, string.Empty);
Assert.IsTrue(dateTime == logistics.DateTimeFromSequence);
dateTime = Adaptation.FileHandlers.QS408M.ProcessData.GetDateTime(logistics, "Tue Nov 10 12:03:56 1970");
Assert.IsTrue(dateTime == logistics.DateTimeFromSequence);
Tuple<string, string[], string[]> pdsfNew = Helpers.Metrology.GetLogisticsColumnsAndBody(fileRead, logistics, extractResult, pdsf);
Helpers.Metrology.CompareSave(variables[5], pdsf, pdsfNew);
string[] json = Helpers.Metrology.GetItem2(pdsf, pdsfNew);
Helpers.Metrology.CompareSaveJSON(variables[5], json);
Assert.IsTrue(json[0] == json[1], "Item2 check!");
string[] join = Helpers.Metrology.GetItem3(pdsf, pdsfNew);
Helpers.Metrology.CompareSaveTSV(variables[5], join);
Assert.IsTrue(join[0] == join[1], "Item3 (Join) check!");
Helpers.Metrology.UpdatePassDirectory(variables[2]);
_ = Helpers.Metrology.ReExtractComapareUpdatePassDirectory(variables, fileRead, logistics);
}
}
// dotnet build --runtime win-x64
// dotnet test --runtime win-x64 --no-build --filter "FullyQualifiedName~_Tests.Extract.Staging.v2_36_3" --% -- TestRunParameters.Parameter(name=\"Debug\", value=\"Debugger.IsAttached\")
// dotnet test --runtime win-x64 --no-build --filter "FullyQualifiedName~_Tests.Extract.Staging.v2_36_3 & ClassName~BIORAD3" --% -- TestRunParameters.Parameter(name=\"Debug\", value=\"Debugger.IsAttached\")
// dotnet test --runtime win-x64 --no-build --filter "FullyQualifiedName~_Tests.Extract.Staging.v2_36_3 & ClassName~BIORAD3 & Staging__v2_36_3__BIORAD3__QS408M637406016892454000__ReactorAndRDS" --% -- TestRunParameters.Parameter(name=\"Debug\", value=\"Debugger.IsAttached\")
}

View File

@ -45,9 +45,4 @@ public class MET08THFTIRQS408M
[TestMethod]
public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M________() => _MET08THFTIRQS408M.Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M________();
}
// dotnet build --runtime win-x64
// dotnet test --runtime win-x64 --no-build --filter "FullyQualifiedName~_Tests.Extract.Staging.v2_36_3" --% -- TestRunParameters.Parameter(name=\"Debug\", value=\"Debugger.IsAttached\")
// dotnet test --runtime win-x64 --no-build --filter "FullyQualifiedName~_Tests.Extract.Staging.v2_36_3 & ClassName~MET08THFTIRQS408M" --% -- TestRunParameters.Parameter(name=\"Debug\", value=\"Debugger.IsAttached\")
// dotnet test --runtime win-x64 --no-build --filter "FullyQualifiedName~_Tests.Extract.Staging.v2_36_3 & ClassName~MET08THFTIRQS408M & Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M________" --% -- TestRunParameters.Parameter(name=\"Debug\", value=\"Debugger.IsAttached\")
}

View File

@ -38,19 +38,12 @@ public class BIORAD3
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD3.AdaptationTesting.GetVariables(methodBase, check);
IFileRead fileRead = _BIORAD3.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
dateTime = Adaptation.FileHandlers.QS408M.ProcessData.GetDateTime(logistics, string.Empty);
Assert.IsTrue(dateTime == logistics.DateTimeFromSequence);
dateTime = Adaptation.FileHandlers.QS408M.ProcessData.GetDateTime(logistics, "Tue Nov 10 12:03:56 1970");
Assert.IsTrue(dateTime == logistics.DateTimeFromSequence);
Tuple<string, string[], string[]> pdsfNew = Helpers.Metrology.GetLogisticsColumnsAndBody(fileRead, logistics, extractResult, pdsf);
Helpers.Metrology.CompareSave(variables[5], pdsf, pdsfNew);
string[] json = Helpers.Metrology.GetItem2(pdsf, pdsfNew);
Helpers.Metrology.CompareSaveJSON(variables[5], json);
Assert.IsTrue(json[0] == json[1], "Item2 check!");
string[] join = Helpers.Metrology.GetItem3(pdsf, pdsfNew);
Helpers.Metrology.CompareSaveTSV(variables[5], join);
Assert.IsTrue(join[0] == join[1], "Item3 (Join) check!");
Helpers.Metrology.UpdatePassDirectory(variables[2]);
_ = Helpers.Metrology.ReExtractComapareUpdatePassDirectory(variables, fileRead, logistics);
}
}

View File

@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MET08THFTIRQS408M</RootNamespace>
<AssemblyName>MET08THFTIRQS408M</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
@ -133,13 +133,6 @@
<Compile Include="Adaptation\Shared\Properties\IScopeInfo.cs" />
<Compile Include="Adaptation\Shared\Test.cs" />
<Compile Include="FileHandlers\FileRead.cs" />
<Compile Include="Adaptation\Helpers\ProcessData.BioRadFile.cs" />
<Compile Include="Adaptation\Helpers\ProcessData.BioRadDetail.cs" />
<Compile Include="Adaptation\Helpers\ConfigData.cs" />
<Compile Include="Adaptation\Helpers\ConfigData.Level.cs" />
<Compile Include="Adaptation\Helpers\ProcessData.cs" />
<Compile Include="Adaptation\Helpers\ProcessData.FileRead.Description.cs" />
<Compile Include="Adaptation\Helpers\ProcessData.WSRequest.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Shared\FilePathGenerator.cs" />
<Compile Include="Shared\FilePathGeneratorInfo.cs" />
@ -153,7 +146,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Infineon.EAF.Runtime">
<Version>2.36.0</Version>
<Version>2.39.0</Version>
</PackageReference>
<PackageReference Include="System.Text.Json">
<Version>5.0.1</Version>