Ready to test v2.43.0
This commit is contained in:
parent
2685dd79d5
commit
8a4c91014c
@ -80,8 +80,8 @@ dotnet_diagnostic.CA1825.severity = warning # CA1823: Avoid zero-length array al
|
|||||||
dotnet_diagnostic.CA1829.severity = warning # CA1829: Use Length/Count property instead of Count() when available
|
dotnet_diagnostic.CA1829.severity = warning # CA1829: Use Length/Count property instead of Count() when available
|
||||||
dotnet_diagnostic.CA1834.severity = warning # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
|
dotnet_diagnostic.CA1834.severity = warning # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
|
||||||
dotnet_diagnostic.IDE0001.severity = warning # IDE0001: Simplify name
|
dotnet_diagnostic.IDE0001.severity = warning # IDE0001: Simplify name
|
||||||
dotnet_diagnostic.IDE0002.severity = warning # Simplify (member access) System.Version.Equals("1", "2"); Version.Equals("1", "2");
|
dotnet_diagnostic.IDE0002.severity = warning # Simplify (member access) - System.Version.Equals("1", "2"); Version.Equals("1", "2");
|
||||||
dotnet_diagnostic.IDE0005.severity = suggestion # Using directive is unnecessary using System.Text;
|
dotnet_diagnostic.IDE0005.severity = warning # Using directive is unnecessary
|
||||||
dotnet_diagnostic.IDE0047.severity = warning # IDE0047: Parentheses can be removed
|
dotnet_diagnostic.IDE0047.severity = warning # IDE0047: Parentheses can be removed
|
||||||
dotnet_diagnostic.IDE0060.severity = warning # IDE0060: Remove unused parameter
|
dotnet_diagnostic.IDE0060.severity = warning # IDE0060: Remove unused parameter
|
||||||
dotnet_naming_rule.abstract_method_should_be_pascal_case.severity = warning
|
dotnet_naming_rule.abstract_method_should_be_pascal_case.severity = warning
|
||||||
|
2
Adaptation/.vscode/launch.json
vendored
2
Adaptation/.vscode/launch.json
vendored
@ -4,7 +4,7 @@
|
|||||||
"name": ".NET Core Attach",
|
"name": ".NET Core Attach",
|
||||||
"type": "coreclr",
|
"type": "coreclr",
|
||||||
"request": "attach",
|
"request": "attach",
|
||||||
"processId": 14072
|
"processId": 20196
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -14,12 +14,12 @@ namespace Adaptation.FileHandlers.APC;
|
|||||||
public class FileRead : Shared.FileRead, IFileRead
|
public class FileRead : Shared.FileRead, IFileRead
|
||||||
{
|
{
|
||||||
|
|
||||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted)
|
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted)
|
||||||
{
|
{
|
||||||
_MinFileLength = 10;
|
_MinFileLength = 10;
|
||||||
_NullData = string.Empty;
|
_NullData = string.Empty;
|
||||||
_Logistics = new Logistics(this);
|
_Logistics = new(this);
|
||||||
if (_FileParameter is null)
|
if (_FileParameter is null)
|
||||||
throw new Exception(cellInstanceConnectionName);
|
throw new Exception(cellInstanceConnectionName);
|
||||||
if (_ModelObjectParameterDefinitions is null)
|
if (_ModelObjectParameterDefinitions is null)
|
||||||
@ -37,7 +37,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime)
|
if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime)
|
||||||
File.SetLastWriteTime(_Logistics.ReportFullPath, fileInfo.CreationTime);
|
File.SetLastWriteTime(_Logistics.ReportFullPath, fileInfo.CreationTime);
|
||||||
}
|
}
|
||||||
Move(extractResults, exception);
|
Move(extractResults);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
||||||
@ -103,20 +103,32 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IFileRead.CheckTests(Test[] tests, bool extra)
|
private void FileCopy(string reportFullPath, DateTime dateTime)
|
||||||
{
|
{
|
||||||
if (_Description is not Description)
|
bool isDummyRun = false;
|
||||||
throw new Exception();
|
List<(Shared.Properties.IScopeInfo, string)> tuples = new();
|
||||||
|
string successDirectory = _FileConnectorConfiguration.AlternateTargetFolder;
|
||||||
|
string fileNameAfterUnderscoreSplit = GetFileNameAfterUnderscoreSplit(reportFullPath);
|
||||||
|
string duplicateDirectory = Path.Combine(_FileConnectorConfiguration.TargetFileLocation, fileNameAfterUnderscoreSplit);
|
||||||
|
if (!Directory.Exists(duplicateDirectory))
|
||||||
|
_ = Directory.CreateDirectory(duplicateDirectory);
|
||||||
|
string duplicateFile = Path.Combine(duplicateDirectory, Path.GetFileName(reportFullPath));
|
||||||
|
File.Copy(reportFullPath, duplicateFile, overwrite: true);
|
||||||
|
WaitForFileConsumption(dateTime, isDummyRun, successDirectory, duplicateDirectory, tuples, duplicateFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||||
{
|
{
|
||||||
if (dateTime == DateTime.MinValue)
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
{ }
|
|
||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>());
|
|
||||||
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
||||||
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
||||||
SetFileParameterLotIDToLogisticsMID();
|
SetFileParameterLotIDToLogisticsMID();
|
||||||
|
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
|
||||||
|
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
|
||||||
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
|
FileCopy(reportFullPath, dateTime);
|
||||||
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,21 +15,26 @@ namespace Adaptation.FileHandlers.Archive;
|
|||||||
public class FileRead : Shared.FileRead, IFileRead
|
public class FileRead : Shared.FileRead, IFileRead
|
||||||
{
|
{
|
||||||
|
|
||||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
private readonly string _JobIdParentDirectory;
|
||||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted)
|
private readonly string _JobIdArchiveParentDirectory;
|
||||||
|
|
||||||
|
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||||
|
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted)
|
||||||
{
|
{
|
||||||
_MinFileLength = 10;
|
_MinFileLength = 10;
|
||||||
_NullData = string.Empty;
|
_NullData = string.Empty;
|
||||||
_Logistics = new Logistics(this);
|
_Logistics = new(this);
|
||||||
if (_FileParameter is null)
|
if (_FileParameter is null)
|
||||||
throw new Exception(cellInstanceConnectionName);
|
throw new Exception(cellInstanceConnectionName);
|
||||||
if (_ModelObjectParameterDefinitions is null)
|
if (_ModelObjectParameterDefinitions is null)
|
||||||
throw new Exception(cellInstanceConnectionName);
|
throw new Exception(cellInstanceConnectionName);
|
||||||
if (!_IsDuplicator)
|
if (!_IsDuplicator)
|
||||||
throw new Exception(cellInstanceConnectionName);
|
throw new Exception(cellInstanceConnectionName);
|
||||||
|
_JobIdParentDirectory = GetJobIdParentDirectory(_FileConnectorConfiguration.SourceFileLocation);
|
||||||
|
_JobIdArchiveParentDirectory = GetJobIdParentDirectory(_FileConnectorConfiguration.TargetFileLocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception) => Move(extractResults, exception);
|
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception) => Move(extractResults);
|
||||||
|
|
||||||
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
||||||
|
|
||||||
@ -94,10 +99,20 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IFileRead.CheckTests(Test[] tests, bool extra)
|
private static IEnumerable<string> GetDirectoriesRecursively(string path, string directoryNameSegment = null)
|
||||||
{
|
{
|
||||||
if (_Description is not Description)
|
Queue<string> queue = new();
|
||||||
throw new Exception();
|
queue.Enqueue(path);
|
||||||
|
while (queue.Count > 0)
|
||||||
|
{
|
||||||
|
path = queue.Dequeue();
|
||||||
|
foreach (string subDirectory in Directory.GetDirectories(path))
|
||||||
|
{
|
||||||
|
queue.Enqueue(subDirectory);
|
||||||
|
if (string.IsNullOrEmpty(directoryNameSegment) || Path.GetFileName(subDirectory).Contains(directoryNameSegment))
|
||||||
|
yield return subDirectory;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MoveArchive(DateTime dateTime)
|
private void MoveArchive(DateTime dateTime)
|
||||||
@ -106,19 +121,18 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
{ }
|
{ }
|
||||||
string logisticsSequence = _Logistics.Sequence.ToString();
|
string logisticsSequence = _Logistics.Sequence.ToString();
|
||||||
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
||||||
string weekDirectory = string.Concat(_Logistics.DateTimeFromSequence.ToString("yyyy"), "_Week_", weekOfYear, @"\", _Logistics.DateTimeFromSequence.ToString("yyyy-MM-dd"));
|
string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}{@"\"}{_Logistics.DateTimeFromSequence:yyyy-MM-dd}";
|
||||||
string jobIdDirectory = string.Concat(_FileConnectorConfiguration.TargetFileLocation, @"\", _Logistics.JobID);
|
string destinationArchiveDirectory = Path.Combine(_JobIdArchiveParentDirectory, _Logistics.JobID, weekDirectory);
|
||||||
if (!Directory.Exists(jobIdDirectory))
|
|
||||||
_ = Directory.CreateDirectory(jobIdDirectory);
|
|
||||||
//string destinationArchiveDirectory = string.Concat(jobIdDirectory, @"\!Archive\", weekDirectory);
|
|
||||||
string destinationArchiveDirectory = string.Concat(Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation), @"\Archive\", _Logistics.JobID, @"\", weekDirectory);
|
|
||||||
if (!Directory.Exists(destinationArchiveDirectory))
|
if (!Directory.Exists(destinationArchiveDirectory))
|
||||||
_ = Directory.CreateDirectory(destinationArchiveDirectory);
|
_ = Directory.CreateDirectory(destinationArchiveDirectory);
|
||||||
|
string jobIdDirectory = Path.Combine(_JobIdParentDirectory, _Logistics.JobID);
|
||||||
|
if (!Directory.Exists(jobIdDirectory))
|
||||||
|
_ = Directory.CreateDirectory(jobIdDirectory);
|
||||||
string[] matchDirectories = new string[] { GetDirectoriesRecursively(jobIdDirectory, logisticsSequence).FirstOrDefault() };
|
string[] matchDirectories = new string[] { GetDirectoriesRecursively(jobIdDirectory, logisticsSequence).FirstOrDefault() };
|
||||||
if ((matchDirectories is null) || matchDirectories.Length != 1)
|
if ((matchDirectories is null) || matchDirectories.Length != 1)
|
||||||
throw new Exception("Didn't find directory by logistics sequence");
|
throw new Exception("Didn't find directory by logistics sequence");
|
||||||
string sourceDirectory = Path.GetDirectoryName(matchDirectories[0]);
|
string sourceDirectory = Path.GetDirectoryName(matchDirectories[0]);
|
||||||
destinationArchiveDirectory = string.Concat(destinationArchiveDirectory, @"\", Path.GetFileName(sourceDirectory));
|
destinationArchiveDirectory = Path.Combine(destinationArchiveDirectory, Path.GetFileName(sourceDirectory));
|
||||||
Directory.Move(sourceDirectory, destinationArchiveDirectory);
|
Directory.Move(sourceDirectory, destinationArchiveDirectory);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -130,9 +144,10 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
SetFileParameterLotIDToLogisticsMID();
|
SetFileParameterLotIDToLogisticsMID();
|
||||||
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
|
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
|
||||||
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
|
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
|
||||||
Tuple<Test[], Dictionary<Test, List<Shared.Properties.IDescription>>> tuple = GetTuple(this, descriptions, extra: false);
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
MoveArchive(dateTime);
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tuple.Item1, jsonElements, new List<FileInfo>());
|
MoveArchive(dateTime);
|
||||||
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,20 +9,20 @@ namespace Adaptation.FileHandlers;
|
|||||||
public class CellInstanceConnectionName
|
public class CellInstanceConnectionName
|
||||||
{
|
{
|
||||||
|
|
||||||
internal static IFileRead Get(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted)
|
internal static IFileRead Get(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted)
|
||||||
{
|
{
|
||||||
IFileRead result = cellInstanceConnectionName switch
|
IFileRead result = cellInstanceConnectionName switch
|
||||||
{
|
{
|
||||||
nameof(Archive) => new Archive.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted),
|
nameof(Archive) => new Archive.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
||||||
nameof(Dummy) => new Dummy.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted),
|
nameof(Dummy) => new Dummy.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
||||||
nameof(IQSSi) => new IQSSi.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted),
|
nameof(IQSSi) => new IQSSi.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
||||||
nameof(MoveMatchingFiles) => new MoveMatchingFiles.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted),
|
nameof(MoveMatchingFiles) => new MoveMatchingFiles.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
||||||
nameof(OpenInsight) => new OpenInsight.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted),
|
nameof(OpenInsight) => new OpenInsight.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
||||||
nameof(OpenInsightMetrologyViewer) => new OpenInsightMetrologyViewer.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted),
|
nameof(OpenInsightMetrologyViewer) => new OpenInsightMetrologyViewer.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
||||||
nameof(OpenInsightMetrologyViewerAttachments) => new OpenInsightMetrologyViewerAttachments.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted),
|
nameof(OpenInsightMetrologyViewerAttachments) => new OpenInsightMetrologyViewerAttachments.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
||||||
nameof(Processed) => new Processed.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted),
|
nameof(Processed) => new Processed.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
||||||
nameof(APC) => new APC.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted),
|
nameof(APC) => new APC.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
||||||
nameof(SPaCe) => new SPaCe.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted),
|
nameof(SPaCe) => new SPaCe.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
||||||
_ => throw new Exception($"\"{cellInstanceConnectionName}\" not mapped")
|
_ => throw new Exception($"\"{cellInstanceConnectionName}\" not mapped")
|
||||||
};
|
};
|
||||||
return result;
|
return result;
|
||||||
|
@ -23,12 +23,12 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
private int _LastDummyRunIndex;
|
private int _LastDummyRunIndex;
|
||||||
private readonly string[] _CellNames;
|
private readonly string[] _CellNames;
|
||||||
|
|
||||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted)
|
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted)
|
||||||
{
|
{
|
||||||
_MinFileLength = 10;
|
_MinFileLength = 10;
|
||||||
_NullData = string.Empty;
|
_NullData = string.Empty;
|
||||||
_Logistics = new Logistics(this);
|
_Logistics = new(this);
|
||||||
if (_FileParameter is null)
|
if (_FileParameter is null)
|
||||||
throw new Exception(cellInstanceConnectionName);
|
throw new Exception(cellInstanceConnectionName);
|
||||||
if (_ModelObjectParameterDefinitions is null)
|
if (_ModelObjectParameterDefinitions is null)
|
||||||
@ -51,7 +51,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception) => Move(extractResults, exception);
|
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception) => Move(extractResults);
|
||||||
|
|
||||||
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
||||||
|
|
||||||
@ -95,12 +95,6 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
|
|
||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> IFileRead.ReExtract() => throw new Exception(string.Concat("See ", nameof(CallbackFileExists)));
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> IFileRead.ReExtract() => throw new Exception(string.Concat("See ", nameof(CallbackFileExists)));
|
||||||
|
|
||||||
void IFileRead.CheckTests(Test[] tests, bool extra)
|
|
||||||
{
|
|
||||||
if (_Description is not Description)
|
|
||||||
throw new Exception();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CallbackInProcessCleared(string sourceArchiveFile, string traceDummyFile, string targetFileLocation, string monARessource, string inProcessDirectory, long sequence, bool warning)
|
private void CallbackInProcessCleared(string sourceArchiveFile, string traceDummyFile, string targetFileLocation, string monARessource, string inProcessDirectory, long sequence, bool warning)
|
||||||
{
|
{
|
||||||
const string site = "sjc";
|
const string site = "sjc";
|
||||||
@ -159,7 +153,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
if (!_DummyRuns[monARessource].Contains(sequence))
|
if (!_DummyRuns[monARessource].Contains(sequence))
|
||||||
_DummyRuns[monARessource].Add(sequence);
|
_DummyRuns[monARessource].Add(sequence);
|
||||||
File.AppendAllLines(traceDummyFile, new string[] { sourceArchiveFile });
|
File.AppendAllLines(traceDummyFile, new string[] { sourceArchiveFile });
|
||||||
string inProcessDirectory = Path.Combine(_ProgressPath, "Dummy In-Process", sequence.ToString());
|
string inProcessDirectory = Path.Combine("_ProgressPath", "Dummy In-Process", sequence.ToString());
|
||||||
if (!Directory.Exists(inProcessDirectory))
|
if (!Directory.Exists(inProcessDirectory))
|
||||||
_ = Directory.CreateDirectory(inProcessDirectory);
|
_ = Directory.CreateDirectory(inProcessDirectory);
|
||||||
files = Directory.GetFiles(inProcessDirectory, "*", SearchOption.AllDirectories);
|
files = Directory.GetFiles(inProcessDirectory, "*", SearchOption.AllDirectories);
|
||||||
@ -226,11 +220,11 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
if (!string.IsNullOrEmpty(Path.GetFileName(_FileConnectorConfiguration.SourceFileLocation)))
|
if (!string.IsNullOrEmpty(Path.GetFileName(_FileConnectorConfiguration.SourceFileLocation)))
|
||||||
sourceParentDirectory = Path.GetDirectoryName(_FileConnectorConfiguration.SourceFileLocation);
|
sourceParentDirectory = Path.GetDirectoryName(_FileConnectorConfiguration.SourceFileLocation);
|
||||||
else
|
else
|
||||||
sourceParentDirectory = Path.GetDirectoryName(Path.GetDirectoryName(_FileConnectorConfiguration.SourceFileLocation));
|
sourceParentDirectory = GetParentParent(_FileConnectorConfiguration.SourceFileLocation);
|
||||||
if (!string.IsNullOrEmpty(Path.GetFileName(_FileConnectorConfiguration.TargetFileLocation)))
|
if (!string.IsNullOrEmpty(Path.GetFileName(_FileConnectorConfiguration.TargetFileLocation)))
|
||||||
targetParentDirectory = Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation);
|
targetParentDirectory = Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation);
|
||||||
else
|
else
|
||||||
targetParentDirectory = Path.GetDirectoryName(Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation));
|
targetParentDirectory = GetParentParent(_FileConnectorConfiguration.TargetFileLocation);
|
||||||
if (sourceParentDirectory != targetParentDirectory)
|
if (sourceParentDirectory != targetParentDirectory)
|
||||||
throw new Exception("Target and source must have the same parent for Si Dummy FileConnectorConfiguration!");
|
throw new Exception("Target and source must have the same parent for Si Dummy FileConnectorConfiguration!");
|
||||||
bool check = dateTime.Hour > 7 && dateTime.Hour < 18 && dateTime.DayOfWeek != DayOfWeek.Sunday && dateTime.DayOfWeek != DayOfWeek.Saturday;
|
bool check = dateTime.Hour > 7 && dateTime.Hour < 18 && dateTime.DayOfWeek != DayOfWeek.Sunday && dateTime.DayOfWeek != DayOfWeek.Saturday;
|
||||||
|
@ -14,12 +14,12 @@ namespace Adaptation.FileHandlers.IQSSi;
|
|||||||
public class FileRead : Shared.FileRead, IFileRead
|
public class FileRead : Shared.FileRead, IFileRead
|
||||||
{
|
{
|
||||||
|
|
||||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted)
|
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted)
|
||||||
{
|
{
|
||||||
_MinFileLength = 10;
|
_MinFileLength = 10;
|
||||||
_NullData = string.Empty;
|
_NullData = string.Empty;
|
||||||
_Logistics = new Logistics(this);
|
_Logistics = new(this);
|
||||||
if (_FileParameter is null)
|
if (_FileParameter is null)
|
||||||
throw new Exception(cellInstanceConnectionName);
|
throw new Exception(cellInstanceConnectionName);
|
||||||
if (_ModelObjectParameterDefinitions is null)
|
if (_ModelObjectParameterDefinitions is null)
|
||||||
@ -37,7 +37,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime)
|
if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime)
|
||||||
File.SetLastWriteTime(_Logistics.ReportFullPath, fileInfo.CreationTime);
|
File.SetLastWriteTime(_Logistics.ReportFullPath, fileInfo.CreationTime);
|
||||||
}
|
}
|
||||||
Move(extractResults, exception);
|
Move(extractResults);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
||||||
@ -103,42 +103,33 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IFileRead.CheckTests(Test[] tests, bool extra)
|
private void FileCopy(string reportFullPath, DateTime dateTime)
|
||||||
{
|
{
|
||||||
if (_Description is not Description)
|
bool isDummyRun = false;
|
||||||
throw new Exception();
|
string successDirectory = string.Empty;
|
||||||
}
|
List<(Shared.Properties.IScopeInfo, string)> tuples = new();
|
||||||
|
string duplicateDirectory = Path.Combine(_FileConnectorConfiguration.SourceFileLocation, _CellInstanceName);
|
||||||
private void CopyFileAndWait(string reportFullPath)
|
if (!Directory.Exists(duplicateDirectory))
|
||||||
{
|
_ = Directory.CreateDirectory(duplicateDirectory);
|
||||||
long ticks = DateTime.Now.Ticks;
|
string duplicateFile = Path.Combine(duplicateDirectory, Path.GetFileName(reportFullPath));
|
||||||
string parentDirectory = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(reportFullPath)));
|
File.Copy(reportFullPath, duplicateFile, overwrite: true);
|
||||||
string jobIdDirectory = Path.Combine(parentDirectory, _Logistics.JobID);
|
WaitForFileConsumption(dateTime, isDummyRun, successDirectory, duplicateDirectory, tuples, duplicateFile);
|
||||||
string jobIdDirectoryFile = Path.Combine(jobIdDirectory, Path.GetFileName(reportFullPath));
|
|
||||||
string errFile = string.Concat(jobIdDirectoryFile, ".err");
|
|
||||||
if (!Directory.Exists(jobIdDirectory))
|
|
||||||
_ = Directory.CreateDirectory(jobIdDirectory);
|
|
||||||
File.Copy(reportFullPath, jobIdDirectoryFile);
|
|
||||||
for (int i = 0; i < int.MaxValue; i++)
|
|
||||||
{
|
|
||||||
if (File.Exists(errFile))
|
|
||||||
throw new Exception(File.ReadAllText(errFile));
|
|
||||||
if (!File.Exists(jobIdDirectoryFile))
|
|
||||||
break;
|
|
||||||
if (new TimeSpan(DateTime.Now.Ticks - ticks).TotalSeconds > _BreakAfterSeconds)
|
|
||||||
throw new Exception($"Not all files were consumned after {_BreakAfterSeconds} second(s)!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||||
{
|
{
|
||||||
if (dateTime == DateTime.MinValue)
|
if (dateTime == DateTime.MinValue)
|
||||||
{ }
|
{ }
|
||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>());
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
||||||
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
||||||
SetFileParameterLotIDToLogisticsMID();
|
SetFileParameterLotIDToLogisticsMID();
|
||||||
CopyFileAndWait(reportFullPath);
|
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
|
||||||
|
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
|
||||||
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
|
FileCopy(reportFullPath, dateTime);
|
||||||
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,18 +8,19 @@ using System.Collections.Generic;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
namespace Adaptation.FileHandlers.MoveMatchingFiles;
|
namespace Adaptation.FileHandlers.MoveMatchingFiles;
|
||||||
|
|
||||||
public class FileRead : Shared.FileRead, IFileRead
|
public class FileRead : Shared.FileRead, IFileRead
|
||||||
{
|
{
|
||||||
|
|
||||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted)
|
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted)
|
||||||
{
|
{
|
||||||
_MinFileLength = 10;
|
_MinFileLength = 10;
|
||||||
_NullData = string.Empty;
|
_NullData = string.Empty;
|
||||||
_Logistics = new Logistics(this);
|
_Logistics = new(this);
|
||||||
if (_FileParameter is null)
|
if (_FileParameter is null)
|
||||||
throw new Exception(cellInstanceConnectionName);
|
throw new Exception(cellInstanceConnectionName);
|
||||||
if (_ModelObjectParameterDefinitions is null)
|
if (_ModelObjectParameterDefinitions is null)
|
||||||
@ -37,7 +38,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime)
|
if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime)
|
||||||
File.SetLastWriteTime(_Logistics.ReportFullPath, fileInfo.CreationTime);
|
File.SetLastWriteTime(_Logistics.ReportFullPath, fileInfo.CreationTime);
|
||||||
}
|
}
|
||||||
Move(extractResults, exception);
|
Move(extractResults);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
||||||
@ -103,12 +104,6 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IFileRead.CheckTests(Test[] tests, bool extra)
|
|
||||||
{
|
|
||||||
if (_Description is not Description)
|
|
||||||
throw new Exception();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static List<string> GetSearchDirectories(int numberLength, string parentDirectory)
|
private static List<string> GetSearchDirectories(int numberLength, string parentDirectory)
|
||||||
{
|
{
|
||||||
List<string> results = new();
|
List<string> results = new();
|
||||||
@ -158,8 +153,9 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MoveCollection(long ticks, List<(string matchingFile, string checkFile)> collection)
|
private void MoveCollection(DateTime dateTime, List<(string matchingFile, string checkFile)> collection)
|
||||||
{
|
{
|
||||||
|
long preWait;
|
||||||
string errFile;
|
string errFile;
|
||||||
string checkDirectory;
|
string checkDirectory;
|
||||||
foreach ((string matchingFile, string checkFile) in collection)
|
foreach ((string matchingFile, string checkFile) in collection)
|
||||||
@ -169,35 +165,44 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
if (!Directory.Exists(checkDirectory))
|
if (!Directory.Exists(checkDirectory))
|
||||||
_ = Directory.CreateDirectory(checkDirectory);
|
_ = Directory.CreateDirectory(checkDirectory);
|
||||||
File.Move(matchingFile, checkFile);
|
File.Move(matchingFile, checkFile);
|
||||||
|
if (_FileConnectorConfiguration?.FileHandleWaitTime is null)
|
||||||
|
preWait = DateTime.Now.AddMilliseconds(1234).Ticks;
|
||||||
|
else
|
||||||
|
preWait = DateTime.Now.AddMilliseconds(_FileConnectorConfiguration.FileHandleWaitTime.Value).Ticks;
|
||||||
|
for (short i = 0; i < short.MaxValue; i++)
|
||||||
|
{
|
||||||
|
if (DateTime.Now.Ticks > preWait)
|
||||||
|
break;
|
||||||
|
Thread.Sleep(500);
|
||||||
|
}
|
||||||
for (int i = 0; i < int.MaxValue; i++)
|
for (int i = 0; i < int.MaxValue; i++)
|
||||||
{
|
{
|
||||||
if (File.Exists(errFile))
|
if (File.Exists(errFile))
|
||||||
throw new Exception(File.ReadAllText(errFile));
|
throw new Exception(File.ReadAllText(errFile));
|
||||||
if (!File.Exists(checkFile))
|
if (!File.Exists(checkFile))
|
||||||
break;
|
break;
|
||||||
if (new TimeSpan(DateTime.Now.Ticks - ticks).TotalSeconds > _BreakAfterSeconds)
|
if (new TimeSpan(DateTime.Now.Ticks - dateTime.Ticks).TotalSeconds > _BreakAfterSeconds)
|
||||||
throw new Exception($"Not all files were consumned after {_BreakAfterSeconds} second(s)!");
|
throw new Exception($"Not all files were consumned after {_BreakAfterSeconds} second(s)!");
|
||||||
|
Thread.Sleep(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||||
{
|
{
|
||||||
if (dateTime == DateTime.MinValue)
|
|
||||||
{ }
|
|
||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>());
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>());
|
||||||
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
||||||
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
||||||
SetFileParameterLotIDToLogisticsMID();
|
SetFileParameterLotIDToLogisticsMID();
|
||||||
int numberLength = 2;
|
int numberLength = 2;
|
||||||
long ticks = DateTime.Now.Ticks;
|
long ticks = dateTime.Ticks;
|
||||||
string parentDirectory = Path.GetDirectoryName(Path.GetDirectoryName(reportFullPath));
|
string parentParentDirectory = GetParentParent(reportFullPath);
|
||||||
List<string> searchDirectories = GetSearchDirectories(numberLength, parentDirectory);
|
List<string> searchDirectories = GetSearchDirectories(numberLength, parentParentDirectory);
|
||||||
List<string> matchingFiles = GetMatchingFiles(ticks, reportFullPath, searchDirectories);
|
List<string> matchingFiles = GetMatchingFiles(ticks, reportFullPath, searchDirectories);
|
||||||
if (matchingFiles.Count != searchDirectories.Count)
|
if (matchingFiles.Count != searchDirectories.Count)
|
||||||
throw new Exception($"Didn't find all files after {_BreakAfterSeconds} second(s)!");
|
throw new Exception($"Didn't find all files after {_BreakAfterSeconds} second(s)!");
|
||||||
List<(string matchingFile, string checkFile)> collection = GetCollection(numberLength, parentDirectory, matchingFiles);
|
List<(string matchingFile, string checkFile)> collection = GetCollection(numberLength, parentParentDirectory, matchingFiles);
|
||||||
MoveCollection(ticks, collection);
|
MoveCollection(dateTime, collection);
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
@ -14,12 +14,12 @@ namespace Adaptation.FileHandlers.OpenInsight;
|
|||||||
public class FileRead : Shared.FileRead, IFileRead
|
public class FileRead : Shared.FileRead, IFileRead
|
||||||
{
|
{
|
||||||
|
|
||||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted)
|
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted)
|
||||||
{
|
{
|
||||||
_MinFileLength = 10;
|
_MinFileLength = 10;
|
||||||
_NullData = string.Empty;
|
_NullData = string.Empty;
|
||||||
_Logistics = new Logistics(this);
|
_Logistics = new(this);
|
||||||
if (_FileParameter is null)
|
if (_FileParameter is null)
|
||||||
throw new Exception(cellInstanceConnectionName);
|
throw new Exception(cellInstanceConnectionName);
|
||||||
if (_ModelObjectParameterDefinitions is null)
|
if (_ModelObjectParameterDefinitions is null)
|
||||||
@ -37,7 +37,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime)
|
if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime)
|
||||||
File.SetLastWriteTime(_Logistics.ReportFullPath, fileInfo.CreationTime);
|
File.SetLastWriteTime(_Logistics.ReportFullPath, fileInfo.CreationTime);
|
||||||
}
|
}
|
||||||
Move(extractResults, exception);
|
Move(extractResults);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
||||||
@ -103,20 +103,30 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IFileRead.CheckTests(Test[] tests, bool extra)
|
private static void SaveOpenInsightFile(string reportFullPath, DateTime dateTime, List<Shared.Properties.IDescription> descriptions, Test[] tests)
|
||||||
{
|
{
|
||||||
if (_Description is not Description)
|
if (reportFullPath is null)
|
||||||
throw new Exception();
|
{ }
|
||||||
|
if (dateTime == DateTime.MinValue)
|
||||||
|
{ }
|
||||||
|
if (descriptions is null)
|
||||||
|
{ }
|
||||||
|
if (tests is null)
|
||||||
|
{ }
|
||||||
}
|
}
|
||||||
|
|
||||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||||
{
|
{
|
||||||
if (dateTime == DateTime.MinValue)
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
{ }
|
|
||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>());
|
|
||||||
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
||||||
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
||||||
SetFileParameterLotIDToLogisticsMID();
|
SetFileParameterLotIDToLogisticsMID();
|
||||||
|
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
|
||||||
|
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
|
||||||
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
|
SaveOpenInsightFile(reportFullPath, dateTime, descriptions, tests);
|
||||||
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,12 +14,12 @@ namespace Adaptation.FileHandlers.OpenInsightMetrologyViewer;
|
|||||||
public class FileRead : Shared.FileRead, IFileRead
|
public class FileRead : Shared.FileRead, IFileRead
|
||||||
{
|
{
|
||||||
|
|
||||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted)
|
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted)
|
||||||
{
|
{
|
||||||
_MinFileLength = 10;
|
_MinFileLength = 10;
|
||||||
_NullData = string.Empty;
|
_NullData = string.Empty;
|
||||||
_Logistics = new Logistics(this);
|
_Logistics = new(this);
|
||||||
if (_FileParameter is null)
|
if (_FileParameter is null)
|
||||||
throw new Exception(cellInstanceConnectionName);
|
throw new Exception(cellInstanceConnectionName);
|
||||||
if (_ModelObjectParameterDefinitions is null)
|
if (_ModelObjectParameterDefinitions is null)
|
||||||
@ -37,7 +37,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime)
|
if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime)
|
||||||
File.SetLastWriteTime(_Logistics.ReportFullPath, fileInfo.CreationTime);
|
File.SetLastWriteTime(_Logistics.ReportFullPath, fileInfo.CreationTime);
|
||||||
}
|
}
|
||||||
Move(extractResults, exception);
|
Move(extractResults);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
||||||
@ -103,20 +103,26 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IFileRead.CheckTests(Test[] tests, bool extra)
|
private static void SendData(DateTime dateTime, List<Shared.Properties.IDescription> descriptions)
|
||||||
{
|
{
|
||||||
if (_Description is not Description)
|
if (dateTime == DateTime.MinValue)
|
||||||
throw new Exception();
|
{ }
|
||||||
|
if (descriptions is null)
|
||||||
|
{ }
|
||||||
}
|
}
|
||||||
|
|
||||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||||
{
|
{
|
||||||
if (dateTime == DateTime.MinValue)
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
{ }
|
|
||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>());
|
|
||||||
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
||||||
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
||||||
SetFileParameterLotIDToLogisticsMID();
|
SetFileParameterLotIDToLogisticsMID();
|
||||||
|
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
|
||||||
|
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
|
||||||
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
|
SendData(dateTime, descriptions);
|
||||||
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,12 +14,12 @@ namespace Adaptation.FileHandlers.OpenInsightMetrologyViewerAttachments;
|
|||||||
public class FileRead : Shared.FileRead, IFileRead
|
public class FileRead : Shared.FileRead, IFileRead
|
||||||
{
|
{
|
||||||
|
|
||||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted)
|
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted)
|
||||||
{
|
{
|
||||||
_MinFileLength = 10;
|
_MinFileLength = 10;
|
||||||
_NullData = string.Empty;
|
_NullData = string.Empty;
|
||||||
_Logistics = new Logistics(this);
|
_Logistics = new(this);
|
||||||
if (_FileParameter is null)
|
if (_FileParameter is null)
|
||||||
throw new Exception(cellInstanceConnectionName);
|
throw new Exception(cellInstanceConnectionName);
|
||||||
if (_ModelObjectParameterDefinitions is null)
|
if (_ModelObjectParameterDefinitions is null)
|
||||||
@ -37,7 +37,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime)
|
if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime)
|
||||||
File.SetLastWriteTime(_Logistics.ReportFullPath, fileInfo.CreationTime);
|
File.SetLastWriteTime(_Logistics.ReportFullPath, fileInfo.CreationTime);
|
||||||
}
|
}
|
||||||
Move(extractResults, exception);
|
Move(extractResults);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
||||||
@ -103,20 +103,28 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IFileRead.CheckTests(Test[] tests, bool extra)
|
private static void PostOpenInsightMetrologyViewerAttachments(string reportFullPath, DateTime dateTime, List<Shared.Properties.IDescription> descriptions)
|
||||||
{
|
{
|
||||||
if (_Description is not Description)
|
if (reportFullPath is null)
|
||||||
throw new Exception();
|
{ }
|
||||||
|
if (dateTime == DateTime.MinValue)
|
||||||
|
{ }
|
||||||
|
if (descriptions is null)
|
||||||
|
{ }
|
||||||
}
|
}
|
||||||
|
|
||||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||||
{
|
{
|
||||||
if (dateTime == DateTime.MinValue)
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
{ }
|
|
||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>());
|
|
||||||
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
||||||
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
||||||
SetFileParameterLotIDToLogisticsMID();
|
SetFileParameterLotIDToLogisticsMID();
|
||||||
|
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
|
||||||
|
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
|
||||||
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
|
PostOpenInsightMetrologyViewerAttachments(reportFullPath, dateTime, descriptions);
|
||||||
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,12 +14,12 @@ namespace Adaptation.FileHandlers.Processed;
|
|||||||
public class FileRead : Shared.FileRead, IFileRead
|
public class FileRead : Shared.FileRead, IFileRead
|
||||||
{
|
{
|
||||||
|
|
||||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted)
|
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted)
|
||||||
{
|
{
|
||||||
_MinFileLength = 10;
|
_MinFileLength = 10;
|
||||||
_NullData = string.Empty;
|
_NullData = string.Empty;
|
||||||
_Logistics = new Logistics(this);
|
_Logistics = new(this);
|
||||||
if (_FileParameter is null)
|
if (_FileParameter is null)
|
||||||
throw new Exception(cellInstanceConnectionName);
|
throw new Exception(cellInstanceConnectionName);
|
||||||
if (_ModelObjectParameterDefinitions is null)
|
if (_ModelObjectParameterDefinitions is null)
|
||||||
@ -37,7 +37,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime)
|
if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime)
|
||||||
File.SetLastWriteTime(_Logistics.ReportFullPath, fileInfo.CreationTime);
|
File.SetLastWriteTime(_Logistics.ReportFullPath, fileInfo.CreationTime);
|
||||||
}
|
}
|
||||||
Move(extractResults, exception);
|
Move(extractResults);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
||||||
@ -103,20 +103,28 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IFileRead.CheckTests(Test[] tests, bool extra)
|
private static void DirectoryMove(string reportFullPath, DateTime dateTime, List<Shared.Properties.IDescription> descriptions)
|
||||||
{
|
{
|
||||||
if (_Description is not Description)
|
if (reportFullPath is null)
|
||||||
throw new Exception();
|
{ }
|
||||||
|
if (dateTime == DateTime.MinValue)
|
||||||
|
{ }
|
||||||
|
if (descriptions is null)
|
||||||
|
{ }
|
||||||
}
|
}
|
||||||
|
|
||||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||||
{
|
{
|
||||||
if (dateTime == DateTime.MinValue)
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
{ }
|
|
||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>());
|
|
||||||
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
||||||
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
||||||
SetFileParameterLotIDToLogisticsMID();
|
SetFileParameterLotIDToLogisticsMID();
|
||||||
|
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
|
||||||
|
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
|
||||||
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
|
||||||
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
|
DirectoryMove(reportFullPath, dateTime, descriptions);
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,12 +14,12 @@ namespace Adaptation.FileHandlers.SPaCe;
|
|||||||
public class FileRead : Shared.FileRead, IFileRead
|
public class FileRead : Shared.FileRead, IFileRead
|
||||||
{
|
{
|
||||||
|
|
||||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted)
|
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted)
|
||||||
{
|
{
|
||||||
_MinFileLength = 10;
|
_MinFileLength = 10;
|
||||||
_NullData = string.Empty;
|
_NullData = string.Empty;
|
||||||
_Logistics = new Logistics(this);
|
_Logistics = new(this);
|
||||||
if (_FileParameter is null)
|
if (_FileParameter is null)
|
||||||
throw new Exception(cellInstanceConnectionName);
|
throw new Exception(cellInstanceConnectionName);
|
||||||
if (_ModelObjectParameterDefinitions is null)
|
if (_ModelObjectParameterDefinitions is null)
|
||||||
@ -37,7 +37,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime)
|
if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime)
|
||||||
File.SetLastWriteTime(_Logistics.ReportFullPath, fileInfo.CreationTime);
|
File.SetLastWriteTime(_Logistics.ReportFullPath, fileInfo.CreationTime);
|
||||||
}
|
}
|
||||||
Move(extractResults, exception);
|
Move(extractResults);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
||||||
@ -103,20 +103,31 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IFileRead.CheckTests(Test[] tests, bool extra)
|
private void FileCopy(string reportFullPath, DateTime dateTime)
|
||||||
{
|
{
|
||||||
if (_Description is not Description)
|
bool isDummyRun = false;
|
||||||
throw new Exception();
|
string successDirectory = string.Empty;
|
||||||
|
List<(Shared.Properties.IScopeInfo, string)> tuples = new();
|
||||||
|
string duplicateDirectory = _FileConnectorConfiguration.TargetFileLocation;
|
||||||
|
string duplicateFile = Path.Combine(duplicateDirectory, Path.GetFileName(reportFullPath));
|
||||||
|
File.Copy(reportFullPath, duplicateFile, overwrite: true);
|
||||||
|
WaitForFileConsumption(dateTime, isDummyRun, successDirectory, duplicateDirectory, tuples, duplicateFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||||
{
|
{
|
||||||
if (dateTime == DateTime.MinValue)
|
if (dateTime == DateTime.MinValue)
|
||||||
{ }
|
{ }
|
||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>());
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
||||||
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
||||||
SetFileParameterLotIDToLogisticsMID();
|
SetFileParameterLotIDToLogisticsMID();
|
||||||
|
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
|
||||||
|
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
|
||||||
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
|
FileCopy(reportFullPath, dateTime);
|
||||||
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using Adaptation.Eaf.EquipmentCore.SelfDescription.ParameterTypes;
|
using Adaptation.Eaf.EquipmentCore.SelfDescription.ParameterTypes;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.SelfDescription;
|
namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.SelfDescription;
|
||||||
|
@ -6,12 +6,12 @@
|
|||||||
<SccLocalPath>SAK</SccLocalPath>
|
<SccLocalPath>SAK</SccLocalPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>disable</ImplicitUsings>
|
||||||
|
<IsPackable>false</IsPackable>
|
||||||
<LangVersion>10.0</LangVersion>
|
<LangVersion>10.0</LangVersion>
|
||||||
<Nullable>disable</Nullable>
|
<Nullable>disable</Nullable>
|
||||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<IsPackable>false</IsPackable>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VSTestLogger>trx</VSTestLogger>
|
<VSTestLogger>trx</VSTestLogger>
|
||||||
@ -34,20 +34,20 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="6.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="6.0.1" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.json" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.json" Version="6.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
|
||||||
<PackageReference Include="Microsoft.Win32.SystemEvents" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Win32.SystemEvents" Version="6.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="MSTest.TestAdapter" Version="2.2.8" />
|
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
|
||||||
<PackageReference Include="MSTest.TestFramework" Version="2.2.8" />
|
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.0" />
|
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.0" />
|
||||||
@ -57,12 +57,15 @@
|
|||||||
<PackageReference Include="System.Text.Json" Version="6.0.3" />
|
<PackageReference Include="System.Text.Json" Version="6.0.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="coverlet.collector" Version="3.1.1" />
|
<PackageReference Include="coverlet.collector" Version="3.1.2">
|
||||||
<PackageReference Include="FFMpegCore" Version="4.7.0" />
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<PackageReference Include="Infineon.Monitoring.MonA" Version="2.0.0" />
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="FFMpegCore" Version="4.8.0" />
|
||||||
|
<PackageReference Include="Infineon.Monitoring.MonA" Version="3.0.0" />
|
||||||
<PackageReference Include="Infineon.Yoda" Version="5.4.1" />
|
<PackageReference Include="Infineon.Yoda" Version="5.4.1" />
|
||||||
<PackageReference Include="Instances" Version="1.6.1" />
|
<PackageReference Include="Instances" Version="2.0.0" />
|
||||||
<PackageReference Include="RoboSharp" Version="1.2.5" />
|
<PackageReference Include="RoboSharp" Version="1.2.7" />
|
||||||
<PackageReference Include="Tesseract" Version="4.1.1" />
|
<PackageReference Include="Tesseract" Version="4.1.1" />
|
||||||
<PackageReference Include="Tibco.Rendezvous" Version="8.5.0" />
|
<PackageReference Include="Tibco.Rendezvous" Version="8.5.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -33,8 +33,6 @@ public class FileRead : Properties.IFileRead
|
|||||||
protected readonly bool _IsDuplicator;
|
protected readonly bool _IsDuplicator;
|
||||||
protected readonly Calendar _Calendar;
|
protected readonly Calendar _Calendar;
|
||||||
protected readonly bool _IsSourceTimer;
|
protected readonly bool _IsSourceTimer;
|
||||||
protected readonly string _VillachPath;
|
|
||||||
protected readonly string _ProgressPath;
|
|
||||||
protected readonly string _EquipmentType;
|
protected readonly string _EquipmentType;
|
||||||
protected readonly long _BreakAfterSeconds;
|
protected readonly long _BreakAfterSeconds;
|
||||||
protected readonly string _ExceptionSubject;
|
protected readonly string _ExceptionSubject;
|
||||||
@ -46,6 +44,7 @@ public class FileRead : Properties.IFileRead
|
|||||||
protected readonly string _CellInstanceConnectionNameBase;
|
protected readonly string _CellInstanceConnectionNameBase;
|
||||||
protected readonly Dictionary<string, List<long>> _DummyRuns;
|
protected readonly Dictionary<string, List<long>> _DummyRuns;
|
||||||
protected readonly Dictionary<string, string> _FileParameter;
|
protected readonly Dictionary<string, string> _FileParameter;
|
||||||
|
protected readonly Dictionary<long, List<string>> _StaticRuns;
|
||||||
protected readonly string _ParameterizedModelObjectDefinitionType;
|
protected readonly string _ParameterizedModelObjectDefinitionType;
|
||||||
protected readonly FileConnectorConfiguration _FileConnectorConfiguration;
|
protected readonly FileConnectorConfiguration _FileConnectorConfiguration;
|
||||||
protected readonly IList<ModelObjectParameterDefinition> _ModelObjectParameterDefinitions;
|
protected readonly IList<ModelObjectParameterDefinition> _ModelObjectParameterDefinitions;
|
||||||
@ -63,12 +62,13 @@ public class FileRead : Properties.IFileRead
|
|||||||
string Properties.IFileRead.CellInstanceConnectionName => _CellInstanceConnectionName;
|
string Properties.IFileRead.CellInstanceConnectionName => _CellInstanceConnectionName;
|
||||||
string Properties.IFileRead.ParameterizedModelObjectDefinitionType => _ParameterizedModelObjectDefinitionType;
|
string Properties.IFileRead.ParameterizedModelObjectDefinitionType => _ParameterizedModelObjectDefinitionType;
|
||||||
|
|
||||||
public FileRead(IDescription description, bool isEvent, ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted)
|
public FileRead(IDescription description, bool isEvent, ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted)
|
||||||
{
|
{
|
||||||
_SMTP = smtp;
|
_SMTP = smtp;
|
||||||
_IsEvent = isEvent;
|
_IsEvent = isEvent;
|
||||||
_DummyRuns = dummyRuns;
|
_DummyRuns = dummyRuns;
|
||||||
_LastTicksDuration = 0;
|
_LastTicksDuration = 0;
|
||||||
|
_StaticRuns = staticRuns;
|
||||||
_IsEAFHosted = isEAFHosted;
|
_IsEAFHosted = isEAFHosted;
|
||||||
_Description = description;
|
_Description = description;
|
||||||
_FileParameter = fileParameter;
|
_FileParameter = fileParameter;
|
||||||
@ -84,6 +84,7 @@ public class FileRead : Properties.IFileRead
|
|||||||
_IsSourceTimer = fileConnectorConfiguration.SourceFileFilter.StartsWith("*Timer.txt");
|
_IsSourceTimer = fileConnectorConfiguration.SourceFileFilter.StartsWith("*Timer.txt");
|
||||||
string cellInstanceConnectionNameBase = cellInstanceConnectionName.Replace("-", string.Empty);
|
string cellInstanceConnectionNameBase = cellInstanceConnectionName.Replace("-", string.Empty);
|
||||||
_Hyphens = cellInstanceConnectionName.Length - cellInstanceConnectionNameBase.Length;
|
_Hyphens = cellInstanceConnectionName.Length - cellInstanceConnectionNameBase.Length;
|
||||||
|
_TracePath = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Path.Trace");
|
||||||
_ExceptionSubject = string.Concat("Exception:", _CellInstanceConnectionName, _FileConnectorConfiguration?.SourceDirectoryCloaking);
|
_ExceptionSubject = string.Concat("Exception:", _CellInstanceConnectionName, _FileConnectorConfiguration?.SourceDirectoryCloaking);
|
||||||
string suffix;
|
string suffix;
|
||||||
string[] segments = _ParameterizedModelObjectDefinitionType.Split('.');
|
string[] segments = _ParameterizedModelObjectDefinitionType.Split('.');
|
||||||
@ -100,27 +101,21 @@ public class FileRead : Properties.IFileRead
|
|||||||
string parameterizedModelObjectDefinitionTypeAppended = string.Concat(@namespace, suffix);
|
string parameterizedModelObjectDefinitionTypeAppended = string.Concat(@namespace, suffix);
|
||||||
if (!isEAFHosted)
|
if (!isEAFHosted)
|
||||||
{
|
{
|
||||||
// if (string.IsNullOrEmpty(equipmentTypeName) || equipmentTypeName != parameterizedModelObjectDefinitionTypeAppended)
|
if (string.IsNullOrEmpty(equipmentTypeName) || equipmentTypeName != parameterizedModelObjectDefinitionTypeAppended)
|
||||||
// throw new Exception(cellInstanceConnectionName);
|
throw new Exception(cellInstanceConnectionName);
|
||||||
// if (string.IsNullOrEmpty(equipmentDictionaryName) && isEvent)
|
if (string.IsNullOrEmpty(equipmentDictionaryName) && isEvent)
|
||||||
// throw new Exception(cellInstanceConnectionName);
|
throw new Exception(cellInstanceConnectionName);
|
||||||
// if (!string.IsNullOrEmpty(equipmentDictionaryName) && !isEvent)
|
if (!string.IsNullOrEmpty(equipmentDictionaryName) && !isEvent)
|
||||||
// throw new Exception(cellInstanceConnectionName);
|
throw new Exception(cellInstanceConnectionName);
|
||||||
// if (string.IsNullOrEmpty(equipmentDictionaryName) && !isEvent)
|
// if (string.IsNullOrEmpty(equipmentDictionaryName) && !isEvent)
|
||||||
// throw new Exception(cellInstanceConnectionName);
|
// throw new Exception(cellInstanceConnectionName);
|
||||||
// if (!string.IsNullOrEmpty(equipmentDictionaryName) && isEvent)
|
// if (!string.IsNullOrEmpty(equipmentDictionaryName) && isEvent)
|
||||||
// throw new Exception(cellInstanceConnectionName);
|
// throw new Exception(cellInstanceConnectionName);
|
||||||
}
|
}
|
||||||
ModelObjectParameterDefinition[] paths = GetProperties(cellInstanceConnectionName, modelObjectParameters, "Path.");
|
|
||||||
if (paths.Length < 4)
|
|
||||||
throw new Exception(cellInstanceConnectionName);
|
|
||||||
if (isDuplicator)
|
if (isDuplicator)
|
||||||
_MesEntity = string.Empty;
|
_MesEntity = string.Empty;
|
||||||
else
|
else
|
||||||
_MesEntity = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, string.Concat("CellInstance.", cellInstanceName, ".Alias"));
|
_MesEntity = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, string.Concat("CellInstance.", cellInstanceName, ".Alias"));
|
||||||
_TracePath = (from l in paths where l.Name.EndsWith("Trace") select l.Value).FirstOrDefault();
|
|
||||||
_VillachPath = (from l in paths where l.Name.EndsWith("Villach") select l.Value).FirstOrDefault();
|
|
||||||
_ProgressPath = (from l in paths where l.Name.EndsWith("Progress") select l.Value).FirstOrDefault();
|
|
||||||
_EventName = eventName;
|
_EventName = eventName;
|
||||||
_EventNameFileRead = eventNameFileRead;
|
_EventNameFileRead = eventNameFileRead;
|
||||||
_EquipmentType = parameterizedModelObjectDefinitionTypeAppended;
|
_EquipmentType = parameterizedModelObjectDefinitionTypeAppended;
|
||||||
@ -185,6 +180,7 @@ public class FileRead : Properties.IFileRead
|
|||||||
if (ticksDuration < 50000000)
|
if (ticksDuration < 50000000)
|
||||||
ticksDuration = 50000000;
|
ticksDuration = 50000000;
|
||||||
_LastTicksDuration = (long)Math.Ceiling(ticksDuration * .667);
|
_LastTicksDuration = (long)Math.Ceiling(ticksDuration * .667);
|
||||||
|
_Log.Info($"{new TimeSpan(ticksDuration).TotalMilliseconds} TotalMillisecond(s) to process{Environment.NewLine}{_CellInstanceConnectionName}{Environment.NewLine}<{_ReportFullPath}>");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void WaitForThread(Thread thread, List<Exception> threadExceptions)
|
protected void WaitForThread(Thread thread, List<Exception> threadExceptions)
|
||||||
@ -218,35 +214,16 @@ public class FileRead : Properties.IFileRead
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void CreateProgressDirectory(string[] exceptionLines)
|
private void WriteAllLines(string to, string[] exceptionLines)
|
||||||
{
|
{
|
||||||
string progressDirectory;
|
string fileName = string.Concat(to, @"\readme.txt");
|
||||||
StringBuilder stringBuilder = new();
|
try
|
||||||
if (_Hyphens == 0)
|
|
||||||
progressDirectory = Path.Combine(_ProgressPath, _CellInstanceConnectionName);
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
_ = stringBuilder.Clear();
|
if (!Directory.Exists(to))
|
||||||
for (int i = 0; i < _Hyphens; i++)
|
_ = Directory.CreateDirectory(to);
|
||||||
{
|
File.WriteAllLines(fileName, exceptionLines);
|
||||||
if (i > 0 && (i % 2) == 0)
|
|
||||||
_ = stringBuilder.Append(' ');
|
|
||||||
_ = stringBuilder.Append('-');
|
|
||||||
}
|
|
||||||
progressDirectory = string.Concat(_ProgressPath, @"\", (_Hyphens + 1).ToString().PadLeft(2, '0'), " ", stringBuilder).Trim();
|
|
||||||
}
|
|
||||||
DateTime dateTime = DateTime.Now;
|
|
||||||
string weekOfYear = _Calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
|
||||||
progressDirectory = string.Concat(progressDirectory, @"\", dateTime.ToString("yyyy"), "_Week_", weekOfYear, @"\", _Logistics.MID, "_", _Logistics.Sequence, "_", DateTime.Now.Ticks - _Logistics.Sequence);
|
|
||||||
if (!Directory.Exists(progressDirectory))
|
|
||||||
_ = Directory.CreateDirectory(progressDirectory);
|
|
||||||
if (exceptionLines is not null)
|
|
||||||
{
|
|
||||||
string fileName = string.Concat(progressDirectory, @"\readme.txt");
|
|
||||||
try
|
|
||||||
{ File.WriteAllLines(fileName, exceptionLines); }
|
|
||||||
catch (Exception) { }
|
|
||||||
}
|
}
|
||||||
|
catch (Exception ex) { _Log.Error(ex.Message); }
|
||||||
}
|
}
|
||||||
|
|
||||||
protected string[] Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, string to, string from, string resolvedFileLocation, Exception exception)
|
protected string[] Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, string to, string from, string resolvedFileLocation, Exception exception)
|
||||||
@ -260,7 +237,8 @@ public class FileRead : Properties.IFileRead
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
results = new string[] { _Logistics.Sequence.ToString(), _Logistics.ReportFullPath, from, resolvedFileLocation, to, string.Empty, string.Empty, exception.Message, string.Empty, string.Empty, exception.StackTrace };
|
results = new string[] { _Logistics.Sequence.ToString(), _Logistics.ReportFullPath, from, resolvedFileLocation, to, string.Empty, string.Empty, exception.Message, string.Empty, string.Empty, exception.StackTrace };
|
||||||
Shared0449(to, results);
|
if (!_IsDuplicator)
|
||||||
|
WriteAllLines(to, results);
|
||||||
}
|
}
|
||||||
if (extractResults is not null && extractResults.Item4 is not null && extractResults.Item4.Any())
|
if (extractResults is not null && extractResults.Item4 is not null && extractResults.Item4.Any())
|
||||||
{
|
{
|
||||||
@ -281,64 +259,6 @@ public class FileRead : Properties.IFileRead
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static IEnumerable<string> GetDirectoriesRecursively(string path, string directoryNameSegment = null)
|
|
||||||
{
|
|
||||||
Queue<string> queue = new();
|
|
||||||
queue.Enqueue(path);
|
|
||||||
while (queue.Count > 0)
|
|
||||||
{
|
|
||||||
path = queue.Dequeue();
|
|
||||||
foreach (string subDirectory in Directory.GetDirectories(path))
|
|
||||||
{
|
|
||||||
queue.Enqueue(subDirectory);
|
|
||||||
if (string.IsNullOrEmpty(directoryNameSegment) || Path.GetFileName(subDirectory).Contains(directoryNameSegment))
|
|
||||||
yield return subDirectory;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected string GetProcessedDirectory(string progressPath, Logistics logistics, DateTime dateTime, string duplicateDirectory)
|
|
||||||
{
|
|
||||||
string result = duplicateDirectory;
|
|
||||||
string logisticsSequence = logistics.Sequence.ToString();
|
|
||||||
string[] matchDirectories;
|
|
||||||
if (!_IsEAFHosted)
|
|
||||||
matchDirectories = new string[] { Path.GetDirectoryName(Path.GetDirectoryName(logistics.ReportFullPath)) };
|
|
||||||
else
|
|
||||||
matchDirectories = new string[] { GetDirectoriesRecursively(Path.GetDirectoryName(progressPath), logisticsSequence).FirstOrDefault() };
|
|
||||||
if (matchDirectories.Length == 0 || string.IsNullOrEmpty(matchDirectories[0]))
|
|
||||||
matchDirectories = Directory.GetDirectories(duplicateDirectory, string.Concat('*', logisticsSequence, '*'), SearchOption.AllDirectories);
|
|
||||||
if ((matchDirectories is null) || matchDirectories.Length != 1)
|
|
||||||
throw new Exception("Didn't find directory by logistics sequence");
|
|
||||||
if (!matchDirectories[0].Contains("_processed"))
|
|
||||||
{
|
|
||||||
result = string.Concat(matchDirectories[0].Split(new string[] { logisticsSequence }, StringSplitOptions.None)[0], logistics.DateTimeFromSequence.ToString("yyyy-MM-dd_hh;mm_tt_"), dateTime.Ticks - logistics.Sequence, "_processed");
|
|
||||||
Directory.Move(matchDirectories[0], result);
|
|
||||||
result = string.Concat(result, @"\", logistics.Sequence);
|
|
||||||
if (!Directory.Exists(result))
|
|
||||||
_ = Directory.CreateDirectory(result);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected string WriteScopeInfo(string progressPath, Logistics logistics, DateTime dateTime, string duplicateDirectory, List<Tuple<Properties.IScopeInfo, string>> tuples)
|
|
||||||
{
|
|
||||||
string result = GetProcessedDirectory(progressPath, logistics, dateTime, duplicateDirectory);
|
|
||||||
string tupleFile;
|
|
||||||
string fileName = Path.GetFileNameWithoutExtension(logistics.ReportFullPath);
|
|
||||||
string duplicateFile = string.Concat(result, @"\", fileName, ".pdsf");
|
|
||||||
foreach (Tuple<Properties.IScopeInfo, string> tuple in tuples)
|
|
||||||
{
|
|
||||||
if (tuple.Item1.FileName.StartsWith(@"\"))
|
|
||||||
tupleFile = tuple.Item1.FileName;
|
|
||||||
else
|
|
||||||
tupleFile = string.Concat(result, @"\", fileName, "_", tuple.Item1.FileNameWithoutExtension, ".pdsfc");
|
|
||||||
File.WriteAllText(tupleFile, tuple.Item2);
|
|
||||||
}
|
|
||||||
File.Copy(logistics.ReportFullPath, duplicateFile, overwrite: true);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static string GetTupleFile(Logistics logistics, Properties.IScopeInfo scopeInfo, string duplicateDirectory)
|
protected static string GetTupleFile(Logistics logistics, Properties.IScopeInfo scopeInfo, string duplicateDirectory)
|
||||||
{
|
{
|
||||||
string result;
|
string result;
|
||||||
@ -371,7 +291,7 @@ public class FileRead : Properties.IFileRead
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void WaitForFileConsumption(string sourceDirectoryCloaking, Logistics logistics, DateTime dateTime, string successDirectory, string duplicateDirectory, string duplicateFile, List<Tuple<Properties.IScopeInfo, string>> tuples)
|
protected void WaitForFileConsumption(string sourceDirectoryCloaking, Logistics logistics, DateTime dateTime, string successDirectory, string duplicateDirectory, string duplicateFile, List<(Properties.IScopeInfo, string)> tuples)
|
||||||
{
|
{
|
||||||
bool check;
|
bool check;
|
||||||
long preWait;
|
long preWait;
|
||||||
@ -381,24 +301,24 @@ public class FileRead : Properties.IFileRead
|
|||||||
List<int> consumedFileIndices = new();
|
List<int> consumedFileIndices = new();
|
||||||
bool moreThanAnHour = _BreakAfterSeconds > 3600;
|
bool moreThanAnHour = _BreakAfterSeconds > 3600;
|
||||||
long breakAfter = dateTime.AddSeconds(_BreakAfterSeconds).Ticks;
|
long breakAfter = dateTime.AddSeconds(_BreakAfterSeconds).Ticks;
|
||||||
if (moreThanAnHour)
|
if (_FileConnectorConfiguration?.FileHandleWaitTime is null)
|
||||||
preWait = dateTime.AddSeconds(30).Ticks;
|
preWait = dateTime.AddMilliseconds(1234).Ticks;
|
||||||
else
|
else
|
||||||
preWait = dateTime.AddTicks(_LastTicksDuration).Ticks;
|
preWait = dateTime.AddMilliseconds(_FileConnectorConfiguration.FileHandleWaitTime.Value).Ticks;
|
||||||
if (!tuples.Any())
|
if (!tuples.Any())
|
||||||
duplicateFiles.Add(duplicateFile);
|
duplicateFiles.Add(duplicateFile);
|
||||||
string fileName = Path.GetFileNameWithoutExtension(logistics.ReportFullPath);
|
string fileName = Path.GetFileNameWithoutExtension(logistics.ReportFullPath);
|
||||||
string successFile = string.Concat(successDirectory, @"\", Path.GetFileName(logistics.ReportFullPath));
|
string successFile = string.Concat(successDirectory, @"\", Path.GetFileName(logistics.ReportFullPath));
|
||||||
foreach (Tuple<Properties.IScopeInfo, string> tuple in tuples)
|
foreach ((Properties.IScopeInfo scopeInfo, string text) in tuples)
|
||||||
{
|
{
|
||||||
if (tuple.Item1.FileName.StartsWith(@"\"))
|
if (scopeInfo.FileName.StartsWith(@"\"))
|
||||||
tupleFile = tuple.Item1.FileName;
|
tupleFile = scopeInfo.FileName;
|
||||||
else if (!tuple.Item1.FileName.Contains('%'))
|
else if (!scopeInfo.FileName.Contains('%'))
|
||||||
tupleFile = string.Concat(duplicateDirectory, @"\", fileName, "_", tuple.Item1.FileNameWithoutExtension, ".pdsfc");
|
tupleFile = string.Concat(duplicateDirectory, @"\", fileName, "_", scopeInfo.FileNameWithoutExtension, ".pdsfc");
|
||||||
else
|
else
|
||||||
tupleFile = GetTupleFile(logistics, tuple.Item1, duplicateDirectory);
|
tupleFile = GetTupleFile(logistics, scopeInfo, duplicateDirectory);
|
||||||
duplicateFiles.Add(tupleFile);
|
duplicateFiles.Add(tupleFile);
|
||||||
File.WriteAllText(tupleFile, tuple.Item2);
|
File.WriteAllText(tupleFile, text);
|
||||||
}
|
}
|
||||||
for (short i = 0; i < short.MaxValue; i++)
|
for (short i = 0; i < short.MaxValue; i++)
|
||||||
{
|
{
|
||||||
@ -484,7 +404,7 @@ public class FileRead : Properties.IFileRead
|
|||||||
{
|
{
|
||||||
string directory;
|
string directory;
|
||||||
if (!_CellInstanceConnectionName.StartsWith(_CellInstanceName) && _CellInstanceConnectionNameBase == _EquipmentType)
|
if (!_CellInstanceConnectionName.StartsWith(_CellInstanceName) && _CellInstanceConnectionNameBase == _EquipmentType)
|
||||||
directory = Path.Combine(_VillachPath, _EquipmentType, "Target");
|
directory = Path.Combine(_TracePath, _EquipmentType, "Target", _CellInstanceName, _CellInstanceConnectionName);
|
||||||
else
|
else
|
||||||
directory = Path.Combine(_TracePath, _EquipmentType, "Source", _CellInstanceName, _CellInstanceConnectionName);
|
directory = Path.Combine(_TracePath, _EquipmentType, "Source", _CellInstanceName, _CellInstanceConnectionName);
|
||||||
if (!Directory.Exists(directory))
|
if (!Directory.Exists(directory))
|
||||||
@ -500,14 +420,8 @@ public class FileRead : Properties.IFileRead
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception)
|
protected void Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults)
|
||||||
{
|
{
|
||||||
bool isErrorFile = exception is not null;
|
|
||||||
if (!isErrorFile && _IsDuplicator)
|
|
||||||
{
|
|
||||||
if (_IsEAFHosted && !string.IsNullOrEmpty(_ProgressPath))
|
|
||||||
CreateProgressDirectory(exceptionLines: null);
|
|
||||||
}
|
|
||||||
if (!_IsEAFHosted)
|
if (!_IsEAFHosted)
|
||||||
{
|
{
|
||||||
string to;
|
string to;
|
||||||
@ -585,20 +499,6 @@ public class FileRead : Properties.IFileRead
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static Dictionary<Test, List<Properties.IDescription>> GetKeyValuePairs(List<Properties.IDescription> descriptions)
|
|
||||||
{
|
|
||||||
Dictionary<Test, List<Properties.IDescription>> results = new();
|
|
||||||
Test testKey;
|
|
||||||
for (int i = 0; i < descriptions.Count; i++)
|
|
||||||
{
|
|
||||||
testKey = (Test)descriptions[i].Test;
|
|
||||||
if (!results.ContainsKey(testKey))
|
|
||||||
results.Add(testKey, new List<Properties.IDescription>());
|
|
||||||
results[testKey].Add(descriptions[i]);
|
|
||||||
}
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static List<Properties.IDescription> GetDuplicatorDescriptions(JsonElement[] jsonElements)
|
protected static List<Properties.IDescription> GetDuplicatorDescriptions(JsonElement[] jsonElements)
|
||||||
{
|
{
|
||||||
List<Properties.IDescription> results = new();
|
List<Properties.IDescription> results = new();
|
||||||
@ -614,34 +514,7 @@ public class FileRead : Properties.IFileRead
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static Tuple<Test[], Dictionary<Test, List<Properties.IDescription>>> GetTuple(IFileRead fileRead, IEnumerable<Properties.IDescription> descriptions, bool extra = false)
|
private void Shared1880(string itemFile, List<string> directories, FileInfo sourceFile, bool isErrorFile)
|
||||||
{
|
|
||||||
Tuple<Test[], Dictionary<Test, List<Properties.IDescription>>> result;
|
|
||||||
Dictionary<Test, List<Properties.IDescription>> keyValuePairs = GetKeyValuePairs(descriptions.ToList());
|
|
||||||
Test[] tests = (from l in keyValuePairs select l.Key).ToArray();
|
|
||||||
fileRead.CheckTests(tests, extra);
|
|
||||||
result = new Tuple<Test[], Dictionary<Test, List<Properties.IDescription>>>(tests, keyValuePairs);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void Shared0449(string to, string[] exceptionLines)
|
|
||||||
{
|
|
||||||
if (_IsDuplicator)
|
|
||||||
CreateProgressDirectory(exceptionLines: null);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
string fileName = string.Concat(to, @"\readme.txt");
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (!Directory.Exists(to))
|
|
||||||
_ = Directory.CreateDirectory(to);
|
|
||||||
File.WriteAllLines(fileName, exceptionLines);
|
|
||||||
}
|
|
||||||
catch (Exception ex) { _Log.Error(ex.Message); }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void Shared1880(string itemFile, List<string> directories, FileInfo sourceFile, bool isErrorFile)
|
|
||||||
{
|
{
|
||||||
string itemDirectory;
|
string itemDirectory;
|
||||||
directories.Add(Path.GetDirectoryName(sourceFile.FullName));
|
directories.Add(Path.GetDirectoryName(sourceFile.FullName));
|
||||||
@ -676,7 +549,7 @@ public class FileRead : Properties.IFileRead
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void Shared1811(string to, FileInfo sourceFile)
|
private void Shared1811(string to, FileInfo sourceFile)
|
||||||
{
|
{
|
||||||
if (!_IsDuplicator && _FileConnectorConfiguration.SourceFileFilter != "*" && sourceFile.Exists && sourceFile.Length < _MinFileLength)
|
if (!_IsDuplicator && _FileConnectorConfiguration.SourceFileFilter != "*" && sourceFile.Exists && sourceFile.Length < _MinFileLength)
|
||||||
{
|
{
|
||||||
@ -684,7 +557,7 @@ public class FileRead : Properties.IFileRead
|
|||||||
string jobIdDirectory = Path.GetDirectoryName(to);
|
string jobIdDirectory = Path.GetDirectoryName(to);
|
||||||
DateTime dateTime = DateTime.Now.AddMinutes(-15);
|
DateTime dateTime = DateTime.Now.AddMinutes(-15);
|
||||||
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
||||||
string weekDirectory = string.Concat(_Logistics.DateTimeFromSequence.ToString("yyyy"), "_Week_", weekOfYear, @"\", _Logistics.DateTimeFromSequence.ToString("yyyy-MM-dd"));
|
string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}{@"\"}{_Logistics.DateTimeFromSequence:yyyy-MM-dd}";
|
||||||
string destinationDirectory = string.Concat(jobIdDirectory, @"\_ Ignore 100 bytes\", weekDirectory, @"\", directoryName);
|
string destinationDirectory = string.Concat(jobIdDirectory, @"\_ Ignore 100 bytes\", weekDirectory, @"\", directoryName);
|
||||||
if (!Directory.Exists(destinationDirectory))
|
if (!Directory.Exists(destinationDirectory))
|
||||||
_ = Directory.CreateDirectory(destinationDirectory);
|
_ = Directory.CreateDirectory(destinationDirectory);
|
||||||
@ -713,7 +586,7 @@ public class FileRead : Properties.IFileRead
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void Shared0231(List<string> directories)
|
private void Shared0231(List<string> directories)
|
||||||
{
|
{
|
||||||
if (_FileConnectorConfiguration.PostProcessingMode != FileConnectorConfiguration.PostProcessingModeEnum.Copy)
|
if (_FileConnectorConfiguration.PostProcessingMode != FileConnectorConfiguration.PostProcessingModeEnum.Copy)
|
||||||
{
|
{
|
||||||
@ -725,13 +598,13 @@ public class FileRead : Properties.IFileRead
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void Shared0413(DateTime dateTime, bool isDummyRun, string successDirectory, string duplicateDirectory, List<Tuple<Properties.IScopeInfo, string>> tuples, string duplicateFile)
|
protected void WaitForFileConsumption(DateTime dateTime, bool isDummyRun, string successDirectory, string duplicateDirectory, List<(Properties.IScopeInfo, string)> tuples, string duplicateFile)
|
||||||
{
|
{
|
||||||
if (!isDummyRun && _IsEAFHosted)
|
if (!isDummyRun && _IsEAFHosted)
|
||||||
WaitForFileConsumption(_FileConnectorConfiguration.SourceDirectoryCloaking, _Logistics, dateTime, successDirectory, duplicateDirectory, duplicateFile, tuples);
|
WaitForFileConsumption(_FileConnectorConfiguration.SourceDirectoryCloaking, _Logistics, dateTime, successDirectory, duplicateDirectory, duplicateFile, tuples);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
long breakAfter = DateTime.Now.AddSeconds(_FileConnectorConfiguration.ConnectionRetryInterval.Value).Ticks;
|
long breakAfter = DateTime.Now.AddSeconds(_FileConnectorConfiguration.FileHandleWaitTime.Value).Ticks;
|
||||||
for (short i = 0; i < short.MaxValue; i++)
|
for (short i = 0; i < short.MaxValue; i++)
|
||||||
{
|
{
|
||||||
if (!_IsEAFHosted || DateTime.Now.Ticks > breakAfter)
|
if (!_IsEAFHosted || DateTime.Now.Ticks > breakAfter)
|
||||||
@ -741,75 +614,50 @@ public class FileRead : Properties.IFileRead
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static void Shared0607(string reportFullPath, string duplicateDirectory, string logisticsSequence, string destinationDirectory)
|
internal static string GetJobIdParentDirectory(string directory)
|
||||||
{
|
{
|
||||||
if (destinationDirectory == duplicateDirectory)
|
string result;
|
||||||
throw new Exception("Check Target File Folder for %LotIDWithLogisticsSequence%_in process on CI (not Duplicator)");
|
if (!string.IsNullOrEmpty(Path.GetFileName(directory)))
|
||||||
if (destinationDirectory.EndsWith(logisticsSequence))
|
result = Path.GetFullPath(GetParentParent(directory));
|
||||||
destinationDirectory = Path.GetDirectoryName(destinationDirectory);
|
else
|
||||||
string[] deleteFiles = Directory.GetFiles(destinationDirectory, "*", SearchOption.AllDirectories);
|
result = Path.GetFullPath(GetParentParent(Path.GetDirectoryName(directory)));
|
||||||
if (deleteFiles.Length > 250)
|
if (!Directory.Exists(result))
|
||||||
throw new Exception("Safety net!");
|
_ = Directory.CreateDirectory(result);
|
||||||
foreach (string file in deleteFiles)
|
return result;
|
||||||
File.Delete(file);
|
|
||||||
Directory.Delete(destinationDirectory, recursive: true);
|
|
||||||
File.Delete(reportFullPath);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected string[] Shared1567(string reportFullPath, List<Tuple<Properties.IScopeInfo, string>> tuples)
|
internal string[] GetInProcessDirectory(string jobIdDirectory)
|
||||||
{
|
{
|
||||||
string[] results;
|
string[] results;
|
||||||
string historicalText;
|
|
||||||
string logisticsSequence = _Logistics.Sequence.ToString();
|
|
||||||
string jobIdDirectory = string.Concat(Path.GetDirectoryName(Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation)), @"\", _Logistics.JobID);
|
|
||||||
if (!Directory.Exists(jobIdDirectory))
|
|
||||||
_ = Directory.CreateDirectory(jobIdDirectory);
|
|
||||||
string[] matchDirectories;
|
|
||||||
if (!_IsEAFHosted)
|
if (!_IsEAFHosted)
|
||||||
matchDirectories = new string[] { Path.GetDirectoryName(Path.GetDirectoryName(reportFullPath)) };
|
results = new string[] { jobIdDirectory };
|
||||||
else
|
else
|
||||||
matchDirectories = Directory.GetDirectories(jobIdDirectory, string.Concat(_Logistics.MID, '*', logisticsSequence, '*'), SearchOption.TopDirectoryOnly);
|
|
||||||
if ((matchDirectories is null) || matchDirectories.Length != 1)
|
|
||||||
throw new Exception("Didn't find directory by logistics sequence");
|
|
||||||
string fileName = Path.GetFileNameWithoutExtension(reportFullPath);
|
|
||||||
string sequenceDirectory = string.Concat(matchDirectories[0], @"\", logisticsSequence);
|
|
||||||
if (!Directory.Exists(sequenceDirectory))
|
|
||||||
_ = Directory.CreateDirectory(sequenceDirectory);
|
|
||||||
foreach (Tuple<Properties.IScopeInfo, string> tuple in tuples)
|
|
||||||
{
|
{
|
||||||
fileName = string.Concat(sequenceDirectory, @"\", fileName, "_", tuple.Item1.FileNameWithoutExtension, ".pdsfc");
|
string logisticsSequence = _Logistics.Sequence.ToString();
|
||||||
if (_IsEAFHosted)
|
results = Directory.GetDirectories(jobIdDirectory, string.Concat(_Logistics.MID, '*', logisticsSequence, '*'), SearchOption.TopDirectoryOnly);
|
||||||
File.WriteAllText(fileName, tuple.Item2);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (File.Exists(fileName))
|
|
||||||
{
|
|
||||||
historicalText = File.ReadAllText(fileName);
|
|
||||||
if (tuple.Item2 != historicalText)
|
|
||||||
throw new Exception("File doesn't match historical!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
results = matchDirectories;
|
if ((results is null) || results.Length != 1)
|
||||||
|
throw new Exception("Didn't find directory by logistics sequence");
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void Shared1277(string reportFullPath, string destinationDirectory, string logisticsSequence, string jobIdDirectory, string json)
|
internal static string GetFileNameAfterUnderscoreSplit(string reportFullPath)
|
||||||
{
|
{
|
||||||
string ecCharacterizationSi = Path.GetDirectoryName(Path.GetDirectoryName(jobIdDirectory));
|
string result;
|
||||||
string destinationJobIdDirectory = string.Concat(ecCharacterizationSi, @"\Processed\", _Logistics.JobID);
|
string[] segments = Path.GetFileNameWithoutExtension(reportFullPath).Split('_');
|
||||||
if (!Directory.Exists(destinationJobIdDirectory))
|
if (segments.Length <= 2)
|
||||||
_ = Directory.CreateDirectory(destinationJobIdDirectory);
|
result = segments[0];
|
||||||
destinationJobIdDirectory = string.Concat(destinationJobIdDirectory, @"\", Path.GetFileName(destinationDirectory).Split(new string[] { logisticsSequence }, StringSplitOptions.None)[0], _Logistics.DateTimeFromSequence.ToString("yyyy-MM-dd_hh;mm_tt_"), DateTime.Now.Ticks - _Logistics.Sequence);
|
else
|
||||||
string sequenceDirectory = string.Concat(destinationJobIdDirectory, @"\", logisticsSequence);
|
result = string.Concat(segments[0], segments[2]);
|
||||||
string jsonFileName = string.Concat(sequenceDirectory, @"\", Path.GetFileNameWithoutExtension(reportFullPath), ".json");
|
return result;
|
||||||
Directory.Move(destinationDirectory, destinationJobIdDirectory);
|
}
|
||||||
if (!Directory.Exists(sequenceDirectory))
|
|
||||||
_ = Directory.CreateDirectory(sequenceDirectory);
|
internal static string GetParentParent(string value)
|
||||||
File.Copy(reportFullPath, string.Concat(sequenceDirectory, @"\", Path.GetFileName(reportFullPath)), overwrite: true);
|
{
|
||||||
File.WriteAllText(jsonFileName, json);
|
string result = Path.GetDirectoryName(Path.GetDirectoryName(value));
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2022-05-13 -> Shared - FileRead
|
// 2022-06-08 -> Shared - FileRead
|
@ -12,7 +12,6 @@ public interface IFileRead : Properties.IFileRead
|
|||||||
JsonProperty[] GetDefault();
|
JsonProperty[] GetDefault();
|
||||||
string GetEventDescription();
|
string GetEventDescription();
|
||||||
List<string> GetHeaderNames();
|
List<string> GetHeaderNames();
|
||||||
void CheckTests(Test[] tests, bool extra);
|
|
||||||
Dictionary<string, string> GetDisplayNamesJsonElement();
|
Dictionary<string, string> GetDisplayNamesJsonElement();
|
||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> ReExtract();
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> ReExtract();
|
||||||
List<IDescription> GetDescriptions(IFileRead fileRead, List<Test> tests, IProcessData processData);
|
List<IDescription> GetDescriptions(IFileRead fileRead, List<Test> tests, IProcessData processData);
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
@ -11,14 +10,14 @@ namespace Adaptation.Shared.Metrology;
|
|||||||
public partial class WS
|
public partial class WS
|
||||||
{
|
{
|
||||||
|
|
||||||
public static Tuple<string, Results> SendData(string url, object payload, int timeoutSeconds = 120)
|
public static (string, Results) SendData(string url, object payload, int timeoutSeconds = 120)
|
||||||
{
|
{
|
||||||
Results results = new();
|
Results results = new();
|
||||||
string resultsJson = string.Empty;
|
string resultsJson = string.Empty;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string json = JsonSerializer.Serialize(payload, payload.GetType());
|
string json = JsonSerializer.Serialize(payload, payload.GetType());
|
||||||
if (string.IsNullOrEmpty(url) || !url.Contains(':') || !url.Contains('.'))
|
if (string.IsNullOrEmpty(url) || !url.Contains(":") || !url.Contains("."))
|
||||||
throw new Exception("Invalid URL");
|
throw new Exception("Invalid URL");
|
||||||
using (HttpClient httpClient = new())
|
using (HttpClient httpClient = new())
|
||||||
{
|
{
|
||||||
@ -49,7 +48,7 @@ public partial class WS
|
|||||||
results.Errors = new List<string>();
|
results.Errors = new List<string>();
|
||||||
results.Errors.Add(stringBuilder.ToString());
|
results.Errors.Add(stringBuilder.ToString());
|
||||||
}
|
}
|
||||||
return new Tuple<string, Results>(resultsJson, results);
|
return new(resultsJson, results);
|
||||||
}
|
}
|
||||||
|
|
||||||
// this method is a wrapper for attaching a file to either a header or data record
|
// this method is a wrapper for attaching a file to either a header or data record
|
||||||
|
@ -12,8 +12,6 @@ namespace Adaptation.Shared;
|
|||||||
public class ProcessDataStandardFormat
|
public class ProcessDataStandardFormat
|
||||||
{
|
{
|
||||||
|
|
||||||
public const string RecordStart = "RECORD_START";
|
|
||||||
|
|
||||||
public enum SearchFor
|
public enum SearchFor
|
||||||
{
|
{
|
||||||
EquipmentIntegration = 1,
|
EquipmentIntegration = 1,
|
||||||
@ -348,8 +346,8 @@ public class ProcessDataStandardFormat
|
|||||||
int startsAt = 0;
|
int startsAt = 0;
|
||||||
string[] segments;
|
string[] segments;
|
||||||
int? currentGroup = null;
|
int? currentGroup = null;
|
||||||
char inputSeperator = '\t';
|
char inputSeparator = '\t';
|
||||||
char outputSeperator = '\t';
|
char outputSeparator = '\t';
|
||||||
List<int> vs = new();
|
List<int> vs = new();
|
||||||
List<int[]> groups = new();
|
List<int[]> groups = new();
|
||||||
string[] lines = File.ReadAllLines(reportFullPath);
|
string[] lines = File.ReadAllLines(reportFullPath);
|
||||||
@ -358,7 +356,7 @@ public class ProcessDataStandardFormat
|
|||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(lines[i]))
|
if (string.IsNullOrEmpty(lines[i]))
|
||||||
continue;
|
continue;
|
||||||
segments = lines[i].Split(inputSeperator);
|
segments = lines[i].Split(inputSeparator);
|
||||||
if (currentGroup is null)
|
if (currentGroup is null)
|
||||||
currentGroup = segments.Length;
|
currentGroup = segments.Length;
|
||||||
if (segments.Length != currentGroup)
|
if (segments.Length != currentGroup)
|
||||||
@ -368,20 +366,20 @@ public class ProcessDataStandardFormat
|
|||||||
startsAt = i;
|
startsAt = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (startsAt == lines.Length - 1 && lines[0].Split(inputSeperator).Length != currentGroup)
|
if (startsAt == lines.Length - 1 && lines[0].Split(inputSeparator).Length != currentGroup)
|
||||||
groups.Add(new int[] { lines.Length - 1, lines.Length - 1 });
|
groups.Add(new int[] { lines.Length - 1, lines.Length - 1 });
|
||||||
for (int g = 0; g < groups.Count; g++)
|
for (int g = 0; g < groups.Count; g++)
|
||||||
{
|
{
|
||||||
vs.Clear();
|
vs.Clear();
|
||||||
group = groups[g];
|
group = groups[g];
|
||||||
line = lines[group[0]];
|
line = lines[group[0]];
|
||||||
segments = line.Split(inputSeperator);
|
segments = line.Split(inputSeparator);
|
||||||
for (int s = 0; s < segments.Length; s++)
|
for (int s = 0; s < segments.Length; s++)
|
||||||
vs.Add(segments[s].Length);
|
vs.Add(segments[s].Length);
|
||||||
for (int i = group[0]; i <= group[1]; i++)
|
for (int i = group[0]; i <= group[1]; i++)
|
||||||
{
|
{
|
||||||
line = lines[i];
|
line = lines[i];
|
||||||
segments = line.Split(inputSeperator);
|
segments = line.Split(inputSeparator);
|
||||||
for (int s = 0; s < segments.Length; s++)
|
for (int s = 0; s < segments.Length; s++)
|
||||||
{
|
{
|
||||||
if (vs[s] < segments[s].Length)
|
if (vs[s] < segments[s].Length)
|
||||||
@ -390,16 +388,16 @@ public class ProcessDataStandardFormat
|
|||||||
}
|
}
|
||||||
_ = stringBuilder.Clear();
|
_ = stringBuilder.Clear();
|
||||||
for (int s = 0; s < segments.Length; s++)
|
for (int s = 0; s < segments.Length; s++)
|
||||||
_ = stringBuilder.Append((s + 1).ToString().PadLeft(vs[s], ' ')).Append(outputSeperator);
|
_ = stringBuilder.Append((s + 1).ToString().PadLeft(vs[s], ' ')).Append(outputSeparator);
|
||||||
_ = stringBuilder.Remove(stringBuilder.Length - 1, 1);
|
_ = stringBuilder.Remove(stringBuilder.Length - 1, 1);
|
||||||
results.Add(stringBuilder.ToString());
|
results.Add(stringBuilder.ToString());
|
||||||
for (int i = group[0]; i <= group[1]; i++)
|
for (int i = group[0]; i <= group[1]; i++)
|
||||||
{
|
{
|
||||||
line = lines[i];
|
line = lines[i];
|
||||||
_ = stringBuilder.Clear();
|
_ = stringBuilder.Clear();
|
||||||
segments = line.Split(inputSeperator);
|
segments = line.Split(inputSeparator);
|
||||||
for (int s = 0; s < segments.Length; s++)
|
for (int s = 0; s < segments.Length; s++)
|
||||||
_ = stringBuilder.Append(segments[s].PadLeft(vs[s], ' ')).Append(outputSeperator);
|
_ = stringBuilder.Append(segments[s].PadLeft(vs[s], ' ')).Append(outputSeparator);
|
||||||
_ = stringBuilder.Remove(stringBuilder.Length - 1, 1);
|
_ = stringBuilder.Remove(stringBuilder.Length - 1, 1);
|
||||||
results.Add(stringBuilder.ToString());
|
results.Add(stringBuilder.ToString());
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,10 @@
|
|||||||
using Adaptation._Tests.Shared;
|
using Adaptation._Tests.Shared;
|
||||||
using Adaptation.Shared.Methods;
|
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text.Json;
|
|
||||||
using System.Threading;
|
|
||||||
|
|
||||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_43_0;
|
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_43_0;
|
||||||
|
|
||||||
@ -57,7 +53,7 @@ public class MET08ANLYSDIFAAST230 : EAFLoggingUnitTesting
|
|||||||
string check = "*.pdsf";
|
string check = "*.pdsf";
|
||||||
MethodBase methodBase = new StackFrame().GetMethod();
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
_ = Helpers.Metrology.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,7 +63,7 @@ public class MET08ANLYSDIFAAST230 : EAFLoggingUnitTesting
|
|||||||
string check = "*.pdsf";
|
string check = "*.pdsf";
|
||||||
MethodBase methodBase = new StackFrame().GetMethod();
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
_ = Helpers.Metrology.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,7 +73,7 @@ public class MET08ANLYSDIFAAST230 : EAFLoggingUnitTesting
|
|||||||
string check = "*.pdsf";
|
string check = "*.pdsf";
|
||||||
MethodBase methodBase = new StackFrame().GetMethod();
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
_ = Helpers.Metrology.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,7 +83,7 @@ public class MET08ANLYSDIFAAST230 : EAFLoggingUnitTesting
|
|||||||
string check = "*.pdsf";
|
string check = "*.pdsf";
|
||||||
MethodBase methodBase = new StackFrame().GetMethod();
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
_ = Helpers.Metrology.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,7 +93,7 @@ public class MET08ANLYSDIFAAST230 : EAFLoggingUnitTesting
|
|||||||
string check = "*.pdsf";
|
string check = "*.pdsf";
|
||||||
MethodBase methodBase = new StackFrame().GetMethod();
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
_ = Helpers.Metrology.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,7 +103,7 @@ public class MET08ANLYSDIFAAST230 : EAFLoggingUnitTesting
|
|||||||
string check = "*.pdsf";
|
string check = "*.pdsf";
|
||||||
MethodBase methodBase = new StackFrame().GetMethod();
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
_ = Helpers.Metrology.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,7 +113,7 @@ public class MET08ANLYSDIFAAST230 : EAFLoggingUnitTesting
|
|||||||
string check = "*.pdsf";
|
string check = "*.pdsf";
|
||||||
MethodBase methodBase = new StackFrame().GetMethod();
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
_ = Helpers.Metrology.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,7 +123,7 @@ public class MET08ANLYSDIFAAST230 : EAFLoggingUnitTesting
|
|||||||
string check = "*.pdsf";
|
string check = "*.pdsf";
|
||||||
MethodBase methodBase = new StackFrame().GetMethod();
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
_ = Helpers.Metrology.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,7 +133,7 @@ public class MET08ANLYSDIFAAST230 : EAFLoggingUnitTesting
|
|||||||
string check = "*.pdsf";
|
string check = "*.pdsf";
|
||||||
MethodBase methodBase = new StackFrame().GetMethod();
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
_ = Helpers.Metrology.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,7 +143,7 @@ public class MET08ANLYSDIFAAST230 : EAFLoggingUnitTesting
|
|||||||
string check = "637400762024374000.zip";
|
string check = "637400762024374000.zip";
|
||||||
MethodBase methodBase = new StackFrame().GetMethod();
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
_ = Helpers.Metrology.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,15 +1,8 @@
|
|||||||
using Adaptation._Tests.Shared;
|
|
||||||
using Adaptation.Shared;
|
using Adaptation.Shared;
|
||||||
using Adaptation.Shared.Methods;
|
using Adaptation.Shared.Methods;
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text.Json;
|
|
||||||
using System.Threading;
|
|
||||||
|
|
||||||
namespace Adaptation._Tests.Extract.Staging.v2_43_0;
|
namespace Adaptation._Tests.Extract.Staging.v2_43_0;
|
||||||
|
|
||||||
@ -41,7 +34,7 @@ public class MET08ANLYSDIFAAST230
|
|||||||
string[] variables = _MET08ANLYSDIFAAST230.AdaptationTesting.GetVariables(methodBase, check);
|
string[] variables = _MET08ANLYSDIFAAST230.AdaptationTesting.GetVariables(methodBase, check);
|
||||||
IFileRead fileRead = _MET08ANLYSDIFAAST230.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
IFileRead fileRead = _MET08ANLYSDIFAAST230.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||||
Logistics logistics = new(fileRead);
|
Logistics logistics = new(fileRead);
|
||||||
_ = Helpers.Metrology.ReExtractComapareUpdatePassDirectory(variables, fileRead, logistics);
|
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF: false);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -50,6 +43,18 @@ public class MET08ANLYSDIFAAST230
|
|||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Staging__v2_43_0__MET08ANLYSDIFAAST230__IQSSi() => _MET08ANLYSDIFAAST230.Staging__v2_43_0__MET08ANLYSDIFAAST230__IQSSi();
|
public void Staging__v2_43_0__MET08ANLYSDIFAAST230__IQSSi() => _MET08ANLYSDIFAAST230.Staging__v2_43_0__MET08ANLYSDIFAAST230__IQSSi();
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_43_0__MET08ANLYSDIFAAST230__IQSSi637884771880950000__Normal()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
_MET08ANLYSDIFAAST230.Staging__v2_43_0__MET08ANLYSDIFAAST230__IQSSi();
|
||||||
|
string[] variables = _MET08ANLYSDIFAAST230.AdaptationTesting.GetVariables(methodBase, check);
|
||||||
|
IFileRead fileRead = _MET08ANLYSDIFAAST230.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||||
|
Logistics logistics = new(fileRead);
|
||||||
|
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF: false);
|
||||||
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Staging__v2_43_0__MET08ANLYSDIFAAST230__OpenInsight() => _MET08ANLYSDIFAAST230.Staging__v2_43_0__MET08ANLYSDIFAAST230__OpenInsight();
|
public void Staging__v2_43_0__MET08ANLYSDIFAAST230__OpenInsight() => _MET08ANLYSDIFAAST230.Staging__v2_43_0__MET08ANLYSDIFAAST230__OpenInsight();
|
||||||
|
|
||||||
|
@ -1,192 +0,0 @@
|
|||||||
using Adaptation.Shared;
|
|
||||||
using Adaptation.Shared.Methods;
|
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Text.Json;
|
|
||||||
|
|
||||||
namespace Adaptation._Tests.Helpers;
|
|
||||||
|
|
||||||
public class Metrology
|
|
||||||
{
|
|
||||||
|
|
||||||
internal static Tuple<string, string[], string[]> GetLogisticsColumnsAndBody(string fileFullName)
|
|
||||||
{
|
|
||||||
Tuple<string, string[], string[]> results;
|
|
||||||
results = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(fileFullName);
|
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(results.Item1));
|
|
||||||
Assert.IsTrue(results.Item2.Length > 0, "Column check");
|
|
||||||
Assert.IsTrue(results.Item3.Length > 0, "Body check");
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static Tuple<string, string[], string[]> GetLogisticsColumnsAndBody(string searchDirectory, string searchPattern)
|
|
||||||
{
|
|
||||||
Tuple<string, string[], string[]> results;
|
|
||||||
if (searchPattern.Length > 3 && !searchPattern.Contains('*') && File.Exists(searchPattern))
|
|
||||||
results = GetLogisticsColumnsAndBody(searchPattern);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
string[] pdsfFiles;
|
|
||||||
pdsfFiles = Directory.GetFiles(searchDirectory, searchPattern, SearchOption.TopDirectoryOnly);
|
|
||||||
if (!pdsfFiles.Any())
|
|
||||||
_ = Process.Start("explorer.exe", searchDirectory);
|
|
||||||
Assert.IsTrue(pdsfFiles.Any(), "GetFiles check");
|
|
||||||
results = GetLogisticsColumnsAndBody(pdsfFiles[0]);
|
|
||||||
}
|
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(results.Item1));
|
|
||||||
Assert.IsTrue(results.Item2.Length > 0, "Column check");
|
|
||||||
Assert.IsTrue(results.Item3.Length > 0, "Body check");
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static Tuple<string, string[], string[]> GetLogisticsColumnsAndBody(IFileRead fileRead, Logistics logistics, Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult, Tuple<string, string[], string[]> pdsf)
|
|
||||||
{
|
|
||||||
Tuple<string, string[], string[]> results;
|
|
||||||
string text = ProcessDataStandardFormat.GetPDSFText(fileRead, logistics, extractResult.Item3, logisticsText: pdsf.Item1);
|
|
||||||
string[] lines = text.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
|
|
||||||
results = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(logistics.ReportFullPath, lines);
|
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(results.Item1));
|
|
||||||
Assert.IsTrue(results.Item2.Length > 0, "Column check");
|
|
||||||
Assert.IsTrue(results.Item3.Length > 0, "Body check");
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static string[] GetItem2(Tuple<string, string[], string[]> pdsf, Tuple<string, string[], string[]> pdsfNew)
|
|
||||||
{
|
|
||||||
JsonSerializerOptions jsonSerializerOptions = new() { WriteIndented = true };
|
|
||||||
string jsonOld = JsonSerializer.Serialize(pdsf.Item2, pdsf.Item2.GetType(), jsonSerializerOptions);
|
|
||||||
string jsonNew = JsonSerializer.Serialize(pdsfNew.Item2, pdsfNew.Item2.GetType(), jsonSerializerOptions);
|
|
||||||
return new string[] { jsonOld, jsonNew };
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static string[] GetItem3(Tuple<string, string[], string[]> pdsf, Tuple<string, string[], string[]> pdsfNew)
|
|
||||||
{
|
|
||||||
string joinOld = string.Join(Environment.NewLine, from l in pdsf.Item3 select string.Join('\t', from t in l.Split('\t') where !t.Contains(@"\\") select t));
|
|
||||||
string joinNew = string.Join(Environment.NewLine, from l in pdsfNew.Item3 select string.Join('\t', from t in l.Split('\t') where !t.Contains(@"\\") select t));
|
|
||||||
return new string[] { joinOld, joinNew };
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static void UpdatePassDirectory(string searchDirectory)
|
|
||||||
{
|
|
||||||
DateTime dateTime = DateTime.Now;
|
|
||||||
try
|
|
||||||
{ Directory.SetLastWriteTime(searchDirectory, dateTime); }
|
|
||||||
catch (Exception) { }
|
|
||||||
string ticksDirectory = Path.GetDirectoryName(searchDirectory);
|
|
||||||
try
|
|
||||||
{ Directory.SetLastWriteTime(ticksDirectory, dateTime); }
|
|
||||||
catch (Exception) { }
|
|
||||||
string[] directories = Directory.GetDirectories(searchDirectory, "*", SearchOption.TopDirectoryOnly);
|
|
||||||
foreach (string directory in directories)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{ Directory.SetLastWriteTime(directory, dateTime); }
|
|
||||||
catch (Exception) { }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static string GetFileName(MethodBase methodBase)
|
|
||||||
{
|
|
||||||
string result;
|
|
||||||
string connectionName;
|
|
||||||
string seperator = "__";
|
|
||||||
string connectionNameAndTicks;
|
|
||||||
string[] segments = methodBase.Name.Split(new string[] { seperator }, StringSplitOptions.None);
|
|
||||||
string environment = segments[0];
|
|
||||||
string rawVersionName = segments[1];
|
|
||||||
string equipmentTypeDirectory = segments[2];
|
|
||||||
string ticks = DateTime.Now.Ticks.ToString();
|
|
||||||
string comment = segments[segments.Length - 1];
|
|
||||||
string versionName = segments[1].Replace('_', '.');
|
|
||||||
string before = string.Concat(environment, seperator, rawVersionName, seperator, equipmentTypeDirectory, seperator);
|
|
||||||
string after = methodBase.Name.Substring(before.Length);
|
|
||||||
if (after.Length < ticks.Length)
|
|
||||||
{
|
|
||||||
connectionName = after;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
connectionNameAndTicks = after.Substring(0, after.Length - 2 - comment.Length);
|
|
||||||
connectionName = connectionNameAndTicks.Substring(0, connectionNameAndTicks.Length - ticks.Length);
|
|
||||||
ticks = connectionNameAndTicks.Substring(connectionName.Length);
|
|
||||||
}
|
|
||||||
result = Path.Combine(environment, equipmentTypeDirectory, versionName, $"{environment}__{rawVersionName}__{equipmentTypeDirectory}__{connectionName}", ticks, $"{connectionName.Replace('_', '-')}.json");
|
|
||||||
if (result.Contains('/'))
|
|
||||||
result = string.Concat('/', result);
|
|
||||||
else
|
|
||||||
result = string.Concat('\\', result);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static void CompareSaveTSV(string textFileDirectory, string[] join)
|
|
||||||
{
|
|
||||||
if (join[0] != join[1])
|
|
||||||
{
|
|
||||||
_ = Process.Start("explorer.exe", textFileDirectory);
|
|
||||||
File.WriteAllText(Path.Combine(textFileDirectory, "0.tsv"), join[0]);
|
|
||||||
File.WriteAllText(Path.Combine(textFileDirectory, "1.tsv"), join[1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static void CompareSaveJSON(string textFileDirectory, string[] json)
|
|
||||||
{
|
|
||||||
if (json[0] != json[1])
|
|
||||||
{
|
|
||||||
_ = Process.Start("explorer.exe", textFileDirectory);
|
|
||||||
File.WriteAllText(Path.Combine(textFileDirectory, "0.json"), json[0]);
|
|
||||||
File.WriteAllText(Path.Combine(textFileDirectory, "1.json"), json[1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static void CompareSave(string textFileDirectory, Tuple<string, string[], string[]> pdsf, Tuple<string, string[], string[]> pdsfNew)
|
|
||||||
{
|
|
||||||
if (pdsf.Item1 != pdsfNew.Item1)
|
|
||||||
{
|
|
||||||
_ = Process.Start("explorer.exe", textFileDirectory);
|
|
||||||
File.WriteAllText(Path.Combine(textFileDirectory, "0.dat"), pdsf.Item1);
|
|
||||||
File.WriteAllText(Path.Combine(textFileDirectory, "1.dat"), pdsfNew.Item1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static IFileRead GetWriteConfigurationGetFileRead(MethodBase methodBase, string check, Shared.AdaptationTesting adaptationTesting)
|
|
||||||
{
|
|
||||||
IFileRead result;
|
|
||||||
string[] fileNameAndJson = adaptationTesting.GetConfiguration(methodBase);
|
|
||||||
Assert.IsTrue(fileNameAndJson[1].Contains(check));
|
|
||||||
File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]);
|
|
||||||
result = adaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false);
|
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(result.CellInstanceConnectionName));
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static string ReExtractComapareUpdatePassDirectory(string[] variables, IFileRead fileRead, Logistics logistics, bool validatePDSF = true)
|
|
||||||
{
|
|
||||||
string result;
|
|
||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult = fileRead.ReExtract();
|
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1));
|
|
||||||
Assert.IsTrue(extractResult.Item3.Length > 0, "extractResult Array Length check!");
|
|
||||||
Assert.IsNotNull(extractResult.Item4);
|
|
||||||
Tuple<string, string[], string[]> pdsf = GetLogisticsColumnsAndBody(variables[2], variables[4]);
|
|
||||||
Tuple<string, string[], string[]> pdsfNew = GetLogisticsColumnsAndBody(fileRead, logistics, extractResult, pdsf);
|
|
||||||
if (validatePDSF)
|
|
||||||
{
|
|
||||||
CompareSave(variables[5], pdsf, pdsfNew);
|
|
||||||
Assert.IsTrue(pdsf.Item1 == pdsfNew.Item1, "Item1 check!");
|
|
||||||
string[] json = GetItem2(pdsf, pdsfNew);
|
|
||||||
CompareSaveJSON(variables[5], json);
|
|
||||||
Assert.IsTrue(json[0] == json[1], "Item2 check!");
|
|
||||||
string[] join = GetItem3(pdsf, pdsfNew);
|
|
||||||
CompareSaveTSV(variables[5], join);
|
|
||||||
Assert.IsTrue(join[0] == join[1], "Item3 (Join) check!");
|
|
||||||
}
|
|
||||||
UpdatePassDirectory(variables[2]);
|
|
||||||
result = extractResult.Item1;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -5,6 +5,7 @@ using Adaptation._Tests.Shared.PasteSpecialXml.EAF.XML.API.EquipmentType;
|
|||||||
using Adaptation.Eaf.Management.ConfigurationData.CellAutomation;
|
using Adaptation.Eaf.Management.ConfigurationData.CellAutomation;
|
||||||
using Adaptation.Ifx.Eaf.Common.Configuration;
|
using Adaptation.Ifx.Eaf.Common.Configuration;
|
||||||
using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration;
|
using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration;
|
||||||
|
using Adaptation.Shared;
|
||||||
using Adaptation.Shared.Methods;
|
using Adaptation.Shared.Methods;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using System;
|
using System;
|
||||||
@ -175,20 +176,20 @@ public class AdaptationTesting : ISMTP
|
|||||||
string fileFullName;
|
string fileFullName;
|
||||||
string comment;
|
string comment;
|
||||||
string[] textFiles;
|
string[] textFiles;
|
||||||
string seperator = "__";
|
string separator = "__";
|
||||||
string connectionNameAndTicks;
|
string connectionNameAndTicks;
|
||||||
string cellInstanceConnectionName;
|
string cellInstanceConnectionName;
|
||||||
string ticks = DateTime.Now.Ticks.ToString();
|
string ticks = DateTime.Now.Ticks.ToString();
|
||||||
string cellInstanceConnectionNameFromMethodBaseName;
|
string cellInstanceConnectionNameFromMethodBaseName;
|
||||||
string testResultsDirectory = GetTestResultsDirectory();
|
string testResultsDirectory = GetTestResultsDirectory();
|
||||||
string[] segments = methodBaseName.Split(new string[] { seperator }, StringSplitOptions.None);
|
string[] segments = methodBaseName.Split(new string[] { separator }, StringSplitOptions.None);
|
||||||
if (segments[0] != _Environment)
|
if (segments[0] != _Environment)
|
||||||
throw new Exception();
|
throw new Exception();
|
||||||
string rawVersionName = segments[1];
|
string rawVersionName = segments[1];
|
||||||
string rawCellInstanceName = segments[2];
|
string rawCellInstanceName = segments[2];
|
||||||
string cellInstanceVersionName = segments[1].Replace('_', '.');
|
string cellInstanceVersionName = segments[1].Replace('_', '.');
|
||||||
string cellInstanceName = segments[2].Replace('_', '-').Replace("_EQPT", "-EQPT");
|
string cellInstanceName = segments[2].Replace('_', '-').Replace("_EQPT", "-EQPT");
|
||||||
string before = string.Concat(_Environment, seperator, rawVersionName, seperator, cellInstanceName, seperator);
|
string before = string.Concat(_Environment, separator, rawVersionName, separator, cellInstanceName, separator);
|
||||||
string after = methodBaseName.Substring(before.Length);
|
string after = methodBaseName.Substring(before.Length);
|
||||||
string versionDirectory = Path.Combine(testResultsDirectory, _Environment, cellInstanceName, cellInstanceVersionName);
|
string versionDirectory = Path.Combine(testResultsDirectory, _Environment, cellInstanceName, cellInstanceVersionName);
|
||||||
if (!Directory.Exists(versionDirectory))
|
if (!Directory.Exists(versionDirectory))
|
||||||
@ -555,7 +556,7 @@ public class AdaptationTesting : ISMTP
|
|||||||
Append("string check = \"").Append(check.Split('\\').Last()).AppendLine("\";").
|
Append("string check = \"").Append(check.Split('\\').Last()).AppendLine("\";").
|
||||||
AppendLine("MethodBase methodBase = new StackFrame().GetMethod();").
|
AppendLine("MethodBase methodBase = new StackFrame().GetMethod();").
|
||||||
AppendLine("EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, \" - Getting configuration\"));").
|
AppendLine("EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, \" - Getting configuration\"));").
|
||||||
AppendLine("_ = Helpers.Metrology.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);").
|
AppendLine("_ = Shared.AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);").
|
||||||
AppendLine("EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, \" - Exit\"));").
|
AppendLine("EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, \" - Exit\"));").
|
||||||
AppendLine("}").
|
AppendLine("}").
|
||||||
AppendLine();
|
AppendLine();
|
||||||
@ -860,7 +861,7 @@ public class AdaptationTesting : ISMTP
|
|||||||
{
|
{
|
||||||
Dictionary<string, object> results = new()
|
Dictionary<string, object> results = new()
|
||||||
{
|
{
|
||||||
{ nameof(Environment), _Environment },
|
{ nameof(System.Environment), _Environment },
|
||||||
{ nameof(HostNameAndPort), _HostNameAndPort },
|
{ nameof(HostNameAndPort), _HostNameAndPort },
|
||||||
{ nameof(cellInstanceName), cellInstanceName },
|
{ nameof(cellInstanceName), cellInstanceName },
|
||||||
{ nameof(equipmentTypeName), equipmentTypeName },
|
{ nameof(equipmentTypeName), equipmentTypeName },
|
||||||
@ -894,6 +895,7 @@ public class AdaptationTesting : ISMTP
|
|||||||
{
|
{
|
||||||
string[] results;
|
string[] results;
|
||||||
string[] segments = GetSegments(methodBase.Name);
|
string[] segments = GetSegments(methodBase.Name);
|
||||||
|
string ticks = GetTicks(segments);
|
||||||
FileInfo fileInfo = GetFileName(segments);
|
FileInfo fileInfo = GetFileName(segments);
|
||||||
string cellInstanceName = GetCellInstanceName(segments);
|
string cellInstanceName = GetCellInstanceName(segments);
|
||||||
string cellInstanceVersionName = GetCellInstanceVersionName(segments);
|
string cellInstanceVersionName = GetCellInstanceVersionName(segments);
|
||||||
@ -902,6 +904,16 @@ public class AdaptationTesting : ISMTP
|
|||||||
_ = Directory.CreateDirectory(fileInfo.Directory.FullName);
|
_ = Directory.CreateDirectory(fileInfo.Directory.FullName);
|
||||||
Tuple<string, CellInstanceVersion> cellInstanceVersionTuple = GetCellInstanceVersionTuple(cellInstanceName, cellInstanceVersionName);
|
Tuple<string, CellInstanceVersion> cellInstanceVersionTuple = GetCellInstanceVersionTuple(cellInstanceName, cellInstanceVersionName);
|
||||||
Tuple<string, FileConnectorConfiguration> fileConnectorConfigurationTuple = GetFileConnectorConfigurationTuple(cellInstanceVersionTuple, cellInstanceConnectionName);
|
Tuple<string, FileConnectorConfiguration> fileConnectorConfigurationTuple = GetFileConnectorConfigurationTuple(cellInstanceVersionTuple, cellInstanceConnectionName);
|
||||||
|
if (string.IsNullOrEmpty(ticks) && fileConnectorConfigurationTuple.Item2?.FileScanningIntervalInSeconds is not null)
|
||||||
|
{
|
||||||
|
string fileScanningIntervalInSecondsLine;
|
||||||
|
string versionDirectory = Path.GetDirectoryName(fileInfo.DirectoryName);
|
||||||
|
if (fileConnectorConfigurationTuple.Item2.FileScanningIntervalInSeconds.Value < 0)
|
||||||
|
fileScanningIntervalInSecondsLine = $"-\t{fileConnectorConfigurationTuple.Item2.FileScanningIntervalInSeconds.Value:0000}\t{Path.GetFileName(fileInfo.DirectoryName)}";
|
||||||
|
else
|
||||||
|
fileScanningIntervalInSecondsLine = $"+\t{fileConnectorConfigurationTuple.Item2.FileScanningIntervalInSeconds.Value:+0000}\t{Path.GetFileName(fileInfo.DirectoryName)}";
|
||||||
|
File.AppendAllLines(Path.Combine(versionDirectory, "FileScanningIntervalInSeconds.txt"), new string[] { fileScanningIntervalInSecondsLine });
|
||||||
|
}
|
||||||
Tuple<string, string, string, EquipmentTypeVersion> equipmentTypeVersionTuple = GetEquipmentTypeVersionTuple(cellInstanceVersionTuple.Item2, cellInstanceConnectionName);
|
Tuple<string, string, string, EquipmentTypeVersion> equipmentTypeVersionTuple = GetEquipmentTypeVersionTuple(cellInstanceVersionTuple.Item2, cellInstanceConnectionName);
|
||||||
Tuple<string, string> parameterizedModelObjectDefinitionTypeTuple = GetParameterizedModelObjectDefinitionTypeTuple(equipmentTypeVersionTuple);
|
Tuple<string, string> parameterizedModelObjectDefinitionTypeTuple = GetParameterizedModelObjectDefinitionTypeTuple(equipmentTypeVersionTuple);
|
||||||
Tuple<string, IList<ModelObjectParameterDefinition>> modelObjectParametersTuple = GetModelObjectParameters(equipmentTypeVersionTuple);
|
Tuple<string, IList<ModelObjectParameterDefinition>> modelObjectParametersTuple = GetModelObjectParameters(equipmentTypeVersionTuple);
|
||||||
@ -925,6 +937,7 @@ public class AdaptationTesting : ISMTP
|
|||||||
if (!string.IsNullOrEmpty(cellInstanceConnectionName) && !Directory.Exists(fileInfo.DirectoryName))
|
if (!string.IsNullOrEmpty(cellInstanceConnectionName) && !Directory.Exists(fileInfo.DirectoryName))
|
||||||
_ = Directory.CreateDirectory(fileInfo.Directory.FullName);
|
_ = Directory.CreateDirectory(fileInfo.Directory.FullName);
|
||||||
Dictionary<string, List<long>> dummyRuns = new();
|
Dictionary<string, List<long>> dummyRuns = new();
|
||||||
|
Dictionary<long, List<string>> staticRuns = new();
|
||||||
Tuple<string, CellInstanceVersion> cellInstanceVersionTuple = GetCellInstanceVersionTuple(cellInstanceName, cellInstanceVersionName);
|
Tuple<string, CellInstanceVersion> cellInstanceVersionTuple = GetCellInstanceVersionTuple(cellInstanceName, cellInstanceVersionName);
|
||||||
Tuple<string, FileConnectorConfiguration> fileConnectorConfigurationTuple = GetFileConnectorConfigurationTuple(cellInstanceVersionTuple, cellInstanceConnectionName);
|
Tuple<string, FileConnectorConfiguration> fileConnectorConfigurationTuple = GetFileConnectorConfigurationTuple(cellInstanceVersionTuple, cellInstanceConnectionName);
|
||||||
Tuple<string, string, string, EquipmentTypeVersion> equipmentTypeVersionTuple = GetEquipmentTypeVersionTuple(cellInstanceVersionTuple.Item2, cellInstanceConnectionName);
|
Tuple<string, string, string, EquipmentTypeVersion> equipmentTypeVersionTuple = GetEquipmentTypeVersionTuple(cellInstanceVersionTuple.Item2, cellInstanceConnectionName);
|
||||||
@ -939,7 +952,30 @@ public class AdaptationTesting : ISMTP
|
|||||||
fileConnectorConfigurationTuple.Item2.SourceFileFilter = sourceFileFilter;
|
fileConnectorConfigurationTuple.Item2.SourceFileFilter = sourceFileFilter;
|
||||||
fileConnectorConfigurationTuple.Item2.SourceFileFilters = sourceFileFilter.Split('|').ToList();
|
fileConnectorConfigurationTuple.Item2.SourceFileFilters = sourceFileFilter.Split('|').ToList();
|
||||||
}
|
}
|
||||||
result = FileHandlers.CellInstanceConnectionName.Get(this, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfigurationTuple.Item2, equipmentTypeVersionTuple.Item2, parameterizedModelObjectDefinitionTypeTuple.Item2, modelObjectParametersTuple.Item2, equipmentDictionaryVersionTuple.Item2, dummyRuns, useCyclicalForDescription, isEAFHosted: false);
|
if (_TestContext.FullyQualifiedTestClassName.Contains(nameof(Extract)))
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(fileConnectorConfigurationTuple.Item2.ErrorTargetFileLocation))
|
||||||
|
{
|
||||||
|
if (!Directory.Exists(fileConnectorConfigurationTuple.Item2.ErrorTargetFileLocation))
|
||||||
|
_ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.ErrorTargetFileLocation);
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(fileConnectorConfigurationTuple.Item2.SourceFileLocation))
|
||||||
|
{
|
||||||
|
if (!Directory.Exists(fileConnectorConfigurationTuple.Item2.SourceFileLocation))
|
||||||
|
_ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.SourceFileLocation);
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(fileConnectorConfigurationTuple.Item2.TargetFileLocation))
|
||||||
|
{
|
||||||
|
if (!Directory.Exists(fileConnectorConfigurationTuple.Item2.TargetFileLocation))
|
||||||
|
_ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.TargetFileLocation);
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder))
|
||||||
|
{
|
||||||
|
if (!Directory.Exists(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder))
|
||||||
|
_ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result = FileHandlers.CellInstanceConnectionName.Get(this, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfigurationTuple.Item2, equipmentTypeVersionTuple.Item2, parameterizedModelObjectDefinitionTypeTuple.Item2, modelObjectParametersTuple.Item2, equipmentDictionaryVersionTuple.Item2, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: false);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1042,6 +1078,183 @@ public class AdaptationTesting : ISMTP
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static Tuple<string, string[], string[]> GetLogisticsColumnsAndBody(string fileFullName)
|
||||||
|
{
|
||||||
|
Tuple<string, string[], string[]> results;
|
||||||
|
results = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(fileFullName);
|
||||||
|
Assert.IsFalse(string.IsNullOrEmpty(results.Item1));
|
||||||
|
Assert.IsTrue(results.Item2.Length > 0, "Column check");
|
||||||
|
Assert.IsTrue(results.Item3.Length > 0, "Body check");
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static Tuple<string, string[], string[]> GetLogisticsColumnsAndBody(string searchDirectory, string searchPattern)
|
||||||
|
{
|
||||||
|
Tuple<string, string[], string[]> results;
|
||||||
|
if (searchPattern.Length > 3 && !searchPattern.Contains('*') && File.Exists(searchPattern))
|
||||||
|
results = GetLogisticsColumnsAndBody(searchPattern);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string[] pdsfFiles;
|
||||||
|
pdsfFiles = Directory.GetFiles(searchDirectory, searchPattern, SearchOption.TopDirectoryOnly);
|
||||||
|
if (!pdsfFiles.Any())
|
||||||
|
_ = Process.Start("explorer.exe", searchDirectory);
|
||||||
|
Assert.IsTrue(pdsfFiles.Any(), "GetFiles check");
|
||||||
|
results = GetLogisticsColumnsAndBody(pdsfFiles[0]);
|
||||||
|
}
|
||||||
|
Assert.IsFalse(string.IsNullOrEmpty(results.Item1));
|
||||||
|
Assert.IsTrue(results.Item2.Length > 0, "Column check");
|
||||||
|
Assert.IsTrue(results.Item3.Length > 0, "Body check");
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static Tuple<string, string[], string[]> GetLogisticsColumnsAndBody(IFileRead fileRead, Logistics logistics, Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult, Tuple<string, string[], string[]> pdsf)
|
||||||
|
{
|
||||||
|
Tuple<string, string[], string[]> results;
|
||||||
|
string text = ProcessDataStandardFormat.GetPDSFText(fileRead, logistics, extractResult.Item3, logisticsText: pdsf.Item1);
|
||||||
|
string[] lines = text.Split(new string[] { System.Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
results = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(logistics.ReportFullPath, lines);
|
||||||
|
Assert.IsFalse(string.IsNullOrEmpty(results.Item1));
|
||||||
|
Assert.IsTrue(results.Item2.Length > 0, "Column check");
|
||||||
|
Assert.IsTrue(results.Item3.Length > 0, "Body check");
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static string[] GetItem2(Tuple<string, string[], string[]> pdsf, Tuple<string, string[], string[]> pdsfNew)
|
||||||
|
{
|
||||||
|
JsonSerializerOptions jsonSerializerOptions = new() { WriteIndented = true };
|
||||||
|
string jsonOld = JsonSerializer.Serialize(pdsf.Item2, pdsf.Item2.GetType(), jsonSerializerOptions);
|
||||||
|
string jsonNew = JsonSerializer.Serialize(pdsfNew.Item2, pdsfNew.Item2.GetType(), jsonSerializerOptions);
|
||||||
|
return new string[] { jsonOld, jsonNew };
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static string[] GetItem3(Tuple<string, string[], string[]> pdsf, Tuple<string, string[], string[]> pdsfNew)
|
||||||
|
{
|
||||||
|
string joinOld = string.Join(System.Environment.NewLine, from l in pdsf.Item3 select string.Join('\t', from t in l.Split('\t') where !t.Contains(@"\\") select t));
|
||||||
|
string joinNew = string.Join(System.Environment.NewLine, from l in pdsfNew.Item3 select string.Join('\t', from t in l.Split('\t') where !t.Contains(@"\\") select t));
|
||||||
|
return new string[] { joinOld, joinNew };
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static void UpdatePassDirectory(string searchDirectory)
|
||||||
|
{
|
||||||
|
DateTime dateTime = DateTime.Now;
|
||||||
|
try
|
||||||
|
{ Directory.SetLastWriteTime(searchDirectory, dateTime); }
|
||||||
|
catch (Exception) { }
|
||||||
|
string ticksDirectory = Path.GetDirectoryName(searchDirectory);
|
||||||
|
try
|
||||||
|
{ Directory.SetLastWriteTime(ticksDirectory, dateTime); }
|
||||||
|
catch (Exception) { }
|
||||||
|
string[] directories = Directory.GetDirectories(searchDirectory, "*", SearchOption.TopDirectoryOnly);
|
||||||
|
foreach (string directory in directories)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{ Directory.SetLastWriteTime(directory, dateTime); }
|
||||||
|
catch (Exception) { }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static string GetFileName(MethodBase methodBase)
|
||||||
|
{
|
||||||
|
string result;
|
||||||
|
string connectionName;
|
||||||
|
string separator = "__";
|
||||||
|
string connectionNameAndTicks;
|
||||||
|
string[] segments = methodBase.Name.Split(new string[] { separator }, StringSplitOptions.None);
|
||||||
|
string environment = segments[0];
|
||||||
|
string rawVersionName = segments[1];
|
||||||
|
string equipmentTypeDirectory = segments[2];
|
||||||
|
string ticks = DateTime.Now.Ticks.ToString();
|
||||||
|
string comment = segments[segments.Length - 1];
|
||||||
|
string versionName = segments[1].Replace('_', '.');
|
||||||
|
string before = string.Concat(environment, separator, rawVersionName, separator, equipmentTypeDirectory, separator);
|
||||||
|
string after = methodBase.Name.Substring(before.Length);
|
||||||
|
if (after.Length < ticks.Length)
|
||||||
|
{
|
||||||
|
connectionName = after;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
connectionNameAndTicks = after.Substring(0, after.Length - 2 - comment.Length);
|
||||||
|
connectionName = connectionNameAndTicks.Substring(0, connectionNameAndTicks.Length - ticks.Length);
|
||||||
|
ticks = connectionNameAndTicks.Substring(connectionName.Length);
|
||||||
|
}
|
||||||
|
result = Path.Combine(environment, equipmentTypeDirectory, versionName, $"{environment}__{rawVersionName}__{equipmentTypeDirectory}__{connectionName}", ticks, $"{connectionName.Replace('_', '-')}.json");
|
||||||
|
if (result.Contains('/'))
|
||||||
|
result = string.Concat('/', result);
|
||||||
|
else
|
||||||
|
result = string.Concat('\\', result);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static void CompareSaveTSV(string textFileDirectory, string[] join)
|
||||||
|
{
|
||||||
|
if (join[0] != join[1])
|
||||||
|
{
|
||||||
|
_ = Process.Start("explorer.exe", textFileDirectory);
|
||||||
|
File.WriteAllText(Path.Combine(textFileDirectory, "0.tsv"), join[0]);
|
||||||
|
File.WriteAllText(Path.Combine(textFileDirectory, "1.tsv"), join[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static void CompareSaveJSON(string textFileDirectory, string[] json)
|
||||||
|
{
|
||||||
|
if (json[0] != json[1])
|
||||||
|
{
|
||||||
|
_ = Process.Start("explorer.exe", textFileDirectory);
|
||||||
|
File.WriteAllText(Path.Combine(textFileDirectory, "0.json"), json[0]);
|
||||||
|
File.WriteAllText(Path.Combine(textFileDirectory, "1.json"), json[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static void CompareSave(string textFileDirectory, Tuple<string, string[], string[]> pdsf, Tuple<string, string[], string[]> pdsfNew)
|
||||||
|
{
|
||||||
|
if (pdsf.Item1 != pdsfNew.Item1)
|
||||||
|
{
|
||||||
|
_ = Process.Start("explorer.exe", textFileDirectory);
|
||||||
|
File.WriteAllText(Path.Combine(textFileDirectory, "0.dat"), pdsf.Item1);
|
||||||
|
File.WriteAllText(Path.Combine(textFileDirectory, "1.dat"), pdsfNew.Item1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static IFileRead GetWriteConfigurationGetFileRead(MethodBase methodBase, string check, AdaptationTesting adaptationTesting)
|
||||||
|
{
|
||||||
|
IFileRead result;
|
||||||
|
string[] fileNameAndJson = adaptationTesting.GetConfiguration(methodBase);
|
||||||
|
Assert.IsTrue(fileNameAndJson[1].Contains(check));
|
||||||
|
File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]);
|
||||||
|
result = adaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false);
|
||||||
|
Assert.IsFalse(string.IsNullOrEmpty(result.CellInstanceConnectionName));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static string ReExtractCompareUpdatePassDirectory(string[] variables, IFileRead fileRead, Logistics logistics, bool validatePDSF = true)
|
||||||
|
{
|
||||||
|
string result;
|
||||||
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult = fileRead.ReExtract();
|
||||||
|
Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1));
|
||||||
|
Assert.IsTrue(extractResult.Item3.Length > 0, "extractResult Array Length check!");
|
||||||
|
Assert.IsNotNull(extractResult.Item4);
|
||||||
|
if (!validatePDSF)
|
||||||
|
_ = GetLogisticsColumnsAndBody(fileRead, logistics, extractResult, new(string.Empty, Array.Empty<string>(), Array.Empty<string>()));
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Tuple<string, string[], string[]> pdsf = GetLogisticsColumnsAndBody(variables[2], variables[4]);
|
||||||
|
Tuple<string, string[], string[]> pdsfNew = GetLogisticsColumnsAndBody(fileRead, logistics, extractResult, pdsf);
|
||||||
|
CompareSave(variables[5], pdsf, pdsfNew);
|
||||||
|
Assert.IsTrue(pdsf.Item1 == pdsfNew.Item1, "Item1 check!");
|
||||||
|
string[] json = GetItem2(pdsf, pdsfNew);
|
||||||
|
CompareSaveJSON(variables[5], json);
|
||||||
|
Assert.IsTrue(json[0] == json[1], "Item2 check!");
|
||||||
|
string[] join = GetItem3(pdsf, pdsfNew);
|
||||||
|
CompareSaveTSV(variables[5], join);
|
||||||
|
Assert.IsTrue(join[0] == join[1], "Item3 (Join) check!");
|
||||||
|
}
|
||||||
|
UpdatePassDirectory(variables[2]);
|
||||||
|
result = extractResult.Item1;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// namespace Adaptation._Tests.Helpers { public class AdaptationTesting { } }
|
// namespace Adaptation._Tests.Helpers { public class AdaptationTesting { } }
|
||||||
// 2022-05-12 -> AdaptationTesting
|
// 2022-05-12 -> AdaptationTesting
|
@ -1,4 +1,5 @@
|
|||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace Adaptation._Tests.Shared.Log;
|
namespace Adaptation._Tests.Shared.Log;
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
using System;
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
|
|
||||||
namespace Adaptation._Tests.Shared.Log;
|
namespace Adaptation._Tests.Shared.Log;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace Adaptation._Tests.Shared.Log;
|
namespace Adaptation._Tests.Shared.Log;
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
using System;
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
|
|
||||||
namespace Adaptation._Tests.Shared.Log;
|
namespace Adaptation._Tests.Shared.Log;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace Adaptation._Tests.Shared.Log;
|
namespace Adaptation._Tests.Shared.Log;
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
using System;
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
|
|
||||||
namespace Adaptation._Tests.Shared.Log;
|
namespace Adaptation._Tests.Shared.Log;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
namespace Adaptation._Tests.Shared.Log;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace Adaptation._Tests.Shared.Log;
|
||||||
|
|
||||||
public interface IFeedback
|
public interface IFeedback
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
namespace Adaptation._Tests.Shared.Log;
|
namespace Adaptation._Tests.Shared.Log;
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
namespace Adaptation._Tests.Shared.PasteSpecialXml.EAF.XML.API.CellInstance;
|
using System;
|
||||||
|
|
||||||
|
namespace Adaptation._Tests.Shared.PasteSpecialXml.EAF.XML.API.CellInstance;
|
||||||
|
|
||||||
// NOTE: Generated code may require at least .NET Framework 4.5 or .NET Core/Standard 2.0.
|
// NOTE: Generated code may require at least .NET Framework 4.5 or .NET Core/Standard 2.0.
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
namespace Adaptation._Tests.Shared.PasteSpecialXml.EAF.XML.API.EquipmentDictionary;
|
using System;
|
||||||
|
|
||||||
|
namespace Adaptation._Tests.Shared.PasteSpecialXml.EAF.XML.API.EquipmentDictionary;
|
||||||
|
|
||||||
// NOTE: Generated code may require at least .NET Framework 4.5 or .NET Core/Standard 2.0.
|
// NOTE: Generated code may require at least .NET Framework 4.5 or .NET Core/Standard 2.0.
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
namespace Adaptation._Tests.Shared.PasteSpecialXml.EAF.XML.API.EquipmentType;
|
using System;
|
||||||
|
|
||||||
|
namespace Adaptation._Tests.Shared.PasteSpecialXml.EAF.XML.API.EquipmentType;
|
||||||
|
|
||||||
// NOTE: Generated code may require at least .NET Framework 4.5 or .NET Core/Standard 2.0.
|
// NOTE: Generated code may require at least .NET Framework 4.5 or .NET Core/Standard 2.0.
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
|
@ -1,22 +1,26 @@
|
|||||||
{
|
{
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"Alpha": "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
"Alpha": "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
||||||
|
"nuget-clear": "dotnet nuget locals all --clear",
|
||||||
"build": "dotnet build --runtime win-x64 --self-contained",
|
"build": "dotnet build --runtime win-x64 --self-contained",
|
||||||
|
"build-Package-Management": "dotnet build --runtime win-x64 --self-contained --source https://packagemanagement.eu.infineon.com:4430/api/v2/",
|
||||||
|
"build-nuget-And-Package-Management": "dotnet build --runtime win-x64 --self-contained --source https://api.nuget.org/v3/index.json --source https://packagemanagement.eu.infineon.com:4430/api/v2/",
|
||||||
"build-All-Sources": "dotnet build --runtime win-x64 --self-contained --source https://api.nuget.org/v3/index.json --source https://packagemanagement.eu.infineon.com:4430/api/v2/ --source https://tfs.intra.infineon.com/tfs/ManufacturingIT/_packaging/eaf/nuget/v3/index.json --source http://192.168.0.73:5002/v3/index.json",
|
"build-All-Sources": "dotnet build --runtime win-x64 --self-contained --source https://api.nuget.org/v3/index.json --source https://packagemanagement.eu.infineon.com:4430/api/v2/ --source https://tfs.intra.infineon.com/tfs/ManufacturingIT/_packaging/eaf/nuget/v3/index.json --source http://192.168.0.73:5002/v3/index.json",
|
||||||
"dotnet-format": "dotnet format --report .vscode --verbosity detailed --severity warn",
|
"dotnet-format": "dotnet format --report .vscode --verbosity detailed --severity warn",
|
||||||
"MSBuild": "\"C:\\Program Files\\Microsoft Visual Studio\\2022\\Professional\\MSBuild\\Current\\Bin\\MSBuild.exe\" /target:Build /restore:True /p:RestoreSources=https://api.nuget.org/v3/index.json%3Bhttps://packagemanagement.eu.infineon.com:4430/api/v2/%3Bhttps://tfs.intra.infineon.com/tfs/ManufacturingIT/_packaging/eaf/nuget/v3/index.json /DetailedSummary /ConsoleLoggerParameters:PerformanceSummary;ErrorsOnly; /property:Configuration=Debug;TargetFrameworkVersion=v4.8 \"..\\MET08ANLYSDIFAAST230.csproj\"",
|
"MSBuild": "\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe\" /target:Build /restore:True /p:RestoreSources=https://api.nuget.org/v3/index.json%3Bhttps://packagemanagement.eu.infineon.com:4430/api/v2/%3Bhttps://tfs.intra.infineon.com/tfs/ManufacturingIT/_packaging/eaf/nuget/v3/index.json /DetailedSummary /ConsoleLoggerParameters:PerformanceSummary;ErrorsOnly; /property:Configuration=Debug;TargetFrameworkVersion=v4.8 ../MET08ANLYSDIFAAST230.csproj",
|
||||||
"pull": "git pull",
|
"pull": "git pull",
|
||||||
"garbage-collect": "git gc",
|
"garbage-collect": "git gc",
|
||||||
"AT-CreateSelfDescription.Staging.v2_43_0-MET08ANLYSDIFAAST230": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_43_0 & ClassName~MET08ANLYSDIFAAST230\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
"AT-CreateSelfDescription.Staging.v2_43_0-MET08ANLYSDIFAAST230": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_0 & ClassName~MET08ANLYSDIFAAST230\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||||
"AX-CreateSelfDescription.Staging.v2_43_0-SPV01_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_43_0 & ClassName~SPV01_EQPT\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
"AX-CreateSelfDescription.Staging.v2_43_0-SPV01_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_0 & ClassName~SPV01_EQPT\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||||
"AY-CreateSelfDescription.Staging.v2_43_0-SPV01": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_43_0 & ClassName~SPV01\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
"AY-CreateSelfDescription.Staging.v2_43_0-SPV01": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_0 & ClassName~SPV01\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||||
"AZ-CreateSelfDescription.Staging.v2_43_0": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_43_0\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
"AZ-CreateSelfDescription.Staging.v2_43_0": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_0\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||||
"BA-Extract.Staging.v2_43_0-MET08ANLYSDIFAAST230-Staging__v2_43_0__MET08ANLYSDIFAAST230__MoveMatchingFiles637710931421087642__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_43_0 & ClassName~MET08ANLYSDIFAAST230 & Staging__v2_43_0__MET08ANLYSDIFAAST230__MoveMatchingFiles637710931421087642__Normal\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
"BA-Extract.Staging.v2_43_0-MET08ANLYSDIFAAST230-Staging__v2_43_0__MET08ANLYSDIFAAST230__MoveMatchingFiles637710931421087642__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_0 & ClassName~MET08ANLYSDIFAAST230 & Name~Staging__v2_43_0__MET08ANLYSDIFAAST230__MoveMatchingFiles637710931421087642__Normal\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||||
"BB-Extract.Staging.v2_43_0-SPV01-Staging__v2_43_0__SPV01__RsM643047560320000000__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_43_0 & ClassName~SPV01 & Staging__v2_43_0__SPV01__RsM643047560320000000__Normal\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
"BB-Extract.Staging.v2_43_0-MET08ANLYSDIFAAST230-Staging__v2_43_0__MET08ANLYSDIFAAST230__IQSSi637884771880950000__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_0 & ClassName~MET08ANLYSDIFAAST230 & Name~Staging__v2_43_0__MET08ANLYSDIFAAST230__IQSSi637884771880950000__Normal\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||||
"BT-Extract.Staging.v2_43_0-MET08ANLYSDIFAAST230": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_43_0 & ClassName~MET08ANLYSDIFAAST230\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
"BC-Extract.Staging.v2_43_0-SPV01-Staging__v2_43_0__SPV01__RsM643047560320000000__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_0 & ClassName~SPV01 & Name~Staging__v2_43_0__SPV01__RsM643047560320000000__Normal\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||||
"BX-Extract.Staging.v2_43_0-SPV01_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_43_0 & ClassName~SPV01_EQPT\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
"BT-Extract.Staging.v2_43_0-MET08ANLYSDIFAAST230": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_0 & ClassName~MET08ANLYSDIFAAST230\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||||
"BY-Extract.Staging.v2_43_0-SPV01": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_43_0 & ClassName~SPV01\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
"BX-Extract.Staging.v2_43_0-SPV01_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_0 & ClassName~SPV01_EQPT\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||||
"BZ-Extract.Staging.v2_43_0": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_43_0\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
"BY-Extract.Staging.v2_43_0-SPV01": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_0 & ClassName~SPV01\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||||
|
"BZ-Extract.Staging.v2_43_0": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_0\" -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||||
"EDA": "\\\\messv02ecc1.ec.local\\EC_EDA\\Staging\\PDSF\\MET08ANLYSDIFAAST230\\So~~~~~~~~~~~~~~~urce",
|
"EDA": "\\\\messv02ecc1.ec.local\\EC_EDA\\Staging\\PDSF\\MET08ANLYSDIFAAST230\\So~~~~~~~~~~~~~~~urce",
|
||||||
"OpenInsightMetrologyViewer": "\\\\messv02ecc1.ec.local\\EC_EDA\\Staging\\PDSF\\MET08ANLYSDIFAAST230\\10~~~~~~~~~~~~~~~\\messv02ecc1.ec.local\\EC_Metrology_Si\\PDSF\\MET08ANLYSDIFAAST230\\Source",
|
"OpenInsightMetrologyViewer": "\\\\messv02ecc1.ec.local\\EC_EDA\\Staging\\PDSF\\MET08ANLYSDIFAAST230\\10~~~~~~~~~~~~~~~\\messv02ecc1.ec.local\\EC_Metrology_Si\\PDSF\\MET08ANLYSDIFAAST230\\Source",
|
||||||
"IQSSi": "\\\\messv02ecc1.ec.local\\EC_EDA\\Staging\\PDSF\\MET08ANLYSDIFAAST230\\11~~~~~~~~~~~~~~~\\messv02ecc1.ec.local\\EC_SPC_Si\\PDSF\\MET08ANLYSDIFAAST230\\Source",
|
"IQSSi": "\\\\messv02ecc1.ec.local\\EC_EDA\\Staging\\PDSF\\MET08ANLYSDIFAAST230\\11~~~~~~~~~~~~~~~\\messv02ecc1.ec.local\\EC_SPC_Si\\PDSF\\MET08ANLYSDIFAAST230\\Source",
|
||||||
|
@ -37,8 +37,13 @@ public partial class FileRead : FileReaderHandler, ISMTP
|
|||||||
private FilePathGenerator _FilePathGeneratorForTarget;
|
private FilePathGenerator _FilePathGeneratorForTarget;
|
||||||
private readonly List<EquipmentParameter> _EquipmentParameters;
|
private readonly List<EquipmentParameter> _EquipmentParameters;
|
||||||
private static readonly Dictionary<string, List<long>> _DummyRuns;
|
private static readonly Dictionary<string, List<long>> _DummyRuns;
|
||||||
|
private static readonly Dictionary<long, List<string>> _StaticRuns;
|
||||||
|
|
||||||
static FileRead() => _DummyRuns = new Dictionary<string, List<long>>();
|
static FileRead()
|
||||||
|
{
|
||||||
|
_DummyRuns = new();
|
||||||
|
_StaticRuns = new();
|
||||||
|
}
|
||||||
|
|
||||||
public FileRead()
|
public FileRead()
|
||||||
{
|
{
|
||||||
@ -192,7 +197,7 @@ public partial class FileRead : FileReaderHandler, ISMTP
|
|||||||
FileConnectorConfiguration fileConnectorConfiguration = Mapper.Map(Configuration);
|
FileConnectorConfiguration fileConnectorConfiguration = Mapper.Map(Configuration);
|
||||||
string parameterizedModelObjectDefinitionType = methodBase.DeclaringType.FullName;
|
string parameterizedModelObjectDefinitionType = methodBase.DeclaringType.FullName;
|
||||||
IList<ModelObjectParameterDefinition> modelObjectParameters = Mapper.Map(ConfiguredParameters);
|
IList<ModelObjectParameterDefinition> modelObjectParameters = Mapper.Map(ConfiguredParameters);
|
||||||
_FileRead = CellInstanceConnectionName.Get(this, FileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, _DummyRuns, _UseCyclicalForDescription, isEAFHosted: true);
|
_FileRead = CellInstanceConnectionName.Get(this, FileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, _DummyRuns, _StaticRuns, _UseCyclicalForDescription, isEAFHosted: true);
|
||||||
if (_FileRead.IsEvent)
|
if (_FileRead.IsEvent)
|
||||||
AddParameterRangeAndEvent();
|
AddParameterRangeAndEvent();
|
||||||
}
|
}
|
||||||
@ -333,7 +338,7 @@ public partial class FileRead : FileReaderHandler, ISMTP
|
|||||||
if (modelObjectParameterDefinitionJsonElement.ValueKind != JsonValueKind.Array)
|
if (modelObjectParameterDefinitionJsonElement.ValueKind != JsonValueKind.Array)
|
||||||
throw new Exception();
|
throw new Exception();
|
||||||
IList<ModelObjectParameterDefinition> modelObjectParameters = JsonSerializer.Deserialize<IList<ModelObjectParameterDefinition>>(modelObjectParameterDefinitionJsonElement.ToString(), jsonSerializerOptions);
|
IList<ModelObjectParameterDefinition> modelObjectParameters = JsonSerializer.Deserialize<IList<ModelObjectParameterDefinition>>(modelObjectParameterDefinitionJsonElement.ToString(), jsonSerializerOptions);
|
||||||
_FileRead = CellInstanceConnectionName.Get(this, FileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, _DummyRuns, _UseCyclicalForDescription, isEAFHosted: false);
|
_FileRead = CellInstanceConnectionName.Get(this, FileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, _DummyRuns, _StaticRuns, _UseCyclicalForDescription, isEAFHosted: false);
|
||||||
results = _FileRead.ReExtract();
|
results = _FileRead.ReExtract();
|
||||||
if (results?.Item2 is null)
|
if (results?.Item2 is null)
|
||||||
throw new Exception();
|
throw new Exception();
|
||||||
|
@ -96,17 +96,17 @@
|
|||||||
<Compile Include="Adaptation\Eaf\Management\ConfigurationData\CellAutomation\ModelObjectParameterDefinition.cs" />
|
<Compile Include="Adaptation\Eaf\Management\ConfigurationData\CellAutomation\ModelObjectParameterDefinition.cs" />
|
||||||
<Compile Include="Adaptation\Eaf\Management\ConfigurationData\CellAutomation\ModelObjectParameterType.cs" />
|
<Compile Include="Adaptation\Eaf\Management\ConfigurationData\CellAutomation\ModelObjectParameterType.cs" />
|
||||||
<Compile Include="Adaptation\Eaf\Management\ConfigurationData\Semiconductor\CellInstances\SecsConnectionConfiguration.cs" />
|
<Compile Include="Adaptation\Eaf\Management\ConfigurationData\Semiconductor\CellInstances\SecsConnectionConfiguration.cs" />
|
||||||
<Compile Include="Adaptation\FileHandlers\SPaCe\FileRead.cs" />
|
<Compile Include="Adaptation\FileHandlers\APC\FileRead.cs" />
|
||||||
<Compile Include="Adaptation\FileHandlers\Archive\FileRead.cs" />
|
<Compile Include="Adaptation\FileHandlers\Archive\FileRead.cs" />
|
||||||
<Compile Include="Adaptation\FileHandlers\CellInstanceConnectionName.cs" />
|
<Compile Include="Adaptation\FileHandlers\CellInstanceConnectionName.cs" />
|
||||||
<Compile Include="Adaptation\FileHandlers\Dummy\FileRead.cs" />
|
<Compile Include="Adaptation\FileHandlers\Dummy\FileRead.cs" />
|
||||||
<Compile Include="Adaptation\FileHandlers\EDA\FileRead.cs" />
|
|
||||||
<Compile Include="Adaptation\FileHandlers\APC\FileRead.cs" />
|
|
||||||
<Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewerAttachments\FileRead.cs" />
|
|
||||||
<Compile Include="Adaptation\FileHandlers\OpenInsight\FileRead.cs" />
|
|
||||||
<Compile Include="Adaptation\FileHandlers\IQSSi\FileRead.cs" />
|
<Compile Include="Adaptation\FileHandlers\IQSSi\FileRead.cs" />
|
||||||
|
<Compile Include="Adaptation\FileHandlers\MoveMatchingFiles\FileRead.cs" />
|
||||||
|
<Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewerAttachments\FileRead.cs" />
|
||||||
<Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewer\FileRead.cs" />
|
<Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewer\FileRead.cs" />
|
||||||
|
<Compile Include="Adaptation\FileHandlers\OpenInsight\FileRead.cs" />
|
||||||
<Compile Include="Adaptation\FileHandlers\Processed\FileRead.cs" />
|
<Compile Include="Adaptation\FileHandlers\Processed\FileRead.cs" />
|
||||||
|
<Compile Include="Adaptation\FileHandlers\SPaCe\FileRead.cs" />
|
||||||
<Compile Include="Adaptation\Ifx\Eaf\Common\Configuration\ConnectionSetting.cs" />
|
<Compile Include="Adaptation\Ifx\Eaf\Common\Configuration\ConnectionSetting.cs" />
|
||||||
<Compile Include="Adaptation\Ifx\Eaf\EquipmentConnector\File\Component\File.cs" />
|
<Compile Include="Adaptation\Ifx\Eaf\EquipmentConnector\File\Component\File.cs" />
|
||||||
<Compile Include="Adaptation\Ifx\Eaf\EquipmentConnector\File\Component\FilePathGenerator.cs" />
|
<Compile Include="Adaptation\Ifx\Eaf\EquipmentConnector\File\Component\FilePathGenerator.cs" />
|
||||||
@ -119,26 +119,26 @@
|
|||||||
<Compile Include="Adaptation\PeerGroup\GCL\SecsDriver\SerialBaudRate.cs" />
|
<Compile Include="Adaptation\PeerGroup\GCL\SecsDriver\SerialBaudRate.cs" />
|
||||||
<Compile Include="Adaptation\Shared\Duplicator\Description.cs" />
|
<Compile Include="Adaptation\Shared\Duplicator\Description.cs" />
|
||||||
<Compile Include="Adaptation\Shared\FileRead.cs" />
|
<Compile Include="Adaptation\Shared\FileRead.cs" />
|
||||||
<Compile Include="Adaptation\Shared\Methods\ILogistics.cs" />
|
|
||||||
<Compile Include="Adaptation\Shared\Methods\ILogistics2.cs" />
|
|
||||||
<Compile Include="Adaptation\Shared\Methods\ISMTP.cs" />
|
|
||||||
<Compile Include="Adaptation\Shared\Properties\IDescription.cs" />
|
|
||||||
<Compile Include="Adaptation\Shared\Properties\IFileRead.cs" />
|
|
||||||
<Compile Include="Adaptation\Shared\Methods\IDescription.cs" />
|
|
||||||
<Compile Include="Adaptation\Shared\Methods\IFileRead.cs" />
|
|
||||||
<Compile Include="Adaptation\Shared\Methods\IProcessData.cs" />
|
|
||||||
<Compile Include="Adaptation\Shared\Properties\ILogistics.cs" />
|
|
||||||
<Compile Include="Adaptation\Shared\Properties\ILogistics2.cs" />
|
|
||||||
<Compile Include="Adaptation\Shared\Properties\IScopeInfo.cs" />
|
|
||||||
<Compile Include="Adaptation\Shared\Logistics.cs" />
|
<Compile Include="Adaptation\Shared\Logistics.cs" />
|
||||||
<Compile Include="Adaptation\Shared\Logistics2.cs" />
|
<Compile Include="Adaptation\Shared\Logistics2.cs" />
|
||||||
|
<Compile Include="Adaptation\Shared\Methods\IDescription.cs" />
|
||||||
|
<Compile Include="Adaptation\Shared\Methods\IFileRead.cs" />
|
||||||
|
<Compile Include="Adaptation\Shared\Methods\ILogistics.cs" />
|
||||||
|
<Compile Include="Adaptation\Shared\Methods\ILogistics2.cs" />
|
||||||
|
<Compile Include="Adaptation\Shared\Methods\IProcessData.cs" />
|
||||||
|
<Compile Include="Adaptation\Shared\Methods\ISMTP.cs" />
|
||||||
<Compile Include="Adaptation\Shared\Metrology\ScopeInfo.cs" />
|
<Compile Include="Adaptation\Shared\Metrology\ScopeInfo.cs" />
|
||||||
<Compile Include="Adaptation\Shared\Metrology\WS.Attachment.cs" />
|
<Compile Include="Adaptation\Shared\Metrology\WS.Attachment.cs" />
|
||||||
<Compile Include="Adaptation\Shared\Metrology\WS.cs" />
|
<Compile Include="Adaptation\Shared\Metrology\WS.cs" />
|
||||||
<Compile Include="Adaptation\Shared\Metrology\WS.Results.cs" />
|
<Compile Include="Adaptation\Shared\Metrology\WS.Results.cs" />
|
||||||
<Compile Include="Adaptation\Shared\ParameterType.cs" />
|
<Compile Include="Adaptation\Shared\ParameterType.cs" />
|
||||||
<Compile Include="Adaptation\Shared\ProcessDataStandardFormat.cs" />
|
<Compile Include="Adaptation\Shared\ProcessDataStandardFormat.cs" />
|
||||||
|
<Compile Include="Adaptation\Shared\Properties\IDescription.cs" />
|
||||||
|
<Compile Include="Adaptation\Shared\Properties\IFileRead.cs" />
|
||||||
|
<Compile Include="Adaptation\Shared\Properties\ILogistics.cs" />
|
||||||
|
<Compile Include="Adaptation\Shared\Properties\ILogistics2.cs" />
|
||||||
<Compile Include="Adaptation\Shared\Properties\IProcessData.cs" />
|
<Compile Include="Adaptation\Shared\Properties\IProcessData.cs" />
|
||||||
|
<Compile Include="Adaptation\Shared\Properties\IScopeInfo.cs" />
|
||||||
<Compile Include="Adaptation\Shared\Test.cs" />
|
<Compile Include="Adaptation\Shared\Test.cs" />
|
||||||
<Compile Include="FileHandlers\FileRead.cs" />
|
<Compile Include="FileHandlers\FileRead.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user