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",
|
||||
"type": "coreclr",
|
||||
"request": "attach",
|
||||
"processId": 17568
|
||||
"processId": 11172
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -253,41 +253,15 @@ public partial class ProcessData : IProcessData
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Descriptor GetDescriptor(string text)
|
||||
private static (string, string) GetReactorAndRDS(string defaultReactor, string defaultRDS, string text, string formattedText, string[] segments)
|
||||
{
|
||||
Descriptor result;
|
||||
string psn;
|
||||
string rds;
|
||||
string zone;
|
||||
string wafer;
|
||||
string layer;
|
||||
string reactor;
|
||||
string employee;
|
||||
const string defaultPSN = "0000";
|
||||
const string defaultReactor = "00";
|
||||
const string defaultRDS = "000000";
|
||||
if (text.Length is 2 or 3)
|
||||
{
|
||||
wafer = text;
|
||||
employee = text;
|
||||
rds = defaultRDS;
|
||||
psn = defaultPSN;
|
||||
zone = string.Empty;
|
||||
layer = string.Empty;
|
||||
reactor = defaultReactor;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Remove illegal characters \/:*?"<>| found in the Batch
|
||||
wafer = Regex.Replace(text, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
|
||||
if (wafer.StartsWith("1T") || wafer.StartsWith("1t"))
|
||||
wafer = wafer.Substring(2);
|
||||
string[] segments = wafer.Split('-');
|
||||
if (segments.Length == 0)
|
||||
if (string.IsNullOrEmpty(text) || segments.Length == 0 || string.IsNullOrEmpty(formattedText))
|
||||
reactor = defaultReactor;
|
||||
else
|
||||
reactor = segments[0];
|
||||
if (segments.Length <= 1)
|
||||
if (segments.Length <= 1 || !int.TryParse(segments[1], out int rdsValue) || rdsValue < 99)
|
||||
rds = defaultRDS;
|
||||
else
|
||||
rds = segments[1];
|
||||
@ -296,35 +270,103 @@ public partial class ProcessData : IProcessData
|
||||
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;
|
||||
else
|
||||
psn = segments[2];
|
||||
if (segments.Length < 3)
|
||||
layer = string.Empty;
|
||||
layer = defaultLayer;
|
||||
}
|
||||
else
|
||||
{
|
||||
string[] segmentsB = segments[2].Split('.');
|
||||
if (segmentsB.Length > 1)
|
||||
psn = segmentsB[0];
|
||||
if (segmentsB.Length <= 1)
|
||||
layer = string.Empty;
|
||||
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)
|
||||
zone = string.Empty;
|
||||
result = string.Empty;
|
||||
else
|
||||
zone = segments[3];
|
||||
{
|
||||
result = segments[3];
|
||||
if (result.Length > 1 && result[0] == '0')
|
||||
result = result.Substring(1);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Descriptor GetDescriptor(string text)
|
||||
{
|
||||
Descriptor result;
|
||||
string psn;
|
||||
string rds;
|
||||
string zone;
|
||||
string layer;
|
||||
string wafer;
|
||||
string reactor;
|
||||
string employee;
|
||||
string defaultPSN = string.Empty;
|
||||
string defaultRDS = string.Empty;
|
||||
string defaultZone = string.Empty;
|
||||
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;
|
||||
employee = text;
|
||||
psn = defaultPSN;
|
||||
rds = defaultRDS;
|
||||
zone = defaultZone;
|
||||
layer = defaultLayer;
|
||||
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
|
||||
{
|
||||
// Remove illegal characters \/:*?"<>| found in the Batch
|
||||
wafer = Regex.Replace(text, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
|
||||
if (wafer.Length > 2 && wafer[0] == '1' && (wafer[1] == 'T' || wafer[1] == 't'))
|
||||
wafer = wafer.Substring(2);
|
||||
string[] segments = wafer.Split('-');
|
||||
(reactor, rds) = GetReactorAndRDS(defaultReactor, defaultRDS, text, wafer, segments);
|
||||
(layer, psn) = GetLayerAndPSN(defaultLayer, defaultPSN, segments);
|
||||
zone = GetZone(segments);
|
||||
if (segments.Length <= 4)
|
||||
employee = string.Empty;
|
||||
employee = defaultEmployee;
|
||||
else
|
||||
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);
|
||||
return result;
|
||||
}
|
||||
|
@ -48,35 +48,80 @@ public class QS408M : LoggingUnitTesting, IDisposable
|
||||
FileHandlers.QS408M.Descriptor descriptor;
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
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");
|
||||
Assert.IsTrue(descriptor.Reactor is "12");
|
||||
Assert.IsTrue(descriptor.RDS is "123456");
|
||||
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");
|
||||
Assert.IsTrue(descriptor.Reactor is "00");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
|
||||
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");
|
||||
Assert.IsTrue(descriptor.Reactor is "00");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
|
||||
Assert.IsTrue(descriptor.RDS is "123456");
|
||||
Assert.IsTrue(descriptor.PSN is "0000");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
|
||||
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("MP");
|
||||
Assert.IsTrue(descriptor.Reactor is "00");
|
||||
Assert.IsTrue(descriptor.RDS is "000000");
|
||||
Assert.IsTrue(descriptor.PSN is "0000");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
|
||||
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");
|
||||
Assert.IsTrue(descriptor.Reactor is "12");
|
||||
Assert.IsTrue(descriptor.RDS is "123456");
|
||||
Assert.IsTrue(descriptor.PSN is "1234");
|
||||
Assert.IsTrue(descriptor.Layer is "2");
|
||||
Assert.IsTrue(descriptor.Zone is "1");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||
descriptor = FileHandlers.QS408M.ProcessData.GetDescriptor("12-123456-1234.02-1");
|
||||
Assert.IsTrue(descriptor.Reactor is "12");
|
||||
Assert.IsTrue(descriptor.RDS is "123456");
|
||||
Assert.IsTrue(descriptor.PSN is "1234");
|
||||
Assert.IsTrue(descriptor.Layer is "2");
|
||||
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"));
|
||||
}
|
||||
|
||||
|
@ -160,7 +160,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Infineon.EAF.Runtime">
|
||||
<Version>2.43.0</Version>
|
||||
<Version>2.47.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="System.Text.Json">
|
||||
<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
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.43.0.0")]
|
||||
[assembly: AssemblyFileVersion("2.43.0.0")]
|
||||
[assembly: AssemblyVersion("2.47.0.0")]
|
||||
[assembly: AssemblyFileVersion("2.47.0.0")]
|
||||
|
Loading…
x
Reference in New Issue
Block a user