Ready to test
This commit is contained in:
parent
5183414f2b
commit
112cc94296
723
Adaptation/.vscode/format-report.json
vendored
723
Adaptation/.vscode/format-report.json
vendored
@ -1,722 +1 @@
|
|||||||
[
|
[]
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "d88d16ae-5c4e-46e1-abfb-ff18247f2739"
|
|
||||||
},
|
|
||||||
"FileName": "ConfigData.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Helpers\\ConfigData.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 1,
|
|
||||||
"CharNumber": 1,
|
|
||||||
"DiagnosticId": "WHITESPACE",
|
|
||||||
"FormatDescription": "Fix whitespace formatting."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "bb7e7f9c-693f-4888-9c38-f8dfc213e8bc"
|
|
||||||
},
|
|
||||||
"FileName": "ProcessData.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Helpers\\ProcessData.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 1,
|
|
||||||
"CharNumber": 1,
|
|
||||||
"DiagnosticId": "WHITESPACE",
|
|
||||||
"FormatDescription": "Fix whitespace formatting."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "13cd9ede-a96c-4fb6-b4a7-e5c795fc1664"
|
|
||||||
},
|
|
||||||
"FileName": "FileRead.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Shared\\FileRead.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 1,
|
|
||||||
"CharNumber": 1,
|
|
||||||
"DiagnosticId": "WHITESPACE",
|
|
||||||
"FormatDescription": "Fix whitespace formatting."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "9e1cd5e7-2f78-4af5-a51a-accca7322480"
|
|
||||||
},
|
|
||||||
"FileName": "Logistics.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Shared\\Logistics.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 1,
|
|
||||||
"CharNumber": 1,
|
|
||||||
"DiagnosticId": "WHITESPACE",
|
|
||||||
"FormatDescription": "Fix whitespace formatting."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "130644ff-7008-44ea-a32a-8a7bfca0a2a0"
|
|
||||||
},
|
|
||||||
"FileName": "Backbone.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Eaf\\Core\\Backbone.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 48,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "db33cb97-3ef4-4051-9ecd-a010f1845296"
|
|
||||||
},
|
|
||||||
"FileName": "EmailMessage.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Eaf\\Core\\Smtp\\EmailMessage.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 24,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "b3a57e2c-f48d-4720-8b3b-fb636cba8379"
|
|
||||||
},
|
|
||||||
"FileName": "ISmtp.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Eaf\\Core\\Smtp\\ISmtp.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 9,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "6629017c-4546-4310-a6aa-577537007428"
|
|
||||||
},
|
|
||||||
"FileName": "MailPriority.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Eaf\\Core\\Smtp\\MailPriority.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 11,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "53ac5897-d819-44df-b743-d4c12f9a91d9"
|
|
||||||
},
|
|
||||||
"FileName": "Field.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Eaf\\EquipmentCore\\SelfDescription\\ParameterTypes\\Field.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 12,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "95bed42a-9999-4845-a15b-68491e9307e9"
|
|
||||||
},
|
|
||||||
"FileName": "ParameterTypeDefinition.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Eaf\\EquipmentCore\\SelfDescription\\ParameterTypes\\ParameterTypeDefinition.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 12,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "88119dfd-155c-4e25-a114-70ffef081c60"
|
|
||||||
},
|
|
||||||
"FileName": "StructuredType.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Eaf\\EquipmentCore\\SelfDescription\\ParameterTypes\\StructuredType.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 12,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "4de43dcd-921e-41d0-958e-ce47dc960d59"
|
|
||||||
},
|
|
||||||
"FileName": "FileRead.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\FileHandlers\\FileRead.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 280,
|
|
||||||
"CharNumber": 4,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "d88d16ae-5c4e-46e1-abfb-ff18247f2739"
|
|
||||||
},
|
|
||||||
"FileName": "ConfigData.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Helpers\\ConfigData.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 523,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "470ff21b-3486-44aa-ae4c-afed13cda38c"
|
|
||||||
},
|
|
||||||
"FileName": "ConfigData.Level.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Helpers\\ConfigData.Level.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 45,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "bb7e7f9c-693f-4888-9c38-f8dfc213e8bc"
|
|
||||||
},
|
|
||||||
"FileName": "ProcessData.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Helpers\\ProcessData.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 453,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "06c03f0b-096b-421d-91e8-68ba61cb13e7"
|
|
||||||
},
|
|
||||||
"FileName": "ProcessData.HgProbeDetail.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Helpers\\ProcessData.HgProbeDetail.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 32,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "19febcbc-e2de-4ecc-bd57-1cfa776c7da8"
|
|
||||||
},
|
|
||||||
"FileName": "ProcessData.HgProbeFile.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Helpers\\ProcessData.HgProbeFile.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 70,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "90e0f9ba-39c2-4be1-ac9d-ac2f1693c87d"
|
|
||||||
},
|
|
||||||
"FileName": "ProcessData.WSRequest.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Helpers\\ProcessData.WSRequest.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 162,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "07d42733-7594-4d40-ac61-754e59c5f454"
|
|
||||||
},
|
|
||||||
"FileName": "FileConnectorParameterTypeDefinitionProvider.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Ifx\\Eaf\\EquipmentConnector\\File\\SelfDescription\\FileConnectorParameterTypeDefinitionProvider.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 14,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "f9b0b687-7adb-4eb0-bd2e-2043152cc9e8"
|
|
||||||
},
|
|
||||||
"FileName": "Description.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Shared\\Duplicator\\Description.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 148,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "9e1cd5e7-2f78-4af5-a51a-accca7322480"
|
|
||||||
},
|
|
||||||
"FileName": "Logistics.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Shared\\Logistics.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 223,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "c05bd63e-6989-4686-8396-d967b102d406"
|
|
||||||
},
|
|
||||||
"FileName": "Logistics2.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Shared\\Logistics2.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 81,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "21e35d0e-0e82-4c36-b422-f6d746f666f1"
|
|
||||||
},
|
|
||||||
"FileName": "IDescription.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Shared\\Methods\\IDescription.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 25,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "8dfa5ce1-faac-4c51-9f56-fdcd7b89b0ca"
|
|
||||||
},
|
|
||||||
"FileName": "IFileRead.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Shared\\Methods\\IFileRead.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 25,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "3a4c0faa-cbf3-4745-8b72-e4e08b86eca8"
|
|
||||||
},
|
|
||||||
"FileName": "ILogistics.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Shared\\Methods\\ILogistics.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 8,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "266d8d47-829c-4ac7-a68f-0123f949ec34"
|
|
||||||
},
|
|
||||||
"FileName": "ILogistics2.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Shared\\Methods\\ILogistics2.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 8,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "77aff9a3-4ce1-41c5-bc35-91b1837db7cf"
|
|
||||||
},
|
|
||||||
"FileName": "IProcessData.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Shared\\Methods\\IProcessData.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 17,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "1a691341-bf79-4553-99be-f9ba199dc0f3"
|
|
||||||
},
|
|
||||||
"FileName": "ISMTP.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Shared\\Methods\\ISMTP.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 9,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "3006df3a-c1f4-47ad-919e-60f2f95a91be"
|
|
||||||
},
|
|
||||||
"FileName": "ParameterType.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Shared\\ParameterType.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 13,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "a9ab26d6-5866-451c-b3ee-c220b3e096d9"
|
|
||||||
},
|
|
||||||
"FileName": "ProcessDataStandardFormat.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Shared\\ProcessDataStandardFormat.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 426,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "bdc7f0da-41fe-4b72-9e11-ed9e4c4a8577"
|
|
||||||
},
|
|
||||||
"FileName": "IDescription.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Shared\\Properties\\IDescription.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 13,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "154eb5ed-ea73-46ff-bdd6-3858aba13e36"
|
|
||||||
},
|
|
||||||
"FileName": "IFileRead.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Shared\\Properties\\IFileRead.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 20,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "15fc86da-34c5-4da0-8fd4-edd28e95d3f0"
|
|
||||||
},
|
|
||||||
"FileName": "ILogistics.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Shared\\Properties\\ILogistics.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 25,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "18438843-431f-4b95-9c1b-34433781f09f"
|
|
||||||
},
|
|
||||||
"FileName": "ILogistics2.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Shared\\Properties\\ILogistics2.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 17,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "53f26846-2562-494e-aa6c-0015ae5f1353"
|
|
||||||
},
|
|
||||||
"FileName": "IProcessData.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Shared\\Properties\\IProcessData.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 13,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "22c73bd3-2fd0-4b86-97a8-2ecc7e4c866a"
|
|
||||||
},
|
|
||||||
"FileName": "IScopeInfo.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Shared\\Properties\\IScopeInfo.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 20,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "5a076f2e-46dd-4e9d-a58f-331bf5ff5f56"
|
|
||||||
},
|
|
||||||
"FileName": "Test.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Shared\\Test.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 57,
|
|
||||||
"CharNumber": 2,
|
|
||||||
"DiagnosticId": "FINALNEWLINE",
|
|
||||||
"FormatDescription": "Fix final newline. Delete 2 characters."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "9e1cd5e7-2f78-4af5-a51a-accca7322480"
|
|
||||||
},
|
|
||||||
"FileName": "Logistics.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Shared\\Logistics.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 1,
|
|
||||||
"CharNumber": 1,
|
|
||||||
"DiagnosticId": "IMPORTS",
|
|
||||||
"FormatDescription": "Fix imports ordering."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "9e1cd5e7-2f78-4af5-a51a-accca7322480"
|
|
||||||
},
|
|
||||||
"FileName": "Logistics.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Shared\\Logistics.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 186,
|
|
||||||
"CharNumber": 31,
|
|
||||||
"DiagnosticId": "IDE0003",
|
|
||||||
"FormatDescription": "error IDE0003: Name can be simplified."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DocumentId": {
|
|
||||||
"ProjectId": {
|
|
||||||
"Id": "39ed7366-e68d-48fb-8c3f-a640836170aa"
|
|
||||||
},
|
|
||||||
"Id": "eb4f7a88-7379-4241-879f-195bc633541c"
|
|
||||||
},
|
|
||||||
"FileName": "ProcessData.FileRead.Description.cs",
|
|
||||||
"FilePath": "L:\\Workspaces\\33_CS29_79_72\\MIT_EAF_Adaptations\\Trunk\\MET08RESIHGCV\\06_SourceCode\\MET08RESIHGCV\\Adaptation\\Helpers\\ProcessData.FileRead.Description.cs",
|
|
||||||
"FileChanges": [
|
|
||||||
{
|
|
||||||
"LineNumber": 398,
|
|
||||||
"CharNumber": 41,
|
|
||||||
"DiagnosticId": "CS1503",
|
|
||||||
"FormatDescription": "error CS1503: Argument 1: cannot convert from \u0027Adaptation.Helpers.ProcessData.FileRead.Description\u0027 to \u0027IProcessDataDescription\u0027"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
40
Adaptation/.vscode/settings.json
vendored
Normal file
40
Adaptation/.vscode/settings.json
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"cSpell.words": [
|
||||||
|
"Ccomp",
|
||||||
|
"EQPT",
|
||||||
|
"HGCV",
|
||||||
|
"horiz",
|
||||||
|
"IKVM",
|
||||||
|
"ISMTP",
|
||||||
|
"JOBID",
|
||||||
|
"linc",
|
||||||
|
"messa",
|
||||||
|
"Navg",
|
||||||
|
"NOPAUSE",
|
||||||
|
"PDFC",
|
||||||
|
"pdmodel",
|
||||||
|
"PDSF",
|
||||||
|
"RESIHGCV",
|
||||||
|
"Rhosl"
|
||||||
|
],
|
||||||
|
"workbench.colorCustomizations": {
|
||||||
|
"activityBar.activeBackground": "#79b2e4",
|
||||||
|
"activityBar.activeBorder": "#d42b85",
|
||||||
|
"activityBar.background": "#79b2e4",
|
||||||
|
"activityBar.foreground": "#15202b",
|
||||||
|
"activityBar.inactiveForeground": "#15202b99",
|
||||||
|
"activityBarBadge.background": "#d42b85",
|
||||||
|
"activityBarBadge.foreground": "#e7e7e7",
|
||||||
|
"sash.hoverBorder": "#79b2e4",
|
||||||
|
"statusBar.background": "#4e9adc",
|
||||||
|
"statusBar.foreground": "#15202b",
|
||||||
|
"statusBarItem.hoverBackground": "#2981ce",
|
||||||
|
"statusBarItem.remoteBackground": "#4e9adc",
|
||||||
|
"statusBarItem.remoteForeground": "#15202b",
|
||||||
|
"titleBar.activeBackground": "#4e9adc",
|
||||||
|
"titleBar.activeForeground": "#15202b",
|
||||||
|
"titleBar.inactiveBackground": "#4e9adc99",
|
||||||
|
"titleBar.inactiveForeground": "#15202b99"
|
||||||
|
},
|
||||||
|
"peacock.color": "#4e9adc"
|
||||||
|
}
|
@ -1,6 +1,5 @@
|
|||||||
namespace Adaptation.Eaf.Core
|
namespace Adaptation.Eaf.Core;
|
||||||
{
|
|
||||||
public class BackboneComponent
|
public class BackboneComponent
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,6 +1,5 @@
|
|||||||
namespace Adaptation.Eaf.Core
|
namespace Adaptation.Eaf.Core;
|
||||||
{
|
|
||||||
public class BackboneStatusCache
|
public class BackboneStatusCache
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,6 +1,5 @@
|
|||||||
namespace Adaptation.Eaf.Core
|
namespace Adaptation.Eaf.Core;
|
||||||
{
|
|
||||||
public interface ILoggingSetupManager
|
public interface ILoggingSetupManager
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,6 +1,5 @@
|
|||||||
namespace Adaptation.Eaf.Core
|
namespace Adaptation.Eaf.Core;
|
||||||
{
|
|
||||||
public class StatusItem
|
public class StatusItem
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
@ -2,10 +2,15 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Adaptation.Eaf.Core
|
namespace Adaptation.Eaf.Core;
|
||||||
{
|
|
||||||
public class Backbone
|
public class Backbone
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA1822
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
public const string STATE_ERROR = "Error";
|
public const string STATE_ERROR = "Error";
|
||||||
public const string STATE_OFFLINE = "Offline";
|
public const string STATE_OFFLINE = "Offline";
|
||||||
public const string STATE_RUNNING = "Running";
|
public const string STATE_RUNNING = "Running";
|
||||||
@ -30,12 +35,12 @@ namespace Adaptation.Eaf.Core
|
|||||||
protected Dictionary<string, BackboneComponent> BackboneComponents { get; }
|
protected Dictionary<string, BackboneComponent> BackboneComponents { get; }
|
||||||
|
|
||||||
public void AddBackboneComponent(BackboneComponent backboneComponent) { }
|
public void AddBackboneComponent(BackboneComponent backboneComponent) { }
|
||||||
public bool ContainsBackboneComponent(string id) { throw new NotImplementedException(); }
|
public bool ContainsBackboneComponent(string id) => throw new NotImplementedException();
|
||||||
[Obsolete("Use the capabilities exposed via the Status property -> GetAll. Will be removed with next major release.")]
|
[Obsolete("Use the capabilities exposed via the Status property -> GetAll. Will be removed with next major release.")]
|
||||||
public List<StatusItem> GetAllStatuses() { throw new NotImplementedException(); }
|
public List<StatusItem> GetAllStatuses() => throw new NotImplementedException();
|
||||||
public BackboneComponent GetBackboneComponentById(string id) { throw new NotImplementedException(); }
|
public BackboneComponent GetBackboneComponentById(string id) => throw new NotImplementedException();
|
||||||
public List<T> GetBackboneComponentsOfType<T>() { throw new NotImplementedException(); }
|
public List<T> GetBackboneComponentsOfType<T>() => throw new NotImplementedException();
|
||||||
public List<BackboneComponent> GetBackboneComponentsOfType(Type type) { throw new NotImplementedException(); }
|
public List<BackboneComponent> GetBackboneComponentsOfType(Type type) => throw new NotImplementedException();
|
||||||
public void RegisterSubprocess(int pid) { }
|
public void RegisterSubprocess(int pid) { }
|
||||||
[Obsolete("Use the capabilities exposed via the Status property -> SetValue. Will be removed with next major release.")]
|
[Obsolete("Use the capabilities exposed via the Status property -> SetValue. Will be removed with next major release.")]
|
||||||
public void SetStatus(string statusName, string statusValue) { }
|
public void SetStatus(string statusName, string statusValue) { }
|
||||||
@ -44,5 +49,5 @@ namespace Adaptation.Eaf.Core
|
|||||||
protected void CloseConnectionOfComponents(List<BackboneComponent> components) { }
|
protected void CloseConnectionOfComponents(List<BackboneComponent> components) { }
|
||||||
protected virtual void StopAllComponents() { }
|
protected virtual void StopAllComponents() { }
|
||||||
protected void StopComponents(List<BackboneComponent> components) { }
|
protected void StopComponents(List<BackboneComponent> components) { }
|
||||||
}
|
|
||||||
}
|
}
|
@ -1,10 +1,13 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Adaptation.Eaf.Core.Smtp
|
namespace Adaptation.Eaf.Core.Smtp;
|
||||||
{
|
|
||||||
|
|
||||||
public class EmailMessage
|
public class EmailMessage
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
public EmailMessage() { }
|
public EmailMessage() { }
|
||||||
public EmailMessage(string subject, string body, MailPriority priority = MailPriority.Normal) { }
|
public EmailMessage(string subject, string body, MailPriority priority = MailPriority.Normal) { }
|
||||||
|
|
||||||
@ -12,13 +15,11 @@ namespace Adaptation.Eaf.Core.Smtp
|
|||||||
public MailPriority Priority { get; }
|
public MailPriority Priority { get; }
|
||||||
public string Subject { get; }
|
public string Subject { get; }
|
||||||
|
|
||||||
public EmailMessage PriorityHigh() { throw new NotImplementedException(); }
|
public EmailMessage PriorityHigh() => throw new NotImplementedException();
|
||||||
public EmailMessage PriorityLow() { throw new NotImplementedException(); }
|
public EmailMessage PriorityLow() => throw new NotImplementedException();
|
||||||
public EmailMessage PriorityNormal() { throw new NotImplementedException(); }
|
public EmailMessage PriorityNormal() => throw new NotImplementedException();
|
||||||
public EmailMessage SetBody(string body) { throw new NotImplementedException(); }
|
public EmailMessage SetBody(string body) => throw new NotImplementedException();
|
||||||
public EmailMessage SetPriority(MailPriority priority) { throw new NotImplementedException(); }
|
public EmailMessage SetPriority(MailPriority priority) => throw new NotImplementedException();
|
||||||
public EmailMessage SetSubject(string subject) { throw new NotImplementedException(); }
|
public EmailMessage SetSubject(string subject) => throw new NotImplementedException();
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
@ -1,9 +1,6 @@
|
|||||||
namespace Adaptation.Eaf.Core.Smtp
|
namespace Adaptation.Eaf.Core.Smtp;
|
||||||
{
|
|
||||||
|
|
||||||
public interface ISmtp
|
public interface ISmtp
|
||||||
{
|
{
|
||||||
void Send(EmailMessage message);
|
void Send(EmailMessage message);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
@ -1,5 +1,4 @@
|
|||||||
namespace Adaptation.Eaf.Core.Smtp
|
namespace Adaptation.Eaf.Core.Smtp;
|
||||||
{
|
|
||||||
|
|
||||||
public enum MailPriority
|
public enum MailPriority
|
||||||
{
|
{
|
||||||
@ -7,5 +6,3 @@
|
|||||||
Normal = 1,
|
Normal = 1,
|
||||||
High = 2
|
High = 2
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
@ -1,6 +1,5 @@
|
|||||||
namespace Adaptation.Eaf.EquipmentCore.Control
|
namespace Adaptation.Eaf.EquipmentCore.Control;
|
||||||
{
|
|
||||||
public class ChangeDataCollectionHandler
|
public class ChangeDataCollectionHandler
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,6 +1,5 @@
|
|||||||
namespace Adaptation.Eaf.EquipmentCore.Control
|
namespace Adaptation.Eaf.EquipmentCore.Control;
|
||||||
{
|
|
||||||
public class DataCollectionRequest
|
public class DataCollectionRequest
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,6 +1,5 @@
|
|||||||
namespace Adaptation.Eaf.EquipmentCore.Control
|
namespace Adaptation.Eaf.EquipmentCore.Control;
|
||||||
{
|
|
||||||
public class EquipmentEvent
|
public class EquipmentEvent
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,6 +1,5 @@
|
|||||||
namespace Adaptation.Eaf.EquipmentCore.Control
|
namespace Adaptation.Eaf.EquipmentCore.Control;
|
||||||
{
|
|
||||||
public class EquipmentException
|
public class EquipmentException
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,6 +1,5 @@
|
|||||||
namespace Adaptation.Eaf.EquipmentCore.Control
|
namespace Adaptation.Eaf.EquipmentCore.Control;
|
||||||
{
|
|
||||||
public class EquipmentSelfDescription
|
public class EquipmentSelfDescription
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,6 +1,5 @@
|
|||||||
namespace Adaptation.Eaf.EquipmentCore.Control
|
namespace Adaptation.Eaf.EquipmentCore.Control;
|
||||||
{
|
|
||||||
public class GetParameterValuesHandler
|
public class GetParameterValuesHandler
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,6 +1,5 @@
|
|||||||
namespace Adaptation.Eaf.EquipmentCore.Control
|
namespace Adaptation.Eaf.EquipmentCore.Control;
|
||||||
{
|
|
||||||
public interface IConnectionControl
|
public interface IConnectionControl
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,6 +1,5 @@
|
|||||||
namespace Adaptation.Eaf.EquipmentCore.Control
|
namespace Adaptation.Eaf.EquipmentCore.Control;
|
||||||
{
|
|
||||||
public interface IDataTracingHandler
|
public interface IDataTracingHandler
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,6 +1,5 @@
|
|||||||
namespace Adaptation.Eaf.EquipmentCore.Control
|
namespace Adaptation.Eaf.EquipmentCore.Control;
|
||||||
{
|
|
||||||
public interface IEquipmentCommandService
|
public interface IEquipmentCommandService
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,7 +1,7 @@
|
|||||||
using Adaptation.PeerGroup.GCL.Annotations;
|
using Adaptation.PeerGroup.GCL.Annotations;
|
||||||
|
|
||||||
namespace Adaptation.Eaf.EquipmentCore.Control
|
namespace Adaptation.Eaf.EquipmentCore.Control;
|
||||||
{
|
|
||||||
public interface IEquipmentControl : IPackageSource
|
public interface IEquipmentControl : IPackageSource
|
||||||
{
|
{
|
||||||
[NotNull]
|
[NotNull]
|
||||||
@ -13,4 +13,3 @@ namespace Adaptation.Eaf.EquipmentCore.Control
|
|||||||
[NotNull]
|
[NotNull]
|
||||||
IConnectionControl Connection { get; }
|
IConnectionControl Connection { get; }
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,6 +1,5 @@
|
|||||||
namespace Adaptation.Eaf.EquipmentCore.Control
|
namespace Adaptation.Eaf.EquipmentCore.Control;
|
||||||
{
|
|
||||||
public interface IEquipmentSelfDescriptionBuilder
|
public interface IEquipmentSelfDescriptionBuilder
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,6 +1,5 @@
|
|||||||
namespace Adaptation.Eaf.EquipmentCore.Control
|
namespace Adaptation.Eaf.EquipmentCore.Control;
|
||||||
{
|
|
||||||
public interface IPackage
|
public interface IPackage
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,6 +1,5 @@
|
|||||||
namespace Adaptation.Eaf.EquipmentCore.Control
|
namespace Adaptation.Eaf.EquipmentCore.Control;
|
||||||
{
|
|
||||||
public interface ISelfDescriptionLookup
|
public interface ISelfDescriptionLookup
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,6 +1,5 @@
|
|||||||
namespace Adaptation.Eaf.EquipmentCore.Control
|
namespace Adaptation.Eaf.EquipmentCore.Control;
|
||||||
{
|
|
||||||
public interface IVirtualParameterValuesHandler
|
public interface IVirtualParameterValuesHandler
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,6 +1,5 @@
|
|||||||
namespace Adaptation.Eaf.EquipmentCore.Control
|
namespace Adaptation.Eaf.EquipmentCore.Control;
|
||||||
{
|
|
||||||
public class SetParameterValuesHandler
|
public class SetParameterValuesHandler
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,6 +1,5 @@
|
|||||||
namespace Adaptation.Eaf.EquipmentCore.Control
|
namespace Adaptation.Eaf.EquipmentCore.Control;
|
||||||
{
|
|
||||||
public class TraceRequest
|
public class TraceRequest
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
@ -3,8 +3,8 @@ using Adaptation.Eaf.EquipmentCore.SelfDescription.ElementDescription;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Adaptation.Eaf.EquipmentCore.Control
|
namespace Adaptation.Eaf.EquipmentCore.Control;
|
||||||
{
|
|
||||||
public interface IEquipmentDataCollection
|
public interface IEquipmentDataCollection
|
||||||
{
|
{
|
||||||
IVirtualParameterValuesHandler VirtualParameterValuesHandler { get; }
|
IVirtualParameterValuesHandler VirtualParameterValuesHandler { get; }
|
||||||
@ -36,4 +36,3 @@ namespace Adaptation.Eaf.EquipmentCore.Control
|
|||||||
void TriggerTraceSample(TraceRequest traceRequest, long sampleId, IEnumerable<ParameterValue> parameters, IPackage sourcePackage);
|
void TriggerTraceSample(TraceRequest traceRequest, long sampleId, IEnumerable<ParameterValue> parameters, IPackage sourcePackage);
|
||||||
void TriggerTraceSample(TraceRequest traceRequest, long sampleId, IEnumerable<ParameterValue> parameters, DateTime equipmentTimeStamp);
|
void TriggerTraceSample(TraceRequest traceRequest, long sampleId, IEnumerable<ParameterValue> parameters, DateTime equipmentTimeStamp);
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,6 +1,5 @@
|
|||||||
namespace Adaptation.Eaf.EquipmentCore.Control
|
namespace Adaptation.Eaf.EquipmentCore.Control;
|
||||||
{
|
|
||||||
public interface IPackageSource
|
public interface IPackageSource
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
@ -2,10 +2,15 @@
|
|||||||
using Adaptation.PeerGroup.GCL.Annotations;
|
using Adaptation.PeerGroup.GCL.Annotations;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Adaptation.Eaf.EquipmentCore.DataCollection.Reporting
|
namespace Adaptation.Eaf.EquipmentCore.DataCollection.Reporting;
|
||||||
{
|
|
||||||
public class ParameterValue
|
public class ParameterValue
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA1822
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
public ParameterValue(EquipmentParameter definition, object value) { }
|
public ParameterValue(EquipmentParameter definition, object value) { }
|
||||||
public ParameterValue(EquipmentParameter definition, object value, DateTime timestamp) { }
|
public ParameterValue(EquipmentParameter definition, object value, DateTime timestamp) { }
|
||||||
|
|
||||||
@ -14,7 +19,7 @@ namespace Adaptation.Eaf.EquipmentCore.DataCollection.Reporting
|
|||||||
public EquipmentParameter Definition { get; }
|
public EquipmentParameter Definition { get; }
|
||||||
public DateTime Timestamp { get; protected set; }
|
public DateTime Timestamp { get; protected set; }
|
||||||
|
|
||||||
public virtual ParameterValue Clone(EquipmentParameter newDefinition) { throw new NotImplementedException(); }
|
public virtual ParameterValue Clone(EquipmentParameter newDefinition) => throw new NotImplementedException();
|
||||||
public override string ToString() { return base.ToString(); }
|
public override string ToString() => base.ToString();
|
||||||
}
|
|
||||||
}
|
}
|
@ -1,9 +1,13 @@
|
|||||||
using Adaptation.Eaf.EquipmentCore.SelfDescription.ParameterTypes;
|
using Adaptation.Eaf.EquipmentCore.SelfDescription.ParameterTypes;
|
||||||
|
|
||||||
namespace Adaptation.Eaf.EquipmentCore.SelfDescription.ElementDescription
|
namespace Adaptation.Eaf.EquipmentCore.SelfDescription.ElementDescription;
|
||||||
{
|
|
||||||
public class EquipmentParameter
|
public class EquipmentParameter
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
public EquipmentParameter(EquipmentParameter source, ParameterTypeDefinition typeDefinition) { }
|
public EquipmentParameter(EquipmentParameter source, ParameterTypeDefinition typeDefinition) { }
|
||||||
public EquipmentParameter(string name, ParameterTypeDefinition typeDefinition, string description, bool isTransient = false, bool isReadOnly = true) { }
|
public EquipmentParameter(string name, ParameterTypeDefinition typeDefinition, string description, bool isTransient = false, bool isReadOnly = true) { }
|
||||||
public EquipmentParameter(string id, string name, ParameterTypeDefinition typeDefinition, string description, bool isTransient = false, bool isReadOnly = true) { }
|
public EquipmentParameter(string id, string name, ParameterTypeDefinition typeDefinition, string description, bool isTransient = false, bool isReadOnly = true) { }
|
||||||
@ -17,8 +21,7 @@ namespace Adaptation.Eaf.EquipmentCore.SelfDescription.ElementDescription
|
|||||||
public bool IsTransient { get; }
|
public bool IsTransient { get; }
|
||||||
public bool IsReadOnly { get; }
|
public bool IsReadOnly { get; }
|
||||||
|
|
||||||
public override string ToString() { return base.ToString(); }
|
public override string ToString() => base.ToString();
|
||||||
public string ToStringWithDetails() { return base.ToString(); }
|
public string ToStringWithDetails() => base.ToString();
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
@ -1,12 +1,16 @@
|
|||||||
namespace Adaptation.Eaf.EquipmentCore.SelfDescription.ParameterTypes
|
namespace Adaptation.Eaf.EquipmentCore.SelfDescription.ParameterTypes;
|
||||||
{
|
|
||||||
public class Field
|
public class Field
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
public Field(string name, string description, bool canBeNull, ParameterTypeDefinition typeDefinition) { }
|
public Field(string name, string description, bool canBeNull, ParameterTypeDefinition typeDefinition) { }
|
||||||
|
|
||||||
public string Name { get; }
|
public string Name { get; }
|
||||||
public string Description { get; }
|
public string Description { get; }
|
||||||
public ParameterTypeDefinition TypeDefinition { get; }
|
public ParameterTypeDefinition TypeDefinition { get; }
|
||||||
public bool CanBeNull { get; }
|
public bool CanBeNull { get; }
|
||||||
}
|
|
||||||
}
|
}
|
@ -1,12 +1,16 @@
|
|||||||
namespace Adaptation.Eaf.EquipmentCore.SelfDescription.ParameterTypes
|
namespace Adaptation.Eaf.EquipmentCore.SelfDescription.ParameterTypes;
|
||||||
{
|
|
||||||
public abstract class ParameterTypeDefinition
|
public abstract class ParameterTypeDefinition
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
public ParameterTypeDefinition(string name, string description) { }
|
public ParameterTypeDefinition(string name, string description) { }
|
||||||
|
|
||||||
public string Name { get; }
|
public string Name { get; }
|
||||||
public string Description { get; }
|
public string Description { get; }
|
||||||
|
|
||||||
public override string ToString() { return base.ToString(); }
|
public override string ToString() => base.ToString();
|
||||||
}
|
|
||||||
}
|
}
|
@ -1,12 +1,16 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Adaptation.Eaf.EquipmentCore.SelfDescription.ParameterTypes
|
namespace Adaptation.Eaf.EquipmentCore.SelfDescription.ParameterTypes;
|
||||||
{
|
|
||||||
public class StructuredType : ParameterTypeDefinition
|
public class StructuredType : ParameterTypeDefinition
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA1822
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
public StructuredType(string name, string description, IList<Field> fields) : base(name, description) { }
|
public StructuredType(string name, string description, IList<Field> fields) : base(name, description) { }
|
||||||
|
|
||||||
public IList<Field> Fields { get; }
|
public IList<Field> Fields { get; }
|
||||||
}
|
|
||||||
}
|
}
|
@ -1,6 +1,5 @@
|
|||||||
namespace Adaptation.Eaf.Management.ConfigurationData.CellAutomation
|
namespace Adaptation.Eaf.Management.ConfigurationData.CellAutomation;
|
||||||
{
|
|
||||||
public interface IConfigurationObject
|
public interface IConfigurationObject
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,10 +1,14 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Adaptation.Eaf.Management.ConfigurationData.CellAutomation
|
namespace Adaptation.Eaf.Management.ConfigurationData.CellAutomation;
|
||||||
{
|
|
||||||
[System.Runtime.Serialization.DataContractAttribute(IsReference = true)]
|
[System.Runtime.Serialization.DataContractAttribute(IsReference = true)]
|
||||||
public class ModelObjectParameterDefinition : IConfigurationObject
|
public class ModelObjectParameterDefinition : IConfigurationObject
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
public ModelObjectParameterDefinition() { }
|
public ModelObjectParameterDefinition() { }
|
||||||
public ModelObjectParameterDefinition(string name, ModelObjectParameterType valueType, object defaultValue) { }
|
public ModelObjectParameterDefinition(string name, ModelObjectParameterType valueType, object defaultValue) { }
|
||||||
public ModelObjectParameterDefinition(string name, Type enumType, object defaultValue) { }
|
public ModelObjectParameterDefinition(string name, Type enumType, object defaultValue) { }
|
||||||
@ -20,7 +24,7 @@ namespace Adaptation.Eaf.Management.ConfigurationData.CellAutomation
|
|||||||
[System.Runtime.Serialization.DataMemberAttribute]
|
[System.Runtime.Serialization.DataMemberAttribute]
|
||||||
public virtual string EnumType { get; set; }
|
public virtual string EnumType { get; set; }
|
||||||
|
|
||||||
public virtual ModelObjectParameterDefinition Clone() { return null; }
|
public virtual ModelObjectParameterDefinition Clone() => null;
|
||||||
public virtual bool IsValidValue(string value) { return false; }
|
public virtual bool IsValidValue(string value) => false;
|
||||||
}
|
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
namespace Adaptation.Eaf.Management.ConfigurationData.CellAutomation
|
namespace Adaptation.Eaf.Management.ConfigurationData.CellAutomation;
|
||||||
{
|
|
||||||
public enum ModelObjectParameterType
|
public enum ModelObjectParameterType
|
||||||
{
|
{
|
||||||
String = 0,
|
String = 0,
|
||||||
@ -14,4 +14,3 @@
|
|||||||
Float = 9,
|
Float = 9,
|
||||||
Enum = 10
|
Enum = 10
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,8 +1,8 @@
|
|||||||
using Adaptation.PeerGroup.GCL.SecsDriver;
|
using Adaptation.PeerGroup.GCL.SecsDriver;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Adaptation.Eaf.Management.ConfigurationData.Semiconductor.CellInstances
|
namespace Adaptation.Eaf.Management.ConfigurationData.Semiconductor.CellInstances;
|
||||||
{
|
|
||||||
[System.Runtime.Serialization.DataContractAttribute]
|
[System.Runtime.Serialization.DataContractAttribute]
|
||||||
public class SecsConnectionConfiguration
|
public class SecsConnectionConfiguration
|
||||||
{
|
{
|
||||||
@ -41,4 +41,3 @@ namespace Adaptation.Eaf.Management.ConfigurationData.Semiconductor.CellInstance
|
|||||||
[System.Runtime.Serialization.DataMemberAttribute]
|
[System.Runtime.Serialization.DataMemberAttribute]
|
||||||
public virtual TimeSpan T8NetworkIntercharacter { get; set; }
|
public virtual TimeSpan T8NetworkIntercharacter { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
141
Adaptation/FileHandlers/Archive/FileRead.cs
Normal file
141
Adaptation/FileHandlers/Archive/FileRead.cs
Normal file
@ -0,0 +1,141 @@
|
|||||||
|
using Adaptation.Eaf.Management.ConfigurationData.CellAutomation;
|
||||||
|
using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration;
|
||||||
|
using Adaptation.Shared;
|
||||||
|
using Adaptation.Shared.Duplicator;
|
||||||
|
using Adaptation.Shared.Methods;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text.Json;
|
||||||
|
|
||||||
|
namespace Adaptation.FileHandlers.Archive;
|
||||||
|
|
||||||
|
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) :
|
||||||
|
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted)
|
||||||
|
{
|
||||||
|
_MinFileLength = 10;
|
||||||
|
_NullData = string.Empty;
|
||||||
|
_Logistics = new Logistics(this);
|
||||||
|
if (_FileParameter is null)
|
||||||
|
throw new Exception(cellInstanceConnectionName);
|
||||||
|
if (_ModelObjectParameterDefinitions is null)
|
||||||
|
throw new Exception(cellInstanceConnectionName);
|
||||||
|
if (!_IsDuplicator)
|
||||||
|
throw new Exception(cellInstanceConnectionName);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception) => Move(extractResults, exception);
|
||||||
|
|
||||||
|
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
||||||
|
|
||||||
|
string IFileRead.GetEventDescription()
|
||||||
|
{
|
||||||
|
string result = _Description.GetEventDescription();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<string> IFileRead.GetHeaderNames()
|
||||||
|
{
|
||||||
|
List<string> results = _Description.GetHeaderNames();
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
string[] IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, string to, string from, string resolvedFileLocation, Exception exception)
|
||||||
|
{
|
||||||
|
string[] results = Move(extractResults, to, from, resolvedFileLocation, exception);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
JsonProperty[] IFileRead.GetDefault()
|
||||||
|
{
|
||||||
|
JsonProperty[] results = _Description.GetDefault(this, _Logistics);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
Dictionary<string, string> IFileRead.GetDisplayNamesJsonElement()
|
||||||
|
{
|
||||||
|
Dictionary<string, string> results = _Description.GetDisplayNamesJsonElement(this);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<IDescription> IFileRead.GetDescriptions(IFileRead fileRead, List<Test> tests, IProcessData processData)
|
||||||
|
{
|
||||||
|
List<IDescription> results = _Description.GetDescriptions(fileRead, _Logistics, tests, processData);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> IFileRead.GetExtractResult(string reportFullPath, string eventName)
|
||||||
|
{
|
||||||
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
|
if (string.IsNullOrEmpty(eventName))
|
||||||
|
throw new Exception();
|
||||||
|
_ReportFullPath = reportFullPath;
|
||||||
|
DateTime dateTime = DateTime.Now;
|
||||||
|
results = GetExtractResult(reportFullPath, dateTime);
|
||||||
|
if (results.Item3 is null)
|
||||||
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(results.Item1, Array.Empty<Test>(), JsonSerializer.Deserialize<JsonElement[]>("[]"), results.Item4);
|
||||||
|
if (results.Item3.Length > 0 && _IsEAFHosted)
|
||||||
|
WritePDSF(this, results.Item3);
|
||||||
|
UpdateLastTicksDuration(DateTime.Now.Ticks - dateTime.Ticks);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> IFileRead.ReExtract()
|
||||||
|
{
|
||||||
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
|
List<string> headerNames = _Description.GetHeaderNames();
|
||||||
|
Dictionary<string, string> keyValuePairs = _Description.GetDisplayNamesJsonElement(this);
|
||||||
|
results = ReExtract(this, headerNames, keyValuePairs);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
void IFileRead.CheckTests(Test[] tests, bool extra)
|
||||||
|
{
|
||||||
|
if (_Description is not Description)
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
|
||||||
|
void IFileRead.Callback(object state) => throw new Exception(string.Concat("Not ", nameof(_IsDuplicator)));
|
||||||
|
|
||||||
|
private void MoveArchive(DateTime dateTime)
|
||||||
|
{
|
||||||
|
if (dateTime == DateTime.MinValue)
|
||||||
|
{ }
|
||||||
|
string logisticsSequence = _Logistics.Sequence.ToString();
|
||||||
|
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 jobIdDirectory = string.Concat(_FileConnectorConfiguration.TargetFileLocation, @"\", _Logistics.JobID);
|
||||||
|
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))
|
||||||
|
_ = Directory.CreateDirectory(destinationArchiveDirectory);
|
||||||
|
string[] matchDirectories = new string[] { GetDirectoriesRecursively(jobIdDirectory, logisticsSequence).FirstOrDefault() };
|
||||||
|
if ((matchDirectories is null) || matchDirectories.Length != 1)
|
||||||
|
throw new Exception("Didn't find directory by logistics sequence");
|
||||||
|
string sourceDirectory = Path.GetDirectoryName(matchDirectories[0]);
|
||||||
|
destinationArchiveDirectory = string.Concat(destinationArchiveDirectory, @"\", Path.GetFileName(sourceDirectory));
|
||||||
|
Directory.Move(sourceDirectory, destinationArchiveDirectory);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||||
|
{
|
||||||
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
|
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
||||||
|
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
||||||
|
SetFileParameterLotIDToLogisticsMID();
|
||||||
|
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
|
||||||
|
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
|
||||||
|
Tuple<Test[], Dictionary<Test, List<Shared.Properties.IDescription>>> tuple = GetTuple(this, descriptions, extra: false);
|
||||||
|
MoveArchive(dateTime);
|
||||||
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tuple.Item1, jsonElements, new List<FileInfo>());
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
39
Adaptation/FileHandlers/CellInstanceConnectionName.cs
Normal file
39
Adaptation/FileHandlers/CellInstanceConnectionName.cs
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
using Adaptation.Eaf.Management.ConfigurationData.CellAutomation;
|
||||||
|
using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration;
|
||||||
|
using Adaptation.Shared.Methods;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace Adaptation.FileHandlers;
|
||||||
|
|
||||||
|
public class CellInstanceConnectionName
|
||||||
|
{
|
||||||
|
|
||||||
|
internal static IFileRead Get(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted)
|
||||||
|
{
|
||||||
|
IFileRead result;
|
||||||
|
bool isDuplicator = cellInstanceConnectionName.StartsWith(cellInstanceName);
|
||||||
|
if (isDuplicator)
|
||||||
|
{
|
||||||
|
string cellInstanceConnectionNameBase = cellInstanceConnectionName.Replace("-", string.Empty);
|
||||||
|
int hyphens = cellInstanceConnectionName.Length - cellInstanceConnectionNameBase.Length;
|
||||||
|
result = hyphens switch
|
||||||
|
{
|
||||||
|
(int)MET08RESIHGCV.Hyphen.IsArchive => new Archive.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted),
|
||||||
|
(int)MET08RESIHGCV.Hyphen.IsDummy => new Dummy.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted),
|
||||||
|
(int)MET08RESIHGCV.Hyphen.IsXToArchive => new ToArchive.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted),
|
||||||
|
_ => new MET08RESIHGCV.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = cellInstanceConnectionName switch
|
||||||
|
{
|
||||||
|
nameof(pcl) => new pcl.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted),
|
||||||
|
_ => throw new Exception(),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
308
Adaptation/FileHandlers/Dummy/FileRead.cs
Normal file
308
Adaptation/FileHandlers/Dummy/FileRead.cs
Normal file
@ -0,0 +1,308 @@
|
|||||||
|
using Adaptation.Eaf.Management.ConfigurationData.CellAutomation;
|
||||||
|
using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration;
|
||||||
|
using Adaptation.Shared;
|
||||||
|
using Adaptation.Shared.Duplicator;
|
||||||
|
using Adaptation.Shared.Methods;
|
||||||
|
using Infineon.Monitoring.MonA;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.IO;
|
||||||
|
using System.IO.Compression;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text.Json;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
|
namespace Adaptation.FileHandlers.Dummy;
|
||||||
|
|
||||||
|
public class FileRead : Shared.FileRead, IFileRead
|
||||||
|
{
|
||||||
|
|
||||||
|
private readonly Timer _Timer;
|
||||||
|
private int _LastDummyRunIndex;
|
||||||
|
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) :
|
||||||
|
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted)
|
||||||
|
{
|
||||||
|
_MinFileLength = 10;
|
||||||
|
_NullData = string.Empty;
|
||||||
|
_Logistics = new Logistics(this);
|
||||||
|
if (_FileParameter is null)
|
||||||
|
throw new Exception(cellInstanceConnectionName);
|
||||||
|
if (_ModelObjectParameterDefinitions is null)
|
||||||
|
throw new Exception(cellInstanceConnectionName);
|
||||||
|
if (!_IsDuplicator)
|
||||||
|
throw new Exception(cellInstanceConnectionName);
|
||||||
|
_LastDummyRunIndex = -1;
|
||||||
|
List<string> cellNames = new();
|
||||||
|
_Timer = new Timer(Callback, null, Timeout.Infinite, Timeout.Infinite);
|
||||||
|
ModelObjectParameterDefinition[] cellInstanceCollection = GetProperties(cellInstanceConnectionName, modelObjectParameters, "CellInstance.", ".Alias");
|
||||||
|
foreach (ModelObjectParameterDefinition modelObjectParameterDefinition in cellInstanceCollection)
|
||||||
|
cellNames.Add(modelObjectParameterDefinition.Name.Split('.')[1]);
|
||||||
|
_CellNames = cellNames.ToArray();
|
||||||
|
if (Debugger.IsAttached || fileConnectorConfiguration.PreProcessingMode == FileConnectorConfiguration.PreProcessingModeEnum.Process)
|
||||||
|
Callback(null);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TimeSpan timeSpan = new(DateTime.Now.AddSeconds(_FileConnectorConfiguration.FileScanningIntervalInSeconds.Value).Ticks - DateTime.Now.Ticks);
|
||||||
|
_ = _Timer.Change((long)timeSpan.TotalMilliseconds, Timeout.Infinite);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception) => Move(extractResults, exception);
|
||||||
|
|
||||||
|
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
||||||
|
|
||||||
|
string IFileRead.GetEventDescription()
|
||||||
|
{
|
||||||
|
string result = _Description.GetEventDescription();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<string> IFileRead.GetHeaderNames()
|
||||||
|
{
|
||||||
|
List<string> results = _Description.GetHeaderNames();
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
string[] IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, string to, string from, string resolvedFileLocation, Exception exception)
|
||||||
|
{
|
||||||
|
string[] results = Move(extractResults, to, from, resolvedFileLocation, exception);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
JsonProperty[] IFileRead.GetDefault()
|
||||||
|
{
|
||||||
|
JsonProperty[] results = _Description.GetDefault(this, _Logistics);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
Dictionary<string, string> IFileRead.GetDisplayNamesJsonElement()
|
||||||
|
{
|
||||||
|
Dictionary<string, string> results = _Description.GetDisplayNamesJsonElement(this);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<IDescription> IFileRead.GetDescriptions(IFileRead fileRead, List<Test> tests, IProcessData processData)
|
||||||
|
{
|
||||||
|
List<IDescription> results = _Description.GetDescriptions(fileRead, _Logistics, tests, processData);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> IFileRead.GetExtractResult(string reportFullPath, string eventName) => 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();
|
||||||
|
}
|
||||||
|
|
||||||
|
void IFileRead.Callback(object state) => Callback(state);
|
||||||
|
|
||||||
|
private void CallbackInProcessCleared(string sourceArchiveFile, string traceDummyFile, string targetFileLocation, string monARessource, string inProcessDirectory, long sequence, bool warning)
|
||||||
|
{
|
||||||
|
const string site = "sjc";
|
||||||
|
string stateName = string.Concat("Dummy_", _EventName);
|
||||||
|
const string monInURL = "http://moninhttp.sjc.infineon.com/input/text";
|
||||||
|
MonIn monIn = MonIn.GetInstance(monInURL);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (warning)
|
||||||
|
{
|
||||||
|
File.AppendAllLines(traceDummyFile, new string[] { site, monARessource, stateName, State.Warning.ToString() });
|
||||||
|
_ = monIn.SendStatus(site, monARessource, stateName, State.Warning);
|
||||||
|
for (int i = 1; i < 12; i++)
|
||||||
|
Thread.Sleep(500);
|
||||||
|
}
|
||||||
|
ZipFile.ExtractToDirectory(sourceArchiveFile, inProcessDirectory);
|
||||||
|
string[] files = Directory.GetFiles(inProcessDirectory, "*", SearchOption.TopDirectoryOnly);
|
||||||
|
if (files.Length > 250)
|
||||||
|
throw new Exception("Safety net!");
|
||||||
|
foreach (string file in files)
|
||||||
|
File.SetLastWriteTime(file, new DateTime(sequence));
|
||||||
|
if (!_FileConnectorConfiguration.IncludeSubDirectories.Value)
|
||||||
|
{
|
||||||
|
foreach (string file in files)
|
||||||
|
File.Move(file, Path.Combine(targetFileLocation, Path.GetFileName(file)));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string[] directories = Directory.GetDirectories(inProcessDirectory, "*", SearchOption.AllDirectories);
|
||||||
|
foreach (string directory in directories)
|
||||||
|
_ = Directory.CreateDirectory(string.Concat(targetFileLocation, directory.Substring(inProcessDirectory.Length)));
|
||||||
|
foreach (string file in files)
|
||||||
|
File.Move(file, string.Concat(targetFileLocation, file.Substring(inProcessDirectory.Length)));
|
||||||
|
}
|
||||||
|
File.AppendAllLines(traceDummyFile, new string[] { site, monARessource, stateName, State.Ok.ToString() });
|
||||||
|
_ = monIn.SendStatus(site, monARessource, stateName, State.Ok);
|
||||||
|
}
|
||||||
|
catch (Exception exception)
|
||||||
|
{
|
||||||
|
string subject = string.Concat("Exception:", _CellInstanceConnectionName);
|
||||||
|
string body = string.Concat(exception.Message, Environment.NewLine, Environment.NewLine, exception.StackTrace);
|
||||||
|
try
|
||||||
|
{ _SMTP.SendHighPriorityEmailMessage(subject, body); }
|
||||||
|
catch (Exception) { }
|
||||||
|
File.AppendAllLines(traceDummyFile, new string[] { site, monARessource, stateName, State.Critical.ToString(), exception.Message, exception.StackTrace });
|
||||||
|
_ = monIn.SendStatus(site, monARessource, stateName, State.Critical);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CallbackFileExists(string sourceArchiveFile, string traceDummyFile, string targetFileLocation, string monARessource, long sequence)
|
||||||
|
{
|
||||||
|
string[] files;
|
||||||
|
bool warning = false;
|
||||||
|
if (!_DummyRuns.ContainsKey(monARessource))
|
||||||
|
_DummyRuns.Add(monARessource, new List<long>());
|
||||||
|
if (!_DummyRuns[monARessource].Contains(sequence))
|
||||||
|
_DummyRuns[monARessource].Add(sequence);
|
||||||
|
File.AppendAllLines(traceDummyFile, new string[] { sourceArchiveFile });
|
||||||
|
string inProcessDirectory = Path.Combine(_ProgressPath, "Dummy In-Process", sequence.ToString());
|
||||||
|
if (!Directory.Exists(inProcessDirectory))
|
||||||
|
_ = Directory.CreateDirectory(inProcessDirectory);
|
||||||
|
files = Directory.GetFiles(inProcessDirectory, "*", SearchOption.AllDirectories);
|
||||||
|
if (files.Any())
|
||||||
|
{
|
||||||
|
if (files.Length > 250)
|
||||||
|
throw new Exception("Safety net!");
|
||||||
|
try
|
||||||
|
{
|
||||||
|
foreach (string file in files)
|
||||||
|
File.Delete(file);
|
||||||
|
}
|
||||||
|
catch (Exception) { }
|
||||||
|
}
|
||||||
|
if (_FileConnectorConfiguration.IncludeSubDirectories.Value)
|
||||||
|
files = Directory.GetFiles(targetFileLocation, "*", SearchOption.AllDirectories);
|
||||||
|
else
|
||||||
|
files = Directory.GetFiles(targetFileLocation, "*", SearchOption.TopDirectoryOnly);
|
||||||
|
foreach (string file in files)
|
||||||
|
{
|
||||||
|
if (new FileInfo(file).LastWriteTime.Ticks == sequence)
|
||||||
|
{
|
||||||
|
warning = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
CallbackInProcessCleared(sourceArchiveFile, traceDummyFile, targetFileLocation, monARessource, inProcessDirectory, sequence, warning);
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetCellName(string pathSegment)
|
||||||
|
{
|
||||||
|
string result = string.Empty;
|
||||||
|
foreach (string cellName in _CellNames)
|
||||||
|
{
|
||||||
|
if (pathSegment.ToLower().Contains(cellName.ToLower()))
|
||||||
|
{
|
||||||
|
result = cellName;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (string.IsNullOrEmpty(result))
|
||||||
|
{
|
||||||
|
int count;
|
||||||
|
List<(string CellName, int Count)> cellNames = new();
|
||||||
|
foreach (string cellName in _CellNames)
|
||||||
|
{
|
||||||
|
count = 0;
|
||||||
|
foreach (char @char in cellName.ToLower())
|
||||||
|
count += pathSegment.Length - pathSegment.ToLower().Replace(@char.ToString(), string.Empty).Length;
|
||||||
|
cellNames.Add(new(cellName, count));
|
||||||
|
}
|
||||||
|
result = (from l in cellNames orderby l.CellName.Length, l.Count descending select l.CellName).First();
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Callback(object state)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string pathSegment;
|
||||||
|
string monARessource;
|
||||||
|
DateTime dateTime = DateTime.Now;
|
||||||
|
if (!_FileConnectorConfiguration.TargetFileLocation.Contains(_FileConnectorConfiguration.SourceFileLocation))
|
||||||
|
throw new Exception("Target must start with source");
|
||||||
|
bool check = dateTime.Hour > 7 && dateTime.Hour < 18 && dateTime.DayOfWeek != DayOfWeek.Sunday && dateTime.DayOfWeek != DayOfWeek.Saturday;
|
||||||
|
if (!_IsEAFHosted || check)
|
||||||
|
{
|
||||||
|
string checkSegment;
|
||||||
|
string checkDirectory;
|
||||||
|
string sourceFileFilter;
|
||||||
|
string sourceArchiveFile;
|
||||||
|
string sourceFileLocation;
|
||||||
|
string weekOfYear = _Calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
||||||
|
string traceDummyDirectory = Path.Combine(Path.GetPathRoot(_TracePath), "TracesDummy", _CellInstanceName, "Source", $"{dateTime:yyyy}___Week_{weekOfYear}");
|
||||||
|
if (!Directory.Exists(traceDummyDirectory))
|
||||||
|
_ = Directory.CreateDirectory(traceDummyDirectory);
|
||||||
|
string traceDummyFile = Path.Combine(traceDummyDirectory, $"{dateTime.Ticks} - {_CellInstanceName}.txt");
|
||||||
|
File.AppendAllText(traceDummyFile, string.Empty);
|
||||||
|
if (_FileConnectorConfiguration.SourceFileLocation.EndsWith("\\"))
|
||||||
|
sourceFileLocation = _FileConnectorConfiguration.SourceFileLocation;
|
||||||
|
else
|
||||||
|
sourceFileLocation = string.Concat(_FileConnectorConfiguration.SourceFileLocation, '\\');
|
||||||
|
for (int i = 0; i < _FileConnectorConfiguration.SourceFileFilters.Count; i++)
|
||||||
|
{
|
||||||
|
_LastDummyRunIndex += 1;
|
||||||
|
if (_LastDummyRunIndex >= _FileConnectorConfiguration.SourceFileFilters.Count)
|
||||||
|
_LastDummyRunIndex = 0;
|
||||||
|
sourceFileFilter = _FileConnectorConfiguration.SourceFileFilters[_LastDummyRunIndex];
|
||||||
|
sourceArchiveFile = Path.GetFullPath(string.Concat(sourceFileLocation, sourceFileFilter));
|
||||||
|
if (File.Exists(sourceArchiveFile))
|
||||||
|
{
|
||||||
|
checkSegment = _FileConnectorConfiguration.TargetFileLocation.Substring(sourceFileLocation.Length);
|
||||||
|
checkDirectory = Path.GetDirectoryName(sourceArchiveFile);
|
||||||
|
for (int z = 0; z < int.MaxValue; z++)
|
||||||
|
{
|
||||||
|
if (checkDirectory.Length < sourceFileLocation.Length || !checkDirectory.StartsWith(sourceFileLocation))
|
||||||
|
break;
|
||||||
|
checkDirectory = Path.GetDirectoryName(checkDirectory);
|
||||||
|
if (Directory.Exists(Path.Combine(checkDirectory, checkSegment)))
|
||||||
|
{
|
||||||
|
checkDirectory = Path.Combine(checkDirectory, checkSegment);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!checkDirectory.EndsWith(checkSegment))
|
||||||
|
throw new Exception("Could not determine dummy target directory for extract!");
|
||||||
|
if (!long.TryParse(Path.GetFileNameWithoutExtension(sourceArchiveFile).Replace("x", string.Empty), out long sequence))
|
||||||
|
throw new Exception("Invalid file name for source archive file!");
|
||||||
|
pathSegment = checkDirectory.Substring(sourceFileLocation.Length);
|
||||||
|
monARessource = GetCellName(pathSegment);
|
||||||
|
if (string.IsNullOrEmpty(monARessource))
|
||||||
|
throw new Exception("Could not determine which cell archive file is associated with!");
|
||||||
|
if (_IsEAFHosted)
|
||||||
|
CallbackFileExists(sourceArchiveFile, traceDummyFile, checkDirectory, monARessource, sequence);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception exception)
|
||||||
|
{
|
||||||
|
string subject = string.Concat("Exception:", _CellInstanceConnectionName);
|
||||||
|
string body = string.Concat(exception.Message, Environment.NewLine, Environment.NewLine, exception.StackTrace);
|
||||||
|
try
|
||||||
|
{ _SMTP.SendHighPriorityEmailMessage(subject, body); }
|
||||||
|
catch (Exception) { }
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
TimeSpan timeSpan = new(DateTime.Now.AddSeconds(_FileConnectorConfiguration.FileScanningIntervalInSeconds.Value).Ticks - DateTime.Now.Ticks);
|
||||||
|
_ = _Timer.Change((long)timeSpan.TotalMilliseconds, Timeout.Infinite);
|
||||||
|
}
|
||||||
|
catch (Exception exception)
|
||||||
|
{
|
||||||
|
string subject = string.Concat("Exception:", _CellInstanceConnectionName);
|
||||||
|
string body = string.Concat(exception.Message, Environment.NewLine, Environment.NewLine, exception.StackTrace);
|
||||||
|
try
|
||||||
|
{ _SMTP.SendHighPriorityEmailMessage(subject, body); }
|
||||||
|
catch (Exception) { }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,280 +0,0 @@
|
|||||||
//using Adaptation.Helpers;
|
|
||||||
//using Adaptation.Shared;
|
|
||||||
//using Adaptation.Shared.Metrology;
|
|
||||||
//using log4net;
|
|
||||||
//using System;
|
|
||||||
//using System.Collections.Generic;
|
|
||||||
//using System.Globalization;
|
|
||||||
//using System.IO;
|
|
||||||
//using System.Linq;
|
|
||||||
//using System.Text.Json;
|
|
||||||
//using System.Text.RegularExpressions;
|
|
||||||
|
|
||||||
//namespace Adaptation.FileHandlers
|
|
||||||
//{
|
|
||||||
|
|
||||||
// public partial class FileRead : ILogic
|
|
||||||
// {
|
|
||||||
|
|
||||||
// private ConfigData _ConfigData;
|
|
||||||
|
|
||||||
// public FileRead()
|
|
||||||
// {
|
|
||||||
// Logistics = new Logistics();
|
|
||||||
// _Log = LogManager.GetLogger(typeof(FileRead));
|
|
||||||
// }
|
|
||||||
|
|
||||||
// public ILogic ShallowCopy()
|
|
||||||
// {
|
|
||||||
// return (ILogic)MemberwiseClone();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// public void WaitForThread()
|
|
||||||
// {
|
|
||||||
// WaitForThread(thread: null, threadExceptions: null);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// public Tuple<string, ConfigDataBase> GetOpenInsightTuple()
|
|
||||||
// {
|
|
||||||
// Tuple<string, ConfigDataBase> restuls = new Tuple<string, ConfigDataBase>(_ConfigData.OpenInsightSiViewer, _ConfigData);
|
|
||||||
// return restuls;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// public Tuple<string, JsonElement?, List<FileInfo>> GetExtractResult(string reportFullPath, string eventName)
|
|
||||||
// {
|
|
||||||
// Tuple<string, JsonElement?, List<FileInfo>> results;
|
|
||||||
// _FileParameter.Clear();
|
|
||||||
// DateTime dateTime = DateTime.Now;
|
|
||||||
// if (_ConfigData.IsEvent && _ConfigData.Duplicator is null)
|
|
||||||
// results = GetExtractResult(reportFullPath);
|
|
||||||
// else if (_ConfigData.Duplicator.HasValue)
|
|
||||||
// results = GetDuplicatorExtractResult(reportFullPath, dateTime);
|
|
||||||
// else
|
|
||||||
// throw new Exception();
|
|
||||||
// if (results.Item2 is null)
|
|
||||||
// results = new Tuple<string, JsonElement?, List<FileInfo>>(results.Item1, JsonSerializer.Deserialize<JsonElement>("[]"), results.Item3);
|
|
||||||
// int count = results.Item2.Value.GetArrayLength();
|
|
||||||
// if (count > 0 && _ConfigData.EafHosted)
|
|
||||||
// WritePDSF(results.Item2.Value);
|
|
||||||
// UpdateLastTicksDuration(DateTime.Now.Ticks - dateTime.Ticks);
|
|
||||||
// return results;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// private Tuple<string, JsonElement?, List<FileInfo>> GetExtractResult(string reportFullPath)
|
|
||||||
// {
|
|
||||||
// Tuple<string, JsonElement?, List<FileInfo>> results = new Tuple<string, JsonElement?, List<FileInfo>>(string.Empty, null, new List<FileInfo>());
|
|
||||||
// FileInfo fileInfo = new FileInfo(reportFullPath);
|
|
||||||
// Logistics = new Logistics(ConfigData.NullData, _ConfigData.CellNames, _ConfigData.MesEntities, fileInfo, useSplitForMID: false);
|
|
||||||
// SetFileParameterLotID(Logistics.MID);
|
|
||||||
// if (fileInfo.Length < ConfigData.MinFileLength)
|
|
||||||
// results.Item3.Add(fileInfo);
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// ProcessData processData = new ProcessData(this, _ConfigData, results.Item3);
|
|
||||||
// if (!(processData.Header is null))
|
|
||||||
// {
|
|
||||||
// string mid = string.Concat(processData.Header.Reactor, "-", processData.Header.RDS, "-", processData.Header.PSN);
|
|
||||||
// mid = Regex.Replace(mid, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
|
|
||||||
// Logistics.MID = mid;
|
|
||||||
// SetFileParameterLotID(mid);
|
|
||||||
// Logistics.ProcessJobID = processData.Header.Reactor;
|
|
||||||
// }
|
|
||||||
// if (processData.Header is null || !processData.Details.Any())
|
|
||||||
// throw new Exception();
|
|
||||||
// results = processData.GetResults(this, _ConfigData, results.Item3);
|
|
||||||
// }
|
|
||||||
// return results;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// private Tuple<string, JsonElement?, List<FileInfo>> GetDuplicatorExtractResult(string reportFullPath, DateTime dateTime)
|
|
||||||
// {
|
|
||||||
// Tuple<string, JsonElement?, List<FileInfo>> results;
|
|
||||||
// Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
|
||||||
// Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
|
||||||
// SetFileParameterLotIDToLogisticsMID();
|
|
||||||
// JsonElement pdsdBodyValues = ProcessDataStandardFormat.GetArray(pdsf);
|
|
||||||
// results = new Tuple<string, JsonElement?, List<FileInfo>>(pdsf.Item1, pdsdBodyValues, new List<FileInfo>());
|
|
||||||
// List<Duplicator.Description> processDataDescriptions = _ConfigData.GetProcessDataDescriptions(pdsdBodyValues);
|
|
||||||
// Dictionary<Test, List<Duplicator.Description>> keyValuePairs = ProcessData.GetKeyValuePairs(_ConfigData, pdsdBodyValues, processDataDescriptions, extra: false);
|
|
||||||
// bool isNotUsedInsightMetrologyViewerAttachments = (!(_Configuration.FileScanningIntervalInSeconds > 0) && _ConfigData.Duplicator.Value == ConfigData.Level.IsXToOpenInsightMetrologyViewerAttachments);
|
|
||||||
// bool isDummyRun = (ConfigData.DummyRuns.Any() && ConfigData.DummyRuns.ContainsKey(Logistics.JobID) && ConfigData.DummyRuns[Logistics.JobID].Any() && (from l in ConfigData.DummyRuns[Logistics.JobID] where l == Logistics.Sequence select 1).Any());
|
|
||||||
// if (isDummyRun)
|
|
||||||
// {
|
|
||||||
// try { File.SetLastWriteTime(reportFullPath, dateTime); } catch (Exception) { }
|
|
||||||
// }
|
|
||||||
// string duplicateDirectory;
|
|
||||||
// string[] segments = Path.GetFileNameWithoutExtension(reportFullPath).Split('_');
|
|
||||||
// if (_ConfigData.Duplicator.Value != ConfigData.Level.IsXToOpenInsight)
|
|
||||||
// duplicateDirectory = string.Concat(_Configuration.TargetFileLocation, @"\", segments[0]);
|
|
||||||
// else
|
|
||||||
// duplicateDirectory = string.Concat(Path.GetDirectoryName(Path.GetDirectoryName(_Configuration.TargetFileLocation)), @"\Data");
|
|
||||||
// if (segments.Length > 2)
|
|
||||||
// duplicateDirectory = string.Concat(duplicateDirectory, @"-", segments[2]);
|
|
||||||
// if (!Directory.Exists(duplicateDirectory))
|
|
||||||
// Directory.CreateDirectory(duplicateDirectory);
|
|
||||||
// if ((isDummyRun || isNotUsedInsightMetrologyViewerAttachments || _Configuration.FileScanningIntervalInSeconds > 0) && _ConfigData.Duplicator.Value != ConfigData.Level.IsXToArchive && _ConfigData.Duplicator.Value != ConfigData.Level.IsArchive)
|
|
||||||
// {
|
|
||||||
// string successDirectory;
|
|
||||||
// if (_ConfigData.Duplicator.Value != ConfigData.Level.IsXToAPC)
|
|
||||||
// successDirectory = string.Empty;
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// successDirectory = string.Concat(Path.GetDirectoryName(_Configuration.TargetFileLocation), @"\ViewerPath");
|
|
||||||
// if (!Directory.Exists(successDirectory))
|
|
||||||
// Directory.CreateDirectory(successDirectory);
|
|
||||||
// }
|
|
||||||
// CultureInfo cultureInfo = new CultureInfo("en-US");
|
|
||||||
// Calendar calendar = cultureInfo.Calendar;
|
|
||||||
// List<Tuple<IScopeInfo, string>> tuples = new List<Tuple<IScopeInfo, string>>();
|
|
||||||
// string duplicateFile = string.Concat(duplicateDirectory, @"\", Path.GetFileName(reportFullPath));
|
|
||||||
// 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 logisticsSequenceMemoryDirectory = string.Concat(_ConfigData.MemoryPath, @"\", _ConfigData.GetEquipmentType(), @"\Source\", weekDirectory, @"\", Logistics.Sequence);
|
|
||||||
// if (!Directory.Exists(logisticsSequenceMemoryDirectory))
|
|
||||||
// Directory.CreateDirectory(logisticsSequenceMemoryDirectory);
|
|
||||||
// if (_ConfigData.Duplicator.Value == ConfigData.Level.IsXToAPC)
|
|
||||||
// {
|
|
||||||
// if (!isDummyRun && _ConfigData.EafHosted)
|
|
||||||
// File.Copy(reportFullPath, duplicateFile, overwrite: true);
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// if (_ConfigData.Duplicator.Value == ConfigData.Level.IsXToOpenInsightMetrologyViewer)
|
|
||||||
// {
|
|
||||||
// List<ProcessData.FileRead.Description> fileReadDescriptions = ProcessData.GetProcessDataFileReadDescriptions(_ConfigData, pdsdBodyValues);
|
|
||||||
// ProcessData.WSRequest wsRequest = new ProcessData.WSRequest(this, fileReadDescriptions);
|
|
||||||
// if (!isDummyRun && _ConfigData.EafHosted)
|
|
||||||
// {
|
|
||||||
// Tuple<string, WS.Results> wsResults = WS.SendData(_ConfigData.OpenInsightMetrologyViewerAPI, wsRequest);
|
|
||||||
// if (!wsResults.Item2.Success)
|
|
||||||
// throw new Exception(wsResults.ToString());
|
|
||||||
// _Log.Debug(wsResults.Item2.HeaderID);
|
|
||||||
// File.WriteAllText(string.Concat(logisticsSequenceMemoryDirectory, @"\", nameof(WS.Results), ".json"), wsResults.Item1);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// Test test;
|
|
||||||
// string lines;
|
|
||||||
// IScopeInfo scopeInfo;
|
|
||||||
// foreach (KeyValuePair<Test, List<Duplicator.Description>> keyValuePair in keyValuePairs)
|
|
||||||
// {
|
|
||||||
// test = keyValuePair.Key;
|
|
||||||
// //scopeInfo = new ScopeInfo(this, _ConfigData, test);
|
|
||||||
// if (_ConfigData.Duplicator.Value != ConfigData.Level.IsXToOpenInsight)
|
|
||||||
// scopeInfo = new ScopeInfo(this, _ConfigData, test, _ConfigData.IqsFile, _ConfigData.IqsQueryFilter);
|
|
||||||
// else
|
|
||||||
// scopeInfo = new ScopeInfo(this, _ConfigData, test, _ConfigData.OpenInsightFilePattern, _ConfigData.IqsQueryFilter);
|
|
||||||
// //lines = ProcessDataStandardFormat.GetLines(Logistics, scopeInfo, names, values, dateFormat: "M/d/yyyy hh:mm:ss tt", timeFormat: string.Empty, pairedColumns: ExtractResultPairedColumns);
|
|
||||||
// List<ProcessData.FileRead.Description> fileReadDescriptions = ProcessData.GetProcessDataFileReadDescriptions(_ConfigData, pdsdBodyValues);
|
|
||||||
// lines = ProcessData.GetLines(this, fileReadDescriptions);
|
|
||||||
// tuples.Add(new Tuple<IScopeInfo, string>(scopeInfo, lines));
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if (_ConfigData.Duplicator.Value == ConfigData.Level.IsXToOpenInsightMetrologyViewerAttachments)
|
|
||||||
// {
|
|
||||||
// string[] matchDirectories = Shared1567(reportFullPath, tuples);
|
|
||||||
// if (!isDummyRun && _ConfigData.EafHosted && !isNotUsedInsightMetrologyViewerAttachments)
|
|
||||||
// {
|
|
||||||
// List<ProcessData.FileRead.Description> fileReadDescriptions = ProcessData.GetProcessDataFileReadDescriptions(_ConfigData, pdsdBodyValues);
|
|
||||||
// ProcessData.PostOpenInsightMetrologyViewerAttachments(_Log, _ConfigData, Logistics, dateTime, logisticsSequenceMemoryDirectory, fileReadDescriptions, matchDirectories[0]);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if (_ConfigData.Duplicator.Value != ConfigData.Level.IsXToOpenInsightMetrologyViewer && _ConfigData.Duplicator.Value != ConfigData.Level.IsXToOpenInsightMetrologyViewerAttachments)
|
|
||||||
// Shared0413(dateTime, isDummyRun, successDirectory, duplicateDirectory, tuples, duplicateFile);
|
|
||||||
// }
|
|
||||||
// if (_ConfigData.Duplicator.Value == ConfigData.Level.IsXToOpenInsightMetrologyViewerAttachments)
|
|
||||||
// {
|
|
||||||
// string destinationDirectory;
|
|
||||||
// //string destinationDirectory = WriteScopeInfo(_ConfigData.ProgressPath, Logistics, dateTime, duplicateDirectory, tuples);
|
|
||||||
// FileInfo fileInfo = new FileInfo(reportFullPath);
|
|
||||||
// string logisticsSequence = Logistics.Sequence.ToString();
|
|
||||||
// if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime)
|
|
||||||
// File.SetLastWriteTime(reportFullPath, fileInfo.CreationTime);
|
|
||||||
// string jobIdDirectory = string.Concat(Path.GetDirectoryName(Path.GetDirectoryName(_ConfigData.FileConnectorConfiguration.TargetFileLocation)), @"\", Logistics.JobID);
|
|
||||||
// if (!Directory.Exists(jobIdDirectory))
|
|
||||||
// Directory.CreateDirectory(jobIdDirectory);
|
|
||||||
// string[] matchDirectories;
|
|
||||||
// if (!_ConfigData.EafHosted)
|
|
||||||
// matchDirectories = new string[] { Path.GetDirectoryName(Path.GetDirectoryName(reportFullPath)) };
|
|
||||||
// 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");
|
|
||||||
// destinationDirectory = matchDirectories[0];
|
|
||||||
// if (isDummyRun)
|
|
||||||
// Shared0607(reportFullPath, duplicateDirectory, logisticsSequence, destinationDirectory);
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// List<ProcessData.FileRead.Description> fileReadDescriptions = ProcessData.GetProcessDataFileReadDescriptions(_ConfigData, pdsdBodyValues);
|
|
||||||
// ProcessData.WSRequest wsRequest = new ProcessData.WSRequest(this, fileReadDescriptions);
|
|
||||||
// JsonSerializerOptions jsonSerializerOptions = new JsonSerializerOptions { WriteIndented = true };
|
|
||||||
// string json = JsonSerializer.Serialize(wsRequest, wsRequest.GetType(), jsonSerializerOptions);
|
|
||||||
// if (_ConfigData.EafHosted)
|
|
||||||
// Shared1277(reportFullPath, destinationDirectory, logisticsSequence, jobIdDirectory, json);
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// string jsonFileName = Path.ChangeExtension(reportFullPath, ".json");
|
|
||||||
// string historicalText = File.ReadAllText(jsonFileName);
|
|
||||||
// if (json != historicalText)
|
|
||||||
// throw new Exception("File doesn't match historical!");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// return results;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// private void MoveArchive()
|
|
||||||
// {
|
|
||||||
// CultureInfo cultureInfo = new CultureInfo("en-US");
|
|
||||||
// Calendar calendar = cultureInfo.Calendar;
|
|
||||||
// string logisticsSequence = Logistics.Sequence.ToString();
|
|
||||||
// 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 jobIdDirectory = string.Concat(_ConfigData.FileConnectorConfiguration.TargetFileLocation, @"\", Logistics.JobID);
|
|
||||||
// if (!Directory.Exists(jobIdDirectory))
|
|
||||||
// Directory.CreateDirectory(jobIdDirectory);
|
|
||||||
// //string destinationArchiveDirectory = string.Concat(jobIdDirectory, @"\!Archive\", weekDirectory);
|
|
||||||
// string destinationArchiveDirectory = string.Concat(Path.GetDirectoryName(_ConfigData.FileConnectorConfiguration.TargetFileLocation), @"\Archive\", Logistics.JobID, @"\", weekDirectory);
|
|
||||||
// if (!Directory.Exists(destinationArchiveDirectory))
|
|
||||||
// Directory.CreateDirectory(destinationArchiveDirectory);
|
|
||||||
// string[] matchDirectories = new string[] { GetDirectoriesRecursively(jobIdDirectory, logisticsSequence).FirstOrDefault() };
|
|
||||||
// if ((matchDirectories is null) || matchDirectories.Length != 1)
|
|
||||||
// throw new Exception("Didn't find directory by logistics sequence");
|
|
||||||
// string sourceDirectory = Path.GetDirectoryName(matchDirectories[0]);
|
|
||||||
// destinationArchiveDirectory = string.Concat(destinationArchiveDirectory, @"\", Path.GetFileName(sourceDirectory));
|
|
||||||
// Directory.Move(sourceDirectory, destinationArchiveDirectory);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// public void Move(string reportFullPath, Tuple<string, JsonElement?, List<FileInfo>> extractResults, Exception exception = null)
|
|
||||||
// {
|
|
||||||
// Shared1872(reportFullPath, exception);
|
|
||||||
// bool isErrorFile = !(exception is null);
|
|
||||||
// if (!isErrorFile && _ConfigData.Duplicator.HasValue)
|
|
||||||
// {
|
|
||||||
// if (_ConfigData.Duplicator.Value == ConfigData.Level.IsXToArchive)
|
|
||||||
// Shared0192(reportFullPath);
|
|
||||||
// else if (_ConfigData.EafHosted && _ConfigData.Duplicator.Value == ConfigData.Level.IsArchive)
|
|
||||||
// MoveArchive();
|
|
||||||
// if (_ConfigData.EafHosted && !string.IsNullOrEmpty(_ConfigData.ProgressPath))
|
|
||||||
// CreateProgressDirectory(_ConfigData.ProgressPath, Logistics, (int?)_ConfigData.Duplicator, exceptionLines: null);
|
|
||||||
// }
|
|
||||||
// if (!isErrorFile && _ConfigData.Duplicator is null)
|
|
||||||
// WriteIO(reportFullPath);
|
|
||||||
// if (!_ConfigData.EafHosted)
|
|
||||||
// {
|
|
||||||
// object @object = GetFilePathGeneratorInfo(reportFullPath, isErrorFile: false);
|
|
||||||
// if (!(@object is null) && @object is string to)
|
|
||||||
// {
|
|
||||||
// if (to.Contains("%"))
|
|
||||||
// _Log.Debug("Can't debug without EAF Hosting");
|
|
||||||
// else
|
|
||||||
// Shared1124(reportFullPath, extractResults, to, _Configuration.SourceFileLocation, resolvedFileLocation: string.Empty, exception: null);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
//}
|
|
507
Adaptation/FileHandlers/MET08RESIHGCV/FileRead.cs
Normal file
507
Adaptation/FileHandlers/MET08RESIHGCV/FileRead.cs
Normal file
@ -0,0 +1,507 @@
|
|||||||
|
using Adaptation.Eaf.Management.ConfigurationData.CellAutomation;
|
||||||
|
using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration;
|
||||||
|
using Adaptation.Shared;
|
||||||
|
using Adaptation.Shared.Duplicator;
|
||||||
|
using Adaptation.Shared.Methods;
|
||||||
|
using Adaptation.Shared.Metrology;
|
||||||
|
using Infineon.Monitoring.MonA;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.IO;
|
||||||
|
using System.IO.Compression;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Text.Json;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
|
namespace Adaptation.FileHandlers.MET08RESIHGCV;
|
||||||
|
|
||||||
|
public class FileRead : Shared.FileRead, IFileRead
|
||||||
|
{
|
||||||
|
|
||||||
|
private readonly Timer _Timer;
|
||||||
|
private int _LastDummyRunIndex;
|
||||||
|
private readonly bool _IsDummy;
|
||||||
|
private readonly bool _IsNaEDA;
|
||||||
|
private readonly bool _IsXToAPC;
|
||||||
|
private readonly string _IqsFile;
|
||||||
|
private readonly bool _IsXToIQSSi;
|
||||||
|
private readonly bool _IsXToSPaCe;
|
||||||
|
private readonly string _MemoryPath;
|
||||||
|
private readonly bool _IsXToOpenInsight;
|
||||||
|
private readonly string _LincPDFCFileName;
|
||||||
|
private readonly string _OpenInsightFilePattern;
|
||||||
|
private readonly bool _IsXToOpenInsightMetrologyViewer;
|
||||||
|
private readonly Dictionary<string, string> _CellNames;
|
||||||
|
private readonly string _OpenInsightMetrologyViewerAPI;
|
||||||
|
private readonly bool _IsXToOpenInsightMetrologyViewerAttachments;
|
||||||
|
|
||||||
|
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) :
|
||||||
|
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted)
|
||||||
|
{
|
||||||
|
_MinFileLength = 10;
|
||||||
|
_NullData = string.Empty;
|
||||||
|
_Logistics = new Logistics(this);
|
||||||
|
if (_FileParameter is null)
|
||||||
|
throw new Exception(cellInstanceConnectionName);
|
||||||
|
if (_ModelObjectParameterDefinitions is null)
|
||||||
|
throw new Exception(cellInstanceConnectionName);
|
||||||
|
if (!_IsDuplicator)
|
||||||
|
throw new Exception(cellInstanceConnectionName);
|
||||||
|
_LastDummyRunIndex = -1;
|
||||||
|
_IsDummy = _Hyphens == (int)Hyphen.IsDummy;
|
||||||
|
_IsNaEDA = _Hyphens == (int)Hyphen.IsNaEDA;
|
||||||
|
_IsXToAPC = _Hyphens == (int)Hyphen.IsXToAPC;
|
||||||
|
_CellNames = new Dictionary<string, string>();
|
||||||
|
_IsXToIQSSi = _Hyphens == (int)Hyphen.IsXToIQSSi;
|
||||||
|
_IsXToSPaCe = _Hyphens == (int)Hyphen.IsXToSPaCe;
|
||||||
|
_IsXToOpenInsight = _Hyphens == (int)Hyphen.IsXToOpenInsight;
|
||||||
|
_IsXToOpenInsightMetrologyViewer = _Hyphens == (int)Hyphen.IsXToOpenInsightMetrologyViewer;
|
||||||
|
_IqsFile = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "IQS.File");
|
||||||
|
_MemoryPath = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Path.Memory");
|
||||||
|
_IsXToOpenInsightMetrologyViewerAttachments = _Hyphens == (int)Hyphen.IsXToOpenInsightMetrologyViewerAttachments;
|
||||||
|
_OpenInsightFilePattern = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "OpenInsight.FilePattern");
|
||||||
|
_OpenInsightMetrologyViewerAPI = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "OpenInsight.MetrologyViewerAPI");
|
||||||
|
ModelObjectParameterDefinition[] cellInstanceCollection = GetProperties(cellInstanceConnectionName, modelObjectParameters, "CellInstance.", ".Path");
|
||||||
|
foreach (ModelObjectParameterDefinition modelObjectParameterDefinition in cellInstanceCollection)
|
||||||
|
_CellNames.Add(modelObjectParameterDefinition.Name.Split('.')[1], modelObjectParameterDefinition.Value);
|
||||||
|
_LincPDFCFileName = string.Concat(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), @"\LincPDFC.exe");
|
||||||
|
if (_IsEAFHosted && _IsXToOpenInsightMetrologyViewerAttachments && !File.Exists(_LincPDFCFileName))
|
||||||
|
throw new Exception("LincPDFC FileName doesn't Exist!");
|
||||||
|
if (_IsDummy)
|
||||||
|
{
|
||||||
|
if (Debugger.IsAttached || fileConnectorConfiguration.PreProcessingMode == FileConnectorConfiguration.PreProcessingModeEnum.Process)
|
||||||
|
{
|
||||||
|
_Timer = new Timer(Callback, null, Timeout.Infinite, Timeout.Infinite);
|
||||||
|
Callback(null);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int milliSeconds;
|
||||||
|
milliSeconds = (int)(fileConnectorConfiguration.FileScanningIntervalInSeconds * 1000 / 2);
|
||||||
|
_Timer = new Timer(Callback, null, milliSeconds, Timeout.Infinite);
|
||||||
|
milliSeconds += 2000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception) => Move(extractResults, exception);
|
||||||
|
|
||||||
|
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
||||||
|
|
||||||
|
string IFileRead.GetEventDescription()
|
||||||
|
{
|
||||||
|
string result = _Description.GetEventDescription();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<string> IFileRead.GetHeaderNames()
|
||||||
|
{
|
||||||
|
List<string> results = _Description.GetHeaderNames();
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
string[] IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, string to, string from, string resolvedFileLocation, Exception exception)
|
||||||
|
{
|
||||||
|
string[] results = Move(extractResults, to, from, resolvedFileLocation, exception);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
JsonProperty[] IFileRead.GetDefault()
|
||||||
|
{
|
||||||
|
JsonProperty[] results = _Description.GetDefault(this, _Logistics);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
Dictionary<string, string> IFileRead.GetDisplayNamesJsonElement()
|
||||||
|
{
|
||||||
|
Dictionary<string, string> results = _Description.GetDisplayNamesJsonElement(this);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<IDescription> IFileRead.GetDescriptions(IFileRead fileRead, List<Test> tests, IProcessData processData)
|
||||||
|
{
|
||||||
|
List<IDescription> results = _Description.GetDescriptions(fileRead, _Logistics, tests, processData);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> IFileRead.GetExtractResult(string reportFullPath, string eventName)
|
||||||
|
{
|
||||||
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
|
if (string.IsNullOrEmpty(eventName))
|
||||||
|
throw new Exception();
|
||||||
|
_ReportFullPath = reportFullPath;
|
||||||
|
DateTime dateTime = DateTime.Now;
|
||||||
|
results = GetExtractResult(reportFullPath, dateTime);
|
||||||
|
if (results.Item3 is null)
|
||||||
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(results.Item1, Array.Empty<Test>(), JsonSerializer.Deserialize<JsonElement[]>("[]"), results.Item4);
|
||||||
|
if (results.Item3.Length > 0 && _IsEAFHosted)
|
||||||
|
WritePDSF(this, results.Item3);
|
||||||
|
UpdateLastTicksDuration(DateTime.Now.Ticks - dateTime.Ticks);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> IFileRead.ReExtract()
|
||||||
|
{
|
||||||
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
|
List<string> headerNames = _Description.GetHeaderNames();
|
||||||
|
Dictionary<string, string> keyValuePairs = _Description.GetDisplayNamesJsonElement(this);
|
||||||
|
results = ReExtract(this, headerNames, keyValuePairs);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
void IFileRead.CheckTests(Test[] tests, bool extra)
|
||||||
|
{
|
||||||
|
if (_Description is not Description)
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
|
||||||
|
void IFileRead.Callback(object state) => Callback(state);
|
||||||
|
|
||||||
|
protected static List<pcl.Description> GetDescriptions(JsonElement[] jsonElements)
|
||||||
|
{
|
||||||
|
List<pcl.Description> results = new();
|
||||||
|
pcl.Description description;
|
||||||
|
JsonSerializerOptions jsonSerializerOptions = new() { NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString };
|
||||||
|
foreach (JsonElement jsonElement in jsonElements)
|
||||||
|
{
|
||||||
|
if (jsonElement.ValueKind != JsonValueKind.Object)
|
||||||
|
throw new Exception();
|
||||||
|
description = JsonSerializer.Deserialize<pcl.Description>(jsonElement.ToString(), jsonSerializerOptions);
|
||||||
|
results.Add(description);
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||||
|
{
|
||||||
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
|
string duplicateDirectory;
|
||||||
|
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
||||||
|
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
||||||
|
SetFileParameterLotIDToLogisticsMID();
|
||||||
|
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
|
||||||
|
List<pcl.Description> descriptions = GetDescriptions(jsonElements);
|
||||||
|
Tuple<Test[], Dictionary<Test, List<Shared.Properties.IDescription>>> tuple = GetTuple(this, from l in descriptions select (Shared.Properties.IDescription)l, extra: false);
|
||||||
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tuple.Item1, jsonElements, new List<FileInfo>());
|
||||||
|
bool isNotUsedInsightMetrologyViewerAttachments = !(_FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) && _IsXToOpenInsightMetrologyViewerAttachments;
|
||||||
|
bool isDummyRun = _DummyRuns.Any() && _DummyRuns.ContainsKey(_Logistics.JobID) && _DummyRuns[_Logistics.JobID].Any() && (from l in _DummyRuns[_Logistics.JobID] where l == _Logistics.Sequence select 1).Any();
|
||||||
|
if (isDummyRun)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{ File.SetLastWriteTime(reportFullPath, dateTime); }
|
||||||
|
catch (Exception) { }
|
||||||
|
}
|
||||||
|
string[] segments = Path.GetFileNameWithoutExtension(reportFullPath).Split('_');
|
||||||
|
if (_IsXToIQSSi)
|
||||||
|
duplicateDirectory = string.Concat(_FileConnectorConfiguration.TargetFileLocation, @"\All");
|
||||||
|
else if (!_IsXToOpenInsight)
|
||||||
|
duplicateDirectory = string.Concat(_FileConnectorConfiguration.TargetFileLocation, @"\", segments[0]);
|
||||||
|
else
|
||||||
|
duplicateDirectory = string.Concat(Path.GetDirectoryName(Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation)), @"\Data");
|
||||||
|
if (segments.Length > 2)
|
||||||
|
duplicateDirectory = string.Concat(duplicateDirectory, @"-", segments[2]);
|
||||||
|
if (!Directory.Exists(duplicateDirectory))
|
||||||
|
_ = Directory.CreateDirectory(duplicateDirectory);
|
||||||
|
if (isDummyRun || isNotUsedInsightMetrologyViewerAttachments || _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
|
{
|
||||||
|
if (!Directory.Exists(duplicateDirectory))
|
||||||
|
_ = Directory.CreateDirectory(duplicateDirectory);
|
||||||
|
string successDirectory;
|
||||||
|
if (!_IsXToAPC)
|
||||||
|
successDirectory = string.Empty;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
successDirectory = string.Concat(Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation), @"\ViewerPath");
|
||||||
|
if (!Directory.Exists(successDirectory))
|
||||||
|
_ = Directory.CreateDirectory(successDirectory);
|
||||||
|
}
|
||||||
|
List<Tuple<Shared.Properties.IScopeInfo, string>> tuples = new();
|
||||||
|
string duplicateFile = string.Concat(duplicateDirectory, @"\", Path.GetFileName(reportFullPath));
|
||||||
|
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 logisticsSequenceMemoryDirectory = string.Concat(_MemoryPath, @"\", _EquipmentType, @"\Source\", weekDirectory, @"\", _Logistics.Sequence);
|
||||||
|
if (!Directory.Exists(logisticsSequenceMemoryDirectory))
|
||||||
|
_ = Directory.CreateDirectory(logisticsSequenceMemoryDirectory);
|
||||||
|
if (_IsXToAPC)
|
||||||
|
{
|
||||||
|
if (!isDummyRun && _IsEAFHosted)
|
||||||
|
File.Copy(reportFullPath, duplicateFile, overwrite: true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (_IsXToOpenInsightMetrologyViewer)
|
||||||
|
{
|
||||||
|
WSRequest wsRequest = new(this, _Logistics, descriptions);
|
||||||
|
if (!isDummyRun && _IsEAFHosted)
|
||||||
|
{
|
||||||
|
Tuple<string, WS.Results> wsResults = WS.SendData(_OpenInsightMetrologyViewerAPI, wsRequest);
|
||||||
|
if (!wsResults.Item2.Success)
|
||||||
|
throw new Exception(wsResults.ToString());
|
||||||
|
_Log.Debug(wsResults.Item2.HeaderID);
|
||||||
|
File.WriteAllText(string.Concat(logisticsSequenceMemoryDirectory, @"\", nameof(WS.Results), ".json"), wsResults.Item1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Test test;
|
||||||
|
string lines;
|
||||||
|
Shared.Properties.IScopeInfo scopeInfo;
|
||||||
|
foreach (KeyValuePair<Test, List<Shared.Properties.IDescription>> keyValuePair in tuple.Item2)
|
||||||
|
{
|
||||||
|
test = keyValuePair.Key;
|
||||||
|
//scopeInfo = new ScopeInfo(test);
|
||||||
|
if (!_IsXToOpenInsight)
|
||||||
|
scopeInfo = new ScopeInfo(test, _IqsFile);
|
||||||
|
else
|
||||||
|
scopeInfo = new ScopeInfo(test, _OpenInsightFilePattern);
|
||||||
|
lines = ProcessData.GetLines(this, _Logistics, descriptions);
|
||||||
|
tuples.Add(new Tuple<Shared.Properties.IScopeInfo, string>(scopeInfo, lines));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (_IsXToOpenInsightMetrologyViewerAttachments)
|
||||||
|
{
|
||||||
|
string[] matchDirectories = Shared1567(reportFullPath, tuples);
|
||||||
|
if (!isDummyRun && _IsEAFHosted && !isNotUsedInsightMetrologyViewerAttachments)
|
||||||
|
ProcessData.PostOpenInsightMetrologyViewerAttachments(this, _Logistics, _OpenInsightMetrologyViewerAPI, _LincPDFCFileName, dateTime, logisticsSequenceMemoryDirectory, descriptions, matchDirectories[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!_IsXToOpenInsightMetrologyViewer && !_IsXToOpenInsightMetrologyViewerAttachments)
|
||||||
|
Shared0413(dateTime, isDummyRun, successDirectory, duplicateDirectory, tuples, duplicateFile);
|
||||||
|
}
|
||||||
|
if (_IsXToOpenInsightMetrologyViewerAttachments)
|
||||||
|
{
|
||||||
|
string destinationDirectory;
|
||||||
|
//string destinationDirectory = WriteScopeInfo(_ProgressPath, _Logistics, dateTime, duplicateDirectory, tuples);
|
||||||
|
FileInfo fileInfo = new(reportFullPath);
|
||||||
|
string logisticsSequence = _Logistics.Sequence.ToString();
|
||||||
|
if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime)
|
||||||
|
File.SetLastWriteTime(reportFullPath, fileInfo.CreationTime);
|
||||||
|
string jobIdDirectory = string.Concat(Path.GetDirectoryName(Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation)), @"\", _Logistics.JobID);
|
||||||
|
if (!Directory.Exists(jobIdDirectory))
|
||||||
|
_ = Directory.CreateDirectory(jobIdDirectory);
|
||||||
|
string[] matchDirectories;
|
||||||
|
if (!_IsEAFHosted)
|
||||||
|
matchDirectories = new string[] { Path.GetDirectoryName(Path.GetDirectoryName(reportFullPath)) };
|
||||||
|
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");
|
||||||
|
destinationDirectory = matchDirectories[0];
|
||||||
|
if (isDummyRun)
|
||||||
|
Shared0607(reportFullPath, duplicateDirectory, logisticsSequence, destinationDirectory);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
WSRequest wsRequest = new(this, _Logistics, descriptions);
|
||||||
|
JsonSerializerOptions jsonSerializerOptions = new() { WriteIndented = true };
|
||||||
|
string json = JsonSerializer.Serialize(wsRequest, wsRequest.GetType(), jsonSerializerOptions);
|
||||||
|
if (_IsEAFHosted)
|
||||||
|
Shared1277(reportFullPath, destinationDirectory, logisticsSequence, jobIdDirectory, json);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string jsonFileName = Path.ChangeExtension(reportFullPath, ".json");
|
||||||
|
string historicalText = File.ReadAllText(jsonFileName);
|
||||||
|
if (json != historicalText)
|
||||||
|
throw new Exception("File doesn't match historical!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CallbackIsDummy(string traceDummyFile, List<Tuple<string, string, string, string, int>> tuples, bool fileConnectorConfigurationIncludeSubDirectories, bool includeSubDirectoriesExtra)
|
||||||
|
{
|
||||||
|
int fileCount;
|
||||||
|
string[] files;
|
||||||
|
string monARessource;
|
||||||
|
string checkDirectory;
|
||||||
|
string sourceArchiveFile;
|
||||||
|
string inProcessDirectory;
|
||||||
|
const string site = "sjc";
|
||||||
|
string stateName = string.Concat("Dummy_", _EventName);
|
||||||
|
const string monInURL = "http://moninhttp.sjc.infineon.com/input/text";
|
||||||
|
MonIn monIn = MonIn.GetInstance(monInURL);
|
||||||
|
foreach (Tuple<string, string, string, string, int> item in tuples)
|
||||||
|
{
|
||||||
|
monARessource = item.Item1;
|
||||||
|
sourceArchiveFile = item.Item2;
|
||||||
|
inProcessDirectory = item.Item3;
|
||||||
|
checkDirectory = item.Item4;
|
||||||
|
fileCount = item.Item5;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (fileCount > 0 || string.IsNullOrEmpty(checkDirectory))
|
||||||
|
{
|
||||||
|
File.AppendAllLines(traceDummyFile, new string[] { site, monARessource, stateName, State.Warning.ToString() });
|
||||||
|
_ = monIn.SendStatus(site, monARessource, stateName, State.Warning);
|
||||||
|
for (int i = 1; i < 12; i++)
|
||||||
|
Thread.Sleep(500);
|
||||||
|
}
|
||||||
|
else if (inProcessDirectory == checkDirectory)
|
||||||
|
continue;
|
||||||
|
if (!_IsEAFHosted)
|
||||||
|
continue;
|
||||||
|
if (!File.Exists(sourceArchiveFile))
|
||||||
|
continue;
|
||||||
|
if (!long.TryParse(Path.GetFileNameWithoutExtension(sourceArchiveFile).Replace("x", string.Empty), out long sequence))
|
||||||
|
continue;
|
||||||
|
ZipFile.ExtractToDirectory(sourceArchiveFile, inProcessDirectory);
|
||||||
|
if (fileConnectorConfigurationIncludeSubDirectories && includeSubDirectoriesExtra)
|
||||||
|
checkDirectory = string.Concat(checkDirectory, @"\", sequence);
|
||||||
|
if (fileConnectorConfigurationIncludeSubDirectories)
|
||||||
|
files = Directory.GetFiles(inProcessDirectory, "*", SearchOption.AllDirectories);
|
||||||
|
else
|
||||||
|
files = Directory.GetFiles(inProcessDirectory, "*", SearchOption.TopDirectoryOnly);
|
||||||
|
if (files.Length > 250)
|
||||||
|
throw new Exception("Safety net!");
|
||||||
|
foreach (string file in files)
|
||||||
|
File.SetLastWriteTime(file, new DateTime(sequence));
|
||||||
|
if (!fileConnectorConfigurationIncludeSubDirectories)
|
||||||
|
{
|
||||||
|
foreach (string file in files)
|
||||||
|
File.Move(file, string.Concat(checkDirectory, @"\", Path.GetFileName(file)));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string[] directories = Directory.GetDirectories(inProcessDirectory, "*", SearchOption.AllDirectories);
|
||||||
|
foreach (string directory in directories)
|
||||||
|
_ = Directory.CreateDirectory(string.Concat(checkDirectory, directory.Substring(inProcessDirectory.Length)));
|
||||||
|
foreach (string file in files)
|
||||||
|
File.Move(file, string.Concat(checkDirectory, file.Substring(inProcessDirectory.Length)));
|
||||||
|
}
|
||||||
|
File.AppendAllLines(traceDummyFile, new string[] { site, monARessource, stateName, State.Ok.ToString() });
|
||||||
|
_ = monIn.SendStatus(site, monARessource, stateName, State.Ok);
|
||||||
|
}
|
||||||
|
catch (Exception exception)
|
||||||
|
{
|
||||||
|
string subject = string.Concat("Exception:", _CellInstanceConnectionName);
|
||||||
|
string body = string.Concat(exception.Message, Environment.NewLine, Environment.NewLine, exception.StackTrace);
|
||||||
|
try
|
||||||
|
{ _SMTP.SendHighPriorityEmailMessage(subject, body); }
|
||||||
|
catch (Exception) { }
|
||||||
|
File.AppendAllLines(traceDummyFile, new string[] { site, monARessource, stateName, State.Critical.ToString(), exception.Message, exception.StackTrace });
|
||||||
|
_ = monIn.SendStatus(site, monARessource, stateName, State.Critical);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Callback(object state)
|
||||||
|
{
|
||||||
|
if (!_IsDummy)
|
||||||
|
throw new Exception();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
DateTime dateTime = DateTime.Now;
|
||||||
|
bool check = dateTime.Hour > 7 && dateTime.Hour < 18 && dateTime.DayOfWeek != DayOfWeek.Sunday && dateTime.DayOfWeek != DayOfWeek.Saturday;
|
||||||
|
if (check)
|
||||||
|
{
|
||||||
|
int fileCount;
|
||||||
|
string[] files;
|
||||||
|
string monARessource;
|
||||||
|
string checkDirectory;
|
||||||
|
string sourceArchiveFile;
|
||||||
|
string sourceFileLocation;
|
||||||
|
string inProcessDirectory;
|
||||||
|
string weekOfYear = _Calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
||||||
|
string traceDummyDirectory = string.Concat(Path.GetPathRoot(_TracePath), @"\TracesDummy\", _CellInstanceName, @"\Source\", dateTime.ToString("yyyy"), "___Week_", weekOfYear);
|
||||||
|
if (!Directory.Exists(traceDummyDirectory))
|
||||||
|
_ = Directory.CreateDirectory(traceDummyDirectory);
|
||||||
|
string traceDummyFile = string.Concat(traceDummyDirectory, @"\", dateTime.Ticks, " - ", _CellInstanceName, ".txt");
|
||||||
|
File.AppendAllText(traceDummyFile, string.Empty);
|
||||||
|
List<Tuple<string, string, string, string, int>> tuples = new();
|
||||||
|
string progressDirectory = Path.GetFullPath(string.Concat(_FileConnectorConfiguration.SourceFileLocation, @"\_ Progress"));
|
||||||
|
if (progressDirectory != _ProgressPath || !Directory.Exists(progressDirectory))
|
||||||
|
throw new Exception("Invalid progress path");
|
||||||
|
foreach (KeyValuePair<string, string> keyValuePair in _CellNames)
|
||||||
|
{
|
||||||
|
monARessource = keyValuePair.Key;
|
||||||
|
if (!keyValuePair.Value.Contains('\\'))
|
||||||
|
continue;
|
||||||
|
foreach (string sourceFileFilter in _FileConnectorConfiguration.SourceFileFilter.Split('|'))
|
||||||
|
{
|
||||||
|
if (sourceFileFilter.ToLower().StartsWith(keyValuePair.Value.Replace(@"\", string.Empty)))
|
||||||
|
sourceFileLocation = Path.GetFullPath(_FileConnectorConfiguration.SourceFileLocation);
|
||||||
|
else if (_FileConnectorConfiguration.SourceFileLocation.ToLower().EndsWith(keyValuePair.Value))
|
||||||
|
sourceFileLocation = Path.GetFullPath(_FileConnectorConfiguration.SourceFileLocation);
|
||||||
|
else
|
||||||
|
sourceFileLocation = Path.GetFullPath(string.Concat(_FileConnectorConfiguration.SourceFileLocation, @"\", keyValuePair.Value));
|
||||||
|
sourceArchiveFile = Path.GetFullPath(string.Concat(sourceFileLocation, @"\", sourceFileFilter));
|
||||||
|
if (!File.Exists(sourceArchiveFile))
|
||||||
|
continue;
|
||||||
|
if (!_DummyRuns.ContainsKey(monARessource))
|
||||||
|
_DummyRuns.Add(monARessource, new List<long>());
|
||||||
|
tuples.Add(new Tuple<string, string, string, string, int>(monARessource, sourceFileFilter, sourceFileLocation, sourceArchiveFile, 0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
File.AppendAllLines(traceDummyFile, from l in tuples select l.Item4);
|
||||||
|
if (tuples.Any())
|
||||||
|
{
|
||||||
|
_LastDummyRunIndex += 1;
|
||||||
|
if (_LastDummyRunIndex >= tuples.Count)
|
||||||
|
_LastDummyRunIndex = 0;
|
||||||
|
monARessource = tuples[_LastDummyRunIndex].Item1;
|
||||||
|
string sourceFileFilter = tuples[_LastDummyRunIndex].Item2;
|
||||||
|
sourceFileLocation = tuples[_LastDummyRunIndex].Item3;
|
||||||
|
sourceArchiveFile = tuples[_LastDummyRunIndex].Item4;
|
||||||
|
//fileCount = tuples[_LastDummyRunIndex].Item5;
|
||||||
|
tuples.Clear();
|
||||||
|
if (long.TryParse(Path.GetFileNameWithoutExtension(sourceArchiveFile).Replace("x", string.Empty), out long sequence))
|
||||||
|
{
|
||||||
|
if (!_DummyRuns[monARessource].Contains(sequence))
|
||||||
|
_DummyRuns[monARessource].Add(sequence);
|
||||||
|
inProcessDirectory = string.Concat(progressDirectory, @"\Dummy_in process\", sequence);
|
||||||
|
checkDirectory = inProcessDirectory;
|
||||||
|
if (!Directory.Exists(checkDirectory))
|
||||||
|
_ = Directory.CreateDirectory(checkDirectory);
|
||||||
|
files = Directory.GetFiles(checkDirectory, "*", SearchOption.AllDirectories);
|
||||||
|
fileCount = files.Length;
|
||||||
|
if (files.Any())
|
||||||
|
{
|
||||||
|
if (files.Length > 250)
|
||||||
|
throw new Exception("Safety net!");
|
||||||
|
try
|
||||||
|
{
|
||||||
|
foreach (string file in files)
|
||||||
|
File.Delete(file);
|
||||||
|
}
|
||||||
|
catch (Exception) { }
|
||||||
|
}
|
||||||
|
tuples.Add(new Tuple<string, string, string, string, int>(monARessource, sourceArchiveFile, inProcessDirectory, checkDirectory, fileCount));
|
||||||
|
checkDirectory = sourceFileLocation;
|
||||||
|
files = Directory.GetFiles(checkDirectory, string.Concat("*", sequence, "*"), SearchOption.TopDirectoryOnly);
|
||||||
|
fileCount = files.Length;
|
||||||
|
tuples.Add(new Tuple<string, string, string, string, int>(monARessource, sourceArchiveFile, inProcessDirectory, checkDirectory, fileCount));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (tuples.Any())
|
||||||
|
//CallbackIsDummy(traceDummyFile, tuples, FileConnectorConfiguration.IncludeSubDirectories.Value, includeSubDirectoriesExtra: false);
|
||||||
|
CallbackIsDummy(traceDummyFile, tuples, fileConnectorConfigurationIncludeSubDirectories: true, includeSubDirectoriesExtra: true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception exception)
|
||||||
|
{
|
||||||
|
string subject = string.Concat("Exception:", _CellInstanceConnectionName);
|
||||||
|
string body = string.Concat(exception.Message, Environment.NewLine, Environment.NewLine, exception.StackTrace);
|
||||||
|
try
|
||||||
|
{ _SMTP.SendHighPriorityEmailMessage(subject, body); }
|
||||||
|
catch (Exception) { }
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
TimeSpan timeSpan = new(DateTime.Now.AddSeconds(_FileConnectorConfiguration.FileScanningIntervalInSeconds.Value).Ticks - DateTime.Now.Ticks);
|
||||||
|
_ = _Timer.Change((long)timeSpan.TotalMilliseconds, Timeout.Infinite);
|
||||||
|
}
|
||||||
|
catch (Exception exception)
|
||||||
|
{
|
||||||
|
string subject = string.Concat("Exception:", _CellInstanceConnectionName);
|
||||||
|
string body = string.Concat(exception.Message, Environment.NewLine, Environment.NewLine, exception.StackTrace);
|
||||||
|
try
|
||||||
|
{ _SMTP.SendHighPriorityEmailMessage(subject, body); }
|
||||||
|
catch (Exception) { }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
15
Adaptation/FileHandlers/MET08RESIHGCV/Hyphen.cs
Normal file
15
Adaptation/FileHandlers/MET08RESIHGCV/Hyphen.cs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
namespace Adaptation.FileHandlers.MET08RESIHGCV;
|
||||||
|
|
||||||
|
public enum Hyphen
|
||||||
|
{
|
||||||
|
IsXToOpenInsightMetrologyViewer, //MetrologyWS.SendData(file, string.Concat("http://", serverName, "/api/inbound/MercuryProbe"), headerAttachments);
|
||||||
|
IsXToIQSSi, //NA <d7p1:FileScanningIntervalInSeconds>-361</d7p1:FileScanningIntervalInSeconds>
|
||||||
|
IsXToOpenInsight, //NA <d7p1:FileScanningIntervalInSeconds>-363</d7p1:FileScanningIntervalInSeconds>
|
||||||
|
IsXToOpenInsightMetrologyViewerAttachments, //Site-One
|
||||||
|
IsXToAPC,
|
||||||
|
IsXToSPaCe,
|
||||||
|
IsXToArchive,
|
||||||
|
IsArchive,
|
||||||
|
IsDummy,
|
||||||
|
IsNaEDA
|
||||||
|
}
|
103
Adaptation/FileHandlers/MET08RESIHGCV/ProcessData.cs
Normal file
103
Adaptation/FileHandlers/MET08RESIHGCV/ProcessData.cs
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
using Adaptation.Shared;
|
||||||
|
using Adaptation.Shared.Metrology;
|
||||||
|
using Adaptation.Shared.Properties;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.Json;
|
||||||
|
|
||||||
|
namespace Adaptation.FileHandlers.MET08RESIHGCV;
|
||||||
|
|
||||||
|
public class ProcessData
|
||||||
|
{
|
||||||
|
|
||||||
|
internal static List<Tuple<int, Enum, string>> HyphenTuples => new()
|
||||||
|
{
|
||||||
|
new Tuple<int, Enum, string>(0, Hyphen.IsNaEDA, @"\EC_EDA\Staging\Traces\~\Source"),
|
||||||
|
new Tuple<int, Enum, string>(15, Hyphen.IsXToOpenInsightMetrologyViewer, @"\EC_EAFLog\TracesMES\~\Source"),
|
||||||
|
new Tuple<int, Enum, string>(-36, Hyphen.IsXToIQSSi, @"\EC_SPC_Si\Traces\~\PollPath"),
|
||||||
|
new Tuple<int, Enum, string>(-36, Hyphen.IsXToOpenInsight, @"\\messa01ec.ec.local\APPS\Metrology\~\Source"),
|
||||||
|
new Tuple<int, Enum, string>(36, Hyphen.IsXToOpenInsightMetrologyViewerAttachments, @"\EC_Characterization_Si\In Process\~\Source"),
|
||||||
|
new Tuple<int, Enum, string>(360, Hyphen.IsXToAPC, @"\EC_APC\Staging\Traces\~\PollPath"),
|
||||||
|
new Tuple<int, Enum, string>(-36, Hyphen.IsXToSPaCe, @"\EC_SPC_Si\Traces\~\Source"),
|
||||||
|
new Tuple<int, Enum, string>(180, Hyphen.IsXToArchive, @"\EC_EAFLog\TracesArchive\~\Source"),
|
||||||
|
new Tuple<int, Enum, string>(36, Hyphen.IsArchive, @"\EC_Characterization_Si\Processed")
|
||||||
|
//new Tuple<int, Enum, string>("IsDummy"
|
||||||
|
};
|
||||||
|
|
||||||
|
internal static string GetLines(IFileRead fileRead, Logistics logistics, List<pcl.Description> descriptions)
|
||||||
|
{
|
||||||
|
StringBuilder result = new();
|
||||||
|
if (fileRead is null)
|
||||||
|
{ }
|
||||||
|
if (logistics is null)
|
||||||
|
{ }
|
||||||
|
if (descriptions is null)
|
||||||
|
{ }
|
||||||
|
return result.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Convert the raw data file to parsable file format - in this case from PCL to PDF
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sourceFile">source file to be converted to PDF</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private static string ConvertSourceFileToPdfWithChartData(string lincPDFCFileName, string sourceFile)
|
||||||
|
{
|
||||||
|
string result = Path.ChangeExtension(sourceFile, ".pdf");
|
||||||
|
if (!File.Exists(result))
|
||||||
|
{
|
||||||
|
string arguments = string.Concat("-i \"", sourceFile, "\" -o \"", result, "\"");
|
||||||
|
//string arguments = string.Concat("-dSAFER -dBATCH -dNOPAUSE -dFIXEDMEDIA -dFitPage -dAutoRotatePages=/All -dDEVICEWIDTHPOINTS=792 -dDEVICEHEIGHTPOINTS=612 -sOutputFile=\"", result, "\" -sDEVICE=pdfwrite \"", sourceFile, "\"");
|
||||||
|
Process process = Process.Start(lincPDFCFileName, arguments);
|
||||||
|
//Process process = Process.Start(ghostPCLFileName, arguments);
|
||||||
|
_ = process.WaitForExit(30000);
|
||||||
|
if (!File.Exists(result))
|
||||||
|
throw new Exception("PDF file wasn't created");
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static void PostOpenInsightMetrologyViewerAttachments(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, string lincPDFCFileName, DateTime dateTime, string logisticsSequenceMemoryDirectory, List<pcl.Description> descriptions, string matchDirectory)
|
||||||
|
{
|
||||||
|
if (fileRead is null)
|
||||||
|
{ }
|
||||||
|
if (dateTime == DateTime.MinValue)
|
||||||
|
{ }
|
||||||
|
if (logisticsSequenceMemoryDirectory is null)
|
||||||
|
{ }
|
||||||
|
if (descriptions is null)
|
||||||
|
{ }
|
||||||
|
if (matchDirectory is null)
|
||||||
|
{ }
|
||||||
|
string[] pclFiles = Directory.GetFiles(matchDirectory, "*.pcl", SearchOption.TopDirectoryOnly);
|
||||||
|
if (pclFiles.Length != 1)
|
||||||
|
throw new Exception("Invalid source file count!");
|
||||||
|
string wsResultsMemoryFile = string.Concat(logisticsSequenceMemoryDirectory, @"\", nameof(WS.Results), ".json");
|
||||||
|
if (!File.Exists(wsResultsMemoryFile))
|
||||||
|
throw new Exception(string.Concat("Memory file <", wsResultsMemoryFile, "> doesn't exist!"));
|
||||||
|
string json = File.ReadAllText(wsResultsMemoryFile);
|
||||||
|
WS.Results metrologyWSRequest = JsonSerializer.Deserialize<WS.Results>(json);
|
||||||
|
long wsResultsHeaderID = metrologyWSRequest.HeaderID;
|
||||||
|
List<string> pdfFiles = new();
|
||||||
|
pdfFiles.AddRange(Directory.GetFiles(matchDirectory, "*.pdf_old", SearchOption.TopDirectoryOnly));
|
||||||
|
foreach (string pdfFile in pdfFiles)
|
||||||
|
File.Delete(pdfFile);
|
||||||
|
pdfFiles.Clear();
|
||||||
|
pdfFiles.AddRange(Directory.GetFiles(matchDirectory, "*.pdf", SearchOption.TopDirectoryOnly));
|
||||||
|
foreach (string pdfFile in pdfFiles)
|
||||||
|
File.Move(pdfFile, Path.ChangeExtension(pdfFile, ".pdf_old"));
|
||||||
|
pdfFiles.Clear();
|
||||||
|
foreach (string pclFile in pclFiles.OrderBy(l => l))
|
||||||
|
pdfFiles.Add(ConvertSourceFileToPdfWithChartData(lincPDFCFileName, pclFile));
|
||||||
|
if (pdfFiles.Count == 0)
|
||||||
|
throw new Exception("Invalid *.pdf file count!");
|
||||||
|
List<WS.Attachment> headerAttachments = new()
|
||||||
|
{ new WS.Attachment(descriptions[0].HeaderUniqueId, "Data.pdf", pdfFiles[0]) };
|
||||||
|
WS.AttachFiles(openInsightMetrologyViewerAPI, wsResultsHeaderID, headerAttachments, dataAttachments: null);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
158
Adaptation/FileHandlers/MET08RESIHGCV/WSRequest.cs
Normal file
158
Adaptation/FileHandlers/MET08RESIHGCV/WSRequest.cs
Normal file
@ -0,0 +1,158 @@
|
|||||||
|
using Adaptation.Shared;
|
||||||
|
using Adaptation.Shared.Properties;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace Adaptation.FileHandlers.MET08RESIHGCV;
|
||||||
|
|
||||||
|
public class WSRequest
|
||||||
|
{
|
||||||
|
public bool SentToMetrology { get; set; }
|
||||||
|
public bool SentToSPC { get; set; }
|
||||||
|
//
|
||||||
|
|
||||||
|
public string Area { get; set; }
|
||||||
|
public string Ccomp { get; set; }
|
||||||
|
public string CellName { get; set; }
|
||||||
|
public string CondType { get; set; }
|
||||||
|
public string Date { get; set; }
|
||||||
|
public string FlatZMean { get; set; }
|
||||||
|
public string FlatZRadialGradient { get; set; }
|
||||||
|
public string FlatZStdDev { get; set; }
|
||||||
|
public string Folder { get; set; }
|
||||||
|
public string GLimit { get; set; }
|
||||||
|
public string GradeMean { get; set; }
|
||||||
|
public string GradeRadialGradient { get; set; }
|
||||||
|
public string GradeStdDev { get; set; }
|
||||||
|
public string Id { get; set; }
|
||||||
|
public string Layer { get; set; }
|
||||||
|
public string Lot { get; set; }
|
||||||
|
public string Model { get; set; }
|
||||||
|
public string NAvgMean { get; set; }
|
||||||
|
public string NAvgRadialGradient { get; set; }
|
||||||
|
public string NAvgStdDev { get; set; }
|
||||||
|
public string NslMean { get; set; }
|
||||||
|
public string NslRadialGradient { get; set; }
|
||||||
|
public string NslStdDev { get; set; }
|
||||||
|
public string Operator { get; set; }
|
||||||
|
public string PSN { get; set; }
|
||||||
|
public string Pattern { get; set; }
|
||||||
|
public string PhaseMean { get; set; }
|
||||||
|
public string PhaseRadialGradient { get; set; }
|
||||||
|
public string PhaseStdDev { get; set; }
|
||||||
|
public string Plan { get; set; }
|
||||||
|
public string RDS { get; set; }
|
||||||
|
public string RampRate { get; set; }
|
||||||
|
public string Reactor { get; set; }
|
||||||
|
public string RhoAvgMean { get; set; }
|
||||||
|
public string RhoAvgRadialGradient { get; set; }
|
||||||
|
public string RhoAvgStdDev { get; set; }
|
||||||
|
public string RhoMethod { get; set; }
|
||||||
|
public string RhoslMean { get; set; }
|
||||||
|
public string RhoslRadialGradient { get; set; }
|
||||||
|
public string RhoslStdDev { get; set; }
|
||||||
|
public string RsMean { get; set; }
|
||||||
|
public string RsRadialGradient { get; set; }
|
||||||
|
public string RsStdDev { get; set; }
|
||||||
|
public string SetupFile { get; set; }
|
||||||
|
public string StartVoltage { get; set; }
|
||||||
|
public string StopVoltage { get; set; }
|
||||||
|
public string UniqueId { get; set; }
|
||||||
|
public string VdMean { get; set; }
|
||||||
|
public string VdRadialGradient { get; set; }
|
||||||
|
public string VdStdDev { get; set; }
|
||||||
|
public string Wafer { get; set; }
|
||||||
|
public string WaferSize { get; set; }
|
||||||
|
public string Zone { get; set; }
|
||||||
|
public List<pcl.Detail> Details { get; protected set; }
|
||||||
|
|
||||||
|
[Obsolete("For json")] public WSRequest() { }
|
||||||
|
|
||||||
|
internal WSRequest(IFileRead fileRead, Logistics logistics, List<pcl.Description> descriptions)
|
||||||
|
{
|
||||||
|
if (fileRead is null)
|
||||||
|
{ }
|
||||||
|
Id = string.Empty;
|
||||||
|
Details = new List<pcl.Detail>();
|
||||||
|
CellName = logistics.MesEntity;
|
||||||
|
pcl.Description x = descriptions[0];
|
||||||
|
//Header
|
||||||
|
{
|
||||||
|
Area = x.Area;
|
||||||
|
Ccomp = x.Ccomp;
|
||||||
|
CondType = x.CondType;
|
||||||
|
Date = x.Date;
|
||||||
|
FlatZMean = x.FlatZMean;
|
||||||
|
FlatZRadialGradient = x.FlatZRadialGradient;
|
||||||
|
FlatZStdDev = x.FlatZStdDev;
|
||||||
|
Folder = x.Folder;
|
||||||
|
GLimit = x.GLimit;
|
||||||
|
GradeMean = x.GradeMean;
|
||||||
|
GradeRadialGradient = x.GradeRadialGradient;
|
||||||
|
GradeStdDev = x.GradeStdDev;
|
||||||
|
Operator = x.Employee;
|
||||||
|
Layer = x.Layer;
|
||||||
|
Lot = x.Lot;
|
||||||
|
Model = x.Model;
|
||||||
|
NAvgMean = x.NAvgMean;
|
||||||
|
NAvgRadialGradient = x.NAvgRadialGradient;
|
||||||
|
NAvgStdDev = x.NAvgStdDev;
|
||||||
|
NslMean = x.NslMean;
|
||||||
|
NslRadialGradient = x.NslRadialGradient;
|
||||||
|
NslStdDev = x.NslStdDev;
|
||||||
|
PSN = x.PSN;
|
||||||
|
Pattern = x.Pattern;
|
||||||
|
PhaseMean = x.PhaseMean;
|
||||||
|
PhaseRadialGradient = x.PhaseRadialGradient;
|
||||||
|
PhaseStdDev = x.PhaseStdDev;
|
||||||
|
Plan = x.Plan;
|
||||||
|
RDS = x.RDS;
|
||||||
|
RampRate = x.RampRate;
|
||||||
|
Reactor = x.Reactor;
|
||||||
|
RhoAvgMean = x.RhoAvgMean;
|
||||||
|
RhoAvgRadialGradient = x.RhoAvgRadialGradient;
|
||||||
|
RhoAvgStdDev = x.RhoAvgStdDev;
|
||||||
|
RhoMethod = x.RhoMethod;
|
||||||
|
RhoslMean = x.RhoslMean;
|
||||||
|
RhoslRadialGradient = x.RhoslRadialGradient;
|
||||||
|
RhoslStdDev = x.RhoslStdDev;
|
||||||
|
RsMean = x.RsMean;
|
||||||
|
RsRadialGradient = x.RsRadialGradient;
|
||||||
|
RsStdDev = x.RsStdDev;
|
||||||
|
SetupFile = x.SetupFile;
|
||||||
|
StartVoltage = x.StartVoltage;
|
||||||
|
StopVoltage = x.StopVoltage;
|
||||||
|
UniqueId = x.UniqueId;
|
||||||
|
VdMean = x.VdMean;
|
||||||
|
VdRadialGradient = x.VdRadialGradient;
|
||||||
|
VdStdDev = x.VdStdDev;
|
||||||
|
Wafer = x.Wafer;
|
||||||
|
WaferSize = x.WaferSize;
|
||||||
|
Zone = x.Zone;
|
||||||
|
}
|
||||||
|
pcl.Detail detail;
|
||||||
|
foreach (pcl.Description description in descriptions)
|
||||||
|
{
|
||||||
|
detail = new pcl.Detail
|
||||||
|
{
|
||||||
|
FlatZ = description.FlatZ,
|
||||||
|
Grade = description.Grade,
|
||||||
|
HeaderUniqueId = description.HeaderUniqueId,
|
||||||
|
NAvg = description.NAvg,
|
||||||
|
Nsl = description.Nsl,
|
||||||
|
Phase = description.Phase,
|
||||||
|
RhoAvg = description.RhoAvg,
|
||||||
|
Rhosl = description.Rhosl,
|
||||||
|
UniqueId = description.UniqueId,
|
||||||
|
Vd = description.Vd
|
||||||
|
};
|
||||||
|
Details.Add(detail);
|
||||||
|
}
|
||||||
|
if (Date is null)
|
||||||
|
Date = logistics.DateTimeFromSequence.ToString();
|
||||||
|
if (UniqueId is null && Details.Any())
|
||||||
|
UniqueId = Details[0].HeaderUniqueId;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
140
Adaptation/FileHandlers/ToArchive/FileRead.cs
Normal file
140
Adaptation/FileHandlers/ToArchive/FileRead.cs
Normal file
@ -0,0 +1,140 @@
|
|||||||
|
using Adaptation.Eaf.Management.ConfigurationData.CellAutomation;
|
||||||
|
using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration;
|
||||||
|
using Adaptation.Shared;
|
||||||
|
using Adaptation.Shared.Duplicator;
|
||||||
|
using Adaptation.Shared.Methods;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text.Json;
|
||||||
|
|
||||||
|
namespace Adaptation.FileHandlers.ToArchive;
|
||||||
|
|
||||||
|
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) :
|
||||||
|
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted)
|
||||||
|
{
|
||||||
|
_MinFileLength = 10;
|
||||||
|
_NullData = string.Empty;
|
||||||
|
_Logistics = new Logistics(this);
|
||||||
|
if (_FileParameter is null)
|
||||||
|
throw new Exception(cellInstanceConnectionName);
|
||||||
|
if (_ModelObjectParameterDefinitions is null)
|
||||||
|
throw new Exception(cellInstanceConnectionName);
|
||||||
|
if (!_IsDuplicator)
|
||||||
|
throw new Exception(cellInstanceConnectionName);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception)
|
||||||
|
{
|
||||||
|
bool isErrorFile = exception is not null;
|
||||||
|
if (!isErrorFile && !string.IsNullOrEmpty(_Logistics.ReportFullPath))
|
||||||
|
{
|
||||||
|
FileInfo fileInfo = new(_Logistics.ReportFullPath);
|
||||||
|
if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime)
|
||||||
|
File.SetLastWriteTime(_Logistics.ReportFullPath, fileInfo.CreationTime);
|
||||||
|
}
|
||||||
|
Move(extractResults, exception);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
||||||
|
|
||||||
|
string IFileRead.GetEventDescription()
|
||||||
|
{
|
||||||
|
string result = _Description.GetEventDescription();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<string> IFileRead.GetHeaderNames()
|
||||||
|
{
|
||||||
|
List<string> results = _Description.GetHeaderNames();
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
string[] IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, string to, string from, string resolvedFileLocation, Exception exception)
|
||||||
|
{
|
||||||
|
string[] results = Move(extractResults, to, from, resolvedFileLocation, exception);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
JsonProperty[] IFileRead.GetDefault()
|
||||||
|
{
|
||||||
|
JsonProperty[] results = _Description.GetDefault(this, _Logistics);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
Dictionary<string, string> IFileRead.GetDisplayNamesJsonElement()
|
||||||
|
{
|
||||||
|
Dictionary<string, string> results = _Description.GetDisplayNamesJsonElement(this);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<IDescription> IFileRead.GetDescriptions(IFileRead fileRead, List<Test> tests, IProcessData processData)
|
||||||
|
{
|
||||||
|
List<IDescription> results = _Description.GetDescriptions(fileRead, _Logistics, tests, processData);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> IFileRead.GetExtractResult(string reportFullPath, string eventName)
|
||||||
|
{
|
||||||
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
|
if (string.IsNullOrEmpty(eventName))
|
||||||
|
throw new Exception();
|
||||||
|
_ReportFullPath = reportFullPath;
|
||||||
|
DateTime dateTime = DateTime.Now;
|
||||||
|
results = GetExtractResult(reportFullPath, dateTime);
|
||||||
|
if (results.Item3 is null)
|
||||||
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(results.Item1, Array.Empty<Test>(), JsonSerializer.Deserialize<JsonElement[]>("[]"), results.Item4);
|
||||||
|
if (results.Item3.Length > 0 && _IsEAFHosted)
|
||||||
|
WritePDSF(this, results.Item3);
|
||||||
|
UpdateLastTicksDuration(DateTime.Now.Ticks - dateTime.Ticks);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> IFileRead.ReExtract()
|
||||||
|
{
|
||||||
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
|
List<string> headerNames = _Description.GetHeaderNames();
|
||||||
|
Dictionary<string, string> keyValuePairs = _Description.GetDisplayNamesJsonElement(this);
|
||||||
|
results = ReExtract(this, headerNames, keyValuePairs);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
void IFileRead.CheckTests(Test[] tests, bool extra)
|
||||||
|
{
|
||||||
|
if (_Description is not Description)
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
|
||||||
|
void IFileRead.Callback(object state) => throw new Exception(string.Concat("Not ", nameof(_IsDuplicator)));
|
||||||
|
|
||||||
|
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>());
|
||||||
|
_Logistics = new Logistics(this, reportFullPath, useSplitForMID: true);
|
||||||
|
SetFileParameterLotIDToLogisticsMID();
|
||||||
|
|
||||||
|
string[] segments = Path.GetFileNameWithoutExtension(reportFullPath).Split('_');
|
||||||
|
string duplicateDirectory = string.Concat(_FileConnectorConfiguration.TargetFileLocation, @"\", segments[0]);
|
||||||
|
if (segments.Length > 2)
|
||||||
|
duplicateDirectory = string.Concat(duplicateDirectory, @"-", segments[2]);
|
||||||
|
if (!Directory.Exists(duplicateDirectory))
|
||||||
|
_ = Directory.CreateDirectory(duplicateDirectory);
|
||||||
|
|
||||||
|
string logisticsSequence = _Logistics.Sequence.ToString();
|
||||||
|
bool isDummyRun = _DummyRuns.Any() && _DummyRuns.ContainsKey(_Logistics.JobID) && _DummyRuns[_Logistics.JobID].Any() && (from l in _DummyRuns[_Logistics.JobID] where l == _Logistics.Sequence select 1).Any();
|
||||||
|
|
||||||
|
List<Tuple<Shared.Properties.IScopeInfo, string>> tuples = new();
|
||||||
|
|
||||||
|
string destinationDirectory = WriteScopeInfo(_ProgressPath, _Logistics, dateTime, duplicateDirectory, tuples);
|
||||||
|
if (isDummyRun)
|
||||||
|
Shared0607(reportFullPath, duplicateDirectory, logisticsSequence, destinationDirectory);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
437
Adaptation/FileHandlers/pcl/Description.cs
Normal file
437
Adaptation/FileHandlers/pcl/Description.cs
Normal file
@ -0,0 +1,437 @@
|
|||||||
|
using Adaptation.Shared;
|
||||||
|
using Adaptation.Shared.Methods;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text.Json;
|
||||||
|
|
||||||
|
namespace Adaptation.FileHandlers.pcl;
|
||||||
|
|
||||||
|
public class Description : IDescription, Shared.Properties.IDescription
|
||||||
|
{
|
||||||
|
|
||||||
|
public int Test { get; set; }
|
||||||
|
public int Count { get; set; }
|
||||||
|
public int Index { get; set; }
|
||||||
|
//
|
||||||
|
public string EventName { get; set; }
|
||||||
|
public string NullData { get; set; }
|
||||||
|
public string JobID { get; set; }
|
||||||
|
public string Sequence { get; set; }
|
||||||
|
public string MesEntity { get; set; }
|
||||||
|
public string ReportFullPath { get; set; }
|
||||||
|
public string ProcessJobID { get; set; }
|
||||||
|
public string MID { get; set; }
|
||||||
|
//
|
||||||
|
public string Date { get; set; }
|
||||||
|
public string Employee { get; set; }
|
||||||
|
public string Lot { get; set; }
|
||||||
|
public string PSN { get; set; }
|
||||||
|
public string Reactor { get; set; }
|
||||||
|
public string Recipe { get; set; }
|
||||||
|
//
|
||||||
|
public string Area { get; set; }
|
||||||
|
public string Folder { get; set; }
|
||||||
|
public string HeaderUniqueId { get; set; }
|
||||||
|
public string Id { get; set; }
|
||||||
|
public string Layer { get; set; }
|
||||||
|
public string Model { get; set; }
|
||||||
|
public string Pattern { get; set; }
|
||||||
|
public string Phase { get; set; }
|
||||||
|
public string Plan { get; set; }
|
||||||
|
public string RampRate { get; set; }
|
||||||
|
public string RDS { get; set; }
|
||||||
|
public string SetupFile { get; set; }
|
||||||
|
public string StartVoltage { get; set; }
|
||||||
|
public string StopVoltage { get; set; }
|
||||||
|
public string UniqueId { get; set; }
|
||||||
|
public string Wafer { get; set; }
|
||||||
|
public string WaferSize { get; set; }
|
||||||
|
public string Zone { get; set; }
|
||||||
|
//
|
||||||
|
public string Ccomp { get; set; }
|
||||||
|
public string CondType { get; set; }
|
||||||
|
public string FlatZ { get; set; }
|
||||||
|
public string FlatZMean { get; set; }
|
||||||
|
public string FlatZRadialGradient { get; set; }
|
||||||
|
public string FlatZStdDev { get; set; }
|
||||||
|
public string GLimit { get; set; }
|
||||||
|
public string Grade { get; set; }
|
||||||
|
public string GradeMean { get; set; }
|
||||||
|
public string GradeRadialGradient { get; set; }
|
||||||
|
public string GradeStdDev { get; set; }
|
||||||
|
public string NAvg { get; set; }
|
||||||
|
public string NAvgMean { get; set; }
|
||||||
|
public string NAvgRadialGradient { get; set; }
|
||||||
|
public string NAvgStdDev { get; set; }
|
||||||
|
public string Nsl { get; set; }
|
||||||
|
public string NslMean { get; set; }
|
||||||
|
public string NslRadialGradient { get; set; }
|
||||||
|
public string NslStdDev { get; set; }
|
||||||
|
public string PhaseMean { get; set; }
|
||||||
|
public string PhaseRadialGradient { get; set; }
|
||||||
|
public string PhaseStdDev { get; set; }
|
||||||
|
public string RhoAvg { get; set; }
|
||||||
|
public string RhoAvgMean { get; set; }
|
||||||
|
public string RhoAvgRadialGradient { get; set; }
|
||||||
|
public string RhoAvgStdDev { get; set; }
|
||||||
|
public string RhoMethod { get; set; }
|
||||||
|
public string Rhosl { get; set; }
|
||||||
|
public string RhoslMean { get; set; }
|
||||||
|
public string RhoslRadialGradient { get; set; }
|
||||||
|
public string RhoslStdDev { get; set; }
|
||||||
|
public string RsMean { get; set; }
|
||||||
|
public string RsRadialGradient { get; set; }
|
||||||
|
public string RsStdDev { get; set; }
|
||||||
|
public string Vd { get; set; }
|
||||||
|
public string VdMean { get; set; }
|
||||||
|
public string VdRadialGradient { get; set; }
|
||||||
|
public string VdStdDev { get; set; }
|
||||||
|
|
||||||
|
string IDescription.GetEventDescription() => "File Has been read and parsed";
|
||||||
|
|
||||||
|
List<string> IDescription.GetNames(IFileRead fileRead, Logistics logistics)
|
||||||
|
{
|
||||||
|
List<string> results = new();
|
||||||
|
IDescription description = GetDefault(fileRead, logistics);
|
||||||
|
string json = JsonSerializer.Serialize(description, description.GetType());
|
||||||
|
object @object = JsonSerializer.Deserialize<object>(json);
|
||||||
|
if (@object is not JsonElement jsonElement)
|
||||||
|
throw new Exception();
|
||||||
|
foreach (JsonProperty jsonProperty in jsonElement.EnumerateObject())
|
||||||
|
results.Add(jsonProperty.Name);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<string> IDescription.GetDetailNames()
|
||||||
|
{
|
||||||
|
List<string> results = new()
|
||||||
|
{
|
||||||
|
nameof(Area),
|
||||||
|
nameof(Folder),
|
||||||
|
nameof(HeaderUniqueId),
|
||||||
|
nameof(Id),
|
||||||
|
nameof(Layer),
|
||||||
|
nameof(Model),
|
||||||
|
nameof(Pattern),
|
||||||
|
nameof(Phase),
|
||||||
|
nameof(Plan),
|
||||||
|
nameof(RampRate),
|
||||||
|
nameof(RDS),
|
||||||
|
nameof(SetupFile),
|
||||||
|
nameof(StartVoltage),
|
||||||
|
nameof(StopVoltage),
|
||||||
|
nameof(UniqueId),
|
||||||
|
nameof(Wafer),
|
||||||
|
nameof(WaferSize),
|
||||||
|
nameof(Zone)
|
||||||
|
};
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<string> IDescription.GetHeaderNames()
|
||||||
|
{
|
||||||
|
List<string> results = new()
|
||||||
|
{
|
||||||
|
nameof(Date),
|
||||||
|
nameof(Employee),
|
||||||
|
nameof(Lot),
|
||||||
|
nameof(PSN),
|
||||||
|
nameof(Reactor),
|
||||||
|
nameof(Recipe)
|
||||||
|
};
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
IDescription IDescription.GetDisplayNames()
|
||||||
|
{
|
||||||
|
Description result = GetDisplayNames();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<string> IDescription.GetParameterNames()
|
||||||
|
{
|
||||||
|
List<string> results = new()
|
||||||
|
{
|
||||||
|
nameof(Ccomp),
|
||||||
|
nameof(CondType),
|
||||||
|
nameof(FlatZ),
|
||||||
|
nameof(FlatZMean),
|
||||||
|
nameof(FlatZRadialGradient),
|
||||||
|
nameof(FlatZStdDev),
|
||||||
|
nameof(GLimit),
|
||||||
|
nameof(Grade),
|
||||||
|
nameof(GradeMean),
|
||||||
|
nameof(GradeRadialGradient),
|
||||||
|
nameof(GradeStdDev),
|
||||||
|
nameof(NAvg),
|
||||||
|
nameof(NAvgMean),
|
||||||
|
nameof(NAvgRadialGradient),
|
||||||
|
nameof(NAvgStdDev),
|
||||||
|
nameof(Nsl),
|
||||||
|
nameof(NslMean),
|
||||||
|
nameof(NslRadialGradient),
|
||||||
|
nameof(NslStdDev),
|
||||||
|
nameof(PhaseMean),
|
||||||
|
nameof(PhaseRadialGradient),
|
||||||
|
nameof(PhaseStdDev),
|
||||||
|
nameof(RhoAvg),
|
||||||
|
nameof(RhoAvgMean),
|
||||||
|
nameof(RhoAvgRadialGradient),
|
||||||
|
nameof(RhoAvgStdDev),
|
||||||
|
nameof(RhoMethod),
|
||||||
|
nameof(Rhosl),
|
||||||
|
nameof(RhoslMean),
|
||||||
|
nameof(RhoslRadialGradient),
|
||||||
|
nameof(RhoslStdDev),
|
||||||
|
nameof(RsMean),
|
||||||
|
nameof(RsRadialGradient),
|
||||||
|
nameof(RsStdDev),
|
||||||
|
nameof(Vd),
|
||||||
|
nameof(VdMean),
|
||||||
|
nameof(VdRadialGradient),
|
||||||
|
nameof(VdStdDev)
|
||||||
|
};
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
JsonProperty[] IDescription.GetDefault(IFileRead fileRead, Logistics logistics)
|
||||||
|
{
|
||||||
|
JsonProperty[] results;
|
||||||
|
IDescription description = GetDefault(fileRead, logistics);
|
||||||
|
string json = JsonSerializer.Serialize(description, description.GetType());
|
||||||
|
object @object = JsonSerializer.Deserialize<object>(json);
|
||||||
|
results = ((JsonElement)@object).EnumerateObject().ToArray();
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<string> IDescription.GetPairedParameterNames()
|
||||||
|
{
|
||||||
|
List<string> results = new();
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<string> IDescription.GetIgnoreParameterNames(Test test)
|
||||||
|
{
|
||||||
|
List<string> results = new();
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
IDescription IDescription.GetDefaultDescription(IFileRead fileRead, Logistics logistics)
|
||||||
|
{
|
||||||
|
Description result = GetDefault(fileRead, logistics);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
Dictionary<string, string> IDescription.GetDisplayNamesJsonElement(IFileRead fileRead)
|
||||||
|
{
|
||||||
|
Dictionary<string, string> results = new();
|
||||||
|
IDescription description = GetDisplayNames();
|
||||||
|
string json = JsonSerializer.Serialize(description, description.GetType());
|
||||||
|
JsonElement jsonElement = JsonSerializer.Deserialize<JsonElement>(json);
|
||||||
|
foreach (JsonProperty jsonProperty in jsonElement.EnumerateObject())
|
||||||
|
{
|
||||||
|
if (!results.ContainsKey(jsonProperty.Name))
|
||||||
|
results.Add(jsonProperty.Name, string.Empty);
|
||||||
|
if (jsonProperty.Value is JsonElement jsonPropertyValue)
|
||||||
|
results[jsonProperty.Name] = jsonPropertyValue.ToString();
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<IDescription> IDescription.GetDescriptions(IFileRead fileRead, Logistics logistics, List<Test> tests, IProcessData iProcessData)
|
||||||
|
{
|
||||||
|
List<IDescription> results = new();
|
||||||
|
if (iProcessData is null || !iProcessData.Details.Any() || iProcessData is not ProcessData processData)
|
||||||
|
results.Add(GetDefault(fileRead, logistics));
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string nullData;
|
||||||
|
Description description;
|
||||||
|
object configDataNullData = fileRead.NullData;
|
||||||
|
if (configDataNullData is null)
|
||||||
|
nullData = string.Empty;
|
||||||
|
else
|
||||||
|
nullData = configDataNullData.ToString();
|
||||||
|
for (int i = 0; i < iProcessData.Details.Count; i++)
|
||||||
|
{
|
||||||
|
if (iProcessData.Details[i] is not Detail detail)
|
||||||
|
continue;
|
||||||
|
description = new Description
|
||||||
|
{
|
||||||
|
Test = (int)tests[i],
|
||||||
|
Count = tests.Count,
|
||||||
|
Index = i,
|
||||||
|
//
|
||||||
|
EventName = fileRead.EventName,
|
||||||
|
NullData = nullData,
|
||||||
|
JobID = fileRead.CellInstanceName,
|
||||||
|
Sequence = logistics.Sequence.ToString(),
|
||||||
|
MesEntity = logistics.MesEntity,
|
||||||
|
ReportFullPath = logistics.ReportFullPath,
|
||||||
|
ProcessJobID = logistics.ProcessJobID,
|
||||||
|
MID = logistics.MID,
|
||||||
|
//
|
||||||
|
Date = processData.Date,
|
||||||
|
Employee = processData.Employee,
|
||||||
|
Lot = processData.Lot,
|
||||||
|
PSN = processData.PSN,
|
||||||
|
Reactor = processData.Reactor,
|
||||||
|
Recipe = string.Empty,
|
||||||
|
//
|
||||||
|
Area = processData.Area,
|
||||||
|
Folder = processData.Folder,
|
||||||
|
HeaderUniqueId = detail.UniqueId,
|
||||||
|
Id = string.Empty,
|
||||||
|
Layer = processData.Layer,
|
||||||
|
Model = processData.Model,
|
||||||
|
Pattern = processData.Pattern,
|
||||||
|
Phase = detail.Phase,
|
||||||
|
Plan = processData.Plan,
|
||||||
|
RampRate = processData.RampRate,
|
||||||
|
RDS = processData.RDS,
|
||||||
|
SetupFile = processData.SetupFile,
|
||||||
|
StartVoltage = processData.StartVoltage,
|
||||||
|
StopVoltage = processData.StopVoltage,
|
||||||
|
UniqueId = detail.UniqueId,
|
||||||
|
Wafer = processData.Wafer,
|
||||||
|
WaferSize = processData.WaferSize,
|
||||||
|
Zone = processData.Zone,
|
||||||
|
//
|
||||||
|
Ccomp = processData.Ccomp,
|
||||||
|
CondType = processData.CondType,
|
||||||
|
FlatZ = detail.FlatZ,
|
||||||
|
FlatZMean = processData.FlatZMean,
|
||||||
|
FlatZRadialGradient = processData.FlatZRadialGradient,
|
||||||
|
FlatZStdDev = processData.FlatZStdDev,
|
||||||
|
GLimit = processData.GLimit,
|
||||||
|
Grade = detail.Grade,
|
||||||
|
GradeMean = processData.GradeMean,
|
||||||
|
GradeRadialGradient = processData.GradeRadialGradient,
|
||||||
|
GradeStdDev = processData.GradeStdDev,
|
||||||
|
NAvg = detail.NAvg,
|
||||||
|
NAvgMean = processData.NAvgMean,
|
||||||
|
NAvgRadialGradient = processData.NAvgRadialGradient,
|
||||||
|
NAvgStdDev = processData.NAvgStdDev,
|
||||||
|
Nsl = detail.Nsl,
|
||||||
|
NslMean = processData.NslMean,
|
||||||
|
NslRadialGradient = processData.NslRadialGradient,
|
||||||
|
NslStdDev = processData.NslStdDev,
|
||||||
|
PhaseMean = processData.PhaseMean,
|
||||||
|
PhaseRadialGradient = processData.PhaseRadialGradient,
|
||||||
|
PhaseStdDev = processData.PhaseStdDev,
|
||||||
|
RhoAvg = detail.RhoAvg,
|
||||||
|
RhoAvgMean = processData.RhoAvgMean,
|
||||||
|
RhoAvgRadialGradient = processData.RhoAvgRadialGradient,
|
||||||
|
RhoAvgStdDev = processData.RhoAvgStdDev,
|
||||||
|
RhoMethod = processData.RhoMethod,
|
||||||
|
Rhosl = detail.Rhosl,
|
||||||
|
RhoslMean = processData.RhoslMean,
|
||||||
|
RhoslRadialGradient = processData.RhoslRadialGradient,
|
||||||
|
RhoslStdDev = processData.RhoslStdDev,
|
||||||
|
RsMean = processData.RsMean,
|
||||||
|
RsRadialGradient = processData.RsRadialGradient,
|
||||||
|
RsStdDev = processData.RsStdDev,
|
||||||
|
Vd = detail.Vd,
|
||||||
|
VdMean = processData.VdMean,
|
||||||
|
VdRadialGradient = processData.VdRadialGradient,
|
||||||
|
VdStdDev = processData.VdStdDev
|
||||||
|
};
|
||||||
|
results.Add(description);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Description GetDisplayNames()
|
||||||
|
{
|
||||||
|
Description result = new();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Description GetDefault(IFileRead fileRead, Logistics logistics)
|
||||||
|
{
|
||||||
|
Description result = new()
|
||||||
|
{
|
||||||
|
Test = -1,
|
||||||
|
Count = 0,
|
||||||
|
Index = -1,
|
||||||
|
//
|
||||||
|
EventName = fileRead.EventName,
|
||||||
|
NullData = fileRead.NullData,
|
||||||
|
JobID = fileRead.CellInstanceName,
|
||||||
|
Sequence = logistics.Sequence.ToString(),
|
||||||
|
MesEntity = fileRead.MesEntity,
|
||||||
|
ReportFullPath = logistics.ReportFullPath,
|
||||||
|
ProcessJobID = logistics.ProcessJobID,
|
||||||
|
MID = logistics.MID,
|
||||||
|
//
|
||||||
|
Date = nameof(Date),
|
||||||
|
Employee = nameof(Employee),
|
||||||
|
Lot = nameof(Lot),
|
||||||
|
PSN = nameof(PSN),
|
||||||
|
Reactor = nameof(Reactor),
|
||||||
|
Recipe = nameof(Recipe),
|
||||||
|
//
|
||||||
|
Area = nameof(Area),
|
||||||
|
Folder = nameof(Folder),
|
||||||
|
HeaderUniqueId = nameof(HeaderUniqueId),
|
||||||
|
Id = nameof(Id),
|
||||||
|
Layer = nameof(Layer),
|
||||||
|
Model = nameof(Model),
|
||||||
|
Pattern = nameof(Pattern),
|
||||||
|
Phase = nameof(Phase),
|
||||||
|
Plan = nameof(Plan),
|
||||||
|
RampRate = nameof(RampRate),
|
||||||
|
RDS = nameof(RDS),
|
||||||
|
SetupFile = nameof(SetupFile),
|
||||||
|
StartVoltage = nameof(StartVoltage),
|
||||||
|
StopVoltage = nameof(StopVoltage),
|
||||||
|
UniqueId = nameof(UniqueId),
|
||||||
|
Wafer = nameof(Wafer),
|
||||||
|
WaferSize = nameof(WaferSize),
|
||||||
|
Zone = nameof(Zone),
|
||||||
|
//
|
||||||
|
Ccomp = nameof(Ccomp),
|
||||||
|
CondType = nameof(CondType),
|
||||||
|
FlatZ = nameof(FlatZ),
|
||||||
|
FlatZMean = nameof(FlatZMean),
|
||||||
|
FlatZRadialGradient = nameof(FlatZRadialGradient),
|
||||||
|
FlatZStdDev = nameof(FlatZStdDev),
|
||||||
|
GLimit = nameof(GLimit),
|
||||||
|
Grade = nameof(Grade),
|
||||||
|
GradeMean = nameof(GradeMean),
|
||||||
|
GradeRadialGradient = nameof(GradeRadialGradient),
|
||||||
|
GradeStdDev = nameof(GradeStdDev),
|
||||||
|
NAvg = nameof(NAvg),
|
||||||
|
NAvgMean = nameof(NAvgMean),
|
||||||
|
NAvgRadialGradient = nameof(NAvgRadialGradient),
|
||||||
|
NAvgStdDev = nameof(NAvgStdDev),
|
||||||
|
Nsl = nameof(Nsl),
|
||||||
|
NslMean = nameof(NslMean),
|
||||||
|
NslRadialGradient = nameof(NslRadialGradient),
|
||||||
|
NslStdDev = nameof(NslStdDev),
|
||||||
|
PhaseMean = nameof(PhaseMean),
|
||||||
|
PhaseRadialGradient = nameof(PhaseRadialGradient),
|
||||||
|
PhaseStdDev = nameof(PhaseStdDev),
|
||||||
|
RhoAvg = nameof(RhoAvg),
|
||||||
|
RhoAvgMean = nameof(RhoAvgMean),
|
||||||
|
RhoAvgRadialGradient = nameof(RhoAvgRadialGradient),
|
||||||
|
RhoAvgStdDev = nameof(RhoAvgStdDev),
|
||||||
|
RhoMethod = nameof(RhoMethod),
|
||||||
|
Rhosl = nameof(Rhosl),
|
||||||
|
RhoslMean = nameof(RhoslMean),
|
||||||
|
RhoslRadialGradient = nameof(RhoslRadialGradient),
|
||||||
|
RhoslStdDev = nameof(RhoslStdDev),
|
||||||
|
RsMean = nameof(RsMean),
|
||||||
|
RsRadialGradient = nameof(RsRadialGradient),
|
||||||
|
RsStdDev = nameof(RsStdDev),
|
||||||
|
Vd = nameof(Vd),
|
||||||
|
VdMean = nameof(VdMean),
|
||||||
|
VdRadialGradient = nameof(VdRadialGradient),
|
||||||
|
VdStdDev = nameof(VdStdDev),
|
||||||
|
};
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
19
Adaptation/FileHandlers/pcl/Detail.cs
Normal file
19
Adaptation/FileHandlers/pcl/Detail.cs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
namespace Adaptation.FileHandlers.pcl;
|
||||||
|
|
||||||
|
public class Detail
|
||||||
|
{
|
||||||
|
|
||||||
|
public string FlatZ { get; set; }
|
||||||
|
public string Grade { get; set; }
|
||||||
|
public string HeaderUniqueId { get; set; }
|
||||||
|
public string NAvg { get; set; }
|
||||||
|
public string Nsl { get; set; }
|
||||||
|
public string Phase { get; set; }
|
||||||
|
public string RhoAvg { get; set; }
|
||||||
|
public string Rhosl { get; set; }
|
||||||
|
public string UniqueId { get; set; }
|
||||||
|
public string Vd { get; set; }
|
||||||
|
|
||||||
|
public override string ToString() => string.Concat(FlatZ, ";", Grade);
|
||||||
|
|
||||||
|
}
|
131
Adaptation/FileHandlers/pcl/FileRead.cs
Normal file
131
Adaptation/FileHandlers/pcl/FileRead.cs
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
using Adaptation.Eaf.Management.ConfigurationData.CellAutomation;
|
||||||
|
using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration;
|
||||||
|
using Adaptation.Shared;
|
||||||
|
using Adaptation.Shared.Methods;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Text.Json;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
|
namespace Adaptation.FileHandlers.pcl;
|
||||||
|
|
||||||
|
public class FileRead : Shared.FileRead, IFileRead
|
||||||
|
{
|
||||||
|
|
||||||
|
private readonly string _GhostPCLFileName;
|
||||||
|
|
||||||
|
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) :
|
||||||
|
base(new Description(), true, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted)
|
||||||
|
{
|
||||||
|
_MinFileLength = 10;
|
||||||
|
_NullData = string.Empty;
|
||||||
|
_Logistics = new Logistics(this);
|
||||||
|
if (_FileParameter is null)
|
||||||
|
throw new Exception(cellInstanceConnectionName);
|
||||||
|
if (_ModelObjectParameterDefinitions is null)
|
||||||
|
throw new Exception(cellInstanceConnectionName);
|
||||||
|
if (_IsDuplicator)
|
||||||
|
throw new Exception(cellInstanceConnectionName);
|
||||||
|
_GhostPCLFileName = string.Concat(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), @"\gpcl6win64.exe");
|
||||||
|
if (_IsEAFHosted && !File.Exists(_GhostPCLFileName))
|
||||||
|
throw new Exception("Ghost PCL FileName doesn't Exist!");
|
||||||
|
}
|
||||||
|
|
||||||
|
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception) => Move(extractResults, exception);
|
||||||
|
|
||||||
|
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
||||||
|
|
||||||
|
string IFileRead.GetEventDescription()
|
||||||
|
{
|
||||||
|
string result = _Description.GetEventDescription();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<string> IFileRead.GetHeaderNames()
|
||||||
|
{
|
||||||
|
List<string> results = _Description.GetHeaderNames();
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
string[] IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, string to, string from, string resolvedFileLocation, Exception exception)
|
||||||
|
{
|
||||||
|
string[] results = Move(extractResults, to, from, resolvedFileLocation, exception);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
JsonProperty[] IFileRead.GetDefault()
|
||||||
|
{
|
||||||
|
JsonProperty[] results = _Description.GetDefault(this, _Logistics);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
Dictionary<string, string> IFileRead.GetDisplayNamesJsonElement()
|
||||||
|
{
|
||||||
|
Dictionary<string, string> results = _Description.GetDisplayNamesJsonElement(this);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<IDescription> IFileRead.GetDescriptions(IFileRead fileRead, List<Test> tests, IProcessData processData)
|
||||||
|
{
|
||||||
|
List<IDescription> results = _Description.GetDescriptions(fileRead, _Logistics, tests, processData);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> IFileRead.GetExtractResult(string reportFullPath, string eventName)
|
||||||
|
{
|
||||||
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
|
if (string.IsNullOrEmpty(eventName))
|
||||||
|
throw new Exception();
|
||||||
|
_ReportFullPath = reportFullPath;
|
||||||
|
DateTime dateTime = DateTime.Now;
|
||||||
|
results = GetExtractResult(reportFullPath, dateTime);
|
||||||
|
if (results.Item3 is null)
|
||||||
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(results.Item1, Array.Empty<Test>(), JsonSerializer.Deserialize<JsonElement[]>("[]"), results.Item4);
|
||||||
|
if (results.Item3.Length > 0 && _IsEAFHosted)
|
||||||
|
WritePDSF(this, results.Item3);
|
||||||
|
UpdateLastTicksDuration(DateTime.Now.Ticks - dateTime.Ticks);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> IFileRead.ReExtract()
|
||||||
|
{
|
||||||
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
|
List<string> headerNames = _Description.GetHeaderNames();
|
||||||
|
Dictionary<string, string> keyValuePairs = _Description.GetDisplayNamesJsonElement(this);
|
||||||
|
results = ReExtract(this, headerNames, keyValuePairs);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
void IFileRead.CheckTests(Test[] tests, bool extra) => throw new Exception(string.Concat("Not ", nameof(_IsDuplicator)));
|
||||||
|
|
||||||
|
void IFileRead.Callback(object state) => throw new Exception(string.Concat("Not ", nameof(_IsDuplicator)));
|
||||||
|
|
||||||
|
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||||
|
{
|
||||||
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>());
|
||||||
|
_Logistics = new Logistics(this, reportFullPath, useSplitForMID: true);
|
||||||
|
SetFileParameterLotIDToLogisticsMID();
|
||||||
|
if (reportFullPath.Length < _MinFileLength)
|
||||||
|
results.Item4.Add(new FileInfo(reportFullPath));
|
||||||
|
else
|
||||||
|
{
|
||||||
|
IProcessData iProcessData = new ProcessData(this, _Logistics, results.Item4, _GhostPCLFileName);
|
||||||
|
if (iProcessData is ProcessData processData)
|
||||||
|
{
|
||||||
|
string mid = string.Concat(processData.Reactor, "-", processData.RDS, "-", processData.PSN);
|
||||||
|
mid = Regex.Replace(mid, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
|
||||||
|
_Logistics.MID = mid;
|
||||||
|
SetFileParameterLotID(mid);
|
||||||
|
_Logistics.ProcessJobID = processData.Reactor;
|
||||||
|
}
|
||||||
|
if (!iProcessData.Details.Any())
|
||||||
|
throw new Exception(string.Concat("No Data - ", dateTime.Ticks));
|
||||||
|
results = iProcessData.GetResults(this, _Logistics, results.Item4);
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
404
Adaptation/FileHandlers/pcl/ProcessData.cs
Normal file
404
Adaptation/FileHandlers/pcl/ProcessData.cs
Normal file
@ -0,0 +1,404 @@
|
|||||||
|
using Adaptation.Shared;
|
||||||
|
using Adaptation.Shared.Methods;
|
||||||
|
using log4net;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.Json;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
|
namespace Adaptation.FileHandlers.pcl;
|
||||||
|
|
||||||
|
public class ProcessData : IProcessData
|
||||||
|
{
|
||||||
|
|
||||||
|
private int _I;
|
||||||
|
private string _Data;
|
||||||
|
|
||||||
|
private readonly ILog _Log;
|
||||||
|
private readonly List<object> _Details;
|
||||||
|
|
||||||
|
public string JobID { get; set; }
|
||||||
|
public string MesEntity { get; set; }
|
||||||
|
public string Area { get; set; }
|
||||||
|
public string Ccomp { get; set; }
|
||||||
|
public string CondType { get; set; }
|
||||||
|
public string Date { get; set; }
|
||||||
|
public string Employee { get; set; }
|
||||||
|
public string FlatZMean { get; set; }
|
||||||
|
public string FlatZRadialGradient { get; set; }
|
||||||
|
public string FlatZStdDev { get; set; }
|
||||||
|
public string Folder { get; set; }
|
||||||
|
public string GLimit { get; set; }
|
||||||
|
public string GradeMean { get; set; }
|
||||||
|
public string GradeRadialGradient { get; set; }
|
||||||
|
public string GradeStdDev { get; set; }
|
||||||
|
public string Layer { get; set; }
|
||||||
|
public string Lot { get; set; }
|
||||||
|
public string Model { get; set; }
|
||||||
|
public string NAvgMean { get; set; }
|
||||||
|
public string NAvgRadialGradient { get; set; }
|
||||||
|
public string NAvgStdDev { get; set; }
|
||||||
|
public string NslMean { get; set; }
|
||||||
|
public string NslRadialGradient { get; set; }
|
||||||
|
public string NslStdDev { get; set; }
|
||||||
|
public string PSN { get; set; }
|
||||||
|
public string Pattern { get; set; }
|
||||||
|
public string PhaseMean { get; set; }
|
||||||
|
public string PhaseRadialGradient { get; set; }
|
||||||
|
public string PhaseStdDev { get; set; }
|
||||||
|
public string Plan { get; set; }
|
||||||
|
public string RDS { get; set; }
|
||||||
|
public string RampRate { get; set; }
|
||||||
|
public string Reactor { get; set; }
|
||||||
|
public string RhoAvgMean { get; set; }
|
||||||
|
public string RhoAvgRadialGradient { get; set; }
|
||||||
|
public string RhoAvgStdDev { get; set; }
|
||||||
|
public string RhoMethod { get; set; }
|
||||||
|
public string RhoslMean { get; set; }
|
||||||
|
public string RhoslRadialGradient { get; set; }
|
||||||
|
public string RhoslStdDev { get; set; }
|
||||||
|
public string RsMean { get; set; }
|
||||||
|
public string RsRadialGradient { get; set; }
|
||||||
|
public string RsStdDev { get; set; }
|
||||||
|
public string SetupFile { get; set; }
|
||||||
|
public string StartVoltage { get; set; }
|
||||||
|
public string StopVoltage { get; set; }
|
||||||
|
public string UniqueId { get; set; }
|
||||||
|
public string VdMean { get; set; }
|
||||||
|
public string VdRadialGradient { get; set; }
|
||||||
|
public string VdStdDev { get; set; }
|
||||||
|
public string Wafer { get; set; }
|
||||||
|
public string WaferSize { get; set; }
|
||||||
|
public string Zone { get; set; }
|
||||||
|
|
||||||
|
List<object> Shared.Properties.IProcessData.Details => _Details;
|
||||||
|
|
||||||
|
public ProcessData(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, string ghostPCLFileName)
|
||||||
|
{
|
||||||
|
fileInfoCollection.Clear();
|
||||||
|
_Details = new List<object>();
|
||||||
|
_I = 0;
|
||||||
|
_Data = string.Empty;
|
||||||
|
JobID = logistics.JobID;
|
||||||
|
MesEntity = logistics.MesEntity;
|
||||||
|
_Log = LogManager.GetLogger(typeof(ProcessData));
|
||||||
|
Date = DateTime.Now.ToString();
|
||||||
|
Parse(fileRead, logistics, fileInfoCollection, ghostPCLFileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
string IProcessData.GetCurrentReactor(IFileRead fileRead, Logistics logistics, Dictionary<string, string> reactors) => throw new Exception(string.Concat("See ", nameof(Parse)));
|
||||||
|
|
||||||
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> IProcessData.GetResults(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection)
|
||||||
|
{
|
||||||
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
|
List<Test> tests = new();
|
||||||
|
foreach (object item in _Details)
|
||||||
|
tests.Add(Test.HGCV);
|
||||||
|
List<IDescription> descriptions = fileRead.GetDescriptions(fileRead, tests, this);
|
||||||
|
if (tests.Count != descriptions.Count)
|
||||||
|
throw new Exception();
|
||||||
|
for (int i = 0; i < tests.Count; i++)
|
||||||
|
{
|
||||||
|
if (descriptions[i] is not Description description)
|
||||||
|
throw new Exception();
|
||||||
|
if (description.Test != (int)tests[i])
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
List<Description> fileReadDescriptions = (from l in descriptions select (Description)l).ToList();
|
||||||
|
string json = JsonSerializer.Serialize(fileReadDescriptions, fileReadDescriptions.GetType());
|
||||||
|
JsonElement[] jsonElements = JsonSerializer.Deserialize<JsonElement[]>(json);
|
||||||
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(logistics.Logistics1[0], tests.ToArray(), jsonElements, fileInfoCollection);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Convert the raw data file to parsable file format - in this case from PCL to PDF
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sourceFile">source file to be converted to PDF</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private static string ConvertSourceFileToPdf(Logistics logistics, string ghostPCLFileName)
|
||||||
|
{
|
||||||
|
string result = Path.ChangeExtension(logistics.ReportFullPath, ".pdf");
|
||||||
|
if (!File.Exists(result))
|
||||||
|
{
|
||||||
|
//string arguments = string.Concat("-i \"", sourceFile, "\" -o \"", result, "\"");
|
||||||
|
string arguments = string.Concat("-dSAFER -dBATCH -dNOPAUSE -dFIXEDMEDIA -dFitPage -dAutoRotatePages=/All -dDEVICEWIDTHPOINTS=792 -dDEVICEHEIGHTPOINTS=612 -sOutputFile=\"", result, "\" -sDEVICE=pdfwrite \"", logistics.ReportFullPath, "\"");
|
||||||
|
//Process process = Process.Start(configData.LincPDFCFileName, arguments);
|
||||||
|
Process process = Process.Start(ghostPCLFileName, arguments);
|
||||||
|
_ = process.WaitForExit(30000);
|
||||||
|
if (!File.Exists(result))
|
||||||
|
throw new Exception("PDF file wasn't created");
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ScanPast(string text)
|
||||||
|
{
|
||||||
|
int num = _Data.IndexOf(text, _I);
|
||||||
|
if (num > -1)
|
||||||
|
{
|
||||||
|
_I = num + text.Length;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_I = _Data.Length;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetBefore(string text)
|
||||||
|
{
|
||||||
|
int num = _Data.IndexOf(text, _I);
|
||||||
|
string text2;
|
||||||
|
if (num > -1)
|
||||||
|
{
|
||||||
|
text2 = _Data.Substring(_I, num - _I);
|
||||||
|
_I = num + text.Length;
|
||||||
|
return text2.Trim();
|
||||||
|
}
|
||||||
|
text2 = _Data.Substring(_I);
|
||||||
|
_I = _Data.Length;
|
||||||
|
return text2.Trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool IsNullOrWhiteSpace(string text)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < text.Length; i++)
|
||||||
|
{
|
||||||
|
if (!char.IsWhiteSpace(text[i]))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool IsBlankLine()
|
||||||
|
{
|
||||||
|
int num = _Data.IndexOf("\n", _I);
|
||||||
|
return IsNullOrWhiteSpace((num > -1) ? _Data.Substring(_I, num - _I) : _Data.Substring(_I));
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetToEOL() => GetBefore("\n");
|
||||||
|
|
||||||
|
private string GetToken()
|
||||||
|
{
|
||||||
|
while (_I < _Data.Length && IsNullOrWhiteSpace(_Data.Substring(_I, 1)))
|
||||||
|
{
|
||||||
|
_I++;
|
||||||
|
}
|
||||||
|
int j;
|
||||||
|
for (j = _I; j < _Data.Length && !IsNullOrWhiteSpace(_Data.Substring(j, 1)); j++)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
string text = _Data.Substring(_I, j - _I);
|
||||||
|
_I = j;
|
||||||
|
return text.Trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Parse(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, string ghostPCLFileName)
|
||||||
|
{
|
||||||
|
if (fileRead is null)
|
||||||
|
{ }
|
||||||
|
string headerText;
|
||||||
|
string sourceFileNamePdf = ConvertSourceFileToPdf(logistics, ghostPCLFileName);
|
||||||
|
fileInfoCollection.Add(new FileInfo(sourceFileNamePdf));
|
||||||
|
string altHeaderFileName = Path.ChangeExtension(logistics.ReportFullPath, ".txt");
|
||||||
|
if (File.Exists(altHeaderFileName))
|
||||||
|
{
|
||||||
|
headerText = File.ReadAllText(altHeaderFileName);
|
||||||
|
fileInfoCollection.Add(new FileInfo(altHeaderFileName));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Pdfbox, IKVM.AWT.WinForms
|
||||||
|
org.apache.pdfbox.pdmodel.PDDocument pdfDocument = org.apache.pdfbox.pdmodel.PDDocument.load(sourceFileNamePdf);
|
||||||
|
org.apache.pdfbox.util.PDFTextStripper stripper = new();
|
||||||
|
headerText = stripper.getText(pdfDocument);
|
||||||
|
pdfDocument.close();
|
||||||
|
File.AppendAllText(altHeaderFileName, headerText);
|
||||||
|
fileInfoCollection.Add(new FileInfo(altHeaderFileName));
|
||||||
|
}
|
||||||
|
if (headerText.Contains("G A T E V O L T A G E"))
|
||||||
|
throw new Exception("Ignore: GATEVOLTAGE runs are not parsed.");
|
||||||
|
if (!string.IsNullOrEmpty(headerText))
|
||||||
|
{
|
||||||
|
headerText = headerText.Replace("box", "");
|
||||||
|
headerText = headerText.Replace("bar", "");
|
||||||
|
headerText = headerText.Replace("horiz", "");
|
||||||
|
headerText = headerText.Replace("center", "");
|
||||||
|
headerText = headerText.Replace("upper", "");
|
||||||
|
headerText = headerText.Replace("lower", "");
|
||||||
|
headerText = headerText.Replace("right", "");
|
||||||
|
headerText = headerText.Replace("left", "");
|
||||||
|
headerText = headerText.Replace("thin", "");
|
||||||
|
headerText = headerText.Replace("vertical", "");
|
||||||
|
headerText = headerText.Replace("line", "");
|
||||||
|
headerText = headerText.Replace("middle", "");
|
||||||
|
headerText = headerText.Replace("side", "");
|
||||||
|
headerText = headerText.Replace("top", ""); // This will change "Stop Voltage" to "S Voltage"
|
||||||
|
headerText = headerText.Replace("corner", "");
|
||||||
|
headerText = headerText.Replace("bottom", "");
|
||||||
|
headerText = headerText.Replace("ruleunder", "_");
|
||||||
|
headerText = headerText.Replace("@", "");
|
||||||
|
headerText = headerText.Replace("*", "");
|
||||||
|
_I = 0;
|
||||||
|
_Data = headerText;
|
||||||
|
_Log.Debug($"****MERCURY-DATA [002]= {headerText}");
|
||||||
|
ScanPast("Operator:");
|
||||||
|
Employee = GetBefore("Start Voltage:");
|
||||||
|
StartVoltage = GetBefore("V");
|
||||||
|
ScanPast("Wafer :");
|
||||||
|
Wafer = GetBefore("S Voltage :"); // This is actually "Stop Voltage"
|
||||||
|
StopVoltage = GetBefore("V");
|
||||||
|
ScanPast("Lot :");
|
||||||
|
if (headerText.Contains("Ramp Rate :"))
|
||||||
|
Lot = GetBefore("Ramp Rate :");
|
||||||
|
else if (headerText.Contains("Forward Rate :"))
|
||||||
|
Lot = GetBefore("Forward Rate :");
|
||||||
|
else if (headerText.Contains("Conduct Type:"))
|
||||||
|
Lot = GetBefore("Conduct Type:");
|
||||||
|
else
|
||||||
|
Lot = string.Empty;
|
||||||
|
// Remove illegal characters \/:*?"<>| found in the Lot.
|
||||||
|
Lot = Regex.Replace(Lot, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
|
||||||
|
RampRate = GetBefore("mV/sec");
|
||||||
|
ScanPast("Plan :");
|
||||||
|
Plan = GetBefore("G limit :");
|
||||||
|
//GLimit = GetBefore("S ");
|
||||||
|
GLimit = GetBefore("S");
|
||||||
|
Date = DateTime.Now.ToString();
|
||||||
|
ScanPast("Setup File:");
|
||||||
|
//SetupFile = GetBefore("O O");
|
||||||
|
SetupFile = GetBefore("O O");
|
||||||
|
ScanPast("Wafer size :");
|
||||||
|
WaferSize = GetBefore("mm");
|
||||||
|
ScanPast("Folder :");
|
||||||
|
//Folder = GetBefore("N N");
|
||||||
|
Folder = GetBefore("N N");
|
||||||
|
ScanPast("Ccomp : ");
|
||||||
|
Ccomp = GetBefore("pF");
|
||||||
|
ScanPast("Pattern :");
|
||||||
|
//Pattern = GetBefore("C C");
|
||||||
|
Pattern = GetBefore("C C");
|
||||||
|
ScanPast("Area:");
|
||||||
|
Area = GetBefore("cm2");
|
||||||
|
ScanPast("Cond Type :");
|
||||||
|
CondType = GetBefore("Rho Method:");
|
||||||
|
//RhoMethod = GetBefore("N N");
|
||||||
|
RhoMethod = GetBefore("N N");
|
||||||
|
ScanPast("Model :");
|
||||||
|
//Model = GetBefore("T T");
|
||||||
|
Model = GetBefore("T T");
|
||||||
|
ScanPast("Navg :");
|
||||||
|
NAvgMean = GetToken();
|
||||||
|
NAvgStdDev = GetToken();
|
||||||
|
NAvgRadialGradient = GetToken();
|
||||||
|
ScanPast("Nsl :");
|
||||||
|
NslMean = GetToken();
|
||||||
|
NslStdDev = GetToken();
|
||||||
|
NslRadialGradient = GetToken();
|
||||||
|
ScanPast("Vd :");
|
||||||
|
VdMean = GetToken();
|
||||||
|
VdStdDev = GetToken();
|
||||||
|
VdRadialGradient = GetToken();
|
||||||
|
ScanPast("Flat Z:");
|
||||||
|
FlatZMean = GetToken();
|
||||||
|
FlatZStdDev = GetToken();
|
||||||
|
FlatZRadialGradient = GetToken();
|
||||||
|
ScanPast("Rhoavg:");
|
||||||
|
RhoAvgMean = GetToken();
|
||||||
|
RhoAvgStdDev = GetToken();
|
||||||
|
RhoAvgRadialGradient = GetToken();
|
||||||
|
ScanPast("Rhosl :");
|
||||||
|
RhoslMean = GetToken();
|
||||||
|
RhoslStdDev = GetToken();
|
||||||
|
RhoslRadialGradient = GetToken();
|
||||||
|
ScanPast("Phase :");
|
||||||
|
PhaseMean = GetToken();
|
||||||
|
PhaseStdDev = GetToken();
|
||||||
|
PhaseRadialGradient = GetToken();
|
||||||
|
ScanPast("Grade :");
|
||||||
|
GradeMean = GetToken();
|
||||||
|
GradeStdDev = GetToken();
|
||||||
|
GradeRadialGradient = GetToken();
|
||||||
|
ScanPast("Rs :");
|
||||||
|
RsMean = GetToken();
|
||||||
|
RsStdDev = GetToken();
|
||||||
|
RsRadialGradient = GetToken();
|
||||||
|
|
||||||
|
string lot = Lot;
|
||||||
|
string[] segments = lot.Split('-');
|
||||||
|
|
||||||
|
if (segments.Length >= 1)
|
||||||
|
Reactor = segments[0];
|
||||||
|
|
||||||
|
if (segments.Length >= 2)
|
||||||
|
RDS = segments[1];
|
||||||
|
|
||||||
|
if (segments.Length >= 3)
|
||||||
|
{
|
||||||
|
string str = segments[2];
|
||||||
|
string[] segmentsB = str.Split('.');
|
||||||
|
if (segmentsB.Length >= 1)
|
||||||
|
PSN = segmentsB[0];
|
||||||
|
if (segmentsB.Length >= 2)
|
||||||
|
Layer = segmentsB[1];
|
||||||
|
}
|
||||||
|
if (segments.Length >= 4)
|
||||||
|
Zone = segments[3];
|
||||||
|
|
||||||
|
//ScanPast("Flat Z: Grade : % Flat Z: Grade : % Flat Z: Grade : %");
|
||||||
|
ScanPast("Flat Z: Grade : % Flat Z: Grade : % Flat Z: Grade : %");
|
||||||
|
string token = GetToken();
|
||||||
|
while (!string.IsNullOrEmpty(token))
|
||||||
|
{
|
||||||
|
Detail hgProbeDetail = new()
|
||||||
|
{ NAvg = token };
|
||||||
|
_ = GetToEOL();
|
||||||
|
hgProbeDetail.Nsl = GetToken();
|
||||||
|
_ = GetToEOL();
|
||||||
|
hgProbeDetail.Vd = GetToken();
|
||||||
|
_ = GetToEOL();
|
||||||
|
hgProbeDetail.FlatZ = GetToken();
|
||||||
|
_ = GetToEOL();
|
||||||
|
hgProbeDetail.RhoAvg = GetToken();
|
||||||
|
_ = GetToEOL();
|
||||||
|
hgProbeDetail.Rhosl = GetToken();
|
||||||
|
_ = GetToEOL();
|
||||||
|
hgProbeDetail.Phase = GetToken();
|
||||||
|
_ = GetToEOL();
|
||||||
|
hgProbeDetail.Grade = GetToken();
|
||||||
|
hgProbeDetail.UniqueId = string.Concat("_Point-", _Details.Count + 1);
|
||||||
|
_Details.Add(hgProbeDetail);
|
||||||
|
_ = GetToken();
|
||||||
|
_ = GetToken();
|
||||||
|
_ = GetToken();
|
||||||
|
_ = GetToken();
|
||||||
|
token = GetToken();
|
||||||
|
//if (token.Contains("LincPDF") || token.Contains("MULTIPLE"))
|
||||||
|
if (token.Contains("MULTIPLE"))
|
||||||
|
{
|
||||||
|
//ScanPast("Flat Z: Grade : % Flat Z: Grade : % Flat Z: Grade : %");
|
||||||
|
//ScanPast("Flat Z: Grade : % Flat Z: Grade : % Flat Z: Grade : %");
|
||||||
|
ScanPast("Flat Z: Grade : % Flat Z: Grade : % Flat Z: Grade : %");
|
||||||
|
ScanPast("Flat Z: Grade : % Flat Z: Grade : % Flat Z: Grade : %");
|
||||||
|
token = GetToken();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
UniqueId = string.Format("{0}_{1}_{2}", logistics.JobID, Lot, Path.GetFileNameWithoutExtension(logistics.ReportFullPath));
|
||||||
|
foreach (Detail detail in _Details)
|
||||||
|
{
|
||||||
|
detail.HeaderUniqueId = UniqueId;
|
||||||
|
detail.UniqueId = string.Concat(detail, detail.UniqueId);
|
||||||
|
}
|
||||||
|
fileInfoCollection.Add(new FileInfo(logistics.ReportFullPath));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,45 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Adaptation.Helpers
|
|
||||||
{
|
|
||||||
|
|
||||||
public partial class ConfigData
|
|
||||||
{
|
|
||||||
public enum Level
|
|
||||||
{
|
|
||||||
IsXToOpenInsightMetrologyViewer, //MetrologyWS.SendData(file, string.Concat("http://", serverName, "/api/inbound/MercuryProbe"), headerAttachments);
|
|
||||||
IsXToIQSSi, //NA <d7p1:FileScanningIntervalInSeconds>-361</d7p1:FileScanningIntervalInSeconds>
|
|
||||||
IsXToOpenInsight, //NA <d7p1:FileScanningIntervalInSeconds>-363</d7p1:FileScanningIntervalInSeconds>
|
|
||||||
IsXToOpenInsightMetrologyViewerAttachments, //Site-One
|
|
||||||
IsXToAPC,
|
|
||||||
IsXToSPaCe,
|
|
||||||
IsXToArchive,
|
|
||||||
IsArchive,
|
|
||||||
IsDummy,
|
|
||||||
IsNaEDA
|
|
||||||
}
|
|
||||||
|
|
||||||
public static List<Tuple<int, Enum, string>> LevelTuples
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return new List<Tuple<int, Enum, string>>
|
|
||||||
{
|
|
||||||
new Tuple<int, Enum, string>(0, Level.IsNaEDA, @"\EC_EDA\Staging\Traces\~\Source"),
|
|
||||||
new Tuple<int, Enum, string>(15, Level.IsXToOpenInsightMetrologyViewer, @"\EC_EAFLog\TracesMES\~\Source"),
|
|
||||||
new Tuple<int, Enum, string>(-36, Level.IsXToIQSSi, @"\EC_SPC_Si\Traces\~\PollPath"),
|
|
||||||
new Tuple<int, Enum, string>(-36, Level.IsXToOpenInsight, @"\\messa01ec.ec.local\APPS\Metrology\~\Source"),
|
|
||||||
new Tuple<int, Enum, string>(36, Level.IsXToOpenInsightMetrologyViewerAttachments, @"\EC_Characterization_Si\In Process\~\Source"),
|
|
||||||
new Tuple<int, Enum, string>(360, Level.IsXToAPC, @"\EC_APC\Staging\Traces\~\PollPath"),
|
|
||||||
new Tuple<int, Enum, string>(-36, Level.IsXToSPaCe, @"\EC_SPC_Si\Traces\~\Source"),
|
|
||||||
new Tuple<int, Enum, string>(180, Level.IsXToArchive, @"\EC_EAFLog\TracesArchive\~\Source"),
|
|
||||||
new Tuple<int, Enum, string>(36, Level.IsArchive, @"\EC_Characterization_Si\Processed")
|
|
||||||
//new Tuple<int, Enum, string>("IsDummy"
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,523 +0,0 @@
|
|||||||
using Adaptation.Eaf.Management.ConfigurationData.CellAutomation;
|
|
||||||
using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration;
|
|
||||||
using Adaptation.Shared;
|
|
||||||
using Adaptation.Shared.Metrology;
|
|
||||||
using Infineon.Monitoring.MonA;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Globalization;
|
|
||||||
using System.IO;
|
|
||||||
using System.IO.Compression;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Text.Json;
|
|
||||||
using System.Threading;
|
|
||||||
|
|
||||||
namespace Adaptation.Helpers
|
|
||||||
{
|
|
||||||
|
|
||||||
public partial class ConfigData : ConfigDataBase
|
|
||||||
{
|
|
||||||
|
|
||||||
internal const object NullData = null;
|
|
||||||
internal const int MinFileLength = 100;
|
|
||||||
|
|
||||||
public string IqsFile { get; private set; }
|
|
||||||
public string TracePath { get; private set; }
|
|
||||||
public Level? Duplicator { get; private set; }
|
|
||||||
public string MemoryPath { get; private set; }
|
|
||||||
public string VillachPath { get; private set; }
|
|
||||||
public string ProgressPath { get; private set; }
|
|
||||||
public string IqsQueryFilter { get; private set; }
|
|
||||||
public string GhostPCLFileName { get; private set; }
|
|
||||||
public string LincPDFCFileName { get; private set; }
|
|
||||||
public string OpenInsightSiViewer { get; private set; }
|
|
||||||
public string OpenInsightFilePattern { get; private set; }
|
|
||||||
public string OpenInsightMetrogyViewerAPI { get; private set; }
|
|
||||||
public static Dictionary<string, List<long>> DummyRuns { get; private set; }
|
|
||||||
|
|
||||||
private Timer _Timer;
|
|
||||||
private int _LastDummyRunIndex;
|
|
||||||
private readonly Calendar _Calendar;
|
|
||||||
private readonly string _ReportFullPath;
|
|
||||||
|
|
||||||
public ConfigData(ILogic logic, string cellName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, IList<ModelObjectParameterDefinition> modelObjectParameterDefinitions, string parameterizedModelObjectDefinitionType, bool isEAFHosted) :
|
|
||||||
base(cellName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, isEAFHosted)
|
|
||||||
{
|
|
||||||
_LastDummyRunIndex = -1;
|
|
||||||
UseCyclicalForDescription = false;
|
|
||||||
CultureInfo cultureInfo = new CultureInfo("en-US");
|
|
||||||
_Calendar = cultureInfo.Calendar;
|
|
||||||
string firstSourceFileFilter = fileConnectorConfiguration.SourceFileFilter.Split('|')[0];
|
|
||||||
if (DummyRuns is null)
|
|
||||||
DummyRuns = new Dictionary<string, List<long>>();
|
|
||||||
bool isDuplicator = cellInstanceConnectionName.StartsWith(cellName);
|
|
||||||
int level = (cellInstanceConnectionName.Length - cellInstanceConnectionName.Replace("-", string.Empty).Length);
|
|
||||||
if (!isDuplicator)
|
|
||||||
Duplicator = null;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CellNames.Add(cellName, cellName);
|
|
||||||
MesEntities.Add(cellName, cellName);
|
|
||||||
Duplicator = (Level)level;
|
|
||||||
}
|
|
||||||
if (isDuplicator)
|
|
||||||
ProcessDataDescription = new Duplicator.Description();
|
|
||||||
else
|
|
||||||
ProcessDataDescription = new ProcessData.FileRead.Description();
|
|
||||||
if (!isDuplicator)
|
|
||||||
{
|
|
||||||
//Verify(fileConnectorConfiguration, cellInstanceConnectionName);
|
|
||||||
if (!EafHosted)
|
|
||||||
VerifyProcessDataDescription(logic);
|
|
||||||
else
|
|
||||||
WriteExportAliases(logic, cellName, cellInstanceConnectionName);
|
|
||||||
}
|
|
||||||
GhostPCLFileName = string.Concat(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), @"\gpcl6win64.exe");
|
|
||||||
if (EafHosted && Duplicator.HasValue && Duplicator.Value == Level.IsXToOpenInsightMetrologyViewerAttachments && !File.Exists(GhostPCLFileName))
|
|
||||||
throw new Exception("Ghost PCL FileName doesn't Exist!");
|
|
||||||
LincPDFCFileName = string.Concat(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), @"\LincPDFC.exe");
|
|
||||||
if (EafHosted && Duplicator.HasValue && Duplicator.Value == Level.IsXToOpenInsightMetrologyViewerAttachments && !File.Exists(LincPDFCFileName))
|
|
||||||
throw new Exception("LincPDFC FileName doesn't Exist!");
|
|
||||||
if (!modelObjectParameterDefinitions.Any())
|
|
||||||
{
|
|
||||||
CellNames.Add(cellName, "****");
|
|
||||||
MesEntities.Add(cellName, "****");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
int index;
|
|
||||||
string key;
|
|
||||||
string variable = string.Empty;
|
|
||||||
Dictionary<string, string> iqsSection = new Dictionary<string, string>();
|
|
||||||
Dictionary<string, string> pathSection = new Dictionary<string, string>();
|
|
||||||
Dictionary<string, string> commonSection = new Dictionary<string, string>();
|
|
||||||
Dictionary<string, string> openInsightSection = new Dictionary<string, string>();
|
|
||||||
foreach (ModelObjectParameterDefinition modelObjectParameterDefinition in modelObjectParameterDefinitions)
|
|
||||||
{
|
|
||||||
if (!modelObjectParameterDefinition.Name.Contains('.'))
|
|
||||||
continue;
|
|
||||||
else if (modelObjectParameterDefinition.Name.StartsWith("Description.") && (modelObjectParameterDefinition.Name.EndsWith(".EventName") || modelObjectParameterDefinition.Name.EndsWith(".EquipmentType")))
|
|
||||||
continue;
|
|
||||||
index = modelObjectParameterDefinition.Name.IndexOf(".");
|
|
||||||
if (index <= -1)
|
|
||||||
continue;
|
|
||||||
key = modelObjectParameterDefinition.Name.Substring(0, index);
|
|
||||||
variable = modelObjectParameterDefinition.Name.Substring(index + 1);
|
|
||||||
if (key == "COMMON")
|
|
||||||
commonSection.Add(variable, modelObjectParameterDefinition.Value);
|
|
||||||
//else if (key == "CONNECTION STRINGS")
|
|
||||||
// connectionStringsSection.Add(variable, modelObjectParameterDefinition.Value);
|
|
||||||
else if (key == "IQS")
|
|
||||||
iqsSection.Add(variable, modelObjectParameterDefinition.Value);
|
|
||||||
else if (key == "OpenInsight")
|
|
||||||
openInsightSection.Add(variable, modelObjectParameterDefinition.Value);
|
|
||||||
else if (key == "PATH")
|
|
||||||
pathSection.Add(variable, modelObjectParameterDefinition.Value);
|
|
||||||
//else if (key == "REACTOR")
|
|
||||||
// reactorTuples.Add(new Tuple<string, string>(variable, modelObjectParameterDefinition.Value));
|
|
||||||
//else if (key == "TIBCO")
|
|
||||||
// tibcoSection.Add(variable, modelObjectParameterDefinition.Value);
|
|
||||||
else
|
|
||||||
throw new Exception(cellInstanceConnectionName);
|
|
||||||
}
|
|
||||||
if (!iqsSection.Any())
|
|
||||||
throw new Exception("IQS section is missing from configuration");
|
|
||||||
else
|
|
||||||
{
|
|
||||||
key = "FILE";
|
|
||||||
if (iqsSection.ContainsKey(key))
|
|
||||||
IqsFile = iqsSection[key];
|
|
||||||
else
|
|
||||||
throw new Exception(string.Concat("Missing IQS Configuration entry for ", key));
|
|
||||||
if (string.IsNullOrEmpty(IqsFile))
|
|
||||||
throw new Exception(string.Format("IQS key {0} is empty", key));
|
|
||||||
key = "QUERY";
|
|
||||||
if (iqsSection.ContainsKey(key))
|
|
||||||
IqsQueryFilter = iqsSection[key];
|
|
||||||
else
|
|
||||||
throw new Exception(string.Concat("Missing IQS Configuration entry for ", key));
|
|
||||||
if (string.IsNullOrEmpty(IqsQueryFilter))
|
|
||||||
throw new Exception(string.Format("IQS key {0} is empty", key));
|
|
||||||
}
|
|
||||||
if (!pathSection.Any())
|
|
||||||
throw new Exception("Path section is missing from configuration");
|
|
||||||
else
|
|
||||||
{
|
|
||||||
key = "TRACE";
|
|
||||||
if (pathSection.ContainsKey(key) && pathSection[key].StartsWith(@"\\"))
|
|
||||||
TracePath = pathSection[key];
|
|
||||||
if (!string.IsNullOrEmpty(TracePath) && !Directory.Exists(TracePath))
|
|
||||||
Directory.CreateDirectory(TracePath);
|
|
||||||
key = "VILLACH";
|
|
||||||
if (pathSection.ContainsKey(key) && pathSection[key].StartsWith(@"\\"))
|
|
||||||
VillachPath = pathSection[key];
|
|
||||||
if (!string.IsNullOrEmpty(VillachPath) && !Directory.Exists(VillachPath))
|
|
||||||
Directory.CreateDirectory(VillachPath);
|
|
||||||
key = "Progress";
|
|
||||||
if (pathSection.ContainsKey(key) && pathSection[key].StartsWith(@"\\"))
|
|
||||||
ProgressPath = pathSection[key];
|
|
||||||
if (!string.IsNullOrEmpty(ProgressPath) && Directory.Exists(Path.GetPathRoot(ProgressPath)) && !Directory.Exists(ProgressPath))
|
|
||||||
Directory.CreateDirectory(ProgressPath);
|
|
||||||
key = "Memory";
|
|
||||||
if (pathSection.ContainsKey(key) && pathSection[key].StartsWith(@"\\"))
|
|
||||||
MemoryPath = pathSection[key];
|
|
||||||
if (!string.IsNullOrEmpty(MemoryPath) && !Directory.Exists(MemoryPath))
|
|
||||||
Directory.CreateDirectory(MemoryPath);
|
|
||||||
}
|
|
||||||
if (!commonSection.Any())
|
|
||||||
throw new Exception("Common section is missing from configuration");
|
|
||||||
else
|
|
||||||
{
|
|
||||||
key = "CELL_NAMES";
|
|
||||||
if (!commonSection.ContainsKey(key) || !commonSection[key].Contains(';') || !commonSection[key].Contains(':'))
|
|
||||||
throw new Exception(cellInstanceConnectionName);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
string[] segments;
|
|
||||||
string[] cellNames = commonSection[key].Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
|
|
||||||
foreach (string item in cellNames)
|
|
||||||
{
|
|
||||||
segments = item.Split(':');
|
|
||||||
CellNames.Add(segments[0].Trim(), segments[1].Trim());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(cellName) && !CellNames.ContainsKey(cellName))
|
|
||||||
throw new Exception(cellInstanceConnectionName);
|
|
||||||
key = "MES_ENTITIES";
|
|
||||||
if (!commonSection.ContainsKey(key) || !commonSection[key].Contains(';') || !commonSection[key].Contains(':'))
|
|
||||||
throw new Exception(cellInstanceConnectionName);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
string[] segments;
|
|
||||||
string[] mesEntity = commonSection[key].Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
|
|
||||||
foreach (string item in mesEntity)
|
|
||||||
{
|
|
||||||
segments = item.Split(':');
|
|
||||||
MesEntities.Add(segments[0].Trim(), segments[1].Trim());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(cellName) && !MesEntities.ContainsKey(cellName))
|
|
||||||
throw new Exception(cellInstanceConnectionName);
|
|
||||||
}
|
|
||||||
if (!MesEntities.Any())
|
|
||||||
throw new Exception(cellInstanceConnectionName);
|
|
||||||
if (!openInsightSection.Any())
|
|
||||||
throw new Exception("OpenInsight section is missing from configuration");
|
|
||||||
else
|
|
||||||
{
|
|
||||||
key = "MetrologyViewerAPI";
|
|
||||||
if (openInsightSection.ContainsKey(key))
|
|
||||||
OpenInsightMetrogyViewerAPI = openInsightSection[key];
|
|
||||||
if (string.IsNullOrEmpty(OpenInsightMetrogyViewerAPI))
|
|
||||||
throw new Exception(string.Format("OpenInsight key {0} is empty", key));
|
|
||||||
if (!OpenInsightMetrogyViewerAPI.Contains(":") || !OpenInsightMetrogyViewerAPI.Contains("."))
|
|
||||||
throw new Exception(string.Format("OpenInsight key {0} is invalid", key));
|
|
||||||
key = "SiViewer";
|
|
||||||
if (openInsightSection.ContainsKey(key))
|
|
||||||
OpenInsightSiViewer = openInsightSection[key];
|
|
||||||
if (string.IsNullOrEmpty(OpenInsightSiViewer))
|
|
||||||
throw new Exception(string.Format("OpenInsight key {0} is empty", key));
|
|
||||||
if (!OpenInsightSiViewer.Contains(":") || !OpenInsightSiViewer.Contains("."))
|
|
||||||
throw new Exception(string.Format("OpenInsight key {0} is invalid", key));
|
|
||||||
key = "FilePattern";
|
|
||||||
if (openInsightSection.ContainsKey(key))
|
|
||||||
OpenInsightFilePattern = openInsightSection[key];
|
|
||||||
else
|
|
||||||
throw new Exception(string.Concat("Missing OpenInsight Configuration entry for ", key));
|
|
||||||
if (string.IsNullOrEmpty(OpenInsightFilePattern))
|
|
||||||
throw new Exception(string.Format("OpenInsight key {0} is empty", key));
|
|
||||||
}
|
|
||||||
if (IsSourceTimer || IsDatabaseExportToIPDSF || (Duplicator.HasValue && Duplicator.Value == Level.IsDummy))
|
|
||||||
{
|
|
||||||
if (!Directory.Exists(fileConnectorConfiguration.SourceFileLocation))
|
|
||||||
Directory.CreateDirectory(fileConnectorConfiguration.SourceFileLocation);
|
|
||||||
_ReportFullPath = string.Concat(fileConnectorConfiguration.SourceFileLocation, firstSourceFileFilter.Replace("*", @"\"));
|
|
||||||
if (Debugger.IsAttached || fileConnectorConfiguration.PreProcessingMode == FileConnectorConfiguration.PreProcessingModeEnum.Process)
|
|
||||||
Callback(null);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
int milliSeconds;
|
|
||||||
milliSeconds = (int)((fileConnectorConfiguration.FileScanningIntervalInSeconds * 1000) / 2);
|
|
||||||
_Timer = new Timer(Callback, null, milliSeconds, Timeout.Infinite);
|
|
||||||
milliSeconds += 2000;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void CheckProcessDataDescription(Dictionary<Test, List<Duplicator.Description>> results, bool extra)
|
|
||||||
{
|
|
||||||
foreach (Test test in results.Keys)
|
|
||||||
{
|
|
||||||
if (test == Test.HgCV)
|
|
||||||
{
|
|
||||||
if (!(ProcessDataDescription is ProcessData.FileRead.Description))
|
|
||||||
ProcessDataDescription = new ProcessData.FileRead.Description();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
throw new Exception();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CallbackIsDummy(string traceDummyFile, List<Tuple<string, string, string, string, int>> tuples, bool fileConnectorConfigurationIncludeSubDirectories, bool includeSubDirectoriesExtra)
|
|
||||||
{
|
|
||||||
int fileCount;
|
|
||||||
string[] files;
|
|
||||||
string monARessource;
|
|
||||||
string checkDirectory;
|
|
||||||
string sourceArchiveFile;
|
|
||||||
string inProcessDirectory;
|
|
||||||
const string site = "sjc";
|
|
||||||
const string monInURL = "http://moninhttp.sjc.infineon.com/input/text";
|
|
||||||
MonIn monIn = MonIn.GetInstance(monInURL);
|
|
||||||
string stateName = string.Concat("Dummy_", _EventName);
|
|
||||||
foreach (Tuple<string, string, string, string, int> item in tuples)
|
|
||||||
{
|
|
||||||
monARessource = item.Item1;
|
|
||||||
sourceArchiveFile = item.Item2;
|
|
||||||
inProcessDirectory = item.Item3;
|
|
||||||
checkDirectory = item.Item4;
|
|
||||||
fileCount = item.Item5;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (fileCount > 0 || string.IsNullOrEmpty(checkDirectory))
|
|
||||||
{
|
|
||||||
File.AppendAllLines(traceDummyFile, new string[] { site, monARessource, stateName, State.Warning.ToString() });
|
|
||||||
monIn.SendStatus(site, monARessource, stateName, State.Warning);
|
|
||||||
for (int i = 1; i < 12; i++)
|
|
||||||
Thread.Sleep(500);
|
|
||||||
}
|
|
||||||
else if (inProcessDirectory == checkDirectory)
|
|
||||||
continue;
|
|
||||||
if (!EafHosted)
|
|
||||||
continue;
|
|
||||||
if (!File.Exists(sourceArchiveFile))
|
|
||||||
continue;
|
|
||||||
if (!long.TryParse(Path.GetFileNameWithoutExtension(sourceArchiveFile).Replace("x", string.Empty), out long sequence))
|
|
||||||
continue;
|
|
||||||
ZipFile.ExtractToDirectory(sourceArchiveFile, inProcessDirectory);
|
|
||||||
if (fileConnectorConfigurationIncludeSubDirectories && includeSubDirectoriesExtra)
|
|
||||||
{
|
|
||||||
if (_EventName == EventName.FileRead)
|
|
||||||
checkDirectory = string.Concat(checkDirectory, @"\", sequence);
|
|
||||||
else if (_EventName == EventName.FileReadDaily)
|
|
||||||
checkDirectory = string.Concat(checkDirectory, @"\Source\", sequence);
|
|
||||||
else
|
|
||||||
throw new Exception();
|
|
||||||
}
|
|
||||||
if (fileConnectorConfigurationIncludeSubDirectories)
|
|
||||||
files = Directory.GetFiles(inProcessDirectory, "*", SearchOption.AllDirectories);
|
|
||||||
else
|
|
||||||
files = Directory.GetFiles(inProcessDirectory, "*", SearchOption.TopDirectoryOnly);
|
|
||||||
if (files.Length > 250)
|
|
||||||
throw new Exception("Safety net!");
|
|
||||||
foreach (string file in files)
|
|
||||||
File.SetLastWriteTime(file, new DateTime(sequence));
|
|
||||||
if (!fileConnectorConfigurationIncludeSubDirectories)
|
|
||||||
{
|
|
||||||
foreach (string file in files)
|
|
||||||
File.Move(file, string.Concat(checkDirectory, @"\", Path.GetFileName(file)));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
string[] directories = Directory.GetDirectories(inProcessDirectory, "*", SearchOption.AllDirectories);
|
|
||||||
foreach (string directory in directories)
|
|
||||||
Directory.CreateDirectory(string.Concat(checkDirectory, directory.Substring(inProcessDirectory.Length)));
|
|
||||||
foreach (string file in files)
|
|
||||||
File.Move(file, string.Concat(checkDirectory, file.Substring(inProcessDirectory.Length)));
|
|
||||||
}
|
|
||||||
File.AppendAllLines(traceDummyFile, new string[] { site, monARessource, stateName, State.Ok.ToString() });
|
|
||||||
monIn.SendStatus(site, monARessource, stateName, State.Ok);
|
|
||||||
}
|
|
||||||
catch (Exception exception)
|
|
||||||
{
|
|
||||||
File.AppendAllLines(traceDummyFile, new string[] { site, monARessource, stateName, State.Critical.ToString(), exception.Message, exception.StackTrace });
|
|
||||||
monIn.SendStatus(site, monARessource, stateName, State.Critical);
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Eaf.Core.Smtp.ISmtp smtp = Eaf.Core.Backbone.Instance.GetBackboneComponentsOfType<Eaf.Core.Smtp.ISmtp>().SingleOrDefault();
|
|
||||||
Eaf.Core.Smtp.EmailMessage emailMessage = new Eaf.Core.Smtp.EmailMessage(string.Concat("Exception:", EquipmentElementName), string.Concat(exception.Message, Environment.NewLine, Environment.NewLine, exception.StackTrace), Eaf.Core.Smtp.MailPriority.High);
|
|
||||||
smtp.Send(emailMessage);
|
|
||||||
}
|
|
||||||
catch (Exception) { }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CallbackIsDummy()
|
|
||||||
{
|
|
||||||
DateTime dateTime = DateTime.Now;
|
|
||||||
bool check = (dateTime.Hour > 7 && dateTime.Hour < 18 && dateTime.DayOfWeek != DayOfWeek.Sunday && dateTime.DayOfWeek != DayOfWeek.Saturday);
|
|
||||||
if (check)
|
|
||||||
{
|
|
||||||
int fileCount;
|
|
||||||
string[] files;
|
|
||||||
string monARessource;
|
|
||||||
string checkDirectory;
|
|
||||||
string sourceArchiveFile;
|
|
||||||
string sourceFileLocation;
|
|
||||||
string targetFileLocation;
|
|
||||||
string inProcessDirectory;
|
|
||||||
string weekOfYear = _Calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
|
||||||
string traceDummyDirectory = string.Concat(Path.GetPathRoot(TracePath), @"\TracesDummy\", CellName, @"\Source\", dateTime.ToString("yyyy"), "___Week_", weekOfYear);
|
|
||||||
if (!Directory.Exists(traceDummyDirectory))
|
|
||||||
Directory.CreateDirectory(traceDummyDirectory);
|
|
||||||
string traceDummyFile = string.Concat(traceDummyDirectory, @"\", dateTime.Ticks, " - ", CellName, ".txt");
|
|
||||||
File.AppendAllText(traceDummyFile, string.Empty);
|
|
||||||
List<Tuple<string, string, string, string, int>> tuples = new List<Tuple<string, string, string, string, int>>();
|
|
||||||
foreach (var keyValuePair in CellNames)
|
|
||||||
{
|
|
||||||
monARessource = keyValuePair.Key;
|
|
||||||
if (!keyValuePair.Value.Contains(@"\"))
|
|
||||||
continue;
|
|
||||||
foreach (string sourceFileFilter in FileConnectorConfiguration.SourceFileFilter.Split('|'))
|
|
||||||
{
|
|
||||||
if (sourceFileFilter.ToLower().StartsWith(keyValuePair.Value.Replace(@"\", string.Empty)))
|
|
||||||
sourceFileLocation = Path.GetFullPath(FileConnectorConfiguration.SourceFileLocation);
|
|
||||||
else if (FileConnectorConfiguration.SourceFileLocation.ToLower().EndsWith(keyValuePair.Value))
|
|
||||||
sourceFileLocation = Path.GetFullPath(FileConnectorConfiguration.SourceFileLocation);
|
|
||||||
else
|
|
||||||
sourceFileLocation = Path.GetFullPath(string.Concat(FileConnectorConfiguration.SourceFileLocation, @"\", keyValuePair.Value));
|
|
||||||
sourceArchiveFile = Path.GetFullPath(string.Concat(sourceFileLocation, @"\", sourceFileFilter));
|
|
||||||
targetFileLocation = Path.GetFullPath(string.Concat(FileConnectorConfiguration.TargetFileLocation, @"\", keyValuePair.Value));
|
|
||||||
if (!File.Exists(sourceArchiveFile))
|
|
||||||
continue;
|
|
||||||
if (!DummyRuns.ContainsKey(monARessource))
|
|
||||||
DummyRuns.Add(monARessource, new List<long>());
|
|
||||||
tuples.Add(new Tuple<string, string, string, string, int>(monARessource, sourceFileLocation, targetFileLocation, sourceArchiveFile, 0));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File.AppendAllLines(traceDummyFile, from l in tuples select l.Item4);
|
|
||||||
if (tuples.Any())
|
|
||||||
{
|
|
||||||
_LastDummyRunIndex += 1;
|
|
||||||
if (_LastDummyRunIndex >= tuples.Count)
|
|
||||||
_LastDummyRunIndex = 0;
|
|
||||||
monARessource = tuples[_LastDummyRunIndex].Item1;
|
|
||||||
sourceFileLocation = tuples[_LastDummyRunIndex].Item2;
|
|
||||||
targetFileLocation = tuples[_LastDummyRunIndex].Item3;
|
|
||||||
sourceArchiveFile = tuples[_LastDummyRunIndex].Item4;
|
|
||||||
//fileCount = tuples[_LastDummyRunIndex].Item5;
|
|
||||||
tuples.Clear();
|
|
||||||
if (long.TryParse(Path.GetFileNameWithoutExtension(sourceArchiveFile).Replace("x", string.Empty), out long sequence))
|
|
||||||
{
|
|
||||||
if (!DummyRuns[monARessource].Contains(sequence))
|
|
||||||
DummyRuns[monARessource].Add(sequence);
|
|
||||||
inProcessDirectory = string.Concat(ProgressPath, @"\", monARessource, @"\Dummy_in process\", sequence);
|
|
||||||
checkDirectory = inProcessDirectory;
|
|
||||||
if (!Directory.Exists(checkDirectory))
|
|
||||||
Directory.CreateDirectory(checkDirectory);
|
|
||||||
files = Directory.GetFiles(checkDirectory, "*", SearchOption.AllDirectories);
|
|
||||||
fileCount = files.Length;
|
|
||||||
if (files.Any())
|
|
||||||
{
|
|
||||||
if (files.Length > 250)
|
|
||||||
throw new Exception("Safety net!");
|
|
||||||
try
|
|
||||||
{
|
|
||||||
foreach (string file in files)
|
|
||||||
File.Delete(file);
|
|
||||||
}
|
|
||||||
catch (Exception) { }
|
|
||||||
}
|
|
||||||
tuples.Add(new Tuple<string, string, string, string, int>(monARessource, sourceArchiveFile, inProcessDirectory, checkDirectory, fileCount));
|
|
||||||
checkDirectory = targetFileLocation;
|
|
||||||
files = Directory.GetFiles(checkDirectory, string.Concat("*", sequence, "*"), SearchOption.TopDirectoryOnly);
|
|
||||||
fileCount = files.Length;
|
|
||||||
tuples.Add(new Tuple<string, string, string, string, int>(monARessource, sourceArchiveFile, inProcessDirectory, checkDirectory, fileCount));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (tuples.Any())
|
|
||||||
CallbackIsDummy(traceDummyFile, tuples, FileConnectorConfiguration.IncludeSubDirectories.Value, includeSubDirectoriesExtra: false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Callback(object state)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (Duplicator is null)
|
|
||||||
{
|
|
||||||
if (File.Exists(_ReportFullPath))
|
|
||||||
File.Delete(_ReportFullPath);
|
|
||||||
File.WriteAllText(_ReportFullPath, string.Empty);
|
|
||||||
}
|
|
||||||
else if (Duplicator.Value == Level.IsDummy)
|
|
||||||
CallbackIsDummy();
|
|
||||||
else
|
|
||||||
throw new Exception();
|
|
||||||
}
|
|
||||||
catch (Exception exception)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Eaf.Core.Smtp.ISmtp smtp = Eaf.Core.Backbone.Instance.GetBackboneComponentsOfType<Eaf.Core.Smtp.ISmtp>().SingleOrDefault();
|
|
||||||
Eaf.Core.Smtp.EmailMessage emailMessage = new Eaf.Core.Smtp.EmailMessage(string.Concat("Exception:", EquipmentElementName), string.Concat(exception.Message, Environment.NewLine, Environment.NewLine, exception.StackTrace), Eaf.Core.Smtp.MailPriority.High);
|
|
||||||
smtp.Send(emailMessage);
|
|
||||||
}
|
|
||||||
catch (Exception) { }
|
|
||||||
}
|
|
||||||
try
|
|
||||||
{
|
|
||||||
TimeSpan timeSpan;
|
|
||||||
if (IsDatabaseExportToIPDSF)
|
|
||||||
timeSpan = new TimeSpan(DateTime.Now.AddMinutes(1).Ticks - DateTime.Now.Ticks);
|
|
||||||
else if (IsSourceTimer)
|
|
||||||
timeSpan = new TimeSpan(DateTime.Now.AddMinutes(15).Ticks - DateTime.Now.Ticks);
|
|
||||||
else if (Duplicator.HasValue && Duplicator.Value == Level.IsDummy)
|
|
||||||
timeSpan = new TimeSpan(DateTime.Now.AddSeconds(FileConnectorConfiguration.FileScanningIntervalInSeconds.Value).Ticks - DateTime.Now.Ticks);
|
|
||||||
else if (Duplicator.HasValue)
|
|
||||||
timeSpan = new TimeSpan(DateTime.Now.AddSeconds(30).Ticks - DateTime.Now.Ticks);
|
|
||||||
else
|
|
||||||
timeSpan = new TimeSpan(DateTime.Now.AddDays(.5).Ticks - DateTime.Now.Ticks);
|
|
||||||
if (!(_Timer is null))
|
|
||||||
_Timer.Change((long)timeSpan.TotalMilliseconds, Timeout.Infinite);
|
|
||||||
else
|
|
||||||
_Timer = new Timer(Callback, null, (long)timeSpan.TotalMilliseconds, Timeout.Infinite);
|
|
||||||
}
|
|
||||||
catch (Exception exception)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Eaf.Core.Smtp.ISmtp smtp = Eaf.Core.Backbone.Instance.GetBackboneComponentsOfType<Eaf.Core.Smtp.ISmtp>().SingleOrDefault();
|
|
||||||
Eaf.Core.Smtp.EmailMessage emailMessage = new Eaf.Core.Smtp.EmailMessage(string.Concat("Exception:", EquipmentElementName), string.Concat(exception.Message, Environment.NewLine, Environment.NewLine, exception.StackTrace), Eaf.Core.Smtp.MailPriority.High);
|
|
||||||
smtp.Send(emailMessage);
|
|
||||||
}
|
|
||||||
catch (Exception) { }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Tuple<string, JsonElement?, List<FileInfo>> IsManualOIEntry(string reportFullPath)
|
|
||||||
{
|
|
||||||
Tuple<string, JsonElement?, List<FileInfo>> results;
|
|
||||||
string monARessource;
|
|
||||||
const string site = "sjc";
|
|
||||||
string equipment = string.Empty;
|
|
||||||
string description = string.Empty;
|
|
||||||
string stateName = "MANUAL_OI_ENTRY";
|
|
||||||
string json = File.ReadAllText(reportFullPath);
|
|
||||||
JsonElement jsonElement = JsonSerializer.Deserialize<JsonElement>(json);
|
|
||||||
results = new Tuple<string, JsonElement?, List<FileInfo>>(string.Empty, jsonElement, new List<FileInfo>());
|
|
||||||
foreach (JsonProperty jsonProperty in jsonElement.EnumerateObject())
|
|
||||||
{
|
|
||||||
if (jsonProperty.Name == "Equipment")
|
|
||||||
equipment = jsonProperty.Value.ToString();
|
|
||||||
else if (jsonProperty.Name == "Description")
|
|
||||||
description = jsonProperty.Value.ToString();
|
|
||||||
}
|
|
||||||
if (string.IsNullOrEmpty(equipment))
|
|
||||||
monARessource = CellName;
|
|
||||||
else
|
|
||||||
monARessource = equipment;
|
|
||||||
const string monInURL = "http://moninhttp.sjc.infineon.com/input/text";
|
|
||||||
MonIn monIn = MonIn.GetInstance(monInURL);
|
|
||||||
if (EafHosted)
|
|
||||||
monIn.SendStatus(site, monARessource, stateName, State.Warning, description);
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,410 +0,0 @@
|
|||||||
using Adaptation.Shared;
|
|
||||||
using Adaptation.Shared.Metrology;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text.Json;
|
|
||||||
|
|
||||||
namespace Adaptation.Helpers
|
|
||||||
{
|
|
||||||
|
|
||||||
public partial class ProcessData
|
|
||||||
{
|
|
||||||
|
|
||||||
public class FileRead
|
|
||||||
{
|
|
||||||
|
|
||||||
public class Description : IProcessDataDescription
|
|
||||||
{
|
|
||||||
|
|
||||||
public int Test { get; set; }
|
|
||||||
public int Count { get; set; }
|
|
||||||
public int Index { get; set; }
|
|
||||||
//
|
|
||||||
public string EventName { get; set; }
|
|
||||||
public string NullData { get; set; }
|
|
||||||
public string JobID { get; set; }
|
|
||||||
public string Sequence { get; set; }
|
|
||||||
public string MesEntity { get; set; }
|
|
||||||
public string ReportFullPath { get; set; }
|
|
||||||
public string ProcessJobID { get; set; }
|
|
||||||
public string MID { get; set; }
|
|
||||||
//
|
|
||||||
public string Date { get; set; }
|
|
||||||
public string Employee { get; set; }
|
|
||||||
public string Lot { get; set; }
|
|
||||||
public string PSN { get; set; }
|
|
||||||
public string Reactor { get; set; }
|
|
||||||
public string Recipe { get; set; }
|
|
||||||
//
|
|
||||||
public string Area { get; set; }
|
|
||||||
public string Folder { get; set; }
|
|
||||||
public string HeaderUniqueId { get; set; }
|
|
||||||
public string Id { get; set; }
|
|
||||||
public string Layer { get; set; }
|
|
||||||
public string Model { get; set; }
|
|
||||||
public string Pattern { get; set; }
|
|
||||||
public string Phase { get; set; }
|
|
||||||
public string Plan { get; set; }
|
|
||||||
public string RampRate { get; set; }
|
|
||||||
public string RDS { get; set; }
|
|
||||||
public string SetupFile { get; set; }
|
|
||||||
public string StartVoltage { get; set; }
|
|
||||||
public string StopVoltage { get; set; }
|
|
||||||
public string UniqueId { get; set; }
|
|
||||||
public string Wafer { get; set; }
|
|
||||||
public string WaferSize { get; set; }
|
|
||||||
public string Zone { get; set; }
|
|
||||||
//
|
|
||||||
public string Ccomp { get; set; }
|
|
||||||
public string CondType { get; set; }
|
|
||||||
public string FlatZ { get; set; }
|
|
||||||
public string FlatZMean { get; set; }
|
|
||||||
public string FlatZRadialGradient { get; set; }
|
|
||||||
public string FlatZStdDev { get; set; }
|
|
||||||
public string GLimit { get; set; }
|
|
||||||
public string Grade { get; set; }
|
|
||||||
public string GradeMean { get; set; }
|
|
||||||
public string GradeRadialGradient { get; set; }
|
|
||||||
public string GradeStdDev { get; set; }
|
|
||||||
public string NAvg { get; set; }
|
|
||||||
public string NAvgMean { get; set; }
|
|
||||||
public string NAvgRadialGradient { get; set; }
|
|
||||||
public string NAvgStdDev { get; set; }
|
|
||||||
public string Nsl { get; set; }
|
|
||||||
public string NslMean { get; set; }
|
|
||||||
public string NslRadialGradient { get; set; }
|
|
||||||
public string NslStdDev { get; set; }
|
|
||||||
public string PhaseMean { get; set; }
|
|
||||||
public string PhaseRadialGradient { get; set; }
|
|
||||||
public string PhaseStdDev { get; set; }
|
|
||||||
public string RhoAvg { get; set; }
|
|
||||||
public string RhoAvgMean { get; set; }
|
|
||||||
public string RhoAvgRadialGradient { get; set; }
|
|
||||||
public string RhoAvgStdDev { get; set; }
|
|
||||||
public string RhoMethod { get; set; }
|
|
||||||
public string Rhosl { get; set; }
|
|
||||||
public string RhoslMean { get; set; }
|
|
||||||
public string RhoslRadialGradient { get; set; }
|
|
||||||
public string RhoslStdDev { get; set; }
|
|
||||||
public string RsMean { get; set; }
|
|
||||||
public string RsRadialGradient { get; set; }
|
|
||||||
public string RsStdDev { get; set; }
|
|
||||||
public string Vd { get; set; }
|
|
||||||
public string VdMean { get; set; }
|
|
||||||
public string VdRadialGradient { get; set; }
|
|
||||||
public string VdStdDev { get; set; }
|
|
||||||
|
|
||||||
public string GetEventDescription() { return "File Has been read and parsed"; }
|
|
||||||
|
|
||||||
public List<string> GetHeaderNames(ILogic logic, ConfigDataBase configDataBase)
|
|
||||||
{
|
|
||||||
List<string> results = new List<string>
|
|
||||||
{
|
|
||||||
nameof(Date),
|
|
||||||
nameof(Employee),
|
|
||||||
nameof(Lot),
|
|
||||||
nameof(PSN),
|
|
||||||
nameof(Reactor),
|
|
||||||
nameof(Recipe)
|
|
||||||
};
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<string> GetDetailNames(ILogic logic, ConfigDataBase configDataBase)
|
|
||||||
{
|
|
||||||
List<string> results = new List<string>
|
|
||||||
{
|
|
||||||
nameof(Area),
|
|
||||||
nameof(Folder),
|
|
||||||
nameof(HeaderUniqueId),
|
|
||||||
nameof(Id),
|
|
||||||
nameof(Layer),
|
|
||||||
nameof(Model),
|
|
||||||
nameof(Pattern),
|
|
||||||
nameof(Phase),
|
|
||||||
nameof(Plan),
|
|
||||||
nameof(RampRate),
|
|
||||||
nameof(RDS),
|
|
||||||
nameof(SetupFile),
|
|
||||||
nameof(StartVoltage),
|
|
||||||
nameof(StopVoltage),
|
|
||||||
nameof(UniqueId),
|
|
||||||
nameof(Wafer),
|
|
||||||
nameof(WaferSize),
|
|
||||||
nameof(Zone)
|
|
||||||
};
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<string> GetParameterNames(ILogic logic, ConfigDataBase configDataBase)
|
|
||||||
{
|
|
||||||
List<string> results = new List<string>
|
|
||||||
{
|
|
||||||
nameof(Ccomp),
|
|
||||||
nameof(CondType),
|
|
||||||
nameof(FlatZ),
|
|
||||||
nameof(FlatZMean),
|
|
||||||
nameof(FlatZRadialGradient),
|
|
||||||
nameof(FlatZStdDev),
|
|
||||||
nameof(GLimit),
|
|
||||||
nameof(Grade),
|
|
||||||
nameof(GradeMean),
|
|
||||||
nameof(GradeRadialGradient),
|
|
||||||
nameof(GradeStdDev),
|
|
||||||
nameof(NAvg),
|
|
||||||
nameof(NAvgMean),
|
|
||||||
nameof(NAvgRadialGradient),
|
|
||||||
nameof(NAvgStdDev),
|
|
||||||
nameof(Nsl),
|
|
||||||
nameof(NslMean),
|
|
||||||
nameof(NslRadialGradient),
|
|
||||||
nameof(NslStdDev),
|
|
||||||
nameof(PhaseMean),
|
|
||||||
nameof(PhaseRadialGradient),
|
|
||||||
nameof(PhaseStdDev),
|
|
||||||
nameof(RhoAvg),
|
|
||||||
nameof(RhoAvgMean),
|
|
||||||
nameof(RhoAvgRadialGradient),
|
|
||||||
nameof(RhoAvgStdDev),
|
|
||||||
nameof(RhoMethod),
|
|
||||||
nameof(Rhosl),
|
|
||||||
nameof(RhoslMean),
|
|
||||||
nameof(RhoslRadialGradient),
|
|
||||||
nameof(RhoslStdDev),
|
|
||||||
nameof(RsMean),
|
|
||||||
nameof(RsRadialGradient),
|
|
||||||
nameof(RsStdDev),
|
|
||||||
nameof(Vd),
|
|
||||||
nameof(VdMean),
|
|
||||||
nameof(VdRadialGradient),
|
|
||||||
nameof(VdStdDev)
|
|
||||||
};
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<string> GetPairedParameterNames(ILogic logic, ConfigDataBase configDataBase)
|
|
||||||
{
|
|
||||||
List<string> results = new List<string>();
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<string> GetIgnoreParameterNames(ILogic logic, ConfigDataBase configDataBase, Test test)
|
|
||||||
{
|
|
||||||
List<string> results = new List<string>();
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<string> GetNames(ILogic logic, ConfigDataBase configDataBase)
|
|
||||||
{
|
|
||||||
List<string> results = new List<string>();
|
|
||||||
IProcessDataDescription processDataDescription = GetDefault(logic, configDataBase);
|
|
||||||
string json = JsonSerializer.Serialize(processDataDescription, processDataDescription.GetType());
|
|
||||||
object @object = JsonSerializer.Deserialize<object>(json);
|
|
||||||
if (!(@object is JsonElement jsonElement))
|
|
||||||
throw new Exception();
|
|
||||||
foreach (JsonProperty jsonProperty in jsonElement.EnumerateObject())
|
|
||||||
results.Add(jsonProperty.Name);
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IProcessDataDescription GetDisplayNames(ILogic logic, ConfigDataBase configDataBase)
|
|
||||||
{
|
|
||||||
Description result = new Description();
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IProcessDataDescription GetDefault(ILogic logic, ConfigDataBase configDataBase)
|
|
||||||
{
|
|
||||||
Description result = new Description
|
|
||||||
{
|
|
||||||
Test = -1,
|
|
||||||
Count = 0,
|
|
||||||
Index = -1,
|
|
||||||
//
|
|
||||||
EventName = configDataBase.GetEventName(),
|
|
||||||
NullData = string.Empty,
|
|
||||||
JobID = logic.Logistics.JobID,
|
|
||||||
Sequence = logic.Logistics.Sequence.ToString(),
|
|
||||||
MesEntity = logic.Logistics.MesEntity,
|
|
||||||
ReportFullPath = logic.Logistics.ReportFullPath,
|
|
||||||
ProcessJobID = logic.Logistics.ProcessJobID,
|
|
||||||
MID = logic.Logistics.MID,
|
|
||||||
//
|
|
||||||
Date = nameof(Date),
|
|
||||||
Employee = nameof(Employee),
|
|
||||||
Lot = nameof(Lot),
|
|
||||||
PSN = nameof(PSN),
|
|
||||||
Reactor = nameof(Reactor),
|
|
||||||
Recipe = nameof(Recipe),
|
|
||||||
//
|
|
||||||
Area = nameof(Area),
|
|
||||||
Folder = nameof(Folder),
|
|
||||||
HeaderUniqueId = nameof(HeaderUniqueId),
|
|
||||||
Id = nameof(Id),
|
|
||||||
Layer = nameof(Layer),
|
|
||||||
Model = nameof(Model),
|
|
||||||
Pattern = nameof(Pattern),
|
|
||||||
Phase = nameof(Phase),
|
|
||||||
Plan = nameof(Plan),
|
|
||||||
RampRate = nameof(RampRate),
|
|
||||||
RDS = nameof(RDS),
|
|
||||||
SetupFile = nameof(SetupFile),
|
|
||||||
StartVoltage = nameof(StartVoltage),
|
|
||||||
StopVoltage = nameof(StopVoltage),
|
|
||||||
UniqueId = nameof(UniqueId),
|
|
||||||
Wafer = nameof(Wafer),
|
|
||||||
WaferSize = nameof(WaferSize),
|
|
||||||
Zone = nameof(Zone),
|
|
||||||
//
|
|
||||||
Ccomp = nameof(Ccomp),
|
|
||||||
CondType = nameof(CondType),
|
|
||||||
FlatZ = nameof(FlatZ),
|
|
||||||
FlatZMean = nameof(FlatZMean),
|
|
||||||
FlatZRadialGradient = nameof(FlatZRadialGradient),
|
|
||||||
FlatZStdDev = nameof(FlatZStdDev),
|
|
||||||
GLimit = nameof(GLimit),
|
|
||||||
Grade = nameof(Grade),
|
|
||||||
GradeMean = nameof(GradeMean),
|
|
||||||
GradeRadialGradient = nameof(GradeRadialGradient),
|
|
||||||
GradeStdDev = nameof(GradeStdDev),
|
|
||||||
NAvg = nameof(NAvg),
|
|
||||||
NAvgMean = nameof(NAvgMean),
|
|
||||||
NAvgRadialGradient = nameof(NAvgRadialGradient),
|
|
||||||
NAvgStdDev = nameof(NAvgStdDev),
|
|
||||||
Nsl = nameof(Nsl),
|
|
||||||
NslMean = nameof(NslMean),
|
|
||||||
NslRadialGradient = nameof(NslRadialGradient),
|
|
||||||
NslStdDev = nameof(NslStdDev),
|
|
||||||
PhaseMean = nameof(PhaseMean),
|
|
||||||
PhaseRadialGradient = nameof(PhaseRadialGradient),
|
|
||||||
PhaseStdDev = nameof(PhaseStdDev),
|
|
||||||
RhoAvg = nameof(RhoAvg),
|
|
||||||
RhoAvgMean = nameof(RhoAvgMean),
|
|
||||||
RhoAvgRadialGradient = nameof(RhoAvgRadialGradient),
|
|
||||||
RhoAvgStdDev = nameof(RhoAvgStdDev),
|
|
||||||
RhoMethod = nameof(RhoMethod),
|
|
||||||
Rhosl = nameof(Rhosl),
|
|
||||||
RhoslMean = nameof(RhoslMean),
|
|
||||||
RhoslRadialGradient = nameof(RhoslRadialGradient),
|
|
||||||
RhoslStdDev = nameof(RhoslStdDev),
|
|
||||||
RsMean = nameof(RsMean),
|
|
||||||
RsRadialGradient = nameof(RsRadialGradient),
|
|
||||||
RsStdDev = nameof(RsStdDev),
|
|
||||||
Vd = nameof(Vd),
|
|
||||||
VdMean = nameof(VdMean),
|
|
||||||
VdRadialGradient = nameof(VdRadialGradient),
|
|
||||||
VdStdDev = nameof(VdStdDev),
|
|
||||||
};
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<IProcessDataDescription> GetDescription(ILogic logic, ConfigDataBase configDataBase, List<Test> tests, IProcessData iProcessData)
|
|
||||||
{
|
|
||||||
List<IProcessDataDescription> results = new List<IProcessDataDescription>();
|
|
||||||
if (iProcessData is null || !(iProcessData is ProcessData processData) || processData.Header is null || !processData.Details.Any())
|
|
||||||
results.Add(GetDefault(logic, configDataBase));
|
|
||||||
else
|
|
||||||
{
|
|
||||||
string nullData;
|
|
||||||
Description description;
|
|
||||||
object configDataNullData = ConfigData.NullData;
|
|
||||||
if (configDataNullData is null)
|
|
||||||
nullData = string.Empty;
|
|
||||||
else
|
|
||||||
nullData = configDataNullData.ToString();
|
|
||||||
for (int i = 0; i < processData.Details.Count; i++)
|
|
||||||
{
|
|
||||||
description = new Description
|
|
||||||
{
|
|
||||||
Test = (int)tests[i],
|
|
||||||
Count = tests.Count,
|
|
||||||
Index = i,
|
|
||||||
//
|
|
||||||
EventName = configDataBase.GetEventName(),
|
|
||||||
NullData = nullData,
|
|
||||||
JobID = logic.Logistics.JobID,
|
|
||||||
Sequence = logic.Logistics.Sequence.ToString(),
|
|
||||||
MesEntity = logic.Logistics.MesEntity,
|
|
||||||
ReportFullPath = logic.Logistics.ReportFullPath,
|
|
||||||
ProcessJobID = logic.Logistics.ProcessJobID,
|
|
||||||
MID = logic.Logistics.MID,
|
|
||||||
//
|
|
||||||
Date = processData.Header.Date,
|
|
||||||
Employee = processData.Header.Employee,
|
|
||||||
Lot = processData.Header.Lot,
|
|
||||||
PSN = processData.Header.PSN,
|
|
||||||
Reactor = processData.Header.Reactor,
|
|
||||||
Recipe = string.Empty,
|
|
||||||
//
|
|
||||||
Area = processData.Header.Area,
|
|
||||||
Folder = processData.Header.Folder,
|
|
||||||
HeaderUniqueId = processData.Details[i].HeaderUniqueId,
|
|
||||||
Id = string.Empty,
|
|
||||||
Layer = processData.Header.Layer,
|
|
||||||
Model = processData.Header.Model,
|
|
||||||
Pattern = processData.Header.Pattern,
|
|
||||||
Phase = processData.Details[i].Phase,
|
|
||||||
Plan = processData.Header.Plan,
|
|
||||||
RampRate = processData.Header.RampRate,
|
|
||||||
RDS = processData.Header.RDS,
|
|
||||||
SetupFile = processData.Header.SetupFile,
|
|
||||||
StartVoltage = processData.Header.StartVoltage,
|
|
||||||
StopVoltage = processData.Header.StopVoltage,
|
|
||||||
UniqueId = processData.Details[i].UniqueId,
|
|
||||||
Wafer = processData.Header.Wafer,
|
|
||||||
WaferSize = processData.Header.WaferSize,
|
|
||||||
Zone = processData.Header.Zone,
|
|
||||||
//
|
|
||||||
Ccomp = processData.Header.Ccomp,
|
|
||||||
CondType = processData.Header.CondType,
|
|
||||||
FlatZ = processData.Details[i].FlatZ,
|
|
||||||
FlatZMean = processData.Header.FlatZMean,
|
|
||||||
FlatZRadialGradient = processData.Header.FlatZRadialGradient,
|
|
||||||
FlatZStdDev = processData.Header.FlatZStdDev,
|
|
||||||
GLimit = processData.Header.GLimit,
|
|
||||||
Grade = processData.Details[i].Grade,
|
|
||||||
GradeMean = processData.Header.GradeMean,
|
|
||||||
GradeRadialGradient = processData.Header.GradeRadialGradient,
|
|
||||||
GradeStdDev = processData.Header.GradeStdDev,
|
|
||||||
NAvg = processData.Details[i].NAvg,
|
|
||||||
NAvgMean = processData.Header.NAvgMean,
|
|
||||||
NAvgRadialGradient = processData.Header.NAvgRadialGradient,
|
|
||||||
NAvgStdDev = processData.Header.NAvgStdDev,
|
|
||||||
Nsl = processData.Details[i].Nsl,
|
|
||||||
NslMean = processData.Header.NslMean,
|
|
||||||
NslRadialGradient = processData.Header.NslRadialGradient,
|
|
||||||
NslStdDev = processData.Header.NslStdDev,
|
|
||||||
PhaseMean = processData.Header.PhaseMean,
|
|
||||||
PhaseRadialGradient = processData.Header.PhaseRadialGradient,
|
|
||||||
PhaseStdDev = processData.Header.PhaseStdDev,
|
|
||||||
RhoAvg = processData.Details[i].RhoAvg,
|
|
||||||
RhoAvgMean = processData.Header.RhoAvgMean,
|
|
||||||
RhoAvgRadialGradient = processData.Header.RhoAvgRadialGradient,
|
|
||||||
RhoAvgStdDev = processData.Header.RhoAvgStdDev,
|
|
||||||
RhoMethod = processData.Header.RhoMethod,
|
|
||||||
Rhosl = processData.Details[i].Rhosl,
|
|
||||||
RhoslMean = processData.Header.RhoslMean,
|
|
||||||
RhoslRadialGradient = processData.Header.RhoslRadialGradient,
|
|
||||||
RhoslStdDev = processData.Header.RhoslStdDev,
|
|
||||||
RsMean = processData.Header.RsMean,
|
|
||||||
RsRadialGradient = processData.Header.RsRadialGradient,
|
|
||||||
RsStdDev = processData.Header.RsStdDev,
|
|
||||||
Vd = processData.Details[i].Vd,
|
|
||||||
VdMean = processData.Header.VdMean,
|
|
||||||
VdRadialGradient = processData.Header.VdRadialGradient,
|
|
||||||
VdStdDev = processData.Header.VdStdDev
|
|
||||||
};
|
|
||||||
results.Add(description);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,32 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Adaptation.Helpers
|
|
||||||
{
|
|
||||||
|
|
||||||
public partial class ProcessData
|
|
||||||
{
|
|
||||||
|
|
||||||
public class HgProbeDetail
|
|
||||||
{
|
|
||||||
|
|
||||||
public string FlatZ { get; set; }
|
|
||||||
public string Grade { get; set; }
|
|
||||||
public string HeaderUniqueId { get; set; }
|
|
||||||
public string NAvg { get; set; }
|
|
||||||
public string Nsl { get; set; }
|
|
||||||
public string Phase { get; set; }
|
|
||||||
public string RhoAvg { get; set; }
|
|
||||||
public string Rhosl { get; set; }
|
|
||||||
public string UniqueId { get; set; }
|
|
||||||
public string Vd { get; set; }
|
|
||||||
|
|
||||||
public override string ToString()
|
|
||||||
{
|
|
||||||
return string.Concat(FlatZ, ";", Grade);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,70 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Adaptation.Helpers
|
|
||||||
{
|
|
||||||
|
|
||||||
public partial class ProcessData
|
|
||||||
{
|
|
||||||
|
|
||||||
public class HgProbeFile
|
|
||||||
{
|
|
||||||
|
|
||||||
public string JobID { get; set; }
|
|
||||||
public string MesEntity { get; set; }
|
|
||||||
public string Area { get; set; }
|
|
||||||
public string Ccomp { get; set; }
|
|
||||||
public string CondType { get; set; }
|
|
||||||
public string Date { get; set; }
|
|
||||||
public string Employee { get; set; }
|
|
||||||
public string FlatZMean { get; set; }
|
|
||||||
public string FlatZRadialGradient { get; set; }
|
|
||||||
public string FlatZStdDev { get; set; }
|
|
||||||
public string Folder { get; set; }
|
|
||||||
public string GLimit { get; set; }
|
|
||||||
public string GradeMean { get; set; }
|
|
||||||
public string GradeRadialGradient { get; set; }
|
|
||||||
public string GradeStdDev { get; set; }
|
|
||||||
public string Layer { get; set; }
|
|
||||||
public string Lot { get; set; }
|
|
||||||
public string Model { get; set; }
|
|
||||||
public string NAvgMean { get; set; }
|
|
||||||
public string NAvgRadialGradient { get; set; }
|
|
||||||
public string NAvgStdDev { get; set; }
|
|
||||||
public string NslMean { get; set; }
|
|
||||||
public string NslRadialGradient { get; set; }
|
|
||||||
public string NslStdDev { get; set; }
|
|
||||||
public string PSN { get; set; }
|
|
||||||
public string Pattern { get; set; }
|
|
||||||
public string PhaseMean { get; set; }
|
|
||||||
public string PhaseRadialGradient { get; set; }
|
|
||||||
public string PhaseStdDev { get; set; }
|
|
||||||
public string Plan { get; set; }
|
|
||||||
public string RDS { get; set; }
|
|
||||||
public string RampRate { get; set; }
|
|
||||||
public string Reactor { get; set; }
|
|
||||||
public string RhoAvgMean { get; set; }
|
|
||||||
public string RhoAvgRadialGradient { get; set; }
|
|
||||||
public string RhoAvgStdDev { get; set; }
|
|
||||||
public string RhoMethod { get; set; }
|
|
||||||
public string RhoslMean { get; set; }
|
|
||||||
public string RhoslRadialGradient { get; set; }
|
|
||||||
public string RhoslStdDev { get; set; }
|
|
||||||
public string RsMean { get; set; }
|
|
||||||
public string RsRadialGradient { get; set; }
|
|
||||||
public string RsStdDev { get; set; }
|
|
||||||
public string SetupFile { get; set; }
|
|
||||||
public string StartVoltage { get; set; }
|
|
||||||
public string StopVoltage { get; set; }
|
|
||||||
public string UniqueId { get; set; }
|
|
||||||
public string VdMean { get; set; }
|
|
||||||
public string VdRadialGradient { get; set; }
|
|
||||||
public string VdStdDev { get; set; }
|
|
||||||
public string Wafer { get; set; }
|
|
||||||
public string WaferSize { get; set; }
|
|
||||||
public string Zone { get; set; }
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,162 +0,0 @@
|
|||||||
using Adaptation.Shared.Metrology;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
namespace Adaptation.Helpers
|
|
||||||
{
|
|
||||||
|
|
||||||
public partial class ProcessData
|
|
||||||
{
|
|
||||||
public class WSRequest
|
|
||||||
{
|
|
||||||
public bool SentToMetrology { get; set; }
|
|
||||||
public bool SentToSPC { get; set; }
|
|
||||||
//
|
|
||||||
|
|
||||||
public string Area { get; set; }
|
|
||||||
public string Ccomp { get; set; }
|
|
||||||
public string CellName { get; set; }
|
|
||||||
public string CondType { get; set; }
|
|
||||||
public string Date { get; set; }
|
|
||||||
public string FlatZMean { get; set; }
|
|
||||||
public string FlatZRadialGradient { get; set; }
|
|
||||||
public string FlatZStdDev { get; set; }
|
|
||||||
public string Folder { get; set; }
|
|
||||||
public string GLimit { get; set; }
|
|
||||||
public string GradeMean { get; set; }
|
|
||||||
public string GradeRadialGradient { get; set; }
|
|
||||||
public string GradeStdDev { get; set; }
|
|
||||||
public string Id { get; set; }
|
|
||||||
public string Layer { get; set; }
|
|
||||||
public string Lot { get; set; }
|
|
||||||
public string Model { get; set; }
|
|
||||||
public string NAvgMean { get; set; }
|
|
||||||
public string NAvgRadialGradient { get; set; }
|
|
||||||
public string NAvgStdDev { get; set; }
|
|
||||||
public string NslMean { get; set; }
|
|
||||||
public string NslRadialGradient { get; set; }
|
|
||||||
public string NslStdDev { get; set; }
|
|
||||||
public string Operator { get; set; }
|
|
||||||
public string PSN { get; set; }
|
|
||||||
public string Pattern { get; set; }
|
|
||||||
public string PhaseMean { get; set; }
|
|
||||||
public string PhaseRadialGradient { get; set; }
|
|
||||||
public string PhaseStdDev { get; set; }
|
|
||||||
public string Plan { get; set; }
|
|
||||||
public string RDS { get; set; }
|
|
||||||
public string RampRate { get; set; }
|
|
||||||
public string Reactor { get; set; }
|
|
||||||
public string RhoAvgMean { get; set; }
|
|
||||||
public string RhoAvgRadialGradient { get; set; }
|
|
||||||
public string RhoAvgStdDev { get; set; }
|
|
||||||
public string RhoMethod { get; set; }
|
|
||||||
public string RhoslMean { get; set; }
|
|
||||||
public string RhoslRadialGradient { get; set; }
|
|
||||||
public string RhoslStdDev { get; set; }
|
|
||||||
public string RsMean { get; set; }
|
|
||||||
public string RsRadialGradient { get; set; }
|
|
||||||
public string RsStdDev { get; set; }
|
|
||||||
public string SetupFile { get; set; }
|
|
||||||
public string StartVoltage { get; set; }
|
|
||||||
public string StopVoltage { get; set; }
|
|
||||||
public string UniqueId { get; set; }
|
|
||||||
public string VdMean { get; set; }
|
|
||||||
public string VdRadialGradient { get; set; }
|
|
||||||
public string VdStdDev { get; set; }
|
|
||||||
public string Wafer { get; set; }
|
|
||||||
public string WaferSize { get; set; }
|
|
||||||
public string Zone { get; set; }
|
|
||||||
public List<HgProbeDetail> Details { get; protected set; }
|
|
||||||
|
|
||||||
[Obsolete("For json")] public WSRequest() { }
|
|
||||||
|
|
||||||
internal WSRequest(ILogic logic, List<FileRead.Description> descriptions)
|
|
||||||
{
|
|
||||||
Id = string.Empty;
|
|
||||||
Details = new List<HgProbeDetail>();
|
|
||||||
CellName = logic.Logistics.MesEntity;
|
|
||||||
FileRead.Description x = descriptions[0];
|
|
||||||
//Header
|
|
||||||
{
|
|
||||||
Area = x.Area;
|
|
||||||
Ccomp = x.Ccomp;
|
|
||||||
CondType = x.CondType;
|
|
||||||
Date = x.Date;
|
|
||||||
FlatZMean = x.FlatZMean;
|
|
||||||
FlatZRadialGradient = x.FlatZRadialGradient;
|
|
||||||
FlatZStdDev = x.FlatZStdDev;
|
|
||||||
Folder = x.Folder;
|
|
||||||
GLimit = x.GLimit;
|
|
||||||
GradeMean = x.GradeMean;
|
|
||||||
GradeRadialGradient = x.GradeRadialGradient;
|
|
||||||
GradeStdDev = x.GradeStdDev;
|
|
||||||
Operator = x.Employee;
|
|
||||||
Layer = x.Layer;
|
|
||||||
Lot = x.Lot;
|
|
||||||
Model = x.Model;
|
|
||||||
NAvgMean = x.NAvgMean;
|
|
||||||
NAvgRadialGradient = x.NAvgRadialGradient;
|
|
||||||
NAvgStdDev = x.NAvgStdDev;
|
|
||||||
NslMean = x.NslMean;
|
|
||||||
NslRadialGradient = x.NslRadialGradient;
|
|
||||||
NslStdDev = x.NslStdDev;
|
|
||||||
PSN = x.PSN;
|
|
||||||
Pattern = x.Pattern;
|
|
||||||
PhaseMean = x.PhaseMean;
|
|
||||||
PhaseRadialGradient = x.PhaseRadialGradient;
|
|
||||||
PhaseStdDev = x.PhaseStdDev;
|
|
||||||
Plan = x.Plan;
|
|
||||||
RDS = x.RDS;
|
|
||||||
RampRate = x.RampRate;
|
|
||||||
Reactor = x.Reactor;
|
|
||||||
RhoAvgMean = x.RhoAvgMean;
|
|
||||||
RhoAvgRadialGradient = x.RhoAvgRadialGradient;
|
|
||||||
RhoAvgStdDev = x.RhoAvgStdDev;
|
|
||||||
RhoMethod = x.RhoMethod;
|
|
||||||
RhoslMean = x.RhoslMean;
|
|
||||||
RhoslRadialGradient = x.RhoslRadialGradient;
|
|
||||||
RhoslStdDev = x.RhoslStdDev;
|
|
||||||
RsMean = x.RsMean;
|
|
||||||
RsRadialGradient = x.RsRadialGradient;
|
|
||||||
RsStdDev = x.RsStdDev;
|
|
||||||
SetupFile = x.SetupFile;
|
|
||||||
StartVoltage = x.StartVoltage;
|
|
||||||
StopVoltage = x.StopVoltage;
|
|
||||||
UniqueId = x.UniqueId;
|
|
||||||
VdMean = x.VdMean;
|
|
||||||
VdRadialGradient = x.VdRadialGradient;
|
|
||||||
VdStdDev = x.VdStdDev;
|
|
||||||
Wafer = x.Wafer;
|
|
||||||
WaferSize = x.WaferSize;
|
|
||||||
Zone = x.Zone;
|
|
||||||
}
|
|
||||||
HgProbeDetail hgProbeDetail;
|
|
||||||
foreach (FileRead.Description description in descriptions)
|
|
||||||
{
|
|
||||||
hgProbeDetail = new HgProbeDetail
|
|
||||||
{
|
|
||||||
FlatZ = description.FlatZ,
|
|
||||||
Grade = description.Grade,
|
|
||||||
HeaderUniqueId = description.HeaderUniqueId,
|
|
||||||
NAvg = description.NAvg,
|
|
||||||
Nsl = description.Nsl,
|
|
||||||
Phase = description.Phase,
|
|
||||||
RhoAvg = description.RhoAvg,
|
|
||||||
Rhosl = description.Rhosl,
|
|
||||||
UniqueId = description.UniqueId,
|
|
||||||
Vd = description.Vd
|
|
||||||
};
|
|
||||||
Details.Add(hgProbeDetail);
|
|
||||||
}
|
|
||||||
if (Date is null)
|
|
||||||
Date = logic.Logistics.DateTimeFromSequence.ToString();
|
|
||||||
if (UniqueId is null && Details.Any())
|
|
||||||
UniqueId = Details[0].HeaderUniqueId;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,453 +0,0 @@
|
|||||||
using Adaptation.Shared;
|
|
||||||
using Adaptation.Shared.Metrology;
|
|
||||||
using log4net;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Text.Json;
|
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
|
|
||||||
namespace Adaptation.Helpers
|
|
||||||
{
|
|
||||||
|
|
||||||
public partial class ProcessData : IProcessData
|
|
||||||
{
|
|
||||||
|
|
||||||
public HgProbeFile Header { get; private set; }
|
|
||||||
public List<HgProbeDetail> Details { get; private set; }
|
|
||||||
|
|
||||||
private int _I;
|
|
||||||
private readonly ILog _Log;
|
|
||||||
private string _Data;
|
|
||||||
|
|
||||||
public ProcessData(ILogic logic, ConfigData configData, List<FileInfo> fileInfoCollection)
|
|
||||||
{
|
|
||||||
Header = null;
|
|
||||||
fileInfoCollection.Clear();
|
|
||||||
_I = 0;
|
|
||||||
_Data = string.Empty;
|
|
||||||
_Log = LogManager.GetLogger(typeof(ProcessData));
|
|
||||||
Details = new List<HgProbeDetail>();
|
|
||||||
Tuple<HgProbeFile, List<HgProbeDetail>> tuple = Parse(logic, configData, fileInfoCollection);
|
|
||||||
Details.AddRange(tuple.Item2);
|
|
||||||
Header = tuple.Item1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Tuple<string, JsonElement?, List<FileInfo>> GetResults(ILogic logic, ConfigDataBase configDataBase, List<FileInfo> fileInfoCollection)
|
|
||||||
{
|
|
||||||
Tuple<string, JsonElement?, List<FileInfo>> results;
|
|
||||||
if (!(configDataBase is ConfigData configData))
|
|
||||||
throw new Exception();
|
|
||||||
List<Test> tests = new List<Test>();
|
|
||||||
List<IProcessDataDescription> descriptions;
|
|
||||||
EventName eventName = configData.GetEventNameValue();
|
|
||||||
if (eventName == EventName.FileRead && Details.Any())
|
|
||||||
{
|
|
||||||
foreach (var item in Details)
|
|
||||||
tests.Add(Test.HgCV);
|
|
||||||
descriptions = configData.GetDescription(logic, tests, this);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
throw new Exception();
|
|
||||||
if (!configData.EafHosted)
|
|
||||||
{
|
|
||||||
new FileRead.Description().GetDescription(logic, configData, tests, this);
|
|
||||||
}
|
|
||||||
if (tests.Count != descriptions.Count)
|
|
||||||
throw new Exception();
|
|
||||||
for (int i = 0; i < tests.Count; i++)
|
|
||||||
{
|
|
||||||
if (descriptions[i].Test != (int)tests[i])
|
|
||||||
throw new Exception();
|
|
||||||
}
|
|
||||||
string json;
|
|
||||||
if (descriptions[0] is Duplicator.Description)
|
|
||||||
{
|
|
||||||
List<Duplicator.Description> duplicatorDescriptions = (from l in descriptions select (Duplicator.Description)l).ToList();
|
|
||||||
json = JsonSerializer.Serialize(duplicatorDescriptions, duplicatorDescriptions.GetType());
|
|
||||||
}
|
|
||||||
else if (descriptions[0] is FileRead.Description)
|
|
||||||
{
|
|
||||||
List<FileRead.Description> fileReadDescriptions = (from l in descriptions select (FileRead.Description)l).ToList();
|
|
||||||
json = JsonSerializer.Serialize(fileReadDescriptions, fileReadDescriptions.GetType());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
throw new Exception();
|
|
||||||
object @object = JsonSerializer.Deserialize<object>(json);
|
|
||||||
if (!(@object is JsonElement jsonElement))
|
|
||||||
throw new Exception();
|
|
||||||
results = new Tuple<string, JsonElement?, List<FileInfo>>(logic.Logistics.Logistics1[0], jsonElement, fileInfoCollection);
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Dictionary<Test, List<Duplicator.Description>> GetKeyValuePairs(ConfigData configData, JsonElement jsonElement, List<Duplicator.Description> processDataDescriptions, bool extra = false)
|
|
||||||
{
|
|
||||||
Dictionary<Test, List<Duplicator.Description>> results = configData.GetKeyValuePairs(processDataDescriptions);
|
|
||||||
configData.CheckProcessDataDescription(results, extra);
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static List<FileRead.Description> GetProcessDataFileReadDescriptions(ConfigData configData, JsonElement jsonElement)
|
|
||||||
{
|
|
||||||
List<FileRead.Description> results = new List<FileRead.Description>();
|
|
||||||
List<IProcessDataDescription> processDataDescriptions = configData.GetIProcessDataDescriptions(jsonElement);
|
|
||||||
foreach (IProcessDataDescription processDataDescription in processDataDescriptions)
|
|
||||||
{
|
|
||||||
if (!(processDataDescription is FileRead.Description description))
|
|
||||||
continue;
|
|
||||||
results.Add(description);
|
|
||||||
}
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetLines(ILogic logic, List<FileRead.Description> descriptions)
|
|
||||||
{
|
|
||||||
StringBuilder result = new StringBuilder();
|
|
||||||
return result.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static void PostOpenInsightMetrologyViewerAttachments(ILog log, ConfigData configData, Logistics logistics, DateTime dateTime, string logisticsSequenceMemoryDirectory, List<FileRead.Description> descriptions, string matchDirectory)
|
|
||||||
{
|
|
||||||
string[] pclFiles = Directory.GetFiles(matchDirectory, "*.pcl", SearchOption.TopDirectoryOnly);
|
|
||||||
if (pclFiles.Length != 1)
|
|
||||||
throw new Exception("Invalid source file count!");
|
|
||||||
string wsResultsMemoryFile = string.Concat(logisticsSequenceMemoryDirectory, @"\", nameof(WS.Results), ".json");
|
|
||||||
if (!File.Exists(wsResultsMemoryFile))
|
|
||||||
throw new Exception(string.Concat("Memory file <", wsResultsMemoryFile, "> doesn't exist!"));
|
|
||||||
string json = File.ReadAllText(wsResultsMemoryFile);
|
|
||||||
WS.Results metrologyWSRequest = JsonSerializer.Deserialize<WS.Results>(json);
|
|
||||||
long wsResultsHeaderID = metrologyWSRequest.HeaderID;
|
|
||||||
List<string> pdfFiles = new List<string>();
|
|
||||||
pdfFiles.AddRange(Directory.GetFiles(matchDirectory, "*.pdf_old", SearchOption.TopDirectoryOnly));
|
|
||||||
foreach (string pdfFile in pdfFiles)
|
|
||||||
File.Delete(pdfFile);
|
|
||||||
pdfFiles.Clear();
|
|
||||||
pdfFiles.AddRange(Directory.GetFiles(matchDirectory, "*.pdf", SearchOption.TopDirectoryOnly));
|
|
||||||
foreach (string pdfFile in pdfFiles)
|
|
||||||
File.Move(pdfFile, Path.ChangeExtension(pdfFile, ".pdf_old"));
|
|
||||||
pdfFiles.Clear();
|
|
||||||
foreach (string pclFile in pclFiles.OrderBy(l => l))
|
|
||||||
pdfFiles.Add(ConvertSourceFileToPdfWithChartData(configData, pclFile));
|
|
||||||
if (pdfFiles.Count == 0)
|
|
||||||
log.Debug("Invalid *.pdf file count!");
|
|
||||||
List<WS.Attachment> headerAttachments = new List<WS.Attachment> { new WS.Attachment(descriptions[0].HeaderUniqueId, "Data.pdf", pdfFiles[0]) };
|
|
||||||
WS.AttachFiles(configData.OpenInsightMetrogyViewerAPI, wsResultsHeaderID, headerAttachments, dataAttachments: null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Convert the raw data file to parsable file format - in this case from PCL to PDF
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sourceFile">source file to be converted to PDF</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
private static string ConvertSourceFileToPdf(ConfigData configData, string sourceFile)
|
|
||||||
{
|
|
||||||
string result = Path.ChangeExtension(sourceFile, ".pdf");
|
|
||||||
if (!File.Exists(result))
|
|
||||||
{
|
|
||||||
//string arguments = string.Concat("-i \"", sourceFile, "\" -o \"", result, "\"");
|
|
||||||
string arguments = string.Concat("-dSAFER -dBATCH -dNOPAUSE -dFIXEDMEDIA -dFitPage -dAutoRotatePages=/All -dDEVICEWIDTHPOINTS=792 -dDEVICEHEIGHTPOINTS=612 -sOutputFile=\"", result, "\" -sDEVICE=pdfwrite \"", sourceFile, "\"");
|
|
||||||
//Process process = Process.Start(configData.LincPDFCFileName, arguments);
|
|
||||||
Process process = Process.Start(configData.GhostPCLFileName, arguments);
|
|
||||||
process.WaitForExit(30000);
|
|
||||||
if (!File.Exists(result))
|
|
||||||
throw new Exception("PDF file wasn't created");
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Convert the raw data file to parsable file format - in this case from PCL to PDF
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sourceFile">source file to be converted to PDF</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
private static string ConvertSourceFileToPdfWithChartData(ConfigData configData, string sourceFile)
|
|
||||||
{
|
|
||||||
string result = Path.ChangeExtension(sourceFile, ".pdf");
|
|
||||||
if (!File.Exists(result))
|
|
||||||
{
|
|
||||||
string arguments = string.Concat("-i \"", sourceFile, "\" -o \"", result, "\"");
|
|
||||||
//string arguments = string.Concat("-dSAFER -dBATCH -dNOPAUSE -dFIXEDMEDIA -dFitPage -dAutoRotatePages=/All -dDEVICEWIDTHPOINTS=792 -dDEVICEHEIGHTPOINTS=612 -sOutputFile=\"", result, "\" -sDEVICE=pdfwrite \"", sourceFile, "\"");
|
|
||||||
Process process = Process.Start(configData.LincPDFCFileName, arguments);
|
|
||||||
//Process process = Process.Start(configData.GhostPCLFileName, arguments);
|
|
||||||
process.WaitForExit(30000);
|
|
||||||
if (!File.Exists(result))
|
|
||||||
throw new Exception("PDF file wasn't created");
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ScanPast(string text)
|
|
||||||
{
|
|
||||||
int num = _Data.IndexOf(text, _I);
|
|
||||||
if (num > -1)
|
|
||||||
{
|
|
||||||
_I = num + text.Length;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_I = _Data.Length;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private string GetBefore(string text)
|
|
||||||
{
|
|
||||||
int num = _Data.IndexOf(text, _I);
|
|
||||||
string text2;
|
|
||||||
if (num > -1)
|
|
||||||
{
|
|
||||||
text2 = _Data.Substring(_I, num - _I);
|
|
||||||
_I = num + text.Length;
|
|
||||||
return text2.Trim();
|
|
||||||
}
|
|
||||||
text2 = _Data.Substring(_I);
|
|
||||||
_I = _Data.Length;
|
|
||||||
return text2.Trim();
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool IsNullOrWhiteSpace(string text)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < text.Length; i++)
|
|
||||||
{
|
|
||||||
if (!char.IsWhiteSpace(text[i]))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool IsBlankLine()
|
|
||||||
{
|
|
||||||
int num = _Data.IndexOf("\n", _I);
|
|
||||||
return IsNullOrWhiteSpace((num > -1) ? _Data.Substring(_I, num - _I) : _Data.Substring(_I));
|
|
||||||
}
|
|
||||||
|
|
||||||
private string GetToEOL()
|
|
||||||
{
|
|
||||||
return GetBefore("\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
private string GetToken()
|
|
||||||
{
|
|
||||||
while (_I < _Data.Length && IsNullOrWhiteSpace(_Data.Substring(_I, 1)))
|
|
||||||
{
|
|
||||||
_I++;
|
|
||||||
}
|
|
||||||
int j;
|
|
||||||
for (j = _I; j < _Data.Length && !IsNullOrWhiteSpace(_Data.Substring(j, 1)); j++)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
string text = _Data.Substring(_I, j - _I);
|
|
||||||
_I = j;
|
|
||||||
return text.Trim();
|
|
||||||
}
|
|
||||||
|
|
||||||
private Tuple<HgProbeFile, List<HgProbeDetail>> Parse(ILogic logic, ConfigData configData, List<FileInfo> fileInfoCollection)
|
|
||||||
{
|
|
||||||
Tuple<HgProbeFile, List<HgProbeDetail>> result;
|
|
||||||
string headerText;
|
|
||||||
string sourceFileNamePdf = ConvertSourceFileToPdf(configData, logic.Logistics.ReportFullPath);
|
|
||||||
fileInfoCollection.Add(new FileInfo(sourceFileNamePdf));
|
|
||||||
string altHeaderFileName = Path.ChangeExtension(logic.Logistics.ReportFullPath, ".txt");
|
|
||||||
if (File.Exists(altHeaderFileName))
|
|
||||||
{
|
|
||||||
headerText = File.ReadAllText(altHeaderFileName);
|
|
||||||
fileInfoCollection.Add(new FileInfo(altHeaderFileName));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//Pdfbox, IKVM.AWT.WinForms
|
|
||||||
org.apache.pdfbox.pdmodel.PDDocument pdfDocument = org.apache.pdfbox.pdmodel.PDDocument.load(sourceFileNamePdf);
|
|
||||||
org.apache.pdfbox.util.PDFTextStripper stripper = new org.apache.pdfbox.util.PDFTextStripper();
|
|
||||||
headerText = stripper.getText(pdfDocument);
|
|
||||||
pdfDocument.close();
|
|
||||||
File.AppendAllText(altHeaderFileName, headerText);
|
|
||||||
fileInfoCollection.Add(new FileInfo(altHeaderFileName));
|
|
||||||
}
|
|
||||||
List<HgProbeDetail> hgProbeDetails = new List<HgProbeDetail>();
|
|
||||||
HgProbeFile hgProbeFile = new HgProbeFile { JobID = logic.Logistics.JobID, MesEntity = logic.Logistics.MesEntity, Date = DateTime.Now.ToString() };
|
|
||||||
string h = string.Empty;
|
|
||||||
if (headerText.Contains("G A T E V O L T A G E"))
|
|
||||||
throw new Exception("Ignore: GATEVOLTAGE runs are not parsed.");
|
|
||||||
if (!string.IsNullOrEmpty(headerText))
|
|
||||||
{
|
|
||||||
headerText = headerText.Replace("box", "");
|
|
||||||
headerText = headerText.Replace("bar", "");
|
|
||||||
headerText = headerText.Replace("horiz", "");
|
|
||||||
headerText = headerText.Replace("center", "");
|
|
||||||
headerText = headerText.Replace("upper", "");
|
|
||||||
headerText = headerText.Replace("lower", "");
|
|
||||||
headerText = headerText.Replace("right", "");
|
|
||||||
headerText = headerText.Replace("left", "");
|
|
||||||
headerText = headerText.Replace("thin", "");
|
|
||||||
headerText = headerText.Replace("vertical", "");
|
|
||||||
headerText = headerText.Replace("line", "");
|
|
||||||
headerText = headerText.Replace("middle", "");
|
|
||||||
headerText = headerText.Replace("side", "");
|
|
||||||
headerText = headerText.Replace("top", ""); // This will change "Stop Voltage" to "S Voltage"
|
|
||||||
headerText = headerText.Replace("corner", "");
|
|
||||||
headerText = headerText.Replace("bottom", "");
|
|
||||||
headerText = headerText.Replace("ruleunder", "_");
|
|
||||||
headerText = headerText.Replace("@", "");
|
|
||||||
headerText = headerText.Replace("*", "");
|
|
||||||
_I = 0;
|
|
||||||
_Data = headerText;
|
|
||||||
_Log.Debug($"****MERCURY-DATA [002]= {headerText}");
|
|
||||||
ScanPast("Operator:");
|
|
||||||
hgProbeFile.Employee = GetBefore("Start Voltage:");
|
|
||||||
hgProbeFile.StartVoltage = GetBefore("V");
|
|
||||||
ScanPast("Wafer :");
|
|
||||||
hgProbeFile.Wafer = GetBefore("S Voltage :"); // This is actually "Stop Voltage"
|
|
||||||
hgProbeFile.StopVoltage = GetBefore("V");
|
|
||||||
ScanPast("Lot :");
|
|
||||||
if (headerText.Contains("Ramp Rate :"))
|
|
||||||
hgProbeFile.Lot = GetBefore("Ramp Rate :");
|
|
||||||
else if (headerText.Contains("Forward Rate :"))
|
|
||||||
hgProbeFile.Lot = GetBefore("Forward Rate :");
|
|
||||||
else if (headerText.Contains("Conduct Type:"))
|
|
||||||
hgProbeFile.Lot = GetBefore("Conduct Type:");
|
|
||||||
else
|
|
||||||
hgProbeFile.Lot = string.Empty;
|
|
||||||
// Remove illegal characters \/:*?"<>| found in the Lot.
|
|
||||||
hgProbeFile.Lot = Regex.Replace(hgProbeFile.Lot, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
|
|
||||||
hgProbeFile.RampRate = GetBefore("mV/sec");
|
|
||||||
ScanPast("Plan :");
|
|
||||||
hgProbeFile.Plan = GetBefore("G limit :");
|
|
||||||
//hgProbeFile.GLimit = GetBefore("S ");
|
|
||||||
hgProbeFile.GLimit = GetBefore("S");
|
|
||||||
hgProbeFile.Date = DateTime.Now.ToString();
|
|
||||||
ScanPast("Setup File:");
|
|
||||||
//hgProbeFile.SetupFile = GetBefore("O O");
|
|
||||||
hgProbeFile.SetupFile = GetBefore("O O");
|
|
||||||
ScanPast("Wafer size :");
|
|
||||||
hgProbeFile.WaferSize = GetBefore("mm");
|
|
||||||
ScanPast("Folder :");
|
|
||||||
//hgProbeFile.Folder = GetBefore("N N");
|
|
||||||
hgProbeFile.Folder = GetBefore("N N");
|
|
||||||
ScanPast("Ccomp : ");
|
|
||||||
hgProbeFile.Ccomp = GetBefore("pF");
|
|
||||||
ScanPast("Pattern :");
|
|
||||||
//hgProbeFile.Pattern = GetBefore("C C");
|
|
||||||
hgProbeFile.Pattern = GetBefore("C C");
|
|
||||||
ScanPast("Area:");
|
|
||||||
hgProbeFile.Area = GetBefore("cm2");
|
|
||||||
ScanPast("Cond Type :");
|
|
||||||
hgProbeFile.CondType = GetBefore("Rho Method:");
|
|
||||||
//hgProbeFile.RhoMethod = GetBefore("N N");
|
|
||||||
hgProbeFile.RhoMethod = GetBefore("N N");
|
|
||||||
ScanPast("Model :");
|
|
||||||
//hgProbeFile.Model = GetBefore("T T");
|
|
||||||
hgProbeFile.Model = GetBefore("T T");
|
|
||||||
ScanPast("Navg :");
|
|
||||||
hgProbeFile.NAvgMean = GetToken();
|
|
||||||
hgProbeFile.NAvgStdDev = GetToken();
|
|
||||||
hgProbeFile.NAvgRadialGradient = GetToken();
|
|
||||||
ScanPast("Nsl :");
|
|
||||||
hgProbeFile.NslMean = GetToken();
|
|
||||||
hgProbeFile.NslStdDev = GetToken();
|
|
||||||
hgProbeFile.NslRadialGradient = GetToken();
|
|
||||||
ScanPast("Vd :");
|
|
||||||
hgProbeFile.VdMean = GetToken();
|
|
||||||
hgProbeFile.VdStdDev = GetToken();
|
|
||||||
hgProbeFile.VdRadialGradient = GetToken();
|
|
||||||
ScanPast("Flat Z:");
|
|
||||||
hgProbeFile.FlatZMean = GetToken();
|
|
||||||
hgProbeFile.FlatZStdDev = GetToken();
|
|
||||||
hgProbeFile.FlatZRadialGradient = GetToken();
|
|
||||||
ScanPast("Rhoavg:");
|
|
||||||
hgProbeFile.RhoAvgMean = GetToken();
|
|
||||||
hgProbeFile.RhoAvgStdDev = GetToken();
|
|
||||||
hgProbeFile.RhoAvgRadialGradient = GetToken();
|
|
||||||
ScanPast("Rhosl :");
|
|
||||||
hgProbeFile.RhoslMean = GetToken();
|
|
||||||
hgProbeFile.RhoslStdDev = GetToken();
|
|
||||||
hgProbeFile.RhoslRadialGradient = GetToken();
|
|
||||||
ScanPast("Phase :");
|
|
||||||
hgProbeFile.PhaseMean = GetToken();
|
|
||||||
hgProbeFile.PhaseStdDev = GetToken();
|
|
||||||
hgProbeFile.PhaseRadialGradient = GetToken();
|
|
||||||
ScanPast("Grade :");
|
|
||||||
hgProbeFile.GradeMean = GetToken();
|
|
||||||
hgProbeFile.GradeStdDev = GetToken();
|
|
||||||
hgProbeFile.GradeRadialGradient = GetToken();
|
|
||||||
ScanPast("Rs :");
|
|
||||||
hgProbeFile.RsMean = GetToken();
|
|
||||||
hgProbeFile.RsStdDev = GetToken();
|
|
||||||
hgProbeFile.RsRadialGradient = GetToken();
|
|
||||||
|
|
||||||
string lot = hgProbeFile.Lot;
|
|
||||||
string[] segments = lot.Split('-');
|
|
||||||
|
|
||||||
if (segments.Length >= 1)
|
|
||||||
hgProbeFile.Reactor = segments[0];
|
|
||||||
|
|
||||||
if (segments.Length >= 2)
|
|
||||||
hgProbeFile.RDS = segments[1];
|
|
||||||
|
|
||||||
if (segments.Length >= 3)
|
|
||||||
{
|
|
||||||
string str = segments[2];
|
|
||||||
string[] segmentsB = str.Split('.');
|
|
||||||
if (segmentsB.Length >= 1)
|
|
||||||
hgProbeFile.PSN = segmentsB[0];
|
|
||||||
if (segmentsB.Length >= 2)
|
|
||||||
hgProbeFile.Layer = segmentsB[1];
|
|
||||||
}
|
|
||||||
if (segments.Length >= 4)
|
|
||||||
hgProbeFile.Zone = segments[3];
|
|
||||||
|
|
||||||
//ScanPast("Flat Z: Grade : % Flat Z: Grade : % Flat Z: Grade : %");
|
|
||||||
ScanPast("Flat Z: Grade : % Flat Z: Grade : % Flat Z: Grade : %");
|
|
||||||
string token = GetToken();
|
|
||||||
while (!string.IsNullOrEmpty(token))
|
|
||||||
{
|
|
||||||
HgProbeDetail hgProbeDetail = new HgProbeDetail { NAvg = token };
|
|
||||||
GetToEOL();
|
|
||||||
hgProbeDetail.Nsl = GetToken();
|
|
||||||
GetToEOL();
|
|
||||||
hgProbeDetail.Vd = GetToken();
|
|
||||||
GetToEOL();
|
|
||||||
hgProbeDetail.FlatZ = GetToken();
|
|
||||||
GetToEOL();
|
|
||||||
hgProbeDetail.RhoAvg = GetToken();
|
|
||||||
GetToEOL();
|
|
||||||
hgProbeDetail.Rhosl = GetToken();
|
|
||||||
GetToEOL();
|
|
||||||
hgProbeDetail.Phase = GetToken();
|
|
||||||
GetToEOL();
|
|
||||||
hgProbeDetail.Grade = GetToken();
|
|
||||||
hgProbeDetail.UniqueId = string.Concat("_Point-", hgProbeDetails.Count + 1);
|
|
||||||
hgProbeDetails.Add(hgProbeDetail);
|
|
||||||
GetToken();
|
|
||||||
GetToken();
|
|
||||||
GetToken();
|
|
||||||
GetToken();
|
|
||||||
token = GetToken();
|
|
||||||
//if (token.Contains("LincPDF") || token.Contains("MULTIPLE"))
|
|
||||||
if (token.Contains("MULTIPLE"))
|
|
||||||
{
|
|
||||||
//ScanPast("Flat Z: Grade : % Flat Z: Grade : % Flat Z: Grade : %");
|
|
||||||
//ScanPast("Flat Z: Grade : % Flat Z: Grade : % Flat Z: Grade : %");
|
|
||||||
ScanPast("Flat Z: Grade : % Flat Z: Grade : % Flat Z: Grade : %");
|
|
||||||
ScanPast("Flat Z: Grade : % Flat Z: Grade : % Flat Z: Grade : %");
|
|
||||||
token = GetToken();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
hgProbeFile.UniqueId = string.Format("{0}_{1}_{2}", logic.Logistics.JobID, hgProbeFile.Lot, Path.GetFileNameWithoutExtension(logic.Logistics.ReportFullPath));
|
|
||||||
foreach (HgProbeDetail detail in hgProbeDetails)
|
|
||||||
{
|
|
||||||
detail.HeaderUniqueId = hgProbeFile.UniqueId;
|
|
||||||
detail.UniqueId = string.Concat(detail, detail.UniqueId);
|
|
||||||
}
|
|
||||||
fileInfoCollection.Add(new FileInfo(logic.Logistics.ReportFullPath));
|
|
||||||
result = new Tuple<HgProbeFile, List<HgProbeDetail>>(hgProbeFile, hgProbeDetails);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,13 +1,17 @@
|
|||||||
namespace Adaptation.Ifx.Eaf.Common.Configuration
|
namespace Adaptation.Ifx.Eaf.Common.Configuration;
|
||||||
{
|
|
||||||
[System.Runtime.Serialization.DataContractAttribute]
|
[System.Runtime.Serialization.DataContractAttribute]
|
||||||
public class ConnectionSetting
|
public class ConnectionSetting
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
public ConnectionSetting(string name, string value) { }
|
public ConnectionSetting(string name, string value) { }
|
||||||
|
|
||||||
[System.Runtime.Serialization.DataMemberAttribute]
|
[System.Runtime.Serialization.DataMemberAttribute]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
[System.Runtime.Serialization.DataMemberAttribute]
|
[System.Runtime.Serialization.DataMemberAttribute]
|
||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
@ -1,19 +1,23 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.Component
|
namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.Component;
|
||||||
{
|
|
||||||
public class File
|
public class File
|
||||||
{
|
{
|
||||||
public File(string filePath) { throw new NotImplementedException(); }
|
|
||||||
public File(string filePath, DateTime timeFileFound) { throw new NotImplementedException(); }
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
public File(string filePath) => throw new NotImplementedException();
|
||||||
|
public File(string filePath, DateTime timeFileFound) => throw new NotImplementedException();
|
||||||
|
|
||||||
public string Path { get; }
|
public string Path { get; }
|
||||||
public DateTime TimeFound { get; }
|
public DateTime TimeFound { get; }
|
||||||
public bool IsErrorFile { get; }
|
public bool IsErrorFile { get; }
|
||||||
public Dictionary<string, string> ContentParameters { get; }
|
public Dictionary<string, string> ContentParameters { get; }
|
||||||
|
|
||||||
public File UpdateContentParameters(Dictionary<string, string> contentParameters) { throw new NotImplementedException(); }
|
public File UpdateContentParameters(Dictionary<string, string> contentParameters) => throw new NotImplementedException();
|
||||||
public File UpdateParsingStatus(bool isErrorFile) { throw new NotImplementedException(); }
|
public File UpdateParsingStatus(bool isErrorFile) => throw new NotImplementedException();
|
||||||
}
|
|
||||||
}
|
}
|
@ -2,10 +2,15 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.Component
|
namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.Component;
|
||||||
{
|
|
||||||
public class FilePathGenerator
|
public class FilePathGenerator
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA1822
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
public const char PLACEHOLDER_IDENTIFIER = '%';
|
public const char PLACEHOLDER_IDENTIFIER = '%';
|
||||||
public const char PLACEHOLDER_SEPARATOR = ':';
|
public const char PLACEHOLDER_SEPARATOR = ':';
|
||||||
public const string PLACEHOLDER_NOT_AVAILABLE = "NA";
|
public const string PLACEHOLDER_NOT_AVAILABLE = "NA";
|
||||||
@ -15,9 +20,9 @@ namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.Component
|
|||||||
public const string PLACEHOLDER_SUB_FOLDER = "SubFolder";
|
public const string PLACEHOLDER_SUB_FOLDER = "SubFolder";
|
||||||
public const string PLACEHOLDER_CELL_NAME = "CellName";
|
public const string PLACEHOLDER_CELL_NAME = "CellName";
|
||||||
|
|
||||||
public FilePathGenerator(FileConnectorConfiguration config, Dictionary<string, string> customPattern = null) { throw new NotImplementedException(); }
|
public FilePathGenerator(FileConnectorConfiguration config, Dictionary<string, string> customPattern = null) => throw new NotImplementedException();
|
||||||
public FilePathGenerator(FileConnectorConfiguration config, File file, bool isErrorFile = false, Dictionary<string, string> customPattern = null) { throw new NotImplementedException(); }
|
public FilePathGenerator(FileConnectorConfiguration config, File file, bool isErrorFile = false, Dictionary<string, string> customPattern = null) => throw new NotImplementedException();
|
||||||
public FilePathGenerator(FileConnectorConfiguration config, string sourceFilePath, bool isErrorFile = false, Dictionary<string, string> customPattern = null) { throw new NotImplementedException(); }
|
public FilePathGenerator(FileConnectorConfiguration config, string sourceFilePath, bool isErrorFile = false, Dictionary<string, string> customPattern = null) => throw new NotImplementedException();
|
||||||
|
|
||||||
protected string SubFolderPath { get; }
|
protected string SubFolderPath { get; }
|
||||||
protected FileConnectorConfiguration Configuration { get; }
|
protected FileConnectorConfiguration Configuration { get; }
|
||||||
@ -25,11 +30,11 @@ namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.Component
|
|||||||
protected bool IsErrorFile { get; }
|
protected bool IsErrorFile { get; }
|
||||||
protected string DefaultPlaceHolderValue { get; }
|
protected string DefaultPlaceHolderValue { get; }
|
||||||
|
|
||||||
public string GetFullTargetPath() { throw new NotImplementedException(); }
|
public string GetFullTargetPath() => throw new NotImplementedException();
|
||||||
public virtual string GetTargetFileName() { throw new NotImplementedException(); }
|
public virtual string GetTargetFileName() => throw new NotImplementedException();
|
||||||
public string GetTargetFolder(bool throwExceptionIfNotExist = true) { throw new NotImplementedException(); }
|
public string GetTargetFolder(bool throwExceptionIfNotExist = true) => throw new NotImplementedException();
|
||||||
protected virtual string GetSubFolder(string folderPattern, string subFolderPath) { throw new NotImplementedException(); }
|
protected virtual string GetSubFolder(string folderPattern, string subFolderPath) => throw new NotImplementedException();
|
||||||
protected virtual string PrepareFolderPath(string targetFolderPath, string subFolderPath) { throw new NotImplementedException(); }
|
protected virtual string PrepareFolderPath(string targetFolderPath, string subFolderPath) => throw new NotImplementedException();
|
||||||
protected string ReplacePlaceholder(string inputPath) { throw new NotImplementedException(); }
|
protected string ReplacePlaceholder(string inputPath) => throw new NotImplementedException();
|
||||||
}
|
|
||||||
}
|
}
|
@ -2,8 +2,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration
|
namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration;
|
||||||
{
|
|
||||||
[System.Runtime.Serialization.DataContractAttribute]
|
[System.Runtime.Serialization.DataContractAttribute]
|
||||||
public class FileConnectorConfiguration
|
public class FileConnectorConfiguration
|
||||||
{
|
{
|
||||||
@ -85,7 +85,7 @@ namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration
|
|||||||
[System.Runtime.Serialization.DataMemberAttribute]
|
[System.Runtime.Serialization.DataMemberAttribute]
|
||||||
public string ErrorTargetFileName { get; set; }
|
public string ErrorTargetFileName { get; set; }
|
||||||
|
|
||||||
public void Initialize() { throw new NotImplementedException(); }
|
public void Initialize() => throw new NotImplementedException();
|
||||||
|
|
||||||
public enum PostProcessingModeEnum
|
public enum PostProcessingModeEnum
|
||||||
{
|
{
|
||||||
@ -132,4 +132,3 @@ namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration
|
|||||||
IgnoreOlder = 1
|
IgnoreOlder = 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
@ -2,13 +2,18 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.SelfDescription
|
namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.SelfDescription;
|
||||||
{
|
|
||||||
public class FileConnectorParameterTypeDefinitionProvider
|
public class FileConnectorParameterTypeDefinitionProvider
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA1822
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
public FileConnectorParameterTypeDefinitionProvider() { }
|
public FileConnectorParameterTypeDefinitionProvider() { }
|
||||||
|
|
||||||
public IEnumerable<ParameterTypeDefinition> GetAllParameterTypeDefinition() { return null; }
|
public IEnumerable<ParameterTypeDefinition> GetAllParameterTypeDefinition() => null;
|
||||||
public ParameterTypeDefinition GetParameterTypeDefinition(string name) { return null; }
|
public ParameterTypeDefinition GetParameterTypeDefinition(string name) => null;
|
||||||
}
|
|
||||||
}
|
}
|
@ -6,12 +6,12 @@
|
|||||||
<SccLocalPath>SAK</SccLocalPath>
|
<SccLocalPath>SAK</SccLocalPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net5.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VSTestLogger>trx</VSTestLogger>
|
<VSTestLogger>trx</VSTestLogger>
|
||||||
<VSTestResultsDirectory>../../../Trunk/DEP08EGANAIXG5/05_TestResults/TestResults</VSTestResultsDirectory>
|
<VSTestResultsDirectory>../../../../MET08RESIHGCV/05_TestResults/TestResults</VSTestResultsDirectory>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<IsWindows Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">true</IsWindows>
|
<IsWindows Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">true</IsWindows>
|
||||||
@ -28,38 +28,68 @@
|
|||||||
<DefineConstants>Linux</DefineConstants>
|
<DefineConstants>Linux</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="coverlet.collector" Version="1.3.0" />
|
<PackageReference Include="coverlet.collector" Version="3.1.0"/>
|
||||||
<PackageReference Include="External.Common.Logging.Core" Version="3.3.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0"/>
|
||||||
<PackageReference Include="External.Common.Logging" Version="3.3.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="6.0.0"/>
|
||||||
<PackageReference Include="External.Infineon.Monitoring.MonA" Version="1.2.0.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="6.0.0"/>
|
||||||
<PackageReference Include="External.Infineon.Yoda" Version="5.2.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0"/>
|
||||||
<PackageReference Include="External.log4net" Version="2.0.8"><NoWarn>NU1701</NoWarn></PackageReference>
|
<PackageReference Include="Microsoft.Extensions.Configuration.json" Version="6.0.0"/>
|
||||||
<PackageReference Include="IKVM.AWT.WinForms" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0"/>
|
||||||
<PackageReference Include="IKVM.OpenJDK.Core" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0"/>
|
||||||
<PackageReference Include="IKVM.OpenJDK.Media" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0"/>
|
||||||
<PackageReference Include="IKVM.OpenJDK.Text" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0"/>
|
||||||
<PackageReference Include="IKVM.OpenJDK.Util" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0"/>
|
||||||
<PackageReference Include="IKVM.OpenJDK.XML.API" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0"/>
|
||||||
<PackageReference Include="IKVM.Runtime" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
<PackageReference Include="MSTest.TestAdapter" Version="2.2.8"/>
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="5.0.0" />
|
<PackageReference Include="MSTest.TestFramework" Version="2.2.8"/>
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="5.0.0" />
|
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.0"/>
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="5.0.0" />
|
<PackageReference Include="System.Data.OleDb" Version="6.0.0"/>
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="5.0.0" />
|
<PackageReference Include="System.Data.SqlClient" Version="4.8.3"/>
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.json" Version="5.0.0" />
|
<PackageReference Include="System.Text.Json" Version="6.0.1"/>
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" />
|
</ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.0" />
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" />
|
<PackageReference Include="External.Common.Logging.Core" Version="3.3.1">
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="5.0.0" />
|
<NoWarn>NU1701</NoWarn>
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
|
<PackageReference Include="External.Common.Logging" Version="3.3.1">
|
||||||
<PackageReference Include="MSTest.TestAdapter" Version="2.1.1" />
|
<NoWarn>NU1701</NoWarn>
|
||||||
<PackageReference Include="MSTest.TestFramework" Version="2.1.1" />
|
</PackageReference>
|
||||||
<PackageReference Include="Pdfbox" Version="1.1.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
<PackageReference Include="External.Infineon.Monitoring.MonA" Version="1.2.0.1">
|
||||||
|
<NoWarn>NU1701</NoWarn>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="External.Infineon.Yoda" Version="5.2.1">
|
||||||
|
<NoWarn>NU1701</NoWarn>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="External.log4net" Version="2.0.8">
|
||||||
|
<NoWarn>NU1701</NoWarn>
|
||||||
|
</PackageReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="IKVM.AWT.WinForms" Version="7.2.4630.5">
|
||||||
|
<NoWarn>NU1701</NoWarn>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="IKVM.OpenJDK.Core" Version="7.2.4630.5">
|
||||||
|
<NoWarn>NU1701</NoWarn>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="IKVM.OpenJDK.Media" Version="7.2.4630.5">
|
||||||
|
<NoWarn>NU1701</NoWarn>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="IKVM.OpenJDK.Text" Version="7.2.4630.5">
|
||||||
|
<NoWarn>NU1701</NoWarn>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="IKVM.OpenJDK.Util" Version="7.2.4630.5">
|
||||||
|
<NoWarn>NU1701</NoWarn>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="IKVM.OpenJDK.XML.API" Version="7.2.4630.5">
|
||||||
|
<NoWarn>NU1701</NoWarn>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="IKVM.Runtime" Version="7.2.4630.5">
|
||||||
|
<NoWarn>NU1701</NoWarn>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Pdfbox" Version="1.1.1">
|
||||||
|
<NoWarn>NU1701</NoWarn>
|
||||||
|
</PackageReference>
|
||||||
<PackageReference Include="RoboSharp" Version="1.2.4" />
|
<PackageReference Include="RoboSharp" Version="1.2.4" />
|
||||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="5.0.0" />
|
|
||||||
<PackageReference Include="System.Data.OleDb" Version="5.0.0" />
|
|
||||||
<PackageReference Include="System.Data.SqlClient" Version="4.8.2" />
|
|
||||||
<PackageReference Include="System.Text.Json" Version="5.0.1" />
|
|
||||||
<PackageReference Include="Tibco.Rendezvous" Version="8.5.0" />
|
<PackageReference Include="Tibco.Rendezvous" Version="8.5.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Adaptation.PeerGroup.GCL.Annotations
|
namespace Adaptation.PeerGroup.GCL.Annotations;
|
||||||
{
|
|
||||||
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.Delegate, AllowMultiple = false, Inherited = true)]
|
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.Delegate, AllowMultiple = false, Inherited = true)]
|
||||||
public sealed class NotNullAttribute : Attribute
|
public sealed class NotNullAttribute : Attribute
|
||||||
{
|
{
|
||||||
public NotNullAttribute() { }
|
public NotNullAttribute() { }
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,8 +1,7 @@
|
|||||||
namespace Adaptation.PeerGroup.GCL.SecsDriver
|
namespace Adaptation.PeerGroup.GCL.SecsDriver;
|
||||||
{
|
|
||||||
public enum HsmsConnectionMode
|
public enum HsmsConnectionMode
|
||||||
{
|
{
|
||||||
Active = 0,
|
Active = 0,
|
||||||
Passive = 1
|
Passive = 1
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,8 +1,7 @@
|
|||||||
namespace Adaptation.PeerGroup.GCL.SecsDriver
|
namespace Adaptation.PeerGroup.GCL.SecsDriver;
|
||||||
{
|
|
||||||
public enum HsmsSessionMode
|
public enum HsmsSessionMode
|
||||||
{
|
{
|
||||||
MultiSession = 0,
|
MultiSession = 0,
|
||||||
SingleSession = 1
|
SingleSession = 1
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,8 +1,7 @@
|
|||||||
namespace Adaptation.PeerGroup.GCL.SecsDriver
|
namespace Adaptation.PeerGroup.GCL.SecsDriver;
|
||||||
{
|
|
||||||
public enum SecsTransportType
|
public enum SecsTransportType
|
||||||
{
|
{
|
||||||
HSMS = 0,
|
HSMS = 0,
|
||||||
Serial = 1
|
Serial = 1
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,5 +1,5 @@
|
|||||||
namespace Adaptation.PeerGroup.GCL.SecsDriver
|
namespace Adaptation.PeerGroup.GCL.SecsDriver;
|
||||||
{
|
|
||||||
public enum SerialBaudRate
|
public enum SerialBaudRate
|
||||||
{
|
{
|
||||||
Baud9600 = 0,
|
Baud9600 = 0,
|
||||||
@ -13,4 +13,3 @@
|
|||||||
Baud57600 = 8,
|
Baud57600 = 8,
|
||||||
Baud115200 = 9
|
Baud115200 = 9
|
||||||
}
|
}
|
||||||
}
|
|
@ -4,8 +4,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
|
||||||
namespace Adaptation.Shared.Duplicator
|
namespace Adaptation.Shared.Duplicator;
|
||||||
{
|
|
||||||
|
|
||||||
public class Description : IDescription, Properties.IDescription
|
public class Description : IDescription, Properties.IDescription
|
||||||
{
|
{
|
||||||
@ -24,10 +23,7 @@ namespace Adaptation.Shared.Duplicator
|
|||||||
public string MID { get; set; }
|
public string MID { get; set; }
|
||||||
public string Date { get; set; } //2021-10-23
|
public string Date { get; set; } //2021-10-23
|
||||||
|
|
||||||
string IDescription.GetEventDescription()
|
string IDescription.GetEventDescription() => "File Has been read and parsed";
|
||||||
{
|
|
||||||
return "File Has been read and parsed";
|
|
||||||
}
|
|
||||||
|
|
||||||
List<string> IDescription.GetNames(IFileRead fileRead, Logistics logistics)
|
List<string> IDescription.GetNames(IFileRead fileRead, Logistics logistics)
|
||||||
{
|
{
|
||||||
@ -116,13 +112,13 @@ namespace Adaptation.Shared.Duplicator
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Description GetDisplayNames()
|
private static Description GetDisplayNames()
|
||||||
{
|
{
|
||||||
Description result = new();
|
Description result = new();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Description GetDefault(IFileRead fileRead, Logistics logistics)
|
private static Description GetDefault(IFileRead fileRead, Logistics logistics)
|
||||||
{
|
{
|
||||||
Description result = new()
|
Description result = new()
|
||||||
{
|
{
|
||||||
@ -144,5 +140,3 @@ namespace Adaptation.Shared.Duplicator
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
@ -1,4 +1,4 @@
|
|||||||
using Adaptation.Eaf.Management.ConfigurationData.CellAutomation;
|
using Adaptation.Eaf.Management.ConfigurationData.CellAutomation;
|
||||||
using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration;
|
using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration;
|
||||||
using Adaptation.Shared.Methods;
|
using Adaptation.Shared.Methods;
|
||||||
using log4net;
|
using log4net;
|
||||||
@ -12,8 +12,7 @@ using System.Text.Json;
|
|||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
namespace Adaptation.Shared
|
namespace Adaptation.Shared;
|
||||||
{
|
|
||||||
|
|
||||||
public class FileRead : Properties.IFileRead
|
public class FileRead : Properties.IFileRead
|
||||||
{
|
{
|
||||||
@ -35,10 +34,8 @@ namespace Adaptation.Shared
|
|||||||
protected readonly Calendar _Calendar;
|
protected readonly Calendar _Calendar;
|
||||||
protected readonly bool _IsSourceTimer;
|
protected readonly bool _IsSourceTimer;
|
||||||
protected readonly string _VillachPath;
|
protected readonly string _VillachPath;
|
||||||
protected readonly int _HyphenIsArchive;
|
|
||||||
protected readonly string _ProgressPath;
|
protected readonly string _ProgressPath;
|
||||||
protected readonly string _EquipmentType;
|
protected readonly string _EquipmentType;
|
||||||
protected readonly int _HyphenIsXToArchive;
|
|
||||||
protected readonly long _BreakAfterSeconds;
|
protected readonly long _BreakAfterSeconds;
|
||||||
protected readonly string _ExceptionSubject;
|
protected readonly string _ExceptionSubject;
|
||||||
protected readonly string _CellInstanceName;
|
protected readonly string _CellInstanceName;
|
||||||
@ -66,7 +63,7 @@ namespace Adaptation.Shared
|
|||||||
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, int hyphenXToArchive, int hyphenIsArchive)
|
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)
|
||||||
{
|
{
|
||||||
_SMTP = smtp;
|
_SMTP = smtp;
|
||||||
_IsEvent = isEvent;
|
_IsEvent = isEvent;
|
||||||
@ -76,9 +73,7 @@ namespace Adaptation.Shared
|
|||||||
_Description = description;
|
_Description = description;
|
||||||
_FileParameter = fileParameter;
|
_FileParameter = fileParameter;
|
||||||
_ReportFullPath = string.Empty;
|
_ReportFullPath = string.Empty;
|
||||||
_HyphenIsArchive = hyphenIsArchive;
|
|
||||||
_CellInstanceName = cellInstanceName;
|
_CellInstanceName = cellInstanceName;
|
||||||
_HyphenIsXToArchive = hyphenXToArchive;
|
|
||||||
_Calendar = new CultureInfo("en-US").Calendar;
|
_Calendar = new CultureInfo("en-US").Calendar;
|
||||||
_Log = LogManager.GetLogger(typeof(FileRead));
|
_Log = LogManager.GetLogger(typeof(FileRead));
|
||||||
_UseCyclicalForDescription = useCyclicalForDescription;
|
_UseCyclicalForDescription = useCyclicalForDescription;
|
||||||
@ -86,9 +81,9 @@ namespace Adaptation.Shared
|
|||||||
_ModelObjectParameterDefinitions = modelObjectParameters;
|
_ModelObjectParameterDefinitions = modelObjectParameters;
|
||||||
_FileConnectorConfiguration = fileConnectorConfiguration;
|
_FileConnectorConfiguration = fileConnectorConfiguration;
|
||||||
_ParameterizedModelObjectDefinitionType = parameterizedModelObjectDefinitionType;
|
_ParameterizedModelObjectDefinitionType = parameterizedModelObjectDefinitionType;
|
||||||
_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;
|
||||||
_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('.');
|
||||||
@ -147,7 +142,7 @@ namespace Adaptation.Shared
|
|||||||
throw new Exception("_Configuration is empty?");
|
throw new Exception("_Configuration is empty?");
|
||||||
if (_FileConnectorConfiguration.TargetFileLocation.Contains('%') || _FileConnectorConfiguration.ErrorTargetFileLocation.Contains('%'))
|
if (_FileConnectorConfiguration.TargetFileLocation.Contains('%') || _FileConnectorConfiguration.ErrorTargetFileLocation.Contains('%'))
|
||||||
throw new Exception("_Configuration is incorrect for a duplicator!");
|
throw new Exception("_Configuration is incorrect for a duplicator!");
|
||||||
if (!(_FileConnectorConfiguration is null))
|
if (_FileConnectorConfiguration is not null)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(_FileConnectorConfiguration.SourceDirectoryCloaking))
|
if (string.IsNullOrEmpty(_FileConnectorConfiguration.SourceDirectoryCloaking))
|
||||||
throw new Exception("SourceDirectoryCloaking is empty?");
|
throw new Exception("SourceDirectoryCloaking is empty?");
|
||||||
@ -157,7 +152,7 @@ namespace Adaptation.Shared
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected string GetPropertyValue(string cellInstanceConnectionName, IList<ModelObjectParameterDefinition> modelObjectParameters, string propertyName)
|
protected static string GetPropertyValue(string cellInstanceConnectionName, IList<ModelObjectParameterDefinition> modelObjectParameters, string propertyName)
|
||||||
{
|
{
|
||||||
string result;
|
string result;
|
||||||
List<string> results = (from l in modelObjectParameters where l.Name == propertyName select l.Value).ToList();
|
List<string> results = (from l in modelObjectParameters where l.Name == propertyName select l.Value).ToList();
|
||||||
@ -167,7 +162,7 @@ namespace Adaptation.Shared
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ModelObjectParameterDefinition[] GetProperties(string cellInstanceConnectionName, IList<ModelObjectParameterDefinition> modelObjectParameters, string propertyNamePrefix)
|
protected static ModelObjectParameterDefinition[] GetProperties(string cellInstanceConnectionName, IList<ModelObjectParameterDefinition> modelObjectParameters, string propertyNamePrefix)
|
||||||
{
|
{
|
||||||
ModelObjectParameterDefinition[] results = (from l in modelObjectParameters where l.Name.StartsWith(propertyNamePrefix) select l).ToArray();
|
ModelObjectParameterDefinition[] results = (from l in modelObjectParameters where l.Name.StartsWith(propertyNamePrefix) select l).ToArray();
|
||||||
if (!results.Any())
|
if (!results.Any())
|
||||||
@ -175,7 +170,7 @@ namespace Adaptation.Shared
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ModelObjectParameterDefinition[] GetProperties(string cellInstanceConnectionName, IList<ModelObjectParameterDefinition> modelObjectParameters, string propertyNamePrefix, string propertyNameSuffix)
|
protected static ModelObjectParameterDefinition[] GetProperties(string cellInstanceConnectionName, IList<ModelObjectParameterDefinition> modelObjectParameters, string propertyNamePrefix, string propertyNameSuffix)
|
||||||
{
|
{
|
||||||
ModelObjectParameterDefinition[] results = (from l in modelObjectParameters where l.Name.StartsWith(propertyNamePrefix) && l.Name.EndsWith(propertyNameSuffix) select l).ToArray();
|
ModelObjectParameterDefinition[] results = (from l in modelObjectParameters where l.Name.StartsWith(propertyNamePrefix) && l.Name.EndsWith(propertyNameSuffix) select l).ToArray();
|
||||||
if (!results.Any())
|
if (!results.Any())
|
||||||
@ -192,7 +187,7 @@ namespace Adaptation.Shared
|
|||||||
|
|
||||||
protected void WaitForThread(Thread thread, List<Exception> threadExceptions)
|
protected void WaitForThread(Thread thread, List<Exception> threadExceptions)
|
||||||
{
|
{
|
||||||
if (!(thread is null))
|
if (thread is not null)
|
||||||
{
|
{
|
||||||
ThreadState threadState;
|
ThreadState threadState;
|
||||||
for (short i = 0; i < short.MaxValue; i++)
|
for (short i = 0; i < short.MaxValue; i++)
|
||||||
@ -202,7 +197,7 @@ namespace Adaptation.Shared
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
threadState = thread.ThreadState;
|
threadState = thread.ThreadState;
|
||||||
if (threadState != ThreadState.Running && threadState != ThreadState.WaitSleepJoin)
|
if (threadState is not ThreadState.Running and not ThreadState.WaitSleepJoin)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Thread.Sleep(500);
|
Thread.Sleep(500);
|
||||||
@ -221,29 +216,29 @@ namespace Adaptation.Shared
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void CreateProgressDirectory(string progressPath, Logistics logistics, int? duplicator, string[] exceptionLines)
|
protected void CreateProgressDirectory(string[] exceptionLines)
|
||||||
{
|
{
|
||||||
string progressDirectory;
|
string progressDirectory;
|
||||||
StringBuilder stringBuilder = new();
|
StringBuilder stringBuilder = new();
|
||||||
if (duplicator is null || duplicator.Value == 0)
|
if (_Hyphens == 0)
|
||||||
progressDirectory = string.Concat(progressPath, @"\EquipmentIntegration");
|
progressDirectory = Path.Combine(_ProgressPath, _CellInstanceConnectionName);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
stringBuilder.Clear();
|
_ = stringBuilder.Clear();
|
||||||
for (int i = 0; i < duplicator.Value; i++)
|
for (int i = 0; i < _Hyphens; i++)
|
||||||
{
|
{
|
||||||
if (i > 0 && (i % 2) == 0)
|
if (i > 0 && (i % 2) == 0)
|
||||||
stringBuilder.Append(' ');
|
_ = stringBuilder.Append(' ');
|
||||||
stringBuilder.Append('-');
|
_ = stringBuilder.Append('-');
|
||||||
}
|
}
|
||||||
progressDirectory = string.Concat(progressPath, @"\", (duplicator.Value + 1).ToString().PadLeft(2, '0'), " ", stringBuilder).Trim();
|
progressDirectory = string.Concat(_ProgressPath, @"\", (_Hyphens + 1).ToString().PadLeft(2, '0'), " ", stringBuilder).Trim();
|
||||||
}
|
}
|
||||||
DateTime dateTime = DateTime.Now;
|
DateTime dateTime = DateTime.Now;
|
||||||
string weekOfYear = _Calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
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);
|
progressDirectory = string.Concat(progressDirectory, @"\", dateTime.ToString("yyyy"), "_Week_", weekOfYear, @"\", _Logistics.MID, "_", _Logistics.Sequence, "_", DateTime.Now.Ticks - _Logistics.Sequence);
|
||||||
if (!Directory.Exists(progressDirectory))
|
if (!Directory.Exists(progressDirectory))
|
||||||
Directory.CreateDirectory(progressDirectory);
|
_ = Directory.CreateDirectory(progressDirectory);
|
||||||
if (!(exceptionLines is null))
|
if (exceptionLines is not null)
|
||||||
{
|
{
|
||||||
string fileName = string.Concat(progressDirectory, @"\readme.txt");
|
string fileName = string.Concat(progressDirectory, @"\readme.txt");
|
||||||
try
|
try
|
||||||
@ -255,17 +250,17 @@ namespace Adaptation.Shared
|
|||||||
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)
|
||||||
{
|
{
|
||||||
string[] results;
|
string[] results;
|
||||||
bool isErrorFile = !(exception is null);
|
bool isErrorFile = exception is not null;
|
||||||
if (!to.EndsWith(@"\"))
|
if (!to.EndsWith(@"\"))
|
||||||
string.Concat(to, @"\");
|
_ = string.Concat(to, @"\");
|
||||||
if (!isErrorFile)
|
if (!isErrorFile)
|
||||||
results = new string[] { };
|
results = Array.Empty<string>();
|
||||||
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);
|
Shared0449(to, results);
|
||||||
}
|
}
|
||||||
if (!(extractResults is null) && !(extractResults.Item4 is null) && extractResults.Item4.Any())
|
if (extractResults is not null && extractResults.Item4 is not null && extractResults.Item4.Any())
|
||||||
{
|
{
|
||||||
string itemFile;
|
string itemFile;
|
||||||
List<string> directories = new();
|
List<string> directories = new();
|
||||||
@ -276,7 +271,7 @@ namespace Adaptation.Shared
|
|||||||
itemFile = sourceFile.FullName.Replace(from, to);
|
itemFile = sourceFile.FullName.Replace(from, to);
|
||||||
Shared1880(itemFile, directories, sourceFile, isErrorFile);
|
Shared1880(itemFile, directories, sourceFile, isErrorFile);
|
||||||
}
|
}
|
||||||
else if (!isErrorFile && !(_Logistics is null))
|
else if (!isErrorFile && _Logistics is not null)
|
||||||
Shared1811(to, sourceFile);
|
Shared1811(to, sourceFile);
|
||||||
}
|
}
|
||||||
Shared0231(directories);
|
Shared0231(directories);
|
||||||
@ -284,7 +279,7 @@ namespace Adaptation.Shared
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected IEnumerable<string> GetDirectoriesRecursively(string path, string directoryNameSegment = null)
|
protected static IEnumerable<string> GetDirectoriesRecursively(string path, string directoryNameSegment = null)
|
||||||
{
|
{
|
||||||
Queue<string> queue = new();
|
Queue<string> queue = new();
|
||||||
queue.Enqueue(path);
|
queue.Enqueue(path);
|
||||||
@ -319,7 +314,7 @@ namespace Adaptation.Shared
|
|||||||
Directory.Move(matchDirectories[0], result);
|
Directory.Move(matchDirectories[0], result);
|
||||||
result = string.Concat(result, @"\", logistics.Sequence);
|
result = string.Concat(result, @"\", logistics.Sequence);
|
||||||
if (!Directory.Exists(result))
|
if (!Directory.Exists(result))
|
||||||
Directory.CreateDirectory(result);
|
_ = Directory.CreateDirectory(result);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -342,7 +337,7 @@ namespace Adaptation.Shared
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected string GetTupleFile(Logistics logistics, Properties.IScopeInfo scopeInfo, string duplicateDirectory)
|
protected static string GetTupleFile(Logistics logistics, Properties.IScopeInfo scopeInfo, string duplicateDirectory)
|
||||||
{
|
{
|
||||||
string result;
|
string result;
|
||||||
string rds;
|
string rds;
|
||||||
@ -438,7 +433,7 @@ namespace Adaptation.Shared
|
|||||||
try
|
try
|
||||||
{ File.Delete(duplicateFiles[i]); }
|
{ File.Delete(duplicateFiles[i]); }
|
||||||
catch (Exception) { }
|
catch (Exception) { }
|
||||||
stringBuilder.Append("<").Append(duplicateFiles[i]).Append("> ");
|
_ = stringBuilder.Append('<').Append(duplicateFiles[i]).Append("> ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw new Exception(string.Concat("After {", _BreakAfterSeconds, "} seconds, right side of {", sourceDirectoryCloaking, "} didn't consume file(s) ", stringBuilder));
|
throw new Exception(string.Concat("After {", _BreakAfterSeconds, "} seconds, right side of {", sourceDirectoryCloaking, "} didn't consume file(s) ", stringBuilder));
|
||||||
@ -491,7 +486,7 @@ namespace Adaptation.Shared
|
|||||||
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))
|
||||||
Directory.CreateDirectory(directory);
|
_ = Directory.CreateDirectory(directory);
|
||||||
string file = Path.Combine(directory, string.Concat(_Logistics.MesEntity, "_", _Logistics.Sequence, ".ipdsf"));
|
string file = Path.Combine(directory, string.Concat(_Logistics.MesEntity, "_", _Logistics.Sequence, ".ipdsf"));
|
||||||
string lines = ProcessDataStandardFormat.GetPDSFText(fileRead, _Logistics, jsonElements, logisticsText: string.Empty);
|
string lines = ProcessDataStandardFormat.GetPDSFText(fileRead, _Logistics, jsonElements, logisticsText: string.Empty);
|
||||||
File.WriteAllText(file, lines);
|
File.WriteAllText(file, lines);
|
||||||
@ -503,17 +498,13 @@ namespace Adaptation.Shared
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void Move(IFileRead fileRead, Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception)
|
protected void Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception)
|
||||||
{
|
{
|
||||||
bool isErrorFile = !(exception is null);
|
bool isErrorFile = exception is not null;
|
||||||
if (!isErrorFile && _IsDuplicator)
|
if (!isErrorFile && _IsDuplicator)
|
||||||
{
|
{
|
||||||
if (_Hyphens == _HyphenIsXToArchive)
|
|
||||||
Shared0192();
|
|
||||||
else if (_IsEAFHosted && _Hyphens == _HyphenIsArchive)
|
|
||||||
fileRead.MoveArchive();
|
|
||||||
if (_IsEAFHosted && !string.IsNullOrEmpty(_ProgressPath))
|
if (_IsEAFHosted && !string.IsNullOrEmpty(_ProgressPath))
|
||||||
CreateProgressDirectory(_ProgressPath, _Logistics, _Hyphens, exceptionLines: null);
|
CreateProgressDirectory(exceptionLines: null);
|
||||||
}
|
}
|
||||||
if (!_IsEAFHosted)
|
if (!_IsEAFHosted)
|
||||||
{
|
{
|
||||||
@ -524,10 +515,10 @@ namespace Adaptation.Shared
|
|||||||
to = Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation);
|
to = Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation);
|
||||||
foreach (KeyValuePair<string, string> keyValuePair in _FileParameter)
|
foreach (KeyValuePair<string, string> keyValuePair in _FileParameter)
|
||||||
to = to.Replace(string.Concat('%', keyValuePair.Key, '%'), keyValuePair.Value);
|
to = to.Replace(string.Concat('%', keyValuePair.Key, '%'), keyValuePair.Value);
|
||||||
if (to.Contains("%"))
|
if (to.Contains('%'))
|
||||||
_Log.Debug("Can't debug without EAF Hosting");
|
_Log.Debug("Can't debug without EAF Hosting");
|
||||||
else
|
else
|
||||||
Move(extractResults, to, _FileConnectorConfiguration.SourceFileLocation, resolvedFileLocation: string.Empty, exception: null);
|
_ = Move(extractResults, to, _FileConnectorConfiguration.SourceFileLocation, resolvedFileLocation: string.Empty, exception: null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -592,7 +583,7 @@ namespace Adaptation.Shared
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Dictionary<Test, List<Properties.IDescription>> GetKeyValuePairs(List<Properties.IDescription> descriptions)
|
protected static Dictionary<Test, List<Properties.IDescription>> GetKeyValuePairs(List<Properties.IDescription> descriptions)
|
||||||
{
|
{
|
||||||
Dictionary<Test, List<Properties.IDescription>> results = new();
|
Dictionary<Test, List<Properties.IDescription>> results = new();
|
||||||
Test testKey;
|
Test testKey;
|
||||||
@ -606,7 +597,7 @@ namespace Adaptation.Shared
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected List<Properties.IDescription> GetDuplicatorDescriptions(JsonElement[] jsonElements)
|
protected static List<Properties.IDescription> GetDuplicatorDescriptions(JsonElement[] jsonElements)
|
||||||
{
|
{
|
||||||
List<Properties.IDescription> results = new();
|
List<Properties.IDescription> results = new();
|
||||||
Duplicator.Description description;
|
Duplicator.Description description;
|
||||||
@ -621,7 +612,7 @@ namespace Adaptation.Shared
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Tuple<Test[], Dictionary<Test, List<Properties.IDescription>>> GetTuple(IFileRead fileRead, IEnumerable<Properties.IDescription> descriptions, bool extra = false)
|
protected static Tuple<Test[], Dictionary<Test, List<Properties.IDescription>>> GetTuple(IFileRead fileRead, IEnumerable<Properties.IDescription> descriptions, bool extra = false)
|
||||||
{
|
{
|
||||||
Tuple<Test[], Dictionary<Test, List<Properties.IDescription>>> result;
|
Tuple<Test[], Dictionary<Test, List<Properties.IDescription>>> result;
|
||||||
Dictionary<Test, List<Properties.IDescription>> keyValuePairs = GetKeyValuePairs(descriptions.ToList());
|
Dictionary<Test, List<Properties.IDescription>> keyValuePairs = GetKeyValuePairs(descriptions.ToList());
|
||||||
@ -634,14 +625,14 @@ namespace Adaptation.Shared
|
|||||||
protected void Shared0449(string to, string[] exceptionLines)
|
protected void Shared0449(string to, string[] exceptionLines)
|
||||||
{
|
{
|
||||||
if (_IsDuplicator)
|
if (_IsDuplicator)
|
||||||
CreateProgressDirectory(_ProgressPath, _Logistics, _Hyphens, exceptionLines);
|
CreateProgressDirectory(exceptionLines: null);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
string fileName = string.Concat(to, @"\readme.txt");
|
string fileName = string.Concat(to, @"\readme.txt");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!Directory.Exists(to))
|
if (!Directory.Exists(to))
|
||||||
Directory.CreateDirectory(to);
|
_ = Directory.CreateDirectory(to);
|
||||||
File.WriteAllLines(fileName, exceptionLines);
|
File.WriteAllLines(fileName, exceptionLines);
|
||||||
}
|
}
|
||||||
catch (Exception ex) { _Log.Error(ex.Message); }
|
catch (Exception ex) { _Log.Error(ex.Message); }
|
||||||
@ -660,7 +651,7 @@ namespace Adaptation.Shared
|
|||||||
processingModeEnum = _FileConnectorConfiguration.ErrorPostProcessingMode.Value;
|
processingModeEnum = _FileConnectorConfiguration.ErrorPostProcessingMode.Value;
|
||||||
if (processingModeEnum != FileConnectorConfiguration.PostProcessingModeEnum.Delete && !Directory.Exists(itemDirectory))
|
if (processingModeEnum != FileConnectorConfiguration.PostProcessingModeEnum.Delete && !Directory.Exists(itemDirectory))
|
||||||
{
|
{
|
||||||
Directory.CreateDirectory(itemDirectory);
|
_ = Directory.CreateDirectory(itemDirectory);
|
||||||
FileInfo fileInfo = new(_Logistics.ReportFullPath);
|
FileInfo fileInfo = new(_Logistics.ReportFullPath);
|
||||||
Directory.SetCreationTime(itemDirectory, fileInfo.LastWriteTime);
|
Directory.SetCreationTime(itemDirectory, fileInfo.LastWriteTime);
|
||||||
}
|
}
|
||||||
@ -694,14 +685,14 @@ namespace Adaptation.Shared
|
|||||||
string weekDirectory = string.Concat(_Logistics.DateTimeFromSequence.ToString("yyyy"), "_Week_", weekOfYear, @"\", _Logistics.DateTimeFromSequence.ToString("yyyy-MM-dd"));
|
string weekDirectory = string.Concat(_Logistics.DateTimeFromSequence.ToString("yyyy"), "_Week_", weekOfYear, @"\", _Logistics.DateTimeFromSequence.ToString("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);
|
||||||
File.Move(sourceFile.FullName, string.Concat(destinationDirectory, @"\", sourceFile.Name));
|
File.Move(sourceFile.FullName, string.Concat(destinationDirectory, @"\", sourceFile.Name));
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string[] checkDirectories = Directory.GetDirectories(jobIdDirectory, "*", SearchOption.TopDirectoryOnly);
|
string[] checkDirectories = Directory.GetDirectories(jobIdDirectory, "*", SearchOption.TopDirectoryOnly);
|
||||||
foreach (string checkDirectory in checkDirectories)
|
foreach (string checkDirectory in checkDirectories)
|
||||||
{
|
{
|
||||||
if (!checkDirectory.Contains("_"))
|
if (!checkDirectory.Contains('_'))
|
||||||
continue;
|
continue;
|
||||||
if (Directory.GetDirectories(checkDirectory, "*", SearchOption.TopDirectoryOnly).Any())
|
if (Directory.GetDirectories(checkDirectory, "*", SearchOption.TopDirectoryOnly).Any())
|
||||||
continue;
|
continue;
|
||||||
@ -748,7 +739,7 @@ namespace Adaptation.Shared
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void Shared0607(string reportFullPath, string duplicateDirectory, string logisticsSequence, string destinationDirectory)
|
protected static void Shared0607(string reportFullPath, string duplicateDirectory, string logisticsSequence, string destinationDirectory)
|
||||||
{
|
{
|
||||||
if (destinationDirectory == duplicateDirectory)
|
if (destinationDirectory == duplicateDirectory)
|
||||||
throw new Exception("Check Target File Folder for %LotIDWithLogisticsSequence%_in process on CI (not Duplicator)");
|
throw new Exception("Check Target File Folder for %LotIDWithLogisticsSequence%_in process on CI (not Duplicator)");
|
||||||
@ -763,16 +754,6 @@ namespace Adaptation.Shared
|
|||||||
File.Delete(reportFullPath);
|
File.Delete(reportFullPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void Shared0192()
|
|
||||||
{
|
|
||||||
if (!string.IsNullOrEmpty(_Logistics.ReportFullPath))
|
|
||||||
{
|
|
||||||
FileInfo fileInfo = new(_Logistics.ReportFullPath);
|
|
||||||
if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime)
|
|
||||||
File.SetLastWriteTime(_Logistics.ReportFullPath, fileInfo.CreationTime);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected string[] Shared1567(string reportFullPath, List<Tuple<Properties.IScopeInfo, string>> tuples)
|
protected string[] Shared1567(string reportFullPath, List<Tuple<Properties.IScopeInfo, string>> tuples)
|
||||||
{
|
{
|
||||||
string[] results;
|
string[] results;
|
||||||
@ -780,7 +761,7 @@ namespace Adaptation.Shared
|
|||||||
string logisticsSequence = _Logistics.Sequence.ToString();
|
string logisticsSequence = _Logistics.Sequence.ToString();
|
||||||
string jobIdDirectory = string.Concat(Path.GetDirectoryName(Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation)), @"\", _Logistics.JobID);
|
string jobIdDirectory = string.Concat(Path.GetDirectoryName(Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation)), @"\", _Logistics.JobID);
|
||||||
if (!Directory.Exists(jobIdDirectory))
|
if (!Directory.Exists(jobIdDirectory))
|
||||||
Directory.CreateDirectory(jobIdDirectory);
|
_ = Directory.CreateDirectory(jobIdDirectory);
|
||||||
string[] matchDirectories;
|
string[] matchDirectories;
|
||||||
if (!_IsEAFHosted)
|
if (!_IsEAFHosted)
|
||||||
matchDirectories = new string[] { Path.GetDirectoryName(Path.GetDirectoryName(reportFullPath)) };
|
matchDirectories = new string[] { Path.GetDirectoryName(Path.GetDirectoryName(reportFullPath)) };
|
||||||
@ -791,7 +772,7 @@ namespace Adaptation.Shared
|
|||||||
string fileName = Path.GetFileNameWithoutExtension(reportFullPath);
|
string fileName = Path.GetFileNameWithoutExtension(reportFullPath);
|
||||||
string sequenceDirectory = string.Concat(matchDirectories[0], @"\", logisticsSequence);
|
string sequenceDirectory = string.Concat(matchDirectories[0], @"\", logisticsSequence);
|
||||||
if (!Directory.Exists(sequenceDirectory))
|
if (!Directory.Exists(sequenceDirectory))
|
||||||
Directory.CreateDirectory(sequenceDirectory);
|
_ = Directory.CreateDirectory(sequenceDirectory);
|
||||||
foreach (Tuple<Properties.IScopeInfo, string> tuple in tuples)
|
foreach (Tuple<Properties.IScopeInfo, string> tuple in tuples)
|
||||||
{
|
{
|
||||||
fileName = string.Concat(sequenceDirectory, @"\", fileName, "_", tuple.Item1.FileNameWithoutExtension, ".pdsfc");
|
fileName = string.Concat(sequenceDirectory, @"\", fileName, "_", tuple.Item1.FileNameWithoutExtension, ".pdsfc");
|
||||||
@ -816,19 +797,17 @@ namespace Adaptation.Shared
|
|||||||
string ecCharacterizationSi = Path.GetDirectoryName(Path.GetDirectoryName(jobIdDirectory));
|
string ecCharacterizationSi = Path.GetDirectoryName(Path.GetDirectoryName(jobIdDirectory));
|
||||||
string destinationJobIdDirectory = string.Concat(ecCharacterizationSi, @"\Processed\", _Logistics.JobID);
|
string destinationJobIdDirectory = string.Concat(ecCharacterizationSi, @"\Processed\", _Logistics.JobID);
|
||||||
if (!Directory.Exists(destinationJobIdDirectory))
|
if (!Directory.Exists(destinationJobIdDirectory))
|
||||||
Directory.CreateDirectory(destinationJobIdDirectory);
|
_ = Directory.CreateDirectory(destinationJobIdDirectory);
|
||||||
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);
|
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);
|
||||||
string sequenceDirectory = string.Concat(destinationJobIdDirectory, @"\", logisticsSequence);
|
string sequenceDirectory = string.Concat(destinationJobIdDirectory, @"\", logisticsSequence);
|
||||||
string jsonFileName = string.Concat(sequenceDirectory, @"\", Path.GetFileNameWithoutExtension(reportFullPath), ".json");
|
string jsonFileName = string.Concat(sequenceDirectory, @"\", Path.GetFileNameWithoutExtension(reportFullPath), ".json");
|
||||||
Directory.Move(destinationDirectory, destinationJobIdDirectory);
|
Directory.Move(destinationDirectory, destinationJobIdDirectory);
|
||||||
if (!Directory.Exists(sequenceDirectory))
|
if (!Directory.Exists(sequenceDirectory))
|
||||||
Directory.CreateDirectory(sequenceDirectory);
|
_ = Directory.CreateDirectory(sequenceDirectory);
|
||||||
File.Copy(reportFullPath, string.Concat(sequenceDirectory, @"\", Path.GetFileName(reportFullPath)), overwrite: true);
|
File.Copy(reportFullPath, string.Concat(sequenceDirectory, @"\", Path.GetFileName(reportFullPath)), overwrite: true);
|
||||||
File.WriteAllText(jsonFileName, json);
|
File.WriteAllText(jsonFileName, json);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
// 2022-02-14 -> Shared - FileRead
|
||||||
|
|
||||||
// 2021-12-17 -> Shared - FileRead
|
|
@ -1,11 +1,10 @@
|
|||||||
using Adaptation.Shared.Methods;
|
using Adaptation.Shared.Methods;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace Adaptation.Shared
|
namespace Adaptation.Shared;
|
||||||
{
|
|
||||||
|
|
||||||
public class Logistics : ILogistics
|
public class Logistics : ILogistics
|
||||||
{
|
{
|
||||||
@ -166,7 +165,7 @@ namespace Adaptation.Shared
|
|||||||
Logistics2 logistics2;
|
Logistics2 logistics2;
|
||||||
Tags = new List<string>();
|
Tags = new List<string>();
|
||||||
Logistics2 = new List<Logistics2>();
|
Logistics2 = new List<Logistics2>();
|
||||||
for (int i = 1; i < Logistics1.Count(); i++)
|
for (int i = 1; i < Logistics1.Count; i++)
|
||||||
{
|
{
|
||||||
if (Logistics1[i].StartsWith("LOGISTICS_2"))
|
if (Logistics1[i].StartsWith("LOGISTICS_2"))
|
||||||
{
|
{
|
||||||
@ -174,32 +173,20 @@ namespace Adaptation.Shared
|
|||||||
Logistics2.Add(logistics2);
|
Logistics2.Add(logistics2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int i = Logistics1.Count() - 1; i > -1; i--)
|
for (int i = Logistics1.Count - 1; i > -1; i--)
|
||||||
{
|
{
|
||||||
if (Logistics1[i].StartsWith("LOGISTICS_2"))
|
if (Logistics1[i].StartsWith("LOGISTICS_2"))
|
||||||
Logistics1.RemoveAt(i);
|
Logistics1.RemoveAt(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Logistics ShallowCopy()
|
public Logistics ShallowCopy() => (Logistics)MemberwiseClone();
|
||||||
{
|
|
||||||
return (Logistics)MemberwiseClone();
|
|
||||||
}
|
|
||||||
|
|
||||||
private string DefaultMesEntity(DateTime dateTime)
|
private static string DefaultMesEntity(DateTime dateTime) => string.Concat(dateTime.Ticks, "_MES_ENTITY");
|
||||||
{
|
|
||||||
return string.Concat(dateTime.Ticks, "_MES_ENTITY");
|
|
||||||
}
|
|
||||||
|
|
||||||
internal string GetLotViaMostCommonMethod()
|
internal string GetLotViaMostCommonMethod() => MID.Substring(0, MID.Length - 2);
|
||||||
{
|
|
||||||
return MID.Substring(0, MID.Length - 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
internal string GetPocketNumberViaMostCommonMethod()
|
internal string GetPocketNumberViaMostCommonMethod() => MID.Substring(MID.Length - 2);
|
||||||
{
|
|
||||||
return MID.Substring(MID.Length - 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
internal void Update(string dateTime, string processJobID, string mid)
|
internal void Update(string dateTime, string processJobID, string mid)
|
||||||
{
|
{
|
||||||
@ -219,5 +206,3 @@ namespace Adaptation.Shared
|
|||||||
Logistics2 = new List<Logistics2>();
|
Logistics2 = new List<Logistics2>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
@ -1,7 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Adaptation.Shared
|
namespace Adaptation.Shared;
|
||||||
{
|
|
||||||
|
|
||||||
public class Logistics2 : Methods.ILogistics2
|
public class Logistics2 : Methods.ILogistics2
|
||||||
{
|
{
|
||||||
@ -77,5 +76,3 @@ namespace Adaptation.Shared
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
@ -1,8 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
|
||||||
namespace Adaptation.Shared.Methods
|
namespace Adaptation.Shared.Methods;
|
||||||
{
|
|
||||||
|
|
||||||
public interface IDescription
|
public interface IDescription
|
||||||
{
|
{
|
||||||
@ -21,5 +20,3 @@ namespace Adaptation.Shared.Methods
|
|||||||
List<IDescription> GetDescriptions(IFileRead fileRead, Logistics logistics, List<Test> tests, IProcessData iProcessData);
|
List<IDescription> GetDescriptions(IFileRead fileRead, Logistics logistics, List<Test> tests, IProcessData iProcessData);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
@ -3,11 +3,11 @@ using System.Collections.Generic;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
|
||||||
namespace Adaptation.Shared.Methods
|
namespace Adaptation.Shared.Methods;
|
||||||
{
|
|
||||||
|
|
||||||
public interface IFileRead : Properties.IFileRead
|
public interface IFileRead : Properties.IFileRead
|
||||||
{
|
{
|
||||||
|
|
||||||
void WaitForThread();
|
void WaitForThread();
|
||||||
JsonProperty[] GetDefault();
|
JsonProperty[] GetDefault();
|
||||||
void Callback(object state);
|
void Callback(object state);
|
||||||
@ -20,6 +20,5 @@ namespace Adaptation.Shared.Methods
|
|||||||
void Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception = null);
|
void Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception = null);
|
||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, string eventName);
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, string eventName);
|
||||||
string[] Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, string to, string from, string resolvedFileLocation, Exception exception);
|
string[] Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, string to, string from, string resolvedFileLocation, Exception exception);
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
@ -1,8 +1,5 @@
|
|||||||
namespace Adaptation.Shared.Methods
|
namespace Adaptation.Shared.Methods;
|
||||||
{
|
|
||||||
|
|
||||||
public interface ILogistics : Properties.ILogistics
|
public interface ILogistics : Properties.ILogistics
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
@ -1,8 +1,5 @@
|
|||||||
namespace Adaptation.Shared.Methods
|
namespace Adaptation.Shared.Methods;
|
||||||
{
|
|
||||||
|
|
||||||
public interface ILogistics2 : Properties.ILogistics2
|
public interface ILogistics2 : Properties.ILogistics2
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
@ -3,8 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
|
||||||
namespace Adaptation.Shared.Methods
|
namespace Adaptation.Shared.Methods;
|
||||||
{
|
|
||||||
|
|
||||||
public interface IProcessData : Properties.IProcessData
|
public interface IProcessData : Properties.IProcessData
|
||||||
{
|
{
|
||||||
@ -13,5 +12,3 @@ namespace Adaptation.Shared.Methods
|
|||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> GetResults(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection);
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> GetResults(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
@ -1,9 +1,8 @@
|
|||||||
namespace Adaptation.Shared.Methods
|
namespace Adaptation.Shared.Methods;
|
||||||
{
|
|
||||||
public interface ISMTP
|
public interface ISMTP
|
||||||
{
|
{
|
||||||
void SendLowPriorityEmailMessage(string subject, string body);
|
void SendLowPriorityEmailMessage(string subject, string body);
|
||||||
void SendHighPriorityEmailMessage(string subject, string body);
|
void SendHighPriorityEmailMessage(string subject, string body);
|
||||||
void SendNormalPriorityEmailMessage(string subject, string body);
|
void SendNormalPriorityEmailMessage(string subject, string body);
|
||||||
}
|
}
|
||||||
}
|
|
300
Adaptation/Shared/Metrology/ScopeInfo.cs
Normal file
300
Adaptation/Shared/Metrology/ScopeInfo.cs
Normal file
@ -0,0 +1,300 @@
|
|||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
namespace Adaptation.Shared.Metrology;
|
||||||
|
|
||||||
|
public class ScopeInfo : Properties.IScopeInfo
|
||||||
|
{
|
||||||
|
|
||||||
|
public Test Test { get; private set; }
|
||||||
|
public Enum Enum { get; private set; }
|
||||||
|
public string HTML { get; private set; }
|
||||||
|
public string Title { get; private set; }
|
||||||
|
public string FileName { get; private set; }
|
||||||
|
public int TestValue { get; private set; }
|
||||||
|
public string Header { get; private set; }
|
||||||
|
public string QueryFilter { get; private set; }
|
||||||
|
public string FileNameWithoutExtension { get; private set; }
|
||||||
|
|
||||||
|
public ScopeInfo(Test test, string fileName, string queryFilter = "", string title = "", string html = "")
|
||||||
|
{
|
||||||
|
Enum = test;
|
||||||
|
Test = test;
|
||||||
|
HTML = html;
|
||||||
|
Title = title;
|
||||||
|
FileName = fileName;
|
||||||
|
TestValue = (int)test;
|
||||||
|
Header = string.Empty;
|
||||||
|
QueryFilter = queryFilter;
|
||||||
|
FileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ScopeInfo(Test test)
|
||||||
|
{
|
||||||
|
Enum = test;
|
||||||
|
Test = test;
|
||||||
|
TestValue = (int)test;
|
||||||
|
switch (Test)
|
||||||
|
{
|
||||||
|
case Test.AFMRoughness:
|
||||||
|
FileNameWithoutExtension = "afm_iqs_01";
|
||||||
|
Header = string.Empty;
|
||||||
|
QueryFilter = "AFM Roughness";
|
||||||
|
Title = "AFM";
|
||||||
|
HTML = @"GaN Epi Data\10 - afm.html";
|
||||||
|
break;
|
||||||
|
case Test.BreakdownVoltageCenter:
|
||||||
|
FileNameWithoutExtension = "bv_iqs_01";
|
||||||
|
Header = "Reactor;fDate;fRecipeName;Lot;fPocketNumber;g4Scribe;BV Position;BV Value;Tool";
|
||||||
|
QueryFilter = "Breakdown Voltage";
|
||||||
|
Title = "Breakdown Voltage-Center";
|
||||||
|
HTML = @"GaN Epi Data\03 - bv-production.html";
|
||||||
|
break;
|
||||||
|
case Test.BreakdownVoltageEdge:
|
||||||
|
FileNameWithoutExtension = "bv_iqs_01_Edge";
|
||||||
|
Header = "Reactor;fDate;fRecipeName;Lot;fPocketNumber;g4Scribe;BV Position;BV Value;Tool";
|
||||||
|
QueryFilter = "Breakdown Voltage - Edge";
|
||||||
|
Title = "Breakdown Voltage-Edge";
|
||||||
|
HTML = @"GaN Epi Data\03 - bv-production.html";
|
||||||
|
break;
|
||||||
|
case Test.BreakdownVoltageMiddle8in:
|
||||||
|
FileNameWithoutExtension = "bv_iqs_01_Middle";
|
||||||
|
Header = "Reactor;fDate;fRecipeName;Lot;fPocketNumber;g4Scribe;BV Position;BV Value;Tool";
|
||||||
|
QueryFilter = "Breakdown Voltage - Middle";
|
||||||
|
Title = "Breakdown Voltage-Middle (8 in)";
|
||||||
|
HTML = @"GaN Epi Data\03 - bv-production.html";
|
||||||
|
break;
|
||||||
|
case Test.CV:
|
||||||
|
FileNameWithoutExtension = "cv_iqs_01";
|
||||||
|
Header = "Reactor;fDate;fPart;Lot;pocketNumber;g4Scribe;Position;Vp;NdMin;Tool ID;CV Ns;CV Cap";
|
||||||
|
QueryFilter = "CV_Ns";
|
||||||
|
Title = "CV";
|
||||||
|
HTML = @"GaN Epi Data\05 - cv.html";
|
||||||
|
break;
|
||||||
|
case Test.MonthlyCV:
|
||||||
|
FileNameWithoutExtension = "cv_iqs_01";
|
||||||
|
Header = "Reactor;fDate;fPart;Lot;pocketNumber;g4Scribe;Position;Vp;NdMin;Tool ID;CV Ns;CV Cap";
|
||||||
|
QueryFilter = "CV_Ns";
|
||||||
|
Title = "CV Monthly Verification";
|
||||||
|
HTML = @"Metrology\07 - cv_verif_monthly.html";
|
||||||
|
break;
|
||||||
|
case Test.WeeklyCV:
|
||||||
|
FileNameWithoutExtension = "cv_iqs_01";
|
||||||
|
Header = "Reactor;fDate;fPart;Lot;pocketNumber;g4Scribe;Position;Vp;NdMin;Tool ID;CV Ns;CV Cap";
|
||||||
|
QueryFilter = "CV_Ns";
|
||||||
|
Title = "CV Weekly Verification";
|
||||||
|
HTML = @"Metrology\16 - cv_verif_weekly.html";
|
||||||
|
break;
|
||||||
|
case Test.CandelaKlarfDC:
|
||||||
|
FileNameWithoutExtension = "candela_iqs_01";
|
||||||
|
Header = "LotID;OperatorID;RecipeName;CandelaRecipe;WaferID;PocketNumber;RunDate;Epi;SlipLines;Cracks;EpiDef;HazeSpot;SmallLpd;MediumLpd;LargeLpd;Cracks_A;Spirals;Craters;8620 Small;Pits;Tool ID;Defect Count";
|
||||||
|
QueryFilter = "Candela Cracking";
|
||||||
|
Title = "Candela";
|
||||||
|
HTML = @"GaN Epi Data\12 - candela.html";
|
||||||
|
break;
|
||||||
|
case Test.CandelaLaser:
|
||||||
|
FileNameWithoutExtension = "candela_iqs_01";
|
||||||
|
Header = "LotID;OperatorID;RecipeName;CandelaRecipe;WaferID;PocketNumber;RunDate;Epi;SlipLines;Cracks;EpiDef;HazeSpot;SmallLpd;MediumLpd;LargeLpd;Cracks_A;Spirals;Craters;Pits;Tool ID;Defect Count";
|
||||||
|
QueryFilter = "Candela Cracking";
|
||||||
|
Title = "Candela";
|
||||||
|
HTML = @"GaN Epi Data\12 - candela.html";
|
||||||
|
break;
|
||||||
|
case Test.CandelaVerify:
|
||||||
|
FileNameWithoutExtension = "candela_iqs_01";
|
||||||
|
Header = string.Concat("LotID;OperatorID;RecipeName;CandelaRecipe;WaferID;PocketNumber;RunDate;RunID;Reactor;", "Slip Lines;Cracks;Epi Def;Haze Spot;Small LPD;Medium LPD;Large LPD;Cracks_A;Spirals;Craters;8620 Small;Pits;Tool ID;Defect Count");
|
||||||
|
QueryFilter = "Candela Cracking";
|
||||||
|
Title = "Candela";
|
||||||
|
HTML = @"GaN Epi Data\12 - candela.html";
|
||||||
|
break;
|
||||||
|
case Test.CandelaPSL:
|
||||||
|
FileNameWithoutExtension = "candela_iqs_01";
|
||||||
|
Header = string.Empty;
|
||||||
|
QueryFilter = "102-83nm";
|
||||||
|
Title = "Candela";
|
||||||
|
HTML = @"GaN Epi Data\12 - candela.html";
|
||||||
|
break;
|
||||||
|
case Test.CandelaProdU:
|
||||||
|
FileNameWithoutExtension = "candela_iqs_01";
|
||||||
|
Header = string.Empty;
|
||||||
|
QueryFilter = "SPE verification";
|
||||||
|
Title = "Candela";
|
||||||
|
HTML = @"GaN Epi Data\12 - candela.html";
|
||||||
|
break;
|
||||||
|
case Test.Denton:
|
||||||
|
FileNameWithoutExtension = "denton_iqs_01";
|
||||||
|
Header = "Tool;fDate;Run;Recipe;Operator;Name;Value";
|
||||||
|
QueryFilter = "Denton_Voltage_AVG";
|
||||||
|
Title = "Denton Data";
|
||||||
|
HTML = @"Support Process\03 - ebeam02_denton_v1.html";
|
||||||
|
break;
|
||||||
|
case Test.Hall:
|
||||||
|
FileNameWithoutExtension = "hall_iqs_01";
|
||||||
|
Header = "Lot;Tool;TimeDate;RunDate;RunID;Part;Reactor;Scribe;PocketNumber;Tool ID;Name;Value";
|
||||||
|
QueryFilter = "Hall Rs";
|
||||||
|
Title = "Hall Data";
|
||||||
|
HTML = @"GaN Epi Data\04 - hall.html";
|
||||||
|
break;
|
||||||
|
case Test.MonthlyHall:
|
||||||
|
FileNameWithoutExtension = "hall_iqs_01";
|
||||||
|
Header = "Lot;Tool;TimeDate;RunDate;RunID;Part;Reactor;Scribe;PocketNumber;Tool ID;Name;Value";
|
||||||
|
QueryFilter = "Hall Rs";
|
||||||
|
Title = "Hall Monthly Verification";
|
||||||
|
HTML = @"Metrology\06 - hall_verif_monthly.html";
|
||||||
|
break;
|
||||||
|
case Test.WeeklyHall:
|
||||||
|
FileNameWithoutExtension = "hall_iqs_01";
|
||||||
|
Header = "Lot;Tool;TimeDate;RunDate;RunID;Part;Reactor;Scribe;PocketNumber;Tool ID;Name;Value";
|
||||||
|
QueryFilter = "Hall Rs";
|
||||||
|
Title = "Hall Weekly Verification";
|
||||||
|
HTML = @"Metrology\15 - hall_verif_weekly.html";
|
||||||
|
break;
|
||||||
|
case Test.Lehighton:
|
||||||
|
FileNameWithoutExtension = "lei_iqs_01";
|
||||||
|
Header = "Reactor;Date;Recipe;Lot;Pocket;Scribe;Tool;Name;Value";
|
||||||
|
QueryFilter = "LEI RS Average value";
|
||||||
|
Title = "Lehighton";
|
||||||
|
HTML = @"GaN Epi Data\13 - lehighton.html";
|
||||||
|
break;
|
||||||
|
case Test.VerificationLehighton:
|
||||||
|
FileNameWithoutExtension = "___";
|
||||||
|
Header = "Reactor;Date;Recipe;Lot;Pocket;Scribe;Tool;Name;Value";
|
||||||
|
QueryFilter = "___";
|
||||||
|
Title = "LEI Weekly Verification 2 Ohm cm";
|
||||||
|
HTML = @"Metrology\14 - lei_verif_weekly.html.html";
|
||||||
|
break;
|
||||||
|
case Test.Microscope:
|
||||||
|
FileNameWithoutExtension = string.Empty;
|
||||||
|
Header = string.Empty;
|
||||||
|
QueryFilter = "Microscope Center 5x";
|
||||||
|
Title = "Total Microscope Defects";
|
||||||
|
HTML = string.Empty;
|
||||||
|
break;
|
||||||
|
case Test.RPMXY:
|
||||||
|
FileNameWithoutExtension = "RPM_Data";
|
||||||
|
Header = "Lot;Date;Recipe;Reactor;Scribe;Pocket;Tool;Name;Value";
|
||||||
|
QueryFilter = "Barrier_Composition_RPM_XY";
|
||||||
|
Title = "RPM XY Data ***&*** View Data";
|
||||||
|
HTML = @"GaN Epi Data\09 - rpm --- 08 - photoluminescence.html";
|
||||||
|
break;
|
||||||
|
case Test.RPMAverage:
|
||||||
|
FileNameWithoutExtension = "RPMdata-short";
|
||||||
|
Header = "fProductId;fDate;average;stdDev;fRecipeName;Reactor;g4Scribe;Pocket Number;Tool ID;Recipe From Rpm File";
|
||||||
|
QueryFilter = "Epi Thickness Mean";
|
||||||
|
Title = "RPM Average Data";
|
||||||
|
HTML = @"GaN Epi Data\09 - rpm.html";
|
||||||
|
break;
|
||||||
|
case Test.RPMPLRatio:
|
||||||
|
FileNameWithoutExtension = "PHOTOLUMINESCENCE_data-short";
|
||||||
|
Header = "fProductId;fDate;g4Scribe;fRecipeName;bandEdge_nm;bandEdge_V;yellowBand_Pmw;yellowBand_nm;yellowBand_V;Reactor;Pocket Number;Tool ID";
|
||||||
|
QueryFilter = "PL Ratio";
|
||||||
|
Title = "Photoluminescence: PL Ratio";
|
||||||
|
HTML = @"GaN Epi Data\08 - photoluminescence.html";
|
||||||
|
break;
|
||||||
|
case Test.DailyRPMXY:
|
||||||
|
FileNameWithoutExtension = "RPM_Data";
|
||||||
|
Header = "Lot;Date;Recipe;Reactor;Scribe;Pocket;Tool;Name;Value";
|
||||||
|
QueryFilter = "Barrier_Composition_RPM_XY";
|
||||||
|
Title = "";
|
||||||
|
HTML = @"Metrology\?";
|
||||||
|
break;
|
||||||
|
case Test.DailyRPMAverage:
|
||||||
|
FileNameWithoutExtension = "RPMdata-short";
|
||||||
|
Header = "fProductId;fDate;average;stdDev;fRecipeName;Reactor;g4Scribe;Pocket Number;Tool ID;Recipe From Rpm File";
|
||||||
|
QueryFilter = "Epi Thickness Mean";
|
||||||
|
Title = "";
|
||||||
|
HTML = @"Metrology\?";
|
||||||
|
break;
|
||||||
|
case Test.DailyRPMPLRatio:
|
||||||
|
FileNameWithoutExtension = "PHOTOLUMINESCENCE_data-short";
|
||||||
|
Header = "fProductId;fDate;g4Scribe;fRecipeName;bandEdge_nm;bandEdge_V;yellowBand_Pmw;yellowBand_nm;yellowBand_V;Reactor;Pocket Number;Tool ID";
|
||||||
|
QueryFilter = "PL Ratio";
|
||||||
|
Title = "RPM Daily Verification";
|
||||||
|
HTML = @"Metrology\17 - rpm_verif_daily.html";
|
||||||
|
break;
|
||||||
|
case Test.VerificationRPM:
|
||||||
|
FileNameWithoutExtension = "PhotoLuminescence_Ver";
|
||||||
|
Header = "Part;Process;Date;Test;Value";
|
||||||
|
QueryFilter = "PL Edge Wavelength";
|
||||||
|
Title = "PL Daily Verification - [PL Edge Wavelength]";
|
||||||
|
HTML = @"Metrology\18 - photoluminescence_verif_daily.html";
|
||||||
|
break;
|
||||||
|
case Test.Photoreflectance:
|
||||||
|
FileNameWithoutExtension = "photoreflect_iqs_01";
|
||||||
|
Header = "Lot;Date;Part;Reactor;Scribe;Pocket;Tool;Point;WaferPosition_PR;PR_Peak";
|
||||||
|
QueryFilter = "PR Barrier Composition";
|
||||||
|
Title = "Photoreflectance 6 in, Photoreflectance 8 in";
|
||||||
|
HTML = @"GaN Epi Data\07 - photoreflectance.html";
|
||||||
|
break;
|
||||||
|
case Test.UV:
|
||||||
|
FileNameWithoutExtension = "uv_iqs_01";
|
||||||
|
Header = string.Empty;
|
||||||
|
QueryFilter = "UV Broken";
|
||||||
|
Title = "UV";
|
||||||
|
HTML = @"GaN Epi Data\15 - uv 2.1.html";
|
||||||
|
break;
|
||||||
|
case Test.VpdIcpmsAnalyte:
|
||||||
|
FileNameWithoutExtension = "VPD_iqs_01";
|
||||||
|
Header = "Reactor;RunID;RunDate;PartNumber;PocketNumber;WaferScribe;Analyte;Value";
|
||||||
|
QueryFilter = "Mg";
|
||||||
|
Title = "VpdIcpmsAnalyteData";
|
||||||
|
HTML = @"";
|
||||||
|
break;
|
||||||
|
case Test.WarpAndBow:
|
||||||
|
FileNameWithoutExtension = "warp_iqs_01";
|
||||||
|
Header = "fDate;fRecipeName;fProductId;g4Scribe;warp;bow;tool;Reactor;Pocket ID;bow_range;BowX;BowY;CenterBow";
|
||||||
|
QueryFilter = "BowCenter";
|
||||||
|
Title = "Warp and Bow";
|
||||||
|
HTML = @"GaN Epi Data\14 - warp.html";
|
||||||
|
break;
|
||||||
|
case Test.VerificationWarpAndBow:
|
||||||
|
FileNameWithoutExtension = "warp_ver_iqs_01";
|
||||||
|
Header = "Part;Process;Date;WaferScribe;totWarp;bow";
|
||||||
|
QueryFilter = "Bow Calibration";
|
||||||
|
Title = "6 Inch Warp/Bow Daily Verification, 8 Inch Warp/Bow Daily Verification";
|
||||||
|
HTML = @"Metrology\19 - warp_cal_daily.html";
|
||||||
|
break;
|
||||||
|
case Test.XRDXY:
|
||||||
|
FileNameWithoutExtension = "xrd_iqs_NEW_01";
|
||||||
|
Header = "Reactor;fDate;fRecipeName;Lot;pocketNumber;g4Scribe;ToolID;Name;Value;Group";
|
||||||
|
QueryFilter = "SL Period";
|
||||||
|
Title = "XRD XY Raw Data Viewer";
|
||||||
|
HTML = @"GaN Epi Data\11 - xrd.html";
|
||||||
|
break;
|
||||||
|
case Test.XRDWeightedAverage:
|
||||||
|
FileNameWithoutExtension = "xrd_iqs_NEW_01_WtAVG";
|
||||||
|
Header = "Reactor;fDate;fRecipeName;Lot;pocketNumber;g4Scribe;Name;Value;Group";
|
||||||
|
//QueryFilter = "Al% Barrier WTAVG";
|
||||||
|
QueryFilter = "SL Period WTAVG";
|
||||||
|
Title = "XRD Weighted Average Data";
|
||||||
|
HTML = @"GaN Epi Data\11 - xrd.html";
|
||||||
|
break;
|
||||||
|
case Test.MonthlyXRD:
|
||||||
|
FileNameWithoutExtension = "xrd_monthly_ver_iqs_01";
|
||||||
|
Header = "Part;Process;Date;TestName;Value";
|
||||||
|
QueryFilter = "XRD 2-Theta Position";
|
||||||
|
Title = "XRD Monthly Verification";
|
||||||
|
HTML = @"Metrology\03 - xrd_verif_monthly.html";
|
||||||
|
break;
|
||||||
|
case Test.WeeklyXRD:
|
||||||
|
FileNameWithoutExtension = "xrd_weekly_ver_iqs_01";
|
||||||
|
Header = "Part;Process;Lot;Date;TestName;Value";
|
||||||
|
QueryFilter = "XRD Weekly AL% Center";
|
||||||
|
Title = "XRD Weekly Verification";
|
||||||
|
HTML = @"Metrology\12 - xrd_verif_weekly.html";
|
||||||
|
break;
|
||||||
|
case Test.JVXRD:
|
||||||
|
FileNameWithoutExtension = "xrd_iqs_NEW_01";
|
||||||
|
Header = "Reactor;fDate;fRecipeName;Lot;pocketNumber;g4Scribe;ToolID;Name;Value;Group";
|
||||||
|
QueryFilter = "SL Period";
|
||||||
|
Title = "XRD XY Raw Data Viewer";
|
||||||
|
HTML = @"GaN Epi Data\11 - xrd.html";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
FileName = string.Concat(FileNameWithoutExtension, ".txt");
|
||||||
|
}
|
||||||
|
|
||||||
|
public ScopeInfo ShallowCopy() => (ScopeInfo)MemberwiseClone();
|
||||||
|
|
||||||
|
}
|
21
Adaptation/Shared/Metrology/WS.Attachment.cs
Normal file
21
Adaptation/Shared/Metrology/WS.Attachment.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
namespace Adaptation.Shared.Metrology;
|
||||||
|
|
||||||
|
public partial class WS
|
||||||
|
{
|
||||||
|
public class Attachment
|
||||||
|
{
|
||||||
|
|
||||||
|
public string UniqueId { get; set; }
|
||||||
|
public string DestinationFileName { get; set; }
|
||||||
|
public string SourceFileName { get; set; }
|
||||||
|
|
||||||
|
public Attachment(string uniqueId, string destinationFileName, string sourceFileName)
|
||||||
|
{
|
||||||
|
UniqueId = uniqueId;
|
||||||
|
DestinationFileName = destinationFileName;
|
||||||
|
SourceFileName = sourceFileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
27
Adaptation/Shared/Metrology/WS.Results.cs
Normal file
27
Adaptation/Shared/Metrology/WS.Results.cs
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text.Json;
|
||||||
|
|
||||||
|
namespace Adaptation.Shared.Metrology;
|
||||||
|
|
||||||
|
public partial class WS
|
||||||
|
{
|
||||||
|
// this class represents the response from the Inbound API endpoint
|
||||||
|
public class Results
|
||||||
|
{
|
||||||
|
// true or false if data was written to the database
|
||||||
|
public bool Success { get; set; }
|
||||||
|
|
||||||
|
// if true, contains ID of the Header record in the database
|
||||||
|
public long HeaderID { get; set; }
|
||||||
|
|
||||||
|
// if false, this collection will contain a list of errors
|
||||||
|
public List<string> Errors { get; set; }
|
||||||
|
|
||||||
|
// this collection will contain a list of warnings, they will not prevent data from being saved
|
||||||
|
public List<string> Warnings { get; set; }
|
||||||
|
|
||||||
|
// this is just a helper function to make displaying the results easier
|
||||||
|
public override string ToString() => JsonSerializer.Serialize(this, GetType());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
123
Adaptation/Shared/Metrology/WS.cs
Normal file
123
Adaptation/Shared/Metrology/WS.cs
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.Json;
|
||||||
|
|
||||||
|
namespace Adaptation.Shared.Metrology;
|
||||||
|
|
||||||
|
public partial class WS
|
||||||
|
{
|
||||||
|
|
||||||
|
public static Tuple<string, Results> SendData(string url, object payload, int timeoutSeconds = 120)
|
||||||
|
{
|
||||||
|
Results results = new();
|
||||||
|
string resultsJson = string.Empty;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string json = JsonSerializer.Serialize(payload, payload.GetType());
|
||||||
|
if (string.IsNullOrEmpty(url) || !url.Contains(':') || !url.Contains('.'))
|
||||||
|
throw new Exception("Invalid URL");
|
||||||
|
using (HttpClient httpClient = new())
|
||||||
|
{
|
||||||
|
httpClient.Timeout = new TimeSpan(0, 0, 0, timeoutSeconds, 0);
|
||||||
|
HttpRequestMessage httpRequestMessage = new()
|
||||||
|
{
|
||||||
|
RequestUri = new Uri(url),
|
||||||
|
Method = HttpMethod.Post,
|
||||||
|
Content = new StringContent(json, Encoding.UTF8, "application/json")
|
||||||
|
};
|
||||||
|
HttpResponseMessage httpResponseMessage = httpClient.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseContentRead).Result;
|
||||||
|
resultsJson = httpResponseMessage.Content.ReadAsStringAsync().Result;
|
||||||
|
results = JsonSerializer.Deserialize<Results>(resultsJson);
|
||||||
|
}
|
||||||
|
if (!results.Success)
|
||||||
|
results.Errors.Add(results.ToString());
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Exception exception = e;
|
||||||
|
StringBuilder stringBuilder = new();
|
||||||
|
while (exception is not null)
|
||||||
|
{
|
||||||
|
_ = stringBuilder.AppendLine(exception.Message);
|
||||||
|
exception = exception.InnerException;
|
||||||
|
}
|
||||||
|
if (results.Errors is null)
|
||||||
|
results.Errors = new List<string>();
|
||||||
|
results.Errors.Add(stringBuilder.ToString());
|
||||||
|
}
|
||||||
|
return new Tuple<string, Results>(resultsJson, results);
|
||||||
|
}
|
||||||
|
|
||||||
|
// this method is a wrapper for attaching a file to either a header or data record
|
||||||
|
// URL is the same URL used for SendData, ex: http://localhost/api/inbound/HGCV
|
||||||
|
// attachToHeaderId is the ID returned by SendData
|
||||||
|
// attachToDataUniqueId is the string unique ID for the data record, aka the Title of the Sharepoint list entry
|
||||||
|
// fileContents is a byte array with the contents of the file
|
||||||
|
// fileName is which attachment this is, image.pdf, data.pdf, data.txt, header.pdf, etc
|
||||||
|
// timeoutSeconds is configured as the request timeout
|
||||||
|
// this method will either succeed or throw an exception
|
||||||
|
// also, this has been made synchronous
|
||||||
|
public static void AttachFile(string url, long attachToHeaderId, string attachToDataUniqueId, byte[] fileContents, string fileName, int timeoutSeconds = 60)
|
||||||
|
{
|
||||||
|
using HttpClient httpClient = new();
|
||||||
|
string requestUrl = url + "/attachment?headerid=" + attachToHeaderId.ToString();
|
||||||
|
if (!string.IsNullOrWhiteSpace(attachToDataUniqueId))
|
||||||
|
{
|
||||||
|
requestUrl += "&datauniqueid=";
|
||||||
|
requestUrl += System.Net.WebUtility.UrlEncode(attachToDataUniqueId);
|
||||||
|
}
|
||||||
|
requestUrl += "&filename="; // this is just so the web server log shows the filename
|
||||||
|
requestUrl += System.Net.WebUtility.UrlEncode(fileName);
|
||||||
|
|
||||||
|
httpClient.Timeout = new TimeSpan(0, 0, 0, timeoutSeconds, 0);
|
||||||
|
|
||||||
|
MultipartFormDataContent multipartFormDataContent = new();
|
||||||
|
ByteArrayContent byteArrayContent = new(fileContents);
|
||||||
|
byteArrayContent.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/octet-stream");
|
||||||
|
|
||||||
|
multipartFormDataContent.Add(byteArrayContent, "attachment", fileName);
|
||||||
|
|
||||||
|
HttpResponseMessage httpResponseMessage = httpClient.PostAsync(requestUrl, multipartFormDataContent).Result;
|
||||||
|
|
||||||
|
if (httpResponseMessage.IsSuccessStatusCode)
|
||||||
|
return;
|
||||||
|
|
||||||
|
string resultBody = httpResponseMessage.Content.ReadAsStringAsync().Result;
|
||||||
|
|
||||||
|
throw new Exception("Attachment failed: " + resultBody);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void AttachFiles(string url, long headerID, List<Attachment> headerAttachments = null, List<Attachment> dataAttachments = null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (headerAttachments is not null)
|
||||||
|
{
|
||||||
|
foreach (Attachment attachment in headerAttachments)
|
||||||
|
AttachFile(url, headerID, "", System.IO.File.ReadAllBytes(attachment.SourceFileName), attachment.DestinationFileName);
|
||||||
|
}
|
||||||
|
if (dataAttachments is not null)
|
||||||
|
{
|
||||||
|
foreach (Attachment attachment in dataAttachments)
|
||||||
|
AttachFile(url, headerID, attachment.UniqueId, System.IO.File.ReadAllBytes(attachment.SourceFileName), attachment.DestinationFileName);
|
||||||
|
}
|
||||||
|
//MessageBox.Show(r.ToString());
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Exception exception = e;
|
||||||
|
StringBuilder stringBuilder = new();
|
||||||
|
while (exception is not null)
|
||||||
|
{
|
||||||
|
_ = stringBuilder.AppendLine(exception.Message);
|
||||||
|
exception = exception.InnerException;
|
||||||
|
}
|
||||||
|
//MessageBox.Show(msgs.ToString(), "Exception", //MessageBoxButtons.OK, //MessageBoxIcon.Error);
|
||||||
|
throw new Exception(stringBuilder.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,5 +1,4 @@
|
|||||||
namespace Adaptation.Shared
|
namespace Adaptation.Shared;
|
||||||
{
|
|
||||||
|
|
||||||
public enum ParameterType
|
public enum ParameterType
|
||||||
{
|
{
|
||||||
@ -9,5 +8,3 @@ namespace Adaptation.Shared
|
|||||||
Boolean = 4,
|
Boolean = 4,
|
||||||
StructuredType = 5
|
StructuredType = 5
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
@ -7,8 +7,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
|
||||||
namespace Adaptation.Shared
|
namespace Adaptation.Shared;
|
||||||
{
|
|
||||||
|
|
||||||
public class ProcessDataStandardFormat
|
public class ProcessDataStandardFormat
|
||||||
{
|
{
|
||||||
@ -38,29 +37,29 @@ namespace Adaptation.Shared
|
|||||||
string format = "MM/dd/yyyy HH:mm:ss";
|
string format = "MM/dd/yyyy HH:mm:ss";
|
||||||
StringBuilder stringBuilder = new();
|
StringBuilder stringBuilder = new();
|
||||||
lines = new string[] { "HEADER_TAG\tHEADER_VALUE", "FORMAT\t2.00", "NUMBER_PASSES\t0001", string.Concat("HEADER_OFFSET\t", headerOffset), string.Concat("DATA_OFFSET\t", dataOffset), string.Concat("END_OFFSET\t", endOffset) }.ToList();
|
lines = new string[] { "HEADER_TAG\tHEADER_VALUE", "FORMAT\t2.00", "NUMBER_PASSES\t0001", string.Concat("HEADER_OFFSET\t", headerOffset), string.Concat("DATA_OFFSET\t", dataOffset), string.Concat("END_OFFSET\t", endOffset) }.ToList();
|
||||||
stringBuilder.Append("\"Time\"").Append('\t');
|
_ = stringBuilder.Append("\"Time\"").Append('\t');
|
||||||
stringBuilder.Append("\"A_LOGISTICS\"").Append('\t');
|
_ = stringBuilder.Append("\"A_LOGISTICS\"").Append('\t');
|
||||||
stringBuilder.Append("\"B_LOGISTICS\"").Append('\t');
|
_ = stringBuilder.Append("\"B_LOGISTICS\"").Append('\t');
|
||||||
for (int i = 0; i < jsonElements.Length;)
|
for (int i = 0; i < jsonElements.Length;)
|
||||||
{
|
{
|
||||||
foreach (JsonProperty jsonProperty in jsonElements[0].EnumerateObject())
|
foreach (JsonProperty jsonProperty in jsonElements[0].EnumerateObject())
|
||||||
{
|
{
|
||||||
columns += 1;
|
columns += 1;
|
||||||
stringBuilder.Append("\"").Append(jsonProperty.Name).Append("\"").Append('\t');
|
_ = stringBuilder.Append('"').Append(jsonProperty.Name).Append('"').Append('\t');
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
stringBuilder.Remove(stringBuilder.Length - 1, 1);
|
_ = stringBuilder.Remove(stringBuilder.Length - 1, 1);
|
||||||
lines.Add(stringBuilder.ToString());
|
lines.Add(stringBuilder.ToString());
|
||||||
for (int i = 0; i < jsonElements.Length; i++)
|
for (int i = 0; i < jsonElements.Length; i++)
|
||||||
{
|
{
|
||||||
stringBuilder.Clear();
|
_ = stringBuilder.Clear();
|
||||||
stringBuilder.Append("0.1").Append('\t');
|
_ = stringBuilder.Append("0.1").Append('\t');
|
||||||
stringBuilder.Append("1").Append('\t');
|
_ = stringBuilder.Append('1').Append('\t');
|
||||||
stringBuilder.Append("2").Append('\t');
|
_ = stringBuilder.Append('2').Append('\t');
|
||||||
foreach (JsonProperty jsonProperty in jsonElements[i].EnumerateObject())
|
foreach (JsonProperty jsonProperty in jsonElements[i].EnumerateObject())
|
||||||
stringBuilder.Append(jsonProperty.Value).Append('\t');
|
_ = stringBuilder.Append(jsonProperty.Value).Append('\t');
|
||||||
stringBuilder.Remove(stringBuilder.Length - 1, 1);
|
_ = stringBuilder.Remove(stringBuilder.Length - 1, 1);
|
||||||
lines.Add(stringBuilder.ToString());
|
lines.Add(stringBuilder.ToString());
|
||||||
}
|
}
|
||||||
lines.Add(string.Concat("NUM_DATA_ROWS ", jsonElements.Length.ToString().PadLeft(9, '0')));
|
lines.Add(string.Concat("NUM_DATA_ROWS ", jsonElements.Length.ToString().PadLeft(9, '0')));
|
||||||
@ -78,9 +77,9 @@ namespace Adaptation.Shared
|
|||||||
lines.Add(string.Concat("LOGISTICS_2", '\t', "B_CHAMBER=;B_INFO=", fileRead.EventName, ";B_INFO2=", fileRead.EquipmentType, ";B_JOBID=", fileRead.CellInstanceName, ";B_MES_ENTITY=", fileRead.MesEntity, ";B_MID=", logistics.MID, ";B_NULL_DATA=", fileRead.NullData, ";B_PPID=NO_PPID;B_PROCESS_JOBID=", logistics.ProcessJobID, ";B_PRODUCT=;B_SEQUENCE=", logistics.Sequence, ";B_WAFER_ID=;"));
|
lines.Add(string.Concat("LOGISTICS_2", '\t', "B_CHAMBER=;B_INFO=", fileRead.EventName, ";B_INFO2=", fileRead.EquipmentType, ";B_JOBID=", fileRead.CellInstanceName, ";B_MES_ENTITY=", fileRead.MesEntity, ";B_MID=", logistics.MID, ";B_NULL_DATA=", fileRead.NullData, ";B_PPID=NO_PPID;B_PROCESS_JOBID=", logistics.ProcessJobID, ";B_PRODUCT=;B_SEQUENCE=", logistics.Sequence, ";B_WAFER_ID=;"));
|
||||||
lines.Add("END_HEADER");
|
lines.Add("END_HEADER");
|
||||||
}
|
}
|
||||||
stringBuilder.Clear();
|
_ = stringBuilder.Clear();
|
||||||
foreach (string line in lines)
|
foreach (string line in lines)
|
||||||
stringBuilder.AppendLine(line);
|
_ = stringBuilder.AppendLine(line);
|
||||||
result = stringBuilder.ToString();
|
result = stringBuilder.ToString();
|
||||||
result = result.Replace(headerOffset, result.IndexOf("NUM_DATA_ROWS").ToString().PadLeft(9, '0')).
|
result = result.Replace(headerOffset, result.IndexOf("NUM_DATA_ROWS").ToString().PadLeft(9, '0')).
|
||||||
Replace(dataOffset, result.IndexOf('"').ToString().PadLeft(9, '0')).
|
Replace(dataOffset, result.IndexOf('"').ToString().PadLeft(9, '0')).
|
||||||
@ -98,7 +97,7 @@ namespace Adaptation.Shared
|
|||||||
lines = File.ReadAllLines(reportFullPath);
|
lines = File.ReadAllLines(reportFullPath);
|
||||||
string[] segments;
|
string[] segments;
|
||||||
if (lines.Length < 7)
|
if (lines.Length < 7)
|
||||||
segments = new string[] { };
|
segments = Array.Empty<string>();
|
||||||
else
|
else
|
||||||
segments = lines[6].Trim().Split('\t');
|
segments = lines[6].Trim().Split('\t');
|
||||||
List<string> columns = new();
|
List<string> columns = new();
|
||||||
@ -121,7 +120,7 @@ namespace Adaptation.Shared
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool lookForLogistics = false;
|
bool lookForLogistics = false;
|
||||||
for (int r = 7; r < lines.Count(); r++)
|
for (int r = 7; r < lines.Length; r++)
|
||||||
{
|
{
|
||||||
if (lines[r].StartsWith("NUM_DATA_ROWS"))
|
if (lines[r].StartsWith("NUM_DATA_ROWS"))
|
||||||
lookForLogistics = true;
|
lookForLogistics = true;
|
||||||
@ -132,11 +131,11 @@ namespace Adaptation.Shared
|
|||||||
}
|
}
|
||||||
if (lines[r].StartsWith("LOGISTICS_1"))
|
if (lines[r].StartsWith("LOGISTICS_1"))
|
||||||
{
|
{
|
||||||
for (int i = r; i < lines.Count(); i++)
|
for (int i = r; i < lines.Length; i++)
|
||||||
{
|
{
|
||||||
if (lines[r].StartsWith("END_HEADER"))
|
if (lines[r].StartsWith("END_HEADER"))
|
||||||
break;
|
break;
|
||||||
logistics.AppendLine(lines[i]);
|
_ = logistics.AppendLine(lines[i]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -159,14 +158,14 @@ namespace Adaptation.Shared
|
|||||||
StringBuilder stringBuilder = new();
|
StringBuilder stringBuilder = new();
|
||||||
foreach (string bodyLine in bodyLines)
|
foreach (string bodyLine in bodyLines)
|
||||||
{
|
{
|
||||||
stringBuilder.Append('{');
|
_ = stringBuilder.Append('{');
|
||||||
segments = bodyLine.Trim().Split('\t');
|
segments = bodyLine.Trim().Split('\t');
|
||||||
if (!lookForNumbers)
|
if (!lookForNumbers)
|
||||||
{
|
{
|
||||||
for (int c = 1; c < segments.Length; c++)
|
for (int c = 1; c < segments.Length; c++)
|
||||||
{
|
{
|
||||||
value = segments[c].Replace("\"", "\\\"").Replace("\\", "\\\\");
|
value = segments[c].Replace("\"", "\\\"").Replace("\\", "\\\\");
|
||||||
stringBuilder.Append('"').Append(columns[c]).Append("\":\"").Append(value).Append("\",");
|
_ = stringBuilder.Append('"').Append(columns[c]).Append("\":\"").Append(value).Append("\",");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -175,17 +174,17 @@ namespace Adaptation.Shared
|
|||||||
{
|
{
|
||||||
value = segments[c].Replace("\"", "\\\"").Replace("\\", "\\\\");
|
value = segments[c].Replace("\"", "\\\"").Replace("\\", "\\\\");
|
||||||
if (string.IsNullOrEmpty(value))
|
if (string.IsNullOrEmpty(value))
|
||||||
stringBuilder.Append('"').Append(columns[c]).Append("\":").Append(value).Append("null,");
|
_ = stringBuilder.Append('"').Append(columns[c]).Append("\":").Append(value).Append("null,");
|
||||||
else if (value.All(char.IsDigit))
|
else if (value.All(char.IsDigit))
|
||||||
stringBuilder.Append('"').Append(columns[c]).Append("\":").Append(value).Append(",");
|
_ = stringBuilder.Append('"').Append(columns[c]).Append("\":").Append(value).Append(',');
|
||||||
else
|
else
|
||||||
stringBuilder.Append('"').Append(columns[c]).Append("\":\"").Append(value).Append("\",");
|
_ = stringBuilder.Append('"').Append(columns[c]).Append("\":\"").Append(value).Append("\",");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stringBuilder.Remove(stringBuilder.Length - 1, 1);
|
_ = stringBuilder.Remove(stringBuilder.Length - 1, 1);
|
||||||
stringBuilder.AppendLine("},");
|
_ = stringBuilder.AppendLine("},");
|
||||||
}
|
}
|
||||||
stringBuilder.Remove(stringBuilder.Length - 3, 3);
|
_ = stringBuilder.Remove(stringBuilder.Length - 3, 3);
|
||||||
results = JsonSerializer.Deserialize<JsonElement[]>(string.Concat("[", stringBuilder, "]"));
|
results = JsonSerializer.Deserialize<JsonElement[]>(string.Concat("[", stringBuilder, "]"));
|
||||||
}
|
}
|
||||||
return results;
|
return results;
|
||||||
@ -268,25 +267,13 @@ namespace Adaptation.Shared
|
|||||||
return string.Concat(((int)searchFor).ToString().PadLeft(2, '0'), separator, searchFor.ToString().Replace("In", string.Concat(separator, "In")).Replace("Ex", string.Concat(separator, "Ex")));
|
return string.Concat(((int)searchFor).ToString().PadLeft(2, '0'), separator, searchFor.ToString().Replace("In", string.Concat(separator, "In")).Replace("Ex", string.Concat(separator, "Ex")));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string EquipmentIntegration(bool addSpaces = true, char separator = ' ')
|
public static string EquipmentIntegration(bool addSpaces = true, char separator = ' ') => GetString(SearchFor.EquipmentIntegration, addSpaces, separator);
|
||||||
{
|
|
||||||
return GetString(SearchFor.EquipmentIntegration, addSpaces, separator);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string BusinessIntegration(bool addSpaces = true, char separator = ' ')
|
public static string BusinessIntegration(bool addSpaces = true, char separator = ' ') => GetString(SearchFor.BusinessIntegration, addSpaces, separator);
|
||||||
{
|
|
||||||
return GetString(SearchFor.BusinessIntegration, addSpaces, separator);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string SystemExport(bool addSpaces = true, char separator = ' ')
|
public static string SystemExport(bool addSpaces = true, char separator = ' ') => GetString(SearchFor.SystemExport, addSpaces, separator);
|
||||||
{
|
|
||||||
return GetString(SearchFor.SystemExport, addSpaces, separator);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string Archive(bool addSpaces = true, char separator = ' ')
|
public static string Archive(bool addSpaces = true, char separator = ' ') => GetString(SearchFor.Archive, addSpaces, separator);
|
||||||
{
|
|
||||||
return GetString(SearchFor.Archive, addSpaces, separator);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetLines(Logistics logistics, Properties.IScopeInfo scopeInfo, List<string> names, Dictionary<string, List<string>> keyValuePairs, string dateFormat, string timeFormat, List<string> pairedParameterNames, bool useDateTimeFromSequence = true, string format = "", List<string> ignoreParameterNames = null)
|
public static string GetLines(Logistics logistics, Properties.IScopeInfo scopeInfo, List<string> names, Dictionary<string, List<string>> keyValuePairs, string dateFormat, string timeFormat, List<string> pairedParameterNames, bool useDateTimeFromSequence = true, string format = "", List<string> ignoreParameterNames = null)
|
||||||
{
|
{
|
||||||
@ -301,7 +288,7 @@ namespace Adaptation.Shared
|
|||||||
const string columnDate = "Date";
|
const string columnDate = "Date";
|
||||||
const string columnTime = "Time";
|
const string columnTime = "Time";
|
||||||
const string firstDuplicate = "_1";
|
const string firstDuplicate = "_1";
|
||||||
result.AppendLine(scopeInfo.Header);
|
_ = result.AppendLine(scopeInfo.Header);
|
||||||
StringBuilder line = new();
|
StringBuilder line = new();
|
||||||
if (logistics.NullData is null)
|
if (logistics.NullData is null)
|
||||||
nullData = string.Empty;
|
nullData = string.Empty;
|
||||||
@ -310,8 +297,8 @@ namespace Adaptation.Shared
|
|||||||
int count = (from l in keyValuePairs select l.Value.Count).Min();
|
int count = (from l in keyValuePairs select l.Value.Count).Min();
|
||||||
for (int r = 0; r < count; r++)
|
for (int r = 0; r < count; r++)
|
||||||
{
|
{
|
||||||
line.Clear();
|
_ = line.Clear();
|
||||||
line.Append("!");
|
_ = line.Append('!');
|
||||||
foreach (KeyValuePair<string, List<string>> keyValuePair in keyValuePairs)
|
foreach (KeyValuePair<string, List<string>> keyValuePair in keyValuePairs)
|
||||||
{
|
{
|
||||||
if (!names.Contains(keyValuePair.Key))
|
if (!names.Contains(keyValuePair.Key))
|
||||||
@ -323,29 +310,29 @@ namespace Adaptation.Shared
|
|||||||
if (string.IsNullOrEmpty(keyValuePair.Value[r]) || keyValuePair.Value[r] == nullData)
|
if (string.IsNullOrEmpty(keyValuePair.Value[r]) || keyValuePair.Value[r] == nullData)
|
||||||
continue;
|
continue;
|
||||||
else
|
else
|
||||||
result.Append(line).Append(keyValuePair.Key).Append(';').AppendLine(keyValuePair.Value[r]);
|
_ = result.Append(line).Append(keyValuePair.Key).Append(';').AppendLine(keyValuePair.Value[r]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (useDateTimeFromSequence && keyValuePair.Key == columnDate)
|
if (useDateTimeFromSequence && keyValuePair.Key == columnDate)
|
||||||
line.Append(logistics.DateTimeFromSequence.ToString(dateFormat));
|
_ = line.Append(logistics.DateTimeFromSequence.ToString(dateFormat));
|
||||||
else if (useDateTimeFromSequence && keyValuePair.Key == columnTime)
|
else if (useDateTimeFromSequence && keyValuePair.Key == columnTime)
|
||||||
line.Append(logistics.DateTimeFromSequence.ToString(timeFormat));
|
_ = line.Append(logistics.DateTimeFromSequence.ToString(timeFormat));
|
||||||
else if (!useDateTimeFromSequence && keyValuePair.Key == columnDate && keyValuePair.Value[r].Length == format.Length)
|
else if (!useDateTimeFromSequence && keyValuePair.Key == columnDate && keyValuePair.Value[r].Length == format.Length)
|
||||||
line.Append(DateTime.ParseExact(keyValuePair.Value[r], format, CultureInfo.InvariantCulture).ToString(dateFormat));
|
_ = line.Append(DateTime.ParseExact(keyValuePair.Value[r], format, CultureInfo.InvariantCulture).ToString(dateFormat));
|
||||||
else if (!useDateTimeFromSequence && keyValuePair.Key == columnTime && keyValuePairs.ContainsKey(string.Concat(keyValuePair.Key, firstDuplicate)) && keyValuePairs[string.Concat(keyValuePair.Key, firstDuplicate)][r].Length == format.Length)
|
else if (!useDateTimeFromSequence && keyValuePair.Key == columnTime && keyValuePairs.ContainsKey(string.Concat(keyValuePair.Key, firstDuplicate)) && keyValuePairs[string.Concat(keyValuePair.Key, firstDuplicate)][r].Length == format.Length)
|
||||||
line.Append(DateTime.ParseExact(keyValuePairs[string.Concat(keyValuePair.Key, firstDuplicate)][r], format, CultureInfo.InvariantCulture).ToString(timeFormat));
|
_ = line.Append(DateTime.ParseExact(keyValuePairs[string.Concat(keyValuePair.Key, firstDuplicate)][r], format, CultureInfo.InvariantCulture).ToString(timeFormat));
|
||||||
else if (string.IsNullOrEmpty(keyValuePair.Value[r]) || keyValuePair.Value[r] == nullData)
|
else if (string.IsNullOrEmpty(keyValuePair.Value[r]) || keyValuePair.Value[r] == nullData)
|
||||||
line.Append(nullData);
|
_ = line.Append(nullData);
|
||||||
else
|
else
|
||||||
line.Append(keyValuePair.Value[r]);
|
_ = line.Append(keyValuePair.Value[r]);
|
||||||
line.Append(';');
|
_ = line.Append(';');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!pairedParameterNames.Any())
|
if (!pairedParameterNames.Any())
|
||||||
{
|
{
|
||||||
line.Remove(line.Length - 1, 1);
|
_ = line.Remove(line.Length - 1, 1);
|
||||||
result.AppendLine(line.ToString());
|
_ = result.AppendLine(line.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result.ToString();
|
return result.ToString();
|
||||||
@ -401,19 +388,19 @@ namespace Adaptation.Shared
|
|||||||
vs[s] = segments[s].Length;
|
vs[s] = segments[s].Length;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
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(outputSeperator);
|
||||||
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(inputSeperator);
|
||||||
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(outputSeperator);
|
||||||
stringBuilder.Remove(stringBuilder.Length - 1, 1);
|
_ = stringBuilder.Remove(stringBuilder.Length - 1, 1);
|
||||||
results.Add(stringBuilder.ToString());
|
results.Add(stringBuilder.ToString());
|
||||||
}
|
}
|
||||||
results.Add(string.Empty);
|
results.Add(string.Empty);
|
||||||
@ -422,5 +409,3 @@ namespace Adaptation.Shared
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
@ -1,5 +1,4 @@
|
|||||||
namespace Adaptation.Shared.Properties
|
namespace Adaptation.Shared.Properties;
|
||||||
{
|
|
||||||
|
|
||||||
public interface IDescription
|
public interface IDescription
|
||||||
{
|
{
|
||||||
@ -9,5 +8,3 @@ namespace Adaptation.Shared.Properties
|
|||||||
int Index { get; }
|
int Index { get; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
@ -1,5 +1,4 @@
|
|||||||
namespace Adaptation.Shared.Properties
|
namespace Adaptation.Shared.Properties;
|
||||||
{
|
|
||||||
|
|
||||||
public interface IFileRead
|
public interface IFileRead
|
||||||
{
|
{
|
||||||
@ -16,5 +15,3 @@ namespace Adaptation.Shared.Properties
|
|||||||
string CellInstanceConnectionName { get; }
|
string CellInstanceConnectionName { get; }
|
||||||
string ParameterizedModelObjectDefinitionType { get; }
|
string ParameterizedModelObjectDefinitionType { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
@ -1,8 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Adaptation.Shared.Properties
|
namespace Adaptation.Shared.Properties;
|
||||||
{
|
|
||||||
|
|
||||||
public interface ILogistics
|
public interface ILogistics
|
||||||
{
|
{
|
||||||
@ -21,5 +20,3 @@ namespace Adaptation.Shared.Properties
|
|||||||
public List<Logistics2> Logistics2 { get; set; }
|
public List<Logistics2> Logistics2 { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
@ -1,5 +1,4 @@
|
|||||||
namespace Adaptation.Shared.Properties
|
namespace Adaptation.Shared.Properties;
|
||||||
{
|
|
||||||
|
|
||||||
public interface ILogistics2
|
public interface ILogistics2
|
||||||
{
|
{
|
||||||
@ -13,5 +12,3 @@ namespace Adaptation.Shared.Properties
|
|||||||
public string Recipe { get; }
|
public string Recipe { get; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
@ -1,7 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Adaptation.Shared.Properties
|
namespace Adaptation.Shared.Properties;
|
||||||
{
|
|
||||||
|
|
||||||
public interface IProcessData
|
public interface IProcessData
|
||||||
{
|
{
|
||||||
@ -9,5 +8,3 @@ namespace Adaptation.Shared.Properties
|
|||||||
List<object> Details { get; }
|
List<object> Details { get; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
@ -1,7 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Adaptation.Shared.Properties
|
namespace Adaptation.Shared.Properties;
|
||||||
{
|
|
||||||
|
|
||||||
public interface IScopeInfo
|
public interface IScopeInfo
|
||||||
{
|
{
|
||||||
@ -16,5 +15,3 @@ namespace Adaptation.Shared.Properties
|
|||||||
string FileNameWithoutExtension { get; }
|
string FileNameWithoutExtension { get; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
@ -1,5 +1,4 @@
|
|||||||
namespace Adaptation.Shared
|
namespace Adaptation.Shared;
|
||||||
{
|
|
||||||
|
|
||||||
public enum Test
|
public enum Test
|
||||||
{
|
{
|
||||||
@ -14,22 +13,27 @@ namespace Adaptation.Shared
|
|||||||
CandelaProdU = 39,
|
CandelaProdU = 39,
|
||||||
CandelaPSL = 38,
|
CandelaPSL = 38,
|
||||||
CandelaVerify = 37,
|
CandelaVerify = 37,
|
||||||
CDE = 24,
|
HGCV = 24,
|
||||||
CV = 3,
|
CV = 3,
|
||||||
DailyRPMAverage = 19,
|
DailyRPMAverage = 19,
|
||||||
DailyRPMPLRatio = 20,
|
DailyRPMPLRatio = 20,
|
||||||
DailyRPMXY = 18,
|
DailyRPMXY = 18,
|
||||||
Denton = 9,
|
Denton = 9,
|
||||||
DiffusionLength = 45,
|
DiffusionLength = 45,
|
||||||
|
GRATXTCenter = 51,
|
||||||
|
GRATXTEdge = 52, //Largest
|
||||||
|
GrowthRateXML = 50,
|
||||||
Hall = 10,
|
Hall = 10,
|
||||||
HgCV = 23,
|
HgCV = 23,
|
||||||
|
JVXRD = 47,
|
||||||
Lehighton = 13,
|
Lehighton = 13,
|
||||||
|
LogbookCAC = 49,
|
||||||
Microscope = 46,
|
Microscope = 46,
|
||||||
MonthlyCV = 4,
|
MonthlyCV = 4,
|
||||||
MonthlyHall = 11,
|
MonthlyHall = 11,
|
||||||
MonthlyXRD = 32,
|
MonthlyXRD = 32,
|
||||||
Photoreflectance = 22,
|
Photoreflectance = 22,
|
||||||
PlatoA = 48, //Largest
|
PlatoA = 48,
|
||||||
RPMAverage = 16,
|
RPMAverage = 16,
|
||||||
RPMPLRatio = 17,
|
RPMPLRatio = 17,
|
||||||
RPMXY = 15,
|
RPMXY = 15,
|
||||||
@ -50,8 +54,5 @@ namespace Adaptation.Shared
|
|||||||
WeeklyXRDSLStks = 43,
|
WeeklyXRDSLStks = 43,
|
||||||
WeeklyXRDXRR = 44,
|
WeeklyXRDXRR = 44,
|
||||||
XRDWeightedAverage = 31,
|
XRDWeightedAverage = 31,
|
||||||
JVXRD = 47,
|
XRDXY = 30,
|
||||||
XRDXY = 30
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
using Adaptation.Shared;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
using Shared;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Text.Json;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
|
namespace _Tests.CreateSelfDescription.Staging.v2_39_0;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class HGCV1 : EAFLoggingUnitTesting
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
internal static HGCV1 EAFLoggingUnitTesting { get; private set; }
|
||||||
|
|
||||||
|
public HGCV1() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
if (EAFLoggingUnitTesting is null)
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
|
||||||
|
public HGCV1(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
if (EAFLoggingUnitTesting is null)
|
||||||
|
EAFLoggingUnitTesting = new HGCV1(testContext);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||||
|
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||||
|
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||||
|
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClassCleanup()]
|
||||||
|
public static void ClassCleanup()
|
||||||
|
{
|
||||||
|
if (EAFLoggingUnitTesting.Logger is not null)
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation("Cleanup");
|
||||||
|
if (EAFLoggingUnitTesting is not null)
|
||||||
|
EAFLoggingUnitTesting.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_39_0__HGCV1__()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,54 @@
|
|||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
using Shared;
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
namespace _Tests.CreateSelfDescription.Staging.v2_39_0;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class HGCV2 : EAFLoggingUnitTesting
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
internal static HGCV2 EAFLoggingUnitTesting { get; private set; }
|
||||||
|
|
||||||
|
public HGCV2() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
if (EAFLoggingUnitTesting is null)
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
|
||||||
|
public HGCV2(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
if (EAFLoggingUnitTesting is null)
|
||||||
|
EAFLoggingUnitTesting = new HGCV2(testContext);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||||
|
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||||
|
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||||
|
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClassCleanup()]
|
||||||
|
public static void ClassCleanup()
|
||||||
|
{
|
||||||
|
if (EAFLoggingUnitTesting.Logger is not null)
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation("Cleanup");
|
||||||
|
if (EAFLoggingUnitTesting is not null)
|
||||||
|
EAFLoggingUnitTesting.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_39_0__HGCV2__()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,65 @@
|
|||||||
|
using Adaptation.Shared.Methods;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
using Shared;
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
namespace _Tests.CreateSelfDescription.Staging.v2_39_0;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class HGCV3_EQPT : EAFLoggingUnitTesting
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
internal static HGCV3_EQPT EAFLoggingUnitTesting { get; private set; }
|
||||||
|
|
||||||
|
public HGCV3_EQPT() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
if (EAFLoggingUnitTesting is null)
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
|
||||||
|
public HGCV3_EQPT(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
if (EAFLoggingUnitTesting is null)
|
||||||
|
EAFLoggingUnitTesting = new HGCV3_EQPT(testContext);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||||
|
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||||
|
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||||
|
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClassCleanup()]
|
||||||
|
public static void ClassCleanup()
|
||||||
|
{
|
||||||
|
if (EAFLoggingUnitTesting.Logger is not null)
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation("Cleanup");
|
||||||
|
if (EAFLoggingUnitTesting is not null)
|
||||||
|
EAFLoggingUnitTesting.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_39_0__HGCV3_EQPT__DownloadRsMFile()
|
||||||
|
{
|
||||||
|
string check = "WafrMeas.log|.RsM";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase);
|
||||||
|
Assert.IsTrue(fileNameAndJson[1].Contains(check));
|
||||||
|
File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]);
|
||||||
|
IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false);
|
||||||
|
Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName));
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,65 @@
|
|||||||
|
using Adaptation.Shared.Methods;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
using Shared;
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
namespace _Tests.CreateSelfDescription.Staging.v2_39_0;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class HGCV3 : EAFLoggingUnitTesting
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
internal static HGCV3 EAFLoggingUnitTesting { get; private set; }
|
||||||
|
|
||||||
|
public HGCV3() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
if (EAFLoggingUnitTesting is null)
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
|
||||||
|
public HGCV3(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
if (EAFLoggingUnitTesting is null)
|
||||||
|
EAFLoggingUnitTesting = new HGCV3(testContext);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||||
|
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||||
|
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||||
|
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClassCleanup()]
|
||||||
|
public static void ClassCleanup()
|
||||||
|
{
|
||||||
|
if (EAFLoggingUnitTesting.Logger is not null)
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation("Cleanup");
|
||||||
|
if (EAFLoggingUnitTesting is not null)
|
||||||
|
EAFLoggingUnitTesting.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_39_0__HGCV3__RsM()
|
||||||
|
{
|
||||||
|
string check = "*.RsM";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase);
|
||||||
|
Assert.IsTrue(fileNameAndJson[1].Contains(check));
|
||||||
|
File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]);
|
||||||
|
IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false);
|
||||||
|
Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName));
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,177 @@
|
|||||||
|
using Adaptation.Shared.Methods;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
using Shared;
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
namespace _Tests.CreateSelfDescription.Staging.v2_39_0;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class MET08RESIHGCV : EAFLoggingUnitTesting
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
internal static MET08RESIHGCV EAFLoggingUnitTesting { get; private set; }
|
||||||
|
|
||||||
|
public MET08RESIHGCV() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
if (EAFLoggingUnitTesting is null)
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
|
||||||
|
public MET08RESIHGCV(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
if (EAFLoggingUnitTesting is null)
|
||||||
|
EAFLoggingUnitTesting = new MET08RESIHGCV(testContext);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||||
|
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||||
|
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||||
|
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClassCleanup()]
|
||||||
|
public static void ClassCleanup()
|
||||||
|
{
|
||||||
|
if (EAFLoggingUnitTesting.Logger is not null)
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation("Cleanup");
|
||||||
|
if (EAFLoggingUnitTesting is not null)
|
||||||
|
EAFLoggingUnitTesting.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV()
|
||||||
|
{
|
||||||
|
string check = "~IsXToOpenInsightMetrologyViewer";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase);
|
||||||
|
Assert.IsTrue(fileNameAndJson[1].Contains(check));
|
||||||
|
File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]);
|
||||||
|
IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false);
|
||||||
|
Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName));
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV_()
|
||||||
|
{
|
||||||
|
string check = "~IsXToIQSSi";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase);
|
||||||
|
Assert.IsTrue(fileNameAndJson[1].Contains(check));
|
||||||
|
File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]);
|
||||||
|
IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false);
|
||||||
|
Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName));
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV__()
|
||||||
|
{
|
||||||
|
string check = "~IsXToOpenInsight";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase);
|
||||||
|
Assert.IsTrue(fileNameAndJson[1].Contains(check));
|
||||||
|
File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]);
|
||||||
|
IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false);
|
||||||
|
Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName));
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV___()
|
||||||
|
{
|
||||||
|
string check = "~IsXToOpenInsightMetrologyViewerAttachments";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase);
|
||||||
|
Assert.IsTrue(fileNameAndJson[1].Contains(check));
|
||||||
|
File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]);
|
||||||
|
IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false);
|
||||||
|
Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName));
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV____()
|
||||||
|
{
|
||||||
|
string check = "~IsXToAPC";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase);
|
||||||
|
Assert.IsTrue(fileNameAndJson[1].Contains(check));
|
||||||
|
File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]);
|
||||||
|
IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false);
|
||||||
|
Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName));
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV_____()
|
||||||
|
{
|
||||||
|
string check = "~IsXToSPaCe";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase);
|
||||||
|
Assert.IsTrue(fileNameAndJson[1].Contains(check));
|
||||||
|
File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]);
|
||||||
|
IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false);
|
||||||
|
Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName));
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV______()
|
||||||
|
{
|
||||||
|
string check = "~IsXToArchive";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase);
|
||||||
|
Assert.IsTrue(fileNameAndJson[1].Contains(check));
|
||||||
|
File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]);
|
||||||
|
IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false);
|
||||||
|
Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName));
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV_______()
|
||||||
|
{
|
||||||
|
string check = "~IsArchive";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase);
|
||||||
|
Assert.IsTrue(fileNameAndJson[1].Contains(check));
|
||||||
|
File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]);
|
||||||
|
IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false);
|
||||||
|
Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName));
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_39_0__MET08RESIHGCV__MET08RESIHGCV________()
|
||||||
|
{
|
||||||
|
string check = "~IsDummy";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase);
|
||||||
|
Assert.IsTrue(fileNameAndJson[1].Contains(check));
|
||||||
|
File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]);
|
||||||
|
IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false);
|
||||||
|
Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName));
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
0
Adaptation/_Tests/Extract/Staging/v2.39.0/HGCV1.cs
Normal file
0
Adaptation/_Tests/Extract/Staging/v2.39.0/HGCV1.cs
Normal file
0
Adaptation/_Tests/Extract/Staging/v2.39.0/HGCV2.cs
Normal file
0
Adaptation/_Tests/Extract/Staging/v2.39.0/HGCV2.cs
Normal file
32
Adaptation/_Tests/Extract/Staging/v2.39.0/HGCV3-EQPT.cs
Normal file
32
Adaptation/_Tests/Extract/Staging/v2.39.0/HGCV3-EQPT.cs
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
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.Reflection;
|
||||||
|
using System.Text.Json;
|
||||||
|
|
||||||
|
namespace _Tests.Extract.Staging.v2_39_0;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class HGCV3_EQPT
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
private static CreateSelfDescription.Staging.v2_39_0.HGCV3_EQPT _HGCV3_EQPT;
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
CreateSelfDescription.Staging.v2_39_0.HGCV3_EQPT.ClassInitialize(testContext);
|
||||||
|
_HGCV3_EQPT = CreateSelfDescription.Staging.v2_39_0.HGCV3_EQPT.EAFLoggingUnitTesting;
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_39_0__HGCV3_EQPT__DownloadRsMFile() => _HGCV3_EQPT.Staging__v2_39_0__HGCV3_EQPT__DownloadRsMFile();
|
||||||
|
|
||||||
|
}
|
32
Adaptation/_Tests/Extract/Staging/v2.39.0/HGCV3.cs
Normal file
32
Adaptation/_Tests/Extract/Staging/v2.39.0/HGCV3.cs
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
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.Reflection;
|
||||||
|
using System.Text.Json;
|
||||||
|
|
||||||
|
namespace _Tests.Extract.Staging.v2_39_0;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class HGCV3
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
private static CreateSelfDescription.Staging.v2_39_0.HGCV3 _HGCV3;
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
CreateSelfDescription.Staging.v2_39_0.HGCV3.ClassInitialize(testContext);
|
||||||
|
_HGCV3 = CreateSelfDescription.Staging.v2_39_0.HGCV3.EAFLoggingUnitTesting;
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_39_0__HGCV3__RsM() => _HGCV3.Staging__v2_39_0__HGCV3__RsM();
|
||||||
|
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user