diff --git a/Adaptation/.vscode/launch.json b/Adaptation/.vscode/launch.json index 81eaea2..f8bf7e8 100644 --- a/Adaptation/.vscode/launch.json +++ b/Adaptation/.vscode/launch.json @@ -1,10 +1,43 @@ { "configurations": [ + { + "mode": "debug", + "name": "Go launch file", + "program": "${file}", + "request": "launch", + "type": "go" + }, + { + "name": "node Launch Current Opened File", + "program": "${file}", + "request": "launch", + "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", - "type": "coreclr", + "processId": 32760, "request": "attach", - "processId": 13604 + "type": "coreclr" } ] -} +} \ No newline at end of file diff --git a/Adaptation/FileHandlers/IQSSi/FileRead.cs b/Adaptation/FileHandlers/IQSSi/FileRead.cs index 4407e9b..c189c1e 100644 --- a/Adaptation/FileHandlers/IQSSi/FileRead.cs +++ b/Adaptation/FileHandlers/IQSSi/FileRead.cs @@ -203,10 +203,11 @@ public class FileRead : Shared.FileRead, IFileRead private Tuple> GetExtractResult(string reportFullPath, DateTime dateTime) { Tuple> results; - ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath); + string[] lines = File.ReadAllLines(reportFullPath); + ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath, lines); _Logistics = new Logistics(reportFullPath, processDataStandardFormat); SetFileParameterLotIDToLogisticsMID(); - JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat); + JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(reportFullPath, lines, processDataStandardFormat); List descriptions = txt.ProcessData.GetDescriptions(jsonElements); Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) diff --git a/Adaptation/FileHandlers/OpenInsight/FileRead.cs b/Adaptation/FileHandlers/OpenInsight/FileRead.cs index 6cb4015..37eac98 100644 --- a/Adaptation/FileHandlers/OpenInsight/FileRead.cs +++ b/Adaptation/FileHandlers/OpenInsight/FileRead.cs @@ -110,7 +110,7 @@ public class FileRead : Shared.FileRead, IFileRead return results; } - private void SaveOpenInsightFile(string reportFullPath, DateTime dateTime, ProcessDataStandardFormat processDataStandardFormat, List descriptions, Test[] tests) + private void SaveOpenInsightFile(string reportFullPath, DateTime dateTime, List descriptions, Test[] tests) { string duplicateFile; bool isDummyRun = false; @@ -143,7 +143,7 @@ public class FileRead : Shared.FileRead, IFileRead else duplicateFile = Path.Combine(duplicateDirectory, $"{$"Viewer {subgroupId}".TrimEnd()} {fileName.Replace("Viewer", string.Empty)}"); 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) { @@ -155,14 +155,15 @@ public class FileRead : Shared.FileRead, IFileRead private Tuple> GetExtractResult(string reportFullPath, DateTime dateTime) { Tuple> results; - ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath); + string[] lines = File.ReadAllLines(reportFullPath); + ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath, lines); _Logistics = new Logistics(reportFullPath, processDataStandardFormat); SetFileParameterLotIDToLogisticsMID(); - JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat); + JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(reportFullPath, lines, processDataStandardFormat); List descriptions = txt.ProcessData.GetDescriptions(jsonElements); Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) - SaveOpenInsightFile(reportFullPath, dateTime, processDataStandardFormat, descriptions, tests); + SaveOpenInsightFile(reportFullPath, dateTime, descriptions, tests); results = new Tuple>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List()); return results; } diff --git a/Adaptation/FileHandlers/OpenInsight/FromIQS.cs b/Adaptation/FileHandlers/OpenInsight/FromIQS.cs index 3313faf..5032d3c 100644 --- a/Adaptation/FileHandlers/OpenInsight/FromIQS.cs +++ b/Adaptation/FileHandlers/OpenInsight/FromIQS.cs @@ -325,74 +325,18 @@ public class FromIQS return new(result, count, commandText); } - private static string GetJson(Logistics logistics, ProcessDataStandardFormat processDataStandardFormat, txt.Description description) + internal static void Save(string openInsightApiECDirectory, Logistics logistics, string reportFullPath, txt.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(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, txt.Description description, long? subGroupId, string weekOfYear) - { - string checkFile; string fileName = Path.GetFileName(reportFullPath); - string json = GetJson(logistics, processDataStandardFormat, description); string? ecPathRoot = Path.GetPathRoot(openInsightApiECDirectory); bool ecExists = ecPathRoot is not null && Directory.Exists(ecPathRoot); string weekYear = $"{logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}"; string ecDirectory = Path.Combine(openInsightApiECDirectory, weekYear, $"-{description.PSN}", $"-{description.Reactor}", $"-{description.RDS}", $"-{subGroupId}"); if (ecExists && !Directory.Exists(ecDirectory)) _ = Directory.CreateDirectory(ecDirectory); - checkFile = Path.Combine(ecDirectory, fileName); + string checkFile = Path.Combine(ecDirectory, fileName); if (ecExists && !File.Exists(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) diff --git a/Adaptation/FileHandlers/OpenInsightMetrologyViewer/FileRead.cs b/Adaptation/FileHandlers/OpenInsightMetrologyViewer/FileRead.cs index 2dade07..4905d1c 100644 --- a/Adaptation/FileHandlers/OpenInsightMetrologyViewer/FileRead.cs +++ b/Adaptation/FileHandlers/OpenInsightMetrologyViewer/FileRead.cs @@ -110,10 +110,10 @@ public class FileRead : Shared.FileRead, IFileRead return results; } - private void SendData(string reportFullPath, DateTime dateTime, List descriptions) + private void SendData(string reportFullPath, DateTime dateTime, JsonElement[] jsonElements, List descriptions) { string checkDirectory; - WSRequest wsRequest = new(this, _Logistics, descriptions); + WSRequest wsRequest = new(this, _Logistics, jsonElements, descriptions); int weekOfYear = _Calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday); string directory = Path.Combine(_OpenInsightMetrologyViewerFileShare, dateTime.Year.ToString(), $"WW{weekOfYear:00}"); checkDirectory = Path.Combine(directory, _Logistics.Sequence.ToString()); @@ -139,14 +139,15 @@ public class FileRead : Shared.FileRead, IFileRead private Tuple> GetExtractResult(string reportFullPath, DateTime dateTime) { Tuple> results; - ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath); + string[] lines = File.ReadAllLines(reportFullPath); + ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath, lines); _Logistics = new Logistics(reportFullPath, processDataStandardFormat); SetFileParameterLotIDToLogisticsMID(); - JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat); + JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(reportFullPath, lines, processDataStandardFormat); List descriptions = txt.ProcessData.GetDescriptions(jsonElements); Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) - SendData(reportFullPath, dateTime, descriptions); + SendData(reportFullPath, dateTime, jsonElements, descriptions); results = new Tuple>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List()); return results; } diff --git a/Adaptation/FileHandlers/OpenInsightMetrologyViewer/WSRequest.cs b/Adaptation/FileHandlers/OpenInsightMetrologyViewer/WSRequest.cs index c979670..718d0c1 100644 --- a/Adaptation/FileHandlers/OpenInsightMetrologyViewer/WSRequest.cs +++ b/Adaptation/FileHandlers/OpenInsightMetrologyViewer/WSRequest.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; +using System.Text.Json; namespace Adaptation.FileHandlers.OpenInsightMetrologyViewer; @@ -16,8 +17,17 @@ public class WSRequest // public int Id { get; set; } + public string AttemptCounter { get; set; } public string CellName { get; set; } public string Date { get; set; } + public string DcnAllMax { get; set; } + public string DcnAllMean { get; set; } + public string DcnAllMin { get; set; } + public string DcnAllStDev { get; set; } + public string DcnAreaCntMax { get; set; } + public string DcnAreaCntMean { get; set; } + public string DcnAreaCntMin { get; set; } + public string IndexOf { get; set; } public string LotID { get; set; } public string Operator { get; set; } public string PSN { get; set; } @@ -26,13 +36,6 @@ public class WSRequest public string Recipe { get; set; } public string Session { get; set; } public string UniqueID { get; set; } - public string DcnAllMax { get; set; } - public string DcnAllMean { get; set; } - public string DcnAllMin { get; set; } - public string DcnAllStDev { get; set; } - public string DcnAreaCntMax { get; set; } - public string DcnAreaCntMean { get; set; } - public string DcnAreaCntMin { get; set; } public string DcnAreaCntStDev { get; set; } public string DcnAreaMax { get; set; } public string DcnAreaMean { get; set; } @@ -271,7 +274,7 @@ public class WSRequest [Obsolete("For json")] public WSRequest() { } #pragma warning disable IDE0060 - internal WSRequest(IFileRead fileRead, Logistics logistics, List descriptions, string processDataStandardFormat = null) + internal WSRequest(IFileRead fileRead, Logistics logistics, JsonElement[] jsonElements, List descriptions, string processDataStandardFormat = null) #pragma warning restore IDE0060 { Id = -1; @@ -283,252 +286,254 @@ public class WSRequest UniqueID = x.UniqueId; Date = x.Date; Reactor = x.Reactor; - LotID = x.Lot; + LotID = x.Lot; // different name Session = x.Session; + AttemptCounter = x.AttemptCounter; + IndexOf = x.IndexOf; DcnAllMin = x.DcnAllMin; DcnAllMax = x.DcnAllMax; DcnAllMean = x.DcnAllMean; - DcnAllStDev = x.DcnAllStdDev; + DcnAllStDev = x.DcnAllStdDev; // different name DcnLpdMin = x.DcnLpdMin; DcnLpdMax = x.DcnLpdMax; DcnLpdMean = x.DcnLpdMean; - DcnLpdStDev = x.DcnLpdStdDev; + DcnLpdStDev = x.DcnLpdStdDev; // different name DcnLpdNMin = x.DcnLpdNMin; DcnLpdNMax = x.DcnLpdNMax; DcnLpdNMean = x.DcnLpdNMean; - DcnLpdNStDev = x.DcnLpdNStdDev; + DcnLpdNStDev = x.DcnLpdNStdDev; // different name DcnLpdESMin = x.DcnLpdESMin; DcnLpdESMax = x.DcnLpdESMax; DcnLpdESMean = x.DcnLpdESMean; - DcnLpdESStDev = x.DcnLpdESStdDev; + DcnLpdESStDev = x.DcnLpdESStdDev; // different name DcnMicroScrMin = x.DcnMicroScrMin; DcnMicroScrMax = x.DcnMicroScrMax; DcnMicroScrMean = x.DcnMicroScrMean; - DcnMicroScrStDev = x.DcnMicroScrStdDev; + DcnMicroScrStDev = x.DcnMicroScrStdDev; // different name DcnScrMin = x.DcnScrMin; DcnScrMax = x.DcnScrMax; DcnScrMean = x.DcnScrMean; - DcnScrStDev = x.DcnScrStdDev; + DcnScrStDev = x.DcnScrStdDev; // different name DcnSlipMin = x.DcnSlipMin; DcnSlipMax = x.DcnSlipMax; DcnSlipMean = x.DcnSlipMean; - DcnSlipStDev = x.DcnSlipStdDev; - DcnAreaCntMin = x.DcnAreaCountMin; - DcnAreaCntMax = x.DcnAreaCountMax; - DcnAreaCntMean = x.DcnAreaCountMean; - DcnAreaCntStDev = x.DcnAreaCountStdDev; + DcnSlipStDev = x.DcnSlipStdDev; // different name + DcnAreaCntMin = x.DcnAreaCountMin; // different name + DcnAreaCntMax = x.DcnAreaCountMax; // different name + DcnAreaCntMean = x.DcnAreaCountMean; // different name + DcnAreaCntStDev = x.DcnAreaCountStdDev; // different name DcnAreaMin = x.DcnAreaMin; DcnAreaMax = x.DcnAreaMax; DcnAreaMean = x.DcnAreaMean; - DcnAreaStDev = x.DcnAreaStdDev; + DcnAreaStDev = x.DcnAreaStdDev; // different name DcnHazeAvgMin = x.DcnHazeAvgMin; DcnHazeAvgMax = x.DcnHazeAvgMax; DcnHazeAvgMean = x.DcnHazeAvgMean; - DcnHazeAvgStDev = x.DcnHazeAvgStdDev; - DcnHazeMedMin = x.DcnHazeMedianMin; - DcnHazeMedMax = x.DcnHazeMedianMax; - DcnHazeMedMean = x.DcnHazeMedianMean; - DcnHazeMedStDev = x.DcnHazeMedianStdDev; - DcnHazeStDevMin = x.DcnHazeStdDevMin; - DcnHazeStDevMax = x.DcnHazeStdDevMax; - DcnHazeStDevMean = x.DcnHazeStdDevMean; - DcnHazeStDevStDev = x.DcnHazeStdDevStdDev; + DcnHazeAvgStDev = x.DcnHazeAvgStdDev; // different name + DcnHazeMedMin = x.DcnHazeMedianMin; // different name + DcnHazeMedMax = x.DcnHazeMedianMax; // different name + DcnHazeMedMean = x.DcnHazeMedianMean; // different name + DcnHazeMedStDev = x.DcnHazeMedianStdDev; // different name + DcnHazeStDevMin = x.DcnHazeStdDevMin; // different name + DcnHazeStDevMax = x.DcnHazeStdDevMax; // different name + DcnHazeStDevMean = x.DcnHazeStdDevMean; // different name + DcnHazeStDevStDev = x.DcnHazeStdDevStdDev; // different name DcnBin1Min = x.DcnBin1Min; DcnBin1Max = x.DcnBin1Max; DcnBin1Mean = x.DcnBin1Mean; - DcnBin1StDev = x.DcnBin1StdDev; + DcnBin1StDev = x.DcnBin1StdDev; // different name DcnBin2Min = x.DcnBin2Min; DcnBin2Max = x.DcnBin2Max; DcnBin2Mean = x.DcnBin2Mean; - DcnBin2StDev = x.DcnBin2StdDev; + DcnBin2StDev = x.DcnBin2StdDev; // different name DcnBin3Min = x.DcnBin3Min; DcnBin3Max = x.DcnBin3Max; DcnBin3Mean = x.DcnBin3Mean; - DcnBin3StDev = x.DcnBin3StdDev; + DcnBin3StDev = x.DcnBin3StdDev; // different name DcnBin4Min = x.DcnBin4Min; DcnBin4Max = x.DcnBin4Max; DcnBin4Mean = x.DcnBin4Mean; - DcnBin4StDev = x.DcnBin4StdDev; + DcnBin4StDev = x.DcnBin4StdDev; // different name DcnBin5Min = x.DcnBin5Min; DcnBin5Max = x.DcnBin5Max; DcnBin5Mean = x.DcnBin5Mean; - DcnBin5StDev = x.DcnBin5StdDev; + DcnBin5StDev = x.DcnBin5StdDev; // different name DcnBin6Min = x.DcnBin6Min; DcnBin6Max = x.DcnBin6Max; DcnBin6Mean = x.DcnBin6Mean; - DcnBin6StDev = x.DcnBin6StdDev; + DcnBin6StDev = x.DcnBin6StdDev; // different name DcnBin7Min = x.DcnBin7Min; DcnBin7Max = x.DcnBin7Max; DcnBin7Mean = x.DcnBin7Mean; - DcnBin7StDev = x.DcnBin7StdDev; + DcnBin7StDev = x.DcnBin7StdDev; // different name DcnBin8Min = x.DcnBin8Min; DcnBin8Max = x.DcnBin8Max; DcnBin8Mean = x.DcnBin8Mean; - DcnBin8StDev = x.DcnBin8StdDev; + DcnBin8StDev = x.DcnBin8StdDev; // different name DwnAllMin = x.DwnAllMin; DwnAllMax = x.DwnAllMax; DwnAllMean = x.DwnAllMean; - DwnAllStDev = x.DwnAllStdDev; + DwnAllStDev = x.DwnAllStdDev; // different name DwnLpdMin = x.DwnLpdMin; DwnLpdMax = x.DwnLpdMax; DwnLpdMean = x.DwnLpdMean; - DwnLpdStDev = x.DwnLpdStdDev; + DwnLpdStDev = x.DwnLpdStdDev; // different name DwnLpdNMin = x.DwnLpdNMin; DwnLpdNMax = x.DwnLpdNMax; DwnLpdNMean = x.DwnLpdNMean; - DwnLpdNStDev = x.DwnLpdNStdDev; + DwnLpdNStDev = x.DwnLpdNStdDev; // different name DwnLpdESMin = x.DwnLpdESMin; DwnLpdESMax = x.DwnLpdESMax; DwnLpdESMean = x.DwnLpdESMean; - DwnLpdESStDev = x.DwnLpdESStdDev; + DwnLpdESStDev = x.DwnLpdESStdDev; // different name DwnMicroScrMin = x.DwnMicroScrMin; DwnMicroScrMax = x.DwnMicroScrMax; DwnMicroScrMean = x.DwnMicroScrMean; - DwnMicroScrStDev = x.DwnMicroScrStdDev; + DwnMicroScrStDev = x.DwnMicroScrStdDev; // different name DwnScrMin = x.DwnScrMin; DwnScrMax = x.DwnScrMax; DwnScrMean = x.DwnScrMean; - DwnScrStDev = x.DwnScrStdDev; + DwnScrStDev = x.DwnScrStdDev; // different name DwnSlipMin = x.DwnSlipMin; DwnSlipMax = x.DwnSlipMax; DwnSlipMean = x.DwnSlipMean; - DwnSlipStDev = x.DwnSlipStdDev; - DwnAreaCntMin = x.DwnAreaCountMin; - DwnAreaCntMax = x.DwnAreaCountMax; - DwnAreaCntMean = x.DwnAreaCountMean; - DwnAreaCntStDev = x.DwnAreaCountStdDev; + DwnSlipStDev = x.DwnSlipStdDev; // different name + DwnAreaCntMin = x.DwnAreaCountMin; // different name + DwnAreaCntMax = x.DwnAreaCountMax; // different name + DwnAreaCntMean = x.DwnAreaCountMean; // different name + DwnAreaCntStDev = x.DwnAreaCountStdDev; // different name DwnAreaMin = x.DwnAreaMin; DwnAreaMax = x.DwnAreaMax; DwnAreaMean = x.DwnAreaMean; - DwnAreaStDev = x.DwnAreaStdDev; + DwnAreaStDev = x.DwnAreaStdDev; // different name DwnHazeAvgMin = x.DwnHazeAvgMin; DwnHazeAvgMax = x.DwnHazeAvgMax; DwnHazeAvgMean = x.DwnHazeAvgMean; - DwnHazeAvgStDev = x.DwnHazeAvgStdDev; - DwnHazeMedMin = x.DwnHazeMedianMin; - DwnHazeMedMax = x.DwnHazeMedianMax; - DwnHazeMedMean = x.DwnHazeMedianMean; - DwnHazeMedStDev = x.DwnHazeMedianStdDev; - DwnHazeStDevMin = x.DwnHazeStdDevMin; - DwnHazeStDevMax = x.DwnHazeStdDevMax; - DwnHazeStDevMean = x.DwnHazeStdDevMean; - DwnHazeStDevStDev = x.DwnHazeStdDevStdDev; + DwnHazeAvgStDev = x.DwnHazeAvgStdDev; // different name + DwnHazeMedMin = x.DwnHazeMedianMin; // different name + DwnHazeMedMax = x.DwnHazeMedianMax; // different name + DwnHazeMedMean = x.DwnHazeMedianMean; // different name + DwnHazeMedStDev = x.DwnHazeMedianStdDev; // different name + DwnHazeStDevMin = x.DwnHazeStdDevMin; // different name + DwnHazeStDevMax = x.DwnHazeStdDevMax; // different name + DwnHazeStDevMean = x.DwnHazeStdDevMean; // different name + DwnHazeStDevStDev = x.DwnHazeStdDevStdDev; // different name DwnBin1Min = x.DwnBin1Min; DwnBin1Max = x.DwnBin1Max; DwnBin1Mean = x.DwnBin1Mean; - DwnBin1StDev = x.DwnBin1StdDev; + DwnBin1StDev = x.DwnBin1StdDev; // different name DwnBin2Min = x.DwnBin2Min; DwnBin2Max = x.DwnBin2Max; DwnBin2Mean = x.DwnBin2Mean; - DwnBin2StDev = x.DwnBin2StdDev; + DwnBin2StDev = x.DwnBin2StdDev; // different name DwnBin3Min = x.DwnBin3Min; DwnBin3Max = x.DwnBin3Max; DwnBin3Mean = x.DwnBin3Mean; - DwnBin3StDev = x.DwnBin3StdDev; + DwnBin3StDev = x.DwnBin3StdDev; // different name DwnBin4Min = x.DwnBin4Min; DwnBin4Max = x.DwnBin4Max; DwnBin4Mean = x.DwnBin4Mean; - DwnBin4StDev = x.DwnBin4StdDev; + DwnBin4StDev = x.DwnBin4StdDev; // different name DwnBin5Min = x.DwnBin5Min; DwnBin5Max = x.DwnBin5Max; DwnBin5Mean = x.DwnBin5Mean; - DwnBin5StDev = x.DwnBin5StdDev; + DwnBin5StDev = x.DwnBin5StdDev; // different name DwnBin6Min = x.DwnBin6Min; DwnBin6Max = x.DwnBin6Max; DwnBin6Mean = x.DwnBin6Mean; - DwnBin6StDev = x.DwnBin6StdDev; + DwnBin6StDev = x.DwnBin6StdDev; // different name DwnBin7Min = x.DwnBin7Min; DwnBin7Max = x.DwnBin7Max; DwnBin7Mean = x.DwnBin7Mean; - DwnBin7StDev = x.DwnBin7StdDev; + DwnBin7StDev = x.DwnBin7StdDev; // different name DwnBin8Min = x.DwnBin8Min; DwnBin8Max = x.DwnBin8Max; DwnBin8Mean = x.DwnBin8Mean; - DwnBin8StDev = x.DwnBin8StdDev; + DwnBin8StDev = x.DwnBin8StdDev; // different name DnnAllMin = x.DnnAllMin; DnnAllMax = x.DnnAllMax; DnnAllMean = x.DnnAllMean; - DnnAllStDev = x.DnnAllStdDev; + DnnAllStDev = x.DnnAllStdDev; // different name DnnLpdMin = x.DnnLpdMin; DnnLpdMax = x.DnnLpdMax; DnnLpdMean = x.DnnLpdMean; - DnnLpdStDev = x.DnnLpdStdDev; + DnnLpdStDev = x.DnnLpdStdDev; // different name DnnLpdNMin = x.DnnLpdNMin; DnnLpdNMax = x.DnnLpdNMax; DnnLpdNMean = x.DnnLpdNMean; - DnnLpdNStDev = x.DnnLpdNStdDev; + DnnLpdNStDev = x.DnnLpdNStdDev; // different name DnnLpdESMin = x.DnnLpdESMin; DnnLpdESMax = x.DnnLpdESMax; DnnLpdESMean = x.DnnLpdESMean; - DnnLpdESStDev = x.DnnLpdESStdDev; + DnnLpdESStDev = x.DnnLpdESStdDev; // different name DnnMicroScrMin = x.DnnMicroScrMin; DnnMicroScrMax = x.DnnMicroScrMax; DnnMicroScrMean = x.DnnMicroScrMean; - DnnMicroScrStDev = x.DnnMicroScrStdDev; + DnnMicroScrStDev = x.DnnMicroScrStdDev; // different name DnnScrMin = x.DnnScrMin; DnnScrMax = x.DnnScrMax; DnnScrMean = x.DnnScrMean; - DnnScrStDev = x.DnnScrStdDev; + DnnScrStDev = x.DnnScrStdDev; // different name DnnSlipMin = x.DnnSlipMin; DnnSlipMax = x.DnnSlipMax; DnnSlipMean = x.DnnSlipMean; - DnnSlipStDev = x.DnnSlipStdDev; - DnnAreaCntMin = x.DnnAreaCountMin; - DnnAreaCntMax = x.DnnAreaCountMax; - DnnAreaCntMean = x.DnnAreaCountMean; - DnnAreaCntStDev = x.DnnAreaCountStdDev; + DnnSlipStDev = x.DnnSlipStdDev; // different name + DnnAreaCntMin = x.DnnAreaCountMin; // different name + DnnAreaCntMax = x.DnnAreaCountMax; // different name + DnnAreaCntMean = x.DnnAreaCountMean; // different name + DnnAreaCntStDev = x.DnnAreaCountStdDev; // different name DnnAreaMin = x.DnnAreaMin; DnnAreaMax = x.DnnAreaMax; DnnAreaMean = x.DnnAreaMean; - DnnAreaStDev = x.DnnAreaStdDev; + DnnAreaStDev = x.DnnAreaStdDev; // different name DnnHazeAvgMin = x.DnnHazeAvgMin; DnnHazeAvgMax = x.DnnHazeAvgMax; DnnHazeAvgMean = x.DnnHazeAvgMean; - DnnHazeAvgStDev = x.DnnHazeAvgStdDev; - DnnHazeMedMin = x.DnnHazeMedianMin; - DnnHazeMedMax = x.DnnHazeMedianMax; - DnnHazeMedMean = x.DnnHazeMedianMean; - DnnHazeMedStDev = x.DnnHazeMedianStdDev; - DnnHazeStDevMin = x.DnnHazeStdDevMin; - DnnHazeStDevMax = x.DnnHazeStdDevMax; - DnnHazeStDevMean = x.DnnHazeStdDevMean; - DnnHazeStDevStDev = x.DnnHazeStdDevStdDev; + DnnHazeAvgStDev = x.DnnHazeAvgStdDev; // different name + DnnHazeMedMin = x.DnnHazeMedianMin; // different name + DnnHazeMedMax = x.DnnHazeMedianMax; // different name + DnnHazeMedMean = x.DnnHazeMedianMean; // different name + DnnHazeMedStDev = x.DnnHazeMedianStdDev; // different name + DnnHazeStDevMin = x.DnnHazeStdDevMin; // different name + DnnHazeStDevMax = x.DnnHazeStdDevMax; // different name + DnnHazeStDevMean = x.DnnHazeStdDevMean; // different name + DnnHazeStDevStDev = x.DnnHazeStdDevStdDev; // different name DnnBin1Min = x.DnnBin1Min; DnnBin1Max = x.DnnBin1Max; DnnBin1Mean = x.DnnBin1Mean; - DnnBin1StDev = x.DnnBin1StdDev; + DnnBin1StDev = x.DnnBin1StdDev; // different name DnnBin2Min = x.DnnBin2Min; DnnBin2Max = x.DnnBin2Max; DnnBin2Mean = x.DnnBin2Mean; - DnnBin2StDev = x.DnnBin2StdDev; + DnnBin2StDev = x.DnnBin2StdDev; // different name DnnBin3Min = x.DnnBin3Min; DnnBin3Max = x.DnnBin3Max; DnnBin3Mean = x.DnnBin3Mean; - DnnBin3StDev = x.DnnBin3StdDev; + DnnBin3StDev = x.DnnBin3StdDev; // different name DnnBin4Min = x.DnnBin4Min; DnnBin4Max = x.DnnBin4Max; DnnBin4Mean = x.DnnBin4Mean; - DnnBin4StDev = x.DnnBin4StdDev; + DnnBin4StDev = x.DnnBin4StdDev; // different name DnnBin5Min = x.DnnBin5Min; DnnBin5Max = x.DnnBin5Max; DnnBin5Mean = x.DnnBin5Mean; - DnnBin5StDev = x.DnnBin5StdDev; + DnnBin5StDev = x.DnnBin5StdDev; // different name DnnBin6Min = x.DnnBin6Min; DnnBin6Max = x.DnnBin6Max; DnnBin6Mean = x.DnnBin6Mean; - DnnBin6StDev = x.DnnBin6StdDev; + DnnBin6StDev = x.DnnBin6StdDev; // different name DnnBin7Min = x.DnnBin7Min; DnnBin7Max = x.DnnBin7Max; DnnBin7Mean = x.DnnBin7Mean; - DnnBin7StDev = x.DnnBin7StdDev; + DnnBin7StDev = x.DnnBin7StdDev; // different name DnnBin8Min = x.DnnBin8Min; DnnBin8Max = x.DnnBin8Max; DnnBin8Mean = x.DnnBin8Mean; - DnnBin8StDev = x.DnnBin8StdDev; + DnnBin8StDev = x.DnnBin8StdDev; // different name RDS = x.RDS; PSN = x.PSN; Recipe = x.Recipe; - Operator = x.Employee; + Operator = x.Employee; // different name } txt.Detail detail; foreach (txt.Description description in descriptions) @@ -635,14 +640,14 @@ public class WSRequest return result; } - internal static long GetHeaderId(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, string openInsightMetrologyViewerFileShare, int weekOfYear, WS.Results results, List descriptions) + internal static long GetHeaderId(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, string openInsightMetrologyViewerFileShare, int weekOfYear, WS.Results results, JsonElement[] jsonElements, List descriptions) { long result; if (results is not null && results.HeaderId is not null) result = results.HeaderId.Value; 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}"); (_, WS.Results wsResults) = WS.SendData(openInsightMetrologyViewerAPI, logistics.Sequence, directory, wsRequest); if (wsResults.Success is null || !wsResults.Success.Value) diff --git a/Adaptation/FileHandlers/OpenInsightMetrologyViewerAttachments/FileRead.cs b/Adaptation/FileHandlers/OpenInsightMetrologyViewerAttachments/FileRead.cs index a498308..d2aae7b 100644 --- a/Adaptation/FileHandlers/OpenInsightMetrologyViewerAttachments/FileRead.cs +++ b/Adaptation/FileHandlers/OpenInsightMetrologyViewerAttachments/FileRead.cs @@ -139,7 +139,7 @@ public class FileRead : Shared.FileRead, IFileRead return result; } - private void PostOpenInsightMetrologyViewerAttachments(List descriptions) + private void PostOpenInsightMetrologyViewerAttachments(JsonElement[] jsonElements, List descriptions) { Shared.Metrology.WS.Results? results; string jobIdDirectory = Path.Combine(Path.GetDirectoryName(_FileConnectorConfiguration.AlternateTargetFolder) ?? throw new Exception(), _Logistics.JobID); @@ -155,7 +155,7 @@ public class FileRead : Shared.FileRead, IFileRead results = wsResults[0]; } 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); if (string.IsNullOrEmpty(headerIdDirectory)) throw new Exception($"Didn't find header id directory <{headerId}>"); @@ -167,14 +167,15 @@ public class FileRead : Shared.FileRead, IFileRead if (dateTime == DateTime.MinValue) throw new ArgumentNullException(nameof(dateTime)); Tuple> results; - ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath); + string[] lines = File.ReadAllLines(reportFullPath); + ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath, lines); _Logistics = new Logistics(reportFullPath, processDataStandardFormat); SetFileParameterLotIDToLogisticsMID(); - JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat); + JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(reportFullPath, lines, processDataStandardFormat); List descriptions = txt.ProcessData.GetDescriptions(jsonElements); Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) - PostOpenInsightMetrologyViewerAttachments(descriptions); + PostOpenInsightMetrologyViewerAttachments(jsonElements, descriptions); results = new Tuple>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List()); return results; } diff --git a/Adaptation/FileHandlers/Processed/FileRead.cs b/Adaptation/FileHandlers/Processed/FileRead.cs index 0736643..6f0dc2d 100644 --- a/Adaptation/FileHandlers/Processed/FileRead.cs +++ b/Adaptation/FileHandlers/Processed/FileRead.cs @@ -108,7 +108,7 @@ public class FileRead : Shared.FileRead, IFileRead return results; } - private void DirectoryMove(string reportFullPath, DateTime dateTime, List descriptions) + private void DirectoryMove(string reportFullPath, DateTime dateTime, JsonElement[] jsonElements, List descriptions) { if (dateTime == DateTime.MinValue) 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"); if (fileInfo.Exists && fileInfo.LastWriteTime < 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 }; 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}"; @@ -166,23 +166,24 @@ public class FileRead : Shared.FileRead, IFileRead private Tuple> GetExtractResult(string reportFullPath, DateTime dateTime) { Tuple> results; - ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath); + string[] lines = File.ReadAllLines(reportFullPath); + ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath, lines); _Logistics = new Logistics(reportFullPath, processDataStandardFormat); SetFileParameterLotIDToLogisticsMID(); - JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat); + JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(reportFullPath, lines, processDataStandardFormat); List descriptions = txt.ProcessData.GetDescriptions(jsonElements); Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); results = new Tuple>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List()); if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) - DirectoryMove(reportFullPath, dateTime, descriptions); + DirectoryMove(reportFullPath, dateTime, jsonElements, descriptions); else if (!_IsEAFHosted) { - OpenInsightMetrologyViewer.WSRequest wsRequest = new(this, _Logistics, descriptions); + OpenInsightMetrologyViewer.WSRequest wsRequest = new(this, _Logistics, jsonElements, descriptions); 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 historicalText = File.ReadAllText(jsonFileName); - if (json != historicalText) + if (check != historicalText) throw new Exception("File doesn't match historical!"); } return results; diff --git a/Adaptation/FileHandlers/txt/Description.cs b/Adaptation/FileHandlers/txt/Description.cs index 447be5f..2c5e7f6 100644 --- a/Adaptation/FileHandlers/txt/Description.cs +++ b/Adaptation/FileHandlers/txt/Description.cs @@ -4,341 +4,344 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text.Json; +using System.Text.Json.Serialization; namespace Adaptation.FileHandlers.txt; public class Description : IDescription, Shared.Properties.IDescription { - public int Test { get; set; } - public int Count { get; set; } - public int Index { get; set; } + [JsonPropertyName("EventId")] public int Test { get; set; } + [JsonPropertyName("Count")] public int Count { get; set; } + [JsonPropertyName("Index")] public int Index { get; set; } // public string EventName { get; set; } public string NullData { get; set; } public string JobID { 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 ProcessJobID { get; set; } public string MID { get; set; } // - public string Date { get; set; } - public string Employee { get; set; } - public string Lot { get; set; } - public string PSN { get; set; } - public string Reactor { get; set; } + [JsonPropertyName("Date")] public string Date { get; set; } + [JsonPropertyName("Employee")] public string Employee { get; set; } + [JsonPropertyName("Lot")] public string Lot { get; set; } + [JsonPropertyName("PSN")] public string PSN { get; set; } + [JsonPropertyName("Reactor")] public string Reactor { get; set; } public string Recipe { get; set; } + [JsonPropertyName("IndexOf")] public string IndexOf { get; set; } + [JsonPropertyName("AttemptCounter")] public string AttemptCounter { get; set; } // - public string Grade { get; set; } + [JsonPropertyName("Grade")] public string Grade { get; set; } public string HeaderUniqueId { get; set; } - public string RDS { get; set; } - public string Session { get; set; } - public string Side { get; set; } - public string SrcDest { get; set; } + [JsonPropertyName("RDS")] public string RDS { get; set; } + [JsonPropertyName("Session")] public string Session { get; set; } + [JsonPropertyName("Side")] public string Side { get; set; } + [JsonPropertyName("SrcDest")] public string SrcDest { get; set; } public string UniqueId { get; set; } - public string WaferID { get; set; } + [JsonPropertyName("WaferID")] public string WaferID { get; set; } // - public string DcnAllMax { get; set; } - public string DcnAllMean { get; set; } - public string DcnAllMin { get; set; } - public string DcnAllStdDev { get; set; } - public string DcnAreaCountMax { get; set; } - public string DcnAreaCountMean { get; set; } - public string DcnAreaCountMin { get; set; } - public string DcnAreaCountStdDev { get; set; } - public string DcnAreaMax { get; set; } - public string DcnAreaMean { get; set; } - public string DcnAreaMin { get; set; } - public string DcnAreaStdDev { get; set; } - public string DcnBin1Max { get; set; } - public string DcnBin1Mean { get; set; } - public string DcnBin1Min { get; set; } - public string DcnBin1StdDev { get; set; } - public string DcnBin2Max { get; set; } - public string DcnBin2Mean { get; set; } - public string DcnBin2Min { get; set; } - public string DcnBin2StdDev { get; set; } - public string DcnBin3Max { get; set; } - public string DcnBin3Mean { get; set; } - public string DcnBin3Min { get; set; } - public string DcnBin3StdDev { get; set; } - public string DcnBin4Max { get; set; } - public string DcnBin4Mean { get; set; } - public string DcnBin4Min { get; set; } - public string DcnBin4StdDev { get; set; } - public string DcnBin5Max { get; set; } - public string DcnBin5Mean { get; set; } - public string DcnBin5Min { get; set; } - public string DcnBin5StdDev { get; set; } - public string DcnBin6Max { get; set; } - public string DcnBin6Mean { get; set; } - public string DcnBin6Min { get; set; } - public string DcnBin6StdDev { get; set; } - public string DcnBin7Max { get; set; } - public string DcnBin7Mean { get; set; } - public string DcnBin7Min { get; set; } - public string DcnBin7StdDev { get; set; } - public string DcnBin8Max { get; set; } - public string DcnBin8Mean { get; set; } - public string DcnBin8Min { get; set; } - public string DcnBin8StdDev { get; set; } - public string DcnHazeAvgMax { get; set; } - public string DcnHazeAvgMean { get; set; } - public string DcnHazeAvgMin { get; set; } - public string DcnHazeAvgStdDev { get; set; } - public string DcnHazeMedianMax { get; set; } - public string DcnHazeMedianMean { get; set; } - public string DcnHazeMedianMin { get; set; } - public string DcnHazeMedianStdDev { get; set; } - public string DcnHazeStdDevMax { get; set; } - public string DcnHazeStdDevMean { get; set; } - public string DcnHazeStdDevMin { get; set; } - public string DcnHazeStdDevStdDev { get; set; } - public string DcnLpdESMax { get; set; } - public string DcnLpdESMean { get; set; } - public string DcnLpdESMin { get; set; } - public string DcnLpdESStdDev { get; set; } - public string DcnLpdMax { get; set; } - public string DcnLpdMean { get; set; } - public string DcnLpdMin { get; set; } - public string DcnLpdNMax { get; set; } - public string DcnLpdNMean { get; set; } - public string DcnLpdNMin { get; set; } - public string DcnLpdNStdDev { get; set; } - public string DcnLpdStdDev { get; set; } - public string DcnMicroScrMax { get; set; } - public string DcnMicroScrMean { get; set; } - public string DcnMicroScrMin { get; set; } - public string DcnMicroScrStdDev { get; set; } - public string DcnScrMax { get; set; } - public string DcnScrMean { get; set; } - public string DcnScrMin { get; set; } - public string DcnScrStdDev { get; set; } - public string DcnSlipMax { get; set; } - public string DcnSlipMean { get; set; } - public string DcnSlipMin { get; set; } - public string DcnSlipStdDev { get; set; } - public string DnnAllMax { get; set; } - public string DnnAllMean { get; set; } - public string DnnAllMin { get; set; } - public string DnnAllStdDev { get; set; } - public string DnnAreaCountMax { get; set; } - public string DnnAreaCountMean { get; set; } - public string DnnAreaCountMin { get; set; } - public string DnnAreaCountStdDev { get; set; } - public string DnnAreaMax { get; set; } - public string DnnAreaMean { get; set; } - public string DnnAreaMin { get; set; } - public string DnnAreaStdDev { get; set; } - public string DnnBin1Max { get; set; } - public string DnnBin1Mean { get; set; } - public string DnnBin1Min { get; set; } - public string DnnBin1StdDev { get; set; } - public string DnnBin2Max { get; set; } - public string DnnBin2Mean { get; set; } - public string DnnBin2Min { get; set; } - public string DnnBin2StdDev { get; set; } - public string DnnBin3Max { get; set; } - public string DnnBin3Mean { get; set; } - public string DnnBin3Min { get; set; } - public string DnnBin3StdDev { get; set; } - public string DnnBin4Max { get; set; } - public string DnnBin4Mean { get; set; } - public string DnnBin4Min { get; set; } - public string DnnBin4StdDev { get; set; } - public string DnnBin5Max { get; set; } - public string DnnBin5Mean { get; set; } - public string DnnBin5Min { get; set; } - public string DnnBin5StdDev { get; set; } - public string DnnBin6Max { get; set; } - public string DnnBin6Mean { get; set; } - public string DnnBin6Min { get; set; } - public string DnnBin6StdDev { get; set; } - public string DnnBin7Max { get; set; } - public string DnnBin7Mean { get; set; } - public string DnnBin7Min { get; set; } - public string DnnBin7StdDev { get; set; } - public string DnnBin8Max { get; set; } - public string DnnBin8Mean { get; set; } - public string DnnBin8Min { get; set; } - public string DnnBin8StdDev { get; set; } - public string DnnHazeAvgMax { get; set; } - public string DnnHazeAvgMean { get; set; } - public string DnnHazeAvgMin { get; set; } - public string DnnHazeAvgStdDev { get; set; } - public string DnnHazeMedianMax { get; set; } - public string DnnHazeMedianMean { get; set; } - public string DnnHazeMedianMin { get; set; } - public string DnnHazeMedianStdDev { get; set; } - public string DnnHazeStdDevMax { get; set; } - public string DnnHazeStdDevMean { get; set; } - public string DnnHazeStdDevMin { get; set; } - public string DnnHazeStdDevStdDev { get; set; } - public string DnnLpdESMax { get; set; } - public string DnnLpdESMean { get; set; } - public string DnnLpdESMin { get; set; } - public string DnnLpdESStdDev { get; set; } - public string DnnLpdMax { get; set; } - public string DnnLpdMean { get; set; } - public string DnnLpdMin { get; set; } - public string DnnLpdNMax { get; set; } - public string DnnLpdNMean { get; set; } - public string DnnLpdNMin { get; set; } - public string DnnLpdNStdDev { get; set; } - public string DnnLpdStdDev { get; set; } - public string DnnMicroScrMax { get; set; } - public string DnnMicroScrMean { get; set; } - public string DnnMicroScrMin { get; set; } - public string DnnMicroScrStdDev { get; set; } - public string DnnScrMax { get; set; } - public string DnnScrMean { get; set; } - public string DnnScrMin { get; set; } - public string DnnScrStdDev { get; set; } - public string DnnSlipMax { get; set; } - public string DnnSlipMean { get; set; } - public string DnnSlipMin { get; set; } - public string DnnSlipStdDev { get; set; } - public string DwnAllMax { get; set; } - public string DwnAllMean { get; set; } - public string DwnAllMin { get; set; } - public string DwnAllStdDev { get; set; } - public string DwnAreaCountMax { get; set; } - public string DwnAreaCountMean { get; set; } - public string DwnAreaCountMin { get; set; } - public string DwnAreaCountStdDev { get; set; } - public string DwnAreaMax { get; set; } - public string DwnAreaMean { get; set; } - public string DwnAreaMin { get; set; } - public string DwnAreaStdDev { get; set; } - public string DwnBin1Max { get; set; } - public string DwnBin1Mean { get; set; } - public string DwnBin1Min { get; set; } - public string DwnBin1StdDev { get; set; } - public string DwnBin2Max { get; set; } - public string DwnBin2Mean { get; set; } - public string DwnBin2Min { get; set; } - public string DwnBin2StdDev { get; set; } - public string DwnBin3Max { get; set; } - public string DwnBin3Mean { get; set; } - public string DwnBin3Min { get; set; } - public string DwnBin3StdDev { get; set; } - public string DwnBin4Max { get; set; } - public string DwnBin4Mean { get; set; } - public string DwnBin4Min { get; set; } - public string DwnBin4StdDev { get; set; } - public string DwnBin5Max { get; set; } - public string DwnBin5Mean { get; set; } - public string DwnBin5Min { get; set; } - public string DwnBin5StdDev { get; set; } - public string DwnBin6Max { get; set; } - public string DwnBin6Mean { get; set; } - public string DwnBin6Min { get; set; } - public string DwnBin6StdDev { get; set; } - public string DwnBin7Max { get; set; } - public string DwnBin7Mean { get; set; } - public string DwnBin7Min { get; set; } - public string DwnBin7StdDev { get; set; } - public string DwnBin8Max { get; set; } - public string DwnBin8Mean { get; set; } - public string DwnBin8Min { get; set; } - public string DwnBin8StdDev { get; set; } - public string DwnHazeAvgMax { get; set; } - public string DwnHazeAvgMean { get; set; } - public string DwnHazeAvgMin { get; set; } - public string DwnHazeAvgStdDev { get; set; } - public string DwnHazeMedianMax { get; set; } - public string DwnHazeMedianMean { get; set; } - public string DwnHazeMedianMin { get; set; } - public string DwnHazeMedianStdDev { get; set; } - public string DwnHazeStdDevMax { get; set; } - public string DwnHazeStdDevMean { get; set; } - public string DwnHazeStdDevMin { get; set; } - public string DwnHazeStdDevStdDev { get; set; } - public string DwnLpdESMax { get; set; } - public string DwnLpdESMean { get; set; } - public string DwnLpdESMin { get; set; } - public string DwnLpdESStdDev { get; set; } - public string DwnLpdMax { get; set; } - public string DwnLpdMean { get; set; } - public string DwnLpdMin { get; set; } - public string DwnLpdNMax { get; set; } - public string DwnLpdNMean { get; set; } - public string DwnLpdNMin { get; set; } - public string DwnLpdNStdDev { get; set; } - public string DwnLpdStdDev { get; set; } - public string DwnMicroScrMax { get; set; } - public string DwnMicroScrMean { get; set; } - public string DwnMicroScrMin { get; set; } - public string DwnMicroScrStdDev { get; set; } - public string DwnScrMax { get; set; } - public string DwnScrMean { get; set; } - public string DwnScrMin { get; set; } - public string DwnScrStdDev { get; set; } - public string DwnSlipMax { get; set; } - public string DwnSlipMean { get; set; } - public string DwnSlipMin { get; set; } - public string DwnSlipStdDev { get; set; } - public string DcnAll { get; set; } - public string DcnArea { get; set; } - public string DcnAreaCount { get; set; } - public string DcnBin1 { get; set; } - public string DcnBin2 { get; set; } - public string DcnBin3 { get; set; } - public string DcnBin4 { get; set; } - public string DcnBin5 { get; set; } - public string DcnBin6 { get; set; } - public string DcnBin7 { get; set; } - public string DcnBin8 { get; set; } - public string DcnHazeAvg { get; set; } - public string DcnHazeMedian { get; set; } - public string DcnHazeStdDev { get; set; } - public string DcnLpd { get; set; } - public string DcnLpdES { get; set; } - public string DcnLpdN { get; set; } - public string DcnMicroScr { get; set; } - public string DcnScr { get; set; } - public string DcnSlip { get; set; } - public string DnnAll { get; set; } - public string DnnArea { get; set; } - public string DnnAreaCount { get; set; } - public string DnnBin1 { get; set; } - public string DnnBin2 { get; set; } - public string DnnBin3 { get; set; } - public string DnnBin4 { get; set; } - public string DnnBin5 { get; set; } - public string DnnBin6 { get; set; } - public string DnnBin7 { get; set; } - public string DnnBin8 { get; set; } - public string DnnHazeAvg { get; set; } - public string DnnHazeMedian { get; set; } - public string DnnHazeStdDev { get; set; } - public string DnnLpd { get; set; } - public string DnnLpdES { get; set; } - public string DnnLpdN { get; set; } - public string DnnMicroScr { get; set; } - public string DnnScr { get; set; } - public string DnnSlip { get; set; } - public string DwnAll { get; set; } - public string DwnArea { get; set; } - public string DwnAreaCount { get; set; } - public string DwnBin1 { get; set; } - public string DwnBin2 { get; set; } - public string DwnBin3 { get; set; } - public string DwnBin4 { get; set; } - public string DwnBin5 { get; set; } - public string DwnBin6 { get; set; } - public string DwnBin7 { get; set; } - public string DwnBin8 { get; set; } - public string DwnHazeAvg { get; set; } - public string DwnHazeMedian { get; set; } - public string DwnHazeStdDev { get; set; } - public string DwnLpd { get; set; } - public string DwnLpdES { get; set; } - public string DwnLpdN { get; set; } - public string DwnMicroScr { get; set; } - public string DwnScr { get; set; } - public string DwnSlip { get; set; } + [JsonPropertyName("DcnAllMax")] public string DcnAllMax { get; set; } + [JsonPropertyName("DcnAllMean")] public string DcnAllMean { get; set; } + [JsonPropertyName("DcnAllMin")] public string DcnAllMin { get; set; } + [JsonPropertyName("DcnAllStdDev")] public string DcnAllStdDev { get; set; } + [JsonPropertyName("DcnAreaCountMax")] public string DcnAreaCountMax { get; set; } + [JsonPropertyName("DcnAreaCountMean")] public string DcnAreaCountMean { get; set; } + [JsonPropertyName("DcnAreaCountMin")] public string DcnAreaCountMin { get; set; } + [JsonPropertyName("DcnAreaCountStdDev")] public string DcnAreaCountStdDev { get; set; } + [JsonPropertyName("DcnAreaMax")] public string DcnAreaMax { get; set; } + [JsonPropertyName("DcnAreaMean")] public string DcnAreaMean { get; set; } + [JsonPropertyName("DcnAreaMin")] public string DcnAreaMin { get; set; } + [JsonPropertyName("DcnAreaStdDev")] public string DcnAreaStdDev { get; set; } + [JsonPropertyName("DcnBin1Max")] public string DcnBin1Max { get; set; } + [JsonPropertyName("DcnBin1Mean")] public string DcnBin1Mean { get; set; } + [JsonPropertyName("DcnBin1Min")] public string DcnBin1Min { get; set; } + [JsonPropertyName("DcnBin1StdDev")] public string DcnBin1StdDev { get; set; } + [JsonPropertyName("DcnBin2Max")] public string DcnBin2Max { get; set; } + [JsonPropertyName("DcnBin2Mean")] public string DcnBin2Mean { get; set; } + [JsonPropertyName("DcnBin2Min")] public string DcnBin2Min { get; set; } + [JsonPropertyName("DcnBin2StdDev")] public string DcnBin2StdDev { get; set; } + [JsonPropertyName("DcnBin3Max")] public string DcnBin3Max { get; set; } + [JsonPropertyName("DcnBin3Mean")] public string DcnBin3Mean { get; set; } + [JsonPropertyName("DcnBin3Min")] public string DcnBin3Min { get; set; } + [JsonPropertyName("DcnBin3StdDev")] public string DcnBin3StdDev { get; set; } + [JsonPropertyName("DcnBin4Max")] public string DcnBin4Max { get; set; } + [JsonPropertyName("DcnBin4Mean")] public string DcnBin4Mean { get; set; } + [JsonPropertyName("DcnBin4Min")] public string DcnBin4Min { get; set; } + [JsonPropertyName("DcnBin4StdDev")] public string DcnBin4StdDev { get; set; } + [JsonPropertyName("DcnBin5Max")] public string DcnBin5Max { get; set; } + [JsonPropertyName("DcnBin5Mean")] public string DcnBin5Mean { get; set; } + [JsonPropertyName("DcnBin5Min")] public string DcnBin5Min { get; set; } + [JsonPropertyName("DcnBin5StdDev")] public string DcnBin5StdDev { get; set; } + [JsonPropertyName("DcnBin6Max")] public string DcnBin6Max { get; set; } + [JsonPropertyName("DcnBin6Mean")] public string DcnBin6Mean { get; set; } + [JsonPropertyName("DcnBin6Min")] public string DcnBin6Min { get; set; } + [JsonPropertyName("DcnBin6StdDev")] public string DcnBin6StdDev { get; set; } + [JsonPropertyName("DcnBin7Max")] public string DcnBin7Max { get; set; } + [JsonPropertyName("DcnBin7Mean")] public string DcnBin7Mean { get; set; } + [JsonPropertyName("DcnBin7Min")] public string DcnBin7Min { get; set; } + [JsonPropertyName("DcnBin7StdDev")] public string DcnBin7StdDev { get; set; } + [JsonPropertyName("DcnBin8Max")] public string DcnBin8Max { get; set; } + [JsonPropertyName("DcnBin8Mean")] public string DcnBin8Mean { get; set; } + [JsonPropertyName("DcnBin8Min")] public string DcnBin8Min { get; set; } + [JsonPropertyName("DcnBin8StdDev")] public string DcnBin8StdDev { get; set; } + [JsonPropertyName("DcnHazeAvgMax")] public string DcnHazeAvgMax { get; set; } + [JsonPropertyName("DcnHazeAvgMean")] public string DcnHazeAvgMean { get; set; } + [JsonPropertyName("DcnHazeAvgMin")] public string DcnHazeAvgMin { get; set; } + [JsonPropertyName("DcnHazeAvgStdDev")] public string DcnHazeAvgStdDev { get; set; } + [JsonPropertyName("DcnHazeMedianMax")] public string DcnHazeMedianMax { get; set; } + [JsonPropertyName("DcnHazeMedianMean")] public string DcnHazeMedianMean { get; set; } + [JsonPropertyName("DcnHazeMedianMin")] public string DcnHazeMedianMin { get; set; } + [JsonPropertyName("DcnHazeMedianStdDev")] public string DcnHazeMedianStdDev { get; set; } + [JsonPropertyName("DcnHazeStdDevMax")] public string DcnHazeStdDevMax { get; set; } + [JsonPropertyName("DcnHazeStdDevMean")] public string DcnHazeStdDevMean { get; set; } + [JsonPropertyName("DcnHazeStdDevMin")] public string DcnHazeStdDevMin { get; set; } + [JsonPropertyName("DcnHazeStdDevStdDev")] public string DcnHazeStdDevStdDev { get; set; } + [JsonPropertyName("DcnLpdESMax")] public string DcnLpdESMax { get; set; } + [JsonPropertyName("DcnLpdESMean")] public string DcnLpdESMean { get; set; } + [JsonPropertyName("DcnLpdESMin")] public string DcnLpdESMin { get; set; } + [JsonPropertyName("DcnLpdESStdDev")] public string DcnLpdESStdDev { get; set; } + [JsonPropertyName("DcnLpdMax")] public string DcnLpdMax { get; set; } + [JsonPropertyName("DcnLpdMean")] public string DcnLpdMean { get; set; } + [JsonPropertyName("DcnLpdMin")] public string DcnLpdMin { get; set; } + [JsonPropertyName("DcnLpdNMax")] public string DcnLpdNMax { get; set; } + [JsonPropertyName("DcnLpdNMean")] public string DcnLpdNMean { get; set; } + [JsonPropertyName("DcnLpdNMin")] public string DcnLpdNMin { get; set; } + [JsonPropertyName("DcnLpdNStdDev")] public string DcnLpdNStdDev { get; set; } + [JsonPropertyName("DcnLpdStdDev")] public string DcnLpdStdDev { get; set; } + [JsonPropertyName("DcnMicroScrMax")] public string DcnMicroScrMax { get; set; } + [JsonPropertyName("DcnMicroScrMean")] public string DcnMicroScrMean { get; set; } + [JsonPropertyName("DcnMicroScrMin")] public string DcnMicroScrMin { get; set; } + [JsonPropertyName("DcnMicroScrStdDev")] public string DcnMicroScrStdDev { get; set; } + [JsonPropertyName("DcnScrMax")] public string DcnScrMax { get; set; } + [JsonPropertyName("DcnScrMean")] public string DcnScrMean { get; set; } + [JsonPropertyName("DcnScrMin")] public string DcnScrMin { get; set; } + [JsonPropertyName("DcnScrStdDev")] public string DcnScrStdDev { get; set; } + [JsonPropertyName("DcnSlipMax")] public string DcnSlipMax { get; set; } + [JsonPropertyName("DcnSlipMean")] public string DcnSlipMean { get; set; } + [JsonPropertyName("DcnSlipMin")] public string DcnSlipMin { get; set; } + [JsonPropertyName("DcnSlipStdDev")] public string DcnSlipStdDev { get; set; } + [JsonPropertyName("DnnAllMax")] public string DnnAllMax { get; set; } + [JsonPropertyName("DnnAllMean")] public string DnnAllMean { get; set; } + [JsonPropertyName("DnnAllMin")] public string DnnAllMin { get; set; } + [JsonPropertyName("DnnAllStdDev")] public string DnnAllStdDev { get; set; } + [JsonPropertyName("DnnAreaCountMax")] public string DnnAreaCountMax { get; set; } + [JsonPropertyName("DnnAreaCountMean")] public string DnnAreaCountMean { get; set; } + [JsonPropertyName("DnnAreaCountMin")] public string DnnAreaCountMin { get; set; } + [JsonPropertyName("DnnAreaCountStdDev")] public string DnnAreaCountStdDev { get; set; } + [JsonPropertyName("DnnAreaMax")] public string DnnAreaMax { get; set; } + [JsonPropertyName("DnnAreaMean")] public string DnnAreaMean { get; set; } + [JsonPropertyName("DnnAreaMin")] public string DnnAreaMin { get; set; } + [JsonPropertyName("DnnAreaStdDev")] public string DnnAreaStdDev { get; set; } + [JsonPropertyName("DnnBin1Max")] public string DnnBin1Max { get; set; } + [JsonPropertyName("DnnBin1Mean")] public string DnnBin1Mean { get; set; } + [JsonPropertyName("DnnBin1Min")] public string DnnBin1Min { get; set; } + [JsonPropertyName("DnnBin1StdDev")] public string DnnBin1StdDev { get; set; } + [JsonPropertyName("DnnBin2Max")] public string DnnBin2Max { get; set; } + [JsonPropertyName("DnnBin2Mean")] public string DnnBin2Mean { get; set; } + [JsonPropertyName("DnnBin2Min")] public string DnnBin2Min { get; set; } + [JsonPropertyName("DnnBin2StdDev")] public string DnnBin2StdDev { get; set; } + [JsonPropertyName("DnnBin3Max")] public string DnnBin3Max { get; set; } + [JsonPropertyName("DnnBin3Mean")] public string DnnBin3Mean { get; set; } + [JsonPropertyName("DnnBin3Min")] public string DnnBin3Min { get; set; } + [JsonPropertyName("DnnBin3StdDev")] public string DnnBin3StdDev { get; set; } + [JsonPropertyName("DnnBin4Max")] public string DnnBin4Max { get; set; } + [JsonPropertyName("DnnBin4Mean")] public string DnnBin4Mean { get; set; } + [JsonPropertyName("DnnBin4Min")] public string DnnBin4Min { get; set; } + [JsonPropertyName("DnnBin4StdDev")] public string DnnBin4StdDev { get; set; } + [JsonPropertyName("DnnBin5Max")] public string DnnBin5Max { get; set; } + [JsonPropertyName("DnnBin5Mean")] public string DnnBin5Mean { get; set; } + [JsonPropertyName("DnnBin5Min")] public string DnnBin5Min { get; set; } + [JsonPropertyName("DnnBin5StdDev")] public string DnnBin5StdDev { get; set; } + [JsonPropertyName("DnnBin6Max")] public string DnnBin6Max { get; set; } + [JsonPropertyName("DnnBin6Mean")] public string DnnBin6Mean { get; set; } + [JsonPropertyName("DnnBin6Min")] public string DnnBin6Min { get; set; } + [JsonPropertyName("DnnBin6StdDev")] public string DnnBin6StdDev { get; set; } + [JsonPropertyName("DnnBin7Max")] public string DnnBin7Max { get; set; } + [JsonPropertyName("DnnBin7Mean")] public string DnnBin7Mean { get; set; } + [JsonPropertyName("DnnBin7Min")] public string DnnBin7Min { get; set; } + [JsonPropertyName("DnnBin7StdDev")] public string DnnBin7StdDev { get; set; } + [JsonPropertyName("DnnBin8Max")] public string DnnBin8Max { get; set; } + [JsonPropertyName("DnnBin8Mean")] public string DnnBin8Mean { get; set; } + [JsonPropertyName("DnnBin8Min")] public string DnnBin8Min { get; set; } + [JsonPropertyName("DnnBin8StdDev")] public string DnnBin8StdDev { get; set; } + [JsonPropertyName("DnnHazeAvgMax")] public string DnnHazeAvgMax { get; set; } + [JsonPropertyName("DnnHazeAvgMean")] public string DnnHazeAvgMean { get; set; } + [JsonPropertyName("DnnHazeAvgMin")] public string DnnHazeAvgMin { get; set; } + [JsonPropertyName("DnnHazeAvgStdDev")] public string DnnHazeAvgStdDev { get; set; } + [JsonPropertyName("DnnHazeMedianMax")] public string DnnHazeMedianMax { get; set; } + [JsonPropertyName("DnnHazeMedianMean")] public string DnnHazeMedianMean { get; set; } + [JsonPropertyName("DnnHazeMedianMin")] public string DnnHazeMedianMin { get; set; } + [JsonPropertyName("DnnHazeMedianStdDev")] public string DnnHazeMedianStdDev { get; set; } + [JsonPropertyName("DnnHazeStdDevMax")] public string DnnHazeStdDevMax { get; set; } + [JsonPropertyName("DnnHazeStdDevMean")] public string DnnHazeStdDevMean { get; set; } + [JsonPropertyName("DnnHazeStdDevMin")] public string DnnHazeStdDevMin { get; set; } + [JsonPropertyName("DnnHazeStdDevStdDev")] public string DnnHazeStdDevStdDev { get; set; } + [JsonPropertyName("DnnLpdESMax")] public string DnnLpdESMax { get; set; } + [JsonPropertyName("DnnLpdESMean")] public string DnnLpdESMean { get; set; } + [JsonPropertyName("DnnLpdESMin")] public string DnnLpdESMin { get; set; } + [JsonPropertyName("DnnLpdESStdDev")] public string DnnLpdESStdDev { get; set; } + [JsonPropertyName("DnnLpdMax")] public string DnnLpdMax { get; set; } + [JsonPropertyName("DnnLpdMean")] public string DnnLpdMean { get; set; } + [JsonPropertyName("DnnLpdMin")] public string DnnLpdMin { get; set; } + [JsonPropertyName("DnnLpdNMax")] public string DnnLpdNMax { get; set; } + [JsonPropertyName("DnnLpdNMean")] public string DnnLpdNMean { get; set; } + [JsonPropertyName("DnnLpdNMin")] public string DnnLpdNMin { get; set; } + [JsonPropertyName("DnnLpdNStdDev")] public string DnnLpdNStdDev { get; set; } + [JsonPropertyName("DnnLpdStdDev")] public string DnnLpdStdDev { get; set; } + [JsonPropertyName("DnnMicroScrMax")] public string DnnMicroScrMax { get; set; } + [JsonPropertyName("DnnMicroScrMean")] public string DnnMicroScrMean { get; set; } + [JsonPropertyName("DnnMicroScrMin")] public string DnnMicroScrMin { get; set; } + [JsonPropertyName("DnnMicroScrStdDev")] public string DnnMicroScrStdDev { get; set; } + [JsonPropertyName("DnnScrMax")] public string DnnScrMax { get; set; } + [JsonPropertyName("DnnScrMean")] public string DnnScrMean { get; set; } + [JsonPropertyName("DnnScrMin")] public string DnnScrMin { get; set; } + [JsonPropertyName("DnnScrStdDev")] public string DnnScrStdDev { get; set; } + [JsonPropertyName("DnnSlipMax")] public string DnnSlipMax { get; set; } + [JsonPropertyName("DnnSlipMean")] public string DnnSlipMean { get; set; } + [JsonPropertyName("DnnSlipMin")] public string DnnSlipMin { get; set; } + [JsonPropertyName("DnnSlipStdDev")] public string DnnSlipStdDev { get; set; } + [JsonPropertyName("DwnAllMax")] public string DwnAllMax { get; set; } + [JsonPropertyName("DwnAllMean")] public string DwnAllMean { get; set; } + [JsonPropertyName("DwnAllMin")] public string DwnAllMin { get; set; } + [JsonPropertyName("DwnAllStdDev")] public string DwnAllStdDev { get; set; } + [JsonPropertyName("DwnAreaCountMax")] public string DwnAreaCountMax { get; set; } + [JsonPropertyName("DwnAreaCountMean")] public string DwnAreaCountMean { get; set; } + [JsonPropertyName("DwnAreaCountMin")] public string DwnAreaCountMin { get; set; } + [JsonPropertyName("DwnAreaCountStdDev")] public string DwnAreaCountStdDev { get; set; } + [JsonPropertyName("DwnAreaMax")] public string DwnAreaMax { get; set; } + [JsonPropertyName("DwnAreaMean")] public string DwnAreaMean { get; set; } + [JsonPropertyName("DwnAreaMin")] public string DwnAreaMin { get; set; } + [JsonPropertyName("DwnAreaStdDev")] public string DwnAreaStdDev { get; set; } + [JsonPropertyName("DwnBin1Max")] public string DwnBin1Max { get; set; } + [JsonPropertyName("DwnBin1Mean")] public string DwnBin1Mean { get; set; } + [JsonPropertyName("DwnBin1Min")] public string DwnBin1Min { get; set; } + [JsonPropertyName("DwnBin1StdDev")] public string DwnBin1StdDev { get; set; } + [JsonPropertyName("DwnBin2Max")] public string DwnBin2Max { get; set; } + [JsonPropertyName("DwnBin2Mean")] public string DwnBin2Mean { get; set; } + [JsonPropertyName("DwnBin2Min")] public string DwnBin2Min { get; set; } + [JsonPropertyName("DwnBin2StdDev")] public string DwnBin2StdDev { get; set; } + [JsonPropertyName("DwnBin3Max")] public string DwnBin3Max { get; set; } + [JsonPropertyName("DwnBin3Mean")] public string DwnBin3Mean { get; set; } + [JsonPropertyName("DwnBin3Min")] public string DwnBin3Min { get; set; } + [JsonPropertyName("DwnBin3StdDev")] public string DwnBin3StdDev { get; set; } + [JsonPropertyName("DwnBin4Max")] public string DwnBin4Max { get; set; } + [JsonPropertyName("DwnBin4Mean")] public string DwnBin4Mean { get; set; } + [JsonPropertyName("DwnBin4Min")] public string DwnBin4Min { get; set; } + [JsonPropertyName("DwnBin4StdDev")] public string DwnBin4StdDev { get; set; } + [JsonPropertyName("DwnBin5Max")] public string DwnBin5Max { get; set; } + [JsonPropertyName("DwnBin5Mean")] public string DwnBin5Mean { get; set; } + [JsonPropertyName("DwnBin5Min")] public string DwnBin5Min { get; set; } + [JsonPropertyName("DwnBin5StdDev")] public string DwnBin5StdDev { get; set; } + [JsonPropertyName("DwnBin6Max")] public string DwnBin6Max { get; set; } + [JsonPropertyName("DwnBin6Mean")] public string DwnBin6Mean { get; set; } + [JsonPropertyName("DwnBin6Min")] public string DwnBin6Min { get; set; } + [JsonPropertyName("DwnBin6StdDev")] public string DwnBin6StdDev { get; set; } + [JsonPropertyName("DwnBin7Max")] public string DwnBin7Max { get; set; } + [JsonPropertyName("DwnBin7Mean")] public string DwnBin7Mean { get; set; } + [JsonPropertyName("DwnBin7Min")] public string DwnBin7Min { get; set; } + [JsonPropertyName("DwnBin7StdDev")] public string DwnBin7StdDev { get; set; } + [JsonPropertyName("DwnBin8Max")] public string DwnBin8Max { get; set; } + [JsonPropertyName("DwnBin8Mean")] public string DwnBin8Mean { get; set; } + [JsonPropertyName("DwnBin8Min")] public string DwnBin8Min { get; set; } + [JsonPropertyName("DwnBin8StdDev")] public string DwnBin8StdDev { get; set; } + [JsonPropertyName("DwnHazeAvgMax")] public string DwnHazeAvgMax { get; set; } + [JsonPropertyName("DwnHazeAvgMean")] public string DwnHazeAvgMean { get; set; } + [JsonPropertyName("DwnHazeAvgMin")] public string DwnHazeAvgMin { get; set; } + [JsonPropertyName("DwnHazeAvgStdDev")] public string DwnHazeAvgStdDev { get; set; } + [JsonPropertyName("DwnHazeMedianMax")] public string DwnHazeMedianMax { get; set; } + [JsonPropertyName("DwnHazeMedianMean")] public string DwnHazeMedianMean { get; set; } + [JsonPropertyName("DwnHazeMedianMin")] public string DwnHazeMedianMin { get; set; } + [JsonPropertyName("DwnHazeMedianStdDev")] public string DwnHazeMedianStdDev { get; set; } + [JsonPropertyName("DwnHazeStdDevMax")] public string DwnHazeStdDevMax { get; set; } + [JsonPropertyName("DwnHazeStdDevMean")] public string DwnHazeStdDevMean { get; set; } + [JsonPropertyName("DwnHazeStdDevMin")] public string DwnHazeStdDevMin { get; set; } + [JsonPropertyName("DwnHazeStdDevStdDev")] public string DwnHazeStdDevStdDev { get; set; } + [JsonPropertyName("DwnLpdESMax")] public string DwnLpdESMax { get; set; } + [JsonPropertyName("DwnLpdESMean")] public string DwnLpdESMean { get; set; } + [JsonPropertyName("DwnLpdESMin")] public string DwnLpdESMin { get; set; } + [JsonPropertyName("DwnLpdESStdDev")] public string DwnLpdESStdDev { get; set; } + [JsonPropertyName("DwnLpdMax")] public string DwnLpdMax { get; set; } + [JsonPropertyName("DwnLpdMean")] public string DwnLpdMean { get; set; } + [JsonPropertyName("DwnLpdMin")] public string DwnLpdMin { get; set; } + [JsonPropertyName("DwnLpdNMax")] public string DwnLpdNMax { get; set; } + [JsonPropertyName("DwnLpdNMean")] public string DwnLpdNMean { get; set; } + [JsonPropertyName("DwnLpdNMin")] public string DwnLpdNMin { get; set; } + [JsonPropertyName("DwnLpdNStdDev")] public string DwnLpdNStdDev { get; set; } + [JsonPropertyName("DwnLpdStdDev")] public string DwnLpdStdDev { get; set; } + [JsonPropertyName("DwnMicroScrMax")] public string DwnMicroScrMax { get; set; } + [JsonPropertyName("DwnMicroScrMean")] public string DwnMicroScrMean { get; set; } + [JsonPropertyName("DwnMicroScrMin")] public string DwnMicroScrMin { get; set; } + [JsonPropertyName("DwnMicroScrStdDev")] public string DwnMicroScrStdDev { get; set; } + [JsonPropertyName("DwnScrMax")] public string DwnScrMax { get; set; } + [JsonPropertyName("DwnScrMean")] public string DwnScrMean { get; set; } + [JsonPropertyName("DwnScrMin")] public string DwnScrMin { get; set; } + [JsonPropertyName("DwnScrStdDev")] public string DwnScrStdDev { get; set; } + [JsonPropertyName("DwnSlipMax")] public string DwnSlipMax { get; set; } + [JsonPropertyName("DwnSlipMean")] public string DwnSlipMean { get; set; } + [JsonPropertyName("DwnSlipMin")] public string DwnSlipMin { get; set; } + [JsonPropertyName("DwnSlipStdDev")] public string DwnSlipStdDev { get; set; } + [JsonPropertyName("DcnAll")] public string DcnAll { get; set; } + [JsonPropertyName("DcnArea")] public string DcnArea { get; set; } + [JsonPropertyName("DcnAreaCount")] public string DcnAreaCount { get; set; } + [JsonPropertyName("DcnBin1")] public string DcnBin1 { get; set; } + [JsonPropertyName("DcnBin2")] public string DcnBin2 { get; set; } + [JsonPropertyName("DcnBin3")] public string DcnBin3 { get; set; } + [JsonPropertyName("DcnBin4")] public string DcnBin4 { get; set; } + [JsonPropertyName("DcnBin5")] public string DcnBin5 { get; set; } + [JsonPropertyName("DcnBin6")] public string DcnBin6 { get; set; } + [JsonPropertyName("DcnBin7")] public string DcnBin7 { get; set; } + [JsonPropertyName("DcnBin8")] public string DcnBin8 { get; set; } + [JsonPropertyName("DcnHazeAvg")] public string DcnHazeAvg { get; set; } + [JsonPropertyName("DcnHazeMedian")] public string DcnHazeMedian { get; set; } + [JsonPropertyName("DcnHazeStdDev")] public string DcnHazeStdDev { get; set; } + [JsonPropertyName("DcnLpd")] public string DcnLpd { get; set; } + [JsonPropertyName("DcnLpdES")] public string DcnLpdES { get; set; } + [JsonPropertyName("DcnLpdN")] public string DcnLpdN { get; set; } + [JsonPropertyName("DcnMicroScr")] public string DcnMicroScr { get; set; } + [JsonPropertyName("DcnScr")] public string DcnScr { get; set; } + [JsonPropertyName("DcnSlip")] public string DcnSlip { get; set; } + [JsonPropertyName("DnnAll")] public string DnnAll { get; set; } + [JsonPropertyName("DnnArea")] public string DnnArea { get; set; } + [JsonPropertyName("DnnAreaCount")] public string DnnAreaCount { get; set; } + [JsonPropertyName("DnnBin1")] public string DnnBin1 { get; set; } + [JsonPropertyName("DnnBin2")] public string DnnBin2 { get; set; } + [JsonPropertyName("DnnBin3")] public string DnnBin3 { get; set; } + [JsonPropertyName("DnnBin4")] public string DnnBin4 { get; set; } + [JsonPropertyName("DnnBin5")] public string DnnBin5 { get; set; } + [JsonPropertyName("DnnBin6")] public string DnnBin6 { get; set; } + [JsonPropertyName("DnnBin7")] public string DnnBin7 { get; set; } + [JsonPropertyName("DnnBin8")] public string DnnBin8 { get; set; } + [JsonPropertyName("DnnHazeAvg")] public string DnnHazeAvg { get; set; } + [JsonPropertyName("DnnHazeMedian")] public string DnnHazeMedian { get; set; } + [JsonPropertyName("DnnHazeStdDev")] public string DnnHazeStdDev { get; set; } + [JsonPropertyName("DnnLpd")] public string DnnLpd { get; set; } + [JsonPropertyName("DnnLpdES")] public string DnnLpdES { get; set; } + [JsonPropertyName("DnnLpdN")] public string DnnLpdN { get; set; } + [JsonPropertyName("DnnMicroScr")] public string DnnMicroScr { get; set; } + [JsonPropertyName("DnnScr")] public string DnnScr { get; set; } + [JsonPropertyName("DnnSlip")] public string DnnSlip { get; set; } + [JsonPropertyName("DwnAll")] public string DwnAll { get; set; } + [JsonPropertyName("DwnArea")] public string DwnArea { get; set; } + [JsonPropertyName("DwnAreaCount")] public string DwnAreaCount { get; set; } + [JsonPropertyName("DwnBin1")] public string DwnBin1 { get; set; } + [JsonPropertyName("DwnBin2")] public string DwnBin2 { get; set; } + [JsonPropertyName("DwnBin3")] public string DwnBin3 { get; set; } + [JsonPropertyName("DwnBin4")] public string DwnBin4 { get; set; } + [JsonPropertyName("DwnBin5")] public string DwnBin5 { get; set; } + [JsonPropertyName("DwnBin6")] public string DwnBin6 { get; set; } + [JsonPropertyName("DwnBin7")] public string DwnBin7 { get; set; } + [JsonPropertyName("DwnBin8")] public string DwnBin8 { get; set; } + [JsonPropertyName("DwnHazeAvg")] public string DwnHazeAvg { get; set; } + [JsonPropertyName("DwnHazeMedian")] public string DwnHazeMedian { get; set; } + [JsonPropertyName("DwnHazeStdDev")] public string DwnHazeStdDev { get; set; } + [JsonPropertyName("DwnLpd")] public string DwnLpd { get; set; } + [JsonPropertyName("DwnLpdES")] public string DwnLpdES { get; set; } + [JsonPropertyName("DwnLpdN")] public string DwnLpdN { get; set; } + [JsonPropertyName("DwnMicroScr")] public string DwnMicroScr { get; set; } + [JsonPropertyName("DwnScr")] public string DwnScr { get; set; } + [JsonPropertyName("DwnSlip")] public string DwnSlip { get; set; } string IDescription.GetEventDescription() => "File Has been read and parsed"; @@ -782,6 +785,8 @@ public class Description : IDescription, Shared.Properties.IDescription PSN = processData.PSN, Reactor = processData.Reactor, Recipe = processData.Recipe, + IndexOf = nameof(IndexOf), + AttemptCounter = nameof(AttemptCounter), // Grade = detail.Grade, HeaderUniqueId = detail.HeaderUniqueID, @@ -1128,6 +1133,8 @@ public class Description : IDescription, Shared.Properties.IDescription PSN = nameof(PSN), Reactor = nameof(Reactor), Recipe = nameof(Recipe), + IndexOf = nameof(IndexOf), + AttemptCounter = nameof(AttemptCounter), // Grade = nameof(Grade), HeaderUniqueId = nameof(HeaderUniqueId), @@ -1444,4 +1451,16 @@ public class Description : IDescription, Shared.Properties.IDescription 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 +{ } \ No newline at end of file diff --git a/Adaptation/FileHandlers/txt/Detail.cs b/Adaptation/FileHandlers/txt/Detail.cs index 912ce90..719940d 100644 --- a/Adaptation/FileHandlers/txt/Detail.cs +++ b/Adaptation/FileHandlers/txt/Detail.cs @@ -1,76 +1,90 @@ -namespace Adaptation.FileHandlers.txt; +using System.Text.Json.Serialization; + +namespace Adaptation.FileHandlers.txt; public class Detail { - public string Grade { get; set; } + [JsonPropertyName("Grade")] public string Grade { get; set; } public string HeaderUniqueID { get; set; } - public string Side { get; set; } - public string SrcDest { get; set; } + [JsonPropertyName("Side")] public string Side { get; set; } + [JsonPropertyName("SrcDest")] public string SrcDest { get; set; } public string UniqueID { get; set; } - public string WaferID { get; set; } + [JsonPropertyName("WaferID")] public string WaferID { get; set; } public string Data { get; set; } - public string DcnAll { get; set; } - public string DcnArea { get; set; } - public string DcnAreaCount { get; set; } - public string DcnBin1 { get; set; } - public string DcnBin2 { get; set; } - public string DcnBin3 { get; set; } - public string DcnBin4 { get; set; } - public string DcnBin5 { get; set; } - public string DcnBin6 { get; set; } - public string DcnBin7 { get; set; } - public string DcnBin8 { get; set; } - public string DcnHazeAvg { get; set; } - public string DcnHazeMedian { get; set; } - public string DcnHazeStdDev { get; set; } - public string DcnLpd { get; set; } - public string DcnLpdES { get; set; } - public string DcnLpdN { get; set; } - public string DcnMicroScr { get; set; } - public string DcnScr { get; set; } - public string DcnSlip { get; set; } - public string DnnAll { get; set; } - public string DnnArea { get; set; } - public string DnnAreaCount { get; set; } - public string DnnBin1 { get; set; } - public string DnnBin2 { get; set; } - public string DnnBin3 { get; set; } - public string DnnBin4 { get; set; } - public string DnnBin5 { get; set; } - public string DnnBin6 { get; set; } - public string DnnBin7 { get; set; } - public string DnnBin8 { get; set; } - public string DnnHazeAvg { get; set; } - public string DnnHazeMedian { get; set; } - public string DnnHazeStdDev { get; set; } - public string DnnLpd { get; set; } - public string DnnLpdES { get; set; } - public string DnnLpdN { get; set; } - public string DnnMicroScr { get; set; } - public string DnnScr { get; set; } - public string DnnSlip { get; set; } - public string DwnAll { get; set; } - public string DwnArea { get; set; } - public string DwnAreaCount { get; set; } - public string DwnBin1 { get; set; } - public string DwnBin2 { get; set; } - public string DwnBin3 { get; set; } - public string DwnBin4 { get; set; } - public string DwnBin5 { get; set; } - public string DwnBin6 { get; set; } - public string DwnBin7 { get; set; } - public string DwnBin8 { get; set; } - public string DwnHazeAvg { get; set; } - public string DwnHazeMedian { get; set; } - public string DwnHazeStdDev { get; set; } - public string DwnLpd { get; set; } - public string DwnLpdES { get; set; } - public string DwnLpdN { get; set; } - public string DwnMicroScr { get; set; } - public string DwnScr { get; set; } - public string DwnSlip { get; set; } + [JsonPropertyName("DcnAll")] public string DcnAll { get; set; } + [JsonPropertyName("DcnArea")] public string DcnArea { get; set; } + [JsonPropertyName("DcnAreaCount")] public string DcnAreaCount { get; set; } + [JsonPropertyName("DcnBin1")] public string DcnBin1 { get; set; } + [JsonPropertyName("DcnBin2")] public string DcnBin2 { get; set; } + [JsonPropertyName("DcnBin3")] public string DcnBin3 { get; set; } + [JsonPropertyName("DcnBin4")] public string DcnBin4 { get; set; } + [JsonPropertyName("DcnBin5")] public string DcnBin5 { get; set; } + [JsonPropertyName("DcnBin6")] public string DcnBin6 { get; set; } + [JsonPropertyName("DcnBin7")] public string DcnBin7 { get; set; } + [JsonPropertyName("DcnBin8")] public string DcnBin8 { get; set; } + [JsonPropertyName("DcnHazeAvg")] public string DcnHazeAvg { get; set; } + [JsonPropertyName("DcnHazeMedian")] public string DcnHazeMedian { get; set; } + [JsonPropertyName("DcnHazeStdDev")] public string DcnHazeStdDev { get; set; } + [JsonPropertyName("DcnLpd")] public string DcnLpd { get; set; } + [JsonPropertyName("DcnLpdES")] public string DcnLpdES { get; set; } + [JsonPropertyName("DcnLpdN")] public string DcnLpdN { get; set; } + [JsonPropertyName("DcnMicroScr")] public string DcnMicroScr { get; set; } + [JsonPropertyName("DcnScr")] public string DcnScr { get; set; } + [JsonPropertyName("DcnSlip")] public string DcnSlip { get; set; } + [JsonPropertyName("DnnAll")] public string DnnAll { get; set; } + [JsonPropertyName("DnnArea")] public string DnnArea { get; set; } + [JsonPropertyName("DnnAreaCount")] public string DnnAreaCount { get; set; } + [JsonPropertyName("DnnBin1")] public string DnnBin1 { get; set; } + [JsonPropertyName("DnnBin2")] public string DnnBin2 { get; set; } + [JsonPropertyName("DnnBin3")] public string DnnBin3 { get; set; } + [JsonPropertyName("DnnBin4")] public string DnnBin4 { get; set; } + [JsonPropertyName("DnnBin5")] public string DnnBin5 { get; set; } + [JsonPropertyName("DnnBin6")] public string DnnBin6 { get; set; } + [JsonPropertyName("DnnBin7")] public string DnnBin7 { get; set; } + [JsonPropertyName("DnnBin8")] public string DnnBin8 { get; set; } + [JsonPropertyName("DnnHazeAvg")] public string DnnHazeAvg { get; set; } + [JsonPropertyName("DnnHazeMedian")] public string DnnHazeMedian { get; set; } + [JsonPropertyName("DnnHazeStdDev")] public string DnnHazeStdDev { get; set; } + [JsonPropertyName("DnnLpd")] public string DnnLpd { get; set; } + [JsonPropertyName("DnnLpdES")] public string DnnLpdES { get; set; } + [JsonPropertyName("DnnLpdN")] public string DnnLpdN { get; set; } + [JsonPropertyName("DnnMicroScr")] public string DnnMicroScr { get; set; } + [JsonPropertyName("DnnScr")] public string DnnScr { get; set; } + [JsonPropertyName("DnnSlip")] public string DnnSlip { get; set; } + [JsonPropertyName("DwnAll")] public string DwnAll { get; set; } + [JsonPropertyName("DwnArea")] public string DwnArea { get; set; } + [JsonPropertyName("DwnAreaCount")] public string DwnAreaCount { get; set; } + [JsonPropertyName("DwnBin1")] public string DwnBin1 { get; set; } + [JsonPropertyName("DwnBin2")] public string DwnBin2 { get; set; } + [JsonPropertyName("DwnBin3")] public string DwnBin3 { get; set; } + [JsonPropertyName("DwnBin4")] public string DwnBin4 { get; set; } + [JsonPropertyName("DwnBin5")] public string DwnBin5 { get; set; } + [JsonPropertyName("DwnBin6")] public string DwnBin6 { get; set; } + [JsonPropertyName("DwnBin7")] public string DwnBin7 { get; set; } + [JsonPropertyName("DwnBin8")] public string DwnBin8 { get; set; } + [JsonPropertyName("DwnHazeAvg")] public string DwnHazeAvg { get; set; } + [JsonPropertyName("DwnHazeMedian")] public string DwnHazeMedian { get; set; } + [JsonPropertyName("DwnHazeStdDev")] public string DwnHazeStdDev { get; set; } + [JsonPropertyName("DwnLpd")] public string DwnLpd { get; set; } + [JsonPropertyName("DwnLpdES")] public string DwnLpdES { get; set; } + [JsonPropertyName("DwnLpdN")] public string DwnLpdN { get; set; } + [JsonPropertyName("DwnMicroScr")] public string DwnMicroScr { get; set; } + [JsonPropertyName("DwnScr")] public string DwnScr { get; set; } + [JsonPropertyName("DwnSlip")] public string DwnSlip { get; set; } public Detail() => Data = "*Data*"; +} + +[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 +{ } \ No newline at end of file diff --git a/Adaptation/FileHandlers/txt/ProcessData.cs b/Adaptation/FileHandlers/txt/ProcessData.cs index 8951356..8bbd270 100644 --- a/Adaptation/FileHandlers/txt/ProcessData.cs +++ b/Adaptation/FileHandlers/txt/ProcessData.cs @@ -1060,12 +1060,11 @@ public class ProcessData : IProcessData { List results = new(); Description? description; - JsonSerializerOptions jsonSerializerOptions = new() { NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString }; foreach (JsonElement jsonElement in jsonElements) { if (jsonElement.ValueKind != JsonValueKind.Object) throw new Exception(); - description = JsonSerializer.Deserialize(jsonElement.ToString(), jsonSerializerOptions); + description = JsonSerializer.Deserialize(jsonElement.ToString(), DescriptionSourceGenerationContext.Default.Description); if (description is null) continue; results.Add(description); diff --git a/Adaptation/Infineon/Monitoring/MonA/MonIn.cs b/Adaptation/Infineon/Monitoring/MonA/MonIn.cs index 7a8a711..fcd16ca 100644 --- a/Adaptation/Infineon/Monitoring/MonA/MonIn.cs +++ b/Adaptation/Infineon/Monitoring/MonA/MonIn.cs @@ -226,9 +226,9 @@ public class MonIn : IMonIn, IDisposable { StringBuilder stringBuilder = new(); 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 - _ = 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(); } @@ -247,14 +247,14 @@ public class MonIn : IMonIn, IDisposable if (string.IsNullOrEmpty(subresource)) { 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 - _ = 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) - _ = 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 - _ = 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(); } diff --git a/Adaptation/Shared/Duplicator/Description.cs b/Adaptation/Shared/Duplicator/Description.cs index 964612e..d9bb3b8 100644 --- a/Adaptation/Shared/Duplicator/Description.cs +++ b/Adaptation/Shared/Duplicator/Description.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text.Json; +using System.Text.Json.Serialization; 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"; +} + +[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 +{ } \ No newline at end of file diff --git a/Adaptation/Shared/FileRead.cs b/Adaptation/Shared/FileRead.cs index 48aacab..aaa6958 100644 --- a/Adaptation/Shared/FileRead.cs +++ b/Adaptation/Shared/FileRead.cs @@ -9,7 +9,6 @@ using System.IO; using System.Linq; using System.Text; using System.Text.Json; -using System.Text.Json.Serialization; using System.Threading; namespace Adaptation.Shared; @@ -447,12 +446,13 @@ public class FileRead : Properties.IFileRead { List results = new(); Duplicator.Description description; - JsonSerializerOptions jsonSerializerOptions = new() { NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString }; foreach (JsonElement jsonElement in jsonElements) { if (jsonElement.ValueKind != JsonValueKind.Object) throw new Exception(); - description = JsonSerializer.Deserialize(jsonElement.ToString(), jsonSerializerOptions); + description = JsonSerializer.Deserialize(jsonElement.ToString(), Duplicator.SharedDescriptionSourceGenerationContext.Default.Description); + if (description is null) + continue; results.Add(description); } return results; diff --git a/Adaptation/Shared/ProcessDataStandardFormat.cs b/Adaptation/Shared/ProcessDataStandardFormat.cs index 1fb9e2a..bc3c424 100644 --- a/Adaptation/Shared/ProcessDataStandardFormat.cs +++ b/Adaptation/Shared/ProcessDataStandardFormat.cs @@ -187,7 +187,7 @@ internal class ProcessDataStandardFormat 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); if (logistics.Count == 0) sequence = null; @@ -235,7 +235,7 @@ internal class ProcessDataStandardFormat const int columnsLine = 6; FileInfo fileInfo = new(reportFullPath); ProcessDataStandardFormat processDataStandardFormat = GetProcessDataStandardFormat(fileInfo.LastWriteTime, columnsLine, fileInfo.FullName, lines: null); - JsonElement[]? jsonElements = processDataStandardFormatMapping.OldColumnNames.Count != processDataStandardFormatMapping.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(); if (jsonElements is null || jsonProperties is null || jsonProperties.Length != processDataStandardFormatMapping.NewColumnNames.Count) result = processDataStandardFormat; @@ -654,6 +654,17 @@ internal class ProcessDataStandardFormat 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) { string result; @@ -903,7 +914,7 @@ internal class ProcessDataStandardFormat } foreach (KeyValuePair> keyValuePair in results) { - if (body.Count < 3) + if (body.Count < 2) break; if (keyValuePair.Value.Count != body.Count) continue; @@ -956,6 +967,26 @@ internal class ProcessDataStandardFormat return result; } + private static string? GetRecordsJson(string reportFullPath, string[] lines) + { + string? result; + bool foundRecords = false; + List 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)] diff --git a/Adaptation/_Tests/Static/recipes-and-patterns.js b/Adaptation/_Tests/Static/recipes-and-patterns.js new file mode 100644 index 0000000..bf7e398 --- /dev/null +++ b/Adaptation/_Tests/Static/recipes-and-patterns.js @@ -0,0 +1,115 @@ +// Recipe 1 = Matched +// recipes-and-patterns.js under IndexOf +// RecipesAndPatternsMatch +// ($('dcp.SP101/csv/Index', 0) + 1) == $('dcp.SP101/csv/Count', 0) +// getValue('TENCOR', $('dcp.SP101/csv/Count', 0), $('dcp.SP101/csv/Session', ''), 'pattern', 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].recipe.localeCompare(recipe, ['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('TENCOR', 0, 'AS_IFX100_ROTR', 'pattern', '{"rds":{"prodSpec":{"recipesAndPatterns":[]}}}'); + +let json; +let tool; +let recipe; +let pattern; +let patternSize; + +tool = 'TENCOR' +patternSize = 9; +recipe = 'lr8in.SET'; +pattern = '4_108IN.PAT'; +json = '{"rds":{"prodSpec":{"recipesAndPatterns":[]}}}'; +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 [TENCOR] not found in OI API results!') + throw 'Test E failed: ' + testN;