MET08THFTIRQS408M - v2.47.0 - Job -
Work Oder, Reactor and Slot
This commit is contained in:
parent
0626e4f4e3
commit
cb73fdd16b
2
Adaptation/.vscode/launch.json
vendored
2
Adaptation/.vscode/launch.json
vendored
@ -4,7 +4,7 @@
|
|||||||
"name": ".NET Core Attach",
|
"name": ".NET Core Attach",
|
||||||
"type": "coreclr",
|
"type": "coreclr",
|
||||||
"request": "attach",
|
"request": "attach",
|
||||||
"processId": 17568
|
"processId": 11172
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -253,78 +253,120 @@ public partial class ProcessData : IProcessData
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static (string, string) GetReactorAndRDS(string defaultReactor, string defaultRDS, string text, string formattedText, string[] segments)
|
||||||
|
{
|
||||||
|
string rds;
|
||||||
|
string reactor;
|
||||||
|
if (string.IsNullOrEmpty(text) || segments.Length == 0 || string.IsNullOrEmpty(formattedText))
|
||||||
|
reactor = defaultReactor;
|
||||||
|
else
|
||||||
|
reactor = segments[0];
|
||||||
|
if (segments.Length <= 1 || !int.TryParse(segments[1], out int rdsValue) || rdsValue < 99)
|
||||||
|
rds = defaultRDS;
|
||||||
|
else
|
||||||
|
rds = segments[1];
|
||||||
|
if (reactor.Length > 3)
|
||||||
|
{
|
||||||
|
rds = reactor;
|
||||||
|
reactor = defaultReactor;
|
||||||
|
}
|
||||||
|
return new(reactor, rds);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static (string, string) GetLayerAndPSN(string defaultLayer, string defaultPSN, string[] segments)
|
||||||
|
{
|
||||||
|
string psn;
|
||||||
|
string layer;
|
||||||
|
if (segments.Length <= 2)
|
||||||
|
{
|
||||||
|
psn = defaultPSN;
|
||||||
|
layer = defaultLayer;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string[] segmentsB = segments[2].Split('.');
|
||||||
|
psn = segmentsB[0];
|
||||||
|
if (segmentsB.Length <= 1)
|
||||||
|
layer = defaultLayer;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
layer = segmentsB[1];
|
||||||
|
if (layer.Length > 1 && layer[0] == '0')
|
||||||
|
layer = layer.Substring(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return (layer, psn);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string GetZone(string[] segments)
|
||||||
|
{
|
||||||
|
string result;
|
||||||
|
if (segments.Length <= 3)
|
||||||
|
result = string.Empty;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = segments[3];
|
||||||
|
if (result.Length > 1 && result[0] == '0')
|
||||||
|
result = result.Substring(1);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
public static Descriptor GetDescriptor(string text)
|
public static Descriptor GetDescriptor(string text)
|
||||||
{
|
{
|
||||||
Descriptor result;
|
Descriptor result;
|
||||||
string psn;
|
string psn;
|
||||||
string rds;
|
string rds;
|
||||||
string zone;
|
string zone;
|
||||||
string wafer;
|
|
||||||
string layer;
|
string layer;
|
||||||
|
string wafer;
|
||||||
string reactor;
|
string reactor;
|
||||||
string employee;
|
string employee;
|
||||||
const string defaultPSN = "0000";
|
string defaultPSN = string.Empty;
|
||||||
const string defaultReactor = "00";
|
string defaultRDS = string.Empty;
|
||||||
const string defaultRDS = "000000";
|
string defaultZone = string.Empty;
|
||||||
if (text.Length is 2 or 3)
|
string defaultLayer = string.Empty;
|
||||||
|
string defaultReactor = string.Empty;
|
||||||
|
string defaultEmployee = string.Empty;
|
||||||
|
if (string.IsNullOrEmpty(text) || (text.Length is 2 or 3 && Regex.IsMatch(text, "^[a-zA-z]{2,3}")))
|
||||||
{
|
{
|
||||||
wafer = text;
|
wafer = text;
|
||||||
employee = text;
|
employee = text;
|
||||||
rds = defaultRDS;
|
|
||||||
psn = defaultPSN;
|
psn = defaultPSN;
|
||||||
zone = string.Empty;
|
rds = defaultRDS;
|
||||||
layer = string.Empty;
|
zone = defaultZone;
|
||||||
|
layer = defaultLayer;
|
||||||
reactor = defaultReactor;
|
reactor = defaultReactor;
|
||||||
}
|
}
|
||||||
|
else if (Regex.IsMatch(text, @"^[0-9]{2}[.][0-9]{1}[.]?[0-9]{0,1}"))
|
||||||
|
{
|
||||||
|
string[] segments = text.Split('.');
|
||||||
|
wafer = text;
|
||||||
|
psn = defaultPSN;
|
||||||
|
rds = defaultRDS;
|
||||||
|
layer = segments[1];
|
||||||
|
reactor = segments[0];
|
||||||
|
employee = defaultEmployee;
|
||||||
|
if (segments.Length <= 2)
|
||||||
|
zone = defaultZone;
|
||||||
|
else
|
||||||
|
zone = segments[2];
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Remove illegal characters \/:*?"<>| found in the Batch
|
// Remove illegal characters \/:*?"<>| found in the Batch
|
||||||
wafer = Regex.Replace(text, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
|
wafer = Regex.Replace(text, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
|
||||||
if (wafer.StartsWith("1T") || wafer.StartsWith("1t"))
|
if (wafer.Length > 2 && wafer[0] == '1' && (wafer[1] == 'T' || wafer[1] == 't'))
|
||||||
wafer = wafer.Substring(2);
|
wafer = wafer.Substring(2);
|
||||||
string[] segments = wafer.Split('-');
|
string[] segments = wafer.Split('-');
|
||||||
if (segments.Length == 0)
|
(reactor, rds) = GetReactorAndRDS(defaultReactor, defaultRDS, text, wafer, segments);
|
||||||
reactor = defaultReactor;
|
(layer, psn) = GetLayerAndPSN(defaultLayer, defaultPSN, segments);
|
||||||
else
|
zone = GetZone(segments);
|
||||||
reactor = segments[0];
|
|
||||||
if (segments.Length <= 1)
|
|
||||||
rds = defaultRDS;
|
|
||||||
else
|
|
||||||
rds = segments[1];
|
|
||||||
if (reactor.Length > 3)
|
|
||||||
{
|
|
||||||
rds = reactor;
|
|
||||||
reactor = defaultReactor;
|
|
||||||
}
|
|
||||||
if (segments.Length <= 2)
|
|
||||||
psn = defaultPSN;
|
|
||||||
else
|
|
||||||
psn = segments[2];
|
|
||||||
if (segments.Length < 3)
|
|
||||||
layer = string.Empty;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
string[] segmentsB = segments[2].Split('.');
|
|
||||||
if (segmentsB.Length > 1)
|
|
||||||
psn = segmentsB[0];
|
|
||||||
if (segmentsB.Length <= 1)
|
|
||||||
layer = string.Empty;
|
|
||||||
else
|
|
||||||
layer = segmentsB[1];
|
|
||||||
}
|
|
||||||
if (segments.Length <= 3)
|
|
||||||
zone = string.Empty;
|
|
||||||
else
|
|
||||||
zone = segments[3];
|
|
||||||
if (segments.Length <= 4)
|
if (segments.Length <= 4)
|
||||||
employee = string.Empty;
|
employee = defaultEmployee;
|
||||||
else
|
else
|
||||||
employee = segments[4];
|
employee = segments[4];
|
||||||
}
|
}
|
||||||
if (layer.Length > 1 && layer[0] == '0')
|
|
||||||
layer = layer.Substring(1);
|
|
||||||
if (zone.Length > 1 && zone[0] == '0')
|
|
||||||
zone = zone.Substring(1);
|
|
||||||
result = new(employee, layer, psn, rds, reactor, wafer, zone);
|
result = new(employee, layer, psn, rds, reactor, wafer, zone);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -48,35 +48,80 @@ public class QS408M : LoggingUnitTesting, IDisposable
|
|||||||
FileHandlers.QS408M.Descriptor descriptor;
|
FileHandlers.QS408M.Descriptor descriptor;
|
||||||
MethodBase methodBase = new StackFrame().GetMethod();
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor(string.Empty);
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||||
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("12-123456-1234");
|
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("12-123456-1234");
|
||||||
Assert.IsTrue(descriptor.Reactor is "12");
|
Assert.IsTrue(descriptor.Reactor is "12");
|
||||||
Assert.IsTrue(descriptor.RDS is "123456");
|
Assert.IsTrue(descriptor.RDS is "123456");
|
||||||
Assert.IsTrue(descriptor.PSN is "1234");
|
Assert.IsTrue(descriptor.PSN is "1234");
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||||
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("123456");
|
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("123456");
|
||||||
Assert.IsTrue(descriptor.Reactor is "00");
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
|
||||||
Assert.IsTrue(descriptor.RDS is "123456");
|
Assert.IsTrue(descriptor.RDS is "123456");
|
||||||
Assert.IsTrue(descriptor.PSN is "0000");
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||||
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("1T123456");
|
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("1T123456");
|
||||||
Assert.IsTrue(descriptor.Reactor is "00");
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
|
||||||
Assert.IsTrue(descriptor.RDS is "123456");
|
Assert.IsTrue(descriptor.RDS is "123456");
|
||||||
Assert.IsTrue(descriptor.PSN is "0000");
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
|
||||||
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("MP");
|
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("MP");
|
||||||
Assert.IsTrue(descriptor.Reactor is "00");
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
|
||||||
Assert.IsTrue(descriptor.RDS is "000000");
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
|
||||||
Assert.IsTrue(descriptor.PSN is "0000");
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
|
||||||
Assert.IsTrue(descriptor.Employee is "MP");
|
Assert.IsTrue(descriptor.Employee is "MP");
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
|
||||||
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("12-123456-1234.2-1");
|
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("12-123456-1234.2-1");
|
||||||
Assert.IsTrue(descriptor.Reactor is "12");
|
Assert.IsTrue(descriptor.Reactor is "12");
|
||||||
Assert.IsTrue(descriptor.RDS is "123456");
|
Assert.IsTrue(descriptor.RDS is "123456");
|
||||||
Assert.IsTrue(descriptor.PSN is "1234");
|
Assert.IsTrue(descriptor.PSN is "1234");
|
||||||
Assert.IsTrue(descriptor.Layer is "2");
|
Assert.IsTrue(descriptor.Layer is "2");
|
||||||
Assert.IsTrue(descriptor.Zone is "1");
|
Assert.IsTrue(descriptor.Zone is "1");
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||||
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("12-123456-1234.02-1");
|
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("12-123456-1234.02-1");
|
||||||
Assert.IsTrue(descriptor.Reactor is "12");
|
Assert.IsTrue(descriptor.Reactor is "12");
|
||||||
Assert.IsTrue(descriptor.RDS is "123456");
|
Assert.IsTrue(descriptor.RDS is "123456");
|
||||||
Assert.IsTrue(descriptor.PSN is "1234");
|
Assert.IsTrue(descriptor.PSN is "1234");
|
||||||
Assert.IsTrue(descriptor.Layer is "2");
|
Assert.IsTrue(descriptor.Layer is "2");
|
||||||
Assert.IsTrue(descriptor.Zone is "1");
|
Assert.IsTrue(descriptor.Zone is "1");
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||||
|
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("20");
|
||||||
|
Assert.IsTrue(descriptor.Reactor is "20");
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||||
|
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("20.2");
|
||||||
|
Assert.IsTrue(descriptor.Reactor is "20");
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
|
||||||
|
Assert.IsTrue(descriptor.Layer is "2");
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||||
|
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("20.2.1");
|
||||||
|
Assert.IsTrue(descriptor.Layer is "2");
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
|
||||||
|
Assert.IsTrue(descriptor.Reactor is "20");
|
||||||
|
Assert.IsTrue(descriptor.Zone is "1");
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||||
|
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("20.1.1");
|
||||||
|
Assert.IsTrue(descriptor.Layer is "1");
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
|
||||||
|
Assert.IsTrue(descriptor.Reactor is "20");
|
||||||
|
Assert.IsTrue(descriptor.Zone is "1");
|
||||||
|
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Infineon.EAF.Runtime">
|
<PackageReference Include="Infineon.EAF.Runtime">
|
||||||
<Version>2.43.0</Version>
|
<Version>2.47.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="System.Text.Json">
|
<PackageReference Include="System.Text.Json">
|
||||||
<Version>6.0.3</Version>
|
<Version>6.0.3</Version>
|
||||||
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("2.43.0.0")]
|
[assembly: AssemblyVersion("2.47.0.0")]
|
||||||
[assembly: AssemblyFileVersion("2.43.0.0")]
|
[assembly: AssemblyFileVersion("2.47.0.0")]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user