Compare commits

...

23 Commits

Author SHA1 Message Date
552f0137df json in process-data-standard-format 2025-05-16 15:26:27 -07:00
538bd194ae process-data-standard-format changes for better unit testing 2025-04-30 09:56:24 -07:00
0ed6d17774 process-data-standard-format with HeaderId and SubgroupId 2025-04-28 17:15:42 -07:00
46844029b1 Now will default to typed when OI is null for the Reactor 2025-04-22 08:52:34 -07:00
e81ae34f8f process-data-standard-format with pipes 2025-04-21 13:19:06 -07:00
5a3469baa1 UniqueId replacement for attachments
Write input PDSF in output after EOF

GetPropertyValue for MoveMatchingFiles

MoveMatchingFile

ProcessDataStandardFormat over Tuple

MoveMatchingFiles to use ProcessDataStandardFormatMapping

MID Logic
2025-04-14 10:00:36 -07:00
4d41e545b3 ProcessDataStandardFormat
run.json
descriptions.json
Infineon.Mesa.PDF.Text.Stripper 4.8.0.2
MSTEST0037
2025-03-03 11:42:17 -07:00
959bf66fa9 Infineon.EAF.Runtime v2.59.0 2025-02-17 19:34:30 -07:00
0788998e09 using Adaptation.FileHandlers.txt;
Sequence as a string
Job Update using null
2025-02-17 12:45:31 -07:00
ba22cebdf2 Build Pipeline 2025-02-05 16:34:24 -07:00
750af1fae8 Count Header Data 2025-01-21 08:45:58 -07:00
1cabd838a1 v2.58.0 2025-01-15 14:07:58 -07:00
d2a14d03f5 B) No Data and C) No Data 2025-01-15 12:42:28 -07:00
29dd3c3559 TSV like PDSF ready to test 2025-01-14 13:13:56 -07:00
0c786f1f31 Zero _TickOffset
IDE0060
2024-11-20 09:02:08 -07:00
d66314568c Ready to test 2024-10-14 14:35:27 -07:00
d40127bb44 Changed port to proxy pass 020ec 2024-09-19 14:48:01 -07:00
8772b20a13 Test RDS 1234567 2024-09-18 08:49:18 -07:00
e45c71f358 Ready to test 2024-09-13 17:53:26 -07:00
adc995c67d v2.57.0 2024-08-19 16:52:29 -07:00
250c83c10d wontfix: Remove Kanbn index from git 2024-07-11 16:05:28 -07:00
9106e32967 Bump 2024-06-04 07:45:17 -07:00
075613bfa0 Bug fix - GetHeaderId 2024-05-22 17:59:29 -07:00
80 changed files with 7559 additions and 2431 deletions

View File

@ -92,8 +92,9 @@ csharp_using_directive_placement = outside_namespace
dotnet_code_quality_unused_parameters = all
dotnet_code_quality_unused_parameters = non_public # IDE0060: Remove unused parameter
dotnet_code_quality.CAXXXX.api_surface = private, internal
dotnet_diagnostic.CA1510.severity = none # CA1510: Use 'ArgumentNullException.ThrowIfNull' instead of explicitly throwing a new exception instance
dotnet_diagnostic.CA1816.severity = none # CA1816: Call GC.SuppressFinalize correctly
dotnet_diagnostic.CA1825.severity = warning # CA1823: Avoid zero-length array allocations
dotnet_diagnostic.CA1825.severity = warning # CA1825: Avoid zero-length array allocations
dotnet_diagnostic.CA1829.severity = warning # CA1829: Use Length/Count property instead of Count() when available
dotnet_diagnostic.CA1834.severity = warning # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
dotnet_diagnostic.CA1846.severity = none # CA1846: Prefer AsSpan over Substring
@ -121,6 +122,7 @@ dotnet_diagnostic.IDE0290.severity = none # Use primary constructor [Distance]cs
dotnet_diagnostic.IDE0300.severity = none # IDE0300: Collection initialization can be simplified
dotnet_diagnostic.IDE0301.severity = none #IDE0301: Collection initialization can be simplified
dotnet_diagnostic.IDE0305.severity = none # IDE0305: Collection initialization can be simplified
dotnet_diagnostic.MSTEST0037.severity = error # MSTEST0037: Use proper 'Assert' methods
dotnet_diagnostic.SYSLIB1045.severity = none # SYSLIB1045: diagnostics for regex source generation
dotnet_naming_rule.abstract_method_should_be_pascal_case.severity = warning
dotnet_naming_rule.abstract_method_should_be_pascal_case.style = pascal_case

View File

@ -1,23 +0,0 @@
---
type: "Kanban"
startedColumns:
- 'In Progress'
completedColumns:
- Done
dateFormat: mm/dd
taskTemplate: '^+^_${overdue ? ''^R'' : ''''}${name}^: ${relations ? (''\n^-^/^g'' + relations.reduce((accumulator, currentValue) => accumulator.task + currentValue.task + '' '', '''')) : ''''}'
created: "2024-04-11T15:50:50.874Z"
updated: "2024-04-11T16:10:05.831Z"
---
# MET08DDUPSP1TBI
## Backlog
## Todo
- [public-const-to-eaf](tasks/public-const-to-eaf.md)
## In Progress
## Done

View File

@ -4,7 +4,7 @@
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": 21440
"processId": 8912
}
]
}

View File

@ -5,6 +5,7 @@
"cSpell.words": [
"BIORAD",
"CASS",
"CEPIEPSILON",
"CUST",
"DDUPSP",
"EQPT",

View File

@ -49,6 +49,16 @@
],
"problemMatcher": "$msCompile"
},
{
"label": "Format-Whitespaces",
"command": "dotnet",
"type": "process",
"args": [
"format",
"whitespace"
],
"problemMatcher": "$msCompile"
},
{
"label": "Nuget Clear",
"command": "dotnet",
@ -68,7 +78,7 @@
"args": [
"/target:Build",
"/restore:True",
"/p:RestoreSources=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/%3Bhttps://packagemanagement.eu.infineon.com:4430/api/v2/%3Bhttps://tfs.intra.infineon.com/tfs/ManufacturingIT/_packaging/eaf/nuget/v3/index.json%3Bhttps://tfs.intra.infineon.com/tfs/FactoryIntegration/_packaging/EAF%40Local/nuget/v3/index.json%3Bhttps://api.nuget.org/v3/index.json",
"/p:RestoreSources=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/%3Bhttps://tfs.intra.infineon.com/tfs/FactoryIntegration/_packaging/EAF/nuget/v3/index.json%3Bhttps://tfs.intra.infineon.com/tfs/FactoryIntegration/_packaging/EAF%40Local/nuget/v3/index.json%3Bhttps://api.nuget.org/v3/index.json",
"/detailedsummary",
"/consoleloggerparameters:PerformanceSummary;ErrorsOnly;",
"/property:Configuration=Debug;TargetFrameworkVersion=v4.8",
@ -77,9 +87,35 @@
"problemMatcher": "$msCompile"
},
{
"label": "File-Folder-Helper AOT s M .Kanbn Tasks",
"label": "Project",
"type": "shell",
"command": "L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net8.0/win-x64/publish/File-Folder-Helper.exe s M T:/MET08DDUPSP1TBI/06_SourceCode/MET08DDUPSP1TBI/Adaptation -s T:/MET08DDUPSP1TBI/06_SourceCode/MET08DDUPSP1TBI/Adaptation/.kanbn/tasks",
"command": "code ../MET08DDUPSP1TBI.csproj",
"problemMatcher": []
},
{
"label": "Readme",
"type": "shell",
"command": "code ../README.md",
"problemMatcher": []
},
{
"label": "File-Folder-Helper AOT s X Day-Helper-2025-03-20",
"type": "shell",
"command": "L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net8.0/win-x64/publish/File-Folder-Helper.exe",
"args": [
"s",
"X",
"L:/DevOps/EAF-Mesa-Integration/met08ddupsp1tbi",
"Day-Helper-2025-03-20",
"false",
"4"
],
"problemMatcher": []
},
{
"label": "Git Config",
"type": "shell",
"command": "code ../.git/config",
"problemMatcher": []
},
{

View File

@ -14,7 +14,7 @@ namespace Adaptation.FileHandlers.APC;
public class FileRead : Shared.FileRead, IFileRead
{
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{
_MinFileLength = 10;
@ -120,15 +120,15 @@ public class FileRead : Shared.FileRead, IFileRead
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
{
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath);
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
SetFileParameterLotIDToLogisticsMID();
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
FileCopy(reportFullPath, dateTime, descriptions);
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics[0]), tests, jsonElements, new List<FileInfo>());
return results;
}

View File

@ -18,7 +18,7 @@ public class FileRead : Shared.FileRead, IFileRead
private readonly string _JobIdParentDirectory;
private readonly string _JobIdArchiveParentDirectory;
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{
_MinFileLength = 10;
@ -115,14 +115,15 @@ public class FileRead : Shared.FileRead, IFileRead
}
}
#pragma warning disable IDE0060
private void MoveArchive(string reportFullPath, DateTime dateTime)
#pragma warning restore IDE0060
{
if (dateTime == DateTime.MinValue)
throw new ArgumentNullException(nameof(dateTime));
string logisticsSequence = _Logistics.Sequence.ToString();
string day = $"{_Logistics.DateTimeFromSequence:yyyy-MM-dd}";
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}{@"\"}{_Logistics.DateTimeFromSequence:yyyy-MM-dd}";
string destinationArchiveDirectory = Path.Combine(_JobIdArchiveParentDirectory, _Logistics.JobID, weekDirectory);
string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}";
string destinationArchiveDirectory = Path.Combine(_JobIdArchiveParentDirectory, _Logistics.JobID, weekDirectory, day);
if (!Directory.Exists(destinationArchiveDirectory))
_ = Directory.CreateDirectory(destinationArchiveDirectory);
string jobIdDirectory = Path.Combine(_JobIdParentDirectory, _Logistics.JobID);
@ -144,15 +145,15 @@ public class FileRead : Shared.FileRead, IFileRead
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
{
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath);
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
SetFileParameterLotIDToLogisticsMID();
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
MoveArchive(reportFullPath, dateTime);
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics[0]), tests, jsonElements, new List<FileInfo>());
return results;
}

View File

@ -9,7 +9,7 @@ namespace Adaptation.FileHandlers;
public class CellInstanceConnectionName
{
internal static IFileRead Get(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, int? connectionCount)
internal static IFileRead Get(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, int? connectionCount)
{
IFileRead result = cellInstanceConnectionName switch
{

View File

@ -23,7 +23,7 @@ public class FileRead : Shared.FileRead, IFileRead
private int _LastDummyRunIndex;
private readonly string[] _CellNames;
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{
_MinFileLength = 10;

View File

@ -18,7 +18,7 @@ public class FileRead : Shared.FileRead, IFileRead
private string _LastLines;
private readonly string _IQSFile;
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{
_MinFileLength = 10;
@ -148,17 +148,17 @@ public class FileRead : Shared.FileRead, IFileRead
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
{
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath);
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
SetFileParameterLotIDToLogisticsMID();
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
List<txt.Description> descriptions = txt.ProcessData.GetDescriptions(jsonElements);
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
SaveIQSFile(reportFullPath, dateTime, descriptions, tests);
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
FileCopy(reportFullPath, dateTime, descriptions);
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics[0]), tests, jsonElements, new List<FileInfo>());
return results;
}

View File

@ -17,7 +17,7 @@ public class FileRead : Shared.FileRead, IFileRead
private long? _TickOffset;
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{
_MinFileLength = 10;
@ -100,8 +100,10 @@ public class FileRead : Shared.FileRead, IFileRead
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
{
if (dateTime == DateTime.MinValue)
throw new ArgumentNullException(nameof(dateTime));
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>());
_TickOffset ??= new FileInfo(reportFullPath).LastWriteTime.Ticks - dateTime.Ticks;
_TickOffset ??= 0; // new FileInfo(reportFullPath).LastWriteTime.Ticks - dateTime.Ticks;
_Logistics = new Logistics(this, _TickOffset.Value, reportFullPath, useSplitForMID: true);
SetFileParameterLotIDToLogisticsMID();
return results;

View File

@ -5,17 +5,75 @@ using Adaptation.Shared.Duplicator;
using Adaptation.Shared.Methods;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.Json;
using System.Threading;
namespace Adaptation.FileHandlers.MoveMatchingFiles;
#nullable enable
public class FileRead : Shared.FileRead, IFileRead
{
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
internal class PreWith
{
internal string ErrFile { get; private set; }
internal string CheckFile { get; private set; }
internal string MatchingFile { get; private set; }
internal string CheckDirectory { get; private set; }
internal string NoWaitDirectory { get; private set; }
internal PreWith(string checkDirectory,
string checkFile,
string errFile,
string matchingFile,
string noWaitDirectory)
{
ErrFile = errFile;
CheckFile = checkFile;
MatchingFile = matchingFile;
CheckDirectory = checkDirectory;
NoWaitDirectory = noWaitDirectory;
}
}
internal class Pre
{
internal string MatchingFile { get; private set; }
internal string CheckFile { get; private set; }
internal Pre(string matchingFile, string checkFile)
{
MatchingFile = matchingFile;
CheckFile = checkFile;
}
}
internal class Post
{
internal string ErrFile { get; private set; }
internal string CheckFile { get; private set; }
internal Post(string checkFile, string errFile)
{
ErrFile = errFile;
CheckFile = checkFile;
}
}
private readonly ProcessDataStandardFormatMapping _ProcessDataStandardFormatMapping;
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{
_MinFileLength = 10;
@ -27,6 +85,12 @@ public class FileRead : Shared.FileRead, IFileRead
throw new Exception(cellInstanceConnectionName);
if (!_IsDuplicator)
throw new Exception(cellInstanceConnectionName);
string processDataStandardFormatMappingOldColumnNames = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Process.Data.Standard.Format.Mapping.Old.Column.Names");
string processDataStandardFormatMappingNewColumnNames = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Process.Data.Standard.Format.Mapping.New.Column.Names");
string processDataStandardFormatMappingColumnIndices = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Process.Data.Standard.Format.Mapping.Column.Indices");
_ProcessDataStandardFormatMapping = GetProcessDataStandardFormatMapping(processDataStandardFormatMappingOldColumnNames,
processDataStandardFormatMappingNewColumnNames,
processDataStandardFormatMappingColumnIndices);
}
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception)
@ -41,7 +105,8 @@ public class FileRead : Shared.FileRead, IFileRead
Move(extractResults);
}
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
void IFileRead.WaitForThread() =>
WaitForThread(thread: null, threadExceptions: null);
string IFileRead.GetEventDescription()
{
@ -88,7 +153,7 @@ public class FileRead : Shared.FileRead, IFileRead
DateTime dateTime = DateTime.Now;
results = GetExtractResult(reportFullPath, dateTime);
if (results.Item3 is null)
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(results.Item1, Array.Empty<Test>(), JsonSerializer.Deserialize<JsonElement[]>("[]"), results.Item4);
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(results.Item1, Array.Empty<Test>(), JsonSerializer.Deserialize<JsonElement[]>("[]") ?? throw new Exception(), results.Item4);
if (results.Item3.Length > 0 && _IsEAFHosted)
WritePDSF(this, results.Item3);
UpdateLastTicksDuration(DateTime.Now.Ticks - dateTime.Ticks);
@ -104,7 +169,73 @@ public class FileRead : Shared.FileRead, IFileRead
return results;
}
private static List<string> GetSearchDirectories(int numberLength, string parentDirectory)
private static ProcessDataStandardFormatMapping GetProcessDataStandardFormatMapping(string processDataStandardFormatMappingOldColumnNames, string processDataStandardFormatMappingNewColumnNames, string processDataStandardFormatMappingColumnIndices)
{
ProcessDataStandardFormatMapping result;
string[] segmentsB;
List<string> distinct = new();
Dictionary<string, string> keyValuePairs = new();
string args4 = "Time,HeaderUniqueId,UniqueId,Date,SP101";
string args5 = ",SP101";
string args6 = ",SP101";
string args7 = "Test|EventId,Recipe|Session,|SP101";
// string args8 = "Time,A_LOGISTICS,B_LOGISTICS,Test,Count,Index,MesEntity,Date,Employee,Lot,PSN,Reactor,Recipe,Grade,HeaderUniqueId,RDS,Session,Side,SrcDest,UniqueId,WaferID,DcnAllMax,DcnAllMean,DcnAllMin,DcnAllStdDev,DcnAreaCountMax,DcnAreaCountMean,DcnAreaCountMin,DcnAreaCountStdDev,DcnAreaMax,DcnAreaMean,DcnAreaMin,DcnAreaStdDev,DcnBin1Max,DcnBin1Mean,DcnBin1Min,DcnBin1StdDev,DcnBin2Max,DcnBin2Mean,DcnBin2Min,DcnBin2StdDev,DcnBin3Max,DcnBin3Mean,DcnBin3Min,DcnBin3StdDev,DcnBin4Max,DcnBin4Mean,DcnBin4Min,DcnBin4StdDev,DcnBin5Max,DcnBin5Mean,DcnBin5Min,DcnBin5StdDev,DcnBin6Max,DcnBin6Mean,DcnBin6Min,DcnBin6StdDev,DcnBin7Max,DcnBin7Mean,DcnBin7Min,DcnBin7StdDev,DcnBin8Max,DcnBin8Mean,DcnBin8Min,DcnBin8StdDev,DcnHazeAvgMax,DcnHazeAvgMean,DcnHazeAvgMin,DcnHazeAvgStdDev,DcnHazeMedianMax,DcnHazeMedianMean,DcnHazeMedianMin,DcnHazeMedianStdDev,DcnHazeStdDevMax,DcnHazeStdDevMean,DcnHazeStdDevMin,DcnHazeStdDevStdDev,DcnLpdESMax,DcnLpdESMean,DcnLpdESMin,DcnLpdESStdDev,DcnLpdMax,DcnLpdMean,DcnLpdMin,DcnLpdNMax,DcnLpdNMean,DcnLpdNMin,DcnLpdNStdDev,DcnLpdStdDev,DcnMicroScrMax,DcnMicroScrMean,DcnMicroScrMin,DcnMicroScrStdDev,DcnScrMax,DcnScrMean,DcnScrMin,DcnScrStdDev,DcnSlipMax,DcnSlipMean,DcnSlipMin,DcnSlipStdDev,DnnAllMax,DnnAllMean,DnnAllMin,DnnAllStdDev,DnnAreaCountMax,DnnAreaCountMean,DnnAreaCountMin,DnnAreaCountStdDev,DnnAreaMax,DnnAreaMean,DnnAreaMin,DnnAreaStdDev,DnnBin1Max,DnnBin1Mean,DnnBin1Min,DnnBin1StdDev,DnnBin2Max,DnnBin2Mean,DnnBin2Min,DnnBin2StdDev,DnnBin3Max,DnnBin3Mean,DnnBin3Min,DnnBin3StdDev,DnnBin4Max,DnnBin4Mean,DnnBin4Min,DnnBin4StdDev,DnnBin5Max,DnnBin5Mean,DnnBin5Min,DnnBin5StdDev,DnnBin6Max,DnnBin6Mean,DnnBin6Min,DnnBin6StdDev,DnnBin7Max,DnnBin7Mean,DnnBin7Min,DnnBin7StdDev,DnnBin8Max,DnnBin8Mean,DnnBin8Min,DnnBin8StdDev,DnnHazeAvgMax,DnnHazeAvgMean,DnnHazeAvgMin,DnnHazeAvgStdDev,DnnHazeMedianMax,DnnHazeMedianMean,DnnHazeMedianMin,DnnHazeMedianStdDev,DnnHazeStdDevMax,DnnHazeStdDevMean,DnnHazeStdDevMin,DnnHazeStdDevStdDev,DnnLpdESMax,DnnLpdESMean,DnnLpdESMin,DnnLpdESStdDev,DnnLpdMax,DnnLpdMean,DnnLpdMin,DnnLpdNMax,DnnLpdNMean,DnnLpdNMin,DnnLpdNStdDev,DnnLpdStdDev,DnnMicroScrMax,DnnMicroScrMean,DnnMicroScrMin,DnnMicroScrStdDev,DnnScrMax,DnnScrMean,DnnScrMin,DnnScrStdDev,DnnSlipMax,DnnSlipMean,DnnSlipMin,DnnSlipStdDev,DwnAllMax,DwnAllMean,DwnAllMin,DwnAllStdDev,DwnAreaCountMax,DwnAreaCountMean,DwnAreaCountMin,DwnAreaCountStdDev,DwnAreaMax,DwnAreaMean,DwnAreaMin,DwnAreaStdDev,DwnBin1Max,DwnBin1Mean,DwnBin1Min,DwnBin1StdDev,DwnBin2Max,DwnBin2Mean,DwnBin2Min,DwnBin2StdDev,DwnBin3Max,DwnBin3Mean,DwnBin3Min,DwnBin3StdDev,DwnBin4Max,DwnBin4Mean,DwnBin4Min,DwnBin4StdDev,DwnBin5Max,DwnBin5Mean,DwnBin5Min,DwnBin5StdDev,DwnBin6Max,DwnBin6Mean,DwnBin6Min,DwnBin6StdDev,DwnBin7Max,DwnBin7Mean,DwnBin7Min,DwnBin7StdDev,DwnBin8Max,DwnBin8Mean,DwnBin8Min,DwnBin8StdDev,DwnHazeAvgMax,DwnHazeAvgMean,DwnHazeAvgMin,DwnHazeAvgStdDev,DwnHazeMedianMax,DwnHazeMedianMean,DwnHazeMedianMin,DwnHazeMedianStdDev,DwnHazeStdDevMax,DwnHazeStdDevMean,DwnHazeStdDevMin,DwnHazeStdDevStdDev,DwnLpdESMax,DwnLpdESMean,DwnLpdESMin,DwnLpdESStdDev,DwnLpdMax,DwnLpdMean,DwnLpdMin,DwnLpdNMax,DwnLpdNMean,DwnLpdNMin,DwnLpdNStdDev,DwnLpdStdDev,DwnMicroScrMax,DwnMicroScrMean,DwnMicroScrMin,DwnMicroScrStdDev,DwnScrMax,DwnScrMean,DwnScrMin,DwnScrStdDev,DwnSlipMax,DwnSlipMean,DwnSlipMin,DwnSlipStdDev,DcnAll,DcnArea,DcnAreaCount,DcnBin1,DcnBin2,DcnBin3,DcnBin4,DcnBin5,DcnBin6,DcnBin7,DcnBin8,DcnHazeAvg,DcnHazeMedian,DcnHazeStdDev,DcnLpd,DcnLpdES,DcnLpdN,DcnMicroScr,DcnScr,DcnSlip,DnnAll,DnnArea,DnnAreaCount,DnnBin1,DnnBin2,DnnBin3,DnnBin4,DnnBin5,DnnBin6,DnnBin7,DnnBin8,DnnHazeAvg,DnnHazeMedian,DnnHazeStdDev,DnnLpd,DnnLpdES,DnnLpdN,DnnMicroScr,DnnScr,DnnSlip,DwnAll,DwnArea,DwnAreaCount,DwnBin1,DwnBin2,DwnBin3,DwnBin4,DwnBin5,DwnBin6,DwnBin7,DwnBin8,DwnHazeAvg,DwnHazeMedian,DwnHazeStdDev,DwnLpd,DwnLpdES,DwnLpdN,DwnMicroScr,DwnScr,DwnSlip";
// string args9 = "Time,A_LOGISTICS,B_LOGISTICS,Count,Sequence,MesEntity,Index,Lot,Session,DcnAllMin,DcnLpdMin,DcnLpdNMin,DcnLpdESMin,DcnMicroScrMin,DcnScrMin,DcnSlipMin,DcnAreaCountMin,DcnAreaMin,DcnHazeAvgMin,DcnHazeMedianMin,DcnHazeStdDevMin,DcnBin1Min,DcnBin2Min,DcnBin3Min,DcnBin4Min,DcnBin5Min,DcnBin6Min,DcnBin7Min,DcnBin8Min,DcnAllMax,DcnLpdMax,DcnLpdNMax,DcnLpdESMax,DcnMicroScrMax,DcnScrMax,DcnSlipMax,DcnAreaCountMax,DcnAreaMax,DcnHazeAvgMax,DcnHazeMedianMax,DcnHazeStdDevMax,DcnBin1Max,DcnBin2Max,DcnBin3Max,DcnBin4Max,DcnBin5Max,DcnBin6Max,DcnBin7Max,DcnBin8Max,DcnAllMean,DcnLpdMean,DcnLpdNMean,DcnLpdESMean,DcnMicroScrMean,DcnScrMean,DcnSlipMean,DcnAreaCountMean,DcnAreaMean,DcnHazeAvgMean,DcnHazeMedianMean,DcnHazeStdDevMean,DcnBin1Mean,DcnBin2Mean,DcnBin3Mean,DcnBin4Mean,DcnBin5Mean,DcnBin6Mean,DcnBin7Mean,DcnBin8Mean,DcnAllStdDev,DcnLpdStdDev,DcnLpdNStdDev,DcnLpdESStdDev,DcnMicroScrStdDev,DcnScrStdDev,DcnSlipStdDev,DcnAreaCountStdDev,DcnAreaStdDev,DcnHazeAvgStdDev,DcnHazeMedianStdDev,DcnHazeStdDevStdDev,DcnBin1StdDev,DcnBin2StdDev,DcnBin3StdDev,DcnBin4StdDev,DcnBin5StdDev,DcnBin6StdDev,DcnBin7StdDev,DcnBin8StdDev,DwnAllMin,DwnLpdMin,DwnLpdNMin,DwnLpdESMin,DwnMicroScrMin,DwnScrMin,DwnSlipMin,DwnAreaCountMin,DwnAreaMin,DwnHazeAvgMin,DwnHazeMedianMin,DwnHazeStdDevMin,DwnBin1Min,DwnBin2Min,DwnBin3Min,DwnBin4Min,DwnBin5Min,DwnBin6Min,DwnBin7Min,DwnBin8Min,DwnAllMax,DwnLpdMax,DwnLpdNMax,DwnLpdESMax,DwnMicroScrMax,DwnScrMax,DwnSlipMax,DwnAreaCountMax,DwnAreaMax,DwnHazeAvgMax,DwnHazeMedianMax,DwnHazeStdDevMax,DwnBin1Max,DwnBin2Max,DwnBin3Max,DwnBin4Max,DwnBin5Max,DwnBin6Max,DwnBin7Max,DwnBin8Max,DwnAllMean,DwnLpdMean,DwnLpdNMean,DwnLpdESMean,DwnMicroScrMean,DwnScrMean,DwnSlipMean,DwnAreaCountMean,DwnAreaMean,DwnHazeAvgMean,DwnHazeMedianMean,DwnHazeStdDevMean,DwnBin1Mean,DwnBin2Mean,DwnBin3Mean,DwnBin4Mean,DwnBin5Mean,DwnBin6Mean,DwnBin7Mean,DwnBin8Mean,DwnAllStdDev,DwnLpdStdDev,DwnLpdNStdDev,DwnLpdESStdDev,DwnMicroScrStdDev,DwnScrStdDev,DwnSlipStdDev,DwnAreaCountStdDev,DwnAreaStdDev,DwnHazeAvgStdDev,DwnHazeMedianStdDev,DwnHazeStdDevStdDev,DwnBin1StdDev,DwnBin2StdDev,DwnBin3StdDev,DwnBin4StdDev,DwnBin5StdDev,DwnBin6StdDev,DwnBin7StdDev,DwnBin8StdDev,DnnAllMin,DnnLpdMin,DnnLpdNMin,DnnLpdESMin,DnnMicroScrMin,DnnScrMin,DnnSlipMin,DnnAreaCountMin,DnnAreaMin,DnnHazeAvgMin,DnnHazeMedianMin,DnnHazeStdDevMin,DnnBin1Min,DnnBin2Min,DnnBin3Min,DnnBin4Min,DnnBin5Min,DnnBin6Min,DnnBin7Min,DnnBin8Min,DnnAllMax,DnnLpdMax,DnnLpdNMax,DnnLpdESMax,DnnMicroScrMax,DnnScrMax,DnnSlipMax,DnnAreaCountMax,DnnAreaMax,DnnHazeAvgMax,DnnHazeMedianMax,DnnHazeStdDevMax,DnnBin1Max,DnnBin2Max,DnnBin3Max,DnnBin4Max,DnnBin5Max,DnnBin6Max,DnnBin7Max,DnnBin8Max,DnnAllMean,DnnLpdMean,DnnLpdNMean,DnnLpdESMean,DnnMicroScrMean,DnnScrMean,DnnSlipMean,DnnAreaCountMean,DnnAreaMean,DnnHazeAvgMean,DnnHazeMedianMean,DnnHazeStdDevMean,DnnBin1Mean,DnnBin2Mean,DnnBin3Mean,DnnBin4Mean,DnnBin5Mean,DnnBin6Mean,DnnBin7Mean,DnnBin8Mean,DnnAllStdDev,DnnLpdStdDev,DnnLpdNStdDev,DnnLpdESStdDev,DnnMicroScrStdDev,DnnScrStdDev,DnnSlipStdDev,DnnAreaCountStdDev,DnnAreaStdDev,DnnHazeAvgStdDev,DnnHazeMedianStdDev,DnnHazeStdDevStdDev,DnnBin1StdDev,DnnBin2StdDev,DnnBin3StdDev,DnnBin4StdDev,DnnBin5StdDev,DnnBin6StdDev,DnnBin7StdDev,DnnBin8StdDev,Side,WaferID,Grade,SrcDest,DcnAll,DcnLpd,DcnLpdN,DcnLpdES,DcnMicroScr,DcnScr,DcnSlip,DcnAreaCount,DcnArea,DcnHazeAvg,DcnHazeMedian,DcnHazeStdDev,DcnBin1,DcnBin2,DcnBin3,DcnBin4,DcnBin5,DcnBin6,DcnBin7,DcnBin8,DwnAll,DwnLpd,DwnLpdN,DwnLpdES,DwnMicroScr,DwnScr,DwnSlip,DwnAreaCount,DwnArea,DwnHazeAvg,DwnHazeMedian,DwnHazeStdDev,DwnBin1,DwnBin2,DwnBin3,DwnBin4,DwnBin5,DwnBin6,DwnBin7,DwnBin8,DnnAll,DnnLpd,DnnLpdN,DnnLpdES,DnnMicroScr,DnnScr,DnnSlip,DnnAreaCount,DnnArea,DnnHazeAvg,DnnHazeMedian,DnnHazeStdDev,DnnBin1,DnnBin2,DnnBin3,DnnBin4,DnnBin5,DnnBin6,DnnBin7,DnnBin8,RDS,PSN,Reactor,Layer,Zone,Employee,InferredLot,Date,EventId";
// string args10 = "0,1,2,319,3,6,5,320,318,7,314,315,8,251,-1,313,8,249,252,-1,250,29,49,9,69,36,56,16,76,37,57,17,77,41,61,21,81,42,62,22,82,43,63,23,83,44,64,24,84,45,65,25,85,46,66,26,86,47,67,27,87,48,68,28,88,38,58,18,78,39,59,19,79,40,60,20,80,32,52,12,72,30,50,10,31,51,11,71,70,33,53,13,73,34,54,14,74,35,55,15,75,189,209,169,229,196,216,176,236,197,217,177,237,201,221,181,241,202,222,182,242,203,223,183,243,204,224,184,244,205,225,185,245,206,226,186,246,207,227,187,247,208,228,188,248,198,218,178,238,199,219,179,239,200,220,180,240,192,212,172,232,190,210,170,191,211,171,231,230,193,213,173,233,194,214,174,234,195,215,175,235,109,129,89,149,116,136,96,156,117,137,97,157,121,141,101,161,122,142,102,162,123,143,103,163,124,144,104,164,125,145,105,165,126,146,106,166,127,147,107,167,128,148,108,168,118,138,98,158,119,139,99,159,120,140,100,160,112,132,92,152,110,130,90,111,131,91,151,150,113,133,93,153,114,134,94,154,115,135,95,155,253,261,260,265,266,267,268,269,270,271,272,262,263,264,254,256,255,257,258,259,293,301,300,305,306,307,308,309,310,311,312,302,303,304,294,296,295,297,298,299,273,281,280,285,286,287,288,289,290,291,292,282,283,284,274,276,275,277,278,279";
string[] segments = args7.Split(',');
ReadOnlyCollection<string> ignoreColumns = new(args4.Split(','));
ReadOnlyCollection<string> backfillColumns = new(args5.Split(','));
ReadOnlyCollection<string> indexOnlyColumns = new(args6.Split(','));
ReadOnlyCollection<string> newColumnNames = new(processDataStandardFormatMappingNewColumnNames.Split(','));
ReadOnlyCollection<string> oldColumnNames = new(processDataStandardFormatMappingOldColumnNames.Split(','));
ReadOnlyCollection<int> columnIndices = new(processDataStandardFormatMappingColumnIndices.Split(',').Select(int.Parse).ToArray());
foreach (string segment in segments)
{
segmentsB = segment.Split('|');
if (segmentsB.Length != 2)
continue;
if (distinct.Contains(segmentsB[0]))
continue;
distinct.Add(segmentsB[0]);
keyValuePairs.Add(segmentsB[0], segmentsB[1]);
}
result = new(backfillColumns: backfillColumns,
columnIndices: columnIndices,
newColumnNames: newColumnNames,
ignoreColumns: ignoreColumns,
indexOnlyColumns: indexOnlyColumns,
keyValuePairs: new(keyValuePairs),
oldColumnNames: oldColumnNames);
return result;
}
private static ReadOnlyCollection<PreWith> GetPreWithCollection(ReadOnlyCollection<Pre> preCollection)
{
List<PreWith> results = new();
string errFile;
PreWith preWith;
string? checkDirectory;
string noWaitDirectory;
foreach (Pre pre in preCollection)
{
errFile = string.Concat(pre.CheckFile, ".err");
checkDirectory = Path.GetDirectoryName(pre.CheckFile);
if (string.IsNullOrEmpty(checkDirectory))
continue;
if (!Directory.Exists(checkDirectory))
_ = Directory.CreateDirectory(checkDirectory);
noWaitDirectory = Path.Combine(checkDirectory, "NoWaitDirectory");
preWith = new(checkDirectory: checkDirectory,
checkFile: pre.CheckFile,
errFile: errFile,
matchingFile: pre.MatchingFile,
noWaitDirectory: noWaitDirectory);
results.Add(preWith);
}
return results.AsReadOnly();
}
private static ReadOnlyCollection<string> GetSearchDirectories(int numberLength, string parentDirectory)
{
List<string> results = new();
string[] directories = Directory.GetDirectories(parentDirectory, "*", SearchOption.TopDirectoryOnly);
@ -115,10 +246,136 @@ public class FileRead : Shared.FileRead, IFileRead
results.Add(directory);
}
results.Sort();
return results.AsReadOnly();
}
private static void CreatePointerFile(int numberLength, string parentDirectory, ReadOnlyCollection<string> matchingFiles)
{
string checkFile;
string writeFile;
string? directoryName;
int parentDirectoryLength = parentDirectory.Length;
foreach (string matchingFile in matchingFiles)
{
directoryName = Path.GetDirectoryName(matchingFile);
if (directoryName is null)
continue;
checkFile = $"{matchingFile[0]}{directoryName.Substring(parentDirectoryLength + numberLength + 1)}";
writeFile = Path.Combine(parentDirectory, $"{directoryName.Substring(parentDirectory.Length + 1, numberLength)}.txt");
if (File.Exists(writeFile))
continue;
File.AppendAllLines(writeFile, new string[] { parentDirectory, matchingFile, directoryName, checkFile });
}
}
private static ReadOnlyCollection<Pre> GetPreCollection(int numberLength, string parentDirectory, ReadOnlyCollection<string> matchingFiles, bool _)
{
List<Pre> results = new();
Pre pre;
string checkFile;
int parentDirectoryLength = parentDirectory.Length;
foreach (string matchingFile in matchingFiles)
{
checkFile = $"{matchingFile[0]}{matchingFile.Substring(parentDirectoryLength + numberLength + 1)}";
pre = new(matchingFile, checkFile);
results.Add(pre);
}
return results.AsReadOnly();
}
private void MoveCollection(DateTime dateTime, ProcessDataStandardFormat processDataStandardFormat, ReadOnlyCollection<PreWith> preWithCollection)
{
ReadOnlyCollection<Post> postCollection = GetPostCollection(dateTime, processDataStandardFormat, preWithCollection);
if (postCollection.Count != 0)
{
Thread.Sleep(500);
StringBuilder stringBuilder = new();
foreach (Post post in postCollection)
{
if (File.Exists(post.ErrFile))
_ = stringBuilder.AppendLine(File.ReadAllText(post.ErrFile));
if (File.Exists(post.CheckFile))
_ = stringBuilder.AppendLine($"<{post.CheckFile}> was not consumed by the end!");
}
if (stringBuilder.Length > 0)
throw new Exception(stringBuilder.ToString());
}
}
private ReadOnlyCollection<Post> GetPostCollection(DateTime dateTime, ProcessDataStandardFormat processDataStandardFormat, ReadOnlyCollection<PreWith> preWithCollection)
{
List<Post> results = new();
Post post;
long preWait;
foreach (PreWith preWith in preWithCollection)
{
if (!_IsEAFHosted)
continue;
if (!_StaticRuns.TryGetValue(_Logistics.Sequence, out List<Shared.Metrology.WS.Results>? wsResults))
wsResults = null;
ProcessDataStandardFormat.Write(preWith.CheckFile, processDataStandardFormat, wsResults);
File.Delete(preWith.MatchingFile);
if (Directory.Exists(preWith.NoWaitDirectory))
{
post = new(preWith.CheckFile, preWith.ErrFile);
results.Add(post);
continue;
}
if (_FileConnectorConfiguration?.FileHandleWaitTime is null)
preWait = DateTime.Now.AddMilliseconds(1234).Ticks;
else
preWait = DateTime.Now.AddMilliseconds(_FileConnectorConfiguration.FileHandleWaitTime.Value).Ticks;
for (short i = 0; i < short.MaxValue; i++)
{
if (DateTime.Now.Ticks > preWait)
break;
Thread.Sleep(500);
}
for (int i = 0; i < int.MaxValue; i++)
{
if (File.Exists(preWith.ErrFile))
throw new Exception(File.ReadAllText(preWith.ErrFile));
if (!File.Exists(preWith.CheckFile))
break;
if (new TimeSpan(DateTime.Now.Ticks - dateTime.Ticks).TotalSeconds > _BreakAfterSeconds)
throw new Exception($"Not all files were consumed after {_BreakAfterSeconds} second(s)!");
Thread.Sleep(500);
}
}
return results.AsReadOnly();
}
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
{
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, Array.Empty<Test>(), Array.Empty<JsonElement>(), new List<FileInfo>());
ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath, _ProcessDataStandardFormatMapping);
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
if (!_IsEAFHosted)
ProcessDataStandardFormat.Write("../../.pdsf", processDataStandardFormat, wsResults: null);
SetFileParameterLotIDToLogisticsMID();
int numberLength = 2;
long ticks = dateTime.Ticks;
string parentParentDirectory = GetParentParent(reportFullPath);
ReadOnlyCollection<string> searchDirectories = GetSearchDirectories(numberLength, parentParentDirectory);
ReadOnlyCollection<string> matchingFiles = GetMatchingFiles(ticks, reportFullPath, searchDirectories);
if (matchingFiles.Count != searchDirectories.Count)
throw new Exception($"Didn't find all files after {_BreakAfterSeconds} second(s)!");
if (_IsEAFHosted)
{
try
{ CreatePointerFile(numberLength, parentParentDirectory, matchingFiles); }
catch (Exception) { }
}
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
List<txt.Description> descriptions = txt.ProcessData.GetDescriptions(jsonElements);
bool mesEntityMatchesProcess = descriptions.Count > 0 && descriptions[0].MesEntity == descriptions[0].Reactor;
ReadOnlyCollection<Pre> preCollection = GetPreCollection(numberLength, parentParentDirectory, matchingFiles, mesEntityMatchesProcess);
ReadOnlyCollection<PreWith> preWithCollection = GetPreWithCollection(preCollection);
MoveCollection(dateTime, processDataStandardFormat, preWithCollection);
return results;
}
private List<string> GetMatchingFiles(long ticks, string reportFullPath, List<string> searchDirectories)
private ReadOnlyCollection<string> GetMatchingFiles(long ticks, string reportFullPath, ReadOnlyCollection<string> searchDirectories)
{
List<string> results = new();
string[] found;
@ -137,129 +394,7 @@ public class FileRead : Shared.FileRead, IFileRead
break;
}
}
return results;
}
private static List<(string matchingFile, string checkFile)> GetCollection(int numberLength, string parentDirectory, List<string> matchingFiles)
{
List<(string matchingFile, string checkFile)> results = new();
string checkFile;
int parentDirectoryLength = parentDirectory.Length;
foreach (string matchingFile in matchingFiles)
{
checkFile = $"{matchingFile[0]}{matchingFile.Substring(parentDirectoryLength + numberLength + 1)}";
results.Add(new(matchingFile, checkFile));
}
return results;
}
private static List<(string, string, string, string, string)> GetCollection(List<(string matchingFile, string checkFile)> collection)
{
List<(string, string, string, string, string)> results = new();
string errFile;
string checkDirectory;
string noWaitDirectory;
foreach ((string matchingFile, string checkFile) in collection)
{
errFile = string.Concat(checkFile, ".err");
checkDirectory = Path.GetDirectoryName(checkFile);
if (!Directory.Exists(checkDirectory))
_ = Directory.CreateDirectory(checkDirectory);
noWaitDirectory = Path.Combine(checkDirectory, "NoWaitDirectory");
results.Add(new(matchingFile, checkFile, errFile, checkDirectory, noWaitDirectory));
}
return results;
}
private void MoveCollection(DateTime dateTime, List<(string matchingFile, string checkFile)> collection)
{
long preWait;
List<(string checkFile, string errFile)> postCollection = new();
foreach ((string matchingFile, string checkFile, string errFile, string checkDirectory, string noWaitDirectory) in GetCollection(collection))
{
File.Move(matchingFile, checkFile);
if (Directory.Exists(noWaitDirectory))
{
postCollection.Add(new(checkFile, errFile));
continue;
}
if (_FileConnectorConfiguration?.FileHandleWaitTime is null)
preWait = DateTime.Now.AddMilliseconds(1234).Ticks;
else
preWait = DateTime.Now.AddMilliseconds(_FileConnectorConfiguration.FileHandleWaitTime.Value).Ticks;
for (short i = 0; i < short.MaxValue; i++)
{
if (DateTime.Now.Ticks > preWait)
break;
Thread.Sleep(500);
}
for (int i = 0; i < int.MaxValue; i++)
{
if (File.Exists(errFile))
throw new Exception(File.ReadAllText(errFile));
if (!File.Exists(checkFile))
break;
if (new TimeSpan(DateTime.Now.Ticks - dateTime.Ticks).TotalSeconds > _BreakAfterSeconds)
throw new Exception($"Not all files were consumed after {_BreakAfterSeconds} second(s)!");
Thread.Sleep(500);
}
}
if (postCollection.Count != 0)
{
Thread.Sleep(500);
StringBuilder stringBuilder = new();
foreach ((string checkFile, string errFile) in postCollection)
{
if (File.Exists(errFile))
_ = stringBuilder.AppendLine(File.ReadAllText(errFile));
if (File.Exists(checkFile))
_ = stringBuilder.AppendLine($"<{checkFile}> was not consumed by the end!");
}
if (stringBuilder.Length > 0)
throw new Exception(stringBuilder.ToString());
}
}
private static void CreatePointerFile(int numberLength, string parentDirectory, List<string> matchingFiles)
{
#nullable enable
string checkFile;
string writeFile;
string? directoryName;
int parentDirectoryLength = parentDirectory.Length;
foreach (string matchingFile in matchingFiles)
{
directoryName = Path.GetDirectoryName(matchingFile);
if (directoryName is null)
continue;
checkFile = $"{matchingFile[0]}{directoryName.Substring(parentDirectoryLength + numberLength + 1)}";
writeFile = Path.Combine(parentDirectory, $"{directoryName.Substring(parentDirectory.Length + 1, numberLength)}.txt");
if (File.Exists(writeFile))
continue;
File.AppendAllLines(writeFile, new string[] { parentDirectory, matchingFile, directoryName, checkFile });
}
#nullable disable
}
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
{
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>());
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
SetFileParameterLotIDToLogisticsMID();
int numberLength = 2;
long ticks = dateTime.Ticks;
string parentParentDirectory = GetParentParent(reportFullPath);
List<string> searchDirectories = GetSearchDirectories(numberLength, parentParentDirectory);
List<string> matchingFiles = GetMatchingFiles(ticks, reportFullPath, searchDirectories);
if (matchingFiles.Count != searchDirectories.Count)
throw new Exception($"Didn't find all files after {_BreakAfterSeconds} second(s)!");
try
{ CreatePointerFile(numberLength, parentParentDirectory, matchingFiles); }
catch (Exception) { }
List<(string matchingFile, string checkFile)> collection = GetCollection(numberLength, parentParentDirectory, matchingFiles);
MoveCollection(dateTime, collection);
return results;
return results.AsReadOnly();
}
}

View File

@ -22,7 +22,7 @@ public class FileRead : Shared.FileRead, IFileRead
private readonly string _OpenInsightFilePattern;
private readonly string _OpenInsightApiECDirectory;
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{
_MinFileLength = 10;
@ -168,7 +168,7 @@ public class FileRead : Shared.FileRead, IFileRead
return new Tuple<string, string>(result.ToString(), x.Date);
}
private void SaveOpenInsightFile(string reportFullPath, DateTime dateTime, string logistics, List<txt.Description> descriptions, Test[] tests)
private void SaveOpenInsightFile(string reportFullPath, DateTime dateTime, ProcessDataStandardFormat processDataStandardFormat, List<txt.Description> descriptions, Test[] tests)
{
bool isDummyRun = false;
List<(Shared.Properties.IScopeInfo, string)> collection = new();
@ -195,20 +195,20 @@ public class FileRead : Shared.FileRead, IFileRead
bool save = string.IsNullOrEmpty(_LastLines) || check != _LastLines;
if (save && !string.IsNullOrEmpty(check))
{
long? subGroupId;
long? subgroupId;
_LastLines = check;
long breakAfter = dateTime.AddSeconds(_BreakAfterSeconds).Ticks;
long preWait = _FileConnectorConfiguration?.FileHandleWaitTime is null ? dateTime.AddMilliseconds(1234).Ticks : dateTime.AddMilliseconds(_FileConnectorConfiguration.FileHandleWaitTime.Value).Ticks;
if (string.IsNullOrEmpty(descriptions[0].Reactor) || string.IsNullOrEmpty(descriptions[0].PSN))
subGroupId = null;
subgroupId = null;
else
(subGroupId, int? _, string _) = FromIQS.GetCommandText(_IqsConnectionString, _Logistics, descriptions[0], breakAfter, preWait);
if (subGroupId is null)
(subgroupId, int? _, string _) = FromIQS.GetCommandText(_IqsConnectionString, _Logistics, descriptions[0], breakAfter, preWait);
if (subgroupId is null)
collection.Add(new(new ScopeInfo(tests[0], _OpenInsightFilePattern), lines.Item1));
else
collection.Add(new(new ScopeInfo(tests[0], $"{subGroupId.Value} {_OpenInsightFilePattern}"), lines.Item1));
collection.Add(new(new ScopeInfo(tests[0], $"{subgroupId.Value} {_OpenInsightFilePattern}"), lines.Item1));
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
FromIQS.Save(_OpenInsightApiECDirectory, _Logistics, reportFullPath, logistics, descriptions.First(), lines.Item1, subGroupId, weekOfYear);
FromIQS.Save(_OpenInsightApiECDirectory, _Logistics, reportFullPath, processDataStandardFormat, descriptions.First(), lines.Item1, subgroupId, weekOfYear);
}
if (!Directory.Exists(duplicateDirectory))
_ = Directory.CreateDirectory(duplicateDirectory);
@ -220,15 +220,15 @@ public class FileRead : Shared.FileRead, IFileRead
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
{
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath);
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
SetFileParameterLotIDToLogisticsMID();
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
List<txt.Description> descriptions = txt.ProcessData.GetDescriptions(jsonElements);
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
SaveOpenInsightFile(reportFullPath, dateTime, pdsf.Item1, descriptions, tests);
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
SaveOpenInsightFile(reportFullPath, dateTime, processDataStandardFormat, descriptions, tests);
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics[0]), tests, jsonElements, new List<FileInfo>());
return results;
}

View File

@ -1,5 +1,6 @@
using Adaptation.Shared;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Globalization;
@ -16,65 +17,174 @@ public class FromIQS
#nullable enable
private static string GetCommandText(DateTime dateTime)
{ // cSpell:disable
List<string> results = new();
TimeSpan timeSpan = new(dateTime.ToUniversalTime().AddDays(-1).Ticks - new DateTime(1970, 01, 01).Ticks);
long infinityQS = (long)Math.Floor(timeSpan.TotalSeconds);
results.Add(" select count_se_sgtm CountSeSgtm, ");
results.Add(" dateadd(HH, -7, (dateadd(SS, convert(bigint, max_se_sgtm), '19700101'))) DateTime, ");
results.Add(" max_max_se_test MaxMaxSeTest, ");
results.Add(" ( ");
results.Add(" select td.f_name ");
results.Add(" from [SPCEPIWORLD].[dbo].[TEST_DAT] td ");
results.Add(" where td.f_test = max_max_se_test ");
results.Add(" ) MaxMaxSeTestName, ");
results.Add(" max_max_se_val MaxMaxSeVal, ");
results.Add(" max_se_lot MaxSeLot, ");
results.Add(" ( ");
results.Add(" select pl.f_name ");
results.Add(" from [SPCEPIWORLD].[dbo].[PART_LOT] pl ");
results.Add(" where max_se_lot = pl.f_lot ");
results.Add(" ) MaxSeLotName, ");
results.Add(" max_se_part MaxSePart, ");
results.Add(" ( ");
results.Add(" select rd.f_name ");
results.Add(" from [SPCEPIWORLD].[dbo].[PART_DAT] rd ");
results.Add(" where max_se_part = rd.f_part ");
results.Add(" ) MaxSePartName, ");
results.Add(" max_se_prcs MaxSePrcs, ");
results.Add(" ( ");
results.Add(" select rd.f_name ");
results.Add(" from [SPCEPIWORLD].[dbo].[PRCS_DAT] rd ");
results.Add(" where max_se_prcs = rd.f_prcs ");
results.Add(" ) MaxSePrcsName, ");
results.Add(" max_se_sgrp MaxSeSgrp, ");
results.Add(" min_min_se_test MinMinSeTest, ");
results.Add(" ( ");
results.Add(" select td.f_name ");
results.Add(" from [SPCEPIWORLD].[dbo].[TEST_DAT] td ");
results.Add(" where td.f_test = min_min_se_test ");
results.Add(" ) MinMinSeTestName, ");
results.Add(" min_min_se_val MinMinSeVal, ");
results.Add(" min_se_sgrp MinSeSgrp ");
results.Add(" from ( ");
results.Add(" select count_se_sgtm, ");
results.Add(" max_se_lot, ");
results.Add(" max_se_part, ");
results.Add(" max_se_prcs, ");
results.Add(" max_se_sgrp, ");
results.Add(" max_se_sgtm, ");
results.Add(" min_se_sgrp, ");
results.Add(" max(max_se_val) max_max_se_val, ");
results.Add(" min(min_se_val) min_min_se_val, ");
results.Add(" max(max_se_test) max_max_se_test, ");
results.Add(" min(min_se_test) min_min_se_test ");
results.Add(" from ( ");
results.Add(" select count_se_sgtm, ");
results.Add(" max_se_lot, ");
results.Add(" max_se_val, ");
results.Add(" min_se_val, ");
results.Add(" max_se_part, ");
results.Add(" max_se_prcs, ");
results.Add(" max_se_sgrp, ");
results.Add(" max_se_sgtm, ");
results.Add(" max_se_test, ");
results.Add(" min_se_sgrp, ");
results.Add(" min_se_test ");
results.Add(" from ( ");
results.Add(" select ");
results.Add(" max(se.f_lot) max_se_lot, ");
results.Add(" max(se.f_val) max_se_val, ");
results.Add(" min(se.f_lot) min_se_lot, ");
results.Add(" min(se.f_val) min_se_val, ");
results.Add(" max(se.f_part) max_se_part, ");
results.Add(" max(se.f_prcs) max_se_prcs, ");
results.Add(" max(se.f_sgrp) max_se_sgrp, ");
results.Add(" max(se.f_sgtm) max_se_sgtm, ");
results.Add(" max(se.f_test) max_se_test, ");
results.Add(" min(se.f_part) min_se_part, ");
results.Add(" min(se.f_prcs) min_se_prcs, ");
results.Add(" min(se.f_sgrp) min_se_sgrp, ");
results.Add(" min(se.f_sgtm) min_se_sgtm, ");
results.Add(" min(se.f_test) min_se_test, ");
results.Add(" count(se.f_sgtm) count_se_sgtm ");
results.Add(" from [spcepiworld].[dbo].[sgrp_ext] se ");
results.Add(" where se.f_tsno = 1 ");
results.Add(" and se.f_flag = 0 ");
results.Add($" and se.f_sgtm > {infinityQS} ");
results.Add(" group by se.f_sgtm, se.f_prcs, se.f_lot, se.f_test, se.f_val ");
results.Add(" ) qa ");
results.Add(" where qa.count_se_sgtm > 1 ");
results.Add(" and min_se_lot = max_se_lot ");
results.Add(" and min_se_val = max_se_val ");
results.Add(" and min_se_val = max_se_val ");
results.Add(" and min_se_part = max_se_part ");
results.Add(" and min_se_prcs = max_se_prcs ");
results.Add(" and min_se_sgtm = max_se_sgtm ");
results.Add(" and min_se_test = max_se_test ");
results.Add(" ) qb ");
results.Add(" group by count_se_sgtm, ");
results.Add(" max_se_lot, ");
results.Add(" max_se_part, ");
results.Add(" max_se_prcs, ");
results.Add(" max_se_sgrp, ");
results.Add(" max_se_sgtm, ");
results.Add(" min_se_sgrp ");
results.Add(" ");
results.Add(" ) qc ");
results.Add(" order by max_se_sgrp desc ");
results.Add(" for json path ");
return string.Join(Environment.NewLine, results);
} // cSpell:restore
private static string GetCommandText(Logistics logistics, txt.Description description, string dateTime, long? subGroupId)
{ // cSpell:disable
StringBuilder result = new();
_ = result
.AppendLine(" select iq.ev_count, iq.cl_count, iq.sl_count, iq.se_sgrp, iq.se_sgtm, iq.se_tsno, iq.td_test, iq.pr_name, iq.jd_name, iq.pl_name, iq.pd_name, iq.td_name, iq.se_val ")
.AppendLine(" from ( ")
.AppendLine(" select ")
.AppendLine(" se.f_sgrp se_sgrp, ")
.AppendLine(" se.f_sgtm se_sgtm, ")
.AppendLine(" se.f_tsno se_tsno, ")
.AppendLine(" se.f_val se_val, ")
.AppendLine(" pr.f_name pr_name, ")
.AppendLine(" jd.f_name jd_name, ")
.AppendLine(" pl.f_name pl_name, ")
.AppendLine(" pd.f_name pd_name, ")
.AppendLine(" td.f_test td_test, ")
.AppendLine(" td.f_name td_name, ")
.AppendLine(" (select count(cl.f_part) ")
.AppendLine(" from [spcepiworld].[dbo].[ctrl_lim] cl ")
.AppendLine(" where cl.f_part = pd.f_part ")
.AppendLine(" and cl.f_test = td.f_test ")
.AppendLine(" ) cl_count, ")
.AppendLine(" (select count(sl.f_part) ")
.AppendLine(" from [spcepiworld].[dbo].[spec_lim] sl ")
.AppendLine(" where sl.f_part = pd.f_part ")
.AppendLine(" and sl.f_test = td.f_test ")
.AppendLine(" ) sl_count, ")
.AppendLine(" (select count(ev.f_evnt) ")
.AppendLine(" from [spcepiworld].[dbo].[evnt_inf] ev ")
.AppendLine(" where ev.f_prcs = pr.f_prcs ")
.AppendLine(" and ev.f_part = pd.f_part ")
.AppendLine(" and ev.f_sgtm = se.f_sgtm ")
.AppendLine(" ) ev_count ")
.AppendLine(" from [spcepiworld].[dbo].[sgrp_ext] se ")
.AppendLine(" join [spcepiworld].[dbo].[prcs_dat] pr ")
.AppendLine(" on se.f_prcs = pr.f_prcs ")
.AppendLine(" join [spcepiworld].[dbo].[job_dat] jd ")
.AppendLine(" on se.f_job = jd.f_job ")
.AppendLine(" join [spcepiworld].[dbo].[part_lot] pl ")
.AppendLine(" on se.f_lot = pl.f_lot ")
.AppendLine(" join [spcepiworld].[dbo].[part_dat] pd ")
.AppendLine(" on se.f_part = pd.f_part ")
.AppendLine(" join [spcepiworld].[dbo].[test_dat] td ")
.AppendLine(" on se.f_test = td.f_test ")
.AppendLine(" where se.f_flag = 0 ");
List<string> results = new();
results.Add(" select iq.ev_count, iq.cl_count, iq.sl_count, iq.se_sgrp, iq.se_sgtm, iq.se_tsno, iq.td_test, iq.pr_name, iq.jd_name, iq.pl_name, iq.pd_name, iq.td_name, iq.se_val ");
results.Add(" from ( ");
results.Add(" select ");
results.Add(" se.f_sgrp se_sgrp, ");
results.Add(" se.f_sgtm se_sgtm, ");
results.Add(" se.f_tsno se_tsno, ");
results.Add(" se.f_val se_val, ");
results.Add(" pr.f_name pr_name, ");
results.Add(" jd.f_name jd_name, ");
results.Add(" pl.f_name pl_name, ");
results.Add(" pd.f_name pd_name, ");
results.Add(" td.f_test td_test, ");
results.Add(" td.f_name td_name, ");
results.Add(" (select count(cl.f_part) ");
results.Add(" from [spcepiworld].[dbo].[ctrl_lim] cl ");
results.Add(" where cl.f_part = pd.f_part ");
results.Add(" and cl.f_test = td.f_test ");
results.Add(" ) cl_count, ");
results.Add(" (select count(sl.f_part) ");
results.Add(" from [spcepiworld].[dbo].[spec_lim] sl ");
results.Add(" where sl.f_part = pd.f_part ");
results.Add(" and sl.f_test = td.f_test ");
results.Add(" ) sl_count, ");
results.Add(" (select count(ev.f_evnt) ");
results.Add(" from [spcepiworld].[dbo].[evnt_inf] ev ");
results.Add(" where ev.f_prcs = pr.f_prcs ");
results.Add(" and ev.f_part = pd.f_part ");
results.Add(" and ev.f_sgtm = se.f_sgtm ");
results.Add(" ) ev_count ");
results.Add(" from [spcepiworld].[dbo].[sgrp_ext] se ");
results.Add(" join [spcepiworld].[dbo].[prcs_dat] pr ");
results.Add(" on se.f_prcs = pr.f_prcs ");
results.Add(" join [spcepiworld].[dbo].[job_dat] jd ");
results.Add(" on se.f_job = jd.f_job ");
results.Add(" join [spcepiworld].[dbo].[part_lot] pl ");
results.Add(" on se.f_lot = pl.f_lot ");
results.Add(" join [spcepiworld].[dbo].[part_dat] pd ");
results.Add(" on se.f_part = pd.f_part ");
results.Add(" join [spcepiworld].[dbo].[test_dat] td ");
results.Add(" on se.f_test = td.f_test ");
results.Add(" where se.f_flag = 0 ");
if (subGroupId is not null)
_ = result.Append(" and se.f_sgrp = ").Append(subGroupId).AppendLine(" ");
results.Add($" and se.f_sgrp = {subGroupId} ");
if (!string.IsNullOrEmpty(description.RDS))
_ = result.Append(" and pl.f_name = '").Append(description.RDS).AppendLine("' ");
_ = result
.Append(" and pr.f_name = '").Append(description.Reactor).AppendLine("' ")
.Append(" and pd.f_name = '").Append(description.PSN).AppendLine("' ")
.AppendLine(" and jd.f_name in ('SP101') ")
.Append(" and jd.f_name = '").Append(logistics.MesEntity).AppendLine("' ")
.Append(" and dateadd(HH, -7, (dateadd(SS, convert(bigint, se.f_sgtm), '19700101'))) = '").Append(dateTime).AppendLine("' ")
.AppendLine(" ) as iq ")
.AppendLine(" order by iq.ev_count desc, iq.cl_count desc, iq.sl_count desc, iq.se_sgrp, iq.se_tsno, iq.td_test ")
.AppendLine(" for json path ");
return result.ToString();
results.Add($" and pl.f_name = '{description.RDS}' ");
results.Add($" and pr.f_name = '{description.Reactor}' ");
results.Add($" and pd.f_name = '{description.PSN}' ");
results.Add(" and jd.f_name in ('SP101') ");
results.Add($" and jd.f_name = '{logistics.MesEntity}' ");
results.Add($" and dateadd(HH, -7, (dateadd(SS, convert(bigint, se.f_sgtm), '19700101'))) = '{dateTime}' ");
results.Add(" ) as iq ");
results.Add(" order by iq.ev_count desc, iq.cl_count desc, iq.sl_count desc, iq.se_sgrp, iq.se_tsno, iq.td_test ");
results.Add(" for json path ");
return string.Join(Environment.NewLine, results);
} // cSpell:restore
private static StringBuilder GetForJsonPath(string connectionString, string commandText)
@ -89,27 +199,89 @@ public class FromIQS
return stringBuilder;
}
private static string GetCommandText(List<long> subGroups)
{ // cSpell:disable
List<string> results = new();
results.Add(" update [spcepiworld].[dbo].[sgrp_ext] ");
results.Add(" set f_flag = 1 ");
results.Add(" where f_flag = 0 ");
results.Add($" and f_sgrp in ({string.Join($",{Environment.NewLine} ", subGroups)}) ");
return string.Join(Environment.NewLine, results);
} // cSpell:enable
private static int? ExecuteNonQuery(string connectionString, string commandText)
{
int? result;
if (string.IsNullOrEmpty(connectionString))
result = null;
else
{
using SqlConnection sqlConnection = new(connectionString);
sqlConnection.Open();
using SqlCommand sqlCommand = new(commandText, sqlConnection);
result = sqlCommand.ExecuteNonQuery();
}
return result;
}
private static void FlagDuplicates(string connectionString, string json)
{
JsonElement[]? jsonElements = JsonSerializer.Deserialize<JsonElement[]>(json);
JsonSerializerOptions jsonSerializerOptions = new() { PropertyNameCaseInsensitive = true };
if (jsonElements is not null && jsonElements.Length != 0 && jsonElements[0].ValueKind == JsonValueKind.Object)
{
Root? root;
List<long> collection = new();
JsonElement[] array = jsonElements.ToArray();
foreach (JsonElement jsonElement in array)
{
root = JsonSerializer.Deserialize<Root>(jsonElement.ToString(), jsonSerializerOptions);
if (root is null || root.MaxSeSgrp < 1)
continue;
if (collection.Count > 99)
break;
collection.Add(root.MaxSeSgrp);
}
if (collection.Count > 0)
{
string commandText = GetCommandText(collection);
File.WriteAllText("D:/.sql", commandText);
_ = ExecuteNonQuery(connectionString, commandText);
}
}
}
internal static (long?, int?, string) GetCommandText(string connectionString, Logistics logistics, txt.Description description, long breakAfter, long preWait)
{
string dateTime;
DateTime dateTime;
int? count = null;
string commandText;
long? result = null;
StringBuilder stringBuilder;
string dateFormat = txt.Description.GetDateFormat();
if (DateTime.TryParseExact(description.Date, dateFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateTime dateTimeParsed))
dateTime = dateTimeParsed.ToString("yyyy-MM-dd HH:mm:ss");
dateTime = dateTimeParsed;
else if (DateTime.TryParse(description.Date, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTimeParsed))
dateTime = dateTimeParsed.ToString("yyyy-MM-dd HH:mm:ss");
dateTime = dateTimeParsed;
else
dateTime = logistics.DateTimeFromSequence.ToString("yyyy-MM-dd HH:mm:ss");
commandText = GetCommandText(logistics, description, dateTime, subGroupId: null);
dateTime = logistics.DateTimeFromSequence;
commandText = GetCommandText(dateTime);
try
{
stringBuilder = GetForJsonPath(connectionString, commandText);
if (stringBuilder.Length > 0)
FlagDuplicates(connectionString, stringBuilder.ToString());
}
catch (Exception)
{ stringBuilder = new(); }
_ = stringBuilder.Clear();
commandText = GetCommandText(logistics, description, dateTime.ToString("yyyy-MM-dd HH:mm:ss"), subGroupId: null);
for (short i = 0; i < short.MaxValue; i++)
{
if (DateTime.Now.Ticks > preWait)
break;
Thread.Sleep(100);
}
StringBuilder stringBuilder = new();
for (short z = 0; z < short.MaxValue; z++)
{
stringBuilder = GetForJsonPath(connectionString, commandText);
@ -153,7 +325,7 @@ public class FromIQS
return new(result, count, commandText);
}
private static string GetJson(Logistics logistics, string logisticLines, txt.Description description)
private static string GetJson(Logistics logistics, ProcessDataStandardFormat processDataStandardFormat, txt.Description description)
{
string result;
StringBuilder stringBuilder = new();
@ -173,7 +345,7 @@ public class FromIQS
string safeValue;
string[] segments;
string serializerValue;
foreach (string line in logisticLines.Split(new string[] { Environment.NewLine }, StringSplitOptions.None))
foreach (string line in processDataStandardFormat.Logistics)
{
segments = line.Split('\t');
if (segments.Length < 2)
@ -204,11 +376,11 @@ public class FromIQS
return result;
}
internal static void Save(string openInsightApiECDirectory, Logistics logistics, string reportFullPath, string logisticLines, txt.Description description, string lines, long? subGroupId, string weekOfYear)
internal static void Save(string openInsightApiECDirectory, Logistics logistics, string reportFullPath, ProcessDataStandardFormat processDataStandardFormat, txt.Description description, string lines, long? subGroupId, string weekOfYear)
{
string checkFile;
string fileName = Path.GetFileName(reportFullPath);
string json = GetJson(logistics, logisticLines, description);
string json = GetJson(logistics, processDataStandardFormat, description);
string? ecPathRoot = Path.GetPathRoot(openInsightApiECDirectory);
bool ecExists = ecPathRoot is not null && Directory.Exists(ecPathRoot);
string weekYear = $"{logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}";
@ -224,85 +396,87 @@ public class FromIQS
checkFile = Path.Combine(ecDirectory, $"{logistics.DateTimeFromSequence.Ticks}.json");
if (ecExists && !File.Exists(checkFile))
File.WriteAllText(checkFile, json);
checkFile = Path.Combine(ecDirectory, $"{logistics.DateTimeFromSequence.Ticks}.lbl");
if (ecExists && !File.Exists(checkFile))
File.WriteAllText(checkFile, processDataStandardFormat.Body[processDataStandardFormat.Body.Count - 1]);
}
private static string GetCommandText(string[] iqsCopyValues)
{ // cSpell:disable
StringBuilder result = new();
List<string> results = new();
if (iqsCopyValues.Length != 4)
throw new NotSupportedException();
string find = iqsCopyValues[1];
string replace = iqsCopyValues[3];
_ = result
.AppendLine(" select pd.f_name [Part Name], ")
.AppendLine(" null [Part Revision], ")
.Append(" '").Append(replace).AppendLine("' [Test Name], ")
.AppendLine(" null [Description], ")
.AppendLine(" null [Lot Number], ")
.AppendLine(" null [Job Name], ")
.AppendLine(" null [Process Name], ")
.AppendLine(" case when sl.f_url = 0 then null else sl.f_url end [Reasonable Limit (Upper)], ")
.AppendLine(" case when sl.f_url = 0 then 0 else 1 end [Alarm Reasonable Limit (Upper)], ")
.AppendLine(" case when sl.f_usl = 0 then null else sl.f_usl end [Specification Limit (Upper)], ")
.AppendLine(" case when sl.f_usl = 0 then 0 else 1 end [Alarm Specification Limit (Upper)], ")
.AppendLine(" case when sl.f_ugb = 0 then null else sl.f_ugb end [Warning Limit (Upper)], ")
.AppendLine(" case when sl.f_ugb = 0 then 0 else 1 end [Alarm Warning Limit (Upper)], ")
.AppendLine(" case when sl.f_tar = 0 then null else sl.f_tar end [Specification Limit (Target)], ")
.AppendLine(" case when sl.f_lgb = 0 then null else sl.f_lgb end [Warning Limit (Lower)], ")
.AppendLine(" case when sl.f_lgb = 0 then 0 else 1 end [Alarm Warning Limit (Lower)], ")
.AppendLine(" case when sl.f_lsl = 0 then null else sl.f_lsl end [Specification Limit (Lower)], ")
.AppendLine(" case when sl.f_lsl = 0 then 0 else 1 end [Alarm Specification Limit (Lower)], ")
.AppendLine(" case when sl.f_lrl = 0 then null else sl.f_lrl end [Reasonable Limit (Lower)], ")
.AppendLine(" case when sl.f_lrl = 0 then 0 else 1 end [Alarm Reasonable Limit (Lower)], ")
.AppendLine(" td.f_name [Original Test Name], ")
.AppendLine(" td.f_test [Test Id], ")
.AppendLine(" ( ")
.AppendLine(" select count(sl_b.f_spec) ")
.AppendLine(" from [spcepiworld].[dbo].[spec_lim] sl_b ")
.AppendLine(" join [spcepiworld].[dbo].[part_dat] pd_b ")
.AppendLine(" on sl_b.f_part = pd_b.f_part ")
.AppendLine(" join [spcepiworld].[dbo].[test_dat] td_b ")
.AppendLine(" on sl_b.f_test = td_b.f_test ")
.AppendLine(" where sl_b.f_prcs = 0 ")
.Append(" and td_b.f_name = '").Append(replace).AppendLine("' ")
.AppendLine(" and pd_b.f_name = pd.f_name ")
.AppendLine(" and sl_b.f_url = sl.f_url ")
.AppendLine(" and sl_b.f_usl = sl.f_usl ")
.AppendLine(" and sl_b.f_ugb = sl.f_ugb ")
.AppendLine(" and sl_b.f_tar = sl.f_tar ")
.AppendLine(" and sl_b.f_lgb = sl.f_lgb ")
.AppendLine(" and sl_b.f_lsl = sl.f_lsl ")
.AppendLine(" and sl_b.f_lrl = sl.f_lrl ")
.AppendLine(" group by sl_b.f_spec ")
.AppendLine(" ) count ")
.AppendLine(" from [spcepiworld].[dbo].[spec_lim] sl ")
.AppendLine(" join [spcepiworld].[dbo].[part_dat] pd ")
.AppendLine(" on sl.f_part = pd.f_part ")
.AppendLine(" join [spcepiworld].[dbo].[test_dat] td ")
.AppendLine(" on sl.f_test = td.f_test ")
.AppendLine(" where sl.f_prcs = 0 ")
.Append(" and td.f_name = '").Append(find).AppendLine("' ")
.AppendLine(" and isnull(( ")
.AppendLine(" select count(sl_b.f_spec) ")
.AppendLine(" from [spcepiworld].[dbo].[spec_lim] sl_b ")
.AppendLine(" join [spcepiworld].[dbo].[part_dat] pd_b ")
.AppendLine(" on sl_b.f_part = pd_b.f_part ")
.AppendLine(" join [spcepiworld].[dbo].[test_dat] td_b ")
.AppendLine(" on sl_b.f_test = td_b.f_test ")
.AppendLine(" where sl_b.f_prcs = 0 ")
.Append(" and td_b.f_name = '").Append(replace).AppendLine("' ")
.AppendLine(" and pd_b.f_name = pd.f_name ")
.AppendLine(" and sl_b.f_url = sl.f_url ")
.AppendLine(" and sl_b.f_usl = sl.f_usl ")
.AppendLine(" and sl_b.f_ugb = sl.f_ugb ")
.AppendLine(" and sl_b.f_tar = sl.f_tar ")
.AppendLine(" and sl_b.f_lgb = sl.f_lgb ")
.AppendLine(" and sl_b.f_lsl = sl.f_lsl ")
.AppendLine(" and sl_b.f_lrl = sl.f_lrl ")
.AppendLine(" group by sl_b.f_spec ")
.AppendLine(" ), 0) = 0 ")
.AppendLine(" for json path ");
return result.ToString();
results.Add(" select pd.f_name [Part Name], ");
results.Add(" null [Part Revision], ");
results.Add($" '{replace}' [Test Name], ");
results.Add(" null [Description], ");
results.Add(" null [Lot Number], ");
results.Add(" null [Job Name], ");
results.Add(" null [Process Name], ");
results.Add(" case when sl.f_url = 0 then null else sl.f_url end [Reasonable Limit (Upper)], ");
results.Add(" case when sl.f_url = 0 then 0 else 1 end [Alarm Reasonable Limit (Upper)], ");
results.Add(" case when sl.f_usl = 0 then null else sl.f_usl end [Specification Limit (Upper)], ");
results.Add(" case when sl.f_usl = 0 then 0 else 1 end [Alarm Specification Limit (Upper)], ");
results.Add(" case when sl.f_ugb = 0 then null else sl.f_ugb end [Warning Limit (Upper)], ");
results.Add(" case when sl.f_ugb = 0 then 0 else 1 end [Alarm Warning Limit (Upper)], ");
results.Add(" case when sl.f_tar = 0 then null else sl.f_tar end [Specification Limit (Target)], ");
results.Add(" case when sl.f_lgb = 0 then null else sl.f_lgb end [Warning Limit (Lower)], ");
results.Add(" case when sl.f_lgb = 0 then 0 else 1 end [Alarm Warning Limit (Lower)], ");
results.Add(" case when sl.f_lsl = 0 then null else sl.f_lsl end [Specification Limit (Lower)], ");
results.Add(" case when sl.f_lsl = 0 then 0 else 1 end [Alarm Specification Limit (Lower)], ");
results.Add(" case when sl.f_lrl = 0 then null else sl.f_lrl end [Reasonable Limit (Lower)], ");
results.Add(" case when sl.f_lrl = 0 then 0 else 1 end [Alarm Reasonable Limit (Lower)], ");
results.Add(" td.f_name [Original Test Name], ");
results.Add(" td.f_test [Test Id], ");
results.Add(" ( ");
results.Add(" select count(sl_b.f_spec) ");
results.Add(" from [spcepiworld].[dbo].[spec_lim] sl_b ");
results.Add(" join [spcepiworld].[dbo].[part_dat] pd_b ");
results.Add(" on sl_b.f_part = pd_b.f_part ");
results.Add(" join [spcepiworld].[dbo].[test_dat] td_b ");
results.Add(" on sl_b.f_test = td_b.f_test ");
results.Add(" where sl_b.f_prcs = 0 ");
results.Add($" and td_b.f_name = '{replace}' ");
results.Add(" and pd_b.f_name = pd.f_name ");
results.Add(" and sl_b.f_url = sl.f_url ");
results.Add(" and sl_b.f_usl = sl.f_usl ");
results.Add(" and sl_b.f_ugb = sl.f_ugb ");
results.Add(" and sl_b.f_tar = sl.f_tar ");
results.Add(" and sl_b.f_lgb = sl.f_lgb ");
results.Add(" and sl_b.f_lsl = sl.f_lsl ");
results.Add(" and sl_b.f_lrl = sl.f_lrl ");
results.Add(" group by sl_b.f_spec ");
results.Add(" ) count ");
results.Add(" from [spcepiworld].[dbo].[spec_lim] sl ");
results.Add(" join [spcepiworld].[dbo].[part_dat] pd ");
results.Add(" on sl.f_part = pd.f_part ");
results.Add(" join [spcepiworld].[dbo].[test_dat] td ");
results.Add(" on sl.f_test = td.f_test ");
results.Add(" where sl.f_prcs = 0 ");
results.Add($" and td.f_name = '{find}' ");
results.Add(" and isnull(( ");
results.Add(" select count(sl_b.f_spec) ");
results.Add(" from [spcepiworld].[dbo].[spec_lim] sl_b ");
results.Add(" join [spcepiworld].[dbo].[part_dat] pd_b ");
results.Add(" on sl_b.f_part = pd_b.f_part ");
results.Add(" join [spcepiworld].[dbo].[test_dat] td_b ");
results.Add(" on sl_b.f_test = td_b.f_test ");
results.Add(" where sl_b.f_prcs = 0 ");
results.Add($" and td_b.f_name = '{replace}' ");
results.Add(" and pd_b.f_name = pd.f_name ");
results.Add(" and sl_b.f_url = sl.f_url ");
results.Add(" and sl_b.f_usl = sl.f_usl ");
results.Add(" and sl_b.f_ugb = sl.f_ugb ");
results.Add(" and sl_b.f_tar = sl.f_tar ");
results.Add(" and sl_b.f_lgb = sl.f_lgb ");
results.Add(" and sl_b.f_lsl = sl.f_lsl ");
results.Add(" and sl_b.f_lrl = sl.f_lrl ");
results.Add(" group by sl_b.f_spec ");
results.Add(" ), 0) = 0 ");
results.Add(" for json path ");
return string.Join(Environment.NewLine, results);
} // cSpell:restore
internal static void SaveCopy(string fileConnectorConfigurationSourceFileLocation, string connectionString, string name, string[] iqsCopyValues)

View File

@ -0,0 +1,47 @@
using System;
using System.Text.Json.Serialization;
namespace Adaptation.FileHandlers.OpenInsight;
public class Root
{
public long CountSeSgtm { get; } // [JsonPropertyName("count_se_sgtm")]
public DateTime DateTime { get; } // [JsonPropertyName("date_time")]
public long MaxMaxSeTest { get; } // [JsonPropertyName("max_max_se_test")]
public string MaxMaxSeTestName { get; } // [JsonPropertyName("max_max_se_test_name")]
public double MaxMaxSeVal { get; } // [JsonPropertyName("max_max_se_val")]
public long MaxSeLot { get; } // [JsonPropertyName("max_se_lot")]
public string MaxSeLotName { get; } // [JsonPropertyName("max_se_lot_name")]
public long MaxSePart { get; } // [JsonPropertyName("max_se_part")]
public string MaxSePartName { get; } // [JsonPropertyName("max_se_part_name")]
public long MaxSePrcs { get; } // [JsonPropertyName("max_se_prcs")]
public string MaxSePrcsName { get; } // [JsonPropertyName("max_se_prcs_name")]
public long MaxSeSgrp { get; } // [JsonPropertyName("max_se_sgrp")]
public long MinMinSeTest { get; } // [JsonPropertyName("min_min_se_test")]
public string MinMinSeTestName { get; } // [JsonPropertyName("min_min_se_test_name")]
public double MinMinSeVal { get; } // [JsonPropertyName("min_min_se_val")]
public long MinSeSgrp { get; } // [JsonPropertyName("min_se_sgrp")]
[JsonConstructor]
public Root(long countSeSgtm, DateTime dateTime, long maxMaxSeTest, string maxMaxSeTestName, double maxMaxSeVal, long maxSeLot, string maxSeLotName, long maxSePart, string maxSePartName, long maxSePrcs, string maxSePrcsName, long maxSeSgrp, long minMinSeTest, string minMinSeTestName, double minMinSeVal, long minSeSgrp)
{
CountSeSgtm = countSeSgtm;
DateTime = dateTime;
MaxMaxSeTest = maxMaxSeTest;
MaxMaxSeTestName = maxMaxSeTestName;
MaxMaxSeVal = maxMaxSeVal;
MaxSeLot = maxSeLot;
MaxSeLotName = maxSeLotName;
MaxSePart = maxSePart;
MaxSePartName = maxSePartName;
MaxSePrcs = maxSePrcs;
MaxSePrcsName = maxSePrcsName;
MaxSeSgrp = maxSeSgrp;
MinMinSeTest = minMinSeTest;
MinMinSeTestName = minMinSeTestName;
MinMinSeVal = minMinSeVal;
MinSeSgrp = minSeSgrp;
}
}

View File

@ -19,7 +19,7 @@ public class FileRead : Shared.FileRead, IFileRead
private readonly string _OpenInsightMetrologyViewerAPI;
private readonly string _OpenInsightMetrologyViewerFileShare;
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{
_MinFileLength = 10;
@ -121,16 +121,16 @@ public class FileRead : Shared.FileRead, IFileRead
_ = Directory.CreateDirectory(checkDirectory);
File.Copy(reportFullPath, Path.Combine(checkDirectory, Path.GetFileName(reportFullPath)), overwrite: true);
(string jsonResults, WS.Results wsResults) = WS.SendData(_OpenInsightMetrologyViewerAPI, _Logistics.Sequence, directory, wsRequest);
if (!wsResults.Success)
throw new Exception(wsResults.ToString());
_Log.Debug(wsResults.HeaderID);
if (wsResults.Success is null || !wsResults.Success.Value)
throw new Exception(jsonResults);
_Log.Debug(wsResults.HeaderId);
lock (_StaticRuns)
{
if (!_StaticRuns.ContainsKey(_Logistics.Sequence))
_StaticRuns.Add(_Logistics.Sequence, new());
_StaticRuns[_Logistics.Sequence].Add(jsonResults);
_StaticRuns[_Logistics.Sequence].Add(wsResults);
}
checkDirectory = Path.Combine(directory, $"-{wsResults.HeaderID}");
checkDirectory = Path.Combine(directory, $"-{wsResults.HeaderId}");
if (!Directory.Exists(checkDirectory))
_ = Directory.CreateDirectory(checkDirectory);
File.Copy(reportFullPath, Path.Combine(checkDirectory, Path.GetFileName(reportFullPath)), overwrite: true);
@ -139,15 +139,15 @@ public class FileRead : Shared.FileRead, IFileRead
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
{
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath);
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
SetFileParameterLotIDToLogisticsMID();
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
List<txt.Description> descriptions = txt.ProcessData.GetDescriptions(jsonElements);
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
SendData(reportFullPath, dateTime, descriptions);
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics[0]), tests, jsonElements, new List<FileInfo>());
return results;
}

View File

@ -6,7 +6,6 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text.Json;
namespace Adaptation.FileHandlers.OpenInsightMetrologyViewer;
@ -607,8 +606,12 @@ public class WSRequest
Details.Add(detail);
}
Date = logistics.DateTimeFromSequence.ToString();
if (UniqueID is null && Details.Count != 0)
UniqueID = Details[0].HeaderUniqueID;
UniqueID = $"{logistics.JobID}_{logistics.MID}_{logistics.DateTimeFromSequence:yyyyMMddHHmmssffff}";
for (int i = 0; i < Details.Count; i++)
{
Details[i].HeaderUniqueID = UniqueID;
Details[i].UniqueID = $"{logistics.JobID}_{logistics.MID}_{logistics.DateTimeFromSequence:yyyyMMddHHmmssffff}_Item-{i + 1}";
}
}
/// <summary>
@ -632,29 +635,30 @@ public class WSRequest
return result;
}
internal static long GetHeaderId(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, DateTime dateTime, int weekOfYear, string json, List<txt.Description> descriptions)
internal static long GetHeaderId(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, string openInsightMetrologyViewerFileShare, int weekOfYear, WS.Results results, List<txt.Description> descriptions)
{
long result;
if (string.IsNullOrEmpty(json))
if (results is not null && results.HeaderId is not null)
result = results.HeaderId.Value;
else
{
WSRequest wsRequest = new(fileRead, logistics, descriptions);
string directory = Path.Combine(openInsightMetrologyViewerAPI, dateTime.Year.ToString(), $"WW{weekOfYear:00}");
(json, WS.Results wsResults) = WS.SendData(openInsightMetrologyViewerAPI, logistics.Sequence, directory, wsRequest);
if (!wsResults.Success)
string directory = Path.Combine(openInsightMetrologyViewerFileShare, logistics.DateTimeFromSequence.Year.ToString(), $"WW{weekOfYear:00}");
(_, WS.Results wsResults) = WS.SendData(openInsightMetrologyViewerAPI, logistics.Sequence, directory, wsRequest);
if (wsResults.Success is null || !wsResults.Success.Value)
throw new Exception(wsResults.ToString());
result = wsResults.HeaderId.Value;
}
WS.Results metrologyWSRequest = JsonSerializer.Deserialize<WS.Results>(json, new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
result = metrologyWSRequest.HeaderID;
return result;
}
#pragma warning disable IDE0060
internal static void PostOpenInsightMetrologyViewerAttachments(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, string ghostPCLFileName, List<txt.Description> descriptions, string matchDirectory, string subGroupId, long headerId, string headerIdDirectory)
internal static void PostOpenInsightMetrologyViewerAttachments(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, string ghostPCLFileName, List<txt.Description> descriptions, string matchDirectory, WS.Results results, string headerIdDirectory)
#pragma warning restore IDE0060
{
string[] summaryFiles = Directory.GetFiles(matchDirectory, "*.txt", SearchOption.TopDirectoryOnly);
if (summaryFiles.Length != 1)
throw new Exception($"Invalid source file count for <{headerId}>!");
throw new Exception($"Invalid source file count for <{results.HeaderId}>!");
string[] prnFiles = Directory.GetFiles(matchDirectory, "WaferMap*.prn", SearchOption.TopDirectoryOnly);
List<string> pdfFiles = new();
foreach (string prnFile in prnFiles.OrderBy(l => l))
@ -664,7 +668,7 @@ public class WSRequest
List<WS.Attachment> dataAttachments = new();
List<WS.Attachment> headerAttachments = new()
{
new WS.Attachment(subGroupId, headerId, headerIdDirectory, descriptions[0].HeaderUniqueId, "Data.txt", summaryFiles[0])
new WS.Attachment(results, headerIdDirectory, $"{logistics.JobID}_{logistics.MID}_{logistics.DateTimeFromSequence:yyyyMMddHHmmssffff}", "Data.txt", summaryFiles[0])
};
int count;
if (pdfFiles.Count < descriptions.Count)
@ -674,7 +678,7 @@ public class WSRequest
for (int i = 0; i < count; i++)
{
if (!string.IsNullOrEmpty(pdfFiles[i]))
dataAttachments.Add(new WS.Attachment(subGroupId, headerId, headerIdDirectory, descriptions[i].UniqueId, "Image.pdf", pdfFiles[i]));
dataAttachments.Add(new WS.Attachment(results, headerIdDirectory, $"{logistics.JobID}_{logistics.MID}_{logistics.DateTimeFromSequence:yyyyMMddHHmmssffff}_Item-{i + 1}", "Image.pdf", pdfFiles[i]));
}
if (dataAttachments.Count == 0 || dataAttachments.Count != descriptions.Count)
throw new Exception($"Invalid attachment count! {dataAttachments.Count} != {descriptions.Count}");

View File

@ -19,7 +19,7 @@ public class FileRead : Shared.FileRead, IFileRead
private readonly string _OpenInsightMetrologyViewerAPI;
private readonly string _OpenInsightMetrologyViewerFileShare;
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{
_MinFileLength = 10;
@ -115,13 +115,14 @@ public class FileRead : Shared.FileRead, IFileRead
#nullable enable
private string? GetHeaderIdDirectory(DateTime[] dateTimes, long headerId)
private string? GetHeaderIdDirectory(long headerId)
{
string? result = null;
int weekNum;
string year;
string weekDirectory;
string checkDirectory;
DateTime[] dateTimes = new DateTime[] { _Logistics.DateTimeFromSequence, _Logistics.DateTimeFromSequence.AddDays(-6.66) };
foreach (DateTime dateTime in dateTimes)
{
year = dateTime.Year.ToString();
@ -138,47 +139,43 @@ public class FileRead : Shared.FileRead, IFileRead
return result;
}
private void PostOpenInsightMetrologyViewerAttachments(DateTime dateTime, List<txt.Description> descriptions)
private void PostOpenInsightMetrologyViewerAttachments(List<txt.Description> descriptions)
{
string? json;
string? subGroupId;
Shared.Metrology.WS.Results? results;
string jobIdDirectory = Path.Combine(Path.GetDirectoryName(_FileConnectorConfiguration.AlternateTargetFolder) ?? throw new Exception(), _Logistics.JobID);
if (!Directory.Exists(jobIdDirectory))
_ = Directory.CreateDirectory(jobIdDirectory);
string[] matchDirectories = GetInProcessDirectory(jobIdDirectory);
if (!_StaticRuns.TryGetValue(_Logistics.Sequence, out List<string>? values))
(json, subGroupId) = (null, null);
if (!_StaticRuns.TryGetValue(_Logistics.Sequence, out List<Shared.Metrology.WS.Results>? wsResults))
results = null;
else
{
if (values.Count != 1)
throw new Exception($"{nameof(_StaticRuns)} {values.Count} != 1 {_Logistics.Sequence}!");
string[] segments = values[0].Split(new string[] { "|" }, StringSplitOptions.None);
json = segments[0];
subGroupId = segments.Length > 1 ? segments[1] : null;
lock (_StaticRuns)
_ = _StaticRuns.Remove(_Logistics.Sequence);
if (wsResults is null || wsResults.Count != 1)
throw new NullReferenceException($"{nameof(wsResults)} {wsResults?.Count} != 1 {_Logistics.Sequence}!");
results = wsResults[0];
}
DateTime[] dateTimes = new DateTime[] { dateTime, dateTime.AddDays(-6.66) };
int weekOfYear = _Calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday);
long headerId = OpenInsightMetrologyViewer.WSRequest.GetHeaderId(this, _Logistics, _OpenInsightMetrologyViewerAPI, dateTime, weekOfYear, json, descriptions);
string? headerIdDirectory = GetHeaderIdDirectory(dateTimes, headerId);
int weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday);
long headerId = !_IsEAFHosted ? -1 : OpenInsightMetrologyViewer.WSRequest.GetHeaderId(this, _Logistics, _OpenInsightMetrologyViewerAPI, _OpenInsightMetrologyViewerFileShare, weekOfYear, results, descriptions);
string? headerIdDirectory = GetHeaderIdDirectory(headerId);
if (string.IsNullOrEmpty(headerIdDirectory))
throw new Exception($"Didn't find header id directory <{headerId}>");
OpenInsightMetrologyViewer.WSRequest.PostOpenInsightMetrologyViewerAttachments(this, _Logistics, _OpenInsightMetrologyViewerAPI, _GhostPCLFileName, descriptions, matchDirectories[0], subGroupId, headerId, headerIdDirectory);
OpenInsightMetrologyViewer.WSRequest.PostOpenInsightMetrologyViewerAttachments(this, _Logistics, _OpenInsightMetrologyViewerAPI, _GhostPCLFileName, descriptions, matchDirectories[0], results, headerIdDirectory);
}
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
{
if (dateTime == DateTime.MinValue)
throw new ArgumentNullException(nameof(dateTime));
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath);
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
SetFileParameterLotIDToLogisticsMID();
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
List<txt.Description> descriptions = txt.ProcessData.GetDescriptions(jsonElements);
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
PostOpenInsightMetrologyViewerAttachments(dateTime, descriptions);
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
PostOpenInsightMetrologyViewerAttachments(descriptions);
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics[0]), tests, jsonElements, new List<FileInfo>());
return results;
}

View File

@ -17,7 +17,7 @@ public class FileRead : Shared.FileRead, IFileRead
private readonly string _JobIdParentDirectory;
private readonly string _JobIdProcessParentDirectory;
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{
_MinFileLength = 10;
@ -108,10 +108,10 @@ public class FileRead : Shared.FileRead, IFileRead
return results;
}
#pragma warning disable IDE0060
private void DirectoryMove(string reportFullPath, DateTime dateTime, List<txt.Description> descriptions)
#pragma warning restore IDE0060
{
if (dateTime == DateTime.MinValue)
throw new ArgumentNullException(nameof(dateTime));
FileInfo fileInfo = new(reportFullPath);
string logisticsSequence = _Logistics.Sequence.ToString();
string jobIdDirectory = Path.Combine(_JobIdParentDirectory, _Logistics.JobID);
@ -129,23 +129,50 @@ public class FileRead : Shared.FileRead, IFileRead
string destinationJobIdDirectory = Path.Combine(_JobIdProcessParentDirectory, _Logistics.JobID, directoryName);
string sequenceDirectory = Path.Combine(destinationJobIdDirectory, logisticsSequence);
string jsonFileName = Path.Combine(sequenceDirectory, $"{Path.GetFileNameWithoutExtension(reportFullPath)}.json");
MoveMatchingFile(jobIdDirectory, matchDirectories[0]);
Directory.Move(matchDirectories[0], destinationJobIdDirectory);
if (!Directory.Exists(sequenceDirectory))
_ = Directory.CreateDirectory(sequenceDirectory);
File.Copy(reportFullPath, Path.Combine(sequenceDirectory, Path.GetFileName(reportFullPath)), overwrite: true);
File.WriteAllText(jsonFileName, json);
lock (_StaticRuns)
_ = _StaticRuns.Remove(_Logistics.Sequence);
}
private static void MoveMatchingFile(string jobIdDirectory, string matchDirectory)
{
string checkFile;
string jobIdDirectoryFileName;
string matchDirectoryFileName;
string[] jobIdDirectoryFiles = Directory.GetFiles(jobIdDirectory, "*", SearchOption.TopDirectoryOnly);
string[] matchDirectoryFiles = Directory.GetFiles(matchDirectory, "*", SearchOption.TopDirectoryOnly);
foreach (string jobIdDirectoryFile in jobIdDirectoryFiles)
{
jobIdDirectoryFileName = Path.GetFileName(jobIdDirectoryFile);
foreach (string matchDirectoryFile in matchDirectoryFiles)
{
matchDirectoryFileName = Path.GetFileName(matchDirectoryFile);
if (jobIdDirectoryFileName.StartsWith(matchDirectoryFileName))
{
checkFile = Path.Combine(matchDirectory, jobIdDirectoryFileName);
if (File.Exists(checkFile))
continue;
File.Move(jobIdDirectoryFile, checkFile);
}
}
}
}
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
{
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath);
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
SetFileParameterLotIDToLogisticsMID();
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
List<txt.Description> descriptions = txt.ProcessData.GetDescriptions(jsonElements);
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics[0]), tests, jsonElements, new List<FileInfo>());
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
DirectoryMove(reportFullPath, dateTime, descriptions);
else if (!_IsEAFHosted)

View File

@ -14,7 +14,7 @@ namespace Adaptation.FileHandlers.SPaCe;
public class FileRead : Shared.FileRead, IFileRead
{
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{
_MinFileLength = 10;
@ -117,15 +117,15 @@ public class FileRead : Shared.FileRead, IFileRead
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
{
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath);
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
SetFileParameterLotIDToLogisticsMID();
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
FileCopy(reportFullPath, dateTime, descriptions);
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics[0]), tests, jsonElements, new List<FileInfo>());
return results;
}

View File

@ -6,6 +6,7 @@ using Adaptation.Shared.Methods;
using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Http;
using System.Text.Json;
namespace Adaptation.FileHandlers.TIBCO;
@ -17,11 +18,12 @@ public class FileRead : Shared.FileRead, IFileRead
public const string BarcodeHostFileShare = @"\\mesfs.infineon.com\EC_Metrology_Si\BarcodeHost\API";
public const string MetrologyFileShare = @"\\mesfs.infineon.com\EC_Metrology_Si\WorkMaterialOut\API";
public const string OpenInsightApplicationProgrammingInterface = @"http://oi-metrology-viewer-api.mes.infineon.com:8080/api/oiWizard";
public const string LSL2SQLConnectionString = @"Data Source=messqlec1.infineon.com\PROD1,53959;Initial Catalog=LSL2SQL;Persist Security Info=True;User ID=srpadmin;Password=0okm9ijn;";
private long? _TickOffset;
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{ // cSpell:restore
_MinFileLength = 10;
@ -42,6 +44,9 @@ public class FileRead : Shared.FileRead, IFileRead
string metrologyFileShare = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Metrology.FileShare");
if (metrologyFileShare != MetrologyFileShare)
throw new NotSupportedException($"Update configuration for [{nameof(MetrologyFileShare)}]");
string openInsightApplicationProgrammingInterface = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "OpenInsight.Application.Programming.Interface");
if (openInsightApplicationProgrammingInterface != OpenInsightApplicationProgrammingInterface)
throw new NotSupportedException($"Update configuration for [{nameof(OpenInsightApplicationProgrammingInterface)}]");
ModelObjectParameterDefinition[] tibcoParameters = GetProperties(cellInstanceConnectionName, modelObjectParameters, "TIBCO.");
string tibcoParameterChannel = GetPropertyValue(cellInstanceConnectionName, tibcoParameters, "TIBCO.IFX_CHANNEL");
string tibcoParameterSubject = GetPropertyValue(cellInstanceConnectionName, tibcoParameters, "TIBCO.IFX_SUBJECT");
@ -54,7 +59,8 @@ public class FileRead : Shared.FileRead, IFileRead
throw new Exception($"Unable to access file-share <{BarcodeHostFileShare}>");
if (_IsEAFHosted)
{
Transport.Main.Initialize(smtp, cellInstanceName, fileConnectorConfiguration, LSL2SQLConnectionString, MetrologyFileShare, BarcodeHostFileShare);
HttpClient httpClient = new() { BaseAddress = new(OpenInsightApplicationProgrammingInterface) };
Transport.Main.Initialize(smtp, cellInstanceName, fileConnectorConfiguration, LSL2SQLConnectionString, MetrologyFileShare, BarcodeHostFileShare, httpClient);
if (!string.IsNullOrEmpty(fileConnectorConfiguration.SourceFileLocation))
_ = Transport.Main.Setup(useSleep: true, setIfxTransport: true, tibcoParameterChannel, tibcoParameterSubjectPrefix, tibcoParameterConfigurationLocation, tibcoParameterConfigurationLocationCopy, tibcoParameterSubject);
else
@ -139,8 +145,10 @@ public class FileRead : Shared.FileRead, IFileRead
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
{
if (dateTime == DateTime.MinValue)
throw new ArgumentNullException(nameof(dateTime));
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, Array.Empty<Test>(), Array.Empty<JsonElement>(), new List<FileInfo>());
_TickOffset ??= new FileInfo(reportFullPath).LastWriteTime.Ticks - dateTime.Ticks;
_TickOffset ??= 0; // new FileInfo(reportFullPath).LastWriteTime.Ticks - dateTime.Ticks;
_Logistics = new Logistics(this, _TickOffset.Value, reportFullPath, useSplitForMID: true);
SetFileParameterLotIDToLogisticsMID();
return results;

View File

@ -1,21 +1,30 @@
namespace Adaptation.FileHandlers.TIBCO.Transport;
#nullable enable
public class Common
{
public string Layer { get; }
public string PSN { get; }
public string? Layer { get; }
public string? PSN { get; }
public int? RDSNumber { get; }
public int? ReactorNumber { get; }
public string Zone { get; }
public string? Zone { get; }
public string? Employee { get; }
public Common(string layer, string psn, int? rdsNumber, int? reactor, string zone)
public Common(string? layer,
string? psn,
int? rdsNumber,
int? reactor,
string? zone,
string? employee)
{
Layer = layer;
PSN = psn;
RDSNumber = rdsNumber;
ReactorNumber = reactor;
Zone = zone;
Employee = employee;
}
}

View File

@ -1,24 +1,26 @@
namespace Adaptation.FileHandlers.TIBCO.Transport;
#nullable enable
public class Input
{
public string Area { get; }
public string EquipmentType { get; }
public string MID { get; }
public string Slot { get; }
public string MesEntity { get; }
public string Recipe { get; }
public string Sequence { get; }
public string? Area { get; }
public string? EquipmentType { get; }
public string? MID { get; }
public string? Slot { get; }
public string? MesEntity { get; }
public string? Recipe { get; }
public string? Sequence { get; }
[System.Text.Json.Serialization.JsonConstructor]
public Input(string area,
string equipmentType,
string mid,
string slot,
string mesEntity,
string recipe,
string sequence)
public Input(string? area,
string? equipmentType,
string? mid,
string? slot,
string? mesEntity,
string? recipe,
string? sequence)
{
Area = area;
@ -30,7 +32,7 @@ public class Input
Sequence = sequence;
}
internal Input(Input input, string mid)
internal Input(Input input, string? mid)
{
Area = input.Area;
EquipmentType = input.EquipmentType;

View File

@ -5,39 +5,43 @@ using System.Data.SqlClient;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace Adaptation.FileHandlers.TIBCO.Transport;
#nullable enable
public partial class Job
{
public string AutomationMode { get; }
public string BasicType { get; }
public string CreationUser { get; }
public string Equipment { get; }
public string JobName { get; }
public string LastUpdateUser { get; }
public string LotName { get; }
public string LotState { get; }
public string PackageName { get; }
public string ProcessSpecName { get; }
public string ProcessType { get; }
public string ProductName { get; }
public string Qty { get; }
public string Qty2 { get; }
public string RecipeName { get; }
public string SpecName { get; }
public string StateModel { get; }
public string Status { get; }
public string? AutomationMode { get; }
public string? BasicType { get; }
public string? CreationUser { get; }
public string? Equipment { get; }
public string? JobName { get; }
public string? LastUpdateUser { get; }
public string? LotName { get; }
public string? LotState { get; }
public string? PackageName { get; }
public string? ProcessSpecName { get; }
public string? ProcessType { get; }
public string? ProductName { get; }
public string? Qty { get; }
public string? Qty2 { get; }
public string? RecipeName { get; }
public string? SpecName { get; }
public string? StateModel { get; }
public string? Status { get; }
//
public bool IsAreaSi { get; }
public DateTime DateTime { get; }
public List<Item> Items { get; }
public Job(string lsl2SQLConnectionString, string metrologyFileShare, string barcodeHostFileShare, string mid)
public Job(string lsl2SQLConnectionString, string metrologyFileShare, string barcodeHostFileShare, HttpClient httpClient, string mid)
{
const int zero = 0;
Items = new List<Item>();
@ -54,30 +58,44 @@ public partial class Job
const string bioRad3 = "BIORAD3";
const string twoAlphaPattern = "^[a-zA-z]{2,3}";
const string reactorNumberPattern = @"^[0-9]{2}--";
Input input = JsonSerializer.Deserialize<Input>(mid);
Input input = JsonSerializer.Deserialize<Input>(mid) ?? throw new Exception();
if (!long.TryParse(input.Sequence, out long sequence))
DateTime = DateTime.Now;
else
DateTime = new DateTime(sequence);
if (!string.IsNullOrEmpty(input.MID) && !string.IsNullOrEmpty(input.MesEntity) && Regex.IsMatch(input.MID, reactorNumberPattern) && input.MesEntity is bioRad2 or bioRad3)
const string dep08CEPIEPSILON = "DEP08CEPIEPSILON";
if (input.EquipmentType == dep08CEPIEPSILON)
(common, workOrder) = Get(input, httpClient);
else if (!string.IsNullOrEmpty(input.MID) && !string.IsNullOrEmpty(input.MesEntity) && Regex.IsMatch(input.MID, reactorNumberPattern) && input.MesEntity is bioRad2 or bioRad3)
(common, workOrder) = Get(input, barcodeHostFileShare);
else
{
workOrder = GetWorkOrder(input);
reactorNumber = GetReactorNumber(input);
if (workOrder.IsWorkOrder || reactorNumber.HasValue)
common = new(string.Empty, string.Empty, null, null, string.Empty);
common = new(layer: null,
psn: null,
rdsNumber: null,
reactor: null,
zone: null,
employee: null);
else if (!string.IsNullOrEmpty(input.MID) && input.MID.Length is 2 or 3 && Regex.IsMatch(input.MID, twoAlphaPattern))
common = Get(metrologyFileShare, input);
common = GetTwoAlphaPattern(metrologyFileShare, input);
else
common = Get(input);
}
if (IsValid(common.RDSNumber))
bool isValid = IsValid(common.RDSNumber);
if (isValid)
commonB = GetWithValidRDS(lsl2SQLConnectionString, common.Layer, common.PSN, common.RDSNumber, common.ReactorNumber, common.Zone);
else if (workOrder.IsWorkOrder || common.RDSNumber.HasValue)
commonB = Get(lsl2SQLConnectionString, common.Layer, common.PSN, common.ReactorNumber, workOrder.SlotNumber, workOrder.WorkOrderNumber, workOrder.WorkOrderCassette, common.Zone);
else
commonB = new(hyphen, hyphen, common.RDSNumber, common.PSN, common.ReactorNumber, hyphen);
commonB = new(comment: hyphen,
layer: hyphen,
rdsNumber: common.RDSNumber,
psn: common.PSN,
reactorNumber: common.ReactorNumber,
zone: hyphen);
Qty = "1";
Status = hyphen; // INFO
CreationUser = hyphen; // ?
@ -95,7 +113,7 @@ public partial class Job
ProductName = !string.IsNullOrEmpty(commonB.PSN) ? commonB.PSN : hyphen; // PRODUCT
ProcessSpecName = !string.IsNullOrEmpty(commonB.Zone) ? commonB.Zone : hyphen; // WAFER_POS
BasicType = !string.IsNullOrEmpty(commonB.Comment) ? commonB.Comment : hyphen; // BASIC_TYPE
LotName = commonB.RDSNumber is not null ? commonB.RDSNumber.Value.ToString() : hyphen; // MID
LotName = commonB.RDSNumber is not null ? commonB.RDSNumber.Value.ToString() : input.MID; // MID
ProcessType = commonB.ReactorNumber is not null ? commonB.ReactorNumber.Value.ToString() : hyphen; // PROCESS_JOBID
Items.Add(new Item { Name = "0", Type = "NA", Number = (0 + 1).ToString(), Qty = "1", CarrierName = hyphen });
}
@ -116,6 +134,7 @@ public partial class Job
private static WorkOrder GetWorkOrder(Input input)
{
WorkOrder result;
int? slotNumber;
int? workOrderStep = null;
int? workOrderNumber = null;
@ -149,48 +168,53 @@ public partial class Job
slotNumber = null;
else
slotNumber = slot;
return new(workOrderNumber, workOrderStep, workOrderCassette, slotNumber, workOrderStep is not null || workOrderNumber is not null || workOrderCassette is not null);
result = new(workOrderNumber: workOrderNumber,
workOrderStep: workOrderStep,
workOrderCassette: workOrderCassette,
slotNumber: slotNumber,
isWorkOrder: workOrderStep is not null || workOrderNumber is not null || workOrderCassette is not null);
return result;
}
private static bool IsValid(int? rdsNumber) => !IsInvalid(rdsNumber);
private static bool IsInvalid(int? rdsNumber) => rdsNumber is null or < 100000 or > 100000000;
private static (string, string) GetReactorAndRDS(string defaultReactor, string defaultRDS, string text, string formattedText, string[] segments)
private static (string?, string?) GetReactorAndRDS(string? text, string formattedText, string[] segments)
{
string rds;
string reactor;
if (string.IsNullOrEmpty(text) || segments.Length == 0 || string.IsNullOrEmpty(formattedText))
reactor = defaultReactor;
string? rds;
string? reactor;
if (string.IsNullOrEmpty(text) || segments.Length < 1 || string.IsNullOrEmpty(formattedText))
reactor = null;
else
reactor = segments[0];
if (segments.Length <= 1 || !int.TryParse(segments[1], out int rdsValue) || rdsValue < 99)
rds = defaultRDS;
if (segments.Length < 2 || !int.TryParse(segments[1], out int rdsValue) || rdsValue < 99)
rds = null;
else
rds = segments[1];
if (reactor.Length > 3)
if (!string.IsNullOrEmpty(reactor) && reactor.Length > 3)
{
rds = reactor;
reactor = defaultReactor;
reactor = null;
}
return new(reactor, rds);
}
private static (string, string) GetLayerAndPSN(string defaultLayer, string defaultPSN, string[] segments)
private static (string?, string?) GetLayerAndPSN(string[] segments)
{
string psn;
string layer;
string? psn;
string? layer;
if (segments.Length <= 2)
{
psn = defaultPSN;
layer = defaultLayer;
psn = null;
layer = null;
}
else
{
string[] segmentsB = segments[2].Split('.');
psn = segmentsB[0];
if (segmentsB.Length <= 1)
layer = defaultLayer;
layer = null;
else
{
layer = segmentsB[1];
@ -201,11 +225,11 @@ public partial class Job
return (layer, psn);
}
private static string GetZone(string[] segments)
private static string? GetZone(string[] segments)
{
string result;
string? result;
if (segments.Length <= 3)
result = string.Empty;
result = null;
else
{
result = segments[3];
@ -217,39 +241,45 @@ public partial class Job
private static Common Get(Input input)
{
string psn;
string rds;
string zone;
string layer;
int rdsNumber;
string reactor;
string? psn;
string? rds;
int rdsCheck;
string? zone;
string? layer;
int? rdsNumber;
string? reactor;
string? employee;
int? reactorNumber;
string defaultPSN = string.Empty;
string defaultRDS = string.Empty;
string defaultLayer = string.Empty;
string defaultReactor = string.Empty;
string[] segments = input.MID.Split(new char[] { '-' });
// bool hasRDS = Regex.IsMatch(input.MID, "[-]?([QP][0-9]{4,}|[0-9]{5,})[-]?");
string formattedText = Regex.Replace(input.MID, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
(reactor, rds) = GetReactorAndRDS(defaultReactor, defaultRDS, input.MID, formattedText, segments);
if (string.IsNullOrEmpty(rds) || segments.Length < 2)
rdsNumber = 0;
else
_ = int.TryParse(segments[1], out rdsNumber);
if (IsInvalid(rdsNumber) || !int.TryParse(reactor, out int reactorCheck))
string mid = string.IsNullOrEmpty(input.MID) ? string.Empty : input.MID;
if (mid.Length > 2 && mid[0] == '1' && (mid[1] == 'T' || mid[1] == 't'))
mid = mid.Substring(2);
mid = Regex.Replace(mid, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
string[] segments = mid.Split(new char[] { '-' });
// bool hasRDS = Regex.IsMatch(mid, "[-]?([QP][0-9]{4,}|[0-9]{5,})[-]?");
(reactor, rds) = GetReactorAndRDS(input.MID, mid, segments);
rdsNumber = string.IsNullOrEmpty(rds) || !int.TryParse(rds, out rdsCheck) ? null : rdsCheck;
bool isInvalid = IsInvalid(rdsNumber);
if (isInvalid || !int.TryParse(reactor, out int reactorCheck))
{
psn = string.Empty;
zone = string.Empty;
layer = string.Empty;
psn = null;
zone = null;
layer = null;
employee = null;
reactorNumber = null;
}
else
{
reactorNumber = reactorCheck;
(layer, psn) = GetLayerAndPSN(defaultLayer, defaultPSN, segments);
zone = GetZone(segments);
reactorNumber = reactorCheck;
(layer, psn) = GetLayerAndPSN(segments);
employee = segments.Length <= 4 ? null : segments[4];
}
return new(layer, psn, rdsNumber, reactorNumber, zone);
return new(layer: layer,
psn: psn,
rdsNumber: rdsNumber,
reactor: reactorNumber,
zone: zone,
employee: employee);
}
private static string[] GetDirectories(string fileShare)
@ -266,18 +296,16 @@ public partial class Job
};
}
#nullable enable
private static Common Get(string metrologyFileShare, Input input)
private static Common GetTwoAlphaPattern(string metrologyFileShare, Input input)
{
string lines;
const int zero = 0;
string? psn = null;
int? reactor = null;
string? zone = null;
string? layer = null;
int? rdsNumber = null;
string psn = string.Empty;
List<string> files = new();
string zone = string.Empty;
string layer = string.Empty;
WorkMaterialOut? workMaterialOut;
if (string.IsNullOrEmpty(metrologyFileShare) || !Directory.Exists(metrologyFileShare))
throw new Exception($"Unable to access file-share <{metrologyFileShare}>");
@ -309,7 +337,12 @@ public partial class Job
zone = workMaterialOut.Zone;
break;
}
return new(layer, psn, rdsNumber, reactor, zone);
return new(layer: layer,
psn: psn,
rdsNumber: rdsNumber,
reactor: reactor,
zone: zone,
employee: null);
}
private static List<string> GetFiles(Input input, string barcodeHostFileShare)
@ -348,6 +381,77 @@ public partial class Job
return result;
}
private static (Common common, WorkOrder workOrder) Get(Input input, HttpClient httpClient)
{
int? rds;
string psn;
Common common;
WorkOrder workOrder;
Task<Stream> streamTask;
Task<HttpResponseMessage> httpResponseMessageTask;
string mid = string.IsNullOrEmpty(input.MID) ? string.Empty : input.MID;
JsonSerializerOptions jsonSerializerOptions = new() { PropertyNameCaseInsensitive = true };
int? reactor = mid.Length < 2 || !int.TryParse(mid.Substring(0, 2), out int reactorNumber) ? null : reactorNumber;
httpResponseMessageTask = httpClient.GetAsync($"{httpClient.BaseAddress}/reactors/{reactor}");
httpResponseMessageTask.Wait();
if (httpResponseMessageTask.Result.StatusCode != System.Net.HttpStatusCode.OK)
throw new Exception($"Unable to OI <{httpResponseMessageTask.Result.StatusCode}>");
streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync();
streamTask.Wait();
if (!streamTask.Result.CanRead)
throw new NullReferenceException(nameof(streamTask));
ReactorRoot? reactorRoot = JsonSerializer.Deserialize<ReactorRoot>(streamTask.Result, jsonSerializerOptions);
streamTask.Result.Dispose();
if (reactorRoot is null || reactor != reactorRoot.Reactor.ReactorNo || reactorRoot.Reactor.LoadedRDS is null || reactorRoot.Reactor.LoadedRDS.Length < 1)
{
rds = null;
psn = string.Empty;
workOrder = new(null, null, null, null, false);
common = new(layer: null,
psn: psn,
rdsNumber: rds,
reactor: reactor,
zone: null,
employee: null);
}
else
{
rds = reactorRoot.Reactor.LoadedRDS[0];
workOrder = new(null, null, null, null, false);
httpResponseMessageTask = httpClient.GetAsync($"{httpClient.BaseAddress}/materials/rds/{rds}");
httpResponseMessageTask.Wait();
if (httpResponseMessageTask.Result.StatusCode != System.Net.HttpStatusCode.OK)
throw new Exception($"Unable to OI <{httpResponseMessageTask.Result.StatusCode}>");
streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync();
streamTask.Wait();
if (!streamTask.Result.CanRead)
throw new NullReferenceException(nameof(streamTask));
RunDataSheetRoot? runDataSheetRoot = JsonSerializer.Deserialize<RunDataSheetRoot>(streamTask.Result, jsonSerializerOptions);
streamTask.Result.Dispose();
if (runDataSheetRoot is null || reactor != runDataSheetRoot.RunDataSheet.Reactor)
{
psn = string.Empty;
common = new(layer: null,
psn: psn,
rdsNumber: rds,
reactor: reactor,
zone: null,
employee: null);
}
else
{
psn = runDataSheetRoot.RunDataSheet.PSN.ToString();
common = new(layer: null,
psn: psn,
rdsNumber: rds,
reactor: reactor,
zone: null,
employee: null);
}
}
return new(common, workOrder);
}
private static (Common common, WorkOrder workOrder) Get(Input input, string barcodeHostFileShare)
{
if (string.IsNullOrEmpty(barcodeHostFileShare) || !Directory.Exists(barcodeHostFileShare))
@ -355,10 +459,8 @@ public partial class Job
int? rds;
long sequence = 0;
WorkOrder workOrder;
string psn = string.Empty;
string zone = string.Empty;
string layer = string.Empty;
int? reactor = !int.TryParse(input.MID.Substring(0, 2), out int reactorNumber) ? null : reactorNumber;
string mid = string.IsNullOrEmpty(input.MID) ? string.Empty : input.MID;
int? reactor = mid.Length < 2 || !int.TryParse(mid.Substring(0, 2), out int reactorNumber) ? null : reactorNumber;
bool parsed = !string.IsNullOrEmpty(input.Sequence) && long.TryParse(input.Sequence, out sequence);
List<string> files;
if (!parsed || string.IsNullOrEmpty(input.MID))
@ -381,7 +483,12 @@ public partial class Job
rds = null;
workOrder = GetWorkOrder(new(input, text.Substring(2)));
}
Common common = new(layer, psn, rds, reactor, zone);
Common common = new(layer: null,
psn: null,
rdsNumber: rds,
reactor: reactor,
zone: null,
employee: null);
return new(common, workOrder);
}
@ -408,80 +515,85 @@ public partial class Job
private static string GetCommandText(int? rds, int? workOrderNumber, int? workOrderCassette, int? slot, int? reactor)
{ // cSpell:disable
StringBuilder result = new();
_ = result.Append(" select ").
Append(" rr.rds_no ").
Append(" , rr.reactor ").
Append(" , rr.ps_no ").
Append(" , rr.load_lock_side ").
Append(" , rr.reactor_type ").
Append(" , rr.recipe_name ").
Append(" , rr.recipe_no ").
Append(" , rr.spec_type ").
Append(" , ( ").
Append(" select max(wm.zone) ").
Append(" from lsl2sql.dbo.wm_out_slot wm ").
Append(" where wm.wo_no = rr.wo_no ").
Append(" and wm.rds = rr.rds_no ").
Append(" and wm.in_cass_no = ").Append(workOrderCassette is null ? -1 : workOrderCassette.Value).Append(' ').
Append(" and wm.slot_no = ").Append(slot is null ? -1 : slot.Value).Append(' ').
Append(" ) zone ").
Append(" from lsl2sql.dbo.react_run rr ").
Append(" where rr.rds_no = ").Append(rds is null ? -1 : rds.Value).Append(' ').
Append(" union all ").
Append(" select ").
Append(" rr.rds_no ").
Append(" , rr.reactor ").
Append(" , rr.ps_no ").
Append(" , rr.load_lock_side ").
Append(" , rr.reactor_type ").
Append(" , rr.recipe_name ").
Append(" , rr.recipe_no ").
Append(" , rr.spec_type ").
Append(" , ( ").
Append(" select max(wm.zone) ").
Append(" from lsl2sql.dbo.wm_out_slot wm ").
Append(" where wm.wo_no = rr.wo_no ").
Append(" and wm.rds = rr.rds_no ").
Append(" and wm.in_cass_no = ").Append(workOrderCassette is null ? -1 : workOrderCassette.Value).Append(' ').
Append(" and wm.slot_no = ").Append(slot is null ? -1 : slot.Value).Append(' ').
Append(" ) zone ").
Append(" from lsl2sql.dbo.react_run rr ").
Append(" where rr.rds_no = ( ").
Append(" select max(wm.rds) ").
Append(" from lsl2sql.dbo.wm_out_slot wm ").
Append(" where wm.wo_no = ").Append(workOrderNumber is null ? -1 : workOrderNumber.Value).Append(' ').
Append(" and wm.in_cass_no = ").Append(workOrderCassette is null ? -1 : workOrderCassette.Value).Append(' ').
Append(" and wm.slot_no = ").Append(slot is null ? -1 : slot.Value).Append(' ').
Append(" ) ").
Append(" union all ").
Append(" select ").
Append(" rr.rds_no ").
Append(" , rr.reactor ").
Append(" , rr.ps_no ").
Append(" , rr.load_lock_side ").
Append(" , rr.reactor_type ").
Append(" , rr.recipe_name ").
Append(" , rr.recipe_no ").
Append(" , rr.spec_type ").
Append(" , ( ").
Append(" select max(wm.zone) ").
Append(" from lsl2sql.dbo.wm_out_slot wm ").
Append(" where wm.wo_no = rr.wo_no ").
Append(" and wm.rds = rr.rds_no ").
Append(" and wm.in_cass_no = ").Append(workOrderCassette is null ? -1 : workOrderCassette.Value).Append(' ').
Append(" and wm.slot_no = ").Append(slot is null ? -1 : slot.Value).Append(' ').
Append(" ) zone ").
Append(" from lsl2sql.dbo.react_run rr ").
Append(" where rr.rds_no = ( ").
Append(" select max(qa.rds_no) ").
Append(" from lsl2sql.dbo.react_run qa ").
Append(" where qa.load_sig != '' ").
Append(" and qa.load_sig_dtm > '2023-05-01 00:00:00.000' ").
Append(" and qa.reactor = ").Append(reactor is null ? -1 : reactor.Value).Append(' ').
Append(" ) ").
Append(" for json path ");
return result.ToString();
List<string> results = new();
int rdsValue = rds is null ? -1 : rds.Value;
int slotValue = slot is null ? -1 : slot.Value;
int reactorValue = reactor is null ? -1 : reactor.Value;
int workOrderNumberValue = workOrderNumber is null ? -1 : workOrderNumber.Value;
int workOrderCassetteValue = workOrderCassette is null ? -1 : workOrderCassette.Value;
results.Add(" select ");
results.Add(" rr.rds_no ");
results.Add(" , rr.reactor ");
results.Add(" , rr.ps_no ");
results.Add(" , rr.load_lock_side ");
results.Add(" , rr.reactor_type ");
results.Add(" , rr.recipe_name ");
results.Add(" , rr.recipe_no ");
results.Add(" , rr.spec_type ");
results.Add(" , ( ");
results.Add(" select max(wm.zone) ");
results.Add(" from lsl2sql.dbo.wm_out_slot wm ");
results.Add(" where wm.wo_no = rr.wo_no ");
results.Add(" and wm.rds = rr.rds_no ");
results.Add($" and wm.in_cass_no = {workOrderCassetteValue}");
results.Add($" and wm.slot_no = {slotValue}");
results.Add(" ) zone ");
results.Add(" from lsl2sql.dbo.react_run rr ");
results.Add($" where rr.rds_no = {rdsValue}");
results.Add(" union all ");
results.Add(" select ");
results.Add(" rr.rds_no ");
results.Add(" , rr.reactor ");
results.Add(" , rr.ps_no ");
results.Add(" , rr.load_lock_side ");
results.Add(" , rr.reactor_type ");
results.Add(" , rr.recipe_name ");
results.Add(" , rr.recipe_no ");
results.Add(" , rr.spec_type ");
results.Add(" , ( ");
results.Add(" select max(wm.zone) ");
results.Add(" from lsl2sql.dbo.wm_out_slot wm ");
results.Add(" where wm.wo_no = rr.wo_no ");
results.Add(" and wm.rds = rr.rds_no ");
results.Add($" and wm.in_cass_no = {workOrderCassetteValue}");
results.Add($" and wm.slot_no = {slotValue}");
results.Add(" ) zone ");
results.Add(" from lsl2sql.dbo.react_run rr ");
results.Add(" where rr.rds_no = ( ");
results.Add(" select max(wm.rds) ");
results.Add(" from lsl2sql.dbo.wm_out_slot wm ");
results.Add($" where wm.wo_no = {workOrderNumberValue}");
results.Add($" and wm.in_cass_no = {workOrderCassetteValue}");
results.Add($" and wm.slot_no = {slotValue}");
results.Add(" ) ");
results.Add(" union all ");
results.Add(" select ");
results.Add(" rr.rds_no ");
results.Add(" , rr.reactor ");
results.Add(" , rr.ps_no ");
results.Add(" , rr.load_lock_side ");
results.Add(" , rr.reactor_type ");
results.Add(" , rr.recipe_name ");
results.Add(" , rr.recipe_no ");
results.Add(" , rr.spec_type ");
results.Add(" , ( ");
results.Add(" select max(wm.zone) ");
results.Add(" from lsl2sql.dbo.wm_out_slot wm ");
results.Add(" where wm.wo_no = rr.wo_no ");
results.Add(" and wm.rds = rr.rds_no ");
results.Add($" and wm.in_cass_no = {workOrderCassetteValue}");
results.Add($" and wm.slot_no = {slotValue}");
results.Add(" ) zone ");
results.Add(" from lsl2sql.dbo.react_run rr ");
results.Add(" where rr.rds_no = ( ");
results.Add(" select max(qa.rds_no) ");
results.Add(" from lsl2sql.dbo.react_run qa ");
results.Add(" where qa.load_sig != '' ");
results.Add(" and qa.load_sig_dtm > '2023-05-01 00:00:00.000' ");
results.Add($" and qa.reactor = {reactorValue}");
results.Add(" ) ");
results.Add(" for json path ");
return string.Join(Environment.NewLine, results);
} // cSpell:restore
private static CommonB Get(string lsl2SQLConnectionString, string layer, string psn, int? reactorNumber, int? slotNumber, int? workOrderNumber, int? workOrderCassette, string zone)
@ -490,7 +602,11 @@ public partial class Job
string comment;
const int zero = 0;
const string hyphen = "-";
string commandText = GetCommandText(rds: null, workOrderNumber, workOrderCassette, slotNumber, reactorNumber);
string commandText = GetCommandText(rds: null,
workOrderNumber: workOrderNumber,
workOrderCassette: workOrderCassette,
slot: slotNumber,
reactor: reactorNumber);
string json = GetRunJson(lsl2SQLConnectionString, commandText);
if (string.IsNullOrEmpty(json))
{
@ -533,7 +649,12 @@ public partial class Job
comment = $"{loadLockSideFull} - {runs[zero].ReactorType}";
}
}
return new(comment, layer, rdsNumber, psn, reactorNumber, zone);
return new(comment: comment,
layer: layer,
rdsNumber: rdsNumber,
psn: psn,
reactorNumber: reactorNumber,
zone: zone);
}
private static CommonB GetWithValidRDS(string lsl2SQLConnectionString, string layer, string psn, int? rdsNumber, int? reactorNumber, string zone)
@ -541,7 +662,11 @@ public partial class Job
string comment;
const int zero = 0;
const string hyphen = "-";
string commandText = GetCommandText(rdsNumber, workOrderNumber: null, workOrderCassette: null, slot: null, reactor: null);
string commandText = GetCommandText(rds: rdsNumber,
workOrderNumber: null,
workOrderCassette: null,
slot: null,
reactor: null);
string json = GetRunJson(lsl2SQLConnectionString, commandText);
if (string.IsNullOrEmpty(json))
{
@ -568,7 +693,7 @@ public partial class Job
zone = runs[zero].Zone;
if (string.IsNullOrEmpty(layer))
layer = runs[zero].EpiLayer;
reactorNumber = runs[zero].Reactor;
reactorNumber = runs[zero].Reactor is null ? reactorNumber : runs[zero].Reactor.Value;
string loadLockSide = runs[zero].LoadLockSide;
string loadLockSideFull = loadLockSide switch
{
@ -579,7 +704,12 @@ public partial class Job
comment = $"{loadLockSideFull} - {runs[zero].ReactorType}";
}
}
return new(comment, layer, rdsNumber, psn, reactorNumber, zone);
return new(comment: comment,
layer: layer,
rdsNumber: rdsNumber,
psn: psn,
reactorNumber: reactorNumber,
zone: zone);
}
}

View File

@ -5,6 +5,7 @@ using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net.Http;
using System.Threading;
namespace Adaptation.FileHandlers.TIBCO.Transport;
@ -19,12 +20,14 @@ internal partial class Main
private static string _BarcodeHostFileShare;
private static string _LSL2SQLConnectionString;
private static string _TibcoParameterSubjectPrefix;
private static HttpClient _HttpClient;
private static FileConnectorConfiguration _FileConnectorConfiguration;
internal static void Initialize(ISMTP smtp, string cellInstanceName, FileConnectorConfiguration fileConnectorConfiguration, string lsl2SQLConnectionString, string metrologyFileShare, string barcodeHostFileShare)
internal static void Initialize(ISMTP smtp, string cellInstanceName, FileConnectorConfiguration fileConnectorConfiguration, string lsl2SQLConnectionString, string metrologyFileShare, string barcodeHostFileShare, HttpClient httpClient)
{
_SMTP = smtp;
_IfxTransport = null;
_HttpClient = httpClient;
_CellInstanceName = cellInstanceName;
_MetrologyFileShare = metrologyFileShare;
_TibcoParameterSubjectPrefix = string.Empty;
@ -186,7 +189,7 @@ internal partial class Main
if (!subject.Contains(_TibcoParameterSubjectPrefix))
throw new Exception("Invalid Subject");
mid = GetJobsMID(envelopeDocument);
Job job = new(_LSL2SQLConnectionString, _MetrologyFileShare, _BarcodeHostFileShare, mid);
Job job = new(_LSL2SQLConnectionString, _MetrologyFileShare, _BarcodeHostFileShare, _HttpClient, mid);
if (job.IsAreaSi)
{
IfxDoc sendReply = GetJobsReply(job);

View File

@ -0,0 +1,18 @@
using System.Text.Json.Serialization;
namespace Adaptation.FileHandlers.TIBCO.Transport;
public class Reactor
{
[JsonConstructor]
public Reactor(int reactorNo, int[] loadedRDS)
{
ReactorNo = reactorNo;
LoadedRDS = loadedRDS;
}
[JsonPropertyName("reactorNo")] public int ReactorNo { get; } // { init; get; }
[JsonPropertyName("loadedRDS")] public int[] LoadedRDS { get; } // { init; get; }
}

View File

@ -0,0 +1,14 @@
using System.Text.Json.Serialization;
namespace Adaptation.FileHandlers.TIBCO.Transport;
public class ReactorRoot
{
[JsonConstructor]
public ReactorRoot(Reactor reactor) =>
Reactor = reactor;
[JsonPropertyName("reactor")] public Reactor Reactor { get; } // { init; get; }
}

View File

@ -24,7 +24,7 @@ public class Run
public string PartNo { get; set; }
[JsonPropertyName("reactor")]
public int Reactor { get; set; }
public int? Reactor { get; set; }
[JsonPropertyName("ps_no")]
public string PSN { get; set; }

View File

@ -0,0 +1,18 @@
using System.Text.Json.Serialization;
namespace Adaptation.FileHandlers.TIBCO.Transport;
public class RunDataSheet
{
[JsonConstructor]
public RunDataSheet(int psn, int reactor)
{
PSN = psn;
Reactor = reactor;
}
[JsonPropertyName("PSN")] public int PSN { get; } // { init; get; }
[JsonPropertyName("reactor")] public int Reactor { get; } // { init; get; }
}

View File

@ -0,0 +1,14 @@
using System.Text.Json.Serialization;
namespace Adaptation.FileHandlers.TIBCO.Transport;
public class RunDataSheetRoot
{
[JsonConstructor]
public RunDataSheetRoot(RunDataSheet runDataSheet) =>
RunDataSheet = runDataSheet;
[JsonPropertyName("rds")] public RunDataSheet RunDataSheet { get; } // { init; get; }
}

View File

@ -9,7 +9,11 @@ public class WorkOrder
public int? SlotNumber { get; }
public bool IsWorkOrder { get; }
public WorkOrder(int? workOrderNumber, int? workOrderStep, int? workOrderCassette, int? slotNumber, bool isWorkOrder)
public WorkOrder(int? workOrderNumber,
int? workOrderStep,
int? workOrderCassette,
int? slotNumber,
bool isWorkOrder)
{
WorkOrderNumber = workOrderNumber;
WorkOrderStep = workOrderStep;

View File

@ -0,0 +1,22 @@
namespace Adaptation.FileHandlers.txt;
internal class Constant
{
public string F1 { get; } = "F -1";
public string Max { get; } = "Max";
public string Min { get; } = "Min";
public string Mean { get; } = "Mean";
public string LotId { get; } = "Lot ID:";
public string Session { get; } = "Session:";
public string StdDev { get; } = "Std. Dev.";
public string DCNTotals { get; } = "DCN Totals";
public string DNNTotals { get; } = "DNN Totals";
public string DWNTotals { get; } = "DWN Totals";
public string Grade { get; } = "F Grade";
public string Reject { get; } = "F Reject";
public string LongWaferSummary { get; } = "Long Wafer Summary";
public string OverLoad { get; } = "F OverLoad";
public string Empty35Spaces { get; } = " ";
}

View File

@ -15,7 +15,7 @@ public class FileRead : Shared.FileRead, IFileRead
private long? _TickOffset;
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), true, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{
_MinFileLength = 10;
@ -94,34 +94,43 @@ public class FileRead : Shared.FileRead, IFileRead
return results;
}
#nullable enable
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
{
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>());
_TickOffset ??= new FileInfo(reportFullPath).LastWriteTime.Ticks - dateTime.Ticks;
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, Array.Empty<Test>(), Array.Empty<JsonElement>(), new List<FileInfo>());
_TickOffset ??= 0; // new FileInfo(reportFullPath).LastWriteTime.Ticks - dateTime.Ticks;
_Logistics = new Logistics(this, _TickOffset.Value, reportFullPath, useSplitForMID: true);
SetFileParameterLotIDToLogisticsMID();
if (_Logistics.FileInfo.Length < _MinFileLength)
results.Item4.Add(_Logistics.FileInfo);
else
{
Run? run = Run.Get(_Logistics, results.Item4);
if (run is null)
throw new Exception(string.Concat("A) No Data - ", dateTime.Ticks));
IProcessData iProcessData = new ProcessData(this, _Logistics, results.Item4);
if (iProcessData is not ProcessData processData)
throw new Exception(string.Concat("A) No Data - ", dateTime.Ticks));
string mid;
if (!string.IsNullOrEmpty(processData.Lot) && string.IsNullOrEmpty(processData.Reactor) && string.IsNullOrEmpty(processData.RDS) && string.IsNullOrEmpty(processData.PSN))
mid = processData.Lot;
else if (!string.IsNullOrEmpty(processData.Employee) && string.IsNullOrEmpty(processData.Reactor) && string.IsNullOrEmpty(processData.RDS) && string.IsNullOrEmpty(processData.PSN))
mid = processData.Employee;
results = new(string.Concat("B) No Data - ", dateTime.Ticks), Array.Empty<Test>(), Array.Empty<JsonElement>(), results.Item4);
else
{
mid = string.Concat(processData.Reactor, "-", processData.RDS, "-", processData.PSN);
mid = Regex.Replace(mid, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
string mid;
if (!string.IsNullOrEmpty(processData.Lot) && string.IsNullOrEmpty(processData.Reactor) && string.IsNullOrEmpty(processData.RDS) && string.IsNullOrEmpty(processData.PSN))
mid = processData.Lot;
else if (!string.IsNullOrEmpty(processData.Employee) && string.IsNullOrEmpty(processData.Reactor) && string.IsNullOrEmpty(processData.RDS) && string.IsNullOrEmpty(processData.PSN))
mid = processData.Employee;
else
{
mid = string.Concat(processData.Reactor, "-", processData.RDS, "-", processData.PSN);
mid = Regex.Replace(mid, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
}
SetFileParameterLotID(mid);
_Logistics.Update(mid, processData.Reactor);
if (iProcessData.Details.Count > 0)
results = iProcessData.GetResults(this, _Logistics, results.Item4);
else
results = new(string.Concat("C) No Data - ", dateTime.Ticks), Array.Empty<Test>(), Array.Empty<JsonElement>(), results.Item4);
}
SetFileParameterLotID(mid);
_Logistics.Update(mid, processData.Reactor);
if (iProcessData.Details.Count == 0)
throw new Exception(string.Concat("B) No Data - ", dateTime.Ticks));
results = iProcessData.GetResults(this, _Logistics, results.Item4);
}
return results;
}

View File

@ -0,0 +1,88 @@
using System.Text.Json.Serialization;
namespace Adaptation.FileHandlers.txt;
public class Header
{
public Header(string lot,
string session)
{
Lot = lot;
Session = session;
}
public string Lot { get; }
public string Session { get; }
internal static void ScanPast(string text, int[] i, string search)
{
int num = text.IndexOf(search, i[0]);
if (num > -1)
i[0] = num + search.Length;
else
i[0] = text.Length;
}
internal static string GetBefore(string text, int[] i, string search)
{
int num = text.IndexOf(search, i[0]);
if (num > -1)
{
string str = text.Substring(i[0], num - i[0]);
i[0] = num + search.Length;
return str.Trim();
}
string str1 = text.Substring(i[0]);
i[0] = text.Length;
return str1.Trim();
}
internal static string GetBefore(string text, int[] i, string search, bool trim)
{
if (trim)
return GetBefore(text, i, search);
int num = text.IndexOf(search, i[0]);
if (num > -1)
{
string str = text.Substring(i[0], num - i[0]);
i[0] = num + search.Length;
return str;
}
string str1 = text.Substring(i[0]);
i[0] = text.Length;
return str1;
}
internal static string GetToEOL(string text, int[] i) =>
GetBefore(text, i, "\n");
internal static string GetToEOL(string text, int[] i, bool trim)
{
if (trim)
return GetToEOL(text, i);
return GetBefore(text, i, "\n", false);
}
internal static Header Get(Constant constant, int[] i, string text)
{
Header result;
string lot;
string session;
ScanPast(text, i, constant.LongWaferSummary);
_ = GetToEOL(text, i);
ScanPast(text, i, constant.Session);
session = GetToEOL(text, i, true);
ScanPast(text, i, constant.LotId);
lot = GetToEOL(text, i, true);
result = new(lot, session);
return result;
}
}
[JsonSourceGenerationOptions(WriteIndented = true)]
[JsonSerializable(typeof(Header))]
internal partial class HeaderSourceGenerationContext : JsonSerializerContext
{
}

View File

@ -277,7 +277,6 @@ public class ProcessData : IProcessData
public ProcessData(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection)
{
fileInfoCollection.Clear();
_Details = new List<object>();
_I = 0;
_Data = string.Empty;
@ -309,9 +308,13 @@ public class ProcessData : IProcessData
if (description.Test != (int)tests[i])
throw new Exception();
}
FileInfo fileInfo = new($"{logistics.ReportFullPath}.descriptions.json");
List<Description> fileReadDescriptions = (from l in descriptions select (Description)l).ToList();
string json = JsonSerializer.Serialize(fileReadDescriptions, fileReadDescriptions.GetType());
JsonElement[] jsonElements = JsonSerializer.Deserialize<JsonElement[]>(json);
File.WriteAllText(fileInfo.FullName, json);
File.SetLastWriteTime(fileInfo.FullName, logistics.DateTimeFromSequence);
fileInfoCollection.Add(fileInfo);
JsonElement[] jsonElements = JsonSerializer.Deserialize<JsonElement[]>(json) ?? throw new Exception();
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(logistics.Logistics1[0], tests.ToArray(), jsonElements, fileInfoCollection);
return results;
}
@ -952,8 +955,6 @@ public class ProcessData : IProcessData
{
// 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,
@ -1026,17 +1027,16 @@ public class ProcessData : IProcessData
DnnBin6 = dnnTotals[i].Bin6 ?? string.Empty,
DnnBin7 = dnnTotals[i].Bin7 ?? string.Empty,
DnnBin8 = dnnTotals[i].Bin8 ?? string.Empty,
//result.HeaderUniqueID = string.Concat(MesEntity, "_", Lot, "_Summary_", Date);
HeaderUniqueID = UniqueID
};
result.UniqueID = string.Concat(result.HeaderUniqueID, "_", result.WaferID.PadLeft(2, '0'));
return result;
}
#pragma warning disable IDE0060
private void Parse(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection)
#pragma warning restore IDE0060
{
if (fileRead is null)
throw new ArgumentNullException(nameof(fileRead));
Detail dataFile;
foreach (string file in Directory.GetFiles(Path.GetDirectoryName(logistics.ReportFullPath), "WaferMap*.prn", SearchOption.TopDirectoryOnly))
fileInfoCollection.Add(new FileInfo(file));

View File

@ -0,0 +1,639 @@
using System.Text.Json.Serialization;
namespace Adaptation.FileHandlers.txt;
#nullable enable
internal class Row
{
public Row(Run run, int i)
{
Index = i;
//
Lot = run.Header.Lot;
Session = run.Header.Session;
DcnAllMin = run.Summary.DcnAllMin;
DcnLpdMin = run.Summary.DcnLpdMin;
DcnLpdNMin = run.Summary.DcnLpdNMin;
DcnLpdESMin = run.Summary.DcnLpdESMin;
DcnMicroScrMin = run.Summary.DcnMicroScrMin;
DcnScrMin = run.Summary.DcnScrMin;
DcnSlipMin = run.Summary.DcnSlipMin;
DcnAreaCountMin = run.Summary.DcnAreaCountMin;
DcnAreaMin = run.Summary.DcnAreaMin;
DcnHazeAvgMin = run.Summary.DcnHazeAvgMin;
DcnHazeMedianMin = run.Summary.DcnHazeMedianMin;
DcnHazeStdDevMin = run.Summary.DcnHazeStdDevMin;
DcnBin1Min = run.Summary.DcnBin1Min;
DcnBin2Min = run.Summary.DcnBin2Min;
DcnBin3Min = run.Summary.DcnBin3Min;
DcnBin4Min = run.Summary.DcnBin4Min;
DcnBin5Min = run.Summary.DcnBin5Min;
DcnBin6Min = run.Summary.DcnBin6Min;
DcnBin7Min = run.Summary.DcnBin7Min;
DcnBin8Min = run.Summary.DcnBin8Min;
DcnAllMax = run.Summary.DcnAllMax;
DcnLpdMax = run.Summary.DcnLpdMax;
DcnLpdNMax = run.Summary.DcnLpdNMax;
DcnLpdESMax = run.Summary.DcnLpdESMax;
DcnMicroScrMax = run.Summary.DcnMicroScrMax;
DcnScrMax = run.Summary.DcnScrMax;
DcnSlipMax = run.Summary.DcnSlipMax;
DcnAreaCountMax = run.Summary.DcnAreaCountMax;
DcnAreaMax = run.Summary.DcnAreaMax;
DcnHazeAvgMax = run.Summary.DcnHazeAvgMax;
DcnHazeMedianMax = run.Summary.DcnHazeMedianMax;
DcnHazeStdDevMax = run.Summary.DcnHazeStdDevMax;
DcnBin1Max = run.Summary.DcnBin1Max;
DcnBin2Max = run.Summary.DcnBin2Max;
DcnBin3Max = run.Summary.DcnBin3Max;
DcnBin4Max = run.Summary.DcnBin4Max;
DcnBin5Max = run.Summary.DcnBin5Max;
DcnBin6Max = run.Summary.DcnBin6Max;
DcnBin7Max = run.Summary.DcnBin7Max;
DcnBin8Max = run.Summary.DcnBin8Max;
DcnAllMean = run.Summary.DcnAllMean;
DcnLpdMean = run.Summary.DcnLpdMean;
DcnLpdNMean = run.Summary.DcnLpdNMean;
DcnLpdESMean = run.Summary.DcnLpdESMean;
DcnMicroScrMean = run.Summary.DcnMicroScrMean;
DcnScrMean = run.Summary.DcnScrMean;
DcnSlipMean = run.Summary.DcnSlipMean;
DcnAreaCountMean = run.Summary.DcnAreaCountMean;
DcnAreaMean = run.Summary.DcnAreaMean;
DcnHazeAvgMean = run.Summary.DcnHazeAvgMean;
DcnHazeMedianMean = run.Summary.DcnHazeMedianMean;
DcnHazeStdDevMean = run.Summary.DcnHazeStdDevMean;
DcnBin1Mean = run.Summary.DcnBin1Mean;
DcnBin2Mean = run.Summary.DcnBin2Mean;
DcnBin3Mean = run.Summary.DcnBin3Mean;
DcnBin4Mean = run.Summary.DcnBin4Mean;
DcnBin5Mean = run.Summary.DcnBin5Mean;
DcnBin6Mean = run.Summary.DcnBin6Mean;
DcnBin7Mean = run.Summary.DcnBin7Mean;
DcnBin8Mean = run.Summary.DcnBin8Mean;
DcnAllStdDev = run.Summary.DcnAllStdDev;
DcnLpdStdDev = run.Summary.DcnLpdStdDev;
DcnLpdNStdDev = run.Summary.DcnLpdNStdDev;
DcnLpdESStdDev = run.Summary.DcnLpdESStdDev;
DcnMicroScrStdDev = run.Summary.DcnMicroScrStdDev;
DcnScrStdDev = run.Summary.DcnScrStdDev;
DcnSlipStdDev = run.Summary.DcnSlipStdDev;
DcnAreaCountStdDev = run.Summary.DcnAreaCountStdDev;
DcnAreaStdDev = run.Summary.DcnAreaStdDev;
DcnHazeAvgStdDev = run.Summary.DcnHazeAvgStdDev;
DcnHazeMedianStdDev = run.Summary.DcnHazeMedianStdDev;
DcnHazeStdDevStdDev = run.Summary.DcnHazeStdDevStdDev;
DcnBin1StdDev = run.Summary.DcnBin1StdDev;
DcnBin2StdDev = run.Summary.DcnBin2StdDev;
DcnBin3StdDev = run.Summary.DcnBin3StdDev;
DcnBin4StdDev = run.Summary.DcnBin4StdDev;
DcnBin5StdDev = run.Summary.DcnBin5StdDev;
DcnBin6StdDev = run.Summary.DcnBin6StdDev;
DcnBin7StdDev = run.Summary.DcnBin7StdDev;
DcnBin8StdDev = run.Summary.DcnBin8StdDev;
DwnAllMin = run.Summary.DwnAllMin;
DwnLpdMin = run.Summary.DwnLpdMin;
DwnLpdNMin = run.Summary.DwnLpdNMin;
DwnLpdESMin = run.Summary.DwnLpdESMin;
DwnMicroScrMin = run.Summary.DwnMicroScrMin;
DwnScrMin = run.Summary.DwnScrMin;
DwnSlipMin = run.Summary.DwnSlipMin;
DwnAreaCountMin = run.Summary.DwnAreaCountMin;
DwnAreaMin = run.Summary.DwnAreaMin;
DwnHazeAvgMin = run.Summary.DwnHazeAvgMin;
DwnHazeMedianMin = run.Summary.DwnHazeMedianMin;
DwnHazeStdDevMin = run.Summary.DwnHazeStdDevMin;
DwnBin1Min = run.Summary.DwnBin1Min;
DwnBin2Min = run.Summary.DwnBin2Min;
DwnBin3Min = run.Summary.DwnBin3Min;
DwnBin4Min = run.Summary.DwnBin4Min;
DwnBin5Min = run.Summary.DwnBin5Min;
DwnBin6Min = run.Summary.DwnBin6Min;
DwnBin7Min = run.Summary.DwnBin7Min;
DwnBin8Min = run.Summary.DwnBin8Min;
DwnAllMax = run.Summary.DwnAllMax;
DwnLpdMax = run.Summary.DwnLpdMax;
DwnLpdNMax = run.Summary.DwnLpdNMax;
DwnLpdESMax = run.Summary.DwnLpdESMax;
DwnMicroScrMax = run.Summary.DwnMicroScrMax;
DwnScrMax = run.Summary.DwnScrMax;
DwnSlipMax = run.Summary.DwnSlipMax;
DwnAreaCountMax = run.Summary.DwnAreaCountMax;
DwnAreaMax = run.Summary.DwnAreaMax;
DwnHazeAvgMax = run.Summary.DwnHazeAvgMax;
DwnHazeMedianMax = run.Summary.DwnHazeMedianMax;
DwnHazeStdDevMax = run.Summary.DwnHazeStdDevMax;
DwnBin1Max = run.Summary.DwnBin1Max;
DwnBin2Max = run.Summary.DwnBin2Max;
DwnBin3Max = run.Summary.DwnBin3Max;
DwnBin4Max = run.Summary.DwnBin4Max;
DwnBin5Max = run.Summary.DwnBin5Max;
DwnBin6Max = run.Summary.DwnBin6Max;
DwnBin7Max = run.Summary.DwnBin7Max;
DwnBin8Max = run.Summary.DwnBin8Max;
DwnAllMean = run.Summary.DwnAllMean;
DwnLpdMean = run.Summary.DwnLpdMean;
DwnLpdNMean = run.Summary.DwnLpdNMean;
DwnLpdESMean = run.Summary.DwnLpdESMean;
DwnMicroScrMean = run.Summary.DwnMicroScrMean;
DwnScrMean = run.Summary.DwnScrMean;
DwnSlipMean = run.Summary.DwnSlipMean;
DwnAreaCountMean = run.Summary.DwnAreaCountMean;
DwnAreaMean = run.Summary.DwnAreaMean;
DwnHazeAvgMean = run.Summary.DwnHazeAvgMean;
DwnHazeMedianMean = run.Summary.DwnHazeMedianMean;
DwnHazeStdDevMean = run.Summary.DwnHazeStdDevMean;
DwnBin1Mean = run.Summary.DwnBin1Mean;
DwnBin2Mean = run.Summary.DwnBin2Mean;
DwnBin3Mean = run.Summary.DwnBin3Mean;
DwnBin4Mean = run.Summary.DwnBin4Mean;
DwnBin5Mean = run.Summary.DwnBin5Mean;
DwnBin6Mean = run.Summary.DwnBin6Mean;
DwnBin7Mean = run.Summary.DwnBin7Mean;
DwnBin8Mean = run.Summary.DwnBin8Mean;
DwnAllStdDev = run.Summary.DwnAllStdDev;
DwnLpdStdDev = run.Summary.DwnLpdStdDev;
DwnLpdNStdDev = run.Summary.DwnLpdNStdDev;
DwnLpdESStdDev = run.Summary.DwnLpdESStdDev;
DwnMicroScrStdDev = run.Summary.DwnMicroScrStdDev;
DwnScrStdDev = run.Summary.DwnScrStdDev;
DwnSlipStdDev = run.Summary.DwnSlipStdDev;
DwnAreaCountStdDev = run.Summary.DwnAreaCountStdDev;
DwnAreaStdDev = run.Summary.DwnAreaStdDev;
DwnHazeAvgStdDev = run.Summary.DwnHazeAvgStdDev;
DwnHazeMedianStdDev = run.Summary.DwnHazeMedianStdDev;
DwnHazeStdDevStdDev = run.Summary.DwnHazeStdDevStdDev;
DwnBin1StdDev = run.Summary.DwnBin1StdDev;
DwnBin2StdDev = run.Summary.DwnBin2StdDev;
DwnBin3StdDev = run.Summary.DwnBin3StdDev;
DwnBin4StdDev = run.Summary.DwnBin4StdDev;
DwnBin5StdDev = run.Summary.DwnBin5StdDev;
DwnBin6StdDev = run.Summary.DwnBin6StdDev;
DwnBin7StdDev = run.Summary.DwnBin7StdDev;
DwnBin8StdDev = run.Summary.DwnBin8StdDev;
DnnAllMin = run.Summary.DnnAllMin;
DnnLpdMin = run.Summary.DnnLpdMin;
DnnLpdNMin = run.Summary.DnnLpdNMin;
DnnLpdESMin = run.Summary.DnnLpdESMin;
DnnMicroScrMin = run.Summary.DnnMicroScrMin;
DnnScrMin = run.Summary.DnnScrMin;
DnnSlipMin = run.Summary.DnnSlipMin;
DnnAreaCountMin = run.Summary.DnnAreaCountMin;
DnnAreaMin = run.Summary.DnnAreaMin;
DnnHazeAvgMin = run.Summary.DnnHazeAvgMin;
DnnHazeMedianMin = run.Summary.DnnHazeMedianMin;
DnnHazeStdDevMin = run.Summary.DnnHazeStdDevMin;
DnnBin1Min = run.Summary.DnnBin1Min;
DnnBin2Min = run.Summary.DnnBin2Min;
DnnBin3Min = run.Summary.DnnBin3Min;
DnnBin4Min = run.Summary.DnnBin4Min;
DnnBin5Min = run.Summary.DnnBin5Min;
DnnBin6Min = run.Summary.DnnBin6Min;
DnnBin7Min = run.Summary.DnnBin7Min;
DnnBin8Min = run.Summary.DnnBin8Min;
DnnAllMax = run.Summary.DnnAllMax;
DnnLpdMax = run.Summary.DnnLpdMax;
DnnLpdNMax = run.Summary.DnnLpdNMax;
DnnLpdESMax = run.Summary.DnnLpdESMax;
DnnMicroScrMax = run.Summary.DnnMicroScrMax;
DnnScrMax = run.Summary.DnnScrMax;
DnnSlipMax = run.Summary.DnnSlipMax;
DnnAreaCountMax = run.Summary.DnnAreaCountMax;
DnnAreaMax = run.Summary.DnnAreaMax;
DnnHazeAvgMax = run.Summary.DnnHazeAvgMax;
DnnHazeMedianMax = run.Summary.DnnHazeMedianMax;
DnnHazeStdDevMax = run.Summary.DnnHazeStdDevMax;
DnnBin1Max = run.Summary.DnnBin1Max;
DnnBin2Max = run.Summary.DnnBin2Max;
DnnBin3Max = run.Summary.DnnBin3Max;
DnnBin4Max = run.Summary.DnnBin4Max;
DnnBin5Max = run.Summary.DnnBin5Max;
DnnBin6Max = run.Summary.DnnBin6Max;
DnnBin7Max = run.Summary.DnnBin7Max;
DnnBin8Max = run.Summary.DnnBin8Max;
DnnAllMean = run.Summary.DnnAllMean;
DnnLpdMean = run.Summary.DnnLpdMean;
DnnLpdNMean = run.Summary.DnnLpdNMean;
DnnLpdESMean = run.Summary.DnnLpdESMean;
DnnMicroScrMean = run.Summary.DnnMicroScrMean;
DnnScrMean = run.Summary.DnnScrMean;
DnnSlipMean = run.Summary.DnnSlipMean;
DnnAreaCountMean = run.Summary.DnnAreaCountMean;
DnnAreaMean = run.Summary.DnnAreaMean;
DnnHazeAvgMean = run.Summary.DnnHazeAvgMean;
DnnHazeMedianMean = run.Summary.DnnHazeMedianMean;
DnnHazeStdDevMean = run.Summary.DnnHazeStdDevMean;
DnnBin1Mean = run.Summary.DnnBin1Mean;
DnnBin2Mean = run.Summary.DnnBin2Mean;
DnnBin3Mean = run.Summary.DnnBin3Mean;
DnnBin4Mean = run.Summary.DnnBin4Mean;
DnnBin5Mean = run.Summary.DnnBin5Mean;
DnnBin6Mean = run.Summary.DnnBin6Mean;
DnnBin7Mean = run.Summary.DnnBin7Mean;
DnnBin8Mean = run.Summary.DnnBin8Mean;
DnnAllStdDev = run.Summary.DnnAllStdDev;
DnnLpdStdDev = run.Summary.DnnLpdStdDev;
DnnLpdNStdDev = run.Summary.DnnLpdNStdDev;
DnnLpdESStdDev = run.Summary.DnnLpdESStdDev;
DnnMicroScrStdDev = run.Summary.DnnMicroScrStdDev;
DnnScrStdDev = run.Summary.DnnScrStdDev;
DnnSlipStdDev = run.Summary.DnnSlipStdDev;
DnnAreaCountStdDev = run.Summary.DnnAreaCountStdDev;
DnnAreaStdDev = run.Summary.DnnAreaStdDev;
DnnHazeAvgStdDev = run.Summary.DnnHazeAvgStdDev;
DnnHazeMedianStdDev = run.Summary.DnnHazeMedianStdDev;
DnnHazeStdDevStdDev = run.Summary.DnnHazeStdDevStdDev;
DnnBin1StdDev = run.Summary.DnnBin1StdDev;
DnnBin2StdDev = run.Summary.DnnBin2StdDev;
DnnBin3StdDev = run.Summary.DnnBin3StdDev;
DnnBin4StdDev = run.Summary.DnnBin4StdDev;
DnnBin5StdDev = run.Summary.DnnBin5StdDev;
DnnBin6StdDev = run.Summary.DnnBin6StdDev;
DnnBin7StdDev = run.Summary.DnnBin7StdDev;
DnnBin8StdDev = run.Summary.DnnBin8StdDev;
//
Side = run.Wafers[i].Side;
WaferID = run.Wafers[i].WaferID;
Grade = run.Wafers[i].Grade;
SrcDest = run.Wafers[i].SrcDest;
DcnAll = run.Wafers[i].DcnAll;
DcnLpd = run.Wafers[i].DcnLpd;
DcnLpdN = run.Wafers[i].DcnLpdN;
DcnLpdES = run.Wafers[i].DcnLpdES;
DcnMicroScr = run.Wafers[i].DcnMicroScr;
DcnScr = run.Wafers[i].DcnScr;
DcnSlip = run.Wafers[i].DcnSlip;
DcnAreaCount = run.Wafers[i].DcnAreaCount;
DcnArea = run.Wafers[i].DcnArea;
DcnHazeAvg = run.Wafers[i].DcnHazeAvg;
DcnHazeMedian = run.Wafers[i].DcnHazeMedian;
DcnHazeStdDev = run.Wafers[i].DcnHazeStdDev;
DcnBin1 = run.Wafers[i].DcnBin1;
DcnBin2 = run.Wafers[i].DcnBin2;
DcnBin3 = run.Wafers[i].DcnBin3;
DcnBin4 = run.Wafers[i].DcnBin4;
DcnBin5 = run.Wafers[i].DcnBin5;
DcnBin6 = run.Wafers[i].DcnBin6;
DcnBin7 = run.Wafers[i].DcnBin7;
DcnBin8 = run.Wafers[i].DcnBin8;
DwnAll = run.Wafers[i].DwnAll;
DwnLpd = run.Wafers[i].DwnLpd;
DwnLpdN = run.Wafers[i].DwnLpdN;
DwnLpdES = run.Wafers[i].DwnLpdES;
DwnMicroScr = run.Wafers[i].DwnMicroScr;
DwnScr = run.Wafers[i].DwnScr;
DwnSlip = run.Wafers[i].DwnSlip;
DwnAreaCount = run.Wafers[i].DwnAreaCount;
DwnArea = run.Wafers[i].DwnArea;
DwnHazeAvg = run.Wafers[i].DwnHazeAvg;
DwnHazeMedian = run.Wafers[i].DwnHazeMedian;
DwnHazeStdDev = run.Wafers[i].DwnHazeStdDev;
DwnBin1 = run.Wafers[i].DwnBin1;
DwnBin2 = run.Wafers[i].DwnBin2;
DwnBin3 = run.Wafers[i].DwnBin3;
DwnBin4 = run.Wafers[i].DwnBin4;
DwnBin5 = run.Wafers[i].DwnBin5;
DwnBin6 = run.Wafers[i].DwnBin6;
DwnBin7 = run.Wafers[i].DwnBin7;
DwnBin8 = run.Wafers[i].DwnBin8;
DnnAll = run.Wafers[i].DnnAll;
DnnLpd = run.Wafers[i].DnnLpd;
DnnLpdN = run.Wafers[i].DnnLpdN;
DnnLpdES = run.Wafers[i].DnnLpdES;
DnnMicroScr = run.Wafers[i].DnnMicroScr;
DnnScr = run.Wafers[i].DnnScr;
DnnSlip = run.Wafers[i].DnnSlip;
DnnAreaCount = run.Wafers[i].DnnAreaCount;
DnnArea = run.Wafers[i].DnnArea;
DnnHazeAvg = run.Wafers[i].DnnHazeAvg;
DnnHazeMedian = run.Wafers[i].DnnHazeMedian;
DnnHazeStdDev = run.Wafers[i].DnnHazeStdDev;
DnnBin1 = run.Wafers[i].DnnBin1;
DnnBin2 = run.Wafers[i].DnnBin2;
DnnBin3 = run.Wafers[i].DnnBin3;
DnnBin4 = run.Wafers[i].DnnBin4;
DnnBin5 = run.Wafers[i].DnnBin5;
DnnBin6 = run.Wafers[i].DnnBin6;
DnnBin7 = run.Wafers[i].DnnBin7;
DnnBin8 = run.Wafers[i].DnnBin8;
}
public int Index { get; }
//
public string Lot { get; }
public string Session { get; }
public string DcnAllMin { get; }
public string DcnLpdMin { get; }
public string DcnLpdNMin { get; }
public string DcnLpdESMin { get; }
public string DcnMicroScrMin { get; }
public string DcnScrMin { get; }
public string DcnSlipMin { get; }
public string DcnAreaCountMin { get; }
public string DcnAreaMin { get; }
public string DcnHazeAvgMin { get; }
public string DcnHazeMedianMin { get; }
public string DcnHazeStdDevMin { get; }
public string DcnBin1Min { get; }
public string DcnBin2Min { get; }
public string DcnBin3Min { get; }
public string DcnBin4Min { get; }
public string DcnBin5Min { get; }
public string DcnBin6Min { get; }
public string DcnBin7Min { get; }
public string DcnBin8Min { get; }
public string DcnAllMax { get; }
public string DcnLpdMax { get; }
public string DcnLpdNMax { get; }
public string DcnLpdESMax { get; }
public string DcnMicroScrMax { get; }
public string DcnScrMax { get; }
public string DcnSlipMax { get; }
public string DcnAreaCountMax { get; }
public string DcnAreaMax { get; }
public string DcnHazeAvgMax { get; }
public string DcnHazeMedianMax { get; }
public string DcnHazeStdDevMax { get; }
public string DcnBin1Max { get; }
public string DcnBin2Max { get; }
public string DcnBin3Max { get; }
public string DcnBin4Max { get; }
public string DcnBin5Max { get; }
public string DcnBin6Max { get; }
public string DcnBin7Max { get; }
public string DcnBin8Max { get; }
public string DcnAllMean { get; }
public string DcnLpdMean { get; }
public string DcnLpdNMean { get; }
public string DcnLpdESMean { get; }
public string DcnMicroScrMean { get; }
public string DcnScrMean { get; }
public string DcnSlipMean { get; }
public string DcnAreaCountMean { get; }
public string DcnAreaMean { get; }
public string DcnHazeAvgMean { get; }
public string DcnHazeMedianMean { get; }
public string DcnHazeStdDevMean { get; }
public string DcnBin1Mean { get; }
public string DcnBin2Mean { get; }
public string DcnBin3Mean { get; }
public string DcnBin4Mean { get; }
public string DcnBin5Mean { get; }
public string DcnBin6Mean { get; }
public string DcnBin7Mean { get; }
public string DcnBin8Mean { get; }
public string DcnAllStdDev { get; }
public string DcnLpdStdDev { get; }
public string DcnLpdNStdDev { get; }
public string DcnLpdESStdDev { get; }
public string DcnMicroScrStdDev { get; }
public string DcnScrStdDev { get; }
public string DcnSlipStdDev { get; }
public string DcnAreaCountStdDev { get; }
public string DcnAreaStdDev { get; }
public string DcnHazeAvgStdDev { get; }
public string DcnHazeMedianStdDev { get; }
public string DcnHazeStdDevStdDev { get; }
public string DcnBin1StdDev { get; }
public string DcnBin2StdDev { get; }
public string DcnBin3StdDev { get; }
public string DcnBin4StdDev { get; }
public string DcnBin5StdDev { get; }
public string DcnBin6StdDev { get; }
public string DcnBin7StdDev { get; }
public string DcnBin8StdDev { get; }
public string DwnAllMin { get; }
public string DwnLpdMin { get; }
public string DwnLpdNMin { get; }
public string DwnLpdESMin { get; }
public string DwnMicroScrMin { get; }
public string DwnScrMin { get; }
public string DwnSlipMin { get; }
public string DwnAreaCountMin { get; }
public string DwnAreaMin { get; }
public string DwnHazeAvgMin { get; }
public string DwnHazeMedianMin { get; }
public string DwnHazeStdDevMin { get; }
public string DwnBin1Min { get; }
public string DwnBin2Min { get; }
public string DwnBin3Min { get; }
public string DwnBin4Min { get; }
public string DwnBin5Min { get; }
public string DwnBin6Min { get; }
public string DwnBin7Min { get; }
public string DwnBin8Min { get; }
public string DwnAllMax { get; }
public string DwnLpdMax { get; }
public string DwnLpdNMax { get; }
public string DwnLpdESMax { get; }
public string DwnMicroScrMax { get; }
public string DwnScrMax { get; }
public string DwnSlipMax { get; }
public string DwnAreaCountMax { get; }
public string DwnAreaMax { get; }
public string DwnHazeAvgMax { get; }
public string DwnHazeMedianMax { get; }
public string DwnHazeStdDevMax { get; }
public string DwnBin1Max { get; }
public string DwnBin2Max { get; }
public string DwnBin3Max { get; }
public string DwnBin4Max { get; }
public string DwnBin5Max { get; }
public string DwnBin6Max { get; }
public string DwnBin7Max { get; }
public string DwnBin8Max { get; }
public string DwnAllMean { get; }
public string DwnLpdMean { get; }
public string DwnLpdNMean { get; }
public string DwnLpdESMean { get; }
public string DwnMicroScrMean { get; }
public string DwnScrMean { get; }
public string DwnSlipMean { get; }
public string DwnAreaCountMean { get; }
public string DwnAreaMean { get; }
public string DwnHazeAvgMean { get; }
public string DwnHazeMedianMean { get; }
public string DwnHazeStdDevMean { get; }
public string DwnBin1Mean { get; }
public string DwnBin2Mean { get; }
public string DwnBin3Mean { get; }
public string DwnBin4Mean { get; }
public string DwnBin5Mean { get; }
public string DwnBin6Mean { get; }
public string DwnBin7Mean { get; }
public string DwnBin8Mean { get; }
public string DwnAllStdDev { get; }
public string DwnLpdStdDev { get; }
public string DwnLpdNStdDev { get; }
public string DwnLpdESStdDev { get; }
public string DwnMicroScrStdDev { get; }
public string DwnScrStdDev { get; }
public string DwnSlipStdDev { get; }
public string DwnAreaCountStdDev { get; }
public string DwnAreaStdDev { get; }
public string DwnHazeAvgStdDev { get; }
public string DwnHazeMedianStdDev { get; }
public string DwnHazeStdDevStdDev { get; }
public string DwnBin1StdDev { get; }
public string DwnBin2StdDev { get; }
public string DwnBin3StdDev { get; }
public string DwnBin4StdDev { get; }
public string DwnBin5StdDev { get; }
public string DwnBin6StdDev { get; }
public string DwnBin7StdDev { get; }
public string DwnBin8StdDev { get; }
public string DnnAllMin { get; }
public string DnnLpdMin { get; }
public string DnnLpdNMin { get; }
public string DnnLpdESMin { get; }
public string DnnMicroScrMin { get; }
public string DnnScrMin { get; }
public string DnnSlipMin { get; }
public string DnnAreaCountMin { get; }
public string DnnAreaMin { get; }
public string DnnHazeAvgMin { get; }
public string DnnHazeMedianMin { get; }
public string DnnHazeStdDevMin { get; }
public string DnnBin1Min { get; }
public string DnnBin2Min { get; }
public string DnnBin3Min { get; }
public string DnnBin4Min { get; }
public string DnnBin5Min { get; }
public string DnnBin6Min { get; }
public string DnnBin7Min { get; }
public string DnnBin8Min { get; }
public string DnnAllMax { get; }
public string DnnLpdMax { get; }
public string DnnLpdNMax { get; }
public string DnnLpdESMax { get; }
public string DnnMicroScrMax { get; }
public string DnnScrMax { get; }
public string DnnSlipMax { get; }
public string DnnAreaCountMax { get; }
public string DnnAreaMax { get; }
public string DnnHazeAvgMax { get; }
public string DnnHazeMedianMax { get; }
public string DnnHazeStdDevMax { get; }
public string DnnBin1Max { get; }
public string DnnBin2Max { get; }
public string DnnBin3Max { get; }
public string DnnBin4Max { get; }
public string DnnBin5Max { get; }
public string DnnBin6Max { get; }
public string DnnBin7Max { get; }
public string DnnBin8Max { get; }
public string DnnAllMean { get; }
public string DnnLpdMean { get; }
public string DnnLpdNMean { get; }
public string DnnLpdESMean { get; }
public string DnnMicroScrMean { get; }
public string DnnScrMean { get; }
public string DnnSlipMean { get; }
public string DnnAreaCountMean { get; }
public string DnnAreaMean { get; }
public string DnnHazeAvgMean { get; }
public string DnnHazeMedianMean { get; }
public string DnnHazeStdDevMean { get; }
public string DnnBin1Mean { get; }
public string DnnBin2Mean { get; }
public string DnnBin3Mean { get; }
public string DnnBin4Mean { get; }
public string DnnBin5Mean { get; }
public string DnnBin6Mean { get; }
public string DnnBin7Mean { get; }
public string DnnBin8Mean { get; }
public string DnnAllStdDev { get; }
public string DnnLpdStdDev { get; }
public string DnnLpdNStdDev { get; }
public string DnnLpdESStdDev { get; }
public string DnnMicroScrStdDev { get; }
public string DnnScrStdDev { get; }
public string DnnSlipStdDev { get; }
public string DnnAreaCountStdDev { get; }
public string DnnAreaStdDev { get; }
public string DnnHazeAvgStdDev { get; }
public string DnnHazeMedianStdDev { get; }
public string DnnHazeStdDevStdDev { get; }
public string DnnBin1StdDev { get; }
public string DnnBin2StdDev { get; }
public string DnnBin3StdDev { get; }
public string DnnBin4StdDev { get; }
public string DnnBin5StdDev { get; }
public string DnnBin6StdDev { get; }
public string DnnBin7StdDev { get; }
public string DnnBin8StdDev { get; }
//
public string Side { get; }
public string WaferID { get; }
public string Grade { get; }
public string SrcDest { get; }
public string DcnAll { get; }
public string DcnLpd { get; }
public string DcnLpdN { get; }
public string DcnLpdES { get; }
public string DcnMicroScr { get; }
public string DcnScr { get; }
public string DcnSlip { get; }
public string DcnAreaCount { get; }
public string DcnArea { get; }
public string DcnHazeAvg { get; }
public string DcnHazeMedian { get; }
public string DcnHazeStdDev { get; }
public string DcnBin1 { get; }
public string DcnBin2 { get; }
public string DcnBin3 { get; }
public string DcnBin4 { get; }
public string DcnBin5 { get; }
public string DcnBin6 { get; }
public string DcnBin7 { get; }
public string DcnBin8 { get; }
public string DwnAll { get; }
public string DwnLpd { get; }
public string DwnLpdN { get; }
public string DwnLpdES { get; }
public string DwnMicroScr { get; }
public string DwnScr { get; }
public string DwnSlip { get; }
public string DwnAreaCount { get; }
public string DwnArea { get; }
public string DwnHazeAvg { get; }
public string DwnHazeMedian { get; }
public string DwnHazeStdDev { get; }
public string DwnBin1 { get; }
public string DwnBin2 { get; }
public string DwnBin3 { get; }
public string DwnBin4 { get; }
public string DwnBin5 { get; }
public string DwnBin6 { get; }
public string DwnBin7 { get; }
public string DwnBin8 { get; }
public string DnnAll { get; }
public string DnnLpd { get; }
public string DnnLpdN { get; }
public string DnnLpdES { get; }
public string DnnMicroScr { get; }
public string DnnScr { get; }
public string DnnSlip { get; }
public string DnnAreaCount { get; }
public string DnnArea { get; }
public string DnnHazeAvg { get; }
public string DnnHazeMedian { get; }
public string DnnHazeStdDev { get; }
public string DnnBin1 { get; }
public string DnnBin2 { get; }
public string DnnBin3 { get; }
public string DnnBin4 { get; }
public string DnnBin5 { get; }
public string DnnBin6 { get; }
public string DnnBin7 { get; }
public string DnnBin8 { get; }
}
[JsonSourceGenerationOptions(WriteIndented = true)]
[JsonSerializable(typeof(Row))]
internal partial class RowSourceGenerationContext : JsonSerializerContext
{
}

View File

@ -0,0 +1,127 @@
using Adaptation.Shared;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Adaptation.FileHandlers.txt;
#nullable enable
internal class Run
{
public Run(Header header, Summary summary, ReadOnlyCollection<Wafer> wafers)
{
Header = header;
Summary = summary;
Wafers = wafers;
}
public Header Header { get; }
public Summary Summary { get; }
public ReadOnlyCollection<Wafer> Wafers { get; }
private static void WriteJson(Logistics logistics, List<FileInfo> fileInfoCollection, Run result)
{
FileInfo fileInfo = new($"{logistics.ReportFullPath}.run.json");
string json = JsonSerializer.Serialize(result, RunSourceGenerationContext.Default.Run);
File.WriteAllText(fileInfo.FullName, json);
File.SetLastWriteTime(fileInfo.FullName, logistics.DateTimeFromSequence);
fileInfoCollection.Add(fileInfo);
}
private static ReadOnlyCollection<string> GetLines(Logistics logistics, JsonElement[]? jsonElements)
{
List<string> results = new();
int columns = 0;
StringBuilder stringBuilder = new();
results.Add($"\"Count\",{jsonElements?.Length}");
results.Add($"\"{nameof(logistics.Sequence)}\",\"{logistics.Sequence}\"");
results.Add($"\"{nameof(logistics.MesEntity)}\",\"{logistics.MesEntity}\"");
string dateTimeFromSequence = logistics.DateTimeFromSequence.ToString("MM/dd/yyyy hh:mm:ss tt");
for (int i = 0; i < jsonElements?.Length;)
{
_ = stringBuilder.Append('"').Append(nameof(logistics.DateTimeFromSequence)).Append('"').Append(',');
foreach (JsonProperty jsonProperty in jsonElements[0].EnumerateObject())
{
columns += 1;
_ = stringBuilder.Append('"').Append(jsonProperty.Name).Append('"').Append(',');
}
break;
}
if (jsonElements?.Length != 0)
_ = stringBuilder.Remove(stringBuilder.Length - 1, 1);
results.Add(stringBuilder.ToString());
for (int i = 0; i < jsonElements?.Length; i++)
{
_ = stringBuilder.Clear();
_ = stringBuilder.Append('"').Append(dateTimeFromSequence).Append('"').Append(',');
foreach (JsonProperty jsonProperty in jsonElements[i].EnumerateObject())
{
if (jsonProperty.Value.ValueKind == JsonValueKind.Object)
_ = stringBuilder.Append(',');
else if (jsonProperty.Value.ValueKind != JsonValueKind.String)
_ = stringBuilder.Append(jsonProperty.Value).Append(',');
else
_ = stringBuilder.Append('"').Append(jsonProperty.Value).Append('"').Append(',');
}
_ = stringBuilder.Remove(stringBuilder.Length - 1, 1);
results.Add(stringBuilder.ToString());
}
return results.AsReadOnly();
}
private static void WriteCommaSeparatedValues(Logistics logistics, Run run)
{
List<Row> results = new();
Row row;
for (int i = 0; i < run.Wafers.Count; i++)
{
row = new(run, i);
results.Add(row);
}
string json = JsonSerializer.Serialize(results);
JsonElement[]? jsonElements = JsonSerializer.Deserialize<JsonElement[]>(json);
ReadOnlyCollection<string> lines = GetLines(logistics, jsonElements);
File.WriteAllText($"{logistics.ReportFullPath}.csv", string.Join(Environment.NewLine, lines));
}
internal static Run? Get(Logistics logistics, List<FileInfo> fileInfoCollection)
{
Run? result;
string text = File.ReadAllText(logistics.ReportFullPath);
if (string.IsNullOrEmpty(text))
result = null;
else
{
Constant constant = new();
int[] i = new int[] { 0 };
List<WaferSummaryInfo> dcnTotals = new();
List<WaferSummaryInfo> dwnTotals = new();
List<WaferSummaryInfo> dnnTotals = new();
Header header = Header.Get(constant, i, text);
Summary summary = Summary.Get(constant, i, text, dcnTotals, dwnTotals, dnnTotals);
ReadOnlyCollection<Wafer> wafers = Wafer.Get(dcnTotals, dwnTotals, dnnTotals);
if (wafers.Count == 0)
result = null;
else
{
result = new(header, summary, wafers);
WriteJson(logistics, fileInfoCollection, result);
WriteCommaSeparatedValues(logistics, result);
}
}
return result;
}
}
[JsonSourceGenerationOptions(WriteIndented = true)]
[JsonSerializable(typeof(Run))]
internal partial class RunSourceGenerationContext : JsonSerializerContext
{
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,287 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text.Json.Serialization;
namespace Adaptation.FileHandlers.txt;
public class Wafer
{
public Wafer(string side,
string waferID,
string grade,
string srcDest,
string dcnAll,
string dcnLpd,
string dcnLpdN,
string dcnLpdES,
string dcnMicroScr,
string dcnScr,
string dcnSlip,
string dcnAreaCount,
string dcnArea,
string dcnHazeAvg,
string dcnHazeMedian,
string dcnHazeStdDev,
string dcnBin1,
string dcnBin2,
string dcnBin3,
string dcnBin4,
string dcnBin5,
string dcnBin6,
string dcnBin7,
string dcnBin8,
string dwnAll,
string dwnLpd,
string dwnLpdN,
string dwnLpdES,
string dwnMicroScr,
string dwnScr,
string dwnSlip,
string dwnAreaCount,
string dwnArea,
string dwnHazeAvg,
string dwnHazeMedian,
string dwnHazeStdDev,
string dwnBin1,
string dwnBin2,
string dwnBin3,
string dwnBin4,
string dwnBin5,
string dwnBin6,
string dwnBin7,
string dwnBin8,
string dnnAll,
string dnnLpd,
string dnnLpdN,
string dnnLpdES,
string dnnMicroScr,
string dnnScr,
string dnnSlip,
string dnnAreaCount,
string dnnArea,
string dnnHazeAvg,
string dnnHazeMedian,
string dnnHazeStdDev,
string dnnBin1,
string dnnBin2,
string dnnBin3,
string dnnBin4,
string dnnBin5,
string dnnBin6,
string dnnBin7,
string dnnBin8)
{
Side = side;
WaferID = waferID;
Grade = grade;
SrcDest = srcDest;
DcnAll = dcnAll;
DcnLpd = dcnLpd;
DcnLpdN = dcnLpdN;
DcnLpdES = dcnLpdES;
DcnMicroScr = dcnMicroScr;
DcnScr = dcnScr;
DcnSlip = dcnSlip;
DcnAreaCount = dcnAreaCount;
DcnArea = dcnArea;
DcnHazeAvg = dcnHazeAvg;
DcnHazeMedian = dcnHazeMedian;
DcnHazeStdDev = dcnHazeStdDev;
DcnBin1 = dcnBin1;
DcnBin2 = dcnBin2;
DcnBin3 = dcnBin3;
DcnBin4 = dcnBin4;
DcnBin5 = dcnBin5;
DcnBin6 = dcnBin6;
DcnBin7 = dcnBin7;
DcnBin8 = dcnBin8;
DwnAll = dwnAll;
DwnLpd = dwnLpd;
DwnLpdN = dwnLpdN;
DwnLpdES = dwnLpdES;
DwnMicroScr = dwnMicroScr;
DwnScr = dwnScr;
DwnSlip = dwnSlip;
DwnAreaCount = dwnAreaCount;
DwnArea = dwnArea;
DwnHazeAvg = dwnHazeAvg;
DwnHazeMedian = dwnHazeMedian;
DwnHazeStdDev = dwnHazeStdDev;
DwnBin1 = dwnBin1;
DwnBin2 = dwnBin2;
DwnBin3 = dwnBin3;
DwnBin4 = dwnBin4;
DwnBin5 = dwnBin5;
DwnBin6 = dwnBin6;
DwnBin7 = dwnBin7;
DwnBin8 = dwnBin8;
DnnAll = dnnAll;
DnnLpd = dnnLpd;
DnnLpdN = dnnLpdN;
DnnLpdES = dnnLpdES;
DnnMicroScr = dnnMicroScr;
DnnScr = dnnScr;
DnnSlip = dnnSlip;
DnnAreaCount = dnnAreaCount;
DnnArea = dnnArea;
DnnHazeAvg = dnnHazeAvg;
DnnHazeMedian = dnnHazeMedian;
DnnHazeStdDev = dnnHazeStdDev;
DnnBin1 = dnnBin1;
DnnBin2 = dnnBin2;
DnnBin3 = dnnBin3;
DnnBin4 = dnnBin4;
DnnBin5 = dnnBin5;
DnnBin6 = dnnBin6;
DnnBin7 = dnnBin7;
DnnBin8 = dnnBin8;
}
public string Side { get; }
public string WaferID { get; }
public string Grade { get; }
public string SrcDest { get; }
public string DcnAll { get; }
public string DcnLpd { get; }
public string DcnLpdN { get; }
public string DcnLpdES { get; }
public string DcnMicroScr { get; }
public string DcnScr { get; }
public string DcnSlip { get; }
public string DcnAreaCount { get; }
public string DcnArea { get; }
public string DcnHazeAvg { get; }
public string DcnHazeMedian { get; }
public string DcnHazeStdDev { get; }
public string DcnBin1 { get; }
public string DcnBin2 { get; }
public string DcnBin3 { get; }
public string DcnBin4 { get; }
public string DcnBin5 { get; }
public string DcnBin6 { get; }
public string DcnBin7 { get; }
public string DcnBin8 { get; }
public string DwnAll { get; }
public string DwnLpd { get; }
public string DwnLpdN { get; }
public string DwnLpdES { get; }
public string DwnMicroScr { get; }
public string DwnScr { get; }
public string DwnSlip { get; }
public string DwnAreaCount { get; }
public string DwnArea { get; }
public string DwnHazeAvg { get; }
public string DwnHazeMedian { get; }
public string DwnHazeStdDev { get; }
public string DwnBin1 { get; }
public string DwnBin2 { get; }
public string DwnBin3 { get; }
public string DwnBin4 { get; }
public string DwnBin5 { get; }
public string DwnBin6 { get; }
public string DwnBin7 { get; }
public string DwnBin8 { get; }
public string DnnAll { get; }
public string DnnLpd { get; }
public string DnnLpdN { get; }
public string DnnLpdES { get; }
public string DnnMicroScr { get; }
public string DnnScr { get; }
public string DnnSlip { get; }
public string DnnAreaCount { get; }
public string DnnArea { get; }
public string DnnHazeAvg { get; }
public string DnnHazeMedian { get; }
public string DnnHazeStdDev { get; }
public string DnnBin1 { get; }
public string DnnBin2 { get; }
public string DnnBin3 { get; }
public string DnnBin4 { get; }
public string DnnBin5 { get; }
public string DnnBin6 { get; }
public string DnnBin7 { get; }
public string DnnBin8 { get; }
internal static ReadOnlyCollection<Wafer> Get(List<WaferSummaryInfo> dcnTotals, List<WaferSummaryInfo> dwnTotals, List<WaferSummaryInfo> dnnTotals)
{
List<Wafer> results = new();
Wafer wafer;
for (int i = 0; i < dcnTotals.Count; i++)
{
wafer = new(side: dcnTotals[i].Side,
waferID: dcnTotals[i].WaferID,
grade: dcnTotals[i].Grade,
srcDest: dcnTotals[i].SrcDest,
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,
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,
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);
results.Add(wafer);
}
return results.AsReadOnly();
}
}
[JsonSourceGenerationOptions(WriteIndented = true)]
[JsonSerializable(typeof(Wafer))]
internal partial class WaferSourceGenerationContext : JsonSerializerContext
{
}

View File

@ -1,190 +1 @@
trigger:
branches:
include:
- development
paths:
include:
- "Adaptation/*"
pool:
name: eaf
demands: MET08DDUPSP1TBI-Development
steps:
- script: |
set coreVersion=net7.0
echo %coreVersion%
echo ##vso[task.setvariable variable=CoreVersion;]%coreVersion%
echo $(CoreVersion)
displayName: CoreVersion
- script: |
set configuration=Debug
echo %configuration%
echo ##vso[task.setvariable variable=Configuration;]%configuration%
echo $(Configuration)
displayName: Configuration
- script: |
set nugetSource=https://eaf-dev-reporting.mes.infineon.com/v3/index.json
echo %nugetSource%
echo ##vso[task.setvariable variable=NugetSource;]%nugetSource%
echo $(NugetSource)
displayName: NugetSource
- script: |
set gitCommit=$(Build.SourceVersion)
set gitCommitSeven=%gitCommit:~0,7%
echo %gitCommitSeven%
echo ##vso[task.setvariable variable=GitCommitSeven;]%gitCommitSeven%
echo $(GitCommitSeven)
displayName: GitCommitSeven
- script: |
echo $(Build.BuildId)
echo $(Build.Reason)
echo $(Build.Repository.Id)
echo $(Build.Repository.Name)
echo $(Build.SourceVersion)
echo $(CoreVersion)
echo $(Configuration)
echo $(NugetSource)
echo $(GitCommitSeven)
REM echo $(pipelinePassword)
displayName: "Echo Check"
- script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
displayName: "Nuget Clear"
# enabled: false
- script: |
"C:\program files\dotnet\dotnet.exe" user-secrets init
"C:\program files\dotnet\dotnet.exe" user-secrets set "BuildNumber" "$(Build.BuildId)"
"C:\program files\dotnet\dotnet.exe" user-secrets set "GitCommitSeven" "$(GitCommitSeven)"
"C:\program files\dotnet\dotnet.exe" user-secrets list
workingDirectory: Adaptation
displayName: "Safe storage of app secrets - Adaptation"
- task: CopyFiles@2
displayName: "Copy Files to: - GhostPCL"
inputs:
Contents: '*'
SourceFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\GhostPCL\gpcl6win64'
TargetFolder: 'Adaptation\bin\$(Configuration)\net6.0\win-x64'
OverWrite: true
enabled: false
- task: CopyFiles@2
displayName: "Copy Files to: - LincPDFC"
inputs:
Contents: '*'
SourceFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\LincPDFC\v2.6.6.21'
TargetFolder: 'Adaptation\bin\$(Configuration)\net6.0\win-x64'
OverWrite: true
enabled: false
- task: CopyFiles@2
displayName: "Copy Files to: - PDF-Text-Stripper"
inputs:
Contents: '*'
SourceFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\PDF-Text-Stripper\v4.8.0.1'
TargetFolder: 'Adaptation\bin\$(Configuration)\net6.0\win-x64'
OverWrite: true
enabled: false
- script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
workingDirectory: Adaptation
displayName: "Core Build - Adaptation"
- powershell: Get-ChildItem .\ -include TestResults -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
workingDirectory: "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)"
displayName: "PowerShell Script"
continueOnError: true
- script: "dotnet test --configuration $(Configuration)"
workingDirectory: Adaptation
displayName: "Core Test"
- script: 'move /y "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)/05_TestResults/TestResults" $(System.DefaultWorkingDirectory)'
displayName: "Move Results"
- script: '"C:\program files\dotnet\dotnet.exe" tool restore'
workingDirectory: Adaptation
displayName: "Tool Restore"
enabled: false
- script: '"C:\program files\dotnet\dotnet.exe" ReportGenerator -reports:$(System.DefaultWorkingDirectory)/TestResults/**/coverage.cobertura.xml -targetDir:$(Build.ArtifactStagingDirectory)\Coverage -reportTypes:Html_Dark'
workingDirectory: Adaptation
displayName: "Report Generator"
enabled: false
- task: PublishTestResults@2
displayName: "Publish Test Results **/*.trx"
inputs:
testResultsFormat: VSTest
testResultsFiles: "**/*.trx"
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
- task: PublishTestResults@2
displayName: "Publish Test Results */coverage.cobertura.xml"
inputs:
testResultsFormat: VSTest
testResultsFiles: "*/coverage.cobertura.xml"
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
- task: mspremier.CreateWorkItem.CreateWorkItem-task.CreateWorkItem@1
displayName: "Create work item"
inputs:
teamProject: "Mesa_FI"
workItemType: Bug
title: $(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)
assignedTo: "$(Build.RequestedForId)"
enabled: false
- script: '"C:\program files\dotnet\dotnet.exe" publish --configuration $(Configuration) --runtime win-x64 --self-contained -o $(Build.ArtifactStagingDirectory)\Adaptation --source $(NugetSource)'
workingDirectory: Adaptation
displayName: "Core Publish"
enabled: false
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Restore /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8 /p:RestoreSources=$(NugetSource)'
displayName: "MSBuild Restore"
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8'
displayName: MSBuild
- script: 'echo $(Build.SourceVersion)-$(Build.BuildId)-$(Build.Repository.Name)>bin\$(Configuration)\$(Build.Repository.Name).txt'
displayName: "Commit Id"
- task: CopyFiles@2
displayName: 'Copy Files to: D:\Framework4.8'
inputs:
Contents: "*$(Build.Repository.Name)*"
SourceFolder: 'bin\$(Configuration)'
TargetFolder: 'D:\Framework4.8\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)'
OverWrite: true
enabled: false
- task: CopyFiles@2
displayName: 'Copy Files to: \\mesfs.infineon.com\EC_EAFRepository'
inputs:
Contents: "*$(Build.Repository.Name)*"
SourceFolder: 'bin\$(Configuration)'
TargetFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\Adaptation_$(Build.Repository.Name)'
OverWrite: true
enabled: false
- script: |
"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
workingDirectory: Adaptation
displayName: "Core Clean - Tests"
- script: |
"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
workingDirectory: Adaptation
displayName: "Core Clean - Adaptation"
- script: 'echo $(Build.SourceVersion)-$(Build.BuildId)>bin_x_x_\$(Configuration)\$(CoreVersion)\win-x64\$(Build.Repository.Name).txt'
displayName: "Force Fail"
enabled: false
# dotnet nuget push --source https://tfs.intra.infineon.com/tfs/FactoryIntegration/fccf8303-9cf7-4788-a9e0-4042541503fa/_packaging/EAF-Mesa-Integration/nuget/v3/index.json --api-key az D:\vsts-agent-win-x64-2.210.1-eaf\nuget\infineon.mesa.pdf.text.stripper.4.8.0.1.nupkg

View File

@ -35,7 +35,7 @@
<RuntimeHostConfigurationOption Include="AssemblyName" Value="MET08DDUPSP1TBI" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.2" />
<PackageReference Include="coverlet.collector" Version="6.0.3" />
<PackageReference Include="FFMpegCore" Version="5.1.0" />
<PackageReference Include="IKVM.AWT.WinForms" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="IKVM.OpenJDK.Core" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
@ -44,41 +44,39 @@
<PackageReference Include="IKVM.OpenJDK.Util" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="IKVM.OpenJDK.XML.API" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="IKVM.Runtime" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="Instances" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.json" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="Microsoft.Win32.SystemEvents" Version="8.0.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.3.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.3.1" />
<PackageReference Include="Instances" Version="3.0.1" />
<PackageReference Include="log4net" Version="3.0.3"></PackageReference>
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.json" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="Microsoft.Win32.SystemEvents" Version="9.0.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.7.0" />
<PackageReference Include="MSTest.TestFramework" Version="3.7.0" />
<PackageReference Include="Pdfbox" Version="1.1.1"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="RoboSharp" Version="1.5.1" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.0" />
<PackageReference Include="System.Data.OleDb" Version="8.0.0" />
<PackageReference Include="RoboSharp" Version="1.6.0" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="9.0.0" />
<PackageReference Include="System.Data.OleDb" Version="9.0.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
<PackageReference Include="System.Drawing.Common" Version="8.0.5" />
<PackageReference Include="System.Text.Json" Version="8.0.3" />
<PackageReference Include="Tesseract" Version="5.2.0" />
<PackageReference Include="System.Drawing.Common" Version="9.0.0" />
<PackageReference Include="System.Text.Json" Version="9.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Infineon.Mesa.PDF.Text.Stripper" Version="4.8.0.2"><NoWarn>NU1701</NoWarn></PackageReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Infineon.Yoda.DotNetCore" Version="5.4.3" />
<PackageReference Include="Tibco.Rendezvous.DotNetCore" Version="8.5.0" />
<PackageReference Include="Infineon.Yoda.DotNetCore" Version="5.4.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Infineon.Mesa.PDF.Text.Stripper" Version="4.8.0.1"><NoWarn>NU1701</NoWarn></PackageReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="External.Common.Logging.Core" Version="3.3.1"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="External.Common.Logging" Version="3.3.1"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="External.log4net" Version="2.0.8"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="Tesseract" Version="5.2.0" />
</ItemGroup>
<ItemGroup>
<None Include="appsettings.json">

View File

@ -1,3 +1,9 @@
# D:
# cd D:\EAF-Mesa-Integration
# config --url https://tfs.intra.infineon.com/tfs/FactoryIntegration --pool "EAF Mesa Integration" --agent mestsa003-meseafsvc --work _work --runAsService --auth negotiate --userName infineon\phares
# D:
# cd D:\EAF-Mesa-Integration
# config --url https://tfs.intra.infineon.com/tfs/FactoryIntegration --pool "EAF Mesa Integration" --agent mestsa07ec-ecmeseaf --work _work --runAsService --auth negotiate --userName infineon\phares
trigger:
branches:
include:
@ -6,180 +12,273 @@ trigger:
include:
- "Adaptation/*"
pool:
name: eaf
demands: MET08DDUPSP1TBI
stages:
- stage: DevServer
displayName: DevServer
steps:
- script: |
set coreVersion=net7.0
echo %coreVersion%
echo ##vso[task.setvariable variable=CoreVersion;]%coreVersion%
echo $(CoreVersion)
displayName: CoreVersion
pool:
name: EAF Mesa Integration
demands: MET08DDUPSP1TBI-Development
- script: |
set configuration=Release
echo %configuration%
echo ##vso[task.setvariable variable=Configuration;]%configuration%
echo $(Configuration)
displayName: Configuration
variables:
coreVersion: "net8.0"
nugetSource: "https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/"
- script: |
set nugetSource=https://eaf-prod.mes.infineon.com/v3/index.json
echo %nugetSource%
echo ##vso[task.setvariable variable=NugetSource;]%nugetSource%
echo $(NugetSource)
displayName: NugetSource
jobs:
- job: SetupEnvironment
steps:
- script: |
echo $(Build.BuildId)
echo $(Build.Reason)
echo $(Build.Repository.Id)
echo $(Build.Repository.Name)
echo $(Build.SourceVersion)
echo $(CoreVersion)
echo $(NugetSource)
displayName: "Echo Check"
- script: |
set gitCommit=$(Build.SourceVersion)
set gitCommitSeven=%gitCommit:~0,7%
echo %gitCommitSeven%
echo ##vso[task.setvariable variable=GitCommitSeven;]%gitCommitSeven%
echo $(GitCommitSeven)
displayName: GitCommitSeven
- script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
displayName: "Nuget Clear"
enabled: false
- script: |
echo $(Build.BuildId)
echo $(Build.Reason)
echo $(Build.Repository.Id)
echo $(Build.Repository.Name)
echo $(Build.SourceVersion)
echo $(CoreVersion)
echo $(Configuration)
echo $(NugetSource)
echo $(GitCommitSeven)
REM echo $(pipelinePassword)
displayName: "Echo Check"
- script: |
"C:\program files\dotnet\dotnet.exe" user-secrets init
"C:\program files\dotnet\dotnet.exe" user-secrets set "BuildNumber" "$(Build.BuildId)"
"C:\program files\dotnet\dotnet.exe" user-secrets set "GitCommit" "$(Build.SourceVersion)"
"C:\program files\dotnet\dotnet.exe" user-secrets list
workingDirectory: Adaptation
displayName: "Safe storage of app secrets - Adaptation"
- script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
displayName: "Nuget Clear"
enabled: false
- job: BuildDebug
dependsOn:
- SetupEnvironment
steps:
- script: |
set configuration=Debug
echo %configuration%
echo ##vso[task.setvariable variable=Configuration;]%configuration%
echo $(Configuration)
displayName: Configuration
- script: |
"C:\program files\dotnet\dotnet.exe" user-secrets init
"C:\program files\dotnet\dotnet.exe" user-secrets set "BuildNumber" "$(Build.BuildId)"
"C:\program files\dotnet\dotnet.exe" user-secrets set "GitCommitSeven" "$(GitCommitSeven)"
"C:\program files\dotnet\dotnet.exe" user-secrets list
workingDirectory: Adaptation
displayName: "Safe storage of app secrets - Adaptation"
- script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
workingDirectory: Adaptation
displayName: "Core Build - Adaptation"
- task: CopyFiles@2
displayName: "Copy Files to: - GhostPCL"
inputs:
Contents: '*'
SourceFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\GhostPCL\gpcl6win64'
TargetFolder: 'Adaptation\bin\$(Configuration)\net6.0\win-x64'
OverWrite: true
- job: BuildRelease
dependsOn:
- SetupEnvironment
steps:
- script: |
set configuration=Release
echo %configuration%
echo ##vso[task.setvariable variable=Configuration;]%configuration%
echo $(Configuration)
displayName: Configuration
- task: CopyFiles@2
displayName: "Copy Files to: - LincPDFC"
inputs:
Contents: '*'
SourceFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\LincPDFC\v2.6.6.21'
TargetFolder: 'Adaptation\bin\$(Configuration)\net6.0\win-x64'
OverWrite: true
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Restore /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8 /p:RestoreSources=$(NugetSource)'
displayName: "MSBuild Restore"
- task: CopyFiles@2
displayName: "Copy Files to: - PDF-Text-Stripper"
inputs:
Contents: '*'
SourceFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\PDF-Text-Stripper\v4.8.0.1'
TargetFolder: 'Adaptation\bin\$(Configuration)\net6.0\win-x64'
OverWrite: true
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8'
displayName: MSBuild
- script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
workingDirectory: Adaptation
displayName: "Core Build - Adaptation"
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8'
displayName: MSBuild
- powershell: Get-ChildItem .\ -include TestResults -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
workingDirectory: "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)"
displayName: "PowerShell Script"
continueOnError: true
- script: 'echo $(Build.Repository.Name)-$(Build.BuildId)-$(Build.SourceVersion)>bin\$(Configuration)\$(Build.Repository.Name).txt'
displayName: "Commit Id"
- script: "dotnet test --configuration $(Configuration)"
workingDirectory: Adaptation
displayName: "Core Test"
- task: CopyFiles@2
displayName: 'Copy Files to: D:\EAF'
inputs:
Contents: "*$(Build.Repository.Name)*"
SourceFolder: 'bin\$(Configuration)'
TargetFolder: 'D:\EAF\EAF Deployment Storage\Adaptation_$(Build.Repository.Name)'
OverWrite: true
enabled: true
- script: 'move /y "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)/05_TestResults/TestResults" $(System.DefaultWorkingDirectory)'
displayName: "Move Results"
- job: TestDebug
dependsOn:
- SetupEnvironment
- BuildDebug
- BuildRelease
steps:
- script: |
set configuration=Debug
echo %configuration%
echo ##vso[task.setvariable variable=Configuration;]%configuration%
echo $(Configuration)
displayName: Configuration
- script: '"C:\program files\dotnet\dotnet.exe" tool restore'
workingDirectory: Adaptation
displayName: "Tool Restore"
enabled: false
- powershell: Get-ChildItem .\ -include TestResults -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
workingDirectory: "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)"
displayName: "PowerShell Script"
continueOnError: true
- script: '"C:\program files\dotnet\dotnet.exe" ReportGenerator -reports:$(System.DefaultWorkingDirectory)/TestResults/**/coverage.cobertura.xml -targetDir:$(Build.ArtifactStagingDirectory)\Coverage -reportTypes:Html_Dark'
workingDirectory: Adaptation
displayName: "Report Generator"
enabled: false
- script: "dotnet test --configuration $(Configuration)"
workingDirectory: Adaptation
displayName: "Core Test"
- task: PublishTestResults@2
displayName: "Publish Test Results **/*.trx"
inputs:
testResultsFormat: VSTest
testResultsFiles: "**/*.trx"
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
- script: 'move /y "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)/05_TestResults/TestResults" $(System.DefaultWorkingDirectory)'
displayName: "Move Results"
- task: PublishTestResults@2
displayName: "Publish Test Results */coverage.cobertura.xml"
inputs:
testResultsFormat: VSTest
testResultsFiles: "*/coverage.cobertura.xml"
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
- script: '"C:\program files\dotnet\dotnet.exe" tool restore'
workingDirectory: Adaptation
displayName: "Tool Restore"
enabled: false
- task: mspremier.CreateWorkItem.CreateWorkItem-task.CreateWorkItem@1
displayName: "Create work item"
inputs:
teamProject: "Mesa_FI"
workItemType: Bug
title: $(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)
assignedTo: "$(Build.RequestedForId)"
enabled: false
- script: '"C:\program files\dotnet\dotnet.exe" ReportGenerator -reports:$(System.DefaultWorkingDirectory)/TestResults/**/coverage.cobertura.xml -targetDir:$(Build.ArtifactStagingDirectory)\Coverage -reportTypes:Html_Dark'
workingDirectory: Adaptation
displayName: "Report Generator"
enabled: false
- script: '"C:\program files\dotnet\dotnet.exe" publish --configuration $(Configuration) --runtime win-x64 --self-contained -o $(Build.ArtifactStagingDirectory)\Adaptation --source $(NugetSource)'
workingDirectory: Adaptation
displayName: "Core Publish"
enabled: false
- task: PublishTestResults@2
displayName: "Publish Test Results **/*.trx"
inputs:
testResultsFormat: VSTest
testResultsFiles: "**/*.trx"
testRunTitle: "$(Build.BuildId)-$(Build.SourceVersion)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Restore /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8 /p:RestoreSources=$(NugetSource)'
displayName: "MSBuild Restore"
- task: PublishTestResults@2
displayName: "Publish Test Results */coverage.cobertura.xml"
inputs:
testResultsFormat: VSTest
testResultsFiles: "*/coverage.cobertura.xml"
testRunTitle: "$(Build.BuildId)-$(Build.SourceVersion)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8'
displayName: MSBuild
- script: |
"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
workingDirectory: Adaptation
displayName: "Core Clean - Adaptation"
- script: 'echo $(Build.SourceVersion)-$(Build.BuildId)-$(Build.Repository.Name)>bin\$(Configuration)\$(Build.Repository.Name).txt'
displayName: "Commit Id"
- script: 'echo $(Build.BuildId)-$(Build.SourceVersion)-bin_x_x_\$(Configuration)\$(CoreVersion)\win-x64\$(Build.Repository.Name).txt'
displayName: "Force Fail"
enabled: false
- task: CopyFiles@2
displayName: 'Copy Files to: D:\Framework4.8'
inputs:
Contents: "*$(Build.Repository.Name)*"
SourceFolder: 'bin\$(Configuration)'
TargetFolder: 'D:\Framework4.8\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)'
OverWrite: true
- stage: ProductionServer
displayName: ProductionServer
- task: CopyFiles@2
displayName: 'Copy Files to: \\mesfs.infineon.com\EC_EAFRepository'
inputs:
Contents: "*$(Build.Repository.Name)*"
SourceFolder: 'bin\$(Configuration)'
TargetFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\Adaptation_$(Build.Repository.Name)'
OverWrite: true
pool:
name: EAF Mesa Integration
demands: MET08DDUPSP1TBI
- script: |
"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
workingDirectory: Adaptation
displayName: "Core Clean - Tests"
variables:
coreVersion: "net8.0"
nugetSource: "https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/"
- script: |
"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
workingDirectory: Adaptation
displayName: "Core Clean - Adaptation"
jobs:
- job: SetupEnvironment
steps:
- script: |
echo $(Build.BuildId)
echo $(Build.Reason)
echo $(Build.Repository.Id)
echo $(Build.Repository.Name)
echo $(Build.SourceVersion)
echo $(CoreVersion)
echo $(NugetSource)
displayName: "Echo Check"
- script: 'echo $(Build.SourceVersion)-$(Build.BuildId)>bin_x_x_\$(Configuration)\$(CoreVersion)\win-x64\$(Build.Repository.Name).txt'
displayName: "Force Fail"
enabled: false
- script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
displayName: "Nuget Clear"
enabled: false
- script: |
"C:\program files\dotnet\dotnet.exe" user-secrets init
"C:\program files\dotnet\dotnet.exe" user-secrets set "BuildNumber" "$(Build.BuildId)"
"C:\program files\dotnet\dotnet.exe" user-secrets set "GitCommit" "$(Build.SourceVersion)"
"C:\program files\dotnet\dotnet.exe" user-secrets list
workingDirectory: Adaptation
displayName: "Safe storage of app secrets - Adaptation"
- job: BuildRelease
dependsOn:
- SetupEnvironment
steps:
- script: |
set configuration=Release
echo %configuration%
echo ##vso[task.setvariable variable=Configuration;]%configuration%
echo $(Configuration)
displayName: Configuration
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Restore /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8 /p:RestoreSources=$(NugetSource)'
displayName: "MSBuild Restore"
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8'
displayName: MSBuild
- script: 'echo $(Build.Repository.Name)-$(Build.BuildId)-$(Build.SourceVersion)>bin\$(Configuration)\$(Build.Repository.Name).txt'
displayName: "Commit Id"
- task: CopyFiles@2
displayName: 'Copy Files to: D:\EAF'
inputs:
Contents: "*$(Build.Repository.Name)*"
SourceFolder: 'bin\$(Configuration)'
TargetFolder: 'D:\EAF\EAF Deployment Storage\Adaptation_$(Build.Repository.Name)'
OverWrite: true
- script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
workingDirectory: Adaptation
displayName: "Core Build - Adaptation"
- job: TestRelease
dependsOn:
- SetupEnvironment
- BuildRelease
steps:
- script: |
set configuration=Release
echo %configuration%
echo ##vso[task.setvariable variable=Configuration;]%configuration%
echo $(Configuration)
displayName: Configuration
- powershell: Get-ChildItem .\ -include TestResults -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
workingDirectory: "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)"
displayName: "PowerShell Script"
continueOnError: true
- script: "dotnet test --configuration $(Configuration)"
workingDirectory: Adaptation
displayName: "Core Test"
- script: 'move /y "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)/05_TestResults/TestResults" $(System.DefaultWorkingDirectory)'
displayName: "Move Results"
- script: '"C:\program files\dotnet\dotnet.exe" tool restore'
workingDirectory: Adaptation
displayName: "Tool Restore"
enabled: false
- script: '"C:\program files\dotnet\dotnet.exe" ReportGenerator -reports:$(System.DefaultWorkingDirectory)/TestResults/**/coverage.cobertura.xml -targetDir:$(Build.ArtifactStagingDirectory)\Coverage -reportTypes:Html_Dark'
workingDirectory: Adaptation
displayName: "Report Generator"
enabled: false
- task: PublishTestResults@2
displayName: "Publish Test Results **/*.trx"
inputs:
testResultsFormat: VSTest
testResultsFiles: "**/*.trx"
testRunTitle: "$(Build.BuildId)-$(Build.SourceVersion)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
- task: PublishTestResults@2
displayName: "Publish Test Results */coverage.cobertura.xml"
inputs:
testResultsFormat: VSTest
testResultsFiles: "*/coverage.cobertura.xml"
testRunTitle: "$(Build.BuildId)-$(Build.SourceVersion)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
- script: |
"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
workingDirectory: Adaptation
displayName: "Core Clean - Adaptation"
- script: 'echo $(Build.BuildId)-$(Build.SourceVersion)-bin_x_x_\$(Configuration)\$(CoreVersion)\win-x64\$(Build.Repository.Name).txt'
displayName: "Force Fail"
enabled: true

File diff suppressed because it is too large Load Diff

View File

@ -35,6 +35,9 @@ public class Logistics : ILogistics
public long Sequence => _Sequence;
public double TotalSecondsSinceLastWriteTimeFromSequence => _TotalSecondsSinceLastWriteTimeFromSequence;
private static string DefaultMesEntity(DateTime dateTime) =>
string.Concat(dateTime.Ticks, "_MES_ENTITY");
public Logistics(IFileRead fileRead)
{
DateTime dateTime = DateTime.Now;
@ -84,13 +87,13 @@ public class Logistics : ILogistics
_Logistics2 = new List<Logistics2>();
}
public Logistics(string reportFullPath, string logistics)
internal Logistics(string reportFullPath, ProcessDataStandardFormat processDataStandardFormat)
{
string key;
DateTime dateTime;
string[] segments;
_FileInfo = new(reportFullPath);
_Logistics1 = logistics.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).ToList();
_Logistics1 = processDataStandardFormat.Logistics.ToList();
if (Logistics1.Count == 0 || !Logistics1[0].StartsWith("LOGISTICS_1"))
{
_NullData = null;
@ -190,8 +193,6 @@ public class Logistics : ILogistics
}
}
private static string DefaultMesEntity(DateTime dateTime) => string.Concat(dateTime.Ticks, "_MES_ENTITY");
internal void Update(string mid, string processJobID)
{
_MID = mid;

View File

@ -6,23 +6,25 @@ public partial class WS
public class Attachment
{
public string SubGroupId { get; set; }
public long HeaderId { get; set; }
public string HeaderIdDirectory { get; set; }
public string UniqueId { get; set; }
public string DestinationFileName { get; set; }
public string SourceFileName { get; set; }
public string AttachmentId { get; set; }
#nullable enable
public Attachment(string subGroupId, long headerId, string headerIdDirectory, string uniqueId, string destinationFileName, string sourceFileName)
public long HeaderId { get; set; }
public string UniqueId { get; set; }
public string SubGroupId { get; set; }
public string AttachmentId { get; set; }
public string SourceFileName { get; set; }
public string HeaderIdDirectory { get; set; }
public string DestinationFileName { get; set; }
public Attachment(Results? results, string headerIdDirectory, string uniqueId, string destinationFileName, string sourceFileName)
{
SubGroupId = subGroupId;
HeaderId = headerId;
HeaderIdDirectory = headerIdDirectory;
UniqueId = uniqueId;
DestinationFileName = destinationFileName;
SourceFileName = sourceFileName;
HeaderIdDirectory = headerIdDirectory;
DestinationFileName = destinationFileName;
AttachmentId = System.Guid.NewGuid().ToString();
HeaderId = results?.HeaderId is null ? -1 : results.HeaderId.Value;
SubGroupId = results?.SubgroupId is null ? string.Empty : results.SubgroupId.Value.ToString();
}
}

View File

@ -1,27 +1,75 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Adaptation.Shared.Metrology;
public partial class WS
{
// this class represents the response from the Inbound API endpoint
public class Results
{
// true or false if data was written to the database
public bool Success { get; set; }
// if true, contains ID of the Header record in the database
public long HeaderID { get; set; }
#nullable enable
// if false, this collection will contain a list of errors
public List<string> Errors { get; set; }
[JsonConstructor]
public Results(List<string>? errors,
long? headerId,
long? subgroupId,
bool? success,
List<string>? warnings)
{
Errors = errors;
Success = success;
HeaderId = headerId;
Warnings = warnings;
SubgroupId = subgroupId;
}
// this collection will contain a list of warnings, they will not prevent data from being saved
public List<string> Warnings { get; set; }
[JsonPropertyName("errors")] public List<string>? Errors { get; set; }
[JsonPropertyName("headerID")] public long? HeaderId { get; set; }
[JsonPropertyName("subgroupId")] public long? SubgroupId { get; set; }
[JsonPropertyName("success")] public bool? Success { get; set; }
[JsonPropertyName("warnings")] public List<string>? Warnings { get; set; }
public override string ToString()
{
string result = JsonSerializer.Serialize(this, ResultsSourceGenerationContext.Default.Results);
return result;
}
internal static Results Get(Results results, long? subgroupId) =>
new(results.Errors, results.HeaderId, subgroupId, results.Success, results.Warnings);
internal static Results Get(string resultsJson, Exception e)
{
Results results;
Exception? exception = e;
List<string> errors = new();
StringBuilder stringBuilder = new();
while (exception is not null)
{
_ = stringBuilder.AppendLine(exception.Message);
exception = exception.InnerException;
}
errors.Add(resultsJson);
errors.Add(stringBuilder.ToString());
results = new(errors: errors,
headerId: null,
subgroupId: null,
success: false,
warnings: new());
return results;
}
// this is just a helper function to make displaying the results easier
public override string ToString() => JsonSerializer.Serialize(this, GetType());
}
}
[JsonSourceGenerationOptions(WriteIndented = true)]
[JsonSerializable(typeof(WS.Results))]
internal partial class ResultsSourceGenerationContext : JsonSerializerContext
{
}

View File

@ -10,9 +10,11 @@ namespace Adaptation.Shared.Metrology;
public partial class WS
{
#nullable enable
public static (string, Results) SendData(string url, long sequence, string directory, object payload, int timeoutSeconds = 120)
{
Results results = new();
Results? wsResults = null;
string resultsJson = string.Empty;
try
{
@ -30,29 +32,20 @@ public partial class WS
};
HttpResponseMessage httpResponseMessage = httpClient.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseContentRead).Result;
resultsJson = httpResponseMessage.Content.ReadAsStringAsync().Result;
results = JsonSerializer.Deserialize<Results>(resultsJson, new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
string checkDirectory = Path.Combine(directory, $"-{results.HeaderID}");
wsResults = JsonSerializer.Deserialize(resultsJson, ResultsSourceGenerationContext.Default.Results);
if (wsResults is null)
throw new NullReferenceException(nameof(wsResults));
string checkDirectory = Path.Combine(directory, $"-{wsResults.HeaderId}");
if (!Directory.Exists(checkDirectory))
_ = Directory.CreateDirectory(checkDirectory);
File.WriteAllText(Path.Combine(checkDirectory, $"{sequence}.json"), json);
}
if (!results.Success)
results.Errors.Add(results.ToString());
if (wsResults.Success is null || !wsResults.Success.Value)
wsResults.Errors?.Add(wsResults.ToString());
}
catch (Exception e)
{
Exception exception = e;
StringBuilder stringBuilder = new();
while (exception is not null)
{
_ = stringBuilder.AppendLine(exception.Message);
exception = exception.InnerException;
}
results.Errors ??= new List<string>();
results.Errors.Add(resultsJson);
results.Errors.Add(stringBuilder.ToString());
}
return new(resultsJson, results);
{ wsResults ??= Results.Get(resultsJson, e); }
return new(resultsJson, wsResults);
}
public static void AttachFile(string url, Attachment attachment, int timeoutSeconds = 60)
@ -69,34 +62,53 @@ public partial class WS
}
}
public static void AttachFiles(string url, List<Attachment> headerAttachments = null, List<Attachment> dataAttachments = null)
public static void AttachFiles(string url, List<Attachment>? headerAttachments = null, List<Attachment>? dataAttachments = null)
{
string directory;
try
{
string? directoryName;
if (headerAttachments is not null)
{
foreach (Attachment attachment in headerAttachments)
{
directory = Path.GetDirectoryName(attachment.HeaderIdDirectory) ?? throw new Exception();
File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.AttachmentId, attachment.DestinationFileName), overwrite: true);
AttachFile(url, attachment);
directoryName = Path.GetDirectoryName(attachment.HeaderIdDirectory);
if (string.IsNullOrEmpty(directoryName))
continue;
directory = Path.Combine(directoryName, attachment.AttachmentId) ?? throw new Exception();
if (!Directory.Exists(directory))
_ = Directory.CreateDirectory(directory);
File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.DestinationFileName), overwrite: true);
}
}
if (dataAttachments is not null)
{
foreach (Attachment attachment in dataAttachments)
{
directory = Path.GetDirectoryName(attachment.HeaderIdDirectory) ?? throw new Exception();
File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.AttachmentId, attachment.DestinationFileName), overwrite: true);
AttachFile(url, attachment);
directoryName = Path.GetDirectoryName(attachment.HeaderIdDirectory.Replace("Header", "Data"));
if (string.IsNullOrEmpty(directoryName))
continue;
directory = Path.Combine(directoryName, attachment.AttachmentId) ?? throw new Exception();
if (!Directory.Exists(directory))
_ = Directory.CreateDirectory(directory);
File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.DestinationFileName), overwrite: true);
}
}
if (headerAttachments is not null)
{
foreach (Attachment attachment in headerAttachments)
AttachFile(url, attachment);
}
if (dataAttachments is not null)
{
foreach (Attachment attachment in dataAttachments)
AttachFile(url, attachment);
}
//MessageBox.Show(r.ToString());
}
catch (Exception e)
{
Exception exception = e;
Exception? exception = e;
StringBuilder stringBuilder = new();
while (exception is not null)
{

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,33 @@
using System.Collections.ObjectModel;
namespace Adaptation.Shared;
public class ProcessDataStandardFormatMapping
{
public ReadOnlyCollection<string> BackfillColumns { get; private set; }
public ReadOnlyCollection<int> ColumnIndices { get; private set; }
public ReadOnlyCollection<string> IgnoreColumns { get; private set; }
public ReadOnlyCollection<string> IndexOnlyColumns { get; private set; }
public ReadOnlyDictionary<string, string> KeyValuePairs { get; private set; }
public ReadOnlyCollection<string> NewColumnNames { get; private set; }
public ReadOnlyCollection<string> OldColumnNames { get; private set; }
public ProcessDataStandardFormatMapping(ReadOnlyCollection<string> backfillColumns,
ReadOnlyCollection<int> columnIndices,
ReadOnlyCollection<string> ignoreColumns,
ReadOnlyCollection<string> indexOnlyColumns,
ReadOnlyDictionary<string, string> keyValuePairs,
ReadOnlyCollection<string> newColumnNames,
ReadOnlyCollection<string> oldColumnNames)
{
BackfillColumns = backfillColumns;
ColumnIndices = columnIndices;
IgnoreColumns = ignoreColumns;
IndexOnlyColumns = indexOnlyColumns;
KeyValuePairs = keyValuePairs;
NewColumnNames = newColumnNames;
OldColumnNames = oldColumnNames;
}
}

View File

@ -0,0 +1,195 @@
#if v2_57_0
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_57_0;
[TestClass]
public class MET08DDUPSP1TBI : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static MET08DDUPSP1TBI EAFLoggingUnitTesting { get; private set; }
static MET08DDUPSP1TBI() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public MET08DDUPSP1TBI() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public MET08DDUPSP1TBI(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new MET08DDUPSP1TBI(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
}
[ClassCleanup()]
public static void ClassCleanup()
{
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting?.Dispose();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__MET08DDUPSP1TBI__MoveMatchingFiles()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewer()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__MET08DDUPSP1TBI__IQSSi()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__MET08DDUPSP1TBI__OpenInsight()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewerAttachments()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__MET08DDUPSP1TBI__APC()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__MET08DDUPSP1TBI__SPaCe()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__MET08DDUPSP1TBI__Processed()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__MET08DDUPSP1TBI__Archive()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__MET08DDUPSP1TBI__Dummy()
{
string check = "637400748000000000.zip";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__MET08DDUPSP1TBI__TIBCO()
{
string check = "*.idc";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
}
#endif

View File

@ -0,0 +1,70 @@
#if v2_57_0
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_57_0;
[TestClass]
public class SP101_EQPT : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static SP101_EQPT EAFLoggingUnitTesting { get; private set; }
static SP101_EQPT() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public SP101_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public SP101_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new SP101_EQPT(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
}
[ClassCleanup()]
public static void ClassCleanup()
{
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting?.Dispose();
}
private static void NonThrowTryCatch()
{
try
{ throw new Exception(); }
catch (Exception) { }
}
[Ignore]
[TestMethod]
public void Production__v2_57_0__SP101_EQPT__MoveAllFiles()
{
string check = "*";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
NonThrowTryCatch();
}
}
#endif

View File

@ -0,0 +1,65 @@
#if v2_57_0
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_57_0;
[TestClass]
public class SP101 : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static SP101 EAFLoggingUnitTesting { get; private set; }
static SP101() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public SP101() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public SP101(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new SP101(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
}
[ClassCleanup()]
public static void ClassCleanup()
{
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting?.Dispose();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__SP101__txt()
{
string check = "*.txt";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
}
#endif

View File

@ -0,0 +1,195 @@
#if v2_58_0
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_58_0;
[TestClass]
public class MET08DDUPSP1TBI : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static MET08DDUPSP1TBI EAFLoggingUnitTesting { get; private set; }
static MET08DDUPSP1TBI() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public MET08DDUPSP1TBI() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public MET08DDUPSP1TBI(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new MET08DDUPSP1TBI(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
}
[ClassCleanup()]
public static void ClassCleanup()
{
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting?.Dispose();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_58_0__MET08DDUPSP1TBI__MoveMatchingFiles()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_58_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewer()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_58_0__MET08DDUPSP1TBI__IQSSi()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_58_0__MET08DDUPSP1TBI__OpenInsight()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_58_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewerAttachments()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_58_0__MET08DDUPSP1TBI__APC()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_58_0__MET08DDUPSP1TBI__SPaCe()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_58_0__MET08DDUPSP1TBI__Processed()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_58_0__MET08DDUPSP1TBI__Archive()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_58_0__MET08DDUPSP1TBI__Dummy()
{
string check = "637400748000000000.zip";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_58_0__MET08DDUPSP1TBI__TIBCO()
{
string check = "*.idc";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
}
#endif

View File

@ -0,0 +1,70 @@
#if v2_58_0
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_58_0;
[TestClass]
public class SP101_EQPT : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static SP101_EQPT EAFLoggingUnitTesting { get; private set; }
static SP101_EQPT() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public SP101_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public SP101_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new SP101_EQPT(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
}
[ClassCleanup()]
public static void ClassCleanup()
{
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting?.Dispose();
}
private static void NonThrowTryCatch()
{
try
{ throw new Exception(); }
catch (Exception) { }
}
[Ignore]
[TestMethod]
public void Production__v2_58_0__SP101_EQPT__MoveAllFiles()
{
string check = "*";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
NonThrowTryCatch();
}
}
#endif

View File

@ -0,0 +1,65 @@
#if v2_58_0
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_58_0;
[TestClass]
public class SP101 : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static SP101 EAFLoggingUnitTesting { get; private set; }
static SP101() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public SP101() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public SP101(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new SP101(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
}
[ClassCleanup()]
public static void ClassCleanup()
{
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting?.Dispose();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_58_0__SP101__txt()
{
string check = "*.txt";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
}
#endif

View File

@ -0,0 +1,195 @@
#if true
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_59_0;
[TestClass]
public class MET08DDUPSP1TBI : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static MET08DDUPSP1TBI EAFLoggingUnitTesting { get; private set; }
static MET08DDUPSP1TBI() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public MET08DDUPSP1TBI() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public MET08DDUPSP1TBI(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new MET08DDUPSP1TBI(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
}
[ClassCleanup()]
public static void ClassCleanup()
{
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting?.Dispose();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08DDUPSP1TBI__MoveMatchingFiles()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewer()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08DDUPSP1TBI__IQSSi()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08DDUPSP1TBI__OpenInsight()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewerAttachments()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08DDUPSP1TBI__APC()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08DDUPSP1TBI__SPaCe()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08DDUPSP1TBI__Processed()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08DDUPSP1TBI__Archive()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08DDUPSP1TBI__Dummy()
{
string check = "637400748000000000.zip";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08DDUPSP1TBI__TIBCO()
{
string check = "*.idc";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
}
#endif

View File

@ -0,0 +1,70 @@
#if true
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_59_0;
[TestClass]
public class SP101_EQPT : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static SP101_EQPT EAFLoggingUnitTesting { get; private set; }
static SP101_EQPT() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public SP101_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public SP101_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new SP101_EQPT(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
}
[ClassCleanup()]
public static void ClassCleanup()
{
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting?.Dispose();
}
private static void NonThrowTryCatch()
{
try
{ throw new Exception(); }
catch (Exception) { }
}
[Ignore]
[TestMethod]
public void Production__v2_59_0__SP101_EQPT__MoveAllFiles()
{
string check = "*";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
NonThrowTryCatch();
}
}
#endif

View File

@ -0,0 +1,65 @@
#if true
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_59_0;
[TestClass]
public class SP101 : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static SP101 EAFLoggingUnitTesting { get; private set; }
static SP101() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public SP101() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public SP101(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new SP101(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
}
[ClassCleanup()]
public static void ClassCleanup()
{
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting?.Dispose();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__SP101__txt()
{
string check = "*.txt";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
}
#endif

View File

@ -1,4 +1,4 @@
#if true
#if v2_56_0
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
@ -48,9 +48,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting
EAFLoggingUnitTesting?.Dispose();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__MET08DDUPSP1TBI__MoveMatchingFiles()
{
@ -61,9 +59,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewer()
{
@ -74,9 +70,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__MET08DDUPSP1TBI__IQSSi()
{
@ -87,9 +81,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__MET08DDUPSP1TBI__OpenInsight()
{
@ -100,9 +92,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewerAttachments()
{
@ -113,9 +103,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__MET08DDUPSP1TBI__APC()
{
@ -126,9 +114,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__MET08DDUPSP1TBI__SPaCe()
{
@ -139,9 +125,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__MET08DDUPSP1TBI__Processed()
{
@ -152,9 +136,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__MET08DDUPSP1TBI__Archive()
{
@ -165,9 +147,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__MET08DDUPSP1TBI__Dummy()
{
@ -178,9 +158,7 @@ public class MET08DDUPSP1TBI : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__MET08DDUPSP1TBI__TIBCO()
{

View File

@ -1,4 +1,4 @@
#if true
#if v2_56_0
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;

View File

@ -1,4 +1,4 @@
#if true
#if v2_56_0
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
@ -48,9 +48,7 @@ public class SP101 : EAFLoggingUnitTesting
EAFLoggingUnitTesting?.Dispose();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__SP101__txt()
{

View File

@ -0,0 +1,148 @@
#if v2_57_0
using Adaptation.Shared;
using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.Reflection;
namespace Adaptation._Tests.Extract.Production.v2_57_0;
[TestClass]
public class MET08DDUPSP1TBI
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Production.v2_57_0.MET08DDUPSP1TBI _MET08DDUPSP1TBI;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Production.v2_57_0.MET08DDUPSP1TBI.ClassInitialize(testContext);
_MET08DDUPSP1TBI = CreateSelfDescription.Production.v2_57_0.MET08DDUPSP1TBI.EAFLoggingUnitTesting;
}
private static void NonThrowTryCatch()
{
try
{ throw new Exception(); }
catch (Exception) { }
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__MET08DDUPSP1TBI__MoveMatchingFiles() => _MET08DDUPSP1TBI.Production__v2_57_0__MET08DDUPSP1TBI__MoveMatchingFiles();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__MET08DDUPSP1TBI__MoveMatchingFiles637955319879801344__Normal()
{
string check = "*.pdsf";
bool validatePDSF = false;
MethodBase methodBase = new StackFrame().GetMethod();
_MET08DDUPSP1TBI.Production__v2_57_0__MET08DDUPSP1TBI__MoveMatchingFiles();
string[] variables = _MET08DDUPSP1TBI.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _MET08DDUPSP1TBI.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
NonThrowTryCatch();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewer() => _MET08DDUPSP1TBI.Production__v2_57_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewer();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__MET08DDUPSP1TBI__IQSSi() => _MET08DDUPSP1TBI.Production__v2_57_0__MET08DDUPSP1TBI__IQSSi();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__MET08DDUPSP1TBI__OpenInsight() => _MET08DDUPSP1TBI.Production__v2_57_0__MET08DDUPSP1TBI__OpenInsight();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__MET08DDUPSP1TBI__OpenInsight638052814829645888__IqsSql()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
_MET08DDUPSP1TBI.Production__v2_57_0__MET08DDUPSP1TBI__OpenInsight();
string[] variables = _MET08DDUPSP1TBI.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
IFileRead fileRead = _MET08DDUPSP1TBI.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
NonThrowTryCatch();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewerAttachments() => _MET08DDUPSP1TBI.Production__v2_57_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewerAttachments();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__MET08DDUPSP1TBI__APC() => _MET08DDUPSP1TBI.Production__v2_57_0__MET08DDUPSP1TBI__APC();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__MET08DDUPSP1TBI__SPaCe() => _MET08DDUPSP1TBI.Production__v2_57_0__MET08DDUPSP1TBI__SPaCe();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__MET08DDUPSP1TBI__Processed() => _MET08DDUPSP1TBI.Production__v2_57_0__MET08DDUPSP1TBI__Processed();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__MET08DDUPSP1TBI__Archive() => _MET08DDUPSP1TBI.Production__v2_57_0__MET08DDUPSP1TBI__Archive();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__MET08DDUPSP1TBI__Dummy() => _MET08DDUPSP1TBI.Production__v2_57_0__MET08DDUPSP1TBI__Dummy();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__MET08DDUPSP1TBI__TIBCO() => _MET08DDUPSP1TBI.Production__v2_57_0__MET08DDUPSP1TBI__TIBCO();
[Ignore]
[TestMethod]
public void Production__v2_57_0__MET08DDUPSP1TBI__TIBCO638217888620242702__Normal()
{
string check = "*.idc";
MethodBase methodBase = new StackFrame().GetMethod();
_MET08DDUPSP1TBI.Production__v2_57_0__MET08DDUPSP1TBI__TIBCO();
string[] variables = _MET08DDUPSP1TBI.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
_ = _MET08DDUPSP1TBI.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
for (int i = 0; i < int.MaxValue; i++)
System.Threading.Thread.Sleep(500);
NonThrowTryCatch();
}
}
#endif

View File

@ -0,0 +1,27 @@
#if v2_57_0
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Adaptation._Tests.Extract.Production.v2_57_0;
[TestClass]
public class SP101_EQPT
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Production.v2_57_0.SP101_EQPT _SP101_EQPT;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Production.v2_57_0.SP101_EQPT.ClassInitialize(testContext);
_SP101_EQPT = CreateSelfDescription.Production.v2_57_0.SP101_EQPT.EAFLoggingUnitTesting;
}
[Ignore]
[TestMethod]
public void Production__v2_57_0__SP101_EQPT__MoveAllFiles() => _SP101_EQPT.Production__v2_57_0__SP101_EQPT__MoveAllFiles();
}
#endif

View File

@ -0,0 +1,58 @@
#if v2_57_0
using Adaptation.Shared;
using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.Reflection;
namespace Adaptation._Tests.Extract.Production.v2_57_0;
[TestClass]
public class SP101
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Production.v2_57_0.SP101 _SP101;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Production.v2_57_0.SP101.ClassInitialize(testContext);
_SP101 = CreateSelfDescription.Production.v2_57_0.SP101.EAFLoggingUnitTesting;
}
private static void NonThrowTryCatch()
{
try
{ throw new Exception(); }
catch (Exception) { }
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__SP101__txt() => _SP101.Production__v2_57_0__SP101__txt();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__SP101__txt637955319879801344__Normal()
{
string check = "*.txt";
bool validatePDSF = false;
_SP101.Production__v2_57_0__SP101__txt();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _SP101.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _SP101.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
NonThrowTryCatch();
}
}
#endif

View File

@ -0,0 +1,148 @@
#if v2_58_0
using Adaptation.Shared;
using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.Reflection;
namespace Adaptation._Tests.Extract.Production.v2_58_0;
[TestClass]
public class MET08DDUPSP1TBI
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Production.v2_58_0.MET08DDUPSP1TBI _MET08DDUPSP1TBI;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Production.v2_58_0.MET08DDUPSP1TBI.ClassInitialize(testContext);
_MET08DDUPSP1TBI = CreateSelfDescription.Production.v2_58_0.MET08DDUPSP1TBI.EAFLoggingUnitTesting;
}
private static void NonThrowTryCatch()
{
try
{ throw new Exception(); }
catch (Exception) { }
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_58_0__MET08DDUPSP1TBI__MoveMatchingFiles() => _MET08DDUPSP1TBI.Production__v2_58_0__MET08DDUPSP1TBI__MoveMatchingFiles();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_58_0__MET08DDUPSP1TBI__MoveMatchingFiles637955319879801344__Normal()
{
string check = "*.pdsf";
bool validatePDSF = false;
MethodBase methodBase = new StackFrame().GetMethod();
_MET08DDUPSP1TBI.Production__v2_58_0__MET08DDUPSP1TBI__MoveMatchingFiles();
string[] variables = _MET08DDUPSP1TBI.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _MET08DDUPSP1TBI.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
NonThrowTryCatch();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_58_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewer() => _MET08DDUPSP1TBI.Production__v2_58_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewer();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_58_0__MET08DDUPSP1TBI__IQSSi() => _MET08DDUPSP1TBI.Production__v2_58_0__MET08DDUPSP1TBI__IQSSi();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_58_0__MET08DDUPSP1TBI__OpenInsight() => _MET08DDUPSP1TBI.Production__v2_58_0__MET08DDUPSP1TBI__OpenInsight();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_58_0__MET08DDUPSP1TBI__OpenInsight638052814829645888__IqsSql()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
_MET08DDUPSP1TBI.Production__v2_58_0__MET08DDUPSP1TBI__OpenInsight();
string[] variables = _MET08DDUPSP1TBI.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
IFileRead fileRead = _MET08DDUPSP1TBI.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
NonThrowTryCatch();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_58_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewerAttachments() => _MET08DDUPSP1TBI.Production__v2_58_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewerAttachments();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_58_0__MET08DDUPSP1TBI__APC() => _MET08DDUPSP1TBI.Production__v2_58_0__MET08DDUPSP1TBI__APC();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_58_0__MET08DDUPSP1TBI__SPaCe() => _MET08DDUPSP1TBI.Production__v2_58_0__MET08DDUPSP1TBI__SPaCe();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_58_0__MET08DDUPSP1TBI__Processed() => _MET08DDUPSP1TBI.Production__v2_58_0__MET08DDUPSP1TBI__Processed();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_58_0__MET08DDUPSP1TBI__Archive() => _MET08DDUPSP1TBI.Production__v2_58_0__MET08DDUPSP1TBI__Archive();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_58_0__MET08DDUPSP1TBI__Dummy() => _MET08DDUPSP1TBI.Production__v2_58_0__MET08DDUPSP1TBI__Dummy();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_58_0__MET08DDUPSP1TBI__TIBCO() => _MET08DDUPSP1TBI.Production__v2_58_0__MET08DDUPSP1TBI__TIBCO();
[Ignore]
[TestMethod]
public void Production__v2_58_0__MET08DDUPSP1TBI__TIBCO638217888620242702__Normal()
{
string check = "*.idc";
MethodBase methodBase = new StackFrame().GetMethod();
_MET08DDUPSP1TBI.Production__v2_58_0__MET08DDUPSP1TBI__TIBCO();
string[] variables = _MET08DDUPSP1TBI.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
_ = _MET08DDUPSP1TBI.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
for (int i = 0; i < int.MaxValue; i++)
System.Threading.Thread.Sleep(500);
NonThrowTryCatch();
}
}
#endif

View File

@ -0,0 +1,27 @@
#if v2_58_0
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Adaptation._Tests.Extract.Production.v2_58_0;
[TestClass]
public class SP101_EQPT
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Production.v2_58_0.SP101_EQPT _SP101_EQPT;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Production.v2_58_0.SP101_EQPT.ClassInitialize(testContext);
_SP101_EQPT = CreateSelfDescription.Production.v2_58_0.SP101_EQPT.EAFLoggingUnitTesting;
}
[Ignore]
[TestMethod]
public void Production__v2_58_0__SP101_EQPT__MoveAllFiles() => _SP101_EQPT.Production__v2_58_0__SP101_EQPT__MoveAllFiles();
}
#endif

View File

@ -0,0 +1,58 @@
#if v2_58_0
using Adaptation.Shared;
using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.Reflection;
namespace Adaptation._Tests.Extract.Production.v2_58_0;
[TestClass]
public class SP101
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Production.v2_58_0.SP101 _SP101;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Production.v2_58_0.SP101.ClassInitialize(testContext);
_SP101 = CreateSelfDescription.Production.v2_58_0.SP101.EAFLoggingUnitTesting;
}
private static void NonThrowTryCatch()
{
try
{ throw new Exception(); }
catch (Exception) { }
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_58_0__SP101__txt() => _SP101.Production__v2_58_0__SP101__txt();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_58_0__SP101__txt637955319879801344__Normal()
{
string check = "*.txt";
bool validatePDSF = false;
_SP101.Production__v2_58_0__SP101__txt();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _SP101.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _SP101.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
NonThrowTryCatch();
}
}
#endif

View File

@ -0,0 +1,148 @@
#if true
using Adaptation.Shared;
using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.Reflection;
namespace Adaptation._Tests.Extract.Production.v2_59_0;
[TestClass]
public class MET08DDUPSP1TBI
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Production.v2_59_0.MET08DDUPSP1TBI _MET08DDUPSP1TBI;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Production.v2_59_0.MET08DDUPSP1TBI.ClassInitialize(testContext);
_MET08DDUPSP1TBI = CreateSelfDescription.Production.v2_59_0.MET08DDUPSP1TBI.EAFLoggingUnitTesting;
}
private static void NonThrowTryCatch()
{
try
{ throw new Exception(); }
catch (Exception) { }
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08DDUPSP1TBI__MoveMatchingFiles() => _MET08DDUPSP1TBI.Production__v2_59_0__MET08DDUPSP1TBI__MoveMatchingFiles();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08DDUPSP1TBI__MoveMatchingFiles637955319879801344__Normal()
{
string check = "*.pdsf";
bool validatePDSF = false;
MethodBase methodBase = new StackFrame().GetMethod();
_MET08DDUPSP1TBI.Production__v2_59_0__MET08DDUPSP1TBI__MoveMatchingFiles();
string[] variables = _MET08DDUPSP1TBI.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _MET08DDUPSP1TBI.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
NonThrowTryCatch();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewer() => _MET08DDUPSP1TBI.Production__v2_59_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewer();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08DDUPSP1TBI__IQSSi() => _MET08DDUPSP1TBI.Production__v2_59_0__MET08DDUPSP1TBI__IQSSi();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08DDUPSP1TBI__OpenInsight() => _MET08DDUPSP1TBI.Production__v2_59_0__MET08DDUPSP1TBI__OpenInsight();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08DDUPSP1TBI__OpenInsight638052814829645888__IqsSql()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
_MET08DDUPSP1TBI.Production__v2_59_0__MET08DDUPSP1TBI__OpenInsight();
string[] variables = _MET08DDUPSP1TBI.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
IFileRead fileRead = _MET08DDUPSP1TBI.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
NonThrowTryCatch();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewerAttachments() => _MET08DDUPSP1TBI.Production__v2_59_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewerAttachments();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08DDUPSP1TBI__APC() => _MET08DDUPSP1TBI.Production__v2_59_0__MET08DDUPSP1TBI__APC();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08DDUPSP1TBI__SPaCe() => _MET08DDUPSP1TBI.Production__v2_59_0__MET08DDUPSP1TBI__SPaCe();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08DDUPSP1TBI__Processed() => _MET08DDUPSP1TBI.Production__v2_59_0__MET08DDUPSP1TBI__Processed();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08DDUPSP1TBI__Archive() => _MET08DDUPSP1TBI.Production__v2_59_0__MET08DDUPSP1TBI__Archive();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08DDUPSP1TBI__Dummy() => _MET08DDUPSP1TBI.Production__v2_59_0__MET08DDUPSP1TBI__Dummy();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08DDUPSP1TBI__TIBCO() => _MET08DDUPSP1TBI.Production__v2_59_0__MET08DDUPSP1TBI__TIBCO();
[Ignore]
[TestMethod]
public void Production__v2_59_0__MET08DDUPSP1TBI__TIBCO638217888620242702__Normal()
{
string check = "*.idc";
MethodBase methodBase = new StackFrame().GetMethod();
_MET08DDUPSP1TBI.Production__v2_59_0__MET08DDUPSP1TBI__TIBCO();
string[] variables = _MET08DDUPSP1TBI.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
_ = _MET08DDUPSP1TBI.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
for (int i = 0; i < int.MaxValue; i++)
System.Threading.Thread.Sleep(500);
NonThrowTryCatch();
}
}
#endif

View File

@ -0,0 +1,27 @@
#if true
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Adaptation._Tests.Extract.Production.v2_59_0;
[TestClass]
public class SP101_EQPT
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Production.v2_59_0.SP101_EQPT _SP101_EQPT;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Production.v2_59_0.SP101_EQPT.ClassInitialize(testContext);
_SP101_EQPT = CreateSelfDescription.Production.v2_59_0.SP101_EQPT.EAFLoggingUnitTesting;
}
[Ignore]
[TestMethod]
public void Production__v2_59_0__SP101_EQPT__MoveAllFiles() => _SP101_EQPT.Production__v2_59_0__SP101_EQPT__MoveAllFiles();
}
#endif

View File

@ -0,0 +1,58 @@
#if true
using Adaptation.Shared;
using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.Reflection;
namespace Adaptation._Tests.Extract.Production.v2_59_0;
[TestClass]
public class SP101
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Production.v2_59_0.SP101 _SP101;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Production.v2_59_0.SP101.ClassInitialize(testContext);
_SP101 = CreateSelfDescription.Production.v2_59_0.SP101.EAFLoggingUnitTesting;
}
private static void NonThrowTryCatch()
{
try
{ throw new Exception(); }
catch (Exception) { }
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__SP101__txt() => _SP101.Production__v2_59_0__SP101__txt();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__SP101__txt637955319879801344__Normal()
{
string check = "*.txt";
bool validatePDSF = false;
_SP101.Production__v2_59_0__SP101__txt();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _SP101.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _SP101.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
NonThrowTryCatch();
}
}
#endif

View File

@ -1,4 +1,4 @@
#if true
#if v2_56_0
using Adaptation.Shared;
using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting;
@ -31,15 +31,11 @@ public class MET08DDUPSP1TBI
catch (Exception) { }
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__MET08DDUPSP1TBI__MoveMatchingFiles() => _MET08DDUPSP1TBI.Staging__v2_56_0__MET08DDUPSP1TBI__MoveMatchingFiles();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__MET08DDUPSP1TBI__MoveMatchingFiles637955319879801344__Normal()
{
@ -54,27 +50,19 @@ public class MET08DDUPSP1TBI
NonThrowTryCatch();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewer() => _MET08DDUPSP1TBI.Staging__v2_56_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewer();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__MET08DDUPSP1TBI__IQSSi() => _MET08DDUPSP1TBI.Staging__v2_56_0__MET08DDUPSP1TBI__IQSSi();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__MET08DDUPSP1TBI__OpenInsight() => _MET08DDUPSP1TBI.Staging__v2_56_0__MET08DDUPSP1TBI__OpenInsight();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__MET08DDUPSP1TBI__OpenInsight638052814829645888__IqsSql()
{
@ -88,45 +76,31 @@ public class MET08DDUPSP1TBI
NonThrowTryCatch();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewerAttachments() => _MET08DDUPSP1TBI.Staging__v2_56_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewerAttachments();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__MET08DDUPSP1TBI__APC() => _MET08DDUPSP1TBI.Staging__v2_56_0__MET08DDUPSP1TBI__APC();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__MET08DDUPSP1TBI__SPaCe() => _MET08DDUPSP1TBI.Staging__v2_56_0__MET08DDUPSP1TBI__SPaCe();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__MET08DDUPSP1TBI__Processed() => _MET08DDUPSP1TBI.Staging__v2_56_0__MET08DDUPSP1TBI__Processed();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__MET08DDUPSP1TBI__Archive() => _MET08DDUPSP1TBI.Staging__v2_56_0__MET08DDUPSP1TBI__Archive();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__MET08DDUPSP1TBI__Dummy() => _MET08DDUPSP1TBI.Staging__v2_56_0__MET08DDUPSP1TBI__Dummy();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__MET08DDUPSP1TBI__TIBCO() => _MET08DDUPSP1TBI.Staging__v2_56_0__MET08DDUPSP1TBI__TIBCO();

View File

@ -1,4 +1,4 @@
#if true
#if v2_56_0
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Adaptation._Tests.Extract.Staging.v2_56_0;

View File

@ -1,4 +1,4 @@
#if true
#if v2_56_0
using Adaptation.Shared;
using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting;
@ -31,15 +31,11 @@ public class SP101
catch (Exception) { }
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__SP101__txt() => _SP101.Staging__v2_56_0__SP101__txt();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_56_0__SP101__txt637955319879801344__Normal()
{

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,7 @@ using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.Net.Http;
using System.Reflection;
namespace Adaptation._Tests.Static;
@ -43,46 +44,81 @@ public class Job : LoggingUnitTesting, IDisposable
catch (Exception) { }
}
#if !Always
[Ignore]
#endif
[TestMethod]
public void TestJobA()
{
string mid;
FileHandlers.TIBCO.Transport.Job job;
MethodBase methodBase = new StackFrame().GetMethod();
string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare;
string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare;
string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString;
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"12-123456-1234\", \"Recipe\": \"Recipe\"}");
Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "21");
Assert.IsTrue(job.LotName == "123456");
Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "4609");
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"-544481-\", \"Recipe\": \"Recipe\"}");
Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "51");
Assert.IsTrue(job.LotName == "544481");
Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "5158");
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"00-544481-0000\", \"Recipe\": \"Recipe\"}");
Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "51");
Assert.IsTrue(job.LotName == "544481");
Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "5158");
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08THFTIRQS408M\", \"MesEntity\": \"BIORAD2\", \"Sequence\": \"123456789\", \"MID\": \"37--\", \"Recipe\": \"Recipe\"}");
Assert.IsTrue(job.ProcessType == "37");
Assert.IsTrue(!string.IsNullOrEmpty(job.LotName)); // == "549918");
Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "5101");
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"00-o171308.1.51-0000\", \"Recipe\": \"Recipe\", \"Slot\": \"11\"}");
Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "54");
Assert.IsTrue(!string.IsNullOrEmpty(job.LotName)); // == "547000");
Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "4445");
HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) };
mid = "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"12-123456-1234\", \"Recipe\": \"Recipe\"}";
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid);
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); // == "21");
Assert.AreEqual("123456", job.LotName);
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "4609");
mid = "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"12-1234567-1234\", \"Recipe\": \"Recipe\"}";
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid);
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); // == "21");
Assert.AreEqual("1234567", job.LotName);
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "4609");
mid = "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"-544481-\", \"Recipe\": \"Recipe\"}";
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid);
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); // == "51");
Assert.AreEqual("544481", job.LotName);
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "5158");
mid = "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"00-544481-0000\", \"Recipe\": \"Recipe\"}";
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid);
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); // == "51");
Assert.AreEqual("544481", job.LotName);
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "5158");
mid = "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"00-o171308.1.51-0000\", \"Recipe\": \"Recipe\", \"Slot\": \"11\"}";
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid);
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); // == "54");
Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); // == "547000");
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "4445");
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE5\", \"Sequence\": \"638163023363575829\", \"MID\": \"B48\", \"Recipe\": \"lsl_6in \"}");
Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "54");
Assert.IsTrue(!string.IsNullOrEmpty(job.LotName)); // == "547000");
Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "4445");
mid = "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE5\", \"Sequence\": \"638163023363575829\", \"MID\": \"B48\", \"Recipe\": \"lsl_6in \"}";
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid);
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); // == "54");
Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); // == "547000");
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "4445");
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
NonThrowTryCatch();
}
#if !Always
[Ignore]
#endif
[TestMethod]
public void TestJobAA()
{
string mid;
FileHandlers.TIBCO.Transport.Job job;
MethodBase methodBase = new StackFrame().GetMethod();
string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare;
string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare;
string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString;
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) };
mid = "{\"Area\": \"Si\", \"EquipmentType\": \"MET08THFTIRQS408M\", \"MesEntity\": \"BIORAD2\", \"Sequence\": \"123456789\", \"MID\": \"37--\", \"Recipe\": \"Recipe\"}";
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid);
Assert.AreEqual("37", job.ProcessType);
Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); // == "549918");
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "5101");
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
NonThrowTryCatch();
}
#if !Always
[Ignore]
#endif
[TestMethod]
public void TestJobB()
{
@ -92,15 +128,19 @@ public class Job : LoggingUnitTesting, IDisposable
string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare;
string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString;
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"P1234\", \"Recipe\": \"Recipe\"}");
Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType));
Assert.IsTrue(!string.IsNullOrEmpty(job.LotName));
Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName));
HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) };
string mid = "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"P1234\", \"Recipe\": \"Recipe\"}";
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid);
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType));
Assert.IsFalse(string.IsNullOrEmpty(job.LotName));
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName));
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
NonThrowTryCatch();
}
#if !Always
[Ignore]
#endif
[TestMethod]
public void TestJobC()
{
@ -110,10 +150,136 @@ public class Job : LoggingUnitTesting, IDisposable
string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare;
string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString;
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"BIORAD3\", \"Sequence\": \"638234699589174855\", \"MID\": \"33--\", \"Recipe\": \"Recipe\"}");
Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType));
Assert.IsTrue(!string.IsNullOrEmpty(job.LotName));
Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName));
HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) };
string mid = "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"BIORAD3\", \"Sequence\": \"638234699589174855\", \"MID\": \"33--\", \"Recipe\": \"Recipe\"}";
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid);
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType));
Assert.IsFalse(string.IsNullOrEmpty(job.LotName));
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName));
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
NonThrowTryCatch();
}
#if !Always
[Ignore]
#endif
[TestMethod]
public void TestJobD()
{
FileHandlers.TIBCO.Transport.Job job;
MethodBase methodBase = new StackFrame().GetMethod();
string metrologyFileShare =
FileHandlers.TIBCO.FileRead.MetrologyFileShare;
string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare;
string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString;
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) };
string mid = "{\"Area\": \"Si\", \"EquipmentType\": \"DEP08CEPIEPSILON\", \"MesEntity\": \"R32\", \"Sequence\": \"\", \"MID\": \"32--\", \"Recipe\": \"Recipe\"}";
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid);
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType));
Assert.IsFalse(string.IsNullOrEmpty(job.LotName));
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName));
Assert.IsFalse(string.IsNullOrEmpty(job.Equipment));
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
NonThrowTryCatch();
}
#if !Always
[Ignore]
#endif
[TestMethod]
public void TestJobE()
{
FileHandlers.TIBCO.Transport.Job job;
MethodBase methodBase = new StackFrame().GetMethod();
string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare;
string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare;
string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString;
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) };
string mid = """
{"Area": "Si", "EquipmentType": "MET08RESIMAPCDE", "MesEntity": "CDE5", "Sequence": "638756365880000000", "MID": "38-660275-5095.1", "Recipe": "IRC6mm"}
""";
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid);
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType));
Assert.IsFalse(string.IsNullOrEmpty(job.LotName));
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName));
Assert.IsFalse(string.IsNullOrEmpty(job.Equipment));
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
NonThrowTryCatch();
}
#if !Always
[Ignore]
#endif
[TestMethod]
public void TestJobF()
{
FileHandlers.TIBCO.Transport.Job job;
MethodBase methodBase = new StackFrame().GetMethod();
string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare;
string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare;
string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString;
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) };
string mid = """
{"Area": "Si", "EquipmentType": "MET08THFTIRQS408M", "MesEntity": "BIORAD2", "Sequence": "638757112479659597", "MID": "173308.1.5", "Recipe": "6inTHICK"}
""";
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid);
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType));
Assert.IsFalse(string.IsNullOrEmpty(job.LotName));
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName));
Assert.IsFalse(string.IsNullOrEmpty(job.Equipment));
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
NonThrowTryCatch();
}
#if !Always
[Ignore]
#endif
[TestMethod]
public void TestJobG()
{
FileHandlers.TIBCO.Transport.Job job;
MethodBase methodBase = new StackFrame().GetMethod();
string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare;
string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare;
string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString;
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) };
string mid = """
{"Area": "Si", "EquipmentType": "MET08DDUPSFS6420", "MesEntity": "TENCOR1", "Sequence": "638765945581765554", "MID": "1T661282", "Recipe": "8IN_THIN ROTR"}
""";
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid);
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType));
Assert.IsFalse(string.IsNullOrEmpty(job.LotName));
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName));
Assert.IsFalse(string.IsNullOrEmpty(job.Equipment));
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
NonThrowTryCatch();
}
#if !Always
[Ignore]
#endif
[TestMethod]
public void TestJobH()
{
FileHandlers.TIBCO.Transport.Job job;
MethodBase methodBase = new StackFrame().GetMethod();
string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare;
string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare;
string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString;
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) };
string mid = """
{"Area": "Si", "EquipmentType": "MET08DDUPSFS6420", "MesEntity": "TENCOR1", "Sequence": "638765945581765554", "MID": "AK1PL2", "Recipe": "8INCLEAN"}
""";
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid);
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType));
Assert.IsFalse(string.IsNullOrEmpty(job.LotName));
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName));
Assert.IsFalse(string.IsNullOrEmpty(job.Equipment));
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
NonThrowTryCatch();
}

View File

@ -51,27 +51,27 @@ public class MET08DDUPSP1TBI : LoggingUnitTesting, IDisposable
public void TestDateTime()
{
DateTime dateTime = DateTime.Now;
Assert.IsTrue(dateTime.ToString("M/d/yyyy h:mm:ss tt") == dateTime.ToString());
Assert.AreEqual(dateTime.ToString(), dateTime.ToString("M/d/yyyy h:mm:ss tt"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging()
public void Production()
{
MethodBase methodBase = new StackFrame().GetMethod();
StringBuilder results = new();
(string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[]
{
new("MET08DDUPSP1TBI", "v2.56.0"),
new("MET08DDUPSP1TBI", "v2.59.0"),
};
string staging = "http://mestsa07ec.infineon.com:9003/CellInstanceServiceV2";
string production = "http://messa08ec.infineon.com:9003/CellInstanceServiceV2";
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
foreach ((string cellInstanceName, string cellInstanceVersionName) in collection)
{
cellInstanceVersion = AdaptationTesting.GetCellInstanceVersion($"{staging}/{cellInstanceName}/{cellInstanceVersionName}/configuration");
cellInstanceVersion = AdaptationTesting.GetCellInstanceVersion($"{production}/{cellInstanceName}/{cellInstanceVersionName}/configuration");
_ = results.AppendLine($"{cellInstanceName}\t{cellInstanceVersionName}\t{cellInstanceVersion.EdaConnection.PortNumber}");
}
string sourceDirectory = "D:/Tmp/cellInstanceVersion.EdaConnection.PortNumber";

View File

@ -1,4 +1,5 @@
using Adaptation._Tests.Shared;
using Adaptation.FileHandlers.txt;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
@ -51,145 +52,137 @@ public class TXT : LoggingUnitTesting, IDisposable
public void TestDateTime()
{
DateTime dateTime = DateTime.Now;
Assert.IsTrue(dateTime.ToString("M/d/yyyy h:mm:ss tt") == dateTime.ToString());
Assert.AreEqual(dateTime.ToString(), dateTime.ToString("M/d/yyyy h:mm:ss tt"));
}
[TestMethod]
public void TestDescriptor()
{
FileHandlers.txt.Descriptor descriptor;
Descriptor descriptor;
MethodBase methodBase = new StackFrame().GetMethod();
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
descriptor = FileHandlers.txt.ProcessData.GetDescriptor(string.Empty);
descriptor = ProcessData.GetDescriptor(string.Empty);
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("12-123456-1234");
Assert.IsTrue(descriptor.Reactor is "12");
Assert.IsTrue(descriptor.RDS is "123456");
Assert.IsTrue(descriptor.PSN is "1234");
descriptor = ProcessData.GetDescriptor("12-123456-1234");
Assert.AreEqual("12", descriptor.Reactor);
Assert.AreEqual("123456", descriptor.RDS);
Assert.AreEqual("1234", descriptor.PSN);
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("123456");
descriptor = ProcessData.GetDescriptor("123456");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
Assert.IsTrue(descriptor.RDS is "123456");
Assert.AreEqual("123456", descriptor.RDS);
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("1T123456");
descriptor = ProcessData.GetDescriptor("1T123456");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
Assert.IsTrue(descriptor.RDS is "123456");
Assert.AreEqual("123456", descriptor.RDS);
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("MP");
descriptor = ProcessData.GetDescriptor("MP");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
Assert.IsTrue(descriptor.Employee is "MP");
Assert.AreEqual("MP", descriptor.Employee);
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("12-123456-1234.2-1");
Assert.IsTrue(descriptor.Reactor is "12");
Assert.IsTrue(descriptor.RDS is "123456");
Assert.IsTrue(descriptor.PSN is "1234");
Assert.IsTrue(descriptor.Layer is "2");
Assert.IsTrue(descriptor.Zone is "1");
descriptor = ProcessData.GetDescriptor("12-123456-1234.2-1");
Assert.AreEqual("12", descriptor.Reactor);
Assert.AreEqual("123456", descriptor.RDS);
Assert.AreEqual("1234", descriptor.PSN);
Assert.AreEqual("2", descriptor.Layer);
Assert.AreEqual("1", descriptor.Zone);
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("12-123456-1234.02-1");
Assert.IsTrue(descriptor.Reactor is "12");
Assert.IsTrue(descriptor.RDS is "123456");
Assert.IsTrue(descriptor.PSN is "1234");
Assert.IsTrue(descriptor.Layer is "2");
Assert.IsTrue(descriptor.Zone is "1");
descriptor = ProcessData.GetDescriptor("12-123456-1234.02-1");
Assert.AreEqual("12", descriptor.Reactor);
Assert.AreEqual("123456", descriptor.RDS);
Assert.AreEqual("1234", descriptor.PSN);
Assert.AreEqual("2", descriptor.Layer);
Assert.AreEqual("1", descriptor.Zone);
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("20");
Assert.IsTrue(descriptor.Reactor is "20");
descriptor = ProcessData.GetDescriptor("20");
Assert.AreEqual("20", descriptor.Reactor);
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("20.2");
Assert.IsTrue(descriptor.Reactor is "20");
descriptor = ProcessData.GetDescriptor("20.2");
Assert.AreEqual("20", descriptor.Reactor);
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
Assert.IsTrue(descriptor.Layer is "2");
Assert.AreEqual("2", descriptor.Layer);
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("20.2.1");
Assert.IsTrue(descriptor.Layer is "2");
descriptor = ProcessData.GetDescriptor("20.2.1");
Assert.AreEqual("2", descriptor.Layer);
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
Assert.IsTrue(descriptor.Reactor is "20");
Assert.IsTrue(descriptor.Zone is "1");
Assert.AreEqual("20", descriptor.Reactor);
Assert.AreEqual("1", descriptor.Zone);
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("20.1.1");
Assert.IsTrue(descriptor.Layer is "1");
descriptor = ProcessData.GetDescriptor("20.1.1");
Assert.AreEqual("1", descriptor.Layer);
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
Assert.IsTrue(descriptor.Reactor is "20");
Assert.IsTrue(descriptor.Zone is "1");
Assert.AreEqual("20", descriptor.Reactor);
Assert.AreEqual("1", descriptor.Zone);
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("P2-LOW-RR");
descriptor = ProcessData.GetDescriptor("P2-LOW-RR");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(descriptor.PSN is "RR");
Assert.AreEqual("RR", descriptor.PSN);
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
Assert.IsTrue(descriptor.Reactor is "P2");
Assert.AreEqual("P2", descriptor.Reactor);
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(descriptor.PSN is "RR");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
Assert.IsTrue(descriptor.Reactor is "P2");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("i171308.1.51");
descriptor = ProcessData.GetDescriptor("i171308.1.51");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
Assert.IsTrue(descriptor.RDS is "i171308.1.51");
Assert.AreEqual("i171308.1.51", descriptor.RDS);
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("o171308.1.51");
descriptor = ProcessData.GetDescriptor("o171308.1.51");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
Assert.IsTrue(descriptor.RDS is "o171308.1.51");
Assert.AreEqual("o171308.1.51", descriptor.RDS);
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("O171308.1.51");
descriptor = ProcessData.GetDescriptor("O171308.1.51");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
Assert.IsTrue(descriptor.RDS is "O171308.1.51");
Assert.AreEqual("O171308.1.51", descriptor.RDS);
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("171308.1.51");
descriptor = ProcessData.GetDescriptor("171308.1.51");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
Assert.IsTrue(descriptor.RDS is "171308.1.51");
Assert.AreEqual("171308.1.51", descriptor.RDS);
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("75-QP1414-SPLIT4");
Assert.IsTrue(!string.IsNullOrEmpty(descriptor.Lot));
descriptor = ProcessData.GetDescriptor("75-QP1414-SPLIT4");
Assert.IsFalse(string.IsNullOrEmpty(descriptor.Lot));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(descriptor.PSN is "SPLIT4");
Assert.AreEqual("SPLIT4", descriptor.PSN);
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
Assert.IsTrue(descriptor.Reactor is "75");
Assert.AreEqual("75", descriptor.Reactor);
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("B48");
Assert.IsTrue(descriptor.Lot == "B48");
descriptor = FileHandlers.txt.ProcessData.GetDescriptor("B48");
Assert.IsTrue(descriptor.Lot == "B48");
descriptor = ProcessData.GetDescriptor("B48");
Assert.AreEqual("B48", descriptor.Lot);
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
@ -204,21 +197,21 @@ public class TXT : LoggingUnitTesting, IDisposable
[Ignore]
#endif
[TestMethod]
public void Staging()
public void Production()
{
MethodBase methodBase = new StackFrame().GetMethod();
StringBuilder results = new();
(string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[]
{
new("SP101", "v2.56.0"),
new("SP101-EQPT", "v2.56.0"),
new("SP101", "v2.59.0"),
new("SP101-EQPT", "v2.59.0"),
};
string staging = "http://mestsa07ec.infineon.com:9003/CellInstanceServiceV2";
string production = "http://messa08ec.infineon.com:9003/CellInstanceServiceV2";
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
foreach ((string cellInstanceName, string cellInstanceVersionName) in collection)
{
cellInstanceVersion = AdaptationTesting.GetCellInstanceVersion($"{staging}/{cellInstanceName}/{cellInstanceVersionName}/configuration");
cellInstanceVersion = AdaptationTesting.GetCellInstanceVersion($"{production}/{cellInstanceName}/{cellInstanceVersionName}/configuration");
_ = results.AppendLine($"{cellInstanceName}\t{cellInstanceVersionName}\t{cellInstanceVersion.EdaConnection.PortNumber}");
}
string sourceDirectory = "D:/Tmp/cellInstanceVersion.EdaConnection.PortNumber";

View File

@ -37,7 +37,7 @@ public partial class FileRead : FileReaderHandler, ISMTP
private FilePathGenerator _FilePathGeneratorForTarget;
private readonly List<EquipmentParameter> _EquipmentParameters;
private static readonly Dictionary<string, List<long>> _DummyRuns;
private static readonly Dictionary<long, List<string>> _StaticRuns;
private static readonly Dictionary<long, List<Adaptation.Shared.Metrology.WS.Results>> _StaticRuns;
static FileRead()
{
@ -88,6 +88,8 @@ public partial class FileRead : FileReaderHandler, ISMTP
try
{
extractResults = _FileRead.GetExtractResult(reportFullPath, eventName);
if (extractResults.Item3.Length == 0 && !string.IsNullOrEmpty(extractResults.Item1) && !extractResults.Item1.Contains("LOGISTICS_1"))
throw new Exception(extractResults.Item1);
TriggerEvents(extractResults);
_FileRead.Move(extractResults);
FilePathGeneratorInfoMove(extractResults);

View File

@ -112,6 +112,7 @@
<Compile Include="Adaptation\FileHandlers\MoveMatchingFiles\FileRead.cs" />
<Compile Include="Adaptation\FileHandlers\OpenInsight\FileRead.cs" />
<Compile Include="Adaptation\FileHandlers\OpenInsight\FromIQS.cs" />
<Compile Include="Adaptation\FileHandlers\OpenInsight\Root.cs" />
<Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewer\FileRead.cs" />
<Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewer\WSRequest.cs" />
<Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewerAttachments\FileRead.cs" />
@ -125,14 +126,24 @@
<Compile Include="Adaptation\FileHandlers\TIBCO\Transport\Job.cs" />
<Compile Include="Adaptation\FileHandlers\TIBCO\Transport\Logistics.cs" />
<Compile Include="Adaptation\FileHandlers\TIBCO\Transport\Main.cs" />
<Compile Include="Adaptation\FileHandlers\TIBCO\Transport\Reactor.cs" />
<Compile Include="Adaptation\FileHandlers\TIBCO\Transport\ReactorRoot.cs" />
<Compile Include="Adaptation\FileHandlers\TIBCO\Transport\Run.cs" />
<Compile Include="Adaptation\FileHandlers\TIBCO\Transport\RunDataSheet.cs" />
<Compile Include="Adaptation\FileHandlers\TIBCO\Transport\RunDataSheetRoot.cs" />
<Compile Include="Adaptation\FileHandlers\TIBCO\Transport\WorkMaterialOut.cs" />
<Compile Include="Adaptation\FileHandlers\TIBCO\Transport\WorkOrder.cs" />
<Compile Include="Adaptation\FileHandlers\txt\Constant.cs" />
<Compile Include="Adaptation\FileHandlers\txt\Description.cs" />
<Compile Include="Adaptation\FileHandlers\txt\Descriptor.cs" />
<Compile Include="Adaptation\FileHandlers\txt\Detail.cs" />
<Compile Include="Adaptation\FileHandlers\txt\FileRead.cs" />
<Compile Include="Adaptation\FileHandlers\txt\Header.cs" />
<Compile Include="Adaptation\FileHandlers\txt\ProcessData.cs" />
<Compile Include="Adaptation\FileHandlers\txt\Row.cs" />
<Compile Include="Adaptation\FileHandlers\txt\Run.cs" />
<Compile Include="Adaptation\FileHandlers\txt\Summary.cs" />
<Compile Include="Adaptation\FileHandlers\txt\Wafer.cs" />
<Compile Include="Adaptation\FileHandlers\txt\WaferSummaryInfo.cs" />
<Compile Include="Adaptation\Ifx\Eaf\Common\Configuration\ConnectionSetting.cs" />
<Compile Include="Adaptation\Ifx\Eaf\EquipmentConnector\File\Component\File.cs" />
@ -166,6 +177,7 @@
<Compile Include="Adaptation\Shared\Metrology\WS.Results.cs" />
<Compile Include="Adaptation\Shared\ParameterType.cs" />
<Compile Include="Adaptation\Shared\ProcessDataStandardFormat.cs" />
<Compile Include="Adaptation\Shared\ProcessDataStandardFormatMapping.cs" />
<Compile Include="Adaptation\Shared\Properties\IDescription.cs" />
<Compile Include="Adaptation\Shared\Properties\IFileRead.cs" />
<Compile Include="Adaptation\Shared\Properties\ILogistics.cs" />
@ -184,13 +196,13 @@
<Version>7.2.4630.5</Version>
</PackageReference>
<PackageReference Include="Infineon.EAF.Runtime">
<Version>2.56.0</Version>
<Version>2.59.0</Version>
</PackageReference>
<PackageReference Include="Pdfbox">
<Version>1.1.1</Version>
</PackageReference>
<PackageReference Include="System.Text.Json">
<Version>6.0.3</Version>
<Version>8.0.3</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.52.0.0")]
[assembly: AssemblyFileVersion("2.52.0.0")]
[assembly: AssemblyVersion("2.59.0.0")]
[assembly: AssemblyFileVersion("2.59.0.0")]