Fix slotThreadLocker & Test Parameter Changed

This commit is contained in:
YuYang Shen
2025-04-08 11:05:10 +08:00
parent d8eb8de8f9
commit bee8715471
11 changed files with 130 additions and 116 deletions
Binary file not shown.
@@ -22,9 +22,9 @@
"Title": "UserProgram.cs",
"DocumentMoniker": "D:\\WORK\\ManLin\\Verify\\UserProgram_time\\Testrong.User.Program\\UserProgram.cs",
"RelativeDocumentMoniker": "Testrong.User.Program\\UserProgram.cs",
"ToolTip": "D:\\WORK\\ManLin\\Verify\\UserProgram_time\\Testrong.User.Program\\UserProgram.cs",
"RelativeToolTip": "Testrong.User.Program\\UserProgram.cs",
"ViewState": "AgIAAH0LAAAAAAAAAAAAwJ8LAAAtAAAAAAAAAA==",
"ToolTip": "D:\\WORK\\ManLin\\Verify\\UserProgram_time\\Testrong.User.Program\\UserProgram.cs*",
"RelativeToolTip": "Testrong.User.Program\\UserProgram.cs*",
"ViewState": "AgIAAEkEAAAAAAAAAAAIwFUEAAA2AAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-06-18T12:27:43.78Z",
"EditorCaption": ""
@@ -1,9 +1,9 @@
{
"Version": 1,
"WorkspaceRootPath": "C:\\Users\\testrong\\Desktop\\UserProgram_ReWorked_v0.6\\UserProgram_time\\",
"WorkspaceRootPath": "D:\\WORK\\ManLin\\Verify\\UserProgram_time\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{E96B1A19-D109-4F67-B1AA-5BF15E580D77}|Testrong.User.Program\\Testrong.User.Program.csproj|c:\\users\\testrong\\desktop\\userprogram_reworked_v0.6\\userprogram_time\\testrong.user.program\\userprogram.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"AbsoluteMoniker": "D:0:0:{E96B1A19-D109-4F67-B1AA-5BF15E580D77}|Testrong.User.Program\\Testrong.User.Program.csproj|d:\\work\\manlin\\verify\\userprogram_time\\testrong.user.program\\userprogram.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{E96B1A19-D109-4F67-B1AA-5BF15E580D77}|Testrong.User.Program\\Testrong.User.Program.csproj|solutionrelative:testrong.user.program\\userprogram.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
}
],
@@ -14,21 +14,17 @@
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 1,
"SelectedChildIndex": 0,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
},
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "UserProgram.cs",
"DocumentMoniker": "C:\\Users\\testrong\\Desktop\\UserProgram_ReWorked_v0.6\\UserProgram_time\\Testrong.User.Program\\UserProgram.cs",
"DocumentMoniker": "D:\\WORK\\ManLin\\Verify\\UserProgram_time\\Testrong.User.Program\\UserProgram.cs",
"RelativeDocumentMoniker": "Testrong.User.Program\\UserProgram.cs",
"ToolTip": "C:\\Users\\testrong\\Desktop\\UserProgram_ReWorked_v0.6\\UserProgram_time\\Testrong.User.Program\\UserProgram.cs",
"ToolTip": "D:\\WORK\\ManLin\\Verify\\UserProgram_time\\Testrong.User.Program\\UserProgram.cs",
"RelativeToolTip": "Testrong.User.Program\\UserProgram.cs",
"ViewState": "AQIAAF0AAAAAeGZmZmYmwJAAAABBAAAA",
"ViewState": "AgIAACsNAAAAAAAAAAAAAG8MAABRAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-06-18T12:27:43.78Z",
"EditorCaption": ""
+79 -98
View File
@@ -93,7 +93,7 @@ namespace Testrong.User.Program
#region FVMV
readonly Dictionary<string, TestParaSet> avgDelays_fvmv_pmu = new Dictionary<string, TestParaSet>()
Dictionary<string, TestParaSet> avgDelays_fvmv_pmu = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 40, avgTimes = 64, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 20, avgTimes = 64, samDelay = 100 } },
@@ -102,7 +102,7 @@ namespace Testrong.User.Program
{"60mA", new TestParaSet{delayMs = 15, avgTimes = 64, samDelay = 100 } },
};
readonly Dictionary<string, TestParaSet> avgDelays_fvmv_dps = new Dictionary<string, TestParaSet>()
Dictionary<string, TestParaSet> avgDelays_fvmv_dps = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 40, avgTimes = 64, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 20, avgTimes = 64, samDelay = 100 } },
@@ -113,7 +113,7 @@ namespace Testrong.User.Program
};
#endregion
#region FZMV
readonly Dictionary<string, TestParaSet> avgDelays_fzmv_pmu = new Dictionary<string, TestParaSet>()
Dictionary<string, TestParaSet> avgDelays_fzmv_pmu = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 30, avgTimes = 64, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 10, avgTimes = 64, samDelay = 100 } },
@@ -123,7 +123,7 @@ namespace Testrong.User.Program
};
#endregion
#region FIMV PMU
readonly Dictionary<string, TestParaSet> avgDelays_1kft_fimv_pmu = new Dictionary<string, TestParaSet>()
Dictionary<string, TestParaSet> avgDelays_1kft_fimv_pmu = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 60, avgTimes = 128, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 20, avgTimes = 64, samDelay = 100 } },
@@ -131,7 +131,7 @@ namespace Testrong.User.Program
{"2mA", new TestParaSet{delayMs = 15, avgTimes = 64, samDelay = 100 } },
{"60mA", new TestParaSet{delayMs = 30, avgTimes = 255, samDelay = 100 } },
};
readonly Dictionary<string, TestParaSet> avgDelays_1kcp_fimv_pmu = new Dictionary<string, TestParaSet>()
Dictionary<string, TestParaSet> avgDelays_1kcp_fimv_pmu = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 60, avgTimes = 128, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 20, avgTimes = 64, samDelay = 100 } },
@@ -139,15 +139,15 @@ namespace Testrong.User.Program
{"2mA", new TestParaSet{delayMs = 15, avgTimes = 64, samDelay = 100 } },
{"60mA", new TestParaSet{delayMs = 30, avgTimes = 255, samDelay = 100 } },
};
readonly Dictionary<string, TestParaSet> avgDelays_2kft_fimv_pmu = new Dictionary<string, TestParaSet>()
Dictionary<string, TestParaSet> avgDelays_2kft_fimv_pmu = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 60, avgTimes = 255, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 20, avgTimes = 255, samDelay = 100 } },
{"5uA", new TestParaSet{delayMs = 60, avgTimes = 128, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 20, avgTimes = 64, samDelay = 100 } },
{"200uA", new TestParaSet{delayMs = 15, avgTimes = 64, samDelay = 100 } },
{"2mA", new TestParaSet{delayMs = 15, avgTimes = 64, samDelay = 100 } },
{"60mA", new TestParaSet{delayMs = 30, avgTimes = 128, samDelay = 100 } },
};
readonly Dictionary<string, TestParaSet> avgDelays_ppmucp_fimv_pmu = new Dictionary<string, TestParaSet>()
Dictionary<string, TestParaSet> avgDelays_ppmucp_fimv_pmu = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 60, avgTimes = 255, samDelay = 300 } },
{"20uA", new TestParaSet{delayMs = 20, avgTimes = 128, samDelay = 300 } },
@@ -155,7 +155,7 @@ namespace Testrong.User.Program
{"2mA", new TestParaSet{delayMs = 15, avgTimes = 64, samDelay = 100 } },
{"60mA", new TestParaSet{delayMs = 30, avgTimes = 255, samDelay = 100 } },
};
readonly Dictionary<string, TestParaSet> avgDelays_ppmuft_fimv_pmu = new Dictionary<string, TestParaSet>()
Dictionary<string, TestParaSet> avgDelays_ppmuft_fimv_pmu = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 60, avgTimes = 255, samDelay = 300 } },
{"20uA", new TestParaSet{delayMs = 20, avgTimes = 128, samDelay = 300 } },
@@ -163,7 +163,7 @@ namespace Testrong.User.Program
{"2mA", new TestParaSet{delayMs = 15, avgTimes = 64, samDelay = 100 } },
{"60mA", new TestParaSet{delayMs = 30, avgTimes = 255, samDelay = 100 } },
};
readonly Dictionary<string, TestParaSet> avgDelays_2km_fimv_pmu = new Dictionary<string, TestParaSet>()
Dictionary<string, TestParaSet> avgDelays_2km_fimv_pmu = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 60, avgTimes = 255, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 20, avgTimes = 128, samDelay = 100 } },
@@ -173,7 +173,7 @@ namespace Testrong.User.Program
};
#endregion
#region FIMV DPS
readonly Dictionary<string, TestParaSet> avgDelays_1kft_fimv_dps = new Dictionary<string, TestParaSet>()
Dictionary<string, TestParaSet> avgDelays_1kft_fimv_dps = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 250, avgTimes = 64, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 70, avgTimes = 64, samDelay = 100 } },
@@ -181,7 +181,7 @@ namespace Testrong.User.Program
{"2mA", new TestParaSet{delayMs = 20, avgTimes = 64, samDelay = 100 } },
{"60mA", new TestParaSet{delayMs = 20, avgTimes = 64, samDelay = 100 } },
};
readonly Dictionary<string, TestParaSet> avgDelays_1kcp_fimv_dps = new Dictionary<string, TestParaSet>()
Dictionary<string, TestParaSet> avgDelays_1kcp_fimv_dps = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 250, avgTimes = 64, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 70, avgTimes = 64, samDelay = 100 } },
@@ -189,7 +189,7 @@ namespace Testrong.User.Program
{"2mA", new TestParaSet{delayMs = 20, avgTimes = 64, samDelay = 100 } },
{"60mA", new TestParaSet{delayMs = 20, avgTimes = 64, samDelay = 100 } },
};
readonly Dictionary<string, TestParaSet> avgDelays_2kft_fimv_dps = new Dictionary<string, TestParaSet>()
Dictionary<string, TestParaSet> avgDelays_2kft_fimv_dps = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 250, avgTimes = 64, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 70, avgTimes = 32, samDelay = 100 } },
@@ -197,7 +197,7 @@ namespace Testrong.User.Program
{"2mA", new TestParaSet{delayMs = 15, avgTimes = 32, samDelay = 100 } },
{"60mA", new TestParaSet{delayMs = 15, avgTimes = 32, samDelay = 100 } },
};
readonly Dictionary<string, TestParaSet> avgDelays_ppmucp_fimv_dps = new Dictionary<string, TestParaSet>()
Dictionary<string, TestParaSet> avgDelays_ppmucp_fimv_dps = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 250, avgTimes = 64, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 70, avgTimes = 64, samDelay = 100 } },
@@ -205,7 +205,7 @@ namespace Testrong.User.Program
{"2mA", new TestParaSet{delayMs = 20, avgTimes = 64, samDelay = 100 } },
{"60mA", new TestParaSet{delayMs = 20, avgTimes = 64, samDelay = 100 } },
};
readonly Dictionary<string, TestParaSet> avgDelays_ppmuft_fimv_dps = new Dictionary<string, TestParaSet>()
Dictionary<string, TestParaSet> avgDelays_ppmuft_fimv_dps = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 250, avgTimes = 64, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 70, avgTimes = 64, samDelay = 100 } },
@@ -213,7 +213,7 @@ namespace Testrong.User.Program
{"2mA", new TestParaSet{delayMs = 20, avgTimes = 64, samDelay = 100 } },
{"60mA", new TestParaSet{delayMs = 20, avgTimes = 64, samDelay = 100 } },
};
readonly Dictionary<string, TestParaSet> avgDelays_2km_fimv_dps = new Dictionary<string, TestParaSet>()
Dictionary<string, TestParaSet> avgDelays_2km_fimv_dps = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 250, avgTimes = 64, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 70, avgTimes = 64, samDelay = 100 } },
@@ -223,7 +223,7 @@ namespace Testrong.User.Program
};
#endregion
#region FVMI PMU
readonly Dictionary<string, TestParaSet> avgDelays_1kft_fvmi_pmu = new Dictionary<string, TestParaSet>()
Dictionary<string, TestParaSet> avgDelays_1kft_fvmi_pmu = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 50, avgTimes = 255, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 20, avgTimes = 128, samDelay = 100 } },
@@ -231,7 +231,7 @@ namespace Testrong.User.Program
{"2mA", new TestParaSet{delayMs = 10, avgTimes = 64, samDelay = 100 } },
{"60mA", new TestParaSet{delayMs = 10, avgTimes = 255, samDelay = 100 } },
};
readonly Dictionary<string, TestParaSet> avgDelays_1kcp_fvmi_pmu = new Dictionary<string, TestParaSet>()
Dictionary<string, TestParaSet> avgDelays_1kcp_fvmi_pmu = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 50, avgTimes = 255, samDelay = 200 } },
{"20uA", new TestParaSet{delayMs = 20, avgTimes = 128, samDelay = 100 } },
@@ -239,7 +239,7 @@ namespace Testrong.User.Program
{"2mA", new TestParaSet{delayMs = 10, avgTimes = 64, samDelay = 100 } },
{"60mA", new TestParaSet{delayMs = 10, avgTimes = 128, samDelay = 100 } },
};
readonly Dictionary<string, TestParaSet> avgDelays_2kft_fvmi_pmu = new Dictionary<string, TestParaSet>()
Dictionary<string, TestParaSet> avgDelays_2kft_fvmi_pmu = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 50, avgTimes = 255, samDelay = 500 } },
{"20uA", new TestParaSet{delayMs = 20, avgTimes = 128, samDelay = 300 } },
@@ -247,7 +247,7 @@ namespace Testrong.User.Program
{"2mA", new TestParaSet{delayMs = 10, avgTimes = 64, samDelay = 100 } },
{"60mA", new TestParaSet{delayMs = 10, avgTimes = 255, samDelay = 100 } },
};
readonly Dictionary<string, TestParaSet> avgDelays_ppmucp_fvmi_pmu = new Dictionary<string, TestParaSet>()
Dictionary<string, TestParaSet> avgDelays_ppmucp_fvmi_pmu = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 50, avgTimes = 255, samDelay = 500 } },
{"20uA", new TestParaSet{delayMs = 20, avgTimes = 255, samDelay = 300 } },
@@ -255,7 +255,7 @@ namespace Testrong.User.Program
{"2mA", new TestParaSet{delayMs = 30, avgTimes = 128, samDelay = 200 } },
{"60mA", new TestParaSet{delayMs = 10, avgTimes = 255, samDelay = 100 } },
};
readonly Dictionary<string, TestParaSet> avgDelays_ppmuft_fvmi_pmu = new Dictionary<string, TestParaSet>()
Dictionary<string, TestParaSet> avgDelays_ppmuft_fvmi_pmu = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 50, avgTimes = 255, samDelay = 300 } },
{"20uA", new TestParaSet{delayMs = 20, avgTimes = 255, samDelay = 300 } },
@@ -263,7 +263,7 @@ namespace Testrong.User.Program
{"2mA", new TestParaSet{delayMs = 10, avgTimes = 128, samDelay = 100 } },
{"60mA", new TestParaSet{delayMs = 10, avgTimes = 255, samDelay = 100 } },
};
readonly Dictionary<string, TestParaSet> avgDelays_2km_fvmi_pmu = new Dictionary<string, TestParaSet>()
Dictionary<string, TestParaSet> avgDelays_2km_fvmi_pmu = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 50, avgTimes = 255, samDelay = 500 } },
{"20uA", new TestParaSet{delayMs = 20, avgTimes = 255, samDelay = 500 } },
@@ -273,7 +273,7 @@ namespace Testrong.User.Program
};
#endregion
#region FVMI DPS
readonly Dictionary<string, TestParaSet> avgDelays_1kft_fvmi_dps = new Dictionary<string, TestParaSet>()
Dictionary<string, TestParaSet> avgDelays_1kft_fvmi_dps = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 70, avgTimes = 255, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 30, avgTimes = 255, samDelay = 100 } },
@@ -282,7 +282,7 @@ namespace Testrong.User.Program
{"60mA", new TestParaSet{delayMs = 30, avgTimes = 255, samDelay = 100 } },
{"1A", new TestParaSet{delayMs = 50, avgTimes = 255, samDelay = 100 } },
};
readonly Dictionary<string, TestParaSet> avgDelays_1kcp_fvmi_dps = new Dictionary<string, TestParaSet>()
Dictionary<string, TestParaSet> avgDelays_1kcp_fvmi_dps = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 70, avgTimes = 255, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 70, avgTimes = 255, samDelay = 100 } },
@@ -291,7 +291,7 @@ namespace Testrong.User.Program
{"60mA", new TestParaSet{delayMs = 30, avgTimes = 64, samDelay = 100 } },
{"1A", new TestParaSet{delayMs = 30, avgTimes = 64, samDelay = 100 } },
};
readonly Dictionary<string, TestParaSet> avgDelays_2kft_fvmi_dps = new Dictionary<string, TestParaSet>()
Dictionary<string, TestParaSet> avgDelays_2kft_fvmi_dps = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 70, avgTimes = 255, samDelay = 200 } },
{"20uA", new TestParaSet{delayMs = 30, avgTimes = 255, samDelay = 100 } },
@@ -300,7 +300,7 @@ namespace Testrong.User.Program
{"60mA", new TestParaSet{delayMs = 20, avgTimes = 128, samDelay = 100 } },
{"1A", new TestParaSet{delayMs = 20, avgTimes = 128, samDelay = 100 } },
};
readonly Dictionary<string, TestParaSet> avgDelays_ppmucp_fvmi_dps = new Dictionary<string, TestParaSet>()
Dictionary<string, TestParaSet> avgDelays_ppmucp_fvmi_dps = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 70, avgTimes = 255, samDelay = 100 } },
{"20uA", new TestParaSet{delayMs = 50, avgTimes = 255, samDelay = 300 } },
@@ -309,7 +309,7 @@ namespace Testrong.User.Program
{"60mA", new TestParaSet{delayMs = 30, avgTimes = 255, samDelay = 200 } },
{"1A", new TestParaSet{delayMs = 30, avgTimes = 255, samDelay = 200 } },
};
readonly Dictionary<string, TestParaSet> avgDelays_ppmuft_fvmi_dps = new Dictionary<string, TestParaSet>()
Dictionary<string, TestParaSet> avgDelays_ppmuft_fvmi_dps = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 70, avgTimes = 255, samDelay = 500 } },
{"20uA", new TestParaSet{delayMs = 50, avgTimes = 255, samDelay = 500 } },
@@ -318,7 +318,7 @@ namespace Testrong.User.Program
{"60mA", new TestParaSet{delayMs = 30, avgTimes = 255, samDelay = 100 } },
{"1A", new TestParaSet{delayMs = 30, avgTimes = 255, samDelay = 100 } },
};
readonly Dictionary<string, TestParaSet> avgDelays_2km_fvmi_dps = new Dictionary<string, TestParaSet>()
Dictionary<string, TestParaSet> avgDelays_2km_fvmi_dps = new Dictionary<string, TestParaSet>()
{
{"5uA", new TestParaSet{delayMs = 70, avgTimes = 255, samDelay = 500 } },
{"20uA", new TestParaSet{delayMs = 50, avgTimes = 255, samDelay = 100 } },
@@ -536,8 +536,6 @@ namespace Testrong.User.Program
//So We Should Check Which Slot We Are Running...
if (SlotNum == slotList[0])
{
swdata.WriteLine("Tester_Name,Board_Id,Slot_Ip,Stil_Version");
for (int w = 0; w < 12; w++)//修改为12SLOT
{
@@ -558,16 +556,7 @@ namespace Testrong.User.Program
}
else
{
int Cried = slotList.FindIndex(x => x.Equals(SlotNum));
while (true)
{
Thread.Sleep(1000);
if (File.Exists(EXT_CAL_PATH + slotList[Cried - 1] + ".flag")) //Wait until previous thread flags completion
{
File.Delete(EXT_CAL_PATH + slotList[Cried - 1] + ".flag");
break;
}
}
int slotIndex = slotList.FindIndex(x => x.Equals(SlotNum));
File.Move(METADATA_PATH, EXT_CAL_PATH + "metadata_temp" + ".csv");
StreamReader sr = new StreamReader(EXT_CAL_PATH + "metadata_temp" + ".csv", Encoding.UTF8);
@@ -575,7 +564,7 @@ namespace Testrong.User.Program
while (!sr.EndOfStream)
{
string tmp = sr.ReadLine();
if (line == slotList[Cried])
if (line == slotList[slotIndex])
{
swdata.WriteLine("Slot" + SlotNum + "," + arm_dna + "," + context.Communicator.ServerIP + "," + "V1.0.0");
}
@@ -691,7 +680,8 @@ namespace Testrong.User.Program
/// <param name="SlotNum">Current Slot Number, </param>
/// <param name="slotList">Slot List, </param>
/// <param name="pathFlag">Path Selector, Possible Value="Freq","CAL_Init","CAL","RINT","CAL_COM",</param>
public void SlotThreadLocker(int SlotNum, List<int> slotList, string pathFlag)
/// <param name="lockFlag"></param>
public void SlotThreadLocker(int SlotNum, List<int> slotList, string pathFlag,bool lockFlag = false)
{
string WritePath;
switch (pathFlag)
@@ -712,7 +702,19 @@ namespace Testrong.User.Program
WritePath = EXT_CAL_PATH;
break;
}
if (SlotNum < slotList[slotList.Count - 1])
if (SlotNum != slotList[0]) //If we are NOT the FIRST slot in the list
{
int slotIndex = slotList.FindIndex(x => x.Equals(SlotNum));
while (lockFlag) //Do we need lock or just set the Flag as we are done
{
Thread.Sleep(1000);
if (File.Exists(WritePath + slotList[slotIndex - 1] + ".flag")) //Wait until previous thread flags completion
{
File.Delete(WritePath + slotList[slotIndex - 1] + ".flag");
break;
}
}
if(SlotNum != slotList[slotList.Count - 1]) //If we are NOT the LAST slot in the list
{
StreamWriter swSignal = new StreamWriter(WritePath + SlotNum + ".flag"); //Create file flagging end of current thread
swSignal.WriteLine();
@@ -720,6 +722,7 @@ namespace Testrong.User.Program
swSignal.Close();
}
}
}
private int GetPMUTempSensorIndex(int channel)
{
if ((channel >= 65 && channel <= 80) || (channel >= 97 && channel <= 112) || (channel >= 193 && channel <= 208) || (channel >= 241 && channel <= 256))
@@ -1102,7 +1105,7 @@ namespace Testrong.User.Program
{
sw.Write($"{ForceValue[writeLine]:F10},");
sw.Write($"{AteMeasure[writeLine]:F15},");
sw.Write($"{DmmMeasure[writeLine]:F15},");
sw.Write($"{DmmMeasure[writeLine]:F15},"); //DMM at Current Mode
}
else
{
@@ -1264,13 +1267,13 @@ namespace Testrong.User.Program
}
else
{
int Cried = slotList.FindIndex(x => x.Equals(SlotNum));
int slotIndex = slotList.FindIndex(x => x.Equals(SlotNum));
while (true)
{
Thread.Sleep(1000);
if (File.Exists(EXT_CAL_FREQ_PATH + slotList[Cried - 1] + ".flag")) //Wait until previous thread flags completion
if (File.Exists(EXT_CAL_FREQ_PATH + slotList[slotIndex - 1] + ".flag")) //Wait until previous thread flags completion
{
File.Delete(EXT_CAL_FREQ_PATH + slotList[Cried - 1] + ".flag");
File.Delete(EXT_CAL_FREQ_PATH + slotList[slotIndex - 1] + ".flag");
break;
}
}
@@ -1394,6 +1397,7 @@ namespace Testrong.User.Program
armDnaRaw = armDnaRaw.Reverse().ToArray();
string arm_dna = BitConverter.ToUInt64(armDnaRaw, 0).ToString(); //convert hex dna to decimal
int SlotNum = context.Communicator.SlotNo;
SlotThreadLocker(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL_Init",lockFlag: true);
if (SlotNum == slotList[0])
{
if (Directory.Exists(RINT_PATH))
@@ -1412,13 +1416,13 @@ namespace Testrong.User.Program
}
else
{
int Cried = slotList.FindIndex(x => x.Equals(SlotNum));
int slotIndex = slotList.FindIndex(x => x.Equals(SlotNum));
while (true)
{
Thread.Sleep(1000);
if (File.Exists(EXT_CAL_INIT_PATH + slotList[Cried - 1] + ".flag"))
if (File.Exists(EXT_CAL_INIT_PATH + slotList[slotIndex - 1] + ".flag"))
{
File.Delete(EXT_CAL_INIT_PATH + slotList[Cried - 1] + ".flag");
File.Delete(EXT_CAL_INIT_PATH + slotList[slotIndex - 1] + ".flag");
break;
}
}
@@ -1503,6 +1507,8 @@ namespace Testrong.User.Program
//Folder Related
File_Mover(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL_Single");
SlotThreadLocker(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL", lockFlag: true);
//-----Start Slot Number-----
StreamWriter swdata;
swdata = new StreamWriter(METADATA_PATH, true, Encoding.UTF8)
@@ -1621,7 +1627,7 @@ namespace Testrong.User.Program
#endregion
}
#endregion
SlotThreadLocker(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL");
SlotThreadLocker(SlotNum: SlotNum,slotList: slotList, pathFlag: "CAL");
swdata.Flush();
swdata.Close();
@@ -1665,6 +1671,10 @@ namespace Testrong.User.Program
//-----Move File To History-----
File_Mover(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL_Single");
//---------Thread Locker--------
int slotIndex = slotList.FindIndex(x => x.Equals(SlotNum));
SlotThreadLocker(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL", lockFlag: true);
//-----Start Write MetaData-----
StreamWriter swdata;
swdata = new StreamWriter(METADATA_PATH, true, Encoding.UTF8)
@@ -1871,7 +1881,7 @@ namespace Testrong.User.Program
#endregion
#region Thread Lock
SlotThreadLocker(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL");
SlotThreadLocker(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL", lockFlag: false);
#endregion
}
@@ -1903,16 +1913,7 @@ namespace Testrong.User.Program
}
else
{
int Cried = slotList.FindIndex(x => x.Equals(SlotNum));
while (true)
{
Thread.Sleep(1000);
if (File.Exists(RINT_COMPFILE_PATH + slotList[Cried - 1] + ".flag"))
{
File.Delete(RINT_COMPFILE_PATH + slotList[Cried - 1] + ".flag");
break;
}
}
SlotThreadLocker(SlotNum: SlotNum, slotList: slotList, pathFlag: "RINT", lockFlag: true);
}
Thread.Sleep(10);
@@ -1954,13 +1955,13 @@ namespace Testrong.User.Program
}
else
{
int Cried = slotList.FindIndex(x => x.Equals(SlotNum));
int slotIndex = slotList.FindIndex(x => x.Equals(SlotNum));
while (true)
{
Thread.Sleep(1000);
if (File.Exists(RINT_FILE_PATH + slotList[Cried - 1] + ".flag"))
if (File.Exists(RINT_FILE_PATH + slotList[slotIndex - 1] + ".flag"))
{
File.Delete(RINT_FILE_PATH + slotList[Cried - 1] + ".flag");
File.Delete(RINT_FILE_PATH + slotList[slotIndex - 1] + ".flag");
break;
}
}
@@ -2004,16 +2005,7 @@ namespace Testrong.User.Program
}
else
{
int Cried = slotList.FindIndex(x => x.Equals(SlotNum));
while (true)
{
Thread.Sleep(1000);
if (File.Exists(EXT_CAL_INIT_PATH + slotList[Cried - 1] + ".flag"))
{
File.Delete(EXT_CAL_INIT_PATH + slotList[Cried - 1] + ".flag");
break;
}
}
SlotThreadLocker(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL_Init",lockFlag:true);
}
ExternalCalibrationHandle extCaliHandle = new ExternalCalibrationHandle();
@@ -2080,17 +2072,9 @@ namespace Testrong.User.Program
}
else
{
int Cried = slotList.FindIndex(x => x.Equals(SlotNum));
while (true)
{
Thread.Sleep(1000);
if (File.Exists(EXT_CAL_INIT_PATH + slotList[Cried - 1] + ".flag"))
{
File.Delete(EXT_CAL_INIT_PATH + slotList[Cried - 1] + ".flag");
break;
}
}
SlotThreadLocker(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL_Init",lockFlag:true);
}
Thread.Sleep(50);
if (SlotNum == slotList[0])
{
@@ -2391,6 +2375,10 @@ namespace Testrong.User.Program
//-----Move File To History-----
File_Mover(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL_Normal", isPreCheck: isPreCheck);
//---------Thread Locker--------
SlotThreadLocker(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL", lockFlag: true);
//-----Start Slot Number-----
// Write MetaData.csv Header
StreamWriter swdata;
@@ -2469,7 +2457,7 @@ namespace Testrong.User.Program
{
if (Range == "60mA")
{
dmm.Setup(NiVisaComms.Dmm3458AMeasureMode.CURR, DmmCurrRanges[Range], 1);
dmm.Setup(NiVisaComms.Dmm3458AMeasureMode.CURR, DmmCurrRanges[Range], 1); //Current Measuring
}
else
{
@@ -2480,7 +2468,7 @@ namespace Testrong.User.Program
{
if (Range == "60mA" || Range == "1A")
{
dmm.Setup(NiVisaComms.Dmm3458AMeasureMode.CURR, DmmCurrRanges[Range], 1);
dmm.Setup(NiVisaComms.Dmm3458AMeasureMode.CURR, DmmCurrRanges[Range], 1); //Current Measuring
}
else
{
@@ -3140,16 +3128,7 @@ namespace Testrong.User.Program
}
else
{
int Cried = slotList.FindIndex(x => x.Equals(SlotNum));
while (true)
{
Thread.Sleep(1000);
if (File.Exists(CAL_COMPFILE_PATH + slotList[Cried - 1] + ".flag")) //Wait until previous thread flags completion
{
File.Delete(CAL_COMPFILE_PATH + slotList[Cried - 1] + ".flag");
break;
}
}
SlotThreadLocker(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL_COM",lockFlag:true);
}
//Write files
@@ -3202,6 +3181,8 @@ namespace Testrong.User.Program
//Folder Related
File_Mover(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL_Single");
SlotThreadLocker(SlotNum: SlotNum, slotList: slotList, pathFlag: "CAL",lockFlag:true);
//-----Start Slot Number-----
StreamWriter swdata;
swdata = new StreamWriter(METADATA_PATH, true, Encoding.UTF8)
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
06051939fd013596d4aa1df48b5ecfb611befbcd05a9526e41561560c0184f17
8336289dafd7be8d8ceb71ec0bfb414b5e10ce0020e044e9f7d2ae18b0c1e638
@@ -2580,3 +2580,40 @@ C:\Users\testrong\Desktop\UserProgram_ReWorked_v0.6\UserProgram_time\Testrong.Us
C:\Users\testrong\Desktop\UserProgram_ReWorked_v0.6\UserProgram_time\Testrong.User.Program\obj\x64\Debug\Testrong.A8AD3C05.Up2Date
C:\Users\testrong\Desktop\UserProgram_ReWorked_v0.6\UserProgram_time\Testrong.User.Program\obj\x64\Debug\UserProgram.dll
C:\Users\testrong\Desktop\UserProgram_ReWorked_v0.6\UserProgram_time\Testrong.User.Program\obj\x64\Debug\UserProgram.pdb
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\NLog.dll
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\DotNetty.Transport.dll
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\DotNetty.Buffers.dll
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\DotNetty.Codecs.dll
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\System.Threading.Tasks.Dataflow.dll
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\DotNetty.Common.dll
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\Testrong.Core.Globalization.dll
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\AutoMapper.dll
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\Testrong.Core.Datalog.Interfaces.dll
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\Testrong.Core.Hardware.dll
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\MxFFTCalc.dll
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\MWArray.dll
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\MathNet.Numerics.dll
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\Testrong.Core.Gramar.dll
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\System.Threading.Tasks.Extensions.dll
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\System.Runtime.CompilerServices.Unsafe.dll
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\Microsoft.Extensions.Logging.Abstractions.dll
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\Microsoft.Extensions.Logging.dll
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\STDF.Library.dll
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\System.Memory.dll
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\System.ValueTuple.dll
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\Antlr4.Runtime.Standard.dll
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\Microsoft.Extensions.DependencyInjection.Abstractions.dll
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\Microsoft.Extensions.Options.dll
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\Microsoft.Extensions.DependencyInjection.dll
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\System.Numerics.Vectors.dll
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\Microsoft.Extensions.Primitives.dll
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\Microsoft.Bcl.AsyncInterfaces.dll
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\Testrong.Core.Model.xml
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\Testrong.Core.Primitives.xml
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\DotNetty.Transport.xml
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\DotNetty.Buffers.xml
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\DotNetty.Codecs.xml
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\System.Threading.Tasks.Dataflow.xml
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\DotNetty.Common.xml
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\AutoMapper.xml
D:\WORK\ManLin\Verify\UserProgram_time\Testrong.User.Program\bin\x64\Debug\STDF.Library.xml
Binary file not shown.
Binary file not shown.