Compare commits
5 Commits
a6743c4de5
...
10-22-a
| Author | SHA1 | Date | |
|---|---|---|---|
| 035b85c7bb | |||
| 61f1c7dc3b | |||
| 5f8c79e087 | |||
| 5a5c478419 | |||
| 318012cd1c |
@ -110,7 +110,7 @@ dotnet_diagnostic.CA2254.severity = none # CA2254: The logging message template
|
|||||||
dotnet_diagnostic.IDE0001.severity = warning # IDE0001: Simplify name
|
dotnet_diagnostic.IDE0001.severity = warning # IDE0001: Simplify name
|
||||||
dotnet_diagnostic.IDE0002.severity = warning # Simplify (member access) - System.Version.Equals("1", "2"); Version.Equals("1", "2");
|
dotnet_diagnostic.IDE0002.severity = warning # Simplify (member access) - System.Version.Equals("1", "2"); Version.Equals("1", "2");
|
||||||
dotnet_diagnostic.IDE0004.severity = warning # IDE0004: Cast is redundant.
|
dotnet_diagnostic.IDE0004.severity = warning # IDE0004: Cast is redundant.
|
||||||
dotnet_diagnostic.IDE0005.severity = warning # Using directive is unnecessary
|
dotnet_diagnostic.IDE0005.severity = none # Using directive is unnecessary
|
||||||
dotnet_diagnostic.IDE0028.severity = none # IDE0028: Collection initialization can be simplified
|
dotnet_diagnostic.IDE0028.severity = none # IDE0028: Collection initialization can be simplified
|
||||||
dotnet_diagnostic.IDE0031.severity = warning # Use null propagation (IDE0031)
|
dotnet_diagnostic.IDE0031.severity = warning # Use null propagation (IDE0031)
|
||||||
dotnet_diagnostic.IDE0047.severity = warning # IDE0047: Parentheses can be removed
|
dotnet_diagnostic.IDE0047.severity = warning # IDE0047: Parentheses can be removed
|
||||||
@ -122,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.IDE0300.severity = none # IDE0300: Collection initialization can be simplified
|
||||||
dotnet_diagnostic.IDE0301.severity = none #IDE0301: 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.IDE0305.severity = none # IDE0305: Collection initialization can be simplified
|
||||||
|
dotnet_diagnostic.MSTEST0015.severity = none # MSTEST0015: Test method {method} should not be ignored
|
||||||
dotnet_diagnostic.MSTEST0037.severity = error # MSTEST0037: Use proper 'Assert' methods
|
dotnet_diagnostic.MSTEST0037.severity = error # MSTEST0037: Use proper 'Assert' methods
|
||||||
dotnet_diagnostic.SYSLIB1045.severity = none # SYSLIB1045: diagnostics for regex source generation
|
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.severity = warning
|
||||||
|
|||||||
45
Adaptation/.vscode/launch.json
vendored
45
Adaptation/.vscode/launch.json
vendored
@ -1,16 +1,43 @@
|
|||||||
{
|
{
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": ".NET Core Attach",
|
"mode": "debug",
|
||||||
"type": "coreclr",
|
"name": "Go launch file",
|
||||||
"request": "attach",
|
"program": "${file}",
|
||||||
"processId": 21452
|
"request": "launch",
|
||||||
|
"type": "go"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "node",
|
"name": "node Launch Current Opened File",
|
||||||
"request": "launch",
|
"program": "${file}",
|
||||||
"name": "node Launch Current Opened File",
|
"request": "launch",
|
||||||
"program": "${file}"
|
"type": "node"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"internalConsoleOptions": "neverOpen",
|
||||||
|
"name": "Debug File",
|
||||||
|
"program": "${file}",
|
||||||
|
"request": "launch",
|
||||||
|
"stopOnEntry": false,
|
||||||
|
"type": "bun",
|
||||||
|
"watchMode": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"internalConsoleOptions": "neverOpen",
|
||||||
|
"name": "Run File",
|
||||||
|
"noDebug": true,
|
||||||
|
"program": "${file}",
|
||||||
|
"request": "launch",
|
||||||
|
"type": "bun",
|
||||||
|
"watchMode": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": ".NET Core Attach",
|
||||||
|
"processId": 32760,
|
||||||
|
"request": "attach",
|
||||||
|
"type": "coreclr"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
133
Adaptation/.vscode/tasks.json
vendored
133
Adaptation/.vscode/tasks.json
vendored
@ -1,19 +1,134 @@
|
|||||||
{
|
{
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"default": "Development",
|
||||||
|
"description": "Which ASP Net Core Environment?",
|
||||||
|
"id": "ASPNETCORE_ENVIRONMENT",
|
||||||
|
"options": [
|
||||||
|
"Development",
|
||||||
|
"Production"
|
||||||
|
],
|
||||||
|
"type": "pickString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "{AssemblyTitle}",
|
||||||
|
"description": "What Assembly Title?",
|
||||||
|
"id": "AssemblyTitle",
|
||||||
|
"type": "promptString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "{Build.BuildId}",
|
||||||
|
"description": "Which Build BuildId?",
|
||||||
|
"id": "Build.BuildId",
|
||||||
|
"type": "promptString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "{Build.Reason}",
|
||||||
|
"description": "Which Build Reason?",
|
||||||
|
"id": "Build.Reason",
|
||||||
|
"type": "promptString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "{Build.Repository.Id}",
|
||||||
|
"description": "Which Build Repository Id?",
|
||||||
|
"id": "Build.Repository.Id",
|
||||||
|
"type": "promptString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "{Build.Repository.Name}",
|
||||||
|
"description": "Which Build Repository Name?",
|
||||||
|
"id": "Build.Repository.Name",
|
||||||
|
"type": "promptString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "{Build.SourceVersion}",
|
||||||
|
"description": "Which Build Source Version?",
|
||||||
|
"id": "Build.SourceVersion",
|
||||||
|
"type": "promptString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "Debug",
|
||||||
|
"description": "Which Configuration?",
|
||||||
|
"id": "Configuration",
|
||||||
|
"options": [
|
||||||
|
"Debug",
|
||||||
|
"Release"
|
||||||
|
],
|
||||||
|
"type": "pickString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "net8.0",
|
||||||
|
"description": "Which Core Version?",
|
||||||
|
"id": "CoreVersion",
|
||||||
|
"options": [
|
||||||
|
"net8.0"
|
||||||
|
],
|
||||||
|
"type": "pickString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe",
|
||||||
|
"description": "Which MS Build?",
|
||||||
|
"id": "MSBuild",
|
||||||
|
"type": "promptString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/",
|
||||||
|
"description": "Which Nuget Source?",
|
||||||
|
"id": "NugetSource",
|
||||||
|
"type": "promptString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "win-x64",
|
||||||
|
"description": "Which Runtime?",
|
||||||
|
"id": "Runtime",
|
||||||
|
"options": [
|
||||||
|
"win-x64",
|
||||||
|
"win-x32",
|
||||||
|
"linux-x64",
|
||||||
|
"linux-x32"
|
||||||
|
],
|
||||||
|
"type": "pickString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "L:/",
|
||||||
|
"description": "Which System DefaultWorkingDirectory?",
|
||||||
|
"id": "System.DefaultWorkingDirectory",
|
||||||
|
"options": [
|
||||||
|
"L:/",
|
||||||
|
"D:/",
|
||||||
|
"C:/"
|
||||||
|
],
|
||||||
|
"type": "pickString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "v4.8",
|
||||||
|
"description": "Which Core Target Framework Version?",
|
||||||
|
"id": "TargetFrameworkVersion",
|
||||||
|
"options": [
|
||||||
|
"v4.8"
|
||||||
|
],
|
||||||
|
"type": "pickString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "{UserSecretsId}",
|
||||||
|
"description": "Which Core User Secrets Id?",
|
||||||
|
"id": "UserSecretsId",
|
||||||
|
"type": "promptString"
|
||||||
|
}
|
||||||
|
],
|
||||||
"tasks": [
|
"tasks": [
|
||||||
{
|
{
|
||||||
"label": "Build",
|
"label": "Build",
|
||||||
"command": "dotnet",
|
"command": "dotnet",
|
||||||
"type": "process",
|
"type": "process",
|
||||||
"args": [
|
"args": [
|
||||||
"build",
|
"build"
|
||||||
"/property:GenerateFullPaths=true",
|
|
||||||
"/consoleloggerparameters:NoSummary"
|
|
||||||
],
|
],
|
||||||
"problemMatcher": "$msCompile"
|
"problemMatcher": "$msCompile"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Test-Debug",
|
"label": "Test Debug",
|
||||||
"command": "dotnet",
|
"command": "dotnet",
|
||||||
"type": "process",
|
"type": "process",
|
||||||
"args": [
|
"args": [
|
||||||
@ -24,7 +139,7 @@
|
|||||||
"problemMatcher": "$msCompile"
|
"problemMatcher": "$msCompile"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Test-Release",
|
"label": "Test Release",
|
||||||
"command": "dotnet",
|
"command": "dotnet",
|
||||||
"type": "process",
|
"type": "process",
|
||||||
"args": [
|
"args": [
|
||||||
@ -50,7 +165,7 @@
|
|||||||
"problemMatcher": "$msCompile"
|
"problemMatcher": "$msCompile"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Format-Whitespaces",
|
"label": "Format Whitespaces",
|
||||||
"command": "dotnet",
|
"command": "dotnet",
|
||||||
"type": "process",
|
"type": "process",
|
||||||
"args": [
|
"args": [
|
||||||
@ -87,13 +202,13 @@
|
|||||||
"problemMatcher": "$msCompile"
|
"problemMatcher": "$msCompile"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Project",
|
"label": "Code Project",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "code ../MET08RESIMAPCDE.csproj",
|
"command": "code ../MET08RESIMAPCDE.csproj",
|
||||||
"problemMatcher": []
|
"problemMatcher": []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Readme",
|
"label": "Code Read Me",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "code ../README.md",
|
"command": "code ../README.md",
|
||||||
"problemMatcher": []
|
"problemMatcher": []
|
||||||
@ -113,7 +228,7 @@
|
|||||||
"problemMatcher": []
|
"problemMatcher": []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Git Config",
|
"label": "Code Git Config",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "code ../.git/config",
|
"command": "code ../.git/config",
|
||||||
"problemMatcher": []
|
"problemMatcher": []
|
||||||
|
|||||||
@ -128,7 +128,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
FileCopy(reportFullPath, dateTime, descriptions);
|
FileCopy(reportFullPath, dateTime, descriptions);
|
||||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics[0]), tests, jsonElements, new List<FileInfo>());
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List<FileInfo>());
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -153,7 +153,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
MoveArchive(reportFullPath, dateTime);
|
MoveArchive(reportFullPath, dateTime);
|
||||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics[0]), tests, jsonElements, new List<FileInfo>());
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List<FileInfo>());
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -103,7 +103,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FileCopy<T>(string reportFullPath, DateTime dateTime, List<T> descriptions) where T : Shared.Properties.IDescription
|
private void WriteFile<T>(string reportFullPath, DateTime dateTime, List<T> descriptions) where T : Shared.Properties.IDescription
|
||||||
{
|
{
|
||||||
bool isDummyRun = false;
|
bool isDummyRun = false;
|
||||||
string successDirectory = string.Empty;
|
string successDirectory = string.Empty;
|
||||||
@ -111,8 +111,9 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
string duplicateDirectory = Path.Combine(_FileConnectorConfiguration.SourceFileLocation, _CellInstanceName);
|
string duplicateDirectory = Path.Combine(_FileConnectorConfiguration.SourceFileLocation, _CellInstanceName);
|
||||||
if (!Directory.Exists(duplicateDirectory))
|
if (!Directory.Exists(duplicateDirectory))
|
||||||
_ = Directory.CreateDirectory(duplicateDirectory);
|
_ = Directory.CreateDirectory(duplicateDirectory);
|
||||||
string duplicateFile = Path.Combine(duplicateDirectory, Path.GetFileName(reportFullPath));
|
string duplicateFile = Path.Combine(duplicateDirectory, $"{Path.GetFileName(reportFullPath)}.xml");
|
||||||
File.Copy(reportFullPath, duplicateFile, overwrite: true);
|
string xml = ProcessDataStandardFormat.GetXml(reportFullPath);
|
||||||
|
File.WriteAllText(duplicateFile, xml);
|
||||||
WaitForFileConsumption(dateTime, descriptions, isDummyRun, successDirectory, duplicateDirectory, collection, duplicateFile);
|
WaitForFileConsumption(dateTime, descriptions, isDummyRun, successDirectory, duplicateDirectory, collection, duplicateFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -126,8 +127,8 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
|
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
|
||||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
FileCopy(reportFullPath, dateTime, descriptions);
|
WriteFile(reportFullPath, dateTime, descriptions);
|
||||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics[0]), tests, jsonElements, new List<FileInfo>());
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List<FileInfo>());
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -88,9 +88,9 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
string processDataStandardFormatMappingOldColumnNames = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Process.Data.Standard.Format.Mapping.Old.Column.Names");
|
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 processDataStandardFormatMappingNewColumnNames = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Process.Data.Standard.Format.Mapping.New.Column.Names");
|
||||||
string processDataStandardFormatMappingColumnIndices = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Process.Data.Standard.Format.Mapping.Column.Indices");
|
string processDataStandardFormatMappingColumnIndices = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Process.Data.Standard.Format.Mapping.Column.Indices");
|
||||||
_ProcessDataStandardFormatMapping = GetProcessDataStandardFormatMapping(processDataStandardFormatMappingOldColumnNames,
|
_ProcessDataStandardFormatMapping = ProcessDataStandardFormatMapping.Get(processDataStandardFormatMappingOldColumnNames,
|
||||||
processDataStandardFormatMappingNewColumnNames,
|
processDataStandardFormatMappingNewColumnNames,
|
||||||
processDataStandardFormatMappingColumnIndices);
|
processDataStandardFormatMappingColumnIndices);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception)
|
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception)
|
||||||
@ -169,46 +169,6 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
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,Id,Lot";
|
|
||||||
string args5 = "";
|
|
||||||
string args6 = "StandardDeviationPercentage,SheetRhoVariation,CDE5";
|
|
||||||
string args7 = "Test|EventId,Run|Title,Employee|Operator,EquipId|Equipment,Recipe|RecipeName,FileName|TheFileName,DataReject|DataRejectSigma,Merit|MeritGOF,T|Th,StdDev|StandardDeviationPercentage";
|
|
||||||
// string args8 = "Time,A_LOGISTICS,B_LOGISTICS,Test,Count,Index,MesEntity,Date,Employee,Lot,PSN,Reactor,Recipe,AutoOptimizeGain,AutoProbeHeightSet,Avg,DataReject,DLRatio,Merit,Pt,R,ResistivitySpec,Rs,SemiRadial,StdDev,T,Temp,Engineer,EquipId,FileName,HeaderUniqueId,Id,Layer,RDS,Run,UniqueId,Zone,SheetRhoVariation";
|
|
||||||
// string args9 = "Time,A_LOGISTICS,B_LOGISTICS,Count,Sequence,MesEntity,Index,Title,TheFileName,Project,RecipeName,LotID,WfrID,Is_TF_DataFile,Directory,Time,Date,Temp,TCRPercent,NOrP,Avg,Dev,Min,Max,Operator,Equipment,Engineer,AreaOrDiamScan,WaferShape,BNBand,TemplateFile,XSize,YSize,CalibrationFactor,MsmtMode,DataType,DataUnit,NumProbePoints,SingleOrDualProbeConfig,NumberActPrbPts,Rsens,IdrvMx,VinGain,DataRejectSigma,MeritThreshold,PrbChgNumber,PrbName,WaferSize,EdgeEx,Xll,Yll,Xur,Yur,X,Y,CutCorners,DiamThScan,DiamStart,DiamEnd,DiamStep,FlatOrNotch,FollowMajorFlat,AutoOrManualLoad,RangeOrIndividual,PauseAfterEveryRun,AutoPrint,Plot,BulkSampleThk,Unit,RangeFrom,RangeTo,CassetteSlotSelected,R,Th,Data,Rs,RsA,RsB,NumberSample,PointX,PointY,Irng,Vrng,ChiSq,MeritGOF,DataIntegrity,RDS,PSN,Reactor,Layer,Zone,Employee,InferredLot,StandardDeviationPercentage,SheetRhoVariation,EventId";
|
|
||||||
// string args10 = "0,1,2,95,3,6,5,16,24,-1,87,88,10,-1,-1,20,43,-1,84,-1,72,-1,75,-1,93,73,17,26,25,8,-1,-1,89,86,7,-1,90,94";
|
|
||||||
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)
|
private static ReadOnlyCollection<PreWith> GetPreWithCollection(ReadOnlyCollection<Pre> preCollection)
|
||||||
{
|
{
|
||||||
List<PreWith> results = new();
|
List<PreWith> results = new();
|
||||||
@ -313,8 +273,13 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
continue;
|
continue;
|
||||||
if (!_StaticRuns.TryGetValue(_Logistics.Sequence, out List<Shared.Metrology.WS.Results>? wsResults))
|
if (!_StaticRuns.TryGetValue(_Logistics.Sequence, out List<Shared.Metrology.WS.Results>? wsResults))
|
||||||
wsResults = null;
|
wsResults = null;
|
||||||
ProcessDataStandardFormat.Write(preWith.CheckFile, processDataStandardFormat, wsResults);
|
if (processDataStandardFormat.InputPDSF is null)
|
||||||
File.Delete(preWith.MatchingFile);
|
File.Move(preWith.MatchingFile, preWith.CheckFile);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ProcessDataStandardFormat.Write(preWith.CheckFile, processDataStandardFormat, wsResults);
|
||||||
|
File.Delete(preWith.MatchingFile);
|
||||||
|
}
|
||||||
if (Directory.Exists(preWith.NoWaitDirectory))
|
if (Directory.Exists(preWith.NoWaitDirectory))
|
||||||
{
|
{
|
||||||
post = new(preWith.CheckFile, preWith.ErrFile);
|
post = new(preWith.CheckFile, preWith.ErrFile);
|
||||||
|
|||||||
@ -110,7 +110,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SaveOpenInsightFile(string reportFullPath, DateTime dateTime, ProcessDataStandardFormat processDataStandardFormat, List<RsM.Description> descriptions, Test[] tests)
|
private void SaveOpenInsightFile(string reportFullPath, DateTime dateTime, List<RsM.Description> descriptions, Test[] tests)
|
||||||
{
|
{
|
||||||
string duplicateFile;
|
string duplicateFile;
|
||||||
bool isDummyRun = false;
|
bool isDummyRun = false;
|
||||||
@ -119,15 +119,6 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
if (!Directory.Exists(duplicateDirectory))
|
if (!Directory.Exists(duplicateDirectory))
|
||||||
_ = Directory.CreateDirectory(duplicateDirectory);
|
_ = Directory.CreateDirectory(duplicateDirectory);
|
||||||
string successDirectory = _FileConnectorConfiguration.AlternateTargetFolder;
|
string successDirectory = _FileConnectorConfiguration.AlternateTargetFolder;
|
||||||
if (!Directory.Exists(Path.Combine(duplicateDirectory, "1")))
|
|
||||||
{
|
|
||||||
string parentParent = GetParentParent(_FileConnectorConfiguration.SourceFileLocation);
|
|
||||||
if (parentParent.Contains(_CellInstanceName))
|
|
||||||
parentParent = Path.GetDirectoryName(parentParent);
|
|
||||||
duplicateDirectory = Path.Combine(parentParent, "Data");
|
|
||||||
if (!Directory.Exists(duplicateDirectory))
|
|
||||||
_ = Directory.CreateDirectory(duplicateDirectory);
|
|
||||||
}
|
|
||||||
if (descriptions.Count == 0 || tests.Length == 0)
|
if (descriptions.Count == 0 || tests.Length == 0)
|
||||||
duplicateFile = Path.Combine(duplicateDirectory, Path.GetFileName(reportFullPath));
|
duplicateFile = Path.Combine(duplicateDirectory, Path.GetFileName(reportFullPath));
|
||||||
else
|
else
|
||||||
@ -152,7 +143,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
else
|
else
|
||||||
duplicateFile = Path.Combine(duplicateDirectory, $"{$"Viewer {subgroupId}".TrimEnd()} {fileName.Replace("Viewer", string.Empty)}");
|
duplicateFile = Path.Combine(duplicateDirectory, $"{$"Viewer {subgroupId}".TrimEnd()} {fileName.Replace("Viewer", string.Empty)}");
|
||||||
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
||||||
FromIQS.Save(_OpenInsightApiECDirectory, _Logistics, reportFullPath, processDataStandardFormat, descriptions.First(), subgroupId, weekOfYear);
|
FromIQS.Save(_OpenInsightApiECDirectory, _Logistics, reportFullPath, descriptions.First(), subgroupId, weekOfYear);
|
||||||
}
|
}
|
||||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
{
|
{
|
||||||
@ -164,15 +155,16 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||||
{
|
{
|
||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath);
|
string[] lines = File.ReadAllLines(reportFullPath);
|
||||||
|
ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath, lines);
|
||||||
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
|
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
|
||||||
SetFileParameterLotIDToLogisticsMID();
|
SetFileParameterLotIDToLogisticsMID();
|
||||||
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
|
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(reportFullPath, lines, processDataStandardFormat);
|
||||||
List<RsM.Description> descriptions = RsM.ProcessData.GetDescriptions(jsonElements);
|
List<RsM.Description> descriptions = RsM.ProcessData.GetDescriptions(jsonElements);
|
||||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
SaveOpenInsightFile(reportFullPath, dateTime, processDataStandardFormat, descriptions, tests);
|
SaveOpenInsightFile(reportFullPath, dateTime, descriptions, tests);
|
||||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics[0]), tests, jsonElements, new List<FileInfo>());
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List<FileInfo>());
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -325,74 +325,18 @@ public class FromIQS
|
|||||||
return new(result, count, commandText);
|
return new(result, count, commandText);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetJson(Logistics logistics, ProcessDataStandardFormat processDataStandardFormat, RsM.Description description)
|
internal static void Save(string openInsightApiECDirectory, Logistics logistics, string reportFullPath, RsM.Description description, long? subGroupId, string weekOfYear)
|
||||||
{
|
{
|
||||||
string result;
|
|
||||||
StringBuilder stringBuilder = new();
|
|
||||||
var @object = new
|
|
||||||
{
|
|
||||||
description.MesEntity,
|
|
||||||
description.Employee,
|
|
||||||
description.Layer,
|
|
||||||
description.PSN,
|
|
||||||
description.RDS,
|
|
||||||
description.Reactor,
|
|
||||||
description.Recipe,
|
|
||||||
description.Zone,
|
|
||||||
logistics.DateTimeFromSequence.Ticks
|
|
||||||
};
|
|
||||||
string[] pair;
|
|
||||||
string safeValue;
|
|
||||||
string[] segments;
|
|
||||||
string serializerValue;
|
|
||||||
foreach (string line in processDataStandardFormat.Logistics)
|
|
||||||
{
|
|
||||||
segments = line.Split('\t');
|
|
||||||
if (segments.Length < 2)
|
|
||||||
continue;
|
|
||||||
segments = segments[1].Split(';');
|
|
||||||
_ = stringBuilder.Append('{');
|
|
||||||
foreach (string segment in segments)
|
|
||||||
{
|
|
||||||
pair = segment.Split('=');
|
|
||||||
if (pair.Length != 2 || pair[0].Length < 3)
|
|
||||||
continue;
|
|
||||||
serializerValue = JsonSerializer.Serialize(pair[1]);
|
|
||||||
safeValue = serializerValue.Substring(1, serializerValue.Length - 2);
|
|
||||||
_ = stringBuilder.Append('"').Append(pair[0].Substring(2)).Append('"').Append(':').Append('"').Append(safeValue).Append('"').Append(',');
|
|
||||||
}
|
|
||||||
if (stringBuilder.Length > 0)
|
|
||||||
_ = stringBuilder.Remove(stringBuilder.Length - 1, 1);
|
|
||||||
_ = stringBuilder.Append('}').Append(',');
|
|
||||||
}
|
|
||||||
if (stringBuilder.Length > 0)
|
|
||||||
_ = stringBuilder.Remove(stringBuilder.Length - 1, 1);
|
|
||||||
_ = stringBuilder.Append(']').Append('}');
|
|
||||||
_ = stringBuilder.Insert(0, ",\"Logistics\":[");
|
|
||||||
string json = JsonSerializer.Serialize(@object);
|
|
||||||
_ = stringBuilder.Insert(0, json.Substring(0, json.Length - 1));
|
|
||||||
JsonElement? jsonElement = JsonSerializer.Deserialize<JsonElement>(stringBuilder.ToString());
|
|
||||||
result = jsonElement is null ? "{}" : JsonSerializer.Serialize(jsonElement, new JsonSerializerOptions { WriteIndented = true });
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static void Save(string openInsightApiECDirectory, Logistics logistics, string reportFullPath, ProcessDataStandardFormat processDataStandardFormat, RsM.Description description, long? subGroupId, string weekOfYear)
|
|
||||||
{
|
|
||||||
string checkFile;
|
|
||||||
string fileName = Path.GetFileName(reportFullPath);
|
string fileName = Path.GetFileName(reportFullPath);
|
||||||
string json = GetJson(logistics, processDataStandardFormat, description);
|
|
||||||
string? ecPathRoot = Path.GetPathRoot(openInsightApiECDirectory);
|
string? ecPathRoot = Path.GetPathRoot(openInsightApiECDirectory);
|
||||||
bool ecExists = ecPathRoot is not null && Directory.Exists(ecPathRoot);
|
bool ecExists = ecPathRoot is not null && Directory.Exists(ecPathRoot);
|
||||||
string weekYear = $"{logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}";
|
string weekYear = $"{logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}";
|
||||||
string ecDirectory = Path.Combine(openInsightApiECDirectory, weekYear, $"-{description.PSN}", $"-{description.Reactor}", $"-{description.RDS}", $"-{subGroupId}");
|
string ecDirectory = Path.Combine(openInsightApiECDirectory, weekYear, $"-{description.PSN}", $"-{description.Reactor}", $"-{description.RDS}", $"-{subGroupId}");
|
||||||
if (ecExists && !Directory.Exists(ecDirectory))
|
if (ecExists && !Directory.Exists(ecDirectory))
|
||||||
_ = Directory.CreateDirectory(ecDirectory);
|
_ = Directory.CreateDirectory(ecDirectory);
|
||||||
checkFile = Path.Combine(ecDirectory, fileName);
|
string checkFile = Path.Combine(ecDirectory, fileName);
|
||||||
if (ecExists && !File.Exists(checkFile))
|
if (ecExists && !File.Exists(checkFile))
|
||||||
File.Copy(reportFullPath, checkFile);
|
File.Copy(reportFullPath, checkFile);
|
||||||
checkFile = Path.Combine(ecDirectory, $"{logistics.DateTimeFromSequence.Ticks}.json");
|
|
||||||
if (ecExists && !File.Exists(checkFile))
|
|
||||||
File.WriteAllText(checkFile, json);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetCommandText(string[] iqsCopyValues)
|
private static string GetCommandText(string[] iqsCopyValues)
|
||||||
|
|||||||
@ -110,10 +110,10 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SendData(string reportFullPath, DateTime dateTime, List<RsM.Description> descriptions)
|
private void SendData(string reportFullPath, DateTime dateTime, JsonElement[] jsonElements, List<RsM.Description> descriptions)
|
||||||
{
|
{
|
||||||
string checkDirectory;
|
string checkDirectory;
|
||||||
WSRequest wsRequest = new(this, _Logistics, descriptions);
|
WSRequest wsRequest = new(this, _Logistics, jsonElements, descriptions);
|
||||||
int weekOfYear = _Calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday);
|
int weekOfYear = _Calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday);
|
||||||
string directory = Path.Combine(_OpenInsightMetrologyViewerFileShare, dateTime.Year.ToString(), $"WW{weekOfYear:00}");
|
string directory = Path.Combine(_OpenInsightMetrologyViewerFileShare, dateTime.Year.ToString(), $"WW{weekOfYear:00}");
|
||||||
checkDirectory = Path.Combine(directory, _Logistics.Sequence.ToString());
|
checkDirectory = Path.Combine(directory, _Logistics.Sequence.ToString());
|
||||||
@ -139,15 +139,16 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||||
{
|
{
|
||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath);
|
string[] lines = File.ReadAllLines(reportFullPath);
|
||||||
|
ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath, lines);
|
||||||
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
|
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
|
||||||
SetFileParameterLotIDToLogisticsMID();
|
SetFileParameterLotIDToLogisticsMID();
|
||||||
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
|
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(reportFullPath, lines, processDataStandardFormat);
|
||||||
List<RsM.Description> descriptions = RsM.ProcessData.GetDescriptions(jsonElements);
|
List<RsM.Description> descriptions = RsM.ProcessData.GetDescriptions(jsonElements);
|
||||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
SendData(reportFullPath, dateTime, descriptions);
|
SendData(reportFullPath, dateTime, jsonElements, descriptions);
|
||||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics[0]), tests, jsonElements, new List<FileInfo>());
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List<FileInfo>());
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,7 @@ using Adaptation.Shared.Properties;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Text.Json;
|
||||||
|
|
||||||
namespace Adaptation.FileHandlers.OpenInsightMetrologyViewer;
|
namespace Adaptation.FileHandlers.OpenInsightMetrologyViewer;
|
||||||
|
|
||||||
@ -14,6 +15,7 @@ public class WSRequest
|
|||||||
public bool SentToSPC { get; set; }
|
public bool SentToSPC { get; set; }
|
||||||
//
|
//
|
||||||
|
|
||||||
|
public string AttemptCounter { get; set; }
|
||||||
public string AutoOptimizeGain { get; set; }
|
public string AutoOptimizeGain { get; set; }
|
||||||
public string AutoProbeHeightSet { get; set; }
|
public string AutoProbeHeightSet { get; set; }
|
||||||
public string Avg { get; set; }
|
public string Avg { get; set; }
|
||||||
@ -26,6 +28,7 @@ public class WSRequest
|
|||||||
public string FileName { get; set; }
|
public string FileName { get; set; }
|
||||||
public string FilePath { get; set; }
|
public string FilePath { get; set; }
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
public string IndexOf { get; set; }
|
||||||
public string Layer { get; set; }
|
public string Layer { get; set; }
|
||||||
public string LotId { get; set; }
|
public string LotId { get; set; }
|
||||||
public string Op { get; set; }
|
public string Op { get; set; }
|
||||||
@ -45,7 +48,7 @@ public class WSRequest
|
|||||||
[Obsolete("For json")] public WSRequest() { }
|
[Obsolete("For json")] public WSRequest() { }
|
||||||
|
|
||||||
#pragma warning disable IDE0060
|
#pragma warning disable IDE0060
|
||||||
internal WSRequest(IFileRead fileRead, Logistics logistics, List<RsM.Description> descriptions, string processDataStandardFormat = null)
|
internal WSRequest(IFileRead fileRead, Logistics logistics, JsonElement[] jsonElements, List<RsM.Description> descriptions, string processDataStandardFormat = null)
|
||||||
#pragma warning restore IDE0060
|
#pragma warning restore IDE0060
|
||||||
{
|
{
|
||||||
Id = -1;
|
Id = -1;
|
||||||
@ -55,18 +58,20 @@ public class WSRequest
|
|||||||
throw new Exception();
|
throw new Exception();
|
||||||
//Header
|
//Header
|
||||||
{
|
{
|
||||||
|
AttemptCounter = x.AttemptCounter;
|
||||||
AutoOptimizeGain = x.AutoOptimizeGain;
|
AutoOptimizeGain = x.AutoOptimizeGain;
|
||||||
AutoProbeHeightSet = x.AutoProbeHeightSet;
|
AutoProbeHeightSet = x.AutoProbeHeightSet;
|
||||||
Avg = x.Avg;
|
Avg = x.Avg;
|
||||||
DLRatio = x.DLRatio;
|
|
||||||
DataReject = x.DataReject;
|
DataReject = x.DataReject;
|
||||||
Date = x.Date;
|
Date = x.Date;
|
||||||
Op = x.Employee;
|
DLRatio = x.DLRatio;
|
||||||
Engineer = x.Engineer;
|
Engineer = x.Engineer;
|
||||||
EquipId = logistics.MesEntity;
|
EquipId = logistics.MesEntity; // different name
|
||||||
FileName = x.FileName;
|
FileName = x.FileName;
|
||||||
|
IndexOf = x.IndexOf;
|
||||||
Layer = x.Layer;
|
Layer = x.Layer;
|
||||||
LotId = x.Lot;
|
LotId = x.Lot; // different name
|
||||||
|
Op = x.Employee; // different name
|
||||||
PSN = x.PSN;
|
PSN = x.PSN;
|
||||||
RDS = x.RDS;
|
RDS = x.RDS;
|
||||||
Reactor = x.Reactor;
|
Reactor = x.Reactor;
|
||||||
@ -74,7 +79,7 @@ public class WSRequest
|
|||||||
ResistivitySpec = x.ResistivitySpec;
|
ResistivitySpec = x.ResistivitySpec;
|
||||||
Run = x.Run;
|
Run = x.Run;
|
||||||
SemiRadial = x.SemiRadial;
|
SemiRadial = x.SemiRadial;
|
||||||
StDev = x.StdDev;
|
StDev = x.StdDev; // different name
|
||||||
Temp = x.Temp;
|
Temp = x.Temp;
|
||||||
UniqueId = x.UniqueId;
|
UniqueId = x.UniqueId;
|
||||||
Zone = x.Zone;
|
Zone = x.Zone;
|
||||||
@ -105,14 +110,14 @@ public class WSRequest
|
|||||||
FilePath = onlyWSRequest;
|
FilePath = onlyWSRequest;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static long GetHeaderId(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, string openInsightMetrologyViewerFileShare, int weekOfYear, WS.Results results, List<RsM.Description> descriptions)
|
internal static long GetHeaderId(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, string openInsightMetrologyViewerFileShare, int weekOfYear, WS.Results results, JsonElement[] jsonElements, List<RsM.Description> descriptions)
|
||||||
{
|
{
|
||||||
long result;
|
long result;
|
||||||
if (results is not null && results.HeaderId is not null)
|
if (results is not null && results.HeaderId is not null)
|
||||||
result = results.HeaderId.Value;
|
result = results.HeaderId.Value;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
WSRequest wsRequest = new(fileRead, logistics, descriptions);
|
WSRequest wsRequest = new(fileRead, logistics, jsonElements, descriptions);
|
||||||
string directory = Path.Combine(openInsightMetrologyViewerFileShare, logistics.DateTimeFromSequence.Year.ToString(), $"WW{weekOfYear:00}");
|
string directory = Path.Combine(openInsightMetrologyViewerFileShare, logistics.DateTimeFromSequence.Year.ToString(), $"WW{weekOfYear:00}");
|
||||||
(_, WS.Results wsResults) = WS.SendData(openInsightMetrologyViewerAPI, logistics.Sequence, directory, wsRequest);
|
(_, WS.Results wsResults) = WS.SendData(openInsightMetrologyViewerAPI, logistics.Sequence, directory, wsRequest);
|
||||||
if (wsResults.Success is null || !wsResults.Success.Value)
|
if (wsResults.Success is null || !wsResults.Success.Value)
|
||||||
|
|||||||
@ -135,7 +135,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PostOpenInsightMetrologyViewerAttachments(List<RsM.Description> descriptions)
|
private void PostOpenInsightMetrologyViewerAttachments(JsonElement[] jsonElements, List<RsM.Description> descriptions)
|
||||||
{
|
{
|
||||||
Shared.Metrology.WS.Results? results;
|
Shared.Metrology.WS.Results? results;
|
||||||
string jobIdDirectory = Path.Combine(Path.GetDirectoryName(_FileConnectorConfiguration.AlternateTargetFolder) ?? throw new Exception(), _Logistics.JobID);
|
string jobIdDirectory = Path.Combine(Path.GetDirectoryName(_FileConnectorConfiguration.AlternateTargetFolder) ?? throw new Exception(), _Logistics.JobID);
|
||||||
@ -151,7 +151,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
results = wsResults[0];
|
results = wsResults[0];
|
||||||
}
|
}
|
||||||
int weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday);
|
int weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday);
|
||||||
long headerId = !_IsEAFHosted ? -1 : OpenInsightMetrologyViewer.WSRequest.GetHeaderId(this, _Logistics, _OpenInsightMetrologyViewerAPI, _OpenInsightMetrologyViewerFileShare, weekOfYear, results, descriptions);
|
long headerId = !_IsEAFHosted ? -1 : OpenInsightMetrologyViewer.WSRequest.GetHeaderId(this, _Logistics, _OpenInsightMetrologyViewerAPI, _OpenInsightMetrologyViewerFileShare, weekOfYear, results, jsonElements, descriptions);
|
||||||
string? headerIdDirectory = GetHeaderIdDirectory(headerId);
|
string? headerIdDirectory = GetHeaderIdDirectory(headerId);
|
||||||
if (string.IsNullOrEmpty(headerIdDirectory))
|
if (string.IsNullOrEmpty(headerIdDirectory))
|
||||||
throw new Exception($"Didn't find header id directory <{headerId}>");
|
throw new Exception($"Didn't find header id directory <{headerId}>");
|
||||||
@ -163,15 +163,16 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
if (dateTime == DateTime.MinValue)
|
if (dateTime == DateTime.MinValue)
|
||||||
throw new ArgumentNullException(nameof(dateTime));
|
throw new ArgumentNullException(nameof(dateTime));
|
||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath);
|
string[] lines = File.ReadAllLines(reportFullPath);
|
||||||
|
ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath, lines);
|
||||||
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
|
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
|
||||||
SetFileParameterLotIDToLogisticsMID();
|
SetFileParameterLotIDToLogisticsMID();
|
||||||
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
|
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(reportFullPath, lines, processDataStandardFormat);
|
||||||
List<RsM.Description> descriptions = RsM.ProcessData.GetDescriptions(jsonElements);
|
List<RsM.Description> descriptions = RsM.ProcessData.GetDescriptions(jsonElements);
|
||||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
PostOpenInsightMetrologyViewerAttachments(descriptions);
|
PostOpenInsightMetrologyViewerAttachments(jsonElements, descriptions);
|
||||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics[0]), tests, jsonElements, new List<FileInfo>());
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List<FileInfo>());
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -108,7 +108,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DirectoryMove(string reportFullPath, DateTime dateTime, List<RsM.Description> descriptions)
|
private void DirectoryMove(string reportFullPath, DateTime dateTime, JsonElement[] jsonElements, List<RsM.Description> descriptions)
|
||||||
{
|
{
|
||||||
if (dateTime == DateTime.MinValue)
|
if (dateTime == DateTime.MinValue)
|
||||||
throw new ArgumentNullException(nameof(dateTime));
|
throw new ArgumentNullException(nameof(dateTime));
|
||||||
@ -122,7 +122,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
throw new Exception("Didn't find directory by logistics sequence");
|
throw new Exception("Didn't find directory by logistics sequence");
|
||||||
if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime)
|
if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime)
|
||||||
File.SetLastWriteTime(reportFullPath, fileInfo.CreationTime);
|
File.SetLastWriteTime(reportFullPath, fileInfo.CreationTime);
|
||||||
OpenInsightMetrologyViewer.WSRequest wsRequest = new(this, _Logistics, descriptions);
|
OpenInsightMetrologyViewer.WSRequest wsRequest = new(this, _Logistics, jsonElements, descriptions);
|
||||||
JsonSerializerOptions jsonSerializerOptions = new() { WriteIndented = true };
|
JsonSerializerOptions jsonSerializerOptions = new() { WriteIndented = true };
|
||||||
string json = JsonSerializer.Serialize(wsRequest, wsRequest.GetType(), jsonSerializerOptions);
|
string json = JsonSerializer.Serialize(wsRequest, wsRequest.GetType(), jsonSerializerOptions);
|
||||||
string directoryName = $"{Path.GetFileName(matchDirectories[0]).Split(new string[] { logisticsSequence }, StringSplitOptions.None)[0]}{_Logistics.DateTimeFromSequence:yyyy-MM-dd_hh;mm_tt_}{DateTime.Now.Ticks - _Logistics.Sequence}";
|
string directoryName = $"{Path.GetFileName(matchDirectories[0]).Split(new string[] { logisticsSequence }, StringSplitOptions.None)[0]}{_Logistics.DateTimeFromSequence:yyyy-MM-dd_hh;mm_tt_}{DateTime.Now.Ticks - _Logistics.Sequence}";
|
||||||
@ -166,23 +166,24 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||||
{
|
{
|
||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath);
|
string[] lines = File.ReadAllLines(reportFullPath);
|
||||||
|
ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath, lines);
|
||||||
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
|
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
|
||||||
SetFileParameterLotIDToLogisticsMID();
|
SetFileParameterLotIDToLogisticsMID();
|
||||||
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
|
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(reportFullPath, lines, processDataStandardFormat);
|
||||||
List<RsM.Description> descriptions = RsM.ProcessData.GetDescriptions(jsonElements);
|
List<RsM.Description> descriptions = RsM.ProcessData.GetDescriptions(jsonElements);
|
||||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics[0]), tests, jsonElements, new List<FileInfo>());
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List<FileInfo>());
|
||||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
DirectoryMove(reportFullPath, dateTime, descriptions);
|
DirectoryMove(reportFullPath, dateTime, jsonElements, descriptions);
|
||||||
else if (!_IsEAFHosted)
|
else if (!_IsEAFHosted)
|
||||||
{
|
{
|
||||||
OpenInsightMetrologyViewer.WSRequest wsRequest = new(this, _Logistics, descriptions);
|
OpenInsightMetrologyViewer.WSRequest wsRequest = new(this, _Logistics, jsonElements, descriptions);
|
||||||
JsonSerializerOptions jsonSerializerOptions = new() { WriteIndented = true };
|
JsonSerializerOptions jsonSerializerOptions = new() { WriteIndented = true };
|
||||||
string json = JsonSerializer.Serialize(wsRequest, wsRequest.GetType(), jsonSerializerOptions);
|
string check = JsonSerializer.Serialize(wsRequest, wsRequest.GetType(), jsonSerializerOptions);
|
||||||
string jsonFileName = Path.ChangeExtension(reportFullPath, ".json");
|
string jsonFileName = Path.ChangeExtension(reportFullPath, ".json");
|
||||||
string historicalText = File.ReadAllText(jsonFileName);
|
string historicalText = File.ReadAllText(jsonFileName);
|
||||||
if (json != historicalText)
|
if (check != historicalText)
|
||||||
throw new Exception("File doesn't match historical!");
|
throw new Exception("File doesn't match historical!");
|
||||||
}
|
}
|
||||||
return results;
|
return results;
|
||||||
|
|||||||
@ -4,59 +4,62 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace Adaptation.FileHandlers.RsM;
|
namespace Adaptation.FileHandlers.RsM;
|
||||||
|
|
||||||
public class Description : IDescription, Shared.Properties.IDescription
|
public class Description : IDescription, Shared.Properties.IDescription
|
||||||
{
|
{
|
||||||
|
|
||||||
public int Test { get; set; }
|
[JsonPropertyName("EventId")] public int Test { get; set; }
|
||||||
public int Count { get; set; }
|
[JsonPropertyName("Count")] public int Count { get; set; }
|
||||||
public int Index { get; set; }
|
[JsonPropertyName("Index")] public int Index { get; set; }
|
||||||
//
|
//
|
||||||
public string EventName { get; set; }
|
public string EventName { get; set; }
|
||||||
public string NullData { get; set; }
|
public string NullData { get; set; }
|
||||||
public string JobID { get; set; }
|
public string JobID { get; set; }
|
||||||
public string Sequence { get; set; }
|
public string Sequence { get; set; }
|
||||||
public string MesEntity { get; set; }
|
[JsonPropertyName("MesEntity")] public string MesEntity { get; set; }
|
||||||
public string ReportFullPath { get; set; }
|
public string ReportFullPath { get; set; }
|
||||||
public string ProcessJobID { get; set; }
|
public string ProcessJobID { get; set; }
|
||||||
public string MID { get; set; }
|
public string MID { get; set; }
|
||||||
//
|
//
|
||||||
public string Date { get; set; }
|
[JsonPropertyName("Date")] public string Date { get; set; }
|
||||||
public string Employee { get; set; }
|
[JsonPropertyName("Operator")] public string Employee { get; set; }
|
||||||
public string Lot { get; set; }
|
[JsonPropertyName("Lot")] public string Lot { get; set; }
|
||||||
public string PSN { get; set; }
|
[JsonPropertyName("PSN")] public string PSN { get; set; }
|
||||||
public string Reactor { get; set; }
|
[JsonPropertyName("Reactor")] public string Reactor { get; set; }
|
||||||
public string Recipe { get; set; }
|
[JsonPropertyName("RecipeName")] public string Recipe { get; set; }
|
||||||
|
[JsonPropertyName("IndexOf")] public string IndexOf { get; set; }
|
||||||
|
[JsonPropertyName("AttemptCounter")] public string AttemptCounter { get; set; }
|
||||||
//
|
//
|
||||||
public string AutoOptimizeGain { get; set; }
|
[JsonPropertyName("AutoOptimizeGain")] public string AutoOptimizeGain { get; set; }
|
||||||
public string AutoProbeHeightSet { get; set; }
|
[JsonPropertyName("AutoProbeHeightSet")] public string AutoProbeHeightSet { get; set; }
|
||||||
public string Avg { get; set; }
|
[JsonPropertyName("Avg")] public string Avg { get; set; }
|
||||||
public string DataReject { get; set; }
|
[JsonPropertyName("DataRejectSigma")] public string DataReject { get; set; }
|
||||||
public string DLRatio { get; set; }
|
[JsonPropertyName("DLRatio")] public string DLRatio { get; set; }
|
||||||
public string Merit { get; set; }
|
[JsonPropertyName("MeritGOF")] public string Merit { get; set; }
|
||||||
public string Pt { get; set; }
|
[JsonPropertyName("InferredPoint")] public string Pt { get; set; }
|
||||||
public string R { get; set; }
|
[JsonPropertyName("R")] public string R { get; set; }
|
||||||
public string ResistivitySpec { get; set; }
|
[JsonPropertyName("ResistivitySpec")] public string ResistivitySpec { get; set; }
|
||||||
public string Rs { get; set; }
|
[JsonPropertyName("Rs")] public string Rs { get; set; }
|
||||||
public string SemiRadial { get; set; }
|
[JsonPropertyName("SemiRadial")] public string SemiRadial { get; set; }
|
||||||
public string StdDev { get; set; }
|
[JsonPropertyName("StandardDeviationPercentage")] public string StdDev { get; set; }
|
||||||
public string T { get; set; }
|
[JsonPropertyName("Th")] public string T { get; set; }
|
||||||
public string Temp { get; set; }
|
[JsonPropertyName("Temp")] public string Temp { get; set; }
|
||||||
//
|
//
|
||||||
public string Engineer { get; set; }
|
[JsonPropertyName("Engineer")] public string Engineer { get; set; }
|
||||||
public string EquipId { get; set; }
|
[JsonPropertyName("Equipment")] public string EquipId { get; set; }
|
||||||
public string FileName { get; set; }
|
[JsonPropertyName("TheFileName")] public string FileName { get; set; }
|
||||||
public string HeaderUniqueId { get; set; }
|
public string HeaderUniqueId { get; set; }
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
public string Layer { get; set; }
|
[JsonPropertyName("Layer")] public string Layer { get; set; }
|
||||||
public string RDS { get; set; }
|
[JsonPropertyName("RDS")] public string RDS { get; set; }
|
||||||
public string Run { get; set; }
|
[JsonPropertyName("Title")] public string Run { get; set; }
|
||||||
public string UniqueId { get; set; }
|
public string UniqueId { get; set; }
|
||||||
public string Zone { get; set; }
|
[JsonPropertyName("Zone")] public string Zone { get; set; }
|
||||||
//
|
//
|
||||||
public string SheetRhoVariation { get; set; }
|
[JsonPropertyName("SheetRhoVariation")] public string SheetRhoVariation { get; set; }
|
||||||
|
|
||||||
string IDescription.GetEventDescription() => "File Has been read and parsed";
|
string IDescription.GetEventDescription() => "File Has been read and parsed";
|
||||||
|
|
||||||
@ -217,6 +220,8 @@ public class Description : IDescription, Shared.Properties.IDescription
|
|||||||
PSN = processData.PSN,
|
PSN = processData.PSN,
|
||||||
Reactor = processData.Reactor,
|
Reactor = processData.Reactor,
|
||||||
Recipe = processData.Recipe,
|
Recipe = processData.Recipe,
|
||||||
|
IndexOf = nameof(IndexOf),
|
||||||
|
AttemptCounter = nameof(AttemptCounter),
|
||||||
//
|
//
|
||||||
AutoOptimizeGain = processData.AutoOptimizeGain,
|
AutoOptimizeGain = processData.AutoOptimizeGain,
|
||||||
AutoProbeHeightSet = processData.AutoProbeHeightSet,
|
AutoProbeHeightSet = processData.AutoProbeHeightSet,
|
||||||
@ -281,6 +286,8 @@ public class Description : IDescription, Shared.Properties.IDescription
|
|||||||
PSN = nameof(PSN),
|
PSN = nameof(PSN),
|
||||||
Reactor = nameof(Reactor),
|
Reactor = nameof(Reactor),
|
||||||
Recipe = nameof(Recipe),
|
Recipe = nameof(Recipe),
|
||||||
|
IndexOf = nameof(IndexOf),
|
||||||
|
AttemptCounter = nameof(AttemptCounter),
|
||||||
//
|
//
|
||||||
AutoOptimizeGain = nameof(AutoOptimizeGain),
|
AutoOptimizeGain = nameof(AutoOptimizeGain),
|
||||||
AutoProbeHeightSet = nameof(AutoProbeHeightSet),
|
AutoProbeHeightSet = nameof(AutoProbeHeightSet),
|
||||||
@ -314,4 +321,16 @@ public class Description : IDescription, Shared.Properties.IDescription
|
|||||||
|
|
||||||
internal static string GetDateFormat() => "MM/dd/yyyy hh:mm:ss tt";
|
internal static string GetDateFormat() => "MM/dd/yyyy hh:mm:ss tt";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)]
|
||||||
|
[JsonSerializable(typeof(Description))]
|
||||||
|
internal partial class DescriptionSourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)]
|
||||||
|
[JsonSerializable(typeof(Description[]))]
|
||||||
|
internal partial class DescriptionArraySourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
}
|
}
|
||||||
@ -1,16 +1,30 @@
|
|||||||
namespace Adaptation.FileHandlers.RsM;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Adaptation.FileHandlers.RsM;
|
||||||
|
|
||||||
public class Detail
|
public class Detail
|
||||||
{
|
{
|
||||||
|
|
||||||
public string HeaderUniqueId { get; set; }
|
public string HeaderUniqueId { get; set; }
|
||||||
public string Merit { get; set; }
|
[JsonPropertyName("MeritGOF")] public string Merit { get; set; }
|
||||||
public string Pt { get; set; }
|
[JsonPropertyName("InferredPoint")] public string Pt { get; set; }
|
||||||
public string R { get; set; }
|
[JsonPropertyName("R")] public string R { get; set; }
|
||||||
public string Rs { get; set; }
|
[JsonPropertyName("Rs")] public string Rs { get; set; }
|
||||||
public string T { get; set; }
|
[JsonPropertyName("Th")] public string T { get; set; }
|
||||||
public string UniqueId { get; set; }
|
public string UniqueId { get; set; }
|
||||||
|
|
||||||
public override string ToString() => string.Concat(Merit, ";", Pt, ";", R, ";", Rs, ";", T);
|
public override string ToString() => string.Concat(Merit, ";", Pt, ";", R, ";", Rs, ";", T);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)]
|
||||||
|
[JsonSerializable(typeof(Detail))]
|
||||||
|
internal partial class DetailSourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)]
|
||||||
|
[JsonSerializable(typeof(Detail[]))]
|
||||||
|
internal partial class DetailArraySourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
}
|
}
|
||||||
@ -395,12 +395,11 @@ public class ProcessData : IProcessData
|
|||||||
{
|
{
|
||||||
List<Description> results = new();
|
List<Description> results = new();
|
||||||
Description? description;
|
Description? description;
|
||||||
JsonSerializerOptions jsonSerializerOptions = new() { NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString };
|
|
||||||
foreach (JsonElement jsonElement in jsonElements)
|
foreach (JsonElement jsonElement in jsonElements)
|
||||||
{
|
{
|
||||||
if (jsonElement.ValueKind != JsonValueKind.Object)
|
if (jsonElement.ValueKind != JsonValueKind.Object)
|
||||||
throw new Exception();
|
throw new Exception();
|
||||||
description = JsonSerializer.Deserialize<Description>(jsonElement.ToString(), jsonSerializerOptions);
|
description = JsonSerializer.Deserialize(jsonElement.ToString(), DescriptionSourceGenerationContext.Default.Description);
|
||||||
if (description is null)
|
if (description is null)
|
||||||
continue;
|
continue;
|
||||||
results.Add(description);
|
results.Add(description);
|
||||||
|
|||||||
@ -125,7 +125,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
FileCopy(reportFullPath, dateTime, descriptions);
|
FileCopy(reportFullPath, dateTime, descriptions);
|
||||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics[0]), tests, jsonElements, new List<FileInfo>());
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List<FileInfo>());
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -226,9 +226,9 @@ public class MonIn : IMonIn, IDisposable
|
|||||||
{
|
{
|
||||||
StringBuilder stringBuilder = new();
|
StringBuilder stringBuilder = new();
|
||||||
if (string.IsNullOrEmpty(subresource))
|
if (string.IsNullOrEmpty(subresource))
|
||||||
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" {4} \n{5}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), stateName.Trim(), state.Trim(), description.Trim());
|
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" {4} \n{5}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : "now", resource.Trim(), stateName.Trim(), state.Trim(), description.Trim());
|
||||||
else
|
else
|
||||||
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" \"{4}\" {5} \n{6}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), subresource.Trim(), stateName.Trim(), state.Trim(), description.Trim());
|
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" \"{4}\" {5} \n{6}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : "now", resource.Trim(), subresource.Trim(), stateName.Trim(), state.Trim(), description.Trim());
|
||||||
return stringBuilder.ToString();
|
return stringBuilder.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -247,14 +247,14 @@ public class MonIn : IMonIn, IDisposable
|
|||||||
if (string.IsNullOrEmpty(subresource))
|
if (string.IsNullOrEmpty(subresource))
|
||||||
{
|
{
|
||||||
if (unit.Equals(string.Empty) && !interval.HasValue)
|
if (unit.Equals(string.Empty) && !interval.HasValue)
|
||||||
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" {4} \n{5}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), performanceName.Trim(), value, description.Trim());
|
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" {4} \n{5}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : "now", resource.Trim(), performanceName.Trim(), value, description.Trim());
|
||||||
else
|
else
|
||||||
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" {4} {5} {{interval={6}, unit={7}}}\n", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), performanceName.Trim(), value, description.Trim(), interval.HasValue ? interval.Value.ToString() : (object)string.Empty, unit.Trim());
|
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" {4} {5} {{interval={6}, unit={7}}}\n", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : "now", resource.Trim(), performanceName.Trim(), value, description.Trim(), interval.HasValue ? interval.Value.ToString() : string.Empty, unit.Trim());
|
||||||
}
|
}
|
||||||
else if (unit.Equals(string.Empty) && !interval.HasValue)
|
else if (unit.Equals(string.Empty) && !interval.HasValue)
|
||||||
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" \"{4}\" {5} \n{6}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), subresource.Trim(), performanceName.Trim(), value, description.Trim());
|
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" \"{4}\" {5} \n{6}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : "now", resource.Trim(), subresource.Trim(), performanceName.Trim(), value, description.Trim());
|
||||||
else
|
else
|
||||||
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" \"{4}\" {5} {6} {{interval={7}, unit={8}}}\n", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), subresource.Trim(), performanceName.Trim(), value, description.Trim(), interval.HasValue ? interval.Value.ToString() : (object)string.Empty, unit.Trim());
|
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" \"{4}\" {5} {6} {{interval={7}, unit={8}}}\n", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : "now", resource.Trim(), subresource.Trim(), performanceName.Trim(), value, description.Trim(), interval.HasValue ? interval.Value.ToString() : string.Empty, unit.Trim());
|
||||||
return stringBuilder.ToString();
|
return stringBuilder.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -38,25 +38,7 @@ stages:
|
|||||||
displayName: "Echo Check"
|
displayName: "Echo Check"
|
||||||
|
|
||||||
- script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
|
- script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
|
||||||
displayName: "Nuget Nuget Clear"
|
displayName: "Nuget Clear"
|
||||||
enabled: false
|
|
||||||
|
|
||||||
- task: CopyFiles@2
|
|
||||||
displayName: 'Copy GhostPCL Files to: D:\EAF-Mesa-Integration\copy'
|
|
||||||
inputs:
|
|
||||||
Contents: "*"
|
|
||||||
SourceFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\GhostPCL'
|
|
||||||
TargetFolder: 'D:\EAF-Mesa-Integration\copy\GhostPCL'
|
|
||||||
OverWrite: true
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
- task: CopyFiles@2
|
|
||||||
displayName: 'Copy LincPDFC Files to: D:\EAF-Mesa-Integration\copy'
|
|
||||||
inputs:
|
|
||||||
Contents: "*"
|
|
||||||
SourceFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\LincPDFC'
|
|
||||||
TargetFolder: 'D:\EAF-Mesa-Integration\copy\LincPDFC'
|
|
||||||
OverWrite: true
|
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
@ -199,25 +181,7 @@ stages:
|
|||||||
displayName: "Echo Check"
|
displayName: "Echo Check"
|
||||||
|
|
||||||
- script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
|
- script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
|
||||||
displayName: "Nuget Nuget Clear"
|
displayName: "Nuget Clear"
|
||||||
enabled: false
|
|
||||||
|
|
||||||
- task: CopyFiles@2
|
|
||||||
displayName: 'Copy GhostPCL Files to: D:\EAF-Mesa-Integration\copy'
|
|
||||||
inputs:
|
|
||||||
Contents: "*"
|
|
||||||
SourceFolder: '\\mestsa003.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\GhostPCL'
|
|
||||||
TargetFolder: 'D:\EAF-Mesa-Integration\copy\GhostPCL'
|
|
||||||
OverWrite: true
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
- task: CopyFiles@2
|
|
||||||
displayName: 'Copy LincPDFC Files to: D:\EAF-Mesa-Integration\copy'
|
|
||||||
inputs:
|
|
||||||
Contents: "*"
|
|
||||||
SourceFolder: '\\mestsa003.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\LincPDFC'
|
|
||||||
TargetFolder: 'D:\EAF-Mesa-Integration\copy\LincPDFC'
|
|
||||||
OverWrite: true
|
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
|
|||||||
@ -3,6 +3,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace Adaptation.Shared.Duplicator;
|
namespace Adaptation.Shared.Duplicator;
|
||||||
|
|
||||||
@ -178,4 +179,16 @@ public class Description : IDescription, Properties.IDescription
|
|||||||
|
|
||||||
internal static string GetDateFormat() => "MM/dd/yyyy hh:mm:ss tt";
|
internal static string GetDateFormat() => "MM/dd/yyyy hh:mm:ss tt";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)]
|
||||||
|
[JsonSerializable(typeof(Description))]
|
||||||
|
internal partial class SharedDescriptionSourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)]
|
||||||
|
[JsonSerializable(typeof(Description[]))]
|
||||||
|
internal partial class SharedDescriptionArraySourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
}
|
}
|
||||||
@ -9,7 +9,6 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
namespace Adaptation.Shared;
|
namespace Adaptation.Shared;
|
||||||
@ -383,17 +382,24 @@ public class FileRead : Properties.IFileRead
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
string[] files;
|
string[] files;
|
||||||
string logisticsSequence = _Logistics.Sequence.ToString();
|
string[] directories;
|
||||||
string[] directories = Directory.GetDirectories(jobIdDirectory, $"*{logisticsSequence}*", SearchOption.TopDirectoryOnly);
|
string logisticsSequence;
|
||||||
foreach (string directory in directories)
|
for (int i = 0; i < 10; i++)
|
||||||
{
|
{
|
||||||
files = Directory.GetFiles(directory, "*", SearchOption.TopDirectoryOnly);
|
logisticsSequence = (_Logistics.Sequence + -i).ToString();
|
||||||
if (files.Length == 0)
|
directories = Directory.GetDirectories(jobIdDirectory, $"*{logisticsSequence}*", SearchOption.TopDirectoryOnly);
|
||||||
continue;
|
foreach (string directory in directories)
|
||||||
results.Add(directory);
|
{
|
||||||
|
files = Directory.GetFiles(directory, "*", SearchOption.TopDirectoryOnly);
|
||||||
|
if (files.Length == 0)
|
||||||
|
continue;
|
||||||
|
results.Add(directory);
|
||||||
|
}
|
||||||
|
if (results.Count == 1)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((results is null) || results.Count != 1)
|
if (results.Count != 1)
|
||||||
throw new Exception("Didn't find directory by logistics sequence");
|
throw new Exception("Didn't find directory by logistics sequence");
|
||||||
return results.ToArray();
|
return results.ToArray();
|
||||||
}
|
}
|
||||||
@ -440,12 +446,13 @@ public class FileRead : Properties.IFileRead
|
|||||||
{
|
{
|
||||||
List<Properties.IDescription> results = new();
|
List<Properties.IDescription> results = new();
|
||||||
Duplicator.Description description;
|
Duplicator.Description description;
|
||||||
JsonSerializerOptions jsonSerializerOptions = new() { NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString };
|
|
||||||
foreach (JsonElement jsonElement in jsonElements)
|
foreach (JsonElement jsonElement in jsonElements)
|
||||||
{
|
{
|
||||||
if (jsonElement.ValueKind != JsonValueKind.Object)
|
if (jsonElement.ValueKind != JsonValueKind.Object)
|
||||||
throw new Exception();
|
throw new Exception();
|
||||||
description = JsonSerializer.Deserialize<Duplicator.Description>(jsonElement.ToString(), jsonSerializerOptions);
|
description = JsonSerializer.Deserialize(jsonElement.ToString(), Duplicator.SharedDescriptionSourceGenerationContext.Default.Description);
|
||||||
|
if (description is null)
|
||||||
|
continue;
|
||||||
results.Add(description);
|
results.Add(description);
|
||||||
}
|
}
|
||||||
return results;
|
return results;
|
||||||
@ -478,27 +485,14 @@ public class FileRead : Properties.IFileRead
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void WritePDSF(IFileRead fileRead, JsonElement[] jsonElements)
|
protected static void WritePDSF(IFileRead fileRead, JsonElement[] jsonElements)
|
||||||
{
|
{
|
||||||
string directory;
|
#pragma warning disable CA1510
|
||||||
string day = $"{_Logistics.DateTimeFromSequence:yyyy-MM-dd}";
|
if (fileRead is null)
|
||||||
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
throw new ArgumentNullException(nameof(fileRead));
|
||||||
string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}";
|
if (jsonElements is null)
|
||||||
if (!_CellInstanceConnectionName.StartsWith(_CellInstanceName) && _CellInstanceConnectionNameBase == _EquipmentType)
|
throw new ArgumentNullException(nameof(jsonElements));
|
||||||
directory = Path.Combine(_TracePath, _EquipmentType, "Target", weekDirectory, day, _CellInstanceName, _CellInstanceConnectionName);
|
#pragma warning restore CA1510
|
||||||
else
|
|
||||||
directory = Path.Combine(_TracePath, _EquipmentType, "Source", weekDirectory, day, _CellInstanceName, _CellInstanceConnectionName);
|
|
||||||
if (!Directory.Exists(directory))
|
|
||||||
_ = Directory.CreateDirectory(directory);
|
|
||||||
string file = Path.Combine(directory, string.Concat(_Logistics.MesEntity, "_", _Logistics.Sequence, ".ipdsf"));
|
|
||||||
string lines = ProcessDataStandardFormat.GetPDSFText(fileRead, _Logistics, jsonElements, logisticsText: string.Empty);
|
|
||||||
File.WriteAllText(file, lines);
|
|
||||||
if (_Logistics.TotalSecondsSinceLastWriteTimeFromSequence > 600)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{ File.SetLastWriteTime(file, _Logistics.DateTimeFromSequence); }
|
|
||||||
catch (Exception) { }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void WaitForThread(Thread thread, List<Exception> threadExceptions)
|
protected void WaitForThread(Thread thread, List<Exception> threadExceptions)
|
||||||
|
|||||||
@ -48,6 +48,41 @@ public partial class WS
|
|||||||
return new(resultsJson, wsResults);
|
return new(resultsJson, wsResults);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static (string, Results) SendData(string url, long sequence, string directory, string json, int timeoutSeconds = 120)
|
||||||
|
{
|
||||||
|
Results? wsResults = null;
|
||||||
|
string resultsJson = string.Empty;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(url) || !url.Contains(":") || !url.Contains("."))
|
||||||
|
throw new Exception("Invalid URL");
|
||||||
|
using (HttpClient httpClient = new())
|
||||||
|
{
|
||||||
|
httpClient.Timeout = new TimeSpan(0, 0, 0, timeoutSeconds, 0);
|
||||||
|
HttpRequestMessage httpRequestMessage = new()
|
||||||
|
{
|
||||||
|
RequestUri = new Uri(url),
|
||||||
|
Method = HttpMethod.Post,
|
||||||
|
Content = new StringContent(json, Encoding.UTF8, "application/json")
|
||||||
|
};
|
||||||
|
HttpResponseMessage httpResponseMessage = httpClient.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseContentRead).Result;
|
||||||
|
resultsJson = httpResponseMessage.Content.ReadAsStringAsync().Result;
|
||||||
|
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 (wsResults.Success is null || !wsResults.Success.Value)
|
||||||
|
wsResults.Errors?.Add(wsResults.ToString());
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{ wsResults ??= Results.Get(resultsJson, e); }
|
||||||
|
return new(resultsJson, wsResults);
|
||||||
|
}
|
||||||
|
|
||||||
public static void AttachFile(string url, Attachment attachment, int timeoutSeconds = 60)
|
public static void AttachFile(string url, Attachment attachment, int timeoutSeconds = 60)
|
||||||
{
|
{
|
||||||
using HttpClient httpClient = new();
|
using HttpClient httpClient = new();
|
||||||
|
|||||||
@ -2,12 +2,14 @@ using Adaptation.Shared.Methods;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace Adaptation.Shared;
|
namespace Adaptation.Shared;
|
||||||
|
|
||||||
@ -185,7 +187,7 @@ internal class ProcessDataStandardFormat
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
string? linesOne = lines.Length > 0 && body.Count == 0 && columns.Count == 0 ? lines[1] : null;
|
string? linesOne = lines.Length > 1 && body.Count == 0 && columns.Count == 0 ? lines[1] : null;
|
||||||
logistics = GetLogistics(footer, linesOne: linesOne);
|
logistics = GetLogistics(footer, linesOne: linesOne);
|
||||||
if (logistics.Count == 0)
|
if (logistics.Count == 0)
|
||||||
sequence = null;
|
sequence = null;
|
||||||
@ -227,19 +229,19 @@ internal class ProcessDataStandardFormat
|
|||||||
return results.AsReadOnly();
|
return results.AsReadOnly();
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static ProcessDataStandardFormat GetProcessDataStandardFormat(string reportFullPath, ProcessDataStandardFormatMapping pdsfMapping)
|
internal static ProcessDataStandardFormat GetProcessDataStandardFormat(string reportFullPath, ProcessDataStandardFormatMapping processDataStandardFormatMapping)
|
||||||
{
|
{
|
||||||
ProcessDataStandardFormat result;
|
ProcessDataStandardFormat result;
|
||||||
const int columnsLine = 6;
|
const int columnsLine = 6;
|
||||||
FileInfo fileInfo = new(reportFullPath);
|
FileInfo fileInfo = new(reportFullPath);
|
||||||
ProcessDataStandardFormat processDataStandardFormat = GetProcessDataStandardFormat(fileInfo.LastWriteTime, columnsLine, fileInfo.FullName, lines: null);
|
ProcessDataStandardFormat processDataStandardFormat = GetProcessDataStandardFormat(fileInfo.LastWriteTime, columnsLine, fileInfo.FullName, lines: null);
|
||||||
JsonElement[]? jsonElements = pdsfMapping.OldColumnNames.Count != pdsfMapping.ColumnIndices.Count ? null : GetFullArray(processDataStandardFormat);
|
JsonElement[]? jsonElements = processDataStandardFormatMapping.OldColumnNames.Count == 0 ? null : GetFullArray(processDataStandardFormat);
|
||||||
JsonProperty[]? jsonProperties = jsonElements is null || jsonElements.Length == 0 ? null : jsonElements[0].EnumerateObject().ToArray();
|
JsonProperty[]? jsonProperties = jsonElements is null || jsonElements.Length == 0 ? null : jsonElements[0].EnumerateObject().ToArray();
|
||||||
if (jsonElements is null || jsonProperties is null || jsonProperties.Length != pdsfMapping.NewColumnNames.Count)
|
if (jsonElements is null || jsonProperties is null || jsonProperties.Length != processDataStandardFormatMapping.NewColumnNames.Count)
|
||||||
result = processDataStandardFormat;
|
result = processDataStandardFormat;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
result = GetProcessDataStandardFormat(pdsfMapping, jsonElements, processDataStandardFormat);
|
result = GetProcessDataStandardFormat(processDataStandardFormatMapping, jsonElements, processDataStandardFormat);
|
||||||
if (result.Sequence is null || result.Columns.Count == 0 || result.Body.Count == 0 || result.Logistics.Count == 0)
|
if (result.Sequence is null || result.Columns.Count == 0 || result.Body.Count == 0 || result.Logistics.Count == 0)
|
||||||
result = processDataStandardFormat;
|
result = processDataStandardFormat;
|
||||||
}
|
}
|
||||||
@ -335,12 +337,14 @@ internal class ProcessDataStandardFormat
|
|||||||
int column;
|
int column;
|
||||||
string value;
|
string value;
|
||||||
JsonProperty jsonProperty;
|
JsonProperty jsonProperty;
|
||||||
|
List<string> debug = new();
|
||||||
List<string> values = new();
|
List<string> values = new();
|
||||||
List<string> results = new();
|
List<string> results = new();
|
||||||
JsonProperty[] jsonProperties;
|
JsonProperty[] jsonProperties;
|
||||||
List<string> unknownColumns = new();
|
List<string> unknownColumns = new();
|
||||||
for (int i = 0; i < jsonElements.Length; i++)
|
for (int i = 0; i < jsonElements.Length; i++)
|
||||||
{
|
{
|
||||||
|
debug.Clear();
|
||||||
values.Clear();
|
values.Clear();
|
||||||
if (jsonElements[i].ValueKind != JsonValueKind.Object)
|
if (jsonElements[i].ValueKind != JsonValueKind.Object)
|
||||||
{
|
{
|
||||||
@ -354,16 +358,22 @@ internal class ProcessDataStandardFormat
|
|||||||
{
|
{
|
||||||
column = processDataStandardFormatMapping.ColumnIndices[c];
|
column = processDataStandardFormatMapping.ColumnIndices[c];
|
||||||
if (column == -1)
|
if (column == -1)
|
||||||
|
{
|
||||||
value = processDataStandardFormatMapping.OldColumnNames[c];
|
value = processDataStandardFormatMapping.OldColumnNames[c];
|
||||||
|
debug.Add($"<Item C=-01 Name=\"{value}\" DataType=\"8\" XmlType=\"1\" XPath=\"//records/record/{value}\" />");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
jsonProperty = jsonProperties[column];
|
jsonProperty = jsonProperties[column];
|
||||||
value = jsonProperty.Value.ToString();
|
value = jsonProperty.Value.ToString();
|
||||||
|
debug.Add($"<Item C={column + 2:000} Name=\"{processDataStandardFormatMapping.OldColumnNames[c]}\" DataType=\"8\" XmlType=\"1\" XPath=\"//records/record/{jsonProperty.Name}\" />");
|
||||||
}
|
}
|
||||||
values.Add(value);
|
values.Add(value);
|
||||||
}
|
}
|
||||||
results.Add(string.Join("\t", values));
|
results.Add(string.Join("\t", values));
|
||||||
}
|
}
|
||||||
|
if (Debugger.IsAttached)
|
||||||
|
File.WriteAllText("../../.txt", string.Join(Environment.NewLine, debug.OrderBy(l => l)));
|
||||||
result = new(body: new(results),
|
result = new(body: new(results),
|
||||||
columns: processDataStandardFormatMapping.OldColumnNames,
|
columns: processDataStandardFormatMapping.OldColumnNames,
|
||||||
footer: processDataStandardFormat.Footer,
|
footer: processDataStandardFormat.Footer,
|
||||||
@ -378,7 +388,6 @@ internal class ProcessDataStandardFormat
|
|||||||
{
|
{
|
||||||
if (processDataStandardFormat.InputPDSF is null)
|
if (processDataStandardFormat.InputPDSF is null)
|
||||||
throw new NullReferenceException(nameof(processDataStandardFormat.InputPDSF));
|
throw new NullReferenceException(nameof(processDataStandardFormat.InputPDSF));
|
||||||
#pragma warning disable CA1845, IDE0057
|
|
||||||
string result;
|
string result;
|
||||||
string line;
|
string line;
|
||||||
string value;
|
string value;
|
||||||
@ -398,13 +407,21 @@ internal class ProcessDataStandardFormat
|
|||||||
line = string.Concat(line.Substring(0, line.Length - 1), '}');
|
line = string.Concat(line.Substring(0, line.Length - 1), '}');
|
||||||
lines.Add(line);
|
lines.Add(line);
|
||||||
}
|
}
|
||||||
|
string? json = null;
|
||||||
|
if (processDataStandardFormat.Footer is not null && processDataStandardFormat.Footer.Count > 0)
|
||||||
|
{
|
||||||
|
Dictionary<string, string> footerKeyValuePairs = GetFooterKeyValuePairs(processDataStandardFormat.Footer);
|
||||||
|
Dictionary<string, Dictionary<string, string>> logisticKeyValuePairs = GetLogisticKeyValuePairs(processDataStandardFormat.Footer, footerKeyValuePairs);
|
||||||
|
json = JsonSerializer.Serialize(logisticKeyValuePairs, DictionaryStringDictionaryStringStringSourceGenerationContext.Default.DictionaryStringDictionaryStringString);
|
||||||
|
}
|
||||||
|
string footerText = string.IsNullOrEmpty(json) || json == "{}" ? string.Empty : $",{Environment.NewLine}\"PDSF\":{Environment.NewLine}{json}";
|
||||||
result = string.Concat(
|
result = string.Concat(
|
||||||
'{',
|
'{',
|
||||||
Environment.NewLine,
|
Environment.NewLine,
|
||||||
'"',
|
'"',
|
||||||
"Count",
|
"Count",
|
||||||
'"',
|
'"',
|
||||||
": ",
|
": ",
|
||||||
processDataStandardFormat.Body.Count,
|
processDataStandardFormat.Body.Count,
|
||||||
',',
|
',',
|
||||||
Environment.NewLine,
|
Environment.NewLine,
|
||||||
@ -423,17 +440,95 @@ internal class ProcessDataStandardFormat
|
|||||||
'"',
|
'"',
|
||||||
"Sequence",
|
"Sequence",
|
||||||
'"',
|
'"',
|
||||||
": ",
|
": ",
|
||||||
processDataStandardFormat.Sequence,
|
processDataStandardFormat.Sequence,
|
||||||
Environment.NewLine,
|
Environment.NewLine,
|
||||||
|
footerText,
|
||||||
|
Environment.NewLine,
|
||||||
'}');
|
'}');
|
||||||
return result;
|
return result;
|
||||||
#pragma warning restore CA1845, IDE0057
|
}
|
||||||
|
|
||||||
|
private static Dictionary<string, string> GetFooterKeyValuePairs(ReadOnlyCollection<string> footerLines)
|
||||||
|
{
|
||||||
|
Dictionary<string, string> results = new();
|
||||||
|
string[] segments;
|
||||||
|
foreach (string footerLine in footerLines)
|
||||||
|
{
|
||||||
|
segments = footerLine.Split('\t');
|
||||||
|
if (segments.Length != 2 || string.IsNullOrEmpty(segments[1].Trim()))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (segments[1].Contains(';'))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (results.ContainsKey(segments[0]))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
results.Add(segments[0], segments[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Dictionary<string, Dictionary<string, string>> GetLogisticKeyValuePairs(ReadOnlyCollection<string> footerLines, Dictionary<string, string> footerKeyValuePairs)
|
||||||
|
{
|
||||||
|
Dictionary<string, Dictionary<string, string>> results = new();
|
||||||
|
string[] segments;
|
||||||
|
string[] subSegments;
|
||||||
|
string[] subSubSegments;
|
||||||
|
Dictionary<string, string>? keyValue;
|
||||||
|
results.Add("Footer", footerKeyValuePairs);
|
||||||
|
foreach (string footerLine in footerLines)
|
||||||
|
{
|
||||||
|
segments = footerLine.Split('\t');
|
||||||
|
if (segments.Length != 2 || string.IsNullOrEmpty(segments[1].Trim()))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!segments[1].Contains(';') || !segments[1].Contains('='))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
subSegments = segments[1].Split(';');
|
||||||
|
if (subSegments.Length < 1)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!results.TryGetValue(segments[0], out keyValue))
|
||||||
|
{
|
||||||
|
results.Add(segments[0], new());
|
||||||
|
if (!results.TryGetValue(segments[0], out keyValue))
|
||||||
|
{
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
foreach (string segment in subSegments)
|
||||||
|
{
|
||||||
|
subSubSegments = segment.Split('=');
|
||||||
|
if (subSubSegments.Length != 2)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
keyValue.Add(subSubSegments[0], subSubSegments[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void Write(string path, ProcessDataStandardFormat processDataStandardFormat, List<Metrology.WS.Results>? wsResults)
|
internal static void Write(string path, ProcessDataStandardFormat processDataStandardFormat, List<Metrology.WS.Results>? wsResults)
|
||||||
{
|
{
|
||||||
List<string> results = new();
|
List<string> results = new();
|
||||||
|
if (processDataStandardFormat.InputPDSF is null)
|
||||||
|
throw new NullReferenceException(nameof(processDataStandardFormat.InputPDSF));
|
||||||
if (processDataStandardFormat.Sequence is null)
|
if (processDataStandardFormat.Sequence is null)
|
||||||
throw new NullReferenceException(nameof(processDataStandardFormat.Sequence));
|
throw new NullReferenceException(nameof(processDataStandardFormat.Sequence));
|
||||||
string endOffset = "E#######T";
|
string endOffset = "E#######T";
|
||||||
@ -471,25 +566,25 @@ internal class ProcessDataStandardFormat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
results.Add("END_HEADER");
|
results.Add("END_HEADER");
|
||||||
if (processDataStandardFormat.InputPDSF is not null)
|
results.Add(string.Empty);
|
||||||
{
|
List<char> hyphens = new();
|
||||||
results.Add(string.Empty);
|
results.AddRange(processDataStandardFormat.InputPDSF.Header.Select(l => $"|{l.Replace('\t', '|')}|"));
|
||||||
List<char> hyphens = new();
|
results.Add(string.Empty);
|
||||||
results.AddRange(processDataStandardFormat.InputPDSF.Header.Select(l => l.Replace('\t', '|')));
|
results.Add($"|{string.Join("|", processDataStandardFormat.InputPDSF.Columns)}|");
|
||||||
results.Add(string.Empty);
|
for (int i = 0; i < processDataStandardFormat.InputPDSF.Columns.Count; i++)
|
||||||
results.Add($"|{string.Join("|", processDataStandardFormat.InputPDSF.Columns)}|");
|
hyphens.Add('-');
|
||||||
for (int i = 0; i < processDataStandardFormat.InputPDSF.Columns.Count; i++)
|
results.Add($"|{string.Join("|", hyphens)}|");
|
||||||
hyphens.Add('-');
|
results.AddRange(processDataStandardFormat.InputPDSF.Body.Select(l => $"|{l.Replace('\t', '|')}|"));
|
||||||
results.Add($"|{string.Join("|", hyphens)}|");
|
results.Add(string.Empty);
|
||||||
results.AddRange(processDataStandardFormat.InputPDSF.Body.Select(l => l.Replace('\t', '|')));
|
results.AddRange(processDataStandardFormat.InputPDSF.Footer.Select(l => $"|{l.Replace('\t', '|')}|"));
|
||||||
results.Add(string.Empty);
|
results.Add(string.Empty);
|
||||||
results.AddRange(processDataStandardFormat.InputPDSF.Footer.Select(l => l.Replace('\t', '|')));
|
string xml = GetXml(processDataStandardFormat);
|
||||||
results.Add(string.Empty);
|
results.Add(xml);
|
||||||
results.Add("EOF");
|
results.Add(string.Empty);
|
||||||
results.Add(string.Empty);
|
results.Add("EOF");
|
||||||
string json = GetJson(processDataStandardFormat);
|
results.Add(string.Empty);
|
||||||
results.Add(json);
|
string json = GetJson(processDataStandardFormat);
|
||||||
}
|
results.Add(json);
|
||||||
File.WriteAllText(path, string.Join(Environment.NewLine, results));
|
File.WriteAllText(path, string.Join(Environment.NewLine, results));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -559,6 +654,17 @@ internal class ProcessDataStandardFormat
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static JsonElement[] GetArray(string reportFullPath, string[] lines, ProcessDataStandardFormat processDataStandardFormat)
|
||||||
|
{
|
||||||
|
JsonElement[] results;
|
||||||
|
string? json = GetRecordsJson(reportFullPath, lines);
|
||||||
|
if (string.IsNullOrEmpty(json))
|
||||||
|
results = GetArray(processDataStandardFormat);
|
||||||
|
else
|
||||||
|
results = JsonSerializer.Deserialize(json, JsonElementCollectionSourceGenerationContext.Default.JsonElementArray) ?? throw new Exception();
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
internal static string GetPDSFText(IFileRead fileRead, Logistics logistics, JsonElement[] jsonElements, string logisticsText)
|
internal static string GetPDSFText(IFileRead fileRead, Logistics logistics, JsonElement[] jsonElements, string logisticsText)
|
||||||
{
|
{
|
||||||
string result;
|
string result;
|
||||||
@ -771,10 +877,126 @@ internal class ProcessDataStandardFormat
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static string GetXml(ProcessDataStandardFormat processDataStandardFormat)
|
||||||
|
{
|
||||||
|
string result;
|
||||||
|
string tag;
|
||||||
|
string value;
|
||||||
|
string[] segments;
|
||||||
|
List<string> values;
|
||||||
|
Dictionary<string, List<string>> results = new();
|
||||||
|
ReadOnlyCollection<string> body = processDataStandardFormat.InputPDSF is null ?
|
||||||
|
processDataStandardFormat.Body : processDataStandardFormat.InputPDSF.Body;
|
||||||
|
ReadOnlyCollection<string> columns = processDataStandardFormat.InputPDSF is null ?
|
||||||
|
processDataStandardFormat.Columns : processDataStandardFormat.InputPDSF.Columns;
|
||||||
|
List<string> lines = new() { "<?xml version=\"1.0\" encoding=\"UTF-8\"?>", "<records>" };
|
||||||
|
for (int i = 0; i < body.Count; i++)
|
||||||
|
{
|
||||||
|
segments = body[i].Trim().Split('\t');
|
||||||
|
if (segments.Length != columns.Count)
|
||||||
|
break;
|
||||||
|
for (int c = 0; c < segments.Length; c++)
|
||||||
|
{
|
||||||
|
value = segments[c].Replace("&", "&")
|
||||||
|
.Replace("<", "<")
|
||||||
|
.Replace(">", ">")
|
||||||
|
.Replace("\"", """)
|
||||||
|
.Replace("'", "'");
|
||||||
|
tag = Regex.Replace(columns[c].Trim('"'), @"[^a-zA-Z0-9]", "_").Split('\r')[0].Split('\n')[0];
|
||||||
|
if (i == 0)
|
||||||
|
{
|
||||||
|
if (results.ContainsKey(tag))
|
||||||
|
continue;
|
||||||
|
results.Add(tag, new List<string>());
|
||||||
|
}
|
||||||
|
results[tag].Add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
foreach (KeyValuePair<string, List<string>> keyValuePair in results)
|
||||||
|
{
|
||||||
|
if (body.Count < 2)
|
||||||
|
break;
|
||||||
|
if (keyValuePair.Value.Count != body.Count)
|
||||||
|
continue;
|
||||||
|
values = keyValuePair.Value.Distinct().ToList();
|
||||||
|
if (values.Count == 2 && (string.IsNullOrEmpty(values[0]) || string.IsNullOrEmpty(values[1])))
|
||||||
|
{
|
||||||
|
for (int i = 0; i < body.Count; i++)
|
||||||
|
keyValuePair.Value[i] = string.Empty;
|
||||||
|
foreach (string v in values)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(v))
|
||||||
|
continue;
|
||||||
|
keyValuePair.Value[0] = v;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (int i = 0; i < body.Count; i++)
|
||||||
|
{
|
||||||
|
lines.Add(" <record>");
|
||||||
|
foreach (KeyValuePair<string, List<string>> keyValuePair in results)
|
||||||
|
{
|
||||||
|
if (keyValuePair.Value.Count != body.Count)
|
||||||
|
continue;
|
||||||
|
lines.Add(string.Concat(" <", keyValuePair.Key, '>', keyValuePair.Value[i], "</", keyValuePair.Key, '>'));
|
||||||
|
}
|
||||||
|
lines.Add(" </record>");
|
||||||
|
}
|
||||||
|
lines.Add("</records>");
|
||||||
|
result = string.Join(Environment.NewLine, lines);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static string GetXml(string reportFullPath, string[]? lines = null)
|
||||||
|
{
|
||||||
|
string result;
|
||||||
|
bool foundXml = false;
|
||||||
|
List<string> results = new();
|
||||||
|
lines ??= File.ReadAllLines(reportFullPath);
|
||||||
|
foreach (string line in lines)
|
||||||
|
{
|
||||||
|
if (line.StartsWith("<?xml"))
|
||||||
|
foundXml = true;
|
||||||
|
if (!foundXml)
|
||||||
|
continue;
|
||||||
|
if (line.StartsWith("EOF"))
|
||||||
|
break;
|
||||||
|
results.Add(line);
|
||||||
|
}
|
||||||
|
result = string.Join(Environment.NewLine, results);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string? GetRecordsJson(string reportFullPath, string[] lines)
|
||||||
|
{
|
||||||
|
string? result;
|
||||||
|
bool foundRecords = false;
|
||||||
|
List<string> results = new();
|
||||||
|
lines ??= File.ReadAllLines(reportFullPath);
|
||||||
|
foreach (string line in lines)
|
||||||
|
{
|
||||||
|
if (line.StartsWith("\"Records\""))
|
||||||
|
foundRecords = true;
|
||||||
|
if (!foundRecords)
|
||||||
|
continue;
|
||||||
|
if (line == "],")
|
||||||
|
break;
|
||||||
|
results.Add(line);
|
||||||
|
}
|
||||||
|
result = results.Count == 0 ? null : $"{string.Join(Environment.NewLine, results.Skip(1))}{Environment.NewLine}]";
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
[JsonSerializable(typeof(JsonElement[]))]
|
[JsonSerializable(typeof(JsonElement[]))]
|
||||||
internal partial class JsonElementCollectionSourceGenerationContext : JsonSerializerContext
|
internal partial class JsonElementCollectionSourceGenerationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)]
|
||||||
|
[JsonSerializable(typeof(Dictionary<string, Dictionary<string, string>>))]
|
||||||
|
internal partial class DictionaryStringDictionaryStringStringSourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
}
|
}
|
||||||
@ -1,33 +1,34 @@
|
|||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace Adaptation.Shared;
|
namespace Adaptation.Shared;
|
||||||
|
|
||||||
public class ProcessDataStandardFormatMapping
|
public class ProcessDataStandardFormatMapping
|
||||||
{
|
{
|
||||||
|
|
||||||
public ReadOnlyCollection<string> BackfillColumns { get; private set; }
|
|
||||||
public ReadOnlyCollection<int> ColumnIndices { 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> NewColumnNames { get; private set; }
|
||||||
public ReadOnlyCollection<string> OldColumnNames { get; private set; }
|
public ReadOnlyCollection<string> OldColumnNames { get; private set; }
|
||||||
|
|
||||||
public ProcessDataStandardFormatMapping(ReadOnlyCollection<string> backfillColumns,
|
public ProcessDataStandardFormatMapping(ReadOnlyCollection<int> columnIndices,
|
||||||
ReadOnlyCollection<int> columnIndices,
|
|
||||||
ReadOnlyCollection<string> ignoreColumns,
|
|
||||||
ReadOnlyCollection<string> indexOnlyColumns,
|
|
||||||
ReadOnlyDictionary<string, string> keyValuePairs,
|
|
||||||
ReadOnlyCollection<string> newColumnNames,
|
ReadOnlyCollection<string> newColumnNames,
|
||||||
ReadOnlyCollection<string> oldColumnNames)
|
ReadOnlyCollection<string> oldColumnNames)
|
||||||
{
|
{
|
||||||
BackfillColumns = backfillColumns;
|
|
||||||
ColumnIndices = columnIndices;
|
ColumnIndices = columnIndices;
|
||||||
IgnoreColumns = ignoreColumns;
|
|
||||||
IndexOnlyColumns = indexOnlyColumns;
|
|
||||||
KeyValuePairs = keyValuePairs;
|
|
||||||
NewColumnNames = newColumnNames;
|
NewColumnNames = newColumnNames;
|
||||||
OldColumnNames = oldColumnNames;
|
OldColumnNames = oldColumnNames;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static ProcessDataStandardFormatMapping Get(string processDataStandardFormatMappingOldColumnNames, string processDataStandardFormatMappingNewColumnNames, string processDataStandardFormatMappingColumnIndices)
|
||||||
|
{
|
||||||
|
ProcessDataStandardFormatMapping result;
|
||||||
|
ReadOnlyCollection<string> newColumnNames = new(processDataStandardFormatMappingNewColumnNames.Split(','));
|
||||||
|
ReadOnlyCollection<string> oldColumnNames = new(processDataStandardFormatMappingOldColumnNames.Split(','));
|
||||||
|
ReadOnlyCollection<int> columnIndices = new(processDataStandardFormatMappingColumnIndices.Split(',').Select(int.Parse).ToArray());
|
||||||
|
result = new(columnIndices: columnIndices,
|
||||||
|
newColumnNames: newColumnNames,
|
||||||
|
oldColumnNames: oldColumnNames);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
#if true
|
#if v2_60_0
|
||||||
using Adaptation._Tests.Shared;
|
using Adaptation._Tests.Shared;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#if true
|
#if v2_60_0
|
||||||
using Adaptation._Tests.Shared;
|
using Adaptation._Tests.Shared;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#if true
|
#if v2_60_0
|
||||||
using Adaptation._Tests.Shared;
|
using Adaptation._Tests.Shared;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#if true
|
#if v2_60_0
|
||||||
using Adaptation._Tests.Shared;
|
using Adaptation._Tests.Shared;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#if true
|
#if v2_60_0
|
||||||
using Adaptation._Tests.Shared;
|
using Adaptation._Tests.Shared;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#if true
|
#if v2_60_0
|
||||||
using Adaptation._Tests.Shared;
|
using Adaptation._Tests.Shared;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
|||||||
@ -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_61_1;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class CDE4 : EAFLoggingUnitTesting
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
internal static string DummyRoot { get; private set; }
|
||||||
|
internal static CDE4 EAFLoggingUnitTesting { get; private set; }
|
||||||
|
|
||||||
|
static CDE4() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
|
||||||
|
|
||||||
|
public CDE4() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
if (EAFLoggingUnitTesting is null)
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
|
||||||
|
public CDE4(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
EAFLoggingUnitTesting ??= new CDE4(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_61_1__CDE4__RsM()
|
||||||
|
{
|
||||||
|
string check = "*.RsM";
|
||||||
|
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
|
||||||
@ -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_61_1;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class CDE5_EQPT : EAFLoggingUnitTesting
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
internal static string DummyRoot { get; private set; }
|
||||||
|
internal static CDE5_EQPT EAFLoggingUnitTesting { get; private set; }
|
||||||
|
|
||||||
|
static CDE5_EQPT() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
|
||||||
|
|
||||||
|
public CDE5_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
if (EAFLoggingUnitTesting is null)
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
|
||||||
|
public CDE5_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
EAFLoggingUnitTesting ??= new CDE5_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();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_61_1__CDE5_EQPT__DownloadRsMFile()
|
||||||
|
{
|
||||||
|
string check = "CDE_Logs|WaferMeasurementData.log|.RsM";
|
||||||
|
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
|
||||||
@ -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_61_1;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class CDE5 : EAFLoggingUnitTesting
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
internal static string DummyRoot { get; private set; }
|
||||||
|
internal static CDE5 EAFLoggingUnitTesting { get; private set; }
|
||||||
|
|
||||||
|
static CDE5() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
|
||||||
|
|
||||||
|
public CDE5() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
if (EAFLoggingUnitTesting is null)
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
|
||||||
|
public CDE5(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
EAFLoggingUnitTesting ??= new CDE5(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_61_1__CDE5__RsM()
|
||||||
|
{
|
||||||
|
string check = "*.RsM";
|
||||||
|
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
|
||||||
@ -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_61_1;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class CDE6_EQPT : EAFLoggingUnitTesting
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
internal static string DummyRoot { get; private set; }
|
||||||
|
internal static CDE6_EQPT EAFLoggingUnitTesting { get; private set; }
|
||||||
|
|
||||||
|
static CDE6_EQPT() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
|
||||||
|
|
||||||
|
public CDE6_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
if (EAFLoggingUnitTesting is null)
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
|
||||||
|
public CDE6_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
EAFLoggingUnitTesting ??= new CDE6_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();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_61_1__CDE6_EQPT__DownloadRsMFile()
|
||||||
|
{
|
||||||
|
string check = "CDE_Logs|WaferMeasurementData.log|.RsM";
|
||||||
|
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
|
||||||
@ -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_61_1;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class CDE6 : EAFLoggingUnitTesting
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
internal static string DummyRoot { get; private set; }
|
||||||
|
internal static CDE6 EAFLoggingUnitTesting { get; private set; }
|
||||||
|
|
||||||
|
static CDE6() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
|
||||||
|
|
||||||
|
public CDE6() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
if (EAFLoggingUnitTesting is null)
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
|
||||||
|
public CDE6(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
EAFLoggingUnitTesting ??= new CDE6(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_61_1__CDE6__RsM()
|
||||||
|
{
|
||||||
|
string check = "*.RsM";
|
||||||
|
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
|
||||||
@ -0,0 +1,182 @@
|
|||||||
|
#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_61_1;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class MET08RESIMAPCDE : EAFLoggingUnitTesting
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
internal static string DummyRoot { get; private set; }
|
||||||
|
internal static MET08RESIMAPCDE EAFLoggingUnitTesting { get; private set; }
|
||||||
|
|
||||||
|
static MET08RESIMAPCDE() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
|
||||||
|
|
||||||
|
public MET08RESIMAPCDE() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
if (EAFLoggingUnitTesting is null)
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
|
||||||
|
public MET08RESIMAPCDE(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
EAFLoggingUnitTesting ??= new MET08RESIMAPCDE(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_61_1__MET08RESIMAPCDE__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_61_1__MET08RESIMAPCDE__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_61_1__MET08RESIMAPCDE__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_61_1__MET08RESIMAPCDE__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_61_1__MET08RESIMAPCDE__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_61_1__MET08RESIMAPCDE__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_61_1__MET08RESIMAPCDE__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_61_1__MET08RESIMAPCDE__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_61_1__MET08RESIMAPCDE__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_61_1__MET08RESIMAPCDE__Dummy()
|
||||||
|
{
|
||||||
|
string check = "637400762024374000.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"));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@ -1,4 +1,4 @@
|
|||||||
#if true
|
#if v2_60_0
|
||||||
using Adaptation.Shared;
|
using Adaptation.Shared;
|
||||||
using Adaptation.Shared.Methods;
|
using Adaptation.Shared.Methods;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#if true
|
#if v2_60_0
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
|
||||||
namespace Adaptation._Tests.Extract.Production.v2_60_0;
|
namespace Adaptation._Tests.Extract.Production.v2_60_0;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#if true
|
#if v2_60_0
|
||||||
using Adaptation.Shared;
|
using Adaptation.Shared;
|
||||||
using Adaptation.Shared.Methods;
|
using Adaptation.Shared.Methods;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#if true
|
#if v2_60_0
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#if true
|
#if v2_60_0
|
||||||
using Adaptation.Shared;
|
using Adaptation.Shared;
|
||||||
using Adaptation.Shared.Methods;
|
using Adaptation.Shared.Methods;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#if true
|
#if v2_60_0
|
||||||
using Adaptation._Tests.Shared;
|
using Adaptation._Tests.Shared;
|
||||||
using Adaptation.Shared;
|
using Adaptation.Shared;
|
||||||
using Adaptation.Shared.Methods;
|
using Adaptation.Shared.Methods;
|
||||||
|
|||||||
54
Adaptation/_Tests/Extract/Production/v2.61.1/CDE4.cs
Normal file
54
Adaptation/_Tests/Extract/Production/v2.61.1/CDE4.cs
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
#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_61_1;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class CDE4
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
private static CreateSelfDescription.Production.v2_61_1.CDE4 _CDE4;
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
CreateSelfDescription.Production.v2_61_1.CDE4.ClassInitialize(testContext);
|
||||||
|
_CDE4 = CreateSelfDescription.Production.v2_61_1.CDE4.EAFLoggingUnitTesting;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_61_1__CDE4__RsM() => _CDE4.Production__v2_61_1__CDE4__RsM();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_61_1__CDE4__RsM637919422210000000__Normal()
|
||||||
|
{
|
||||||
|
DateTime dateTime;
|
||||||
|
string check = "*.RsM";
|
||||||
|
_CDE4.Production__v2_61_1__CDE4__RsM();
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
string[] variables = _CDE4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
|
||||||
|
IFileRead fileRead = _CDE4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||||
|
Logistics logistics = new(fileRead);
|
||||||
|
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF: false);
|
||||||
|
dateTime = FileHandlers.RsM.ProcessData.GetDateTime(logistics, string.Empty);
|
||||||
|
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
|
||||||
|
dateTime = FileHandlers.RsM.ProcessData.GetDateTime(logistics, "00:13 09/27/38");
|
||||||
|
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
||||||
29
Adaptation/_Tests/Extract/Production/v2.61.1/CDE5-EQPT.cs
Normal file
29
Adaptation/_Tests/Extract/Production/v2.61.1/CDE5-EQPT.cs
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#if true
|
||||||
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
|
||||||
|
namespace Adaptation._Tests.Extract.Production.v2_61_1;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class CDE5_EQPT
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
private static CreateSelfDescription.Production.v2_61_1.CDE5_EQPT _CDE5_EQPT;
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
CreateSelfDescription.Production.v2_61_1.CDE5_EQPT.ClassInitialize(testContext);
|
||||||
|
_CDE5_EQPT = CreateSelfDescription.Production.v2_61_1.CDE5_EQPT.EAFLoggingUnitTesting;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_61_1__CDE5_EQPT__DownloadRsMFile() => _CDE5_EQPT.Production__v2_61_1__CDE5_EQPT__DownloadRsMFile();
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
||||||
82
Adaptation/_Tests/Extract/Production/v2.61.1/CDE5.cs
Normal file
82
Adaptation/_Tests/Extract/Production/v2.61.1/CDE5.cs
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
#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_61_1;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class CDE5
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
private static CreateSelfDescription.Production.v2_61_1.CDE5 _CDE5;
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
CreateSelfDescription.Production.v2_61_1.CDE5.ClassInitialize(testContext);
|
||||||
|
_CDE5 = CreateSelfDescription.Production.v2_61_1.CDE5.EAFLoggingUnitTesting;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void NonThrowTryCatch()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{ throw new Exception(); }
|
||||||
|
catch (Exception) { }
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_61_1__CDE5__RsM() => _CDE5.Production__v2_61_1__CDE5__RsM();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_61_1__CDE5__RsM637952212190000000__Normal()
|
||||||
|
{
|
||||||
|
DateTime dateTime;
|
||||||
|
string check = "*.RsM";
|
||||||
|
bool validatePDSF = false;
|
||||||
|
_CDE5.Production__v2_61_1__CDE5__RsM();
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
Assert.IsFalse(string.IsNullOrEmpty(_CDE5.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
|
||||||
|
string[] variables = _CDE5.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||||
|
IFileRead fileRead = _CDE5.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||||
|
Logistics logistics = new(fileRead);
|
||||||
|
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
|
||||||
|
dateTime = FileHandlers.RsM.ProcessData.GetDateTime(logistics, string.Empty);
|
||||||
|
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
|
||||||
|
dateTime = FileHandlers.RsM.ProcessData.GetDateTime(logistics, "00:13 09/27/38");
|
||||||
|
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
|
||||||
|
NonThrowTryCatch();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_61_1__CDE5__RsM638181148290431160__WMO()
|
||||||
|
{
|
||||||
|
string check = "*.RsM";
|
||||||
|
bool validatePDSF = false;
|
||||||
|
_CDE5.Production__v2_61_1__CDE5__RsM();
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
Assert.IsFalse(string.IsNullOrEmpty(_CDE5.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
|
||||||
|
string[] variables = _CDE5.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||||
|
IFileRead fileRead = _CDE5.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||||
|
Logistics logistics = new(fileRead);
|
||||||
|
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
|
||||||
|
NonThrowTryCatch();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
||||||
45
Adaptation/_Tests/Extract/Production/v2.61.1/CDE6-EQPT.cs
Normal file
45
Adaptation/_Tests/Extract/Production/v2.61.1/CDE6-EQPT.cs
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
#if true
|
||||||
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
|
namespace Adaptation._Tests.Extract.Production.v2_61_1;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class CDE6_EQPT
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
private static CreateSelfDescription.Production.v2_61_1.CDE6_EQPT _CDE6_EQPT;
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
CreateSelfDescription.Production.v2_61_1.CDE6_EQPT.ClassInitialize(testContext);
|
||||||
|
_CDE6_EQPT = CreateSelfDescription.Production.v2_61_1.CDE6_EQPT.EAFLoggingUnitTesting;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_61_1__CDE6_EQPT__DownloadRsMFile() => _CDE6_EQPT.Production__v2_61_1__CDE6_EQPT__DownloadRsMFile();
|
||||||
|
|
||||||
|
[Ignore]
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_61_1__CDE6_EQPT__DownloadRsMFile638065099250000000__Normal()
|
||||||
|
{
|
||||||
|
bool validatePDSF = false;
|
||||||
|
string check = "CDE_Logs|WaferMeasurementData.log|.RsM";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
_CDE6_EQPT.Production__v2_61_1__CDE6_EQPT__DownloadRsMFile();
|
||||||
|
_ = _CDE6_EQPT.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||||
|
for (int i = 0; i < int.MaxValue; i++)
|
||||||
|
Thread.Sleep(500);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
||||||
56
Adaptation/_Tests/Extract/Production/v2.61.1/CDE6.cs
Normal file
56
Adaptation/_Tests/Extract/Production/v2.61.1/CDE6.cs
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
#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_61_1;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class CDE6
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
private static CreateSelfDescription.Production.v2_61_1.CDE6 _CDE6;
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
CreateSelfDescription.Production.v2_61_1.CDE6.ClassInitialize(testContext);
|
||||||
|
_CDE6 = CreateSelfDescription.Production.v2_61_1.CDE6.EAFLoggingUnitTesting;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_61_1__CDE6__RsM() => _CDE6.Production__v2_61_1__CDE6__RsM();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_61_1__CDE6__RsM638065099250000000__Normal()
|
||||||
|
{
|
||||||
|
DateTime dateTime;
|
||||||
|
string check = "*.RsM";
|
||||||
|
bool validatePDSF = false;
|
||||||
|
_CDE6.Production__v2_61_1__CDE6__RsM();
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
Assert.IsFalse(string.IsNullOrEmpty(_CDE6.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
|
||||||
|
string[] variables = _CDE6.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||||
|
IFileRead fileRead = _CDE6.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||||
|
Logistics logistics = new(fileRead);
|
||||||
|
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
|
||||||
|
dateTime = FileHandlers.RsM.ProcessData.GetDateTime(logistics, string.Empty);
|
||||||
|
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
|
||||||
|
dateTime = FileHandlers.RsM.ProcessData.GetDateTime(logistics, "00:13 09/27/38");
|
||||||
|
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
||||||
177
Adaptation/_Tests/Extract/Production/v2.61.1/MET08RESIMAPCDE.cs
Normal file
177
Adaptation/_Tests/Extract/Production/v2.61.1/MET08RESIMAPCDE.cs
Normal file
@ -0,0 +1,177 @@
|
|||||||
|
#if true
|
||||||
|
using Adaptation._Tests.Shared;
|
||||||
|
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_61_1;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class MET08RESIMAPCDE
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
private static CreateSelfDescription.Production.v2_61_1.MET08RESIMAPCDE _MET08RESIMAPCDE;
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
CreateSelfDescription.Production.v2_61_1.MET08RESIMAPCDE.ClassInitialize(testContext);
|
||||||
|
_MET08RESIMAPCDE = CreateSelfDescription.Production.v2_61_1.MET08RESIMAPCDE.EAFLoggingUnitTesting;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void NonThrowTryCatch()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{ throw new Exception(); }
|
||||||
|
catch (Exception) { }
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_61_1__MET08RESIMAPCDE__MoveMatchingFiles() => _MET08RESIMAPCDE.Production__v2_61_1__MET08RESIMAPCDE__MoveMatchingFiles();
|
||||||
|
|
||||||
|
[Ignore]
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_61_1__MET08RESIMAPCDE__MoveMatchingFiles637953064190000000__Normal()
|
||||||
|
{
|
||||||
|
DateTime dateTime;
|
||||||
|
string check = "*";
|
||||||
|
bool validatePDSF = false;
|
||||||
|
_MET08RESIMAPCDE.Production__v2_61_1__MET08RESIMAPCDE__MoveMatchingFiles();
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
Assert.IsFalse(string.IsNullOrEmpty(_MET08RESIMAPCDE.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
|
||||||
|
string[] variables = _MET08RESIMAPCDE.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||||
|
IFileRead fileRead = _MET08RESIMAPCDE.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||||
|
Logistics logistics = new(fileRead);
|
||||||
|
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
|
||||||
|
dateTime = FileHandlers.RsM.ProcessData.GetDateTime(logistics, string.Empty);
|
||||||
|
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
|
||||||
|
dateTime = FileHandlers.RsM.ProcessData.GetDateTime(logistics, "00:13 09/27/38");
|
||||||
|
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_61_1__MET08RESIMAPCDE__OpenInsightMetrologyViewer() => _MET08RESIMAPCDE.Production__v2_61_1__MET08RESIMAPCDE__OpenInsightMetrologyViewer();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_61_1__MET08RESIMAPCDE__OpenInsightMetrologyViewer638127615724700306__NewColumn()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
_MET08RESIMAPCDE.Production__v2_61_1__MET08RESIMAPCDE__OpenInsightMetrologyViewer();
|
||||||
|
string[] variables = _MET08RESIMAPCDE.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
|
||||||
|
IFileRead fileRead = _MET08RESIMAPCDE.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||||
|
Logistics logistics = new(fileRead);
|
||||||
|
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_61_1__MET08RESIMAPCDE__IQSSi() => _MET08RESIMAPCDE.Production__v2_61_1__MET08RESIMAPCDE__IQSSi();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_61_1__MET08RESIMAPCDE__OpenInsight() => _MET08RESIMAPCDE.Production__v2_61_1__MET08RESIMAPCDE__OpenInsight();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_61_1__MET08RESIMAPCDE__OpenInsight638054501710000000__IqsSql()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
_MET08RESIMAPCDE.Production__v2_61_1__MET08RESIMAPCDE__OpenInsight();
|
||||||
|
string[] variables = _MET08RESIMAPCDE.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
|
||||||
|
IFileRead fileRead = _MET08RESIMAPCDE.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||||
|
Logistics logistics = new(fileRead);
|
||||||
|
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_61_1__MET08RESIMAPCDE__OpenInsight638116271690000000__IqsSql()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
_MET08RESIMAPCDE.Production__v2_61_1__MET08RESIMAPCDE__OpenInsight();
|
||||||
|
string[] variables = _MET08RESIMAPCDE.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
|
||||||
|
IFileRead fileRead = _MET08RESIMAPCDE.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||||
|
Logistics logistics = new(fileRead);
|
||||||
|
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_61_1__MET08RESIMAPCDE__OpenInsight638159693274771954__IqsSqlButSplit()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
_MET08RESIMAPCDE.Production__v2_61_1__MET08RESIMAPCDE__OpenInsight();
|
||||||
|
string[] variables = _MET08RESIMAPCDE.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
|
||||||
|
IFileRead fileRead = _MET08RESIMAPCDE.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||||
|
Logistics logistics = new(fileRead);
|
||||||
|
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
|
||||||
|
NonThrowTryCatch();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_61_1__MET08RESIMAPCDE__OpenInsightMetrologyViewerAttachments() => _MET08RESIMAPCDE.Production__v2_61_1__MET08RESIMAPCDE__OpenInsightMetrologyViewerAttachments();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_61_1__MET08RESIMAPCDE__APC() => _MET08RESIMAPCDE.Production__v2_61_1__MET08RESIMAPCDE__APC();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_61_1__MET08RESIMAPCDE__SPaCe() => _MET08RESIMAPCDE.Production__v2_61_1__MET08RESIMAPCDE__SPaCe();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_61_1__MET08RESIMAPCDE__Processed() => _MET08RESIMAPCDE.Production__v2_61_1__MET08RESIMAPCDE__Processed();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_61_1__MET08RESIMAPCDE__Archive() => _MET08RESIMAPCDE.Production__v2_61_1__MET08RESIMAPCDE__Archive();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_61_1__MET08RESIMAPCDE__Dummy() => _MET08RESIMAPCDE.Production__v2_61_1__MET08RESIMAPCDE__Dummy();
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@ -193,7 +193,12 @@ public class AdaptationTesting : ISMTP
|
|||||||
segments = withActualCICN.Split(new string[] { ticks }, StringSplitOptions.None);
|
segments = withActualCICN.Split(new string[] { ticks }, StringSplitOptions.None);
|
||||||
dummyDirectory = Path.Combine(dummyRoot, cellInstanceName, ticks, string.Join(null, segments));
|
dummyDirectory = Path.Combine(dummyRoot, cellInstanceName, ticks, string.Join(null, segments));
|
||||||
if (!Directory.Exists(dummyDirectory))
|
if (!Directory.Exists(dummyDirectory))
|
||||||
|
{
|
||||||
_ = Directory.CreateDirectory(dummyDirectory);
|
_ = Directory.CreateDirectory(dummyDirectory);
|
||||||
|
try
|
||||||
|
{ Directory.SetLastWriteTime(Path.Combine(dummyRoot, cellInstanceName), DateTime.Now); }
|
||||||
|
catch { }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(ticks))
|
if (string.IsNullOrEmpty(ticks))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -64,7 +64,7 @@ public class MET08RESIMAPCDE : LoggingUnitTesting, IDisposable
|
|||||||
StringBuilder results = new();
|
StringBuilder results = new();
|
||||||
(string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[]
|
(string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[]
|
||||||
{
|
{
|
||||||
new("MET08RESIMAPCDE", "v2.60.0"),
|
new("MET08RESIMAPCDE", "v2.61.1"),
|
||||||
};
|
};
|
||||||
string production = "http://messa08ec.infineon.com:9003/CellInstanceServiceV2";
|
string production = "http://messa08ec.infineon.com:9003/CellInstanceServiceV2";
|
||||||
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
|
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
|
||||||
|
|||||||
@ -203,12 +203,12 @@ public class RsM : LoggingUnitTesting, IDisposable
|
|||||||
StringBuilder results = new();
|
StringBuilder results = new();
|
||||||
(string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[]
|
(string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[]
|
||||||
{
|
{
|
||||||
new("CDE4", "v2.60.0"),
|
new("CDE4", "v2.61.1"),
|
||||||
new("CDE5", "v2.60.0"),
|
new("CDE5", "v2.61.1"),
|
||||||
new("CDE6", "v2.60.0"),
|
new("CDE6", "v2.61.1"),
|
||||||
new("CDE4-EQPT", "v2.60.0"),
|
new("CDE4-EQPT", "v2.61.1"),
|
||||||
new("CDE5-EQPT", "v2.60.0"),
|
new("CDE5-EQPT", "v2.61.1"),
|
||||||
new("CDE6-EQPT", "v2.60.0"),
|
new("CDE6-EQPT", "v2.61.1"),
|
||||||
};
|
};
|
||||||
string production = "http://messa08ec.infineon.com:9003/CellInstanceServiceV2";
|
string production = "http://messa08ec.infineon.com:9003/CellInstanceServiceV2";
|
||||||
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
|
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
|
||||||
|
|||||||
117
Adaptation/_Tests/Static/recipes-and-patterns.js
Normal file
117
Adaptation/_Tests/Static/recipes-and-patterns.js
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
// Recipe 1 = Matched
|
||||||
|
// recipes-and-patterns.js under IndexOf
|
||||||
|
// RecipesAndPatternsMatch
|
||||||
|
// ($('dcp.CDE4/csv/Index', 0) + 1) == $('dcp.CDE4/csv/Count', 0)
|
||||||
|
// getValue('4PP', $('dcp.CDE4/csv/Count', 0), $('dcp.CDE4/csv/Project', ''), $('dcp.CDE4/csv/RecipeName', ''), getContextData('2', 'cds.NULL_DATA', ''));
|
||||||
|
|
||||||
|
function getValue(tool, patternSize, recipe, pattern, json) {
|
||||||
|
let result;
|
||||||
|
if (tool == undefined || tool.length === 0 || patternSize == undefined || patternSize.length === 0 || recipe == undefined || recipe.length === 0 || pattern == undefined || pattern.length === 0 || json == undefined || json.length === 0)
|
||||||
|
result = 'A) Invalid input!';
|
||||||
|
else {
|
||||||
|
let parsed;
|
||||||
|
try {
|
||||||
|
parsed = JSON.parse(json);
|
||||||
|
} catch (error) {
|
||||||
|
parsed = null;
|
||||||
|
}
|
||||||
|
if (parsed == null)
|
||||||
|
result = 'B) Invalid input!';
|
||||||
|
else if (parsed.rds == undefined || parsed.rds.prodSpec == undefined || parsed.rds.prodSpec.recipesAndPatterns == undefined)
|
||||||
|
result = 'C) No Spec!';
|
||||||
|
else {
|
||||||
|
let toolMatches = [];
|
||||||
|
for (let index = 0; index < parsed.rds.prodSpec.recipesAndPatterns.length; index++) {
|
||||||
|
if (parsed.rds.prodSpec.recipesAndPatterns[index].tool === tool) {
|
||||||
|
toolMatches.push(parsed.rds.prodSpec.recipesAndPatterns[index]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (toolMatches == null || toolMatches.length === 0)
|
||||||
|
result = 'Tool [' + tool + '] not found in OI API results!';
|
||||||
|
else {
|
||||||
|
let debug = '';
|
||||||
|
let matches = 0;
|
||||||
|
for (let index = 0; index < toolMatches.length; index++) {
|
||||||
|
debug += 'patternSize: ' + toolMatches[index].patternSize +
|
||||||
|
'; recipe: ' + toolMatches[index].recipe +
|
||||||
|
'; pattern: ' + toolMatches[index].pattern + ';~';
|
||||||
|
if (toolMatches[index].patternSize == patternSize &&
|
||||||
|
toolMatches[index].recipe.localeCompare(recipe, ['en-US'], { sensitivity: 'base' }) === 0 &&
|
||||||
|
toolMatches[index].pattern.localeCompare(pattern, ['en-US'], { sensitivity: 'base' }) === 0) {
|
||||||
|
matches++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (matches > 0)
|
||||||
|
result = '1';
|
||||||
|
else
|
||||||
|
result = 'Value not matched~Run~patternSize: ' + patternSize + '; recipe: ' + recipe + '; pattern: ' + pattern + ';~API~' + debug;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
getValue('4PP', 9, 'LSL_6IN', 'IRC6mm', '{"rds":{"prodSpec":{"recipesAndPatterns":[{"recipe":"LSL_6IN","pattern":"IRC6mm","patternSize":5,"tool":"4PP"}]}}}');
|
||||||
|
|
||||||
|
let json;
|
||||||
|
let tool;
|
||||||
|
let recipe;
|
||||||
|
let pattern;
|
||||||
|
let patternSize;
|
||||||
|
|
||||||
|
tool = '4PP'
|
||||||
|
patternSize = 9;
|
||||||
|
recipe = 'LSL_6IN';
|
||||||
|
pattern = 'IRC6mm';
|
||||||
|
json = '{"rds":{"prodSpec":{"recipesAndPatterns":[{"recipe":"LSL_6IN","pattern":"IRC6mm","patternSize":5,"tool":"4PP"}]}}}';
|
||||||
|
const testA = getValue(tool, patternSize, recipe, pattern, json);
|
||||||
|
if (testA !== '1')
|
||||||
|
throw 'Test A failed: ' + testA;
|
||||||
|
tool = null;
|
||||||
|
const testB = getValue(tool, patternSize, recipe, pattern, json);
|
||||||
|
if (testB !== 'A) Invalid input!')
|
||||||
|
throw 'Test L failed: ' + testB;
|
||||||
|
tool = '';
|
||||||
|
const testC = getValue(tool, patternSize, recipe, pattern, json);
|
||||||
|
if (testC !== 'A) Invalid input!')
|
||||||
|
throw 'Test M failed: ' + testC;
|
||||||
|
patternSize = null;
|
||||||
|
const testD = getValue(tool, patternSize, recipe, pattern, json);
|
||||||
|
if (testD !== 'A) Invalid input!')
|
||||||
|
throw 'Test J failed: ' + testD;
|
||||||
|
patternSize = '';
|
||||||
|
const testE = getValue(tool, patternSize, recipe, pattern, json);
|
||||||
|
if (testE !== 'A) Invalid input!')
|
||||||
|
throw 'Test K failed: ' + testE;
|
||||||
|
recipe = null;
|
||||||
|
const testF = getValue(tool, patternSize, recipe, pattern, json);
|
||||||
|
if (testF !== 'A) Invalid input!')
|
||||||
|
throw 'Test F failed: ' + testF;
|
||||||
|
recipe = '';
|
||||||
|
const testG = getValue(tool, patternSize, recipe, pattern, json);
|
||||||
|
if (testG !== 'A) Invalid input!')
|
||||||
|
throw 'Test G failed: ' + testG;
|
||||||
|
pattern = null;
|
||||||
|
const testH = getValue(tool, patternSize, recipe, pattern, json);
|
||||||
|
if (testH !== 'A) Invalid input!')
|
||||||
|
throw 'Test H failed: ' + testH;
|
||||||
|
pattern = '';
|
||||||
|
const testI = getValue(tool, patternSize, recipe, pattern, json);
|
||||||
|
if (testI !== 'A) Invalid input!')
|
||||||
|
throw 'Test I failed: ' + testI;
|
||||||
|
json = '';
|
||||||
|
const testK = getValue(tool, patternSize, recipe, pattern, json);
|
||||||
|
if (testK !== 'A) Invalid input!')
|
||||||
|
throw 'Test B failed: ' + testK;
|
||||||
|
json = 'invalid';
|
||||||
|
const testL = getValue(tool, patternSize, recipe, pattern, json);
|
||||||
|
if (testL !== 'B) Invalid input!')
|
||||||
|
throw 'Test C failed: ' + testL;
|
||||||
|
json = '{"rds":{}}';
|
||||||
|
const testM = getValue(tool, patternSize, recipe, pattern, json);
|
||||||
|
if (testM !== 'C) No Spec!')
|
||||||
|
throw 'Test D failed: ' + testM;
|
||||||
|
json = '{"rds":{"prodSpec":{"recipesAndPatterns":[]}}}';
|
||||||
|
const testN = getValue(tool, patternSize, recipe, pattern, json);
|
||||||
|
if (testN !== 'Tool [4PP] not found in OI API results!')
|
||||||
|
throw 'Test E failed: ' + testN;
|
||||||
@ -194,10 +194,10 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Infineon.EAF.Runtime">
|
<PackageReference Include="Infineon.EAF.Runtime">
|
||||||
<Version>2.60.0</Version>
|
<Version>2.61.1</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="System.Text.Json">
|
<PackageReference Include="System.Text.Json">
|
||||||
<Version>8.0.5</Version>
|
<Version>8.0.3</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("2.60.0.0")]
|
[assembly: AssemblyVersion("2.61.1.0")]
|
||||||
[assembly: AssemblyFileVersion("2.60.0.0")]
|
[assembly: AssemblyFileVersion("2.61.1.0")]
|
||||||
|
|||||||
Reference in New Issue
Block a user