Long time no commit

This commit is contained in:
Roland Drabesch 2022-04-06 10:42:16 +02:00
parent 0a72be12ab
commit ec37bb9b9e
225 changed files with 65674 additions and 18511 deletions

View File

@ -14,5 +14,5 @@ using System.Reflection;
//[assembly: AssemblyVersion("1.2.*.0")]
[assembly: AssemblyVersion("1.0.3.*")]
[assembly: AssemblyFileVersion("1.3.0.10")]
[assembly: AssemblyVersion("2.1.4.*")]
[assembly: AssemblyFileVersion("2.1.4.04")]

View File

@ -143,6 +143,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ui.ProductionControls", "Ui
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FwUpdateConfig", "..\ServiceFwUpdate\Common\FwUpdateConfig\FwUpdateConfig.csproj", "{CBF74D42-327E-4476-A096-63E7EBD9B7A3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RawDataViewer", "Ui\RawDataViewer\RawDataViewer.csproj", "{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TempFlansh", "TempFlansh\TempFlansh.csproj", "{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
Utils\DateTimeServerShared\DateTimeServerShared.projitems*{4806d89a-fbfb-41bc-aaa7-2242444bf55a}*SharedItemsImports = 4
@ -434,8 +438,8 @@ Global
{7543AFCB-F5AF-44AF-83C9-23164474C1E9}.XP32bit|Any CPU.Build.0 = PerformTest|Any CPU
{7543AFCB-F5AF-44AF-83C9-23164474C1E9}.XP32bit|Mixed Platforms.ActiveCfg = PerformTest|Any CPU
{7543AFCB-F5AF-44AF-83C9-23164474C1E9}.XP32bit|Mixed Platforms.Build.0 = PerformTest|Any CPU
{7543AFCB-F5AF-44AF-83C9-23164474C1E9}.XP32bit|x64.ActiveCfg = PerformTest|Any CPU
{7543AFCB-F5AF-44AF-83C9-23164474C1E9}.XP32bit|x64.Build.0 = PerformTest|Any CPU
{7543AFCB-F5AF-44AF-83C9-23164474C1E9}.XP32bit|x64.ActiveCfg = PerformTest|x64
{7543AFCB-F5AF-44AF-83C9-23164474C1E9}.XP32bit|x64.Build.0 = PerformTest|x64
{7543AFCB-F5AF-44AF-83C9-23164474C1E9}.XP32bit|x86.ActiveCfg = PerformTest|Any CPU
{7543AFCB-F5AF-44AF-83C9-23164474C1E9}.XP32bit|x86.Build.0 = PerformTest|Any CPU
{42E9198C-ED2C-4BC8-B0A1-55D91D8F1E90}._MANUAL_CONTROL|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
@ -498,8 +502,8 @@ Global
{42E9198C-ED2C-4BC8-B0A1-55D91D8F1E90}.XP32bit|Any CPU.Build.0 = PerformTest|Any CPU
{42E9198C-ED2C-4BC8-B0A1-55D91D8F1E90}.XP32bit|Mixed Platforms.ActiveCfg = PerformTest|Any CPU
{42E9198C-ED2C-4BC8-B0A1-55D91D8F1E90}.XP32bit|Mixed Platforms.Build.0 = PerformTest|Any CPU
{42E9198C-ED2C-4BC8-B0A1-55D91D8F1E90}.XP32bit|x64.ActiveCfg = PerformTest|Any CPU
{42E9198C-ED2C-4BC8-B0A1-55D91D8F1E90}.XP32bit|x64.Build.0 = PerformTest|Any CPU
{42E9198C-ED2C-4BC8-B0A1-55D91D8F1E90}.XP32bit|x64.ActiveCfg = PerformTest|x64
{42E9198C-ED2C-4BC8-B0A1-55D91D8F1E90}.XP32bit|x64.Build.0 = PerformTest|x64
{42E9198C-ED2C-4BC8-B0A1-55D91D8F1E90}.XP32bit|x86.ActiveCfg = PerformTest|Any CPU
{42E9198C-ED2C-4BC8-B0A1-55D91D8F1E90}.XP32bit|x86.Build.0 = PerformTest|Any CPU
{494AB06C-10C4-43F8-BC8A-92088EB35867}._MANUAL_CONTROL|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
@ -562,8 +566,8 @@ Global
{494AB06C-10C4-43F8-BC8A-92088EB35867}.XP32bit|Any CPU.Build.0 = PerformTest|Any CPU
{494AB06C-10C4-43F8-BC8A-92088EB35867}.XP32bit|Mixed Platforms.ActiveCfg = PerformTest|Any CPU
{494AB06C-10C4-43F8-BC8A-92088EB35867}.XP32bit|Mixed Platforms.Build.0 = PerformTest|Any CPU
{494AB06C-10C4-43F8-BC8A-92088EB35867}.XP32bit|x64.ActiveCfg = PerformTest|Any CPU
{494AB06C-10C4-43F8-BC8A-92088EB35867}.XP32bit|x64.Build.0 = PerformTest|Any CPU
{494AB06C-10C4-43F8-BC8A-92088EB35867}.XP32bit|x64.ActiveCfg = PerformTest|x64
{494AB06C-10C4-43F8-BC8A-92088EB35867}.XP32bit|x64.Build.0 = PerformTest|x64
{494AB06C-10C4-43F8-BC8A-92088EB35867}.XP32bit|x86.ActiveCfg = PerformTest|Any CPU
{494AB06C-10C4-43F8-BC8A-92088EB35867}.XP32bit|x86.Build.0 = PerformTest|Any CPU
{AE928623-E961-44E2-ACD2-A3902167FDA4}._MANUAL_CONTROL|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
@ -626,8 +630,8 @@ Global
{AE928623-E961-44E2-ACD2-A3902167FDA4}.XP32bit|Any CPU.Build.0 = PerformTest|Any CPU
{AE928623-E961-44E2-ACD2-A3902167FDA4}.XP32bit|Mixed Platforms.ActiveCfg = PerformTest|Any CPU
{AE928623-E961-44E2-ACD2-A3902167FDA4}.XP32bit|Mixed Platforms.Build.0 = PerformTest|Any CPU
{AE928623-E961-44E2-ACD2-A3902167FDA4}.XP32bit|x64.ActiveCfg = PerformTest|Any CPU
{AE928623-E961-44E2-ACD2-A3902167FDA4}.XP32bit|x64.Build.0 = PerformTest|Any CPU
{AE928623-E961-44E2-ACD2-A3902167FDA4}.XP32bit|x64.ActiveCfg = PerformTest|x64
{AE928623-E961-44E2-ACD2-A3902167FDA4}.XP32bit|x64.Build.0 = PerformTest|x64
{AE928623-E961-44E2-ACD2-A3902167FDA4}.XP32bit|x86.ActiveCfg = PerformTest|Any CPU
{AE928623-E961-44E2-ACD2-A3902167FDA4}.XP32bit|x86.Build.0 = PerformTest|Any CPU
{4B88B0D3-E791-4774-9521-EABEACDC420E}._MANUAL_CONTROL|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
@ -751,8 +755,8 @@ Global
{95A50087-99EE-4349-9A17-C547290DB42F}.XP32bit|Any CPU.Build.0 = PerformTest|Any CPU
{95A50087-99EE-4349-9A17-C547290DB42F}.XP32bit|Mixed Platforms.ActiveCfg = PerformTest|Any CPU
{95A50087-99EE-4349-9A17-C547290DB42F}.XP32bit|Mixed Platforms.Build.0 = PerformTest|Any CPU
{95A50087-99EE-4349-9A17-C547290DB42F}.XP32bit|x64.ActiveCfg = PerformTest|Any CPU
{95A50087-99EE-4349-9A17-C547290DB42F}.XP32bit|x64.Build.0 = PerformTest|Any CPU
{95A50087-99EE-4349-9A17-C547290DB42F}.XP32bit|x64.ActiveCfg = Debug|x64
{95A50087-99EE-4349-9A17-C547290DB42F}.XP32bit|x64.Build.0 = Debug|x64
{95A50087-99EE-4349-9A17-C547290DB42F}.XP32bit|x86.ActiveCfg = PerformTest|Any CPU
{95A50087-99EE-4349-9A17-C547290DB42F}.XP32bit|x86.Build.0 = PerformTest|Any CPU
{F581264D-3C20-4E4F-9E74-2606869AAAB7}._MANUAL_CONTROL|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
@ -815,8 +819,8 @@ Global
{F581264D-3C20-4E4F-9E74-2606869AAAB7}.XP32bit|Any CPU.Build.0 = Release|Any CPU
{F581264D-3C20-4E4F-9E74-2606869AAAB7}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU
{F581264D-3C20-4E4F-9E74-2606869AAAB7}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU
{F581264D-3C20-4E4F-9E74-2606869AAAB7}.XP32bit|x64.ActiveCfg = Release|Any CPU
{F581264D-3C20-4E4F-9E74-2606869AAAB7}.XP32bit|x64.Build.0 = Release|Any CPU
{F581264D-3C20-4E4F-9E74-2606869AAAB7}.XP32bit|x64.ActiveCfg = Release|x64
{F581264D-3C20-4E4F-9E74-2606869AAAB7}.XP32bit|x64.Build.0 = Release|x64
{F581264D-3C20-4E4F-9E74-2606869AAAB7}.XP32bit|x86.ActiveCfg = Release|Any CPU
{F581264D-3C20-4E4F-9E74-2606869AAAB7}.XP32bit|x86.Build.0 = Release|Any CPU
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}._MANUAL_CONTROL|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
@ -879,8 +883,8 @@ Global
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.XP32bit|Any CPU.Build.0 = Release|Any CPU
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.XP32bit|x64.ActiveCfg = Release|Any CPU
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.XP32bit|x64.Build.0 = Release|Any CPU
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.XP32bit|x64.ActiveCfg = Release|x64
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.XP32bit|x64.Build.0 = Release|x64
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.XP32bit|x86.ActiveCfg = Release|Any CPU
{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}.XP32bit|x86.Build.0 = Release|Any CPU
{F7E3DF42-4D35-4A0C-9182-90438F9956E1}._MANUAL_CONTROL|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
@ -943,8 +947,8 @@ Global
{F7E3DF42-4D35-4A0C-9182-90438F9956E1}.XP32bit|Any CPU.Build.0 = Release|Any CPU
{F7E3DF42-4D35-4A0C-9182-90438F9956E1}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU
{F7E3DF42-4D35-4A0C-9182-90438F9956E1}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU
{F7E3DF42-4D35-4A0C-9182-90438F9956E1}.XP32bit|x64.ActiveCfg = Release|Any CPU
{F7E3DF42-4D35-4A0C-9182-90438F9956E1}.XP32bit|x64.Build.0 = Release|Any CPU
{F7E3DF42-4D35-4A0C-9182-90438F9956E1}.XP32bit|x64.ActiveCfg = Release|x64
{F7E3DF42-4D35-4A0C-9182-90438F9956E1}.XP32bit|x64.Build.0 = Release|x64
{F7E3DF42-4D35-4A0C-9182-90438F9956E1}.XP32bit|x86.ActiveCfg = Release|Any CPU
{F7E3DF42-4D35-4A0C-9182-90438F9956E1}.XP32bit|x86.Build.0 = Release|Any CPU
{8203ABB8-38E5-472E-A742-33F38B7A74A6}._MANUAL_CONTROL|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
@ -1327,8 +1331,8 @@ Global
{2E139F63-B6FE-4EA9-A098-85364FE9B26C}.XP32bit|Any CPU.Build.0 = Release|Any CPU
{2E139F63-B6FE-4EA9-A098-85364FE9B26C}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU
{2E139F63-B6FE-4EA9-A098-85364FE9B26C}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU
{2E139F63-B6FE-4EA9-A098-85364FE9B26C}.XP32bit|x64.ActiveCfg = Release|Any CPU
{2E139F63-B6FE-4EA9-A098-85364FE9B26C}.XP32bit|x64.Build.0 = Release|Any CPU
{2E139F63-B6FE-4EA9-A098-85364FE9B26C}.XP32bit|x64.ActiveCfg = Release|x64
{2E139F63-B6FE-4EA9-A098-85364FE9B26C}.XP32bit|x64.Build.0 = Release|x64
{2E139F63-B6FE-4EA9-A098-85364FE9B26C}.XP32bit|x86.ActiveCfg = Release|Any CPU
{2E139F63-B6FE-4EA9-A098-85364FE9B26C}.XP32bit|x86.Build.0 = Release|Any CPU
{72037E89-4F63-4B3F-BEFF-4138E578CE99}._MANUAL_CONTROL|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
@ -1455,8 +1459,8 @@ Global
{63E0AC5E-B7C8-4363-A2FE-BE489E648FF0}.XP32bit|Any CPU.Build.0 = PerformTest|Any CPU
{63E0AC5E-B7C8-4363-A2FE-BE489E648FF0}.XP32bit|Mixed Platforms.ActiveCfg = PerformTest|Any CPU
{63E0AC5E-B7C8-4363-A2FE-BE489E648FF0}.XP32bit|Mixed Platforms.Build.0 = PerformTest|Any CPU
{63E0AC5E-B7C8-4363-A2FE-BE489E648FF0}.XP32bit|x64.ActiveCfg = PerformTest|Any CPU
{63E0AC5E-B7C8-4363-A2FE-BE489E648FF0}.XP32bit|x64.Build.0 = PerformTest|Any CPU
{63E0AC5E-B7C8-4363-A2FE-BE489E648FF0}.XP32bit|x64.ActiveCfg = PerformTest|x64
{63E0AC5E-B7C8-4363-A2FE-BE489E648FF0}.XP32bit|x64.Build.0 = PerformTest|x64
{63E0AC5E-B7C8-4363-A2FE-BE489E648FF0}.XP32bit|x86.ActiveCfg = PerformTest|Any CPU
{63E0AC5E-B7C8-4363-A2FE-BE489E648FF0}.XP32bit|x86.Build.0 = PerformTest|Any CPU
{F4AAF7E6-7333-4284-B735-E32DEB076C64}._MANUAL_CONTROL|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
@ -1519,8 +1523,8 @@ Global
{F4AAF7E6-7333-4284-B735-E32DEB076C64}.XP32bit|Any CPU.Build.0 = Release|Any CPU
{F4AAF7E6-7333-4284-B735-E32DEB076C64}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU
{F4AAF7E6-7333-4284-B735-E32DEB076C64}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU
{F4AAF7E6-7333-4284-B735-E32DEB076C64}.XP32bit|x64.ActiveCfg = Release|Any CPU
{F4AAF7E6-7333-4284-B735-E32DEB076C64}.XP32bit|x64.Build.0 = Release|Any CPU
{F4AAF7E6-7333-4284-B735-E32DEB076C64}.XP32bit|x64.ActiveCfg = Release|x64
{F4AAF7E6-7333-4284-B735-E32DEB076C64}.XP32bit|x64.Build.0 = Release|x64
{F4AAF7E6-7333-4284-B735-E32DEB076C64}.XP32bit|x86.ActiveCfg = Release|Any CPU
{F4AAF7E6-7333-4284-B735-E32DEB076C64}.XP32bit|x86.Build.0 = Release|Any CPU
{6CCDB656-C676-4360-BABA-C4596AAD175D}._MANUAL_CONTROL|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
@ -1581,8 +1585,8 @@ Global
{6CCDB656-C676-4360-BABA-C4596AAD175D}.XP32bit|Any CPU.Build.0 = XP32bit|Any CPU
{6CCDB656-C676-4360-BABA-C4596AAD175D}.XP32bit|Mixed Platforms.ActiveCfg = XP32bit|x86
{6CCDB656-C676-4360-BABA-C4596AAD175D}.XP32bit|Mixed Platforms.Build.0 = XP32bit|x86
{6CCDB656-C676-4360-BABA-C4596AAD175D}.XP32bit|x64.ActiveCfg = XP32bit|x64
{6CCDB656-C676-4360-BABA-C4596AAD175D}.XP32bit|x64.Build.0 = XP32bit|x64
{6CCDB656-C676-4360-BABA-C4596AAD175D}.XP32bit|x64.ActiveCfg = Debug|x64
{6CCDB656-C676-4360-BABA-C4596AAD175D}.XP32bit|x64.Build.0 = Debug|x64
{6CCDB656-C676-4360-BABA-C4596AAD175D}.XP32bit|x86.ActiveCfg = XP32bit|x86
{6CCDB656-C676-4360-BABA-C4596AAD175D}.XP32bit|x86.Build.0 = XP32bit|x86
{1B02C79E-0B19-43E2-8F6B-71EF0C786C97}._MANUAL_CONTROL|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
@ -1645,8 +1649,8 @@ Global
{1B02C79E-0B19-43E2-8F6B-71EF0C786C97}.XP32bit|Any CPU.Build.0 = Release|Any CPU
{1B02C79E-0B19-43E2-8F6B-71EF0C786C97}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU
{1B02C79E-0B19-43E2-8F6B-71EF0C786C97}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU
{1B02C79E-0B19-43E2-8F6B-71EF0C786C97}.XP32bit|x64.ActiveCfg = Release|Any CPU
{1B02C79E-0B19-43E2-8F6B-71EF0C786C97}.XP32bit|x64.Build.0 = Release|Any CPU
{1B02C79E-0B19-43E2-8F6B-71EF0C786C97}.XP32bit|x64.ActiveCfg = Release|x64
{1B02C79E-0B19-43E2-8F6B-71EF0C786C97}.XP32bit|x64.Build.0 = Release|x64
{1B02C79E-0B19-43E2-8F6B-71EF0C786C97}.XP32bit|x86.ActiveCfg = Release|Any CPU
{1B02C79E-0B19-43E2-8F6B-71EF0C786C97}.XP32bit|x86.Build.0 = Release|Any CPU
{60765BF4-6165-4F2F-8756-1C699826265D}._MANUAL_CONTROL|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
@ -1709,8 +1713,8 @@ Global
{60765BF4-6165-4F2F-8756-1C699826265D}.XP32bit|Any CPU.Build.0 = Release|Any CPU
{60765BF4-6165-4F2F-8756-1C699826265D}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU
{60765BF4-6165-4F2F-8756-1C699826265D}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU
{60765BF4-6165-4F2F-8756-1C699826265D}.XP32bit|x64.ActiveCfg = Release|Any CPU
{60765BF4-6165-4F2F-8756-1C699826265D}.XP32bit|x64.Build.0 = Release|Any CPU
{60765BF4-6165-4F2F-8756-1C699826265D}.XP32bit|x64.ActiveCfg = Release|x64
{60765BF4-6165-4F2F-8756-1C699826265D}.XP32bit|x64.Build.0 = Release|x64
{60765BF4-6165-4F2F-8756-1C699826265D}.XP32bit|x86.ActiveCfg = Release|Any CPU
{60765BF4-6165-4F2F-8756-1C699826265D}.XP32bit|x86.Build.0 = Release|Any CPU
{3DD94AD1-D153-46DD-8550-645C57EA8326}._MANUAL_CONTROL|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
@ -1837,8 +1841,8 @@ Global
{F013A56B-7BE6-4852-9CD8-B971CD1ADD0C}.XP32bit|Any CPU.Build.0 = Release|Any CPU
{F013A56B-7BE6-4852-9CD8-B971CD1ADD0C}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU
{F013A56B-7BE6-4852-9CD8-B971CD1ADD0C}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU
{F013A56B-7BE6-4852-9CD8-B971CD1ADD0C}.XP32bit|x64.ActiveCfg = Release|Any CPU
{F013A56B-7BE6-4852-9CD8-B971CD1ADD0C}.XP32bit|x64.Build.0 = Release|Any CPU
{F013A56B-7BE6-4852-9CD8-B971CD1ADD0C}.XP32bit|x64.ActiveCfg = Release|x64
{F013A56B-7BE6-4852-9CD8-B971CD1ADD0C}.XP32bit|x64.Build.0 = Release|x64
{F013A56B-7BE6-4852-9CD8-B971CD1ADD0C}.XP32bit|x86.ActiveCfg = Release|Any CPU
{F013A56B-7BE6-4852-9CD8-B971CD1ADD0C}.XP32bit|x86.Build.0 = Release|Any CPU
{407E05EE-F1DE-4020-83AD-8C18EDE6B32C}._MANUAL_CONTROL|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
@ -1901,8 +1905,8 @@ Global
{407E05EE-F1DE-4020-83AD-8C18EDE6B32C}.XP32bit|Any CPU.Build.0 = Release|Any CPU
{407E05EE-F1DE-4020-83AD-8C18EDE6B32C}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU
{407E05EE-F1DE-4020-83AD-8C18EDE6B32C}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU
{407E05EE-F1DE-4020-83AD-8C18EDE6B32C}.XP32bit|x64.ActiveCfg = Release|Any CPU
{407E05EE-F1DE-4020-83AD-8C18EDE6B32C}.XP32bit|x64.Build.0 = Release|Any CPU
{407E05EE-F1DE-4020-83AD-8C18EDE6B32C}.XP32bit|x64.ActiveCfg = Release|x64
{407E05EE-F1DE-4020-83AD-8C18EDE6B32C}.XP32bit|x64.Build.0 = Release|x64
{407E05EE-F1DE-4020-83AD-8C18EDE6B32C}.XP32bit|x86.ActiveCfg = Release|Any CPU
{407E05EE-F1DE-4020-83AD-8C18EDE6B32C}.XP32bit|x86.Build.0 = Release|Any CPU
{26AFCF1E-1287-48B8-A506-32B1E8A0DD0E}._MANUAL_CONTROL|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
@ -1965,8 +1969,8 @@ Global
{26AFCF1E-1287-48B8-A506-32B1E8A0DD0E}.XP32bit|Any CPU.Build.0 = Release|Any CPU
{26AFCF1E-1287-48B8-A506-32B1E8A0DD0E}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU
{26AFCF1E-1287-48B8-A506-32B1E8A0DD0E}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU
{26AFCF1E-1287-48B8-A506-32B1E8A0DD0E}.XP32bit|x64.ActiveCfg = Release|Any CPU
{26AFCF1E-1287-48B8-A506-32B1E8A0DD0E}.XP32bit|x64.Build.0 = Release|Any CPU
{26AFCF1E-1287-48B8-A506-32B1E8A0DD0E}.XP32bit|x64.ActiveCfg = Release|x64
{26AFCF1E-1287-48B8-A506-32B1E8A0DD0E}.XP32bit|x64.Build.0 = Release|x64
{26AFCF1E-1287-48B8-A506-32B1E8A0DD0E}.XP32bit|x86.ActiveCfg = Release|Any CPU
{26AFCF1E-1287-48B8-A506-32B1E8A0DD0E}.XP32bit|x86.Build.0 = Release|Any CPU
{D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}._MANUAL_CONTROL|Any CPU.ActiveCfg = Release|Any CPU
@ -2029,8 +2033,8 @@ Global
{D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.XP32bit|Any CPU.Build.0 = Debug|Any CPU
{D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.XP32bit|Mixed Platforms.ActiveCfg = Debug|Any CPU
{D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.XP32bit|Mixed Platforms.Build.0 = Debug|Any CPU
{D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.XP32bit|x64.ActiveCfg = Debug|Any CPU
{D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.XP32bit|x64.Build.0 = Debug|Any CPU
{D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.XP32bit|x64.ActiveCfg = Debug|x64
{D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.XP32bit|x64.Build.0 = Debug|x64
{D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.XP32bit|x86.ActiveCfg = Debug|Any CPU
{D72BFC81-AA50-45F2-9FB2-DF4F373F6AD4}.XP32bit|x86.Build.0 = Debug|Any CPU
{9EB1F659-6F73-4F65-BCAB-4114FD94F5FC}._MANUAL_CONTROL|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
@ -2093,8 +2097,8 @@ Global
{9EB1F659-6F73-4F65-BCAB-4114FD94F5FC}.XP32bit|Any CPU.Build.0 = Release|Any CPU
{9EB1F659-6F73-4F65-BCAB-4114FD94F5FC}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU
{9EB1F659-6F73-4F65-BCAB-4114FD94F5FC}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU
{9EB1F659-6F73-4F65-BCAB-4114FD94F5FC}.XP32bit|x64.ActiveCfg = Release|Any CPU
{9EB1F659-6F73-4F65-BCAB-4114FD94F5FC}.XP32bit|x64.Build.0 = Release|Any CPU
{9EB1F659-6F73-4F65-BCAB-4114FD94F5FC}.XP32bit|x64.ActiveCfg = Release|x64
{9EB1F659-6F73-4F65-BCAB-4114FD94F5FC}.XP32bit|x64.Build.0 = Release|x64
{9EB1F659-6F73-4F65-BCAB-4114FD94F5FC}.XP32bit|x86.ActiveCfg = Release|Any CPU
{9EB1F659-6F73-4F65-BCAB-4114FD94F5FC}.XP32bit|x86.Build.0 = Release|Any CPU
{6D2777BB-7A88-466D-A49B-3266F9BF0160}._MANUAL_CONTROL|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
@ -2157,8 +2161,8 @@ Global
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.XP32bit|Any CPU.Build.0 = Release|Any CPU
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.XP32bit|x64.ActiveCfg = Release|Any CPU
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.XP32bit|x64.Build.0 = Release|Any CPU
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.XP32bit|x64.ActiveCfg = Release|x64
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.XP32bit|x64.Build.0 = Release|x64
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.XP32bit|x86.ActiveCfg = Release|Any CPU
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.XP32bit|x86.Build.0 = Release|Any CPU
{315E94B8-B82F-4B25-B5BD-297DF3BC1D54}._MANUAL_CONTROL|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
@ -2221,8 +2225,8 @@ Global
{315E94B8-B82F-4B25-B5BD-297DF3BC1D54}.XP32bit|Any CPU.Build.0 = Release|Any CPU
{315E94B8-B82F-4B25-B5BD-297DF3BC1D54}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU
{315E94B8-B82F-4B25-B5BD-297DF3BC1D54}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU
{315E94B8-B82F-4B25-B5BD-297DF3BC1D54}.XP32bit|x64.ActiveCfg = Release|Any CPU
{315E94B8-B82F-4B25-B5BD-297DF3BC1D54}.XP32bit|x64.Build.0 = Release|Any CPU
{315E94B8-B82F-4B25-B5BD-297DF3BC1D54}.XP32bit|x64.ActiveCfg = Release|x64
{315E94B8-B82F-4B25-B5BD-297DF3BC1D54}.XP32bit|x64.Build.0 = Release|x64
{315E94B8-B82F-4B25-B5BD-297DF3BC1D54}.XP32bit|x86.ActiveCfg = Release|Any CPU
{315E94B8-B82F-4B25-B5BD-297DF3BC1D54}.XP32bit|x86.Build.0 = Release|Any CPU
{2C6378C6-6BA1-4CEE-8992-8404D8369A90}._MANUAL_CONTROL|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
@ -2285,8 +2289,8 @@ Global
{2C6378C6-6BA1-4CEE-8992-8404D8369A90}.XP32bit|Any CPU.Build.0 = Release|Any CPU
{2C6378C6-6BA1-4CEE-8992-8404D8369A90}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU
{2C6378C6-6BA1-4CEE-8992-8404D8369A90}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU
{2C6378C6-6BA1-4CEE-8992-8404D8369A90}.XP32bit|x64.ActiveCfg = Release|Any CPU
{2C6378C6-6BA1-4CEE-8992-8404D8369A90}.XP32bit|x64.Build.0 = Release|Any CPU
{2C6378C6-6BA1-4CEE-8992-8404D8369A90}.XP32bit|x64.ActiveCfg = Release|x64
{2C6378C6-6BA1-4CEE-8992-8404D8369A90}.XP32bit|x64.Build.0 = Release|x64
{2C6378C6-6BA1-4CEE-8992-8404D8369A90}.XP32bit|x86.ActiveCfg = Release|Any CPU
{2C6378C6-6BA1-4CEE-8992-8404D8369A90}.XP32bit|x86.Build.0 = Release|Any CPU
{A33E3C6D-EAAE-4A20-A0EE-F9E6922FD029}._MANUAL_CONTROL|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
@ -2349,8 +2353,8 @@ Global
{A33E3C6D-EAAE-4A20-A0EE-F9E6922FD029}.XP32bit|Any CPU.Build.0 = Release|Any CPU
{A33E3C6D-EAAE-4A20-A0EE-F9E6922FD029}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU
{A33E3C6D-EAAE-4A20-A0EE-F9E6922FD029}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU
{A33E3C6D-EAAE-4A20-A0EE-F9E6922FD029}.XP32bit|x64.ActiveCfg = Release|Any CPU
{A33E3C6D-EAAE-4A20-A0EE-F9E6922FD029}.XP32bit|x64.Build.0 = Release|Any CPU
{A33E3C6D-EAAE-4A20-A0EE-F9E6922FD029}.XP32bit|x64.ActiveCfg = Release|x64
{A33E3C6D-EAAE-4A20-A0EE-F9E6922FD029}.XP32bit|x64.Build.0 = Release|x64
{A33E3C6D-EAAE-4A20-A0EE-F9E6922FD029}.XP32bit|x86.ActiveCfg = Release|Any CPU
{A33E3C6D-EAAE-4A20-A0EE-F9E6922FD029}.XP32bit|x86.Build.0 = Release|Any CPU
{D0C8D887-ED52-40AB-A069-90BCE0E801E2}._MANUAL_CONTROL|Any CPU.ActiveCfg = Release|Any CPU
@ -2413,8 +2417,8 @@ Global
{D0C8D887-ED52-40AB-A069-90BCE0E801E2}.XP32bit|Any CPU.Build.0 = Debug|Any CPU
{D0C8D887-ED52-40AB-A069-90BCE0E801E2}.XP32bit|Mixed Platforms.ActiveCfg = Debug|Any CPU
{D0C8D887-ED52-40AB-A069-90BCE0E801E2}.XP32bit|Mixed Platforms.Build.0 = Debug|Any CPU
{D0C8D887-ED52-40AB-A069-90BCE0E801E2}.XP32bit|x64.ActiveCfg = Debug|Any CPU
{D0C8D887-ED52-40AB-A069-90BCE0E801E2}.XP32bit|x64.Build.0 = Debug|Any CPU
{D0C8D887-ED52-40AB-A069-90BCE0E801E2}.XP32bit|x64.ActiveCfg = Debug|x64
{D0C8D887-ED52-40AB-A069-90BCE0E801E2}.XP32bit|x64.Build.0 = Debug|x64
{D0C8D887-ED52-40AB-A069-90BCE0E801E2}.XP32bit|x86.ActiveCfg = Debug|Any CPU
{D0C8D887-ED52-40AB-A069-90BCE0E801E2}.XP32bit|x86.Build.0 = Debug|Any CPU
{D0C859D9-D55E-4E85-AC50-0FF31B1CE50D}._MANUAL_CONTROL|Any CPU.ActiveCfg = Release|Any CPU
@ -2477,8 +2481,8 @@ Global
{D0C859D9-D55E-4E85-AC50-0FF31B1CE50D}.XP32bit|Any CPU.Build.0 = Debug|Any CPU
{D0C859D9-D55E-4E85-AC50-0FF31B1CE50D}.XP32bit|Mixed Platforms.ActiveCfg = Debug|Any CPU
{D0C859D9-D55E-4E85-AC50-0FF31B1CE50D}.XP32bit|Mixed Platforms.Build.0 = Debug|Any CPU
{D0C859D9-D55E-4E85-AC50-0FF31B1CE50D}.XP32bit|x64.ActiveCfg = Debug|Any CPU
{D0C859D9-D55E-4E85-AC50-0FF31B1CE50D}.XP32bit|x64.Build.0 = Debug|Any CPU
{D0C859D9-D55E-4E85-AC50-0FF31B1CE50D}.XP32bit|x64.ActiveCfg = Debug|x64
{D0C859D9-D55E-4E85-AC50-0FF31B1CE50D}.XP32bit|x64.Build.0 = Debug|x64
{D0C859D9-D55E-4E85-AC50-0FF31B1CE50D}.XP32bit|x86.ActiveCfg = Debug|Any CPU
{D0C859D9-D55E-4E85-AC50-0FF31B1CE50D}.XP32bit|x86.Build.0 = Debug|Any CPU
{20F137FD-C25E-42B7-A68F-58C746475897}._MANUAL_CONTROL|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
@ -2541,8 +2545,8 @@ Global
{20F137FD-C25E-42B7-A68F-58C746475897}.XP32bit|Any CPU.Build.0 = Release|Any CPU
{20F137FD-C25E-42B7-A68F-58C746475897}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU
{20F137FD-C25E-42B7-A68F-58C746475897}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU
{20F137FD-C25E-42B7-A68F-58C746475897}.XP32bit|x64.ActiveCfg = Release|Any CPU
{20F137FD-C25E-42B7-A68F-58C746475897}.XP32bit|x64.Build.0 = Release|Any CPU
{20F137FD-C25E-42B7-A68F-58C746475897}.XP32bit|x64.ActiveCfg = Release|x64
{20F137FD-C25E-42B7-A68F-58C746475897}.XP32bit|x64.Build.0 = Release|x64
{20F137FD-C25E-42B7-A68F-58C746475897}.XP32bit|x86.ActiveCfg = Release|Any CPU
{20F137FD-C25E-42B7-A68F-58C746475897}.XP32bit|x86.Build.0 = Release|Any CPU
{8A619CD5-6C8D-420C-A132-7946C6F13E6E}._MANUAL_CONTROL|Any CPU.ActiveCfg = Release|Any CPU
@ -2605,8 +2609,8 @@ Global
{8A619CD5-6C8D-420C-A132-7946C6F13E6E}.XP32bit|Any CPU.Build.0 = Debug|Any CPU
{8A619CD5-6C8D-420C-A132-7946C6F13E6E}.XP32bit|Mixed Platforms.ActiveCfg = Debug|Any CPU
{8A619CD5-6C8D-420C-A132-7946C6F13E6E}.XP32bit|Mixed Platforms.Build.0 = Debug|Any CPU
{8A619CD5-6C8D-420C-A132-7946C6F13E6E}.XP32bit|x64.ActiveCfg = Debug|Any CPU
{8A619CD5-6C8D-420C-A132-7946C6F13E6E}.XP32bit|x64.Build.0 = Debug|Any CPU
{8A619CD5-6C8D-420C-A132-7946C6F13E6E}.XP32bit|x64.ActiveCfg = Debug|x64
{8A619CD5-6C8D-420C-A132-7946C6F13E6E}.XP32bit|x64.Build.0 = Debug|x64
{8A619CD5-6C8D-420C-A132-7946C6F13E6E}.XP32bit|x86.ActiveCfg = Debug|Any CPU
{8A619CD5-6C8D-420C-A132-7946C6F13E6E}.XP32bit|x86.Build.0 = Debug|Any CPU
{94CA71F3-C5D7-4EC6-BA47-FA8EEA3C9406}._MANUAL_CONTROL|Any CPU.ActiveCfg = Release|Any CPU
@ -2669,8 +2673,8 @@ Global
{94CA71F3-C5D7-4EC6-BA47-FA8EEA3C9406}.XP32bit|Any CPU.Build.0 = Release|Any CPU
{94CA71F3-C5D7-4EC6-BA47-FA8EEA3C9406}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU
{94CA71F3-C5D7-4EC6-BA47-FA8EEA3C9406}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU
{94CA71F3-C5D7-4EC6-BA47-FA8EEA3C9406}.XP32bit|x64.ActiveCfg = Release|Any CPU
{94CA71F3-C5D7-4EC6-BA47-FA8EEA3C9406}.XP32bit|x64.Build.0 = Release|Any CPU
{94CA71F3-C5D7-4EC6-BA47-FA8EEA3C9406}.XP32bit|x64.ActiveCfg = Release|x64
{94CA71F3-C5D7-4EC6-BA47-FA8EEA3C9406}.XP32bit|x64.Build.0 = Release|x64
{94CA71F3-C5D7-4EC6-BA47-FA8EEA3C9406}.XP32bit|x86.ActiveCfg = Release|Any CPU
{94CA71F3-C5D7-4EC6-BA47-FA8EEA3C9406}.XP32bit|x86.Build.0 = Release|Any CPU
{E9FAAF12-8721-46AC-8181-744001E3314E}._MANUAL_CONTROL|Any CPU.ActiveCfg = Release|Any CPU
@ -2733,8 +2737,8 @@ Global
{E9FAAF12-8721-46AC-8181-744001E3314E}.XP32bit|Any CPU.Build.0 = Release|Any CPU
{E9FAAF12-8721-46AC-8181-744001E3314E}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU
{E9FAAF12-8721-46AC-8181-744001E3314E}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU
{E9FAAF12-8721-46AC-8181-744001E3314E}.XP32bit|x64.ActiveCfg = Release|Any CPU
{E9FAAF12-8721-46AC-8181-744001E3314E}.XP32bit|x64.Build.0 = Release|Any CPU
{E9FAAF12-8721-46AC-8181-744001E3314E}.XP32bit|x64.ActiveCfg = Release|x64
{E9FAAF12-8721-46AC-8181-744001E3314E}.XP32bit|x64.Build.0 = Release|x64
{E9FAAF12-8721-46AC-8181-744001E3314E}.XP32bit|x86.ActiveCfg = Release|Any CPU
{E9FAAF12-8721-46AC-8181-744001E3314E}.XP32bit|x86.Build.0 = Release|Any CPU
{2FD60CF1-45CD-4060-B8E5-4F39FBA7F1CB}._MANUAL_CONTROL|Any CPU.ActiveCfg = Release|Any CPU
@ -2797,8 +2801,8 @@ Global
{2FD60CF1-45CD-4060-B8E5-4F39FBA7F1CB}.XP32bit|Any CPU.Build.0 = Release|Any CPU
{2FD60CF1-45CD-4060-B8E5-4F39FBA7F1CB}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU
{2FD60CF1-45CD-4060-B8E5-4F39FBA7F1CB}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU
{2FD60CF1-45CD-4060-B8E5-4F39FBA7F1CB}.XP32bit|x64.ActiveCfg = Release|Any CPU
{2FD60CF1-45CD-4060-B8E5-4F39FBA7F1CB}.XP32bit|x64.Build.0 = Release|Any CPU
{2FD60CF1-45CD-4060-B8E5-4F39FBA7F1CB}.XP32bit|x64.ActiveCfg = Release|x64
{2FD60CF1-45CD-4060-B8E5-4F39FBA7F1CB}.XP32bit|x64.Build.0 = Release|x64
{2FD60CF1-45CD-4060-B8E5-4F39FBA7F1CB}.XP32bit|x86.ActiveCfg = Release|Any CPU
{2FD60CF1-45CD-4060-B8E5-4F39FBA7F1CB}.XP32bit|x86.Build.0 = Release|Any CPU
{A25A96FD-604B-43BE-80CD-A953152C2175}._MANUAL_CONTROL|Any CPU.ActiveCfg = Release|Any CPU
@ -2861,8 +2865,8 @@ Global
{A25A96FD-604B-43BE-80CD-A953152C2175}.XP32bit|Any CPU.Build.0 = Release|Any CPU
{A25A96FD-604B-43BE-80CD-A953152C2175}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU
{A25A96FD-604B-43BE-80CD-A953152C2175}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU
{A25A96FD-604B-43BE-80CD-A953152C2175}.XP32bit|x64.ActiveCfg = Release|Any CPU
{A25A96FD-604B-43BE-80CD-A953152C2175}.XP32bit|x64.Build.0 = Release|Any CPU
{A25A96FD-604B-43BE-80CD-A953152C2175}.XP32bit|x64.ActiveCfg = Release|x64
{A25A96FD-604B-43BE-80CD-A953152C2175}.XP32bit|x64.Build.0 = Release|x64
{A25A96FD-604B-43BE-80CD-A953152C2175}.XP32bit|x86.ActiveCfg = Release|Any CPU
{A25A96FD-604B-43BE-80CD-A953152C2175}.XP32bit|x86.Build.0 = Release|Any CPU
{AC434B18-4D7B-49BA-9AD5-0527C79E8297}._MANUAL_CONTROL|Any CPU.ActiveCfg = Release|Any CPU
@ -2925,8 +2929,8 @@ Global
{AC434B18-4D7B-49BA-9AD5-0527C79E8297}.XP32bit|Any CPU.Build.0 = Release|Any CPU
{AC434B18-4D7B-49BA-9AD5-0527C79E8297}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU
{AC434B18-4D7B-49BA-9AD5-0527C79E8297}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU
{AC434B18-4D7B-49BA-9AD5-0527C79E8297}.XP32bit|x64.ActiveCfg = Release|Any CPU
{AC434B18-4D7B-49BA-9AD5-0527C79E8297}.XP32bit|x64.Build.0 = Release|Any CPU
{AC434B18-4D7B-49BA-9AD5-0527C79E8297}.XP32bit|x64.ActiveCfg = Release|x64
{AC434B18-4D7B-49BA-9AD5-0527C79E8297}.XP32bit|x64.Build.0 = Release|x64
{AC434B18-4D7B-49BA-9AD5-0527C79E8297}.XP32bit|x86.ActiveCfg = Release|Any CPU
{AC434B18-4D7B-49BA-9AD5-0527C79E8297}.XP32bit|x86.Build.0 = Release|Any CPU
{4806D89A-FBFB-41BC-AAA7-2242444BF55A}._MANUAL_CONTROL|Any CPU.ActiveCfg = Release|Any CPU
@ -2989,8 +2993,8 @@ Global
{4806D89A-FBFB-41BC-AAA7-2242444BF55A}.XP32bit|Any CPU.Build.0 = Release|Any CPU
{4806D89A-FBFB-41BC-AAA7-2242444BF55A}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU
{4806D89A-FBFB-41BC-AAA7-2242444BF55A}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU
{4806D89A-FBFB-41BC-AAA7-2242444BF55A}.XP32bit|x64.ActiveCfg = Release|Any CPU
{4806D89A-FBFB-41BC-AAA7-2242444BF55A}.XP32bit|x64.Build.0 = Release|Any CPU
{4806D89A-FBFB-41BC-AAA7-2242444BF55A}.XP32bit|x64.ActiveCfg = Release|x64
{4806D89A-FBFB-41BC-AAA7-2242444BF55A}.XP32bit|x64.Build.0 = Release|x64
{4806D89A-FBFB-41BC-AAA7-2242444BF55A}.XP32bit|x86.ActiveCfg = Release|Any CPU
{4806D89A-FBFB-41BC-AAA7-2242444BF55A}.XP32bit|x86.Build.0 = Release|Any CPU
{0FFBCA6C-E828-4196-B0A8-988DEA3E077F}._MANUAL_CONTROL|Any CPU.ActiveCfg = Release|Any CPU
@ -3053,8 +3057,8 @@ Global
{0FFBCA6C-E828-4196-B0A8-988DEA3E077F}.XP32bit|Any CPU.Build.0 = Release|Any CPU
{0FFBCA6C-E828-4196-B0A8-988DEA3E077F}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU
{0FFBCA6C-E828-4196-B0A8-988DEA3E077F}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU
{0FFBCA6C-E828-4196-B0A8-988DEA3E077F}.XP32bit|x64.ActiveCfg = Release|Any CPU
{0FFBCA6C-E828-4196-B0A8-988DEA3E077F}.XP32bit|x64.Build.0 = Release|Any CPU
{0FFBCA6C-E828-4196-B0A8-988DEA3E077F}.XP32bit|x64.ActiveCfg = Release|x64
{0FFBCA6C-E828-4196-B0A8-988DEA3E077F}.XP32bit|x64.Build.0 = Release|x64
{0FFBCA6C-E828-4196-B0A8-988DEA3E077F}.XP32bit|x86.ActiveCfg = Release|Any CPU
{0FFBCA6C-E828-4196-B0A8-988DEA3E077F}.XP32bit|x86.Build.0 = Release|Any CPU
{70BF5094-0F03-41FC-B0BD-BEFCF51686C9}._MANUAL_CONTROL|Any CPU.ActiveCfg = Release|Any CPU
@ -3117,8 +3121,8 @@ Global
{70BF5094-0F03-41FC-B0BD-BEFCF51686C9}.XP32bit|Any CPU.Build.0 = Release|Any CPU
{70BF5094-0F03-41FC-B0BD-BEFCF51686C9}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU
{70BF5094-0F03-41FC-B0BD-BEFCF51686C9}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU
{70BF5094-0F03-41FC-B0BD-BEFCF51686C9}.XP32bit|x64.ActiveCfg = Release|Any CPU
{70BF5094-0F03-41FC-B0BD-BEFCF51686C9}.XP32bit|x64.Build.0 = Release|Any CPU
{70BF5094-0F03-41FC-B0BD-BEFCF51686C9}.XP32bit|x64.ActiveCfg = Release|x64
{70BF5094-0F03-41FC-B0BD-BEFCF51686C9}.XP32bit|x64.Build.0 = Release|x64
{70BF5094-0F03-41FC-B0BD-BEFCF51686C9}.XP32bit|x86.ActiveCfg = Release|Any CPU
{70BF5094-0F03-41FC-B0BD-BEFCF51686C9}.XP32bit|x86.Build.0 = Release|Any CPU
{CBF74D42-327E-4476-A096-63E7EBD9B7A3}._MANUAL_CONTROL|Any CPU.ActiveCfg = Release|Any CPU
@ -3181,10 +3185,138 @@ Global
{CBF74D42-327E-4476-A096-63E7EBD9B7A3}.XP32bit|Any CPU.Build.0 = Release|Any CPU
{CBF74D42-327E-4476-A096-63E7EBD9B7A3}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU
{CBF74D42-327E-4476-A096-63E7EBD9B7A3}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU
{CBF74D42-327E-4476-A096-63E7EBD9B7A3}.XP32bit|x64.ActiveCfg = Release|Any CPU
{CBF74D42-327E-4476-A096-63E7EBD9B7A3}.XP32bit|x64.Build.0 = Release|Any CPU
{CBF74D42-327E-4476-A096-63E7EBD9B7A3}.XP32bit|x64.ActiveCfg = Release|x64
{CBF74D42-327E-4476-A096-63E7EBD9B7A3}.XP32bit|x64.Build.0 = Release|x64
{CBF74D42-327E-4476-A096-63E7EBD9B7A3}.XP32bit|x86.ActiveCfg = Release|Any CPU
{CBF74D42-327E-4476-A096-63E7EBD9B7A3}.XP32bit|x86.Build.0 = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}._MANUAL_CONTROL|Any CPU.ActiveCfg = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}._MANUAL_CONTROL|Any CPU.Build.0 = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}._MANUAL_CONTROL|Mixed Platforms.ActiveCfg = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}._MANUAL_CONTROL|Mixed Platforms.Build.0 = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}._MANUAL_CONTROL|x64.ActiveCfg = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}._MANUAL_CONTROL|x64.Build.0 = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}._MANUAL_CONTROL|x86.ActiveCfg = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}._MANUAL_CONTROL|x86.Build.0 = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.COM|Any CPU.ActiveCfg = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.COM|Any CPU.Build.0 = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.COM|Mixed Platforms.ActiveCfg = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.COM|Mixed Platforms.Build.0 = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.COM|x64.ActiveCfg = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.COM|x64.Build.0 = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.COM|x86.ActiveCfg = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.COM|x86.Build.0 = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.Debug|x64.ActiveCfg = Debug|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.Debug|x64.Build.0 = Debug|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.Debug|x86.ActiveCfg = Debug|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.Debug|x86.Build.0 = Debug|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.GenesisDisplayTool_V01|Any CPU.ActiveCfg = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.GenesisDisplayTool_V01|Any CPU.Build.0 = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.GenesisDisplayTool_V01|Mixed Platforms.ActiveCfg = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.GenesisDisplayTool_V01|Mixed Platforms.Build.0 = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.GenesisDisplayTool_V01|x64.ActiveCfg = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.GenesisDisplayTool_V01|x64.Build.0 = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.GenesisDisplayTool_V01|x86.ActiveCfg = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.GenesisDisplayTool_V01|x86.Build.0 = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.PerformTest|Any CPU.ActiveCfg = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.PerformTest|Any CPU.Build.0 = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.PerformTest|Mixed Platforms.ActiveCfg = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.PerformTest|Mixed Platforms.Build.0 = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.PerformTest|x64.ActiveCfg = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.PerformTest|x64.Build.0 = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.PerformTest|x86.ActiveCfg = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.PerformTest|x86.Build.0 = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.Release|Any CPU.Build.0 = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.Release|x64.ActiveCfg = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.Release|x64.Build.0 = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.Release|x86.ActiveCfg = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.Release|x86.Build.0 = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.ReleaseTest|Any CPU.ActiveCfg = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.ReleaseTest|Any CPU.Build.0 = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.ReleaseTest|Mixed Platforms.ActiveCfg = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.ReleaseTest|Mixed Platforms.Build.0 = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.ReleaseTest|x64.ActiveCfg = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.ReleaseTest|x64.Build.0 = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.ReleaseTest|x86.ActiveCfg = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.ReleaseTest|x86.Build.0 = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.XP32bit|Any CPU.ActiveCfg = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.XP32bit|Any CPU.Build.0 = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.XP32bit|x64.ActiveCfg = Release|x64
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.XP32bit|x64.Build.0 = Release|x64
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.XP32bit|x86.ActiveCfg = Release|Any CPU
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC}.XP32bit|x86.Build.0 = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}._MANUAL_CONTROL|Any CPU.ActiveCfg = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}._MANUAL_CONTROL|Any CPU.Build.0 = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}._MANUAL_CONTROL|Mixed Platforms.ActiveCfg = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}._MANUAL_CONTROL|Mixed Platforms.Build.0 = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}._MANUAL_CONTROL|x64.ActiveCfg = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}._MANUAL_CONTROL|x64.Build.0 = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}._MANUAL_CONTROL|x86.ActiveCfg = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}._MANUAL_CONTROL|x86.Build.0 = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.COM|Any CPU.ActiveCfg = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.COM|Any CPU.Build.0 = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.COM|Mixed Platforms.ActiveCfg = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.COM|Mixed Platforms.Build.0 = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.COM|x64.ActiveCfg = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.COM|x64.Build.0 = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.COM|x86.ActiveCfg = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.COM|x86.Build.0 = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.Debug|Any CPU.Build.0 = Debug|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.Debug|x64.ActiveCfg = Debug|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.Debug|x64.Build.0 = Debug|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.Debug|x86.ActiveCfg = Debug|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.Debug|x86.Build.0 = Debug|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.GenesisDisplayTool_V01|Any CPU.ActiveCfg = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.GenesisDisplayTool_V01|Any CPU.Build.0 = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.GenesisDisplayTool_V01|Mixed Platforms.ActiveCfg = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.GenesisDisplayTool_V01|Mixed Platforms.Build.0 = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.GenesisDisplayTool_V01|x64.ActiveCfg = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.GenesisDisplayTool_V01|x64.Build.0 = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.GenesisDisplayTool_V01|x86.ActiveCfg = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.GenesisDisplayTool_V01|x86.Build.0 = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.PerformTest|Any CPU.ActiveCfg = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.PerformTest|Any CPU.Build.0 = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.PerformTest|Mixed Platforms.ActiveCfg = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.PerformTest|Mixed Platforms.Build.0 = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.PerformTest|x64.ActiveCfg = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.PerformTest|x64.Build.0 = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.PerformTest|x86.ActiveCfg = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.PerformTest|x86.Build.0 = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.Release|Any CPU.ActiveCfg = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.Release|Any CPU.Build.0 = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.Release|x64.ActiveCfg = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.Release|x64.Build.0 = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.Release|x86.ActiveCfg = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.Release|x86.Build.0 = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.ReleaseTest|Any CPU.ActiveCfg = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.ReleaseTest|Any CPU.Build.0 = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.ReleaseTest|Mixed Platforms.ActiveCfg = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.ReleaseTest|Mixed Platforms.Build.0 = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.ReleaseTest|x64.ActiveCfg = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.ReleaseTest|x64.Build.0 = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.ReleaseTest|x86.ActiveCfg = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.ReleaseTest|x86.Build.0 = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.XP32bit|Any CPU.ActiveCfg = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.XP32bit|Any CPU.Build.0 = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.XP32bit|x64.ActiveCfg = Release|x64
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.XP32bit|x64.Build.0 = Release|x64
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.XP32bit|x86.ActiveCfg = Release|Any CPU
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}.XP32bit|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -3247,6 +3379,8 @@ Global
{0FFBCA6C-E828-4196-B0A8-988DEA3E077F} = {03D4F23E-7E4A-4091-BC96-036C996D351A}
{70BF5094-0F03-41FC-B0BD-BEFCF51686C9} = {03D4F23E-7E4A-4091-BC96-036C996D351A}
{CBF74D42-327E-4476-A096-63E7EBD9B7A3} = {57AA2731-BFD9-40A5-820F-E943FBC75D91}
{108FE49B-75E1-43F5-82DD-DA33FE99CBEC} = {03D4F23E-7E4A-4091-BC96-036C996D351A}
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39} = {03D4F23E-7E4A-4091-BC96-036C996D351A}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4BCB7B69-696C-436A-86F7-C91EA5588164}

View File

@ -45,6 +45,36 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<LangVersion>7.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == '_MANUAL_CONTROL|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\_MANUAL_CONTROL\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Configuration" />

View File

@ -46,6 +46,36 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == '_MANUAL_CONTROL|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\_MANUAL_CONTROL\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\.shared\SharedAssemblyInfo.cs">
<Link>Properties\SharedAssemblyInfo.cs</Link>

View File

@ -40,6 +40,26 @@
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />

View File

@ -49,6 +49,26 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>

View File

@ -5,7 +5,7 @@
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D0C8D887-ED52-40AB-A069-90BCE0E801E2}</ProjectGuid>
<OutputType>WinExe</OutputType>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Xylem.Common.Ui.CordonelPreadjustmentUi</RootNamespace>
<AssemblyName>Xylem.Common.Ui.CordonelPreadjustmentUi</AssemblyName>
@ -63,7 +63,7 @@
<GenerateManifests>true</GenerateManifests>
</PropertyGroup>
<PropertyGroup>
<SignManifests>true</SignManifests>
<SignManifests>false</SignManifests>
</PropertyGroup>
<PropertyGroup />
<PropertyGroup />
@ -74,6 +74,31 @@
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
@ -116,6 +141,7 @@
<DependentUpon>MsgBox.cs</DependentUpon>
</Compile>
<Compile Include="Parameters\FlushParams.cs" />
<Compile Include="Parameters\PreAdjustmentTempSouce.cs" />
<Compile Include="PreAdjustmentControl.cs">
<SubType>UserControl</SubType>
</Compile>

View File

@ -22,7 +22,7 @@ namespace CordonelPreadjustmentUi
private void MainForm_Load(object sender, EventArgs e)
{
preadjustCtl = new PreAdjustmentControl(mainSettings);
tab_ZeroFlowCal.Controls.Add(preadjustCtl);
@ -104,7 +104,20 @@ namespace CordonelPreadjustmentUi
mainSettings.TempDeviationLimit = (double)nUD_SettingsTempMonitorDeviation.Value;
//mainSettings.MeterSize = (Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore.Consts.MeterSize)nUD_SettingsPreparationMetersize.Value;
mainSettings.TempOnly = cB_TempOnly.Checked;
mainSettings.TempMan = cB_TempManualAcquisition.Checked;
mainSettings.SetTempUseTempFlansh(true);
if (cB_TempManualAcquisition.Checked)
{
mainSettings.SetTempUseManualInput(true);
mainSettings.SetTempUseTempFlansh(false);
}
else
{
mainSettings.SetTempUseTempFlansh(true);
mainSettings.SetTempUseManualInput(false);
}
mainSettings.OffsetTestGenerateLogfiles = cB_OffsetTestLogFiles.Checked;
mainSettings.OffsetTestActivityCheckInverval = (int)nUD_Settings_ZeroflowOffsetTestActivityCheckInterval.Value;

View File

@ -304,17 +304,31 @@ namespace CordonelPreadjustmentUi
{
if (Meter.Slot == 11)
{
pcbid = "18370042";
pcbid = "193400550";
Meter.WriteLog($"Fake pcbid {pcbid} for 2016 slot 11");
}
else if (Meter.Slot == 12)
{
pcbid = "182100096";
Meter.WriteLog($"Fake pcbid {pcbid} for 2016 slot 11");
pcbid = "193400388";
Meter.WriteLog($"Fake pcbid {pcbid} for 2016 slot 12");
}
}
}
if (string.IsNullOrEmpty(pcbid) || pcbid.Length < 5)
{
if (Meter.Slot == 11)
{
pcbid = "193400550";
Meter.WriteLog($"Fake pcbid {pcbid} for 2016 slot 11");
}
else if (Meter.Slot == 12)
{
pcbid = "193400388";
Meter.WriteLog($"Fake pcbid {pcbid} for 2016 slot 12");
}
}

View File

@ -76,7 +76,7 @@ namespace CordonelPreadjustmentUi
}
tmpI = 1;
if (settings.TempMeters.Any() && !settings.TempMan)
if (settings.TempMeters.Any() && settings.GetTempUseTempFlansh())
{
foreach (var tempMeter in settings.TempMeters)
{
@ -92,7 +92,6 @@ namespace CordonelPreadjustmentUi
}
else
{
settings.TempMan = true;
var ctl = new TempMeterStateControl("Input");
ctl.Location = new Point(5 + ((tmpI - 1) * ctl.Width), 15);
ctl.SetChecked(true);
@ -1412,7 +1411,7 @@ namespace CordonelPreadjustmentUi
GlobalMeterBatch = new MeterBatch();
ThermoMeterBatch = new MeterBatch();
if (settings.TempMan)
if (!settings.GetTempUseTempFlansh())
{
TempMeterStateCtls = new List<MeterStateControl>();
}
@ -1521,14 +1520,19 @@ namespace CordonelPreadjustmentUi
}
try
{
foreach (var meterCtl in TempMeterStateCtls)
if (!settings.GetTempUseManualInput())
{
if (meterCtl != null && meterCtl.IsEnabled)
foreach (var meterCtl in TempMeterStateCtls)
{
meterCtl.Ok = meterCtl.Meter.CheckStreamingPort();
if (meterCtl != null && meterCtl.IsEnabled)
{
meterCtl.Ok = meterCtl.Meter.CheckStreamingPort();
}
}
AllMeterStateCtrls().ForEach(f => f.SetUi());
}
AllMeterStateCtrls().ForEach(f => f.SetUi());
}
catch (Exception ex)
{
@ -1564,9 +1568,9 @@ namespace CordonelPreadjustmentUi
}
else
{
DialogResult AskForActions;
DialogResult AskForActions = DialogResult.Ignore;
AbortButtonEnabled(false);
AskForActions = ShowMsg(Text, $"{sequenceName}", MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Question);
AskForActions = ShowMsg(Text, $"{sequenceName}", MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Question, true);
AbortButtonEnabled(true);
DebugMessage($"AskForActions on {sequenceName} selected {AskForActions}");
@ -1656,7 +1660,7 @@ namespace CordonelPreadjustmentUi
pp.OnRequestTemperatur += delegate (Object o, EventArgs args)
{
OnRequestTemperatur.Invoke(o, new EventArgs());
OnRequestTemperatur?.Invoke(o, new EventArgs());
};
@ -1982,7 +1986,7 @@ namespace CordonelPreadjustmentUi
ThermoMeterBatch = new MeterBatch();
StopMainSequence(msg, MessageBoxIcon.Information, c);
OnIsDone?.Invoke(this,new EventArgsMeterSuccsessfull(goodMeters));
OnIsDone?.Invoke(this, new EventArgsMeterSuccsessfull(goodMeters));
}

View File

@ -1,12 +1,10 @@
using System;
using Logic.ProductionToProductMapper.Cordonel;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Text;
using Logic.ProductionToProductMapper.Cordonel;
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore.Consts;
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts;
namespace CordonelPreadjustmentUi
{
@ -66,8 +64,8 @@ namespace CordonelPreadjustmentUi
private string CultureStr;
public List<Int32> TempMeters = new List<Int32>() { 1,10 };
public List<Int32> Meters = new List<Int32>() { 2, 3, 4, 5, 6, 7, 8, 9 };
public List<Int32> TempMeters = new List<Int32>() { 1, 10 };
public List<Int32> Meters = new List<Int32>() { 2, 3, 4, 5, 6, 7, 8, 9 };
public CultureInfo Culture
{
@ -77,9 +75,71 @@ namespace CordonelPreadjustmentUi
public Int32 NumberOfPaths { get; internal set; }
public bool TempOnly { get; internal set; } = false;
public bool TempMan { get; internal set; } = false;
public PreAdjustmentSettingsContainer(int numberOfPaths = 3, Int32[] meters = null, string cultureStr = "de-DE", Int32[] tempMeters = null, MeterSize meterSize = MeterSize.DN50, Double upperTempLimit = 35, Double lowerTempLimit = 15, Double tempDeviationLimit = 1, Int32 ampTestTofRecordingTime = 2, Double ampTestTriggerValue = 0.5, bool ampTestGenerateLogfiles = true, bool ampTestGenerateMeanValuesFile = true, Int32 ampTestFirstHitLevelPropMin = 12, Int32 ampTestFirstHitLevelPropMax = 32, Int32 ampTestAmpTestDistance = 7, Int32 ampTestPercentageStart = 5, Int32 ampTestPercentageStop = 35, Int32 ampTestActivityCheckInverval = 6, bool offsetTestGenerateLogfiles = true, Int32 offsetTestUpperVoltageLimitMV = 650, Int32 offsetTestLowerVoltageLimitMV = 200, Int32 offsetTestOffsetLimitPS = 300, Int32 offsetTestSettlingTime = 60, Int32 offsetTestZeroflowOffsetTestNumberOfLines = 9000, Int32 offsetTestActivityCheckInverval = 2, Int32 offsetTestBadDataLimit = 3, Int32 samplerate = 16)
private bool tempUseManualInput;
public bool GetTempUseManualInput()
{
return tempUseManualInput;
}
public void SetTempUseManualInput(bool value)
{
tempUseManualInput = value;
}
private bool tempUsePtOverSps;
public bool GetTempUsePtOverSps()
{
return tempUsePtOverSps;
}
public void SetTempUsePtOverSps(bool value)
{
tempUsePtOverSps = value;
}
private bool tempUseTempFlansh;
public bool GetTempUseTempFlansh()
{
return tempUseTempFlansh;
}
public void SetTempUseTempFlansh(bool value)
{
tempUseTempFlansh = value;
}
public PreAdjustmentSettingsContainer(
int numberOfPaths = 3,
Int32[] meters = null,
string cultureStr = "de-DE",
Int32[] tempMeters = null,
MeterSize meterSize = MeterSize.DN50,
Double upperTempLimit = 35,
Double lowerTempLimit = 15,
Double tempDeviationLimit = 1,
Int32 ampTestTofRecordingTime = 2,
Double ampTestTriggerValue = 0.5,
bool ampTestGenerateLogfiles = true,
bool ampTestGenerateMeanValuesFile = true,
Int32 ampTestFirstHitLevelPropMin = 12,
Int32 ampTestFirstHitLevelPropMax = 32,
Int32 ampTestAmpTestDistance = 7,
Int32 ampTestPercentageStart = 5,
Int32 ampTestPercentageStop = 35,
Int32 ampTestActivityCheckInverval = 6,
bool offsetTestGenerateLogfiles = true,
Int32 offsetTestUpperVoltageLimitMV = 650,
Int32 offsetTestLowerVoltageLimitMV = 200,
Int32 offsetTestOffsetLimitPS = 300,
Int32 offsetTestSettlingTime = 60,
Int32 offsetTestZeroflowOffsetTestNumberOfLines = 9000,
Int32 offsetTestActivityCheckInverval = 2,
Int32 offsetTestBadDataLimit = 3,
Int32 samplerate = 16)
{
NumberOfPaths = numberOfPaths;
@ -91,7 +151,7 @@ namespace CordonelPreadjustmentUi
}
else
{
Meters = new List<int>() { 2, 3, 4, 5, 6, 7, 8, 9 };
Meters = new List<int>() { 2, 3, 4, 5, 6, 7, 8, 9 };
}
if (tempMeters != null)
{
@ -127,7 +187,7 @@ namespace CordonelPreadjustmentUi
public override string ToString()
{
var sb = new StringBuilder();
var sb = new StringBuilder();
foreach (var p in this.GetType().GetProperties().Where(p => !p.GetGetMethod().GetParameters().Any()))
{
sb.Append($"{p.Name}={p.GetValue(this, null).ToString()}");

View File

@ -93,16 +93,48 @@ namespace CordonelPreadjustmentUi.Processes.Actions
Exception exPost = new Exception();
int code = 0;
var tempP = "";
if (meterctl.Meter.calibrationResult.AdditionalLogInfos.TryGetValue("Amp. Test Mean value PATH 1", out tempP))
{
tempP = tempP.Replace(" at ", "").Replace("at ", "");
tempP = tempP.Replace(System.Environment.NewLine, ";");
meterctl.Meter.calibrationResult.AdditionalLogInfos["Amp. Test Mean value PATH 1"] = tempP;
}
if (meterctl.Meter.calibrationResult.AdditionalLogInfos.TryGetValue("Amp. Test Mean value PATH 2", out tempP))
{
tempP = tempP.Replace(" at ", "").Replace("at ", ""); ;
tempP = tempP.Replace(System.Environment.NewLine, ";");
meterctl.Meter.calibrationResult.AdditionalLogInfos["Amp. Test Mean value PATH 2"] = tempP;
}
if (meterctl.Meter.calibrationResult.AdditionalLogInfos.TryGetValue("Amp. Test Mean value PATH 3", out tempP))
{
tempP = tempP.Replace(" at ", "").Replace("at ", ""); ;
tempP = tempP.Replace(System.Environment.NewLine, ";");
meterctl.Meter.calibrationResult.AdditionalLogInfos["Amp. Test Mean value PATH 3"] = tempP.Trim();
}
var r = LocalWebRequest.PostRequestAsync($"{ServiceUrls.PostGenesisCalibrationResultUrl()}?PcbId={meterctl.Meter.PcbId}", ref code, ref exPost, 8000, meterctl.Meter.calibrationResult);
if (!r)
{
meterctl.Meter.WriteLog($"Could not store CalibrationResults on server CODE {code}EX:{exPost} ");
foreach (var item in meterctl.Meter.calibrationResult.AdditionalLogInfos)
{
meterctl.Meter.WriteLog($"AdditionalLogInfos {item.Key} -> {item.Value} ");
}
throw new Exception("Could not store CalibrationResults on server");
}
if (pp.IsAutomaticMode)
{
meterctl.Meter.SetProcessState(Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts.DisplayCodes.ZeroFlow);
// meterctl.Meter.SetProcessState(Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts.DisplayCodes.ZeroFlow);
}
@ -131,7 +163,7 @@ namespace CordonelPreadjustmentUi.Processes.Actions
pp.DebugMessage($"{ProcessName} procedure successful", meterctl.Slot, "APP", meterctl.Meter.PcbId);
if (pp.IsAutomaticMode)
{
meterctl.Meter.SetProcessState(Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts.DisplayCodes.ZeroFlow);
//meterctl.Meter.SetProcessState(Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts.DisplayCodes.ZeroFlow);
}
}

View File

@ -32,7 +32,7 @@ namespace CordonelPreadjustmentUi.Processes.Actions
{
if (!pp.Setting.TempMan)
if (pp.Setting.GetTempUseTempFlansh())
{
pp.DebugMessage($"Load Temp {tempmeterctl.Slot} with {MeterStateControl.TempMode.CalcTof}\n");

View File

@ -7,6 +7,7 @@ using System.Threading;
using System.Threading.Tasks;
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
using Xylem.Common.Ui.CordonelPreadjustmentUi.Helper.Extensions;
using static CordonelPreadjustmentUi.PreAdjustmentControl;
namespace CordonelPreadjustmentUi.Processes.Actions
@ -39,26 +40,41 @@ namespace CordonelPreadjustmentUi.Processes.Actions
pp.StatusLabel = (PredefinedMessages.WaitUntilTemperatureAcquisitionFinished(pp.Setting.Culture));
if (!pp.Setting.TempMan || TempMeterStateCtls.Any(a => a.IsEnabled))
bool skipMan = false;
if (pp.Setting.GetTempUseTempFlansh() || TempMeterStateCtls.Any(a => a.IsEnabled))
{
skipMan = true;
//aoutmatic
decimal avgTemp = 0;
int TempFlanshCount = 0;
var listOFEnabledTempMeters = TempMeterStateCtls.Where(a => a.IsEnabled).ToList();
foreach (var avgTempCtls in listOFEnabledTempMeters)
{
avgTemp = avgTemp + avgTempCtls.GetTemperature();
var check = avgTempCtls.GetTemperature();
if (check > 2 || ((double)check) != 25.0d )
{
avgTemp = avgTemp + avgTempCtls.GetTemperature();
TempFlanshCount = TempFlanshCount + 1;
}
}
avgTemp = avgTemp / listOFEnabledTempMeters.Count;
foreach (var meterctl in MetersToProcess)
if (TempFlanshCount == 0)
{
meterctl.SetTemperature(avgTemp);
skipMan = false;
}
else
{
avgTemp = avgTemp / TempFlanshCount;
foreach (var meterctl in MetersToProcess)
{
meterctl.SetTemperature(avgTemp);
}
}
}
else
if (!skipMan)
{
//manual input
foreach (var meterctl in MetersToProcess)
@ -103,7 +119,7 @@ namespace CordonelPreadjustmentUi.Processes.Actions
Thread.Sleep(100);
}
if (!pp.Setting.TempMan && pp.PushedTestBenchTemp.HasValue)
if (pp.Setting.GetTempUsePtOverSps() && pp.PushedTestBenchTemp.HasValue)
{
foreach (var updateMeter in MetersToProcess)
{

View File

@ -56,8 +56,6 @@ namespace CordonelPreadjustmentUi.Processes
pp.DebugMessage($"{ProcessName} procedure started");
try
{
listOfProcessTasks = StartWork();
}
@ -323,6 +321,7 @@ namespace CordonelPreadjustmentUi.Processes
public bool ReadRegister(ZeroFlowGenesisMeter m, string displayName, string registerName, out byte[] ret)
{
Thread.Sleep(100);
CurrentProcessProgress.StatusLabel = PredefinedMessages.WaitUntilRegisterReadFinished(CurrentProcessProgress.Setting.Culture);
var Ok = false;
CurrentProcessProgress.DebugMessage($"Reading '{displayName}'-register", m.Slot, "CC", m.PcbId);
@ -342,6 +341,7 @@ namespace CordonelPreadjustmentUi.Processes
}
public bool WriteRegisterSafe<T>(ZeroFlowGenesisMeter m, string displayName, string registerName, T Value, bool CheckResult = true)
{
Thread.Sleep(100);
CurrentProcessProgress.DebugMessage($"Writing {Value} to '{displayName}'-register", m.Slot, "CC", m.PcbId);
var Ok = false;
if (CheckResult)

View File

@ -321,7 +321,7 @@ namespace CordonelPreadjustmentUi
public new Boolean WriteRegisterUnsafe<T>(string reg, T value)
{
var RetrysLeft = 12;
var RetrysLeft = 8;
while (RetrysLeft >= 0)
@ -351,7 +351,7 @@ namespace CordonelPreadjustmentUi
public new Boolean WriteRegisterSafe<T>(string reg, T value)
{
var RetrysLeft = 12;
var RetrysLeft = 8;
while (RetrysLeft >= 0)
@ -382,7 +382,7 @@ namespace CordonelPreadjustmentUi
{
var RetrysLeft = 12;
var RetrysLeft = 8;
Exception lastEx = null;
while (RetrysLeft >= 0)

View File

@ -34,6 +34,24 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="BouncyCastle.Crypto, Version=1.8.1.0, Culture=neutral, PublicKeyToken=0e99375e54769942">
<HintPath>..\..\packages\BouncyCastle.Crypto.dll.1.8.1\lib\BouncyCastle.Crypto.dll</HintPath>

View File

@ -52,6 +52,39 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>CODE_ANALYSIS;DEBUG;TRACE</DefineConstants>
<DocumentationFile>bin\x86\Debug\Xylem.Common.Hardware.Interfaces.Ports.PortCore.xml</DocumentationFile>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<RunCodeAnalysis>true</RunCodeAnalysis>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == '_MANUAL_CONTROL|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\_MANUAL_CONTROL\</OutputPath>
<DefineConstants>CODE_ANALYSIS;CODE_ANALYSIS;DEBUG;TRACE</DefineConstants>
<DocumentationFile>bin\x86\Debug\Xylem.Common.Hardware.Interfaces.Ports.PortCore.xml</DocumentationFile>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<RunCodeAnalysis>true</RunCodeAnalysis>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\..\..\..\.shared\SharedAssemblyInfo.cs">
<Link>Properties\SharedAssemblyInfo.cs</Link>

View File

@ -19,7 +19,7 @@ namespace Xylem.Common.Hardware.Interfaces.Ports.SerialPorts
{
private ILogger _byteDataLogger;
private ILogger _asciiDataLogger;
internal ILogger _asciiDataLogger;
/// <inheritdoc />
public virtual event EventHandler<BasePortDataEventArgs> OnRawRecordReceived;
@ -75,7 +75,7 @@ namespace Xylem.Common.Hardware.Interfaces.Ports.SerialPorts
/// e.g. "Slot:1, Port:COM4, Protocol:Request, Type:IrDA -"
/// </summary>
public String Ident;
/// <summary>
/// ctor for SerialComPort with and full constructed <see cref="T:System.IO.Ports.SerialPort" /> properties
/// </summary>
@ -94,7 +94,7 @@ namespace Xylem.Common.Hardware.Interfaces.Ports.SerialPorts
//assign thread to loop
_receiveThread = new Thread(ReadingThreadLoop) { Name = $"{Ident} Reading thread" };
_asciiDataLogger = NLogHelper.CreateOrGetMultiLogger(Ident, "", "LedRawData", "TargetLedRawDataBase", "LedRawDataBase");
_byteDataLogger = NLogHelper.CreateOrGetMultiLogger(Ident, "", "UartSerialPort", "COMBase", "BaseSerialPort");
}
@ -310,40 +310,40 @@ namespace Xylem.Common.Hardware.Interfaces.Ports.SerialPorts
{
try
{
//not in test bench situation only for temp logging
if (syncMarkRecord == SyncMarkRecord.FlushBuffer)
{
FlushBuffer();
return;
}
//DecodeEveryPackage is ongoing and SkipDecoding is requested = do nothing
if (_syncMarkRecord == SyncMarkRecord.DecodeEveryPackage &&
syncMarkRecord == SyncMarkRecord.SkipDecoding)
{
return;
}
//deny intermediate record when a start or end record is requested
if (syncMarkRecord == SyncMarkRecord.DecodeIntermediate &&
(_syncMarkRecord == SyncMarkRecord.SyncEnd ||
_syncMarkRecord == SyncMarkRecord.SyncStart))
{
return;
}
//being able to detect the first incoming record after a sync is requested, the buffer is going to be flushed
//if the measurement will be started or stopped
if (syncMarkRecord == SyncMarkRecord.SyncEnd ||
syncMarkRecord == SyncMarkRecord.SyncStart ||
syncMarkRecord == SyncMarkRecord.DecodeIntermediate)
{
FlushBuffer();
}
_byteDataLogger.Info($"{Ident} Mark next incoming record as {syncMarkRecord} (was {_syncMarkRecord})");
_syncMarkRecord = syncMarkRecord;
//not in test bench situation only for temp logging
if (syncMarkRecord == SyncMarkRecord.FlushBuffer)
{
FlushBuffer();
return;
}
//DecodeEveryPackage is ongoing and SkipDecoding is requested = do nothing
if (_syncMarkRecord == SyncMarkRecord.DecodeEveryPackage &&
syncMarkRecord == SyncMarkRecord.SkipDecoding)
{
return;
}
//deny intermediate record when a start or end record is requested
if (syncMarkRecord == SyncMarkRecord.DecodeIntermediate &&
(_syncMarkRecord == SyncMarkRecord.SyncEnd ||
_syncMarkRecord == SyncMarkRecord.SyncStart))
{
return;
}
//being able to detect the first incoming record after a sync is requested, the buffer is going to be flushed
//if the measurement will be started or stopped
if (syncMarkRecord == SyncMarkRecord.SyncEnd ||
syncMarkRecord == SyncMarkRecord.SyncStart ||
syncMarkRecord == SyncMarkRecord.DecodeIntermediate)
{
FlushBuffer();
}
_byteDataLogger.Info($"{Ident} Mark next incoming record as {syncMarkRecord} (was {_syncMarkRecord})");
_syncMarkRecord = syncMarkRecord;
}
catch (Exception ex)
{
@ -650,6 +650,9 @@ namespace Xylem.Common.Hardware.Interfaces.Ports.SerialPorts
}
}
_serialPort.Write(txByteList.ToArray(), 0, txByteList.Count);
_serialPort.BaseStream.Flush();
OnRawRecordSendOut?.Invoke(this, new ListBytePortDataEventArgs(txByteList, DateTimeOffset.UtcNow));
}

View File

@ -26,14 +26,17 @@ namespace Xylem.Common.Hardware.Interfaces.Ports.SerialPorts
{
//send wake up burst with two 0xF0 byte
//var wakeUpBurst = new Byte[] { 0xF0, 0xF0 };
var wakeUpBurst = new Byte[] { 0x01, 0x01, 0x01, 0x01 };
var wakeUpBurst = new Byte[] { 0x01, 0x01, 0x01, 0x01, };
var delayPattern = new Byte[] { 0x0F, 0x0F, 0x0F, 0x0F , 0x0F, 0x0F, 0x0F, 0x0F };
PhysicalWrite(wakeUpBurst);
//delay at least 1ms
Thread.Sleep(1);
//delay at least 500 µs with 0f *8
//PhysicalWrite(delayPattern);
//Thread.Sleep(1);
//send the IrDA record
PhysicalWrite(tx);
}
}
}
}

View File

@ -1,5 +1,6 @@
using System;
using System.IO.Ports;
using NLog;
using Xylem.Common.Hardware.Interfaces.Ports.PortCore;
namespace Xylem.Common.Hardware.Interfaces.Ports.SerialPorts
@ -17,5 +18,11 @@ namespace Xylem.Common.Hardware.Interfaces.Ports.SerialPorts
{
throw new NotSupportedException("Led port does not support writing");
}
public ILogger GetRawLogger()
{
return _asciiDataLogger;
}
}
}

View File

@ -56,6 +56,46 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'PerformTest|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\PerformTest\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == '_MANUAL_CONTROL|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\_MANUAL_CONTROL\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\..\..\..\packages\NLog.4.6.7\lib\net40-client\NLog.dll</HintPath>

View File

@ -52,6 +52,46 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<LangVersion>7.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'PerformTest|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\PerformTest\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == '_MANUAL_CONTROL|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\_MANUAL_CONTROL\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\..\..\..\..\packages\NLog.4.5.6\lib\net45\NLog.dll</HintPath>

View File

@ -91,6 +91,46 @@
<ErrorReport>prompt</ErrorReport>
<LangVersion>7.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRules>-Microsoft.Design#CA1021;-Microsoft.Design#CA1031;-Microsoft.Design#CA1002;-Microsoft.Design#CA1014;-Microsoft.Design#CA1024;-Microsoft.Usage#CA1801</CodeAnalysisRules>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'PerformTest|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\PerformTest\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRules>-Microsoft.Design#CA1021;-Microsoft.Design#CA1031;-Microsoft.Design#CA1002;-Microsoft.Design#CA1014;-Microsoft.Design#CA1024;-Microsoft.Usage#CA1801</CodeAnalysisRules>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == '_MANUAL_CONTROL|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\_MANUAL_CONTROL\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRules>-Microsoft.Design#CA1021;-Microsoft.Design#CA1031;-Microsoft.Design#CA1002;-Microsoft.Design#CA1014;-Microsoft.Design#CA1024;-Microsoft.Usage#CA1801</CodeAnalysisRules>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<ItemGroup>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\..\..\..\..\packages\NLog.4.6.7\lib\net45\NLog.dll</HintPath>

View File

@ -92,6 +92,49 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<LangVersion>7.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'PerformTest|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\PerformTest\</OutputPath>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == '_MANUAL_CONTROL|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\_MANUAL_CONTROL\</OutputPath>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\..\..\..\..\packages\NLog.4.6.7\lib\net45\NLog.dll</HintPath>

View File

@ -47,6 +47,18 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Release\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == '_MANUAL_CONTROL|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\_MANUAL_CONTROL\</OutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />

View File

@ -225,6 +225,7 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RadioConfigurationParams.cs" />
<Compile Include="RegisterToDb.cs" />
<Compile Include="TempTofCalc.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">

View File

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages
{
public struct TempTofCalc
{
private DateTime refDate;
private double refTemp;
private double tof;
public DateTime RefDate { get => refDate; set => refDate = value; }
public double RefTemp { get => refTemp; set => refTemp = value; }
public double Tof { get => tof; set => tof = value; }
}
}

View File

@ -46,6 +46,36 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == '_MANUAL_CONTROL|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\_MANUAL_CONTROL\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\..\..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>

View File

@ -507,6 +507,29 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
((LedSerialPort)StreamingPort).Ident = streamingIdent;
((LedSerialPort)StreamingPort).RefreshLogger();
if (!string.IsNullOrEmpty(SerialNumber) && CurrentActionText.Contains("PG"))
{
var pathMain = NLogHelper.GetPath(_logger);
var pathRaw = NLogHelper.GetPath(((LedSerialPort)StreamingPort).GetRawLogger());
var basePath = Path.GetDirectoryName(pathMain);
//
var testRunString = CurrentActionText.Replace("PG", "");
var lastChat = pathMain.LastIndexOf('\\');
pathMain = pathMain.Substring(lastChat + 1);
pathRaw = Path.GetFileName(pathRaw);
var tmpUrl = $"http://10.49.40.25/MeterProcessState/api/TestBench/SetMeterLogPathInfo?SerialNumber={SerialNumber}&TestRunId={testRunString}&BasePath={basePath}&MainLogName={pathMain}&LEDName={pathRaw}";
_logger.Debug($"Request Url: { tmpUrl}");
//ToDO: Update to service URl
LocalWebRequest.GetRequest(tmpUrl);
}
}
}
@ -916,6 +939,8 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
{
var responseJson = sr.ReadToEnd();
autoPassword = responseJson.Trim('"');
}
_logger.Info($"Slot:{Slot} - Got password from GenesisPasswordServiceUrl, URL({url})");
}
@ -935,6 +960,65 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
}
/// <inheritdoc />
/// <remarks date="2018JAN08" author="drabesch">
/// Get password from server
/// </remarks>
public Boolean QuickLogin()
{
var url = ServiceUrls.GenesisGetPasswordServiceUrl();
String autoPassword;
//without PCB ID it is not possible to login
var firstPcbId = GetPcbId();
if (string.IsNullOrEmpty(firstPcbId) || firstPcbId.Count() < 8)
{
if (firstPcbId.Count() < 8)
{
Thread.Sleep(250);
}
if (string.IsNullOrEmpty(GetPcbId()))
{
return false;
}
}
url = url + PcbId;
try
{
//use
var http = (HttpWebRequest)WebRequest.Create(url);
var response = (HttpWebResponse)http.GetResponse();
var responseStream = response.GetResponseStream();
if (responseStream == null)
{
throw new InvalidOperationException();
}
using (var sr = new StreamReader(responseStream))
{
var responseJson = sr.ReadToEnd();
autoPassword = responseJson.Trim('"');
}
_logger.Info($"Slot:{Slot} - Got password from GenesisPasswordServiceUrl, URL({url})");
}
catch (Exception ex)
{
_logger.Info($"Slot:{Slot} - Cannot get password from GenesisPasswordService, " +
$"URL({url}), Error({ex.Message})");
var listOfOfflinePasswords = JsonConvert.DeserializeObject<List<OfflinePasswordItem>>(File.ReadAllText(ProgramConfig.OfflineInfoFile));
autoPassword = listOfOfflinePasswords.First(x => x.PcbId == PcbId)?.Password;
if (!string.IsNullOrEmpty(autoPassword))
{
_logger.Info($"Slot:{Slot} - Got password from password file!");
}
}
return Login(autoPassword, true, true);
}
private class OfflinePasswordItem
{
public OfflinePasswordItem(String pcbId, String password)
@ -975,7 +1059,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
/// <remarks date="2021-Feb-02" author="Thomas Wiedebusch">
/// - Avoid retries during login, a retry will lock the Genesis for 2s, 4s, 8s, 16s and so on.
/// </remarks>
private Boolean Login(String password, Boolean runImmediately)
private Boolean Login(String password, Boolean runImmediately, bool quickLogin = false)
{
var backupRetries = CommunicationConfig.RequestRetries;
@ -1001,13 +1085,23 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
StartKeepSession();
if (quickLogin)
{
WriteRegister(Register.Mertrologyasst.PulseMode, 0, true, true);
WriteRegister(Register.Sensusradio.WakeupInterval, 6, true, true);
WriteRegister("SENSUSRADIO_SystemState", 1, true, true);
}
if (_configuration != null && !_configuration.ProductionMode)
{
IsDevelopmentUsage = true;
}
ReadMeterFirmwareAndAssignRegisters();
}
else
{
@ -1071,6 +1165,11 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
/// </remarks>
private void ReadMeterFirmwareAndAssignRegisters()
{
//if (true)
//{
// return;
//}
//avoid overwriting of list if this already exits
if (MeterAppListVersion.Any())
{
@ -1085,34 +1184,43 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
UInt16 readFwCrc = 0;
var isInstalled = false;
var versionString = "";
//write the application Id to check presence register
if (WriteRegister(Register.System.CheckFwPresence, appVersionToRead.AppId))
var recount = 4;
while (recount > 0)
{
//read version, skip retries on SYSTEM 0x04-> FW nor present is a valid feedback
var readFwVersionBytes = ReadRegister(Register.System.CheckFwPresence, 4, 0x04);
recount = recount - 1;
//the FW version as Uint32 will be used for comparison with the configuration.json
if (readFwVersionBytes != null && readFwVersionBytes.Length > 0)
if (WriteRegister(Register.System.CheckFwPresence, appVersionToRead.AppId))
{
readFwVersion = (UInt32)(((readFwVersionBytes[1] & 0xF0) >> 4) * 10 +
(readFwVersionBytes[1] & 0x0F)) * 100;
readFwVersion += (UInt32)(((readFwVersionBytes[0] & 0xF0) >> 4) * 10 +
(readFwVersionBytes[0] & 0x0F));
//build the version string, because e.g. FLEXNETVERSION is one application which does not
//follow the same rule. After the upper conversion, the hexadecimal outline will be lost
versionString = BuildFwVersionString(readFwVersionBytes[1], readFwVersionBytes[0]);
if (readFwVersion != 0)
//read version, skip retries on SYSTEM 0x04-> FW nor present is a valid feedback
var readFwVersionBytes = ReadRegister(Register.System.CheckFwPresence, 4, 0x04);
//the FW version as Uint32 will be used for comparison with the configuration.json
if (readFwVersionBytes != null && readFwVersionBytes.Length > 0)
{
isInstalled = true;
//write application Id to CRC register
if (WriteRegister(Register.System.CheckFwCrc, appVersionToRead.AppId))
readFwVersion = (UInt32)(((readFwVersionBytes[1] & 0xF0) >> 4) * 10 +
(readFwVersionBytes[1] & 0x0F)) * 100;
readFwVersion += (UInt32)(((readFwVersionBytes[0] & 0xF0) >> 4) * 10 +
(readFwVersionBytes[0] & 0x0F));
//build the version string, because e.g. FLEXNETVERSION is one application which does not
//follow the same rule. After the upper conversion, the hexadecimal outline will be lost
versionString = BuildFwVersionString(readFwVersionBytes[1], readFwVersionBytes[0]);
if (readFwVersion != 0)
{
readFwCrc = RegisterConverter.ConvertTo<UInt16>(ReadRegister(Register.System.CheckFwCrc));
isInstalled = true;
//write application Id to CRC register
if (WriteRegister(Register.System.CheckFwCrc, appVersionToRead.AppId))
{
readFwCrc = RegisterConverter.ConvertTo<UInt16>(ReadRegister(Register.System.CheckFwCrc));
}
break;
}
}
}
Thread.Sleep(250);
}
//add application always, even if this is not installed. This will be used for FW updates
@ -1526,10 +1634,36 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
_logger.Info($"Slot:{Slot} - Get PCB identification old{PcbId}");
var response = ReadRegister(Register.Configexchange.PCBSerialNumber, expectedLength);
var listPcb = new List<byte>();
if (null != response)
var HasZero = false;
var maxReads = 4;
while (!HasZero)
{
var chunk = ReadRegister(Register.Configexchange.PCBSerialNumber, 4);
maxReads = maxReads - 1;
if (chunk == null)
{
HasZero = true;
break;
}
listPcb.AddRange(chunk);
if (listPcb.Contains(0))
{
HasZero = true;
}
if (maxReads == 0)
{
break;
}
}
_logger.Info($"First read ");
if (listPcb.Any())
{
var response = listPcb.ToArray();
PcbId = Encoding.ASCII.GetString(response).Split('\0')[0];
if (PcbId.Length < 8 && retyLeft >= 1)

View File

@ -43,8 +43,6 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
//if (!SkipPrepearationForTestBench)
//{
ResetAlarm(Alarm.EMPTY_PIPE | Alarm.REBOOT);
//TODO set display unit
//TODO calculated overflow volume for display
WriteRegister<Byte>(Register.Genesisflow.SampleRate, 16, checkRegister: true);
@ -82,6 +80,9 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
WriteRegister("GENESISFLOW_DisplayPow10", (new Byte[] { 0x00, 0x00, 0x00, 0xFA }).Reverse().ToArray(), true, false);
WriteRegister(Register.Genesisflow.StoreCalibration, 1, true);
WriteRegister(Register.Genesisflow.StoreConfiguration, 1, true);
//}
//else

View File

@ -47,6 +47,36 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == '_MANUAL_CONTROL|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\_MANUAL_CONTROL\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">

View File

@ -29,7 +29,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
private Int32 _fileWriteTimeOutMs = ExtendedFileIoTimeoutMs;
private readonly GenesisMeter _currentGenesis;
private Int32 _filePointer;
public Int32 _filePointer;
private const String StrNewFileReadWriteMode = "wb+";
private const String StrOpenFileReadOnlyMode = "rb";
private const String StrOpenFileReadWriteMode = "rb+";
@ -319,37 +319,69 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
/// <remarks date="2020-Dec-10" author="Thomas Wiedebusch">
/// - Event on changed process counter.
/// </remarks>
public Boolean ReadMeterFile(String fileName, out List<Byte> readBackData, Int32 readBackCount)
public Boolean ReadMeterFile(String fileName, out List<Byte> readBackData, Int32? readBackCount = null, string OpenFileReadOnlyModeOver = null)
{
if (String.IsNullOrEmpty(OpenFileReadOnlyModeOver))
{
OpenFileReadOnlyModeOver = StrOpenFileReadOnlyMode;
}
//set processing counter
ProcessedBytesCtr = 0;
OnProcessUpdate?.Invoke(this, new ProcessExecEventArgs("", 0));
readBackData = new List<Byte>();
var returnValue = OpenMeterFile(fileName, StrOpenFileReadOnlyMode);
var returnValue = OpenMeterFile(fileName, OpenFileReadOnlyModeOver);
if (returnValue)
{
// optical.fseek(handle, 0, 2)
//numbytes = optical.ftell(handle)
//optical.fseek(handle, 0, 0)
//set register write retries to 0 to avoid doubling of records
CommunicationConfig.RequestRetries = 0;
_currentGenesis.TransmitProtocol.SetResponseTimeout(ExtendedFileIoTimeoutMs);
int fixedReadBackCount;
if (readBackCount.HasValue)
{
fixedReadBackCount = readBackCount.Value;
}
else
{
_currentGenesis.WriteRegister("CONFIGEXCHANGE_FSeek", _filePointer, false);
_currentGenesis.WriteRegister("CONFIGEXCHANGE_FSeek", 0, false);
_currentGenesis.WriteRegister("CONFIGEXCHANGE_FSeek", 2, false);
_currentGenesis.WriteRegister("CONFIGEXCHANGE_FTell", _filePointer, false);
fixedReadBackCount = RegisterConverter.ConvertTo<Int32>(_currentGenesis.ReadRegister("CONFIGEXCHANGE_FTell")) + 1;
_currentGenesis.WriteRegister("CONFIGEXCHANGE_FSeek", _filePointer, false);
_currentGenesis.WriteRegister("CONFIGEXCHANGE_FSeek", 0, false);
_currentGenesis.WriteRegister("CONFIGEXCHANGE_FSeek", 0, false);
}
//write size to 1
_currentGenesis.WriteRegister(Register.Configexchange.FileRead, 1, false);
//write counts to expected length
_currentGenesis.WriteRegister(Register.Configexchange.FileRead, readBackCount, false);
_currentGenesis.WriteRegister(Register.Configexchange.FileRead, fixedReadBackCount, false);
//write file pointer
_currentGenesis.WriteRegister(Register.Configexchange.FileRead, _filePointer);
//the preceding routine needs to wait for response, else this is always true!
while (readBackCount > 0 && returnValue)
while (fixedReadBackCount > 0 && returnValue)
{
returnValue = _stopProcess;
var remainingData = RegisterConverter.ConvertTo<Int32>(
_currentGenesis.ReadRegister(Register.Configexchange.FileRead));
readBackCount = remainingData > 0 ? readBackCount - remainingData : 0;
fixedReadBackCount = remainingData > 0 ? fixedReadBackCount - remainingData : 0;
while (remainingData > 0)
{
@ -410,8 +442,8 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
{
// remind entry key as this will be changed with the read back
var lastKey = key;
var searchPattern = drive + wildcard;
//\\logindex".format(drive)
var searchPattern = wildcard + drive;
_currentGenesis.WriteRegister(Register.Configexchange.Catalogue, searchPattern);
_currentGenesis.WriteRegister(Register.Configexchange.Catalogue, key);
@ -711,7 +743,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
/// - Retries changed for and back,
/// - Timeout changed for and back.
/// </remarks>
private Boolean OpenMeterFile(String fileName, String accessMode)
public Boolean OpenMeterFile(String fileName, String accessMode)
{
//check if logged on to meter and access level is as expected
if (_currentGenesis == null || !_currentGenesis.IsLoggedOn) return false;

View File

@ -74,12 +74,12 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
private const Int32 FileWriteRetries = 0;
//trigger update retries
private const Int32 TriggerWriteRetries = 2;
//retry of entire update procedure
private const Int32 UpdateProcedureRetries = 5;
//threshold to increase the file write timing
private const Int32 IncreaseTimeoutUpdateProcedureRetries = 4;
//retry threshold for retry of entire file instead of single file parts to minimize fragmentation
private const Int32 RetryEntireFileAfterFailedPartialRetries = 3;
@ -164,7 +164,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
/// Register subset needed to adjust for update performance content before update
/// </summary>
private readonly Dictionary<String, Byte[]> _registersBeforeUpdate = new Dictionary<String, Byte[]>();
/// <summary>
/// Register to restore after update
/// </summary>
@ -235,20 +235,27 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
/// </remarks>
public MeterFwUpdate(GenesisMeter genesisMeter)
{
if (genesisMeter == null) return;
if (genesisMeter == null)
{
return;
}
AssignGenesis(genesisMeter);
if (genesisMeter.MeterAppListVersion.Any(f => f.AppName == "GENESISFLOW" && f.IsInstalled))
{
_registersBeforeUpdate.Add(Register.Genesisflow.LedMode, new[] {(Byte) LedMode.Off});
_registersBeforeUpdate.Add(Register.Genesisflow.SampleRate, new Byte[] {1});
_registersBeforeUpdate.Add(Register.Genesisflow.LedMode, new[] { (Byte)LedMode.Off });
_registersBeforeUpdate.Add(Register.Genesisflow.SampleRate, new Byte[] { 1 });
}
if (genesisMeter.MeterAppListVersion.Any(f => f.AppName == "METROLOGYASST" && f.IsInstalled))
{
_registersBeforeUpdate.Add(Register.Mertrologyasst.PulseMode, new Byte[] { 0 });
}
//deny access if NA product, because this does not have the radio app installed
if (genesisMeter.MeterAppListVersion.Any(f => f.AppName == "SENSUSRADIO" && f.IsInstalled))
{
_registersBeforeUpdate.Add(Register.Sensusradio.WakeupInterval, new Byte[] { 6 });
}
}
/// <summary>
@ -283,7 +290,11 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
_failedFileAppsParts.Clear();
_updatedMeterApps.Clear();
FileApps.Clear();
if (_meterFile == null) return;
if (_meterFile == null)
{
return;
}
_meterFile.OnProcessUpdate -= ProcessUpdate_Event;
_meterFile = null;
}
@ -339,7 +350,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
? DisplayCodes.FwUpToDate
: DisplayCodes.FwUpdateFailed, false);
}
}
@ -944,7 +955,11 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
_fwUpdateState = FwUpdateState.Idle;
_meterFile = new MeterFile(_genesisMeter);
if (_meterFile != null) _meterFile.OnProcessUpdate += ProcessUpdate_Event;
if (_meterFile != null)
{
_meterFile.OnProcessUpdate += ProcessUpdate_Event;
}
_genesisMeter?.ReLogin();
_genesisMeter?.SetProcessState(DisplayCodes.FwUpdateActive, false);
@ -992,7 +1007,11 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
/// </remarks>
public Boolean ExitPreparation(Boolean returnValue)
{
if (_meterFile != null) _meterFile.OnProcessUpdate -= ProcessUpdate_Event;
if (_meterFile != null)
{
_meterFile.OnProcessUpdate -= ProcessUpdate_Event;
}
_meterFile = null;
ReestablishMeterFileSystem();
_genesisMeter?.Logout();
@ -1164,13 +1183,18 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
foreach (var fileName in fileNames)
{
var fileApplication = new FileApplications(fileName)
if (!fileName.Contains("_complete.bin"))
{
BinData = new List<Byte>(File.ReadAllBytes(fileName))
};
//add always to package files for later analysis
FileApps.Add(fileApplication);
var fileApplication = new FileApplications(fileName)
{
BinData = new List<Byte>(File.ReadAllBytes(fileName))
};
//add always to package files for later analysis
FileApps.Add(fileApplication);
}
}
return SetLoadedFiles();
@ -1246,7 +1270,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
_remainingFileAppsParts.Clear();
_succeededFileAppsParts.Clear();
_failedFileAppsParts.Clear();
return returnValue;
return true;
}
/// <summary>
@ -1893,7 +1917,10 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
public Boolean CheckCoreRevision(String coreVersionString)
{
if (null == CoreRevisionMaximum || null == CoreRevisionMinimum || null == coreVersionString ||
null == _packageDescriptionFile) return false;
null == _packageDescriptionFile)
{
return false;
}
var meterCoreRevision = ExtractVersionFromString(coreVersionString);
return meterCoreRevision >= CoreRevisionMinimum && meterCoreRevision <= CoreRevisionMaximum;
@ -1924,14 +1951,22 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
var idx = 0;
for (; idx < strResults.Length - 1; idx++)
{
if (string.IsNullOrEmpty(strResults[idx])) continue;
if (string.IsNullOrEmpty(strResults[idx]))
{
continue;
}
majorVersion = int.Parse(strResults[idx]);
break;
}
for (; idx < strResults.Length; idx++)
{
if (string.IsNullOrEmpty(strResults[idx])) continue;
if (string.IsNullOrEmpty(strResults[idx]))
{
continue;
}
minorVersion = int.Parse(strResults[idx]);
}
var version = majorVersion * MajorMultiply + minorVersion;

View File

@ -34,6 +34,24 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />

View File

@ -88,6 +88,17 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.Registers
{
var reg = GetRegisterDefinitionByName(register);
if (!MeterRegisterDic.ContainsKey(reg)) return null;
if (MeterRegisterDic.Count(f => f.Key.GetIdent() == register) > 1)
{
if (MeterRegisterDic.Any(f => f.Key.GetIdent() == register && f.Value != null))
{
var regDs = MeterRegisterDic.Last(f => f.Key.GetIdent() == register && f.Value != null);
return regDs.Value;
}
}
var regD = MeterRegisterDic.First(f => f.Key.GetIdent() == register);
return regD.Value;
}

View File

@ -46,6 +46,36 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == '_MANUAL_CONTROL|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\_MANUAL_CONTROL\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\..\..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>

View File

@ -122,9 +122,9 @@ namespace Xylem.Common.Hardware.WaterMeter.WaterMeterCore
/// <inheritdoc />
public void RemoveMeter(IMeter meterToRemove)
{
meterToRemove.DisposeMeter();
meterToRemove?.DisposeMeter();
_listOfMeters.Remove(meterToRemove);
_logger.Info($"Slot:{ meterToRemove.Slot} - Meter removed from batch");
_logger.Info($"Slot:{ meterToRemove?.Slot} - Meter removed from batch");
}
/// <inheritdoc />

View File

@ -46,6 +46,36 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<LangVersion>7.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == '_MANUAL_CONTROL|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\_MANUAL_CONTROL\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\..\..\..\packages\NLog.4.5.6\lib\net40-client\NLog.dll</HintPath>

View File

@ -40,6 +40,26 @@
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />

View File

@ -628,6 +628,162 @@ namespace Xylem.Common.Logic.ProductionOrderCore.KitronTestResults
[JsonProperty("RFRemeasurePower Loop_8")]
public string RFRemeasurePowerLoop8 { get; set; }
public string TestID { get; set; }
[JsonProperty("ResultCalibration Loop_9")]
public string ResultCalibrationLoop9 { get; set; }
[JsonProperty("LengthCode Loop_9")]
public string LengthCodeLoop9 { get; set; }
[JsonProperty("RunCalibrate Loop_9")]
public string RunCalibrateLoop9 { get; set; }
[JsonProperty("RFCalibrationCurrent Loop_9")]
public string RFCalibrationCurrentLoop9 { get; set; }
[JsonProperty("RFCalibrationPower Loop_9")]
public string RFCalibrationPowerLoop9 { get; set; }
[JsonProperty("PowerlevelReference Loop_9")]
public string PowerlevelReferenceLoop9 { get; set; }
[JsonProperty("PowerLevelCalculated Loop_9")]
public string PowerLevelCalculatedLoop9 { get; set; }
[JsonProperty("AntennaMatching Loop_9")]
public string AntennaMatchingLoop9 { get; set; }
[JsonProperty("LookupTableCSV Loop_9")]
public string LookupTableCSVLoop9 { get; set; }
[JsonProperty("RunRemeasure Loop_9")]
public string RunRemeasureLoop9 { get; set; }
[JsonProperty("ResultRFRemeasure Loop_9")]
public string ResultRFRemeasureLoop9 { get; set; }
[JsonProperty("RFRemeasureCurrent Loop_9")]
public string RFRemeasureCurrentLoop9 { get; set; }
[JsonProperty("RFRemeasurePower Loop_9")]
public string RFRemeasurePowerLoop9 { get; set; }
[JsonProperty("ResultCalibration Loop_10")]
public string ResultCalibrationLoop10 { get; set; }
[JsonProperty("LengthCode Loop_10")]
public string LengthCodeLoop10 { get; set; }
[JsonProperty("RunCalibrate Loop_10")]
public string RunCalibrateLoop10 { get; set; }
[JsonProperty("RFCalibrationCurrent Loop_10")]
public string RFCalibrationCurrentLoop10 { get; set; }
[JsonProperty("RFCalibrationPower Loop_10")]
public string RFCalibrationPowerLoop10 { get; set; }
[JsonProperty("PowerlevelReference Loop_10")]
public string PowerlevelReferenceLoop10 { get; set; }
[JsonProperty("PowerLevelCalculated Loop_10")]
public string PowerLevelCalculatedLoop10 { get; set; }
[JsonProperty("AntennaMatching Loop_10")]
public string AntennaMatchingLoop10 { get; set; }
[JsonProperty("LookupTableCSV Loop_10")]
public string LookupTableCSVLoop10 { get; set; }
[JsonProperty("RunRemeasure Loop_10")]
public string RunRemeasureLoop10 { get; set; }
[JsonProperty("ResultRFRemeasure Loop_10")]
public string ResultRFRemeasureLoop10 { get; set; }
[JsonProperty("RFRemeasureCurrent Loop_10")]
public string RFRemeasureCurrentLoop10 { get; set; }
[JsonProperty("RFRemeasurePower Loop_10")]
public string RFRemeasurePowerLoop10 { get; set; }
[JsonProperty("ResultCalibration Loop_11")]
public string ResultCalibrationLoop11 { get; set; }
[JsonProperty("LengthCode Loop_11")]
public string LengthCodeLoop11 { get; set; }
[JsonProperty("RunCalibrate Loop_11")]
public string RunCalibrateLoop11 { get; set; }
[JsonProperty("RFCalibrationCurrent Loop_11")]
public string RFCalibrationCurrentLoop11 { get; set; }
[JsonProperty("RFCalibrationPower Loop_11")]
public string RFCalibrationPowerLoop11 { get; set; }
[JsonProperty("PowerlevelReference Loop_11")]
public string PowerlevelReferenceLoop11 { get; set; }
[JsonProperty("PowerLevelCalculated Loop_11")]
public string PowerLevelCalculatedLoop11 { get; set; }
[JsonProperty("AntennaMatching Loop_11")]
public string AntennaMatchingLoop11 { get; set; }
[JsonProperty("LookupTableCSV Loop_11")]
public string LookupTableCSVLoop11 { get; set; }
[JsonProperty("RunRemeasure Loop_11")]
public string RunRemeasureLoop11 { get; set; }
[JsonProperty("ResultRFRemeasure Loop_11")]
public string ResultRFRemeasureLoop11 { get; set; }
[JsonProperty("RFRemeasureCurrent Loop_11")]
public string RFRemeasureCurrentLoop11 { get; set; }
[JsonProperty("RFRemeasurePower Loop_11")]
public string RFRemeasurePowerLoop11 { get; set; }
[JsonProperty("ResultCalibration Loop_12")]
public string ResultCalibrationLoop12 { get; set; }
[JsonProperty("LengthCode Loop_12")]
public string LengthCodeLoop12 { get; set; }
[JsonProperty("RunCalibrate Loop_12")]
public string RunCalibrateLoop12 { get; set; }
[JsonProperty("RFCalibrationCurrent Loop_12")]
public string RFCalibrationCurrentLoop12 { get; set; }
[JsonProperty("RFCalibrationPower Loop_12")]
public string RFCalibrationPowerLoop12 { get; set; }
[JsonProperty("PowerlevelReference Loop_12")]
public string PowerlevelReferenceLoop12 { get; set; }
[JsonProperty("PowerLevelCalculated Loop_12")]
public string PowerLevelCalculatedLoop12 { get; set; }
[JsonProperty("AntennaMatching Loop_12")]
public string AntennaMatchingLoop12 { get; set; }
[JsonProperty("LookupTableCSV Loop_12")]
public string LookupTableCSVLoop12 { get; set; }
[JsonProperty("RunRemeasure Loop_12")]
public string RunRemeasureLoop12 { get; set; }
[JsonProperty("ResultRFRemeasure Loop_12")]
public string ResultRFRemeasureLoop12 { get; set; }
[JsonProperty("RFRemeasureCurrent Loop_12")]
public string RFRemeasureCurrentLoop12 { get; set; }
[JsonProperty("RFRemeasurePower Loop_12")]
public string RFRemeasurePowerLoop12 { get; set; }
}
public class Root

View File

@ -271,7 +271,7 @@ namespace Xylem.Common.Logic.ProductionOrderCore.KitronTestResults
}
alternateReturnObj.StartDt = newFromat.JsonObject.StartDT;
alternateReturnObj.TestStepLoopCalibrate = new TestStep();
alternateReturnObj.TestStepLoopCalibrate.Values = new Value[8];
alternateReturnObj.TestStepLoopCalibrate.Values = new Value[12];
var add = new Xylem.Common.Logic.ProductionOrderCore.KitronTestResults.Value();
add.ResultCalibration = newFromat.JsonObject.ResultCalibrationLoop1;
@ -362,8 +362,64 @@ namespace Xylem.Common.Logic.ProductionOrderCore.KitronTestResults
return alternateReturnObj;
var add9 = new Xylem.Common.Logic.ProductionOrderCore.KitronTestResults.Value();
add9.ResultCalibration = newFromat.JsonObject.ResultCalibrationLoop9;
add9.LengthCode = newFromat.JsonObject.LengthCodeLoop9;
add9.SLookupTablePower = newFromat.JsonObject.AttachmentFile.ToLower();
add9.IPowerLevelCalculated = newFromat.JsonObject.PowerLevelCalculatedLoop9;
add9.IAntennaMatching = newFromat.JsonObject.AntennaMatchingLoop9;
if (add9.ResultCalibration == null)
{
return alternateReturnObj;
}
alternateReturnObj.TestStepLoopCalibrate.Values.SetValue(add9, 8);
var add10 = new Xylem.Common.Logic.ProductionOrderCore.KitronTestResults.Value();
add10.ResultCalibration = newFromat.JsonObject.ResultCalibrationLoop10;
add10.LengthCode = newFromat.JsonObject.LengthCodeLoop10;
add10.SLookupTablePower = newFromat.JsonObject.AttachmentFile.ToLower();
add10.IPowerLevelCalculated = newFromat.JsonObject.PowerLevelCalculatedLoop10;
add10.IAntennaMatching = newFromat.JsonObject.AntennaMatchingLoop10;
if (add10.ResultCalibration == null)
{
return alternateReturnObj;
}
alternateReturnObj.TestStepLoopCalibrate.Values.SetValue(add10, 9);
var add11 = new Xylem.Common.Logic.ProductionOrderCore.KitronTestResults.Value();
add11.ResultCalibration = newFromat.JsonObject.ResultCalibrationLoop11;
add11.LengthCode = newFromat.JsonObject.LengthCodeLoop11;
add11.SLookupTablePower = newFromat.JsonObject.AttachmentFile.ToLower();
add11.IPowerLevelCalculated = newFromat.JsonObject.PowerLevelCalculatedLoop11;
add11.IAntennaMatching = newFromat.JsonObject.AntennaMatchingLoop11;
if (add11.ResultCalibration == null)
{
return alternateReturnObj;
}
alternateReturnObj.TestStepLoopCalibrate.Values.SetValue(add11, 10);
var add12 = new Xylem.Common.Logic.ProductionOrderCore.KitronTestResults.Value();
add12.ResultCalibration = newFromat.JsonObject.ResultCalibrationLoop12;
add12.LengthCode = newFromat.JsonObject.LengthCodeLoop12;
add12.SLookupTablePower = newFromat.JsonObject.AttachmentFile.ToLower();
add12.IPowerLevelCalculated = newFromat.JsonObject.PowerLevelCalculatedLoop12;
add12.IAntennaMatching = newFromat.JsonObject.AntennaMatchingLoop12;
if (add12.ResultCalibration == null)
{
return alternateReturnObj;
}
alternateReturnObj.TestStepLoopCalibrate.Values.SetValue(add12, 11);
return alternateReturnObj;
}

View File

@ -65,8 +65,19 @@ namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
ret.Add(new ProgrammingParameters("SENSUSRADIO_ImpedanceCodeOption", BitConverter.GetBytes(radioParams.ImpedanceCodeOption).Reverse().ToArray()));
}
if (orderNr == 3144128)
{
orderNr = 3179323;
}
if (orderNr == 3148219)
{
orderNr = 3179323;
}
var rawVako = VakoDbAdapter.GetRawVako(connectionString, orderNr);
var rawMapping = VakoDbAdapter.GetVakoMapping(connectionString, rawVako.Type);
var vakoData = VakoParser.Parse(rawVako, rawMapping);
@ -131,7 +142,7 @@ namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
}
}
var retStr = LocalWebRequest.GetRequest($"http://sla12iis01/csdcore/csdservice/getstampings?CsdIdent={CsdIdent}&GroupId=1&ProductIdent=GNS&ProductDn={rawVako.Dn}&ShowOnlyValidStampings=0");
var retStr = LocalWebRequest.GetRequest($"http://sla12iis01/csdcore/csdservice/getstampings?CsdIdent={CsdIdent}&GroupId=1&ProductIdent=GNS&ProductDn={rawVako.Dn}&ShowOnlyValidStampings=0", 8000);
var retListRealCsd = JsonConvert.DeserializeObject<List<CsdParameterResult>>(retStr);
if (retListRealCsd.Any())
{

View File

@ -102,13 +102,17 @@ namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
var a = radioTestResult.TestStepLoopCalibrate.Values.Where(w => w.ResultCalibration.ToLower() == "ok" && w.LengthCode.StartsWith($"DN{dnString}") && w.LengthCode.Contains($"-{LengthString}{pressure}") && !w.LengthCode.Contains($"-{LengthString}{pressure}o")).ToList();
var ao = radioTestResult.TestStepLoopCalibrate.Values.Where(w => w.ResultCalibration.ToLower() == "ok" && w.LengthCode.StartsWith($"DN{dnString}") && w.LengthCode.Contains($"-{LengthString}{pressure}o")).ToList();
var a = radioTestResult.TestStepLoopCalibrate.Values.Where(w => w != null && ( w.ResultCalibration.ToLower() == "ok" && w.LengthCode.StartsWith($"DN{dnString}") && w.LengthCode.Contains($"-{LengthString}{pressure}") && !w.LengthCode.Contains($"-{LengthString}{pressure}o"))).ToList();
var ao = radioTestResult.TestStepLoopCalibrate.Values.Where(w => w != null && (w.ResultCalibration.ToLower() == "ok" && w.LengthCode.StartsWith($"DN{dnString}") && w.LengthCode.Contains($"-{LengthString}{pressure}o"))).ToList();
var snb = new List<string>();
foreach (var lengthItem in radioTestResult.TestStepLoopCalibrate.Values)
{
snb.Add(lengthItem.LengthCode);
if (lengthItem != null)
{
snb.Add(lengthItem.LengthCode);
}
}
if (a.Any() && ao.Any())
@ -184,13 +188,17 @@ namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
var a = radioTestResult.TestStepLoopCalibrate.Values.Where(w => w.ResultCalibration.ToLower() == "ok" && w.LengthCode.StartsWith($"DN{dnString}") && w.LengthCode.Contains($"-{LengthString}{pressure}") && !w.LengthCode.Contains($"-{LengthString}{pressure}o")).ToList();
var ao = radioTestResult.TestStepLoopCalibrate.Values.Where(w => w.ResultCalibration.ToLower() == "ok" && w.LengthCode.StartsWith($"DN{dnString}") && w.LengthCode.Contains($"-{LengthString}{pressure}o")).ToList();
var a = radioTestResult.TestStepLoopCalibrate.Values.Where(w => w != null && (w.ResultCalibration.ToLower() == "ok" && w.LengthCode.StartsWith($"DN{dnString}") && w.LengthCode.Contains($"-{LengthString}{pressure}") && !w.LengthCode.Contains($"-{LengthString}{pressure}o"))).ToList();
var ao = radioTestResult.TestStepLoopCalibrate.Values.Where(w => w != null && (w.ResultCalibration.ToLower() == "ok" && w.LengthCode.StartsWith($"DN{dnString}") && w.LengthCode.Contains($"-{LengthString}{pressure}o"))).ToList();
var snb = new List<string>();
foreach (var lengthItem in radioTestResult.TestStepLoopCalibrate.Values)
{
snb.Add(lengthItem.LengthCode);
if (lengthItem != null)
{
snb.Add(lengthItem.LengthCode);
}
}
if (a.Any() && ao.Any())

View File

@ -42,6 +42,12 @@ namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
internalSerialNr = ret;
return true;
}
if (Scan.Length == 11 && Scan.StartsWith("10"))
{
customerSr = Scan.Substring(2, 9);
return true;
}
throw new ApplicationException("Could not parse serial number");
}

View File

@ -42,6 +42,36 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<LangVersion>7.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == '_MANUAL_CONTROL|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\_MANUAL_CONTROL\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>

View File

@ -9,11 +9,11 @@ namespace Xylem.Common.Logic.ProductionOrderCore.Vako
{
public static RawVako GetRawVako(string DbConnectionString, int FertigungsAuftragsNr)
{
using (var dataacces = new SqlDataAccess(DbConnectionString))
using (var dataacces = new SqlDataAccess(DbConnectionString))
{
var sb = new StringBuilder();
sb.AppendLine($" select ident.VakoCode, ident.Identnr,ident.Typ , ident.Nennweite,ident.Baulaenge from Auftrag.dbo.AuftragPosition_Gesamt auftraginfo ");
sb.AppendLine($" select distinct ident.VakoCode, ident.Identnr,ident.Typ , ident.Nennweite,ident.Baulaenge from Auftrag.dbo.AuftragPosition_Gesamt auftraginfo ");
sb.AppendLine($" left outer join Auftrag.dbo.Identnr ident on auftraginfo.IdentNr = ident.IdentNr ");
sb.AppendLine($" where FertigungsauftragNr = {FertigungsAuftragsNr} ");

View File

@ -42,6 +42,36 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == '_MANUAL_CONTROL|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\_MANUAL_CONTROL\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\..\packages\NLog.4.5.6\lib\net40-client\NLog.dll</HintPath>

View File

@ -42,6 +42,36 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == '_MANUAL_CONTROL|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\_MANUAL_CONTROL\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />

View File

@ -348,7 +348,10 @@ namespace ProductionUiCordonel
{
LastMsg = $"New PcbID detected {CurrentPcbID}";
CurrentProcess = "Cordonel verbunden";
CurrentGenesisMeter.Login();
CurrentGenesisMeter.QuickLogin();
}
else
{
@ -430,7 +433,9 @@ namespace ProductionUiCordonel
pc.Processes.Add(CheckOrder); //[x] [x] [x]
pc.Processes.Add(new ProductionProcessCheckSerialNumber(SerialNumber)); //[x] [x] [x]
//pc.Processes.Add(new ProductionProcessFullReadOut()); //[x] [x] [x]
//pc.Processes.Add(new ProductionProcessFullReadOut()); //[x] [x] [x]
pc.Processes.Add(new ProductionCheckShippingState()); //[x] [x] [x]
pc.Processes.Add(new ProductionProcessPasswordFile()); //[x] [x] [x]

View File

@ -381,7 +381,8 @@ namespace ProductionUiCordonel
}
ucFinalRadioTest.RadioAdress = tmpInt;
ucFinalRadioTest.SerialNumber = a[0];
ucFinalRadioTest.SerialNumber = a[0] + "/" + a[3];
}

View File

@ -0,0 +1,173 @@
using ProductionUiCordonel.ProductionProcesses.Enum;
using ProductionUiCordonel.UserControls.FinalTest;
using System;
using System.Linq;
using System.Windows.Controls;
using System.Windows.Threading;
using Xylem.Common.CommonCore.Configuration;
using Xylem.Common.Logic.SoftwareAccessHelper;
namespace ProductionUiCordonel.ProductionProcesses.Actions
{
public class ProductionCheckShippingState : BaseProductionProcess
{
private UcPlain UserControl;
public ProductionCheckShippingState()
{
name = "Prüfe versandbereitschaft des Zählers";
currentProcessState = ProductionProcessState.Waiting;
}
public override void InitUserControl()
{
UserControl = new UcPlain();
UserControl.lblHl.Content = name;
UserControl.lblText.Content = "Hydraulisch geprüft? Batterie i.O?";
}
public override UserControl GetControl()
{
if (UserControl == null)
{
throw new Exception($"UserControl {this.GetType()} not Ready");
}
return UserControl;
}
public override void ProcessDone()
{
//clear
}
private void doStartProcessLoop()
{
var reTrysLeft = 1;
while (reTrysLeft >= 0)
{
try
{
base.Progress = 0;
//var url = $"http://localhost:56011/api/FinalCheck/GetProgrammingParameters?PcbID={Meter.PcbId}";
var url = $"{ServiceUrls.MeterInfoForTestBench()}{Meter.PcbId}";
var csdRet = LocalWebRequest.GetRequest(url);
var res = Newtonsoft.Json.JsonConvert.DeserializeObject<string[]>(csdRet);
var CalibrationRun = res[4];
var LastTestBechState = 0;
bool? HyState = null;
bool? preState = null;
if (!string.IsNullOrEmpty(res[5]))
{
var tmp = 0;
int.TryParse(res[5], out tmp);
LastTestBechState = tmp;
}
if (LastTestBechState <= 20)
{
HyState = null;
}
else if (LastTestBechState <= 30)
{
HyState = true;
}
else
{
HyState = false;
}
if (!string.IsNullOrEmpty(CalibrationRun))
{
preState = true;
}
if (!HyState.HasValue || !HyState.Value)
{
UserControl.lblText.Dispatcher.Invoke(DispatcherPriority.Send,
new Action(() =>
{
UserControl.lblText.Content = $"Zähler nicht erfolgreich geprüft";
}
));
base.currentProcessState = ProductionProcessState.Error;
}
if (!preState.HasValue || !preState.Value)
{
UserControl.lblText.Dispatcher.Invoke(DispatcherPriority.Send,
new Action(() =>
{
UserControl.lblText.Content = $"Zähler nicht erfolgreich vorbehandelt";
}
));
base.currentProcessState = ProductionProcessState.Error;
}
base.Progress = 50;
var nowSeconds = Meter.ReadRegister("POWERMON_TotalUsedSeconds");
var nowCharge = Meter.ReadRegister("POWERMON_TotalUsedCharge", 8);
if (nowCharge == null)
{
UserControl.lblText.Dispatcher.Invoke(DispatcherPriority.Send,
new Action(() =>
{
UserControl.lblText.Content = $"Batterie nicht lesbar";
}
));
Meter.WriteLog($"Batterie nicht lesbar");
break;
}
var nowChargeV = BitConverter.ToUInt64(nowCharge.ToArray(), 0);
var nowSecondsV = BitConverter.ToUInt32(nowSeconds.ToArray(), 0);
//// Time Span in h in mAhr In % with one battery is 100%
////(((total used change difference / (Time span / 3600) ) / 3600000) / 19000)*100
var loadAtH = ((((double)nowChargeV / ((double)nowSecondsV / 3600)) / 3600000) / (19000 * 2)) * 100;
var totalUsed = (((double)nowChargeV / 1000000 / 3.6) / ((19000 * 2))) * 100;
//lastFrame
Meter.WriteLog($"totalUsed at EOL {totalUsed}");
if (totalUsed > 15)
{
base.currentProcessState = ProductionProcessState.Error;
UserControl.lblText.Content = $"Batterie über 15% entladen";
Meter.WriteLog($"Batterie über 15% entladen");
}
if (currentProcessState != ProductionProcessState.Error)
{
currentProcessState = ProductionProcessState.Done;
return;
}
reTrysLeft = reTrysLeft - 1;
}
catch (Exception ex)
{
Meter.WriteLog($"{ex}");
base.currentProcessState = ProductionProcessState.Error;
reTrysLeft = reTrysLeft - 1;
}
}
base.currentProcessState = ProductionProcessState.Error;
}
public override void StartProcess()
{
doStartProcessLoop();
}
}
}

View File

@ -30,13 +30,15 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
}
public bool DialogIsDone { get; private set; }
public string PcbSerialNumber { get; private set; }
public string AltRadio { get; private set; }
private bool Error = false;
public ProductionProcessCheckSerialNumber(String pcbSerialNumber)
public ProductionProcessCheckSerialNumber(String pcbSerialNumber, string altRadio = null)
{
PcbSerialNumber = pcbSerialNumber;
AltRadio = altRadio;
DialogIsDone = false;
name = "Überprüfe Seriennummer/Deckel";
currentProcessState = ProductionProcessState.Waiting;
@ -87,14 +89,21 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
}
else
{
if (PcbSerialNumber.Contains("/") && (a.Trim().Contains(PcbSerialNumber.Split('/')[0].Trim()) || a.Trim().Contains(PcbSerialNumber.Split('/')[1].Trim())))
if (PcbSerialNumber.Contains("/") && (a.Trim().Replace(" ", "").Contains(PcbSerialNumber.Split('/')[0].Trim().Replace(" ", "")) || a.Trim().Replace(" ", "").Contains(PcbSerialNumber.Split('/')[1].Trim().Replace(" ", ""))))
{
StepDone();
}
else
{
StepMismatch($"Falsche oder fehlerhafter Scan! {Environment.NewLine} Dieser Zähler müsste die ({PcbSerialNumber}) haben");
if (AltRadio != null && a.Trim().Contains(AltRadio.Trim()))
{
StepDone();
}
else
{
StepMismatch($"Falsche oder fehlerhafter Scan! {Environment.NewLine} Dieser Zähler müsste die ({PcbSerialNumber}) haben");
}
}
@ -109,7 +118,6 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
PcbSerialNumber = Meter.SerialNumber;
UserControl.SetDesc($"Bitte den Deckel des Zählers Scannern{Environment.NewLine} Die Seriennummer muss abgeglichen werden.");
UserControl.SetFocusMe();
//UserControl.Focus();
UserControl.BarcodeInput += UserControl_KeyDown;

View File

@ -70,7 +70,6 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
//var url = $"http://localhost:56011/api/FinalCheck/GetProgrammingParameters?PcbID={base.Meter.PcbId}";
var url = $"{ServiceUrls.GenesisFinalCheckServiceUrl()}GetProgrammingParameters?PcbID={base.Meter.PcbId}";
var csdRet = LocalWebRequest.GetRequest(url, 80000);
return Newtonsoft.Json.JsonConvert.DeserializeObject<IList<ProgrammingParameters>>(csdRet);
}

View File

@ -6,10 +6,8 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Controls;
using Xylem.Common.CommonCore.Configuration;
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
using Xylem.Common.Logic.ProductionOrderCore;
using Xylem.Common.Logic.SoftwareAccessHelper;
namespace ProductionUiCordonel.ProductionProcesses.Actions
{
@ -92,10 +90,10 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
{
while (connectProcess.asyncprogrammingParametersTask.Status == TaskStatus.Running)
{
Thread.Sleep(500);
}
if (connectProcess.asyncprogrammingParametersTask.Status == TaskStatus.RanToCompletion
if (connectProcess.asyncprogrammingParametersTask.Status == TaskStatus.RanToCompletion
&& connectProcess.asyncprogrammingParametersTask.Result != null
&& connectProcess.asyncprogrammingParametersTask.Result.Any())
{
@ -206,6 +204,20 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
overAllResult.Add(_currentGenesis_WriteRegister("PERIODICLOG_ResetCounter",
(new Byte[] { 0x00, 0x00, 0x00, 0x00 }).Reverse().ToArray(), true, false));
overAllResult.Add(_currentGenesis_WriteRegister("CUSTOMER_AlarmEnableMask", new byte[] { 0x00, 0x00, 0x80, 0x53 }.Reverse().ToArray(), true, false)); ;
overAllResult.Add(_currentGenesis_WriteRegister("CUSTOMER_AlarmBroadcastMask", new byte[] { 0x00, 0x00, 0x1f, 0xdc }.Reverse().ToArray(), true, false));
overAllResult.Add(_currentGenesis_WriteRegister("CUSTOMER_AlarmVisualMask", new byte[] { 0x00, 0x00, 0x1f, 0xdc }.Reverse().ToArray(), true, false));
var funkadresse = new List<byte>();
funkadresse.AddRange((new Byte[] { 0x0E, 0x9F, 0xAC, 0xC6 }).ToArray());
funkadresse.AddRange((new Byte[] { 0xA0, 0xE1, 0xEF, 0x1C }).ToArray());
funkadresse.AddRange((new Byte[] { 0x3B, 0x27, 0xA4, 0x9B }).ToArray());
funkadresse.AddRange((new Byte[] { 0xAC, 0x21, 0x65, 0x35 }).ToArray());
overAllResult.Add(_currentGenesis_WriteRegister("SENSUSRADIO_EncryptionKey", funkadresse.ToArray(), true, true));
overAllResult.Add(_currentGenesis_WriteRegister("GENESISFLOW_SealDisplay",
(new Byte[] { 0x00, 0x00, 0x00, 0x01 }).Reverse().ToArray(), true, true));
@ -217,7 +229,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
{
try
{
//Thread.Sleep(2500);
Thread.Sleep(50);
cTask.RunSynchronously();
if (cTask.Result.Item2)
{
@ -276,6 +288,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
catch (Exception ex)
{
base.currentProcessState = ProductionProcessState.Error;
base.NewStatus($"Warnung!Fehler bei behandeln {ex.Message}");
reTrysLeft = reTrysLeft - 1;
}

View File

@ -79,10 +79,17 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
//FrequencyIndicator
var freq = RegisterConverter.ConvertTo<UInt32>(Meter.ReadRegister("SENSUSRADIO_FrequencyIndicator"));
RadioAdress = RegisterConverter.ConvertTo<UInt32>(Meter.ReadRegister("SENSUSRADIO_RadioAddress"));
var enc = Meter.ReadRegister("SENSUSRADIO_EncryptionKey",16);
EncyptionKey = BitConverter.ToString(enc).Replace("-", "");
Comport = Convert.ToByte(ConfigurationManager.AppSettings[$"SirtComport{freq}"]);
//0B012188037ADDBD043CCE7018375AE9
var enc = Meter.ReadRegister("SENSUSRADIO_EncryptionKey", 16);
EncyptionKey = BitConverter.ToString(enc).Replace("-", "");
//if (freq == 868)
//{
@ -100,7 +107,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
SENSUSRADIO_WakeupInterval = Meter.ReadRegister("SENSUSRADIO_WakeupInterval");
Meter.WriteRegister("SENSUSRADIO_WakeupInterval", 0);
GetRssi();
@ -177,6 +184,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
DebugMessage($"Fehler in buttonSende_Click():\r\n{ex.Message}\r\n{ex.InnerException}", true);
}
enableBtn(UserControl.btnGetRssi, true);
}
private void clearRssi()

View File

@ -68,6 +68,28 @@
<PropertyGroup>
<StartupObject>ProductionUiCordonel.App</StartupObject>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
@ -133,6 +155,7 @@
<Compile Include="ProductionProcesses\Actions\ProductionProcessCheckSerialNumber.cs" />
<Compile Include="ProductionProcesses\Actions\ProductionProcessCheckOrderNumber.cs" />
<Compile Include="ProductionProcesses\Actions\ProductionProcessCheckAttachment.cs" />
<Compile Include="ProductionProcesses\Actions\ProductionCheckShippingState.cs" />
<Compile Include="ProductionProcesses\Actions\ProductionProcessGetFinalParameterizationVakoCsd.cs" />
<Compile Include="ProductionProcesses\Actions\ProductionProcessFinalParameterizationVakoCsd.cs" />
<Compile Include="ProductionProcesses\Actions\ProductionProcessLogOff.cs" />

View File

@ -71,6 +71,8 @@ namespace ProductionUiCordonel.UserControls.FinalTest
lblDescription.Content = v;
}
));
SetFocusMe();
}
internal void SetFocusMe()

View File

@ -66,6 +66,7 @@ namespace ProductionUiCordonel.UserControls.FinalTest
{
lblDescription.Content = v;
}
));
}

View File

@ -1,4 +1,5 @@
using Logic.ProductionToProductMapper.Cordonel;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Service.Core;
using System;
@ -105,7 +106,7 @@ namespace Service.MeterProcessState.Controllers
using (var dataacces = new SqlDataAccess(GlobalConfig.connectionString.Value))
{
var sb = new StringBuilder();
sb.AppendLine($" SELECT distinct [MapPcbIdToSerialNumber_SerialNumber],Adresse,FunkschluesselIndex ");
sb.AppendLine($" FROM [Auftrag].[dbo].[MapPcbIdToSerialNumber] pcb ");
@ -636,7 +637,7 @@ namespace Service.MeterProcessState.Controllers
//workaroudn for a year
if (!hitAmbi)
{
throw new Exception("No Radio Parameter found");
}
@ -652,7 +653,7 @@ namespace Service.MeterProcessState.Controllers
private static bool findMatchingTestResult(ref DateTime lastProdDate, string LengthString, string dnString, RadioTest radioTestResult)
{
var TestStepLoopCalibratesOk = radioTestResult.TestStepLoopCalibrate.Values.Where(w => w != null && w.ResultCalibration.ToLower() == "ok" && w.LengthCode.StartsWith($"DN{dnString}")).ToList();
var TestStepLoopCalibratesOk = radioTestResult.TestStepLoopCalibrate.Values.Where(w => w != null && w.ResultCalibration.ToLower() == "ok" && w.LengthCode.StartsWith($"DN{dnString}")).ToList();
@ -660,7 +661,7 @@ namespace Service.MeterProcessState.Controllers
//DN50-270
var a = TestStepLoopCalibratesOk.Where(w => w.ResultCalibration.ToLower() == "ok" && w.LengthCode.StartsWith($"DN{dnString}") && w.LengthCode.Contains($"-{LengthString}") && !w.LengthCode.Contains($"-{LengthString}o")).ToList();
var ao = radioTestResult.TestStepLoopCalibrate.Values.Where(w => w.ResultCalibration.ToLower() == "ok" && w.LengthCode.StartsWith($"DN{dnString}") && w.LengthCode.Contains($"-{LengthString}o")).ToList();
var ao = radioTestResult.TestStepLoopCalibrate.Values.Where(w => w != null && w.ResultCalibration.ToLower() == "ok" && w.LengthCode.StartsWith($"DN{dnString}") && w.LengthCode.Contains($"-{LengthString}o")).ToList();
if (a.Any() && ao.Any())
@ -678,109 +679,182 @@ namespace Service.MeterProcessState.Controllers
return false;
}
[Route("GetMetersizeProgrammingData"), HttpGet]
public async Task<HttpResponseMessage> GetMetersizeProgrammingData(MeterSize MeterSize)
//[Route("SetMetersizeProgrammingDataAll"), HttpGet]
//public async Task<HttpResponseMessage> SetMetersizeProgrammingDataAll()
//{
// var listOfDnParams = new Dictionary<string, UInt32>();
// listOfDnParams.Add("GENESISFLOW_LowFlowMaxPeriod", (UInt32)3932160);
// listOfDnParams.Add("GENESISFLOW_LowFlowThreshold", (UInt32)200);
// listOfDnParams.Add("GENESISFLOW_MaxValidAmplitude", (UInt32)2936012800);
// listOfDnParams.Add("GENESISFLOW_MaxValidDeltaToF", (UInt32)247390);
// listOfDnParams.Add("GENESISFLOW_MaxValidToF", (UInt32)24739011);
// listOfDnParams.Add("GENESISFLOW_MinValidAmplitude", (UInt32)629145600);
// listOfDnParams.Add("GENESISFLOW_MinValidToF", (UInt32)13743895);
// listOfDnParams.Add("GENESISFLOW_Timeout", (UInt16)1);
// await SetMetersizeProgrammingData(MeterSize.DN40, listOfDnParams);
// await SetMetersizeProgrammingData(MeterSize.US1_5, listOfDnParams);
// listOfDnParams = new Dictionary<string, UInt32>();
// listOfDnParams.Add("GENESISFLOW_LowFlowMaxPeriod", (UInt32)3932160);
// listOfDnParams.Add("GENESISFLOW_LowFlowThreshold", (UInt32)200);
// listOfDnParams.Add("GENESISFLOW_MaxValidAmplitude", (UInt32)2936012800);
// listOfDnParams.Add("GENESISFLOW_MaxValidDeltaToF", (UInt32)247390);
// listOfDnParams.Add("GENESISFLOW_MaxValidToF", (UInt32)24739011);
// listOfDnParams.Add("GENESISFLOW_MinValidAmplitude", (UInt32)629145600);
// listOfDnParams.Add("GENESISFLOW_MinValidToF", (UInt32)13743895);
// listOfDnParams.Add("GENESISFLOW_Timeout", (UInt16)1);
// await SetMetersizeProgrammingData(MeterSize.DN50, listOfDnParams);
// await SetMetersizeProgrammingData(MeterSize.US2, listOfDnParams);
// listOfDnParams = new Dictionary<string, UInt32>();
// listOfDnParams.Add("GENESISFLOW_LowFlowMaxPeriod", (UInt32)3932160);
// listOfDnParams.Add("GENESISFLOW_LowFlowThreshold", (UInt32)260);
// listOfDnParams.Add("GENESISFLOW_MaxValidAmplitude", (UInt32)2936012800);
// listOfDnParams.Add("GENESISFLOW_MaxValidDeltaToF", (UInt32)402008);
// listOfDnParams.Add("GENESISFLOW_MaxValidToF", (UInt32)32160714);
// listOfDnParams.Add("GENESISFLOW_MinValidAmplitude", (UInt32)629145600);
// listOfDnParams.Add("GENESISFLOW_MinValidToF", (UInt32)17867064);
// listOfDnParams.Add("GENESISFLOW_Timeout", (UInt16)1);
// await SetMetersizeProgrammingData(MeterSize.DN65, listOfDnParams);
// listOfDnParams = new Dictionary<string, UInt32>();
// listOfDnParams.Add("GENESISFLOW_LowFlowMaxPeriod", (UInt32)3932160);
// listOfDnParams.Add("GENESISFLOW_LowFlowThreshold", (UInt32)500);
// listOfDnParams.Add("GENESISFLOW_MaxValidAmplitude", (UInt32)2936012800);
// listOfDnParams.Add("GENESISFLOW_MaxValidDeltaToF", (UInt32)494780);
// listOfDnParams.Add("GENESISFLOW_MaxValidToF", (UInt32)39582418);
// listOfDnParams.Add("GENESISFLOW_MinValidAmplitude", (UInt32)629145600);
// listOfDnParams.Add("GENESISFLOW_MinValidToF", (UInt32)21990232);
// listOfDnParams.Add("GENESISFLOW_Timeout", (UInt16)1);
// await SetMetersizeProgrammingData(MeterSize.DN80, listOfDnParams);
// await SetMetersizeProgrammingData(MeterSize.US3, listOfDnParams);
// listOfDnParams = new Dictionary<string, UInt32>();
// listOfDnParams.Add("GENESISFLOW_LowFlowMaxPeriod", (UInt32)3932160);
// listOfDnParams.Add("GENESISFLOW_LowFlowThreshold", (UInt32)400);
// listOfDnParams.Add("GENESISFLOW_MaxValidAmplitude", (UInt32)2936012800);
// listOfDnParams.Add("GENESISFLOW_MaxValidDeltaToF", (UInt32)618474);
// listOfDnParams.Add("GENESISFLOW_MaxValidToF", (UInt32)49478022);
// listOfDnParams.Add("GENESISFLOW_MinValidAmplitude", (UInt32)629145600);
// listOfDnParams.Add("GENESISFLOW_MinValidToF", (UInt32)27487790);
// listOfDnParams.Add("GENESISFLOW_Timeout", (UInt16)2);
// await SetMetersizeProgrammingData(MeterSize.DN100, listOfDnParams);
// await SetMetersizeProgrammingData(MeterSize.US4, listOfDnParams);
// listOfDnParams = new Dictionary<string, UInt32>();
// listOfDnParams.Add("GENESISFLOW_LowFlowMaxPeriod", (UInt32)3932160);
// listOfDnParams.Add("GENESISFLOW_LowFlowThreshold", (UInt32)600);
// listOfDnParams.Add("GENESISFLOW_MaxValidAmplitude", (UInt32)2936012800);
// listOfDnParams.Add("GENESISFLOW_MaxValidDeltaToF", (UInt32)927711);
// listOfDnParams.Add("GENESISFLOW_MaxValidToF", (UInt32)74217033);
// listOfDnParams.Add("GENESISFLOW_MinValidAmplitude", (UInt32)629145600);
// listOfDnParams.Add("GENESISFLOW_MinValidToF", (UInt32)41231685);
// listOfDnParams.Add("GENESISFLOW_Timeout", (UInt16)2);
// await SetMetersizeProgrammingData(MeterSize.DN150, listOfDnParams);
// await SetMetersizeProgrammingData(MeterSize.US6, listOfDnParams);
// listOfDnParams = new Dictionary<string, UInt32>();
// listOfDnParams.Add("GENESISFLOW_LowFlowMaxPeriod", (UInt32)3932160);
// listOfDnParams.Add("GENESISFLOW_LowFlowThreshold", (UInt32)800);
// listOfDnParams.Add("GENESISFLOW_MaxValidAmplitude", (UInt32)2936012800);
// listOfDnParams.Add("GENESISFLOW_MaxValidDeltaToF", (UInt32)1236948);
// listOfDnParams.Add("GENESISFLOW_MaxValidToF", (UInt32)98956044);
// listOfDnParams.Add("GENESISFLOW_MinValidAmplitude", (UInt32)629145600);
// listOfDnParams.Add("GENESISFLOW_MinValidToF", (UInt32)54975580);
// listOfDnParams.Add("GENESISFLOW_Timeout", (UInt16)2);
// await SetMetersizeProgrammingData(MeterSize.DN200, listOfDnParams);
// await SetMetersizeProgrammingData(MeterSize.US8, listOfDnParams);
// listOfDnParams = new Dictionary<string, UInt32>();
// listOfDnParams.Add("GENESISFLOW_LowFlowMaxPeriod", (UInt32)3932160);
// listOfDnParams.Add("GENESISFLOW_LowFlowThreshold", (UInt32)1200);
// listOfDnParams.Add("GENESISFLOW_MaxValidAmplitude", (UInt32)2936012800);
// listOfDnParams.Add("GENESISFLOW_MaxValidDeltaToF", (UInt32)1855422);
// listOfDnParams.Add("GENESISFLOW_MaxValidToF", (UInt32)148434066);
// listOfDnParams.Add("GENESISFLOW_MinValidAmplitude", (UInt32)629145600);
// listOfDnParams.Add("GENESISFLOW_MinValidToF", (UInt32)82463370);
// listOfDnParams.Add("GENESISFLOW_Timeout", (UInt16)2);
// await SetMetersizeProgrammingData(MeterSize.DN300, listOfDnParams);
// return Request.CreateResponse(HttpStatusCode.OK, await Task.Run(() => { return listOfDnParams; }));
//}
[Route("SetMetersizeProgrammingData"), HttpPost]
public async Task<HttpResponseMessage> SetMetersizeProgrammingData(MeterSize ParameterMeterSize, [FromBody] string listOfDnParamsRaw)
{
var listOfDnParams = new Dictionary<string, UInt32>();
try
{
switch (MeterSize)
var listOfDnParams = JsonConvert.DeserializeObject<Dictionary<string, UInt32>>(listOfDnParamsRaw);
var sb = new StringBuilder();
sb.AppendLine($" delete [Auftrag].[dbo].[CordonelMeterSizesParameter] where [Dn_InternalId] = { ParameterMeterSize.GetHashCode()} ");
foreach (var item in listOfDnParams)
{
case MeterSize.DN40:
case MeterSize.US1_5:
listOfDnParams.Add("GENESISFLOW_LowFlowMaxPeriod", (UInt32)3932160);
listOfDnParams.Add("GENESISFLOW_LowFlowThreshold", (UInt32)200);
listOfDnParams.Add("GENESISFLOW_MaxValidAmplitude", (UInt32)2936012800);
listOfDnParams.Add("GENESISFLOW_MaxValidDeltaToF", (UInt32)247390);
listOfDnParams.Add("GENESISFLOW_MaxValidToF", (UInt32)24739011);
listOfDnParams.Add("GENESISFLOW_MinValidAmplitude", (UInt32)629145600);
listOfDnParams.Add("GENESISFLOW_MinValidToF", (UInt32)13743895);
listOfDnParams.Add("GENESISFLOW_Timeout", (UInt16)1);
break;
case MeterSize.DN50:
case MeterSize.US2:
listOfDnParams.Add("GENESISFLOW_LowFlowMaxPeriod", (UInt32)3932160);
listOfDnParams.Add("GENESISFLOW_LowFlowThreshold", (UInt32)200);
listOfDnParams.Add("GENESISFLOW_MaxValidAmplitude", (UInt32)2936012800);
listOfDnParams.Add("GENESISFLOW_MaxValidDeltaToF", (UInt32)247390);
listOfDnParams.Add("GENESISFLOW_MaxValidToF", (UInt32)24739011);
listOfDnParams.Add("GENESISFLOW_MinValidAmplitude", (UInt32)629145600);
listOfDnParams.Add("GENESISFLOW_MinValidToF", (UInt32)13743895);
listOfDnParams.Add("GENESISFLOW_Timeout", (UInt16)1);
break;
case MeterSize.DN65:
listOfDnParams.Add("GENESISFLOW_LowFlowMaxPeriod", (UInt32)3932160);
listOfDnParams.Add("GENESISFLOW_LowFlowThreshold", (UInt32)260);
listOfDnParams.Add("GENESISFLOW_MaxValidAmplitude", (UInt32)2936012800);
listOfDnParams.Add("GENESISFLOW_MaxValidDeltaToF", (UInt32)402008);
listOfDnParams.Add("GENESISFLOW_MaxValidToF", (UInt32)32160714);
listOfDnParams.Add("GENESISFLOW_MinValidAmplitude", (UInt32)629145600);
listOfDnParams.Add("GENESISFLOW_MinValidToF", (UInt32)17867064);
listOfDnParams.Add("GENESISFLOW_Timeout", (UInt16)1);
break;
case MeterSize.DN80:
case MeterSize.US3:
listOfDnParams.Add("GENESISFLOW_LowFlowMaxPeriod", (UInt32)3932160);
listOfDnParams.Add("GENESISFLOW_LowFlowThreshold", (UInt32)500);
listOfDnParams.Add("GENESISFLOW_MaxValidAmplitude", (UInt32)2936012800);
listOfDnParams.Add("GENESISFLOW_MaxValidDeltaToF", (UInt32)494780);
listOfDnParams.Add("GENESISFLOW_MaxValidToF", (UInt32)39582418);
listOfDnParams.Add("GENESISFLOW_MinValidAmplitude", (UInt32)629145600);
listOfDnParams.Add("GENESISFLOW_MinValidToF", (UInt32)21990232);
listOfDnParams.Add("GENESISFLOW_Timeout", (UInt16)1);
break;
case MeterSize.DN100:
case MeterSize.US4:
listOfDnParams.Add("GENESISFLOW_LowFlowMaxPeriod", (UInt32)3932160);
listOfDnParams.Add("GENESISFLOW_LowFlowThreshold", (UInt32)400);
listOfDnParams.Add("GENESISFLOW_MaxValidAmplitude", (UInt32)2936012800);
listOfDnParams.Add("GENESISFLOW_MaxValidDeltaToF", (UInt32)618474);
listOfDnParams.Add("GENESISFLOW_MaxValidToF", (UInt32)49478022);
listOfDnParams.Add("GENESISFLOW_MinValidAmplitude", (UInt32)629145600);
listOfDnParams.Add("GENESISFLOW_MinValidToF", (UInt32)27487790);
listOfDnParams.Add("GENESISFLOW_Timeout", (UInt16)2);
break;
case MeterSize.DN150:
case MeterSize.US6:
listOfDnParams.Add("GENESISFLOW_LowFlowMaxPeriod", (UInt32)3932160);
listOfDnParams.Add("GENESISFLOW_LowFlowThreshold", (UInt32)600);
listOfDnParams.Add("GENESISFLOW_MaxValidAmplitude", (UInt32)2936012800);
listOfDnParams.Add("GENESISFLOW_MaxValidDeltaToF", (UInt32)927711);
listOfDnParams.Add("GENESISFLOW_MaxValidToF", (UInt32)74217033);
listOfDnParams.Add("GENESISFLOW_MinValidAmplitude", (UInt32)629145600);
listOfDnParams.Add("GENESISFLOW_MinValidToF", (UInt32)41231685);
listOfDnParams.Add("GENESISFLOW_Timeout", (UInt16)2);
break;
case MeterSize.DN200:
case MeterSize.US8:
listOfDnParams.Add("GENESISFLOW_LowFlowMaxPeriod", (UInt32)3932160);
listOfDnParams.Add("GENESISFLOW_LowFlowThreshold", (UInt32)800);
listOfDnParams.Add("GENESISFLOW_MaxValidAmplitude", (UInt32)2936012800);
listOfDnParams.Add("GENESISFLOW_MaxValidDeltaToF", (UInt32)1236948);
listOfDnParams.Add("GENESISFLOW_MaxValidToF", (UInt32)98956044);
listOfDnParams.Add("GENESISFLOW_MinValidAmplitude", (UInt32)629145600);
listOfDnParams.Add("GENESISFLOW_MinValidToF", (UInt32)54975580);
listOfDnParams.Add("GENESISFLOW_Timeout", (UInt16)2);
break;
case MeterSize.DN300:
listOfDnParams.Add("GENESISFLOW_LowFlowMaxPeriod", (UInt32)3932160);
listOfDnParams.Add("GENESISFLOW_LowFlowThreshold", (UInt32)1200);
listOfDnParams.Add("GENESISFLOW_MaxValidAmplitude", (UInt32)2936012800);
listOfDnParams.Add("GENESISFLOW_MaxValidDeltaToF", (UInt32)1855422);
listOfDnParams.Add("GENESISFLOW_MaxValidToF", (UInt32)148434066);
listOfDnParams.Add("GENESISFLOW_MinValidAmplitude", (UInt32)629145600);
listOfDnParams.Add("GENESISFLOW_MinValidToF", (UInt32)82463370);
listOfDnParams.Add("GENESISFLOW_Timeout", (UInt16)2);
break;
default:
break;
sb.AppendLine($" insert into [Auftrag].[dbo].[CordonelMeterSizesParameter] ");
sb.AppendLine($" select {ParameterMeterSize.GetHashCode()}, '{item.Key}', {item.Value};");
}
return Request.CreateResponse(HttpStatusCode.OK, await Task.Run(() => { return listOfDnParams; }));
using (var dataacces = new SqlDataAccess(GlobalConfig.connectionString.Value))
{
return Request.CreateResponse(HttpStatusCode.OK, await Task.Run(() => { return dataacces.ExecuteQuery(sb.ToString()) != null; }));
}
}
catch (Exception ex)
{
return Request.CreateResponse(HttpStatusCode.ExpectationFailed, ex);
}
}
[Route("GetMetersizeProgrammingData"), HttpGet]
public async Task<HttpResponseMessage> GetMetersizeProgrammingData(MeterSize MeterSize)
{
var programming = new Dictionary<string, UInt32>();
var sb = new StringBuilder();
try
{
sb.AppendLine($" SELECT size.[Dn_InternalId], para.DnParameterId, para.ParameterName, para.ParameterValue ");
sb.AppendLine($" FROM [Auftrag].[dbo].[CordonelMeterSizes] size ");
sb.AppendLine($" inner join [Auftrag].[dbo].[CordonelMeterSizesParameter] para on size.Dn_InternalId = para.[Dn_InternalId] ");
sb.AppendLine($" where size.[Dn_InternalId] = {MeterSize.GetHashCode()} ");
using (var dataacces = new SqlDataAccess(GlobalConfig.connectionString.Value))
{
var MapData = dataacces.ExecuteQuery(sb.ToString());
foreach (DataRow row in MapData.Rows)
{
var tmp = (Int64)row["ParameterValue"];
programming.Add(row["ParameterName"].ToString(), Convert.ToUInt32(tmp));
}
return Request.CreateResponse(HttpStatusCode.OK, await Task.Run(() => { return programming; }));
}
}
catch (Exception ex)

View File

@ -272,7 +272,8 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
var sb = new StringBuilder();
sb.AppendLine($" select * from [dbo].[FWUpdateSafeContainer] ");
sb.Append($" where FWUpdateSafeContainer_ValidDate >= CURRENT_TIMESTAMP and FWUpdateSafeContainer_UserId ={UserId} ");
sb.Append($" where FWUpdateSafeContainer_UserId ={UserId} ");
//FWUpdateSafeContainer_ValidDate >= CURRENT_TIMESTAMP and
var dbResult = dataacces.ExecuteQuery(sb.ToString());
@ -447,8 +448,8 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
return Request.CreateResponse(HttpStatusCode.OK, newID);
}
@ -600,7 +601,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
var DbFileContent = new System.Data.SqlClient.SqlParameter("@FileContent", SqlDbType.VarBinary);
var DbFileName = new System.Data.SqlClient.SqlParameter("@FileName", SqlDbType.NVarChar, 50);
DbFileName.Value = FileContent.FileName;
DbFileContent.Value = UTF32Encoding.UTF32.GetBytes(JsonConvert.SerializeObject(FileContent));
@ -643,7 +644,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
[Route("GetFWUpdateReportFile"), HttpGet]
public async Task<HttpResponseMessage> GetFWUpdateReportFile(int? PcbId = null, int? UserId = null, int? OrderNr = null)
public async Task<HttpResponseMessage> GetFWUpdateReportFile(int? PcbId = null, int? UserId = null, int? OrderNr = null, bool WithContent = true)
{
return await Task.Run(() =>
{
@ -656,9 +657,16 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
var sb = new StringBuilder();
sb.AppendLine($" select FWUpdateReport_ID, FWUpdateReport_Name, FWUpdateReport_UserId, FWUpdateReport_FileId, FWUpdateReport_Date, FWUpdateReport_PcbId, FWUpdateReport_OrderNr, FileContent ");
sb.AppendLine($" select FWUpdateReport_ID, FWUpdateReport_Name, FWUpdateReport_UserId, FWUpdateReport_FileId, FWUpdateReport_Date, FWUpdateReport_PcbId, FWUpdateReport_OrderNr ");
if (WithContent)
{
sb.Append(", FileContent ");
}
sb.AppendLine($" from [dbo].[FWUpdateReports] r ");
sb.AppendLine($" inner join [dbo].[File] f on r.FWUpdateReport_FileId = f.FileId ");
if (WithContent)
{
sb.AppendLine($" inner join [dbo].[File] f on r.FWUpdateReport_FileId = f.FileId ");
}
sb.AppendLine($" where FWUpdateReport_ID > 0 ");
if (PcbId.HasValue)

View File

@ -152,6 +152,8 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
//FE081F0 E5250E5D084FA024 00 04 80 00 70 03 48 9E
//0x 0413F059069BEB24
//pwString = "FE081F0 F2 30 F0 59 03 66 10 24 00 04 80 00 70 03 48 9A";
//pwString = "FE081F0 16 31 F0 59 06 9B EB 24 00 04 80 00 70 03 48 9A";
//pwString = "FE081F0 B3 F3 0D 5C 05 C3 9B 24 00 04 80 00 70 03 48 9E";
//pwString = "FE081F0 C3 30 F0 59 03 66 10 24 00 04 80 00 70 03 48 9A";
//E79E9F08AFBE

View File

@ -600,9 +600,9 @@ namespace Service.MeterProcessState.Controllers
catch (Exception)
{
}
AppVersionDic.Add(new CordonelAppVersion((int)item["AppId"], item["Version"].ToString(), a));
}
@ -659,5 +659,33 @@ namespace Service.MeterProcessState.Controllers
return Request.CreateResponse(HttpStatusCode.ExpectationFailed, ex);
}
}
[Route("TaskKillByTime")]
public async Task<HttpResponseMessage> TaskKillByTime(int seconds = 300)
{
try
{
return Request.CreateResponse(HttpStatusCode.OK, await Task.Run(() =>
{
using (var dataacces = new SqlDataAccess(GlobalConfig.connectionString.Value))
{
//if (kill)
//{
// var dt = dataacces.ExecuteQuery("exec WhoLockNoFilter " + seconds);
//}
return 1;
}
}));
}
catch (Exception ex)
{
return Request.CreateResponse(HttpStatusCode.ExpectationFailed, ex.ToString() + "<br >" + ex.InnerException.ToString());
}
}
}
}

View File

@ -20,6 +20,53 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
);
}
/// <summary>
/// SetMeterLogPathInfo
/// </summary>
/// <param name="SerialNumber">PcbID from Meter</param>
///
/// <returns></returns>
[Route("SetMeterLogPathInfo"), HttpGet]
public async Task<HttpResponseMessage> SetMeterLogPathInfo(int SerialNumber, int? TestRunId =null, int? CalibrationRunId = null, string BasePath = "", string MainLogName = "", string LEDName = "" )
{
try
{
return await Task.Run(() =>
{
using (var dataacces = new SqlDataAccess(GlobalConfig.connectionString.Value))
{
StringBuilder sb = new StringBuilder();
var TestRunIdStr = TestRunId.HasValue ? TestRunId.Value.ToString() : "null";
var CalibrationRunIdStr = CalibrationRunId.HasValue ? CalibrationRunId.Value.ToString() : "null";
sb.AppendLine($" Insert into [Auftrag].[dbo].[CordonelLogFiles] ");
sb.AppendLine($" select ");
sb.AppendLine($"{SerialNumber} , ");
sb.AppendLine($"{TestRunIdStr} , ");
sb.AppendLine($"{CalibrationRunIdStr} , ");
sb.AppendLine($"'{BasePath}' , ");
sb.AppendLine($"'{MainLogName}' , ");
sb.AppendLine($"'{LEDName}' ");
var MapData = dataacces.ExecuteQuery(sb.ToString());
return Request.CreateResponse(HttpStatusCode.OK,"");
}
});
}
catch (Exception ex)
{
return Request.CreateResponse(HttpStatusCode.InternalServerError, ex);
}
}
/// <summary>

View File

@ -421,6 +421,36 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<LangVersion>7.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == '_MANUAL_CONTROL|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />

View File

@ -2,5 +2,38 @@
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<NameOfLastUsedPublishProfile>a</NameOfLastUsedPublishProfile>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress />
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
</PropertyGroup>
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<StartPageUrl>
</StartPageUrl>
<StartAction>CurrentPage</StartAction>
<AspNetDebugging>True</AspNetDebugging>
<SilverlightDebugging>False</SilverlightDebugging>
<NativeDebugging>False</NativeDebugging>
<SQLDebugging>False</SQLDebugging>
<ExternalProgram>
</ExternalProgram>
<StartExternalURL>
</StartExternalURL>
<StartCmdLineArguments>
</StartCmdLineArguments>
<StartWorkingDirectory>
</StartWorkingDirectory>
<EnableENC>True</EnableENC>
<AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project>

View File

@ -45,6 +45,36 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<LangVersion>7.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == '_MANUAL_CONTROL|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\_MANUAL_CONTROL\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="RestSharp, Version=105.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\RestSharp.105.0.0\lib\net4\RestSharp.dll</HintPath>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

389
Common/TempFlansh/Form1.Designer.cs generated Normal file
View File

@ -0,0 +1,389 @@
namespace TempFlansh
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.button1 = new System.Windows.Forms.Button();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.timer2 = new System.Windows.Forms.Timer(this.components);
this.lblCheck = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.btnCheck = new System.Windows.Forms.Button();
this.lblAvgDutTof = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.lblDuration = new System.Windows.Forms.Label();
this.lblLines = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.btnAddLut = new System.Windows.Forms.Button();
this.nudRef = new System.Windows.Forms.NumericUpDown();
this.btnStopRecord = new System.Windows.Forms.Button();
this.btnStartRecord = new System.Windows.Forms.Button();
this.txtCurrentTofs = new System.Windows.Forms.TextBox();
this.btnRefreshLut = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.lblPcbId = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.txtLuts = new System.Windows.Forms.TextBox();
this.btnConnect = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
this.cbComSlot = new System.Windows.Forms.ComboBox();
((System.ComponentModel.ISupportInitialize)(this.nudRef)).BeginInit();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(254, 12);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(138, 72);
this.button1.TabIndex = 0;
this.button1.Text = "button1";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// timer1
//
this.timer1.Interval = 5000;
//
// lblCheck
//
this.lblCheck.AutoSize = true;
this.lblCheck.Location = new System.Drawing.Point(157, 355);
this.lblCheck.Name = "lblCheck";
this.lblCheck.Size = new System.Drawing.Size(10, 13);
this.lblCheck.TabIndex = 75;
this.lblCheck.Text = "-";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(83, 355);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(68, 13);
this.label9.TabIndex = 74;
this.label9.Text = "Check Temp";
//
// btnCheck
//
this.btnCheck.Location = new System.Drawing.Point(13, 341);
this.btnCheck.Name = "btnCheck";
this.btnCheck.Size = new System.Drawing.Size(64, 40);
this.btnCheck.TabIndex = 73;
this.btnCheck.Text = "Start Check";
this.btnCheck.UseVisualStyleBackColor = true;
this.btnCheck.Click += new System.EventHandler(this.btnCheck_Click);
//
// lblAvgDutTof
//
this.lblAvgDutTof.AutoSize = true;
this.lblAvgDutTof.Location = new System.Drawing.Point(223, 750);
this.lblAvgDutTof.Name = "lblAvgDutTof";
this.lblAvgDutTof.Size = new System.Drawing.Size(10, 13);
this.lblAvgDutTof.TabIndex = 72;
this.lblAvgDutTof.Text = "-";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(223, 727);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(71, 13);
this.label7.TabIndex = 71;
this.label7.Text = "Avg DUT Tof";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(83, 727);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(90, 13);
this.label6.TabIndex = 70;
this.label6.Text = "Avg Ref Temp C°";
//
// lblDuration
//
this.lblDuration.AutoSize = true;
this.lblDuration.Location = new System.Drawing.Point(133, 475);
this.lblDuration.Name = "lblDuration";
this.lblDuration.Size = new System.Drawing.Size(10, 13);
this.lblDuration.TabIndex = 69;
this.lblDuration.Text = "-";
//
// lblLines
//
this.lblLines.AutoSize = true;
this.lblLines.Location = new System.Drawing.Point(133, 453);
this.lblLines.Name = "lblLines";
this.lblLines.Size = new System.Drawing.Size(10, 13);
this.lblLines.TabIndex = 68;
this.lblLines.Text = "-";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(82, 475);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(47, 13);
this.label5.TabIndex = 67;
this.label5.Text = "Duration";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(82, 453);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(32, 13);
this.label4.TabIndex = 66;
this.label4.Text = "Lines";
//
// btnAddLut
//
this.btnAddLut.Location = new System.Drawing.Point(319, 730);
this.btnAddLut.Name = "btnAddLut";
this.btnAddLut.Size = new System.Drawing.Size(73, 40);
this.btnAddLut.TabIndex = 65;
this.btnAddLut.Text = "Store";
this.btnAddLut.UseVisualStyleBackColor = true;
this.btnAddLut.Click += new System.EventHandler(this.btnAddLut_Click);
//
// nudRef
//
this.nudRef.DecimalPlaces = 4;
this.nudRef.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.nudRef.Location = new System.Drawing.Point(86, 743);
this.nudRef.Maximum = new decimal(new int[] {
50,
0,
0,
0});
this.nudRef.Minimum = new decimal(new int[] {
5,
0,
0,
0});
this.nudRef.Name = "nudRef";
this.nudRef.Size = new System.Drawing.Size(114, 26);
this.nudRef.TabIndex = 64;
this.nudRef.Value = new decimal(new int[] {
5,
0,
0,
0});
//
// btnStopRecord
//
this.btnStopRecord.Location = new System.Drawing.Point(12, 730);
this.btnStopRecord.Name = "btnStopRecord";
this.btnStopRecord.Size = new System.Drawing.Size(65, 40);
this.btnStopRecord.TabIndex = 63;
this.btnStopRecord.Text = "Stop Record";
this.btnStopRecord.UseVisualStyleBackColor = true;
this.btnStopRecord.Click += new System.EventHandler(this.BtnStopRecord_Click);
//
// btnStartRecord
//
this.btnStartRecord.Location = new System.Drawing.Point(12, 448);
this.btnStartRecord.Name = "btnStartRecord";
this.btnStartRecord.Size = new System.Drawing.Size(64, 40);
this.btnStartRecord.TabIndex = 62;
this.btnStartRecord.Text = "Start Record";
this.btnStartRecord.UseVisualStyleBackColor = true;
this.btnStartRecord.Click += new System.EventHandler(this.BtnStartRecord_Click);
//
// txtCurrentTofs
//
this.txtCurrentTofs.Location = new System.Drawing.Point(12, 494);
this.txtCurrentTofs.Multiline = true;
this.txtCurrentTofs.Name = "txtCurrentTofs";
this.txtCurrentTofs.Size = new System.Drawing.Size(380, 230);
this.txtCurrentTofs.TabIndex = 61;
//
// btnRefreshLut
//
this.btnRefreshLut.Location = new System.Drawing.Point(193, 77);
this.btnRefreshLut.Name = "btnRefreshLut";
this.btnRefreshLut.Size = new System.Drawing.Size(53, 20);
this.btnRefreshLut.TabIndex = 60;
this.btnRefreshLut.Text = "Refresh";
this.btnRefreshLut.UseVisualStyleBackColor = true;
this.btnRefreshLut.Click += new System.EventHandler(this.btnRefreshLut_Click);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(13, 81);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(107, 13);
this.label3.TabIndex = 59;
this.label3.Text = "Current entrys in LUT";
//
// lblPcbId
//
this.lblPcbId.AutoSize = true;
this.lblPcbId.Location = new System.Drawing.Point(153, 8);
this.lblPcbId.Name = "lblPcbId";
this.lblPcbId.Size = new System.Drawing.Size(10, 13);
this.lblPcbId.TabIndex = 58;
this.lblPcbId.Text = "-";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(99, 8);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(40, 13);
this.label1.TabIndex = 57;
this.label1.Text = "PcbID:";
//
// txtLuts
//
this.txtLuts.Location = new System.Drawing.Point(12, 105);
this.txtLuts.Multiline = true;
this.txtLuts.Name = "txtLuts";
this.txtLuts.Size = new System.Drawing.Size(380, 230);
this.txtLuts.TabIndex = 56;
//
// btnConnect
//
this.btnConnect.Location = new System.Drawing.Point(12, 31);
this.btnConnect.Name = "btnConnect";
this.btnConnect.Size = new System.Drawing.Size(234, 24);
this.btnConnect.TabIndex = 55;
this.btnConnect.Text = "Connect";
this.btnConnect.UseVisualStyleBackColor = true;
this.btnConnect.Click += new System.EventHandler(this.btnConnect_Click);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(13, 8);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(28, 13);
this.label2.TabIndex = 54;
this.label2.Text = "Slot:";
//
// cbComSlot
//
this.cbComSlot.FormattingEnabled = true;
this.cbComSlot.Items.AddRange(new object[] {
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20"});
this.cbComSlot.Location = new System.Drawing.Point(43, 4);
this.cbComSlot.Name = "cbComSlot";
this.cbComSlot.Size = new System.Drawing.Size(37, 21);
this.cbComSlot.TabIndex = 53;
this.cbComSlot.Text = "1";
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 805);
this.Controls.Add(this.lblCheck);
this.Controls.Add(this.label9);
this.Controls.Add(this.btnCheck);
this.Controls.Add(this.lblAvgDutTof);
this.Controls.Add(this.label7);
this.Controls.Add(this.label6);
this.Controls.Add(this.lblDuration);
this.Controls.Add(this.lblLines);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.btnAddLut);
this.Controls.Add(this.nudRef);
this.Controls.Add(this.btnStopRecord);
this.Controls.Add(this.btnStartRecord);
this.Controls.Add(this.txtCurrentTofs);
this.Controls.Add(this.btnRefreshLut);
this.Controls.Add(this.label3);
this.Controls.Add(this.lblPcbId);
this.Controls.Add(this.label1);
this.Controls.Add(this.txtLuts);
this.Controls.Add(this.btnConnect);
this.Controls.Add(this.label2);
this.Controls.Add(this.cbComSlot);
this.Controls.Add(this.button1);
this.Name = "Form1";
this.Text = "Form1";
((System.ComponentModel.ISupportInitialize)(this.nudRef)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.Timer timer2;
private System.Windows.Forms.Label lblCheck;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Button btnCheck;
private System.Windows.Forms.Label lblAvgDutTof;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label lblDuration;
private System.Windows.Forms.Label lblLines;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Button btnAddLut;
private System.Windows.Forms.NumericUpDown nudRef;
private System.Windows.Forms.Button btnStopRecord;
private System.Windows.Forms.Button btnStartRecord;
private System.Windows.Forms.TextBox txtCurrentTofs;
private System.Windows.Forms.Button btnRefreshLut;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label lblPcbId;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtLuts;
private System.Windows.Forms.Button btnConnect;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox cbComSlot;
}
}

523
Common/TempFlansh/Form1.cs Normal file
View File

@ -0,0 +1,523 @@
using CordonelPreadjustmentUi;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
using Xylem.Common.Logic.SoftwareAccessHelper;
namespace TempFlansh
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
SetEnable(programmState.Start);
}
private void button1_Click(object sender, EventArgs e)
{
var helper = new TempHelper();
try
{
var a = TempHelper.UniversalOpenCom(25, 4800, 8, 0, 0);
button1.Text = helper.ReadCurrentDisplayValue().ToString();
}
catch (Exception ex)
{
MessageBox.Show("GMH3x32E.dll not found. Install it?");
//if (true)
//{
// ProcessStartInfo procInfo = new ProcessStartInfo
// {
// WorkingDirectory = Directory.GetCurrentDirectory(),
// FileName = Path.Combine(Directory.GetCurrentDirectory(), "RegAsm4.exe"),
// Arguments = $"{Directory.GetCurrentDirectory()}\\GMH3x32E.dll",
// UseShellExecute = true,
// CreateNoWindow = false,
// WindowStyle = ProcessWindowStyle.Normal,
// Verb = "runas"
// };
// Process proc = Process.Start(procInfo);
// proc.WaitForExit();
//}
}
}
public class CordonelTempLut
{
public int Id { get; set; }
public int PcbId { get; set; }
public double RefTempC { get; set; }
public double AvgTof { get; set; }
public bool Active { get; set; }
}
public class LutTemp
{
public int PcbId { get; set; }
public int FromTempC { get; set; }
public int ToTempC { get; set; }
public double? AvgRefTempC { get; set; }
public List<double> ListOfRecordedTofs { get; set; }
public double? AvgTofs { get; set; }
}
public ZeroFlowGenesisMeter _currentGenesis { get; private set; }
public MeterBatch _meterBatch { get; private set; }
private void btnConnect_Click(Object sender, EventArgs e)
{
Connect();
}
private void Connect()
{
try
{
Int32 slotNr;
if (string.IsNullOrEmpty(cbComSlot.SelectedItem.ToString()) ||
!int.TryParse(cbComSlot.SelectedItem.ToString(), out slotNr))
{
return;
}
//var drive = 1;
_currentGenesis?.DisposeMeter();
//dispose old meter
_meterBatch = new MeterBatch();
_currentGenesis = null;
Thread.Sleep(200);
//assign new meter and assign meter to FW update file if this exists
_currentGenesis = new ZeroFlowGenesisMeter(slotNr, 3, false);
//_currentGenesis.SetupFromConfigFile(slotNr);
_meterBatch.AddMeter(_currentGenesis);
Task.Factory.StartNew(() =>
{
_meterBatch.MetersLogin();
if (!_currentGenesis.IsLoggedOn)
{
Thread.Sleep(2000);
_meterBatch.MetersLogin();
}
if (!_currentGenesis.IsLoggedOn)
{
SetEnable(programmState.Start);
return;
}
var a = GetLutsText(_currentGenesis.PcbId);
//
_currentGenesis.InitMeasurement();
Invoke(new Action(() =>
{
txtLuts.Text = a;
if (LutsMissing)
{
txtLuts.BackColor = Color.IndianRed;
}
else
{
txtLuts.BackColor = Color.LightGreen;
}
lblPcbId.Text = _currentGenesis.PcbId;
SetEnable(programmState.Connected);
}));
});//.ContinueWith(delegate { ViewProgressPcb(false); });
}
catch (Exception ex)
{
txtLuts.Text = "-";
MessageBox.Show(ex.Message);
SetEnable(programmState.Start);
}
}
private void btnRefreshLut_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(_currentGenesis?.PcbId))
{
Task.Factory.StartNew(() =>
{
var a = GetLutsText(_currentGenesis.PcbId);
Invoke(new Action(() =>
{
txtLuts.Text = a;
if (LutsMissing)
{
txtLuts.BackColor = Color.IndianRed;
}
else
{
txtLuts.BackColor = Color.LightGreen;
}
}));
});
}
else
{
txtLuts.Text = "-";
}
}
public class RefTempRange
{
public double Min { get; set; }
public double Max { get; set; }
}
private List<RefTempRange> ReftempRangeReq = new List<RefTempRange>()
{
new RefTempRange() { Min = 7, Max= 9 },
new RefTempRange() { Min = 13,Max = 15 },
new RefTempRange() { Min = 16,Max = 18 },
new RefTempRange() { Min = 19,Max = 20 },
new RefTempRange() { Min = 20,Max = 22 },
new RefTempRange() { Min = 23,Max = 25 },
new RefTempRange() { Min = 26,Max = 28 },
new RefTempRange() { Min = 28,Max = 30 },
new RefTempRange() { Min = 33,Max = 36 },
};
private List<CordonelTempLut> cordonelTempLut = null;
private bool LutsMissing = false;
private string GetLutsText(string PcbId)
{
var ret = new StringBuilder();
var err = 0;
var resp = LocalWebRequest.GetRequest($"http://10.49.40.25/MeterProcessState/api/TempFlange/GetLut?PcbId={PcbId}");
ret.AppendLine($"Ref Temp C°\t|\t AvgTof");
var CurrentReqRequierd = new List<RefTempRange>();
CurrentReqRequierd.AddRange(ReftempRangeReq);
try
{
cordonelTempLut = JsonConvert.DeserializeObject<List<CordonelTempLut>>(resp);
foreach (var item in cordonelTempLut.OrderBy(a => a.RefTempC))
{
CurrentReqRequierd.RemoveAll(rem => item.RefTempC >= rem.Min && item.RefTempC <= rem.Max);
ret.AppendLine($"{item.RefTempC.ToString("n8")}\t|\t{item.AvgTof}");
}
}
catch (Exception)
{
ret.AppendLine($"No entrys");
}
LutsMissing = false;
foreach (var item in CurrentReqRequierd)
{
LutsMissing = true;
ret.AppendLine($"{item.Min}-{item.Max}\t|\t Missing");
}
return ret.ToString();
}
private programmState State = programmState.Start;
private enum programmState
{
Start,
Connected,
RecordRuning,
RecordStoped,
RecodCalculated,
}
private void SetEnable(programmState state)
{
State = state;
switch (State)
{
case programmState.Start:
btnStartRecord.Enabled = false;
btnStopRecord.Enabled = false;
btnAddLut.Enabled = false;
nudRef.Visible = false;
btnRefreshLut.Enabled = false;
break;
case programmState.Connected:
btnStartRecord.Enabled = true;
btnStopRecord.Enabled = false;
btnAddLut.Enabled = false;
nudRef.Visible = false;
btnRefreshLut.Enabled = true;
break;
case programmState.RecordRuning:
btnStartRecord.Enabled = false;
btnStopRecord.Enabled = true;
btnAddLut.Enabled = false;
nudRef.Visible = false;
btnRefreshLut.Enabled = true;
break;
case programmState.RecordStoped:
btnStartRecord.Enabled = true;
btnStopRecord.Enabled = false;
btnAddLut.Enabled = true;
nudRef.Visible = true;
btnRefreshLut.Enabled = true;
break;
default:
break;
}
}
public void tmp()
{
//var cRecords = _currentGenesis.CurrentRecords.ToList();
//Log($"cRecords.Count={cRecords.Count}");
//if (cRecords != null && cRecords.Any())
//{
// decimal checkTempMeter = 0;
// if (MeterTempMode == TempMode.CalcTof)
// {
// //
// var sumTof = 0.0;
// var countTof = 0;
// foreach (var tofItem in cRecords.Where(c => c.Channel == 2))
// {
// if (tofItem.Channel == 2)
// {
// Log($"TotalTimeOfFlightS;{(tofItem.TotalTimeOfFlightS * 1000).ToString()}");
// Log($"RAWTEMP;{interPol(TempFromTofLUT, (tofItem.TotalTimeOfFlightS * 1000))}");
// sumTof = (tofItem.TotalTimeOfFlightS * 1000) + sumTof;
// countTof = countTof + 1;
// }
// }
// var x = (sumTof / countTof) / 1000;
// Log($"avgTof;{x}({sumTof}/{countTof})");
// checkTempMeter = interPol(TempFromTofLUT, x);
// Meter.CurrentRecords.Clear();
// }
// else
// {
// checkTempMeter = (decimal)cRecords.Last().TemperatureDegC;
// }
//}
}
private DateTimeOffset start;
private void BtnStartRecord_Click(object sender, EventArgs e)
{
start = DateTimeOffset.Now;
_currentGenesis.StartRecordData();
_currentGenesis.WriteRegister<Byte>(Register.Genesisflow.SampleRate, 16, checkRegister: true);
SetEnable(programmState.RecordRuning);
timer2.Enabled = true;
}
private void BtnStopRecord_Click(object sender, EventArgs e)
{
timer2.Enabled = false;
OutputAvgTof(true);
_currentGenesis.WriteRegister<Byte>(Register.Genesisflow.SampleRate, 0, checkRegister: true);
SetEnable(programmState.RecordStoped);
}
private void btnAddLut_Click(object sender, EventArgs e)
{
var req = LocalWebRequest.PostRequestAsync($"http://10.49.40.25/MeterProcessState/api/TempFlange/AddLut?PcbId={_currentGenesis.PcbId}&RefTempC={nudRef.Value.ToString().Replace(",", ".")}&AvgTof={lblAvgDutTof.Text.Replace(",", ".")}");
SetEnable(programmState.Connected);
}
private void btnCheck_Click(object sender, EventArgs e)
{
if (btnCheck.Text == "Start Check")
{
_currentGenesis.StartRecordData();
timer1.Enabled = true;
btnCheck.Text = "Stop Check";
}
else
{
_currentGenesis.StopRecordData();
timer1.Enabled = false;
btnCheck.Text = "Start Check";
}
}
private static decimal interPol(List<CordonelTempLut> points, double x)
{
var x1 = 0.000;
var y1 = 0.000;
var x2 = 0.000;
var y2 = 0.000;
decimal checkTempMeter;
if ((x <= points[0].AvgTof) && (x >= points.Last().AvgTof))
{
var i = 0;
foreach (var val in points)
{
if (points[i].AvgTof <= x)
{
x1 = points[i - 1].AvgTof;
y1 = points[i - 1].RefTempC;
x2 = points[i].AvgTof;
y2 = points[i].RefTempC;
break;
}
i = i + 1;
}
checkTempMeter = (decimal)((y2 - y1) / (x2 - x1) * (x - x1) + y1);
}
else
{
checkTempMeter = 1;
}
return checkTempMeter;
}
private void timer1_Tick(object sender, EventArgs e)
{
try
{
var cRecords = _currentGenesis.CurrentRecords.ToList();
if (cRecords != null && cRecords.Any())
{
decimal checkTempMeter = 0;
//
var sumTof = 0.0;
var countTof = 0;
foreach (var tofItem in cRecords.Where(c => c.Channel == 2))
{
if (tofItem.Channel == 2)
{
sumTof = (tofItem.TotalTimeOfFlightS * 1000) + sumTof;
countTof = countTof + 1;
}
}
var x = (sumTof / countTof) / 1000;
checkTempMeter = interPol(cordonelTempLut, x);
var a = new Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.CalibrationRecord();
while (_currentGenesis.CurrentRecords.TryDequeue(out a))
{
// do nothing
}
lblCheck.Text = checkTempMeter.ToString();
}
else
{
lblCheck.Text = $"temp NA";
}
}
catch (Exception ex)
{
lblCheck.Text = $"temp NA - {ex.Message}";
}
}
private void timer2_Tick(object sender, EventArgs e)
{
if (State == programmState.RecordRuning)
{
OutputAvgTof();
}
}
private void OutputAvgTof(bool stop = false)
{
try
{
StringBuilder cTofs = new StringBuilder();
var listOfRec = _currentGenesis.CurrentRecords.Where(s => s.Channel == 2).ToList();
if (stop)
{
_currentGenesis.StopRecordData();
}
var list = listOfRec.Select(s => new { ToF = s.TotalTimeOfFlightS * 1000, Channel = s.Channel });
foreach (var item in list.OrderBy(o => o.Channel))
{
cTofs.Append(item.Channel);
cTofs.Append(":");
cTofs.AppendLine((item.ToF / 1000).ToString());
}
lblAvgDutTof.Text = (list.Average(s => s.ToF) / 1000).ToString();
txtCurrentTofs.Text = cTofs.ToString();
lblLines.Text = list.Count().ToString(); ;
lblDuration.Text = $"{(DateTimeOffset.Now - start).TotalSeconds}S";
}
catch (Exception ex)
{
txtCurrentTofs.Text = ex.Message;
}
}
}
}

View File

@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>191, 17</value>
</metadata>
<metadata name="timer2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>278, 17</value>
</metadata>
</root>

Binary file not shown.

View File

@ -0,0 +1,73 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Pipes;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace TempFlansh
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Console.WriteLine("Comport");
short cport = short.Parse(Console.ReadLine());
var ap = TempHelper.UniversalOpenCom(cport, 4800, 8, 0, 0);
var helper = new TempHelper();
var filename = $"{DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss")}_temp.log";
//while (true)
//{
// var outT = $"{DateTime.Now} {helper.ReadCurrentDisplayValue().ToString()}";
// File.AppendAllLines(filename, new List<string>() { outT });
// Console.WriteLine(outT);
// Thread.Sleep(1000);
//}
using (NamedPipeServerStream pipeServer = new NamedPipeServerStream("TempPipe", PipeDirection.Out))
{
Console.WriteLine("NamedPipeServerStream object created.");
// Wait for a client to connect
Console.Write("Waiting for client connection...");
pipeServer.WaitForConnection();
Console.Write("Open Comport");
Console.WriteLine("Client connected.");
try
{
// Read user input and send that to the client process.
using (StreamWriter sw = new StreamWriter(pipeServer))
{
sw.AutoFlush = true;
while (true)
{
sw.WriteLine(helper.ReadCurrentDisplayValue().ToString());
Thread.Sleep(100);
}
}
}
// Catch the IOException that is raised if the pipe is broken
// or disconnected.
catch (IOException e)
{
Console.WriteLine("ERROR: {0}", e.Message);
}
}
//Application.EnableVisualStyles();
//Application.SetCompatibleTextRenderingDefault(false);
//Application.Run(new Form1());
}
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("TempFlansh")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TempFlansh")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("62e5ba37-36ab-4f0a-bc12-554e7a1f1a39")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// 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("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace TempFlansh.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TempFlansh.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

View File

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace TempFlansh.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

View File

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@ -0,0 +1,152 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>TempFlansh</RootNamespace>
<AssemblyName>TempFlansh</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TempHelper.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Content Include="GMH3x32E.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CordonelPreadjustmentUi\CordonelPreadjustmentUi.csproj">
<Project>{D0C8D887-ED52-40AB-A069-90BCE0E801E2}</Project>
<Name>CordonelPreadjustmentUi</Name>
</ProjectReference>
<ProjectReference Include="..\Hardware\WaterMeter\Genesis\DataPackages\DataPackages.csproj">
<Project>{0E524D43-7B66-45CD-AA74-41D51AFC3D99}</Project>
<Name>DataPackages</Name>
</ProjectReference>
<ProjectReference Include="..\Hardware\WaterMeter\Genesis\GenesisCore\GenesisCore.csproj">
<Project>{04201E95-90A0-4B73-A72F-379739B2A3AE}</Project>
<Name>GenesisCore</Name>
</ProjectReference>
<ProjectReference Include="..\Hardware\WaterMeter\Genesis\Registers\Registers.csproj">
<Project>{F4AAF7E6-7333-4284-B735-E32DEB076C64}</Project>
<Name>Registers</Name>
</ProjectReference>
<ProjectReference Include="..\Hardware\WaterMeter\WaterMeterCore\WaterMeterCore.csproj">
<Project>{8203ABB8-38E5-472E-A742-33F38B7A74A6}</Project>
<Name>WaterMeterCore</Name>
</ProjectReference>
<ProjectReference Include="..\Hardware\WaterMeter\WaterMeterCore\WaterMeterRegisters\WaterMeterRegisters.csproj">
<Project>{26AFCF1E-1287-48B8-A506-32B1E8A0DD0E}</Project>
<Name>WaterMeterRegisters</Name>
</ProjectReference>
<ProjectReference Include="..\Metrology\Measurements\Measurements.csproj">
<Project>{6CCDB656-C676-4360-BABA-C4596AAD175D}</Project>
<Name>Measurements</Name>
</ProjectReference>
<ProjectReference Include="..\SoftwareAccessHelper\SoftwareAccessHelper.csproj">
<Project>{A33E3C6D-EAAE-4A20-A0EE-F9E6922FD029}</Project>
<Name>SoftwareAccessHelper</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -0,0 +1,266 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
namespace TempFlansh
{
public class TempHelper
{
[DllImport("GMH3x32E.dll")]
public static extern Int16 UniversalOpenCom(Int16 ini16COMPortNumber, UInt32 inui32BaudRate, Int16 inui16ConverterType, Int16 ini16Parity, Int16 ini16StoppBits);
[DllImport("GMH3x32E.dll")]
public static extern Int16 GMH_CloseCom();
[DllImport("GMH3x32E.dll")]
public static extern UInt32 GetAdditionalDelay();
[DllImport("GMH3x32E.dll")]
public static extern UInt32 SetAdditionalDelay(UInt32 inui32AdditionalDelay);
[DllImport("GMH3x32E.dll")]
unsafe public static extern Int16 GMH_GetType(Int32 inui32StatusCode, byte* outcarrStatusText);
[DllImport("GMH3x32E.dll")]
unsafe public static extern byte GMH_GetUnit(Int16 inui16UnitCode, byte* outcarrUnitText);
[DllImport("GMH3x32E.dll")]
unsafe public static extern Int16 GMH_Transmit(Int16 ini16DeviceAddress, Int16 ini16TransmitCode, Int16* refi16ptrPriority, double* refdblptrFloatValue, Int32* refi32ptrIntegerValue);
[DllImport("GMH3x32E.dll")]
unsafe public static extern byte GMH_GetMeasurement(Int16 ini16MeasurementCode, byte* outcarrMeasurementText);
[DllImport("GMH3x32E.dll")]
unsafe public static extern Int16 GMH_GetErrorMessageRet(Int16 ini16ErrorCode, byte* outcarrErrorText);
[DllImport("GMH3x32E.dll")]
unsafe public static extern Int16 GMH_GetStatusMessage(UInt32 inui32StatusCode, byte* outcarrStatusText);
[DllImport("GMH3x32E.dll")]
unsafe public static extern Int16 GMH_GetErrorMessageFL(double indblErrorCode, byte* outcarrErrorText);
[DllImport("GMH3x32E.dll")]
public static extern Int16 GMH_GetVersionNumber();
[DllImport("GMH3x32E.dll")]
unsafe public static extern Int16 GMH_ReadLogger(Int16 ini16Adresse, UInt32 inui32FileNumber, UInt32* ini32ptrNumberOfData, double* inOADateptrStartDate, double* outdblarrLoggerData);
[DllImport("GMH3x32E.dll")]
unsafe public static extern Int16 GMH_SearchForComPorts(Int16* refi16ArrComPortNumbers, out Int16 outi16LenghtOfArray);
Int16 i16ErrorCode = -1;
Int16 i16GMHAddress = -1;
Int16 i16ArrayLength = -1;
Int16 i16AnzahlDerComPorts = -1;
Int16 i16ComPortNummer = -1;
Int16[] i16ArrComPortArray = new Int16[255];
Int32 i32GMHSerialNumber = -1;
String strGMHTypeString;
String strErrorMessage;
String strMeasurementText;
String strUnitText;
public enum GHM_TransmitFunktion : short
{
AnzeigewertLesen = 0,
AnzeigewertSetzen,
//2
SystemstatusLesen = 3,
ACK,
//5
MinwertspeicherLesen = 6,
MaxwertspeicherLesen = 7,
//8
//9
//10
//11
IDNummerLesen = 12,
AdresseZuweisen,
AdresseLesen,
//15
//16
//17
//18
//19
//20
//21
MinAlarmgrenzeLesen = 22,
MaxAlarmgrenzeLesen,
AlarmverzögerungLesen,
AlarmfunktionLesen,
//26
//27
//28
//29
//30
//31
KonfigurationsflagLesen = 32,
//33
//34
//35
//36
//37
//38
//39
//40
//41
SchaltausgangEinschaltpunktLesen = 42,
SchaltausgangEinschaltpunktSetzen,
SchaltausgangAusschaltpunktLesen,
SchaltausgangAusschaltpunktSetzen,
//46
//47
//48
//49
SchaltausgangVerzögerungLesen = 50,
SchaltausgangVerzögerungSetzen,
SchaltausgangFunktionLesen,
SchaltausgangFuntkonSetzen,
//54
//...
//99
StatusLöschenOderSetzen = 100,
//101
MinAlarmgrenzeSetzen = 103,
MaxAlarmgrenzeSetzen,
AlarmverzögerungSetzen,
AlarmfunktionSetzen,
//106
//...
//159
KonfigurationsflagSetzen = 160,
//161
//...
//173
MinwertspeicherSetzen = 174,
MaxwertspeicherSetzen,
MinMessbereichLesen,
MaxMessbereichLesen,
MessbereichEinheitLesen,
MessbereichDezimalpunktLesen,
MessbereichMessartLesen,
//181
//...
//190
AnzeigeMessartSetzen = 191,
MinAnzeigebereichSetzen,
MasAnzeigebereichSetzen,
AnzeigeEinheitSetzen,
AnzeigeDezimalpunktSetzen,
//196
//197
//198
AnzeigeMessartLesen = 199,
MinAnzeigebereichLesen,
MaxAnzeigebereichLesen,
AnzeigeeinheitLesen,
BatteriezustandLesen,
AnzeigeDezimalpunktLesen,
AnzeigeMessartErweiterungLesen,
//206
//207
KanalzahlLesen = 208,
MasterFunktion209,
ElektrodenzustandLesen,
Masterfunktion211,
Masterfunktion212,
Masterfunktion213,
SteigungsKorrekturLesen = 214,
SteigungsKorrekturSetzen,
OffsetkorrekturLesen,
OffsetkorrekturSetzen,
KorrekturfaktorFürOberflächenMessungLesen,
KorrekturfaktorFürOberflächenMessungSetzen,
AltitudeLesen,
AltitudeSetzen,
AbschaltverzögerungLesen,
AbschaltverzögerungSetzen,
LoggerdatenLesen = 224,
LoggerzyklusLesen,
LoggerzyklusSetzen,
LoggeraufzeichnnungStarten,
AnzahlDerLoggerDatenLesen,
LoggerzustandLesen,
LoggerLesezeigerSetzen,
LoggerStartStoppzeitLesen,
LoggerStartStoppzeitSetzen,
EchtzeituhrLesen = 233,
EchtzeituhrSetzen,
ZeitpunktDerLetztenZeitkorrekturLesen,
LoggerspeichergrösseLesen,
LoggerFilezahlLesen,
LoggerFilezeigerSetzen,
LoggerFilelesenAufzeichnungInfo,
SonsormodulRücksetzen,
SensormodulNeustart,
//242
//...
//247
GerätespezifischeFunktion = 248,
//249
//...
//253
ProgrammkennungLesen = 254,
//255
//...
//259
LoggerdatenLesenManuellerLogger = 260,
GrösseFreierLoggerspeicherLesen,
AnzahlFreieLoggerfilesLesen,
LoggerGilelesenKanalinfo
}
public enum Sprache : short
{
Deutsch = 0x0000,
Englisch = 0x1000,
Tschechisch = 0x2000,
Spanisch = 0x3000,
}
public enum Fehlermeldungen : short
{
NegativeQuittung = -38,
KonnteNachrichtNichtSendenCTSTimeout,
RückgabewetIstFehlercode,
EchodatenUnvollständig,
KeineEchodatenEmpfangen,
WertAusserhalbDesGültigenBereichs,
FFeldNichtKorrekt,
DezimalPunktInformationenUngültig,
ÜbergebenerCodeUngültig = -30,
EchodatenNichtIdentisch,
Testcode,
KonntePortNichtSchliessen,
RückgeleseneAdresseFalsch,
CRCCodeFalsch,
NachrichtenlängeFalsch,
SensormodulAntwortetNicht,
KonnteNachrichtNichtSenden,
KonnteSchnittstelleNichtInitialisieren,
KonnteDCBNichtBilden = -20,
NichtUnterstützteBaudrate = -12,
UngültigeBytegrösse = -11,
HardwareNichtVorhanden = -10,
PegelwandlerWirdNichtUnterstützt = -6,
FehlerInStandardParametern,
KannKeineWarteschlangeEinrichten,
PortNichtBereit,
PortBereitsGeöffnet,
UngültigePortNummer,
OK = 0,
}
public double ReadCurrentDisplayValue()
{
Int16 i16Priority;
double dblFloatValue;
Int32 i32IntergerValue;
unsafe
{
this.i16ErrorCode = GMH_Transmit(1, (Int16)GHM_TransmitFunktion.AnzeigewertLesen, &i16Priority, &dblFloatValue, &i32IntergerValue);
}
if (i16ErrorCode < 0)
{
return double.MinValue;
}
else
{
return dblFloatValue;
}
}
}
}

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net472" />
</packages>

View File

@ -42,6 +42,36 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == '_MANUAL_CONTROL|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\_MANUAL_CONTROL\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>

View File

@ -34,6 +34,24 @@
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />

View File

@ -58,11 +58,14 @@
this.button3 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.groupBox6 = new System.Windows.Forms.GroupBox();
this.lblRadioExt = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.lblSENSUSRADIO_MainAlarmMask = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.btnReadMain = new System.Windows.Forms.Button();
this.lblRadioExt = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.button5 = new System.Windows.Forms.Button();
this.button6 = new System.Windows.Forms.Button();
this.button7 = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
@ -73,11 +76,11 @@
//
// btnConnect
//
this.btnConnect.Location = new System.Drawing.Point(122, 6);
this.btnConnect.Location = new System.Drawing.Point(9, 46);
this.btnConnect.Name = "btnConnect";
this.btnConnect.Size = new System.Drawing.Size(85, 30);
this.btnConnect.TabIndex = 6;
this.btnConnect.Text = "Connect";
this.btnConnect.Text = "1. Connect";
this.btnConnect.UseVisualStyleBackColor = true;
this.btnConnect.Click += new System.EventHandler(this.btnConnect_Click);
//
@ -329,9 +332,9 @@
//
this.groupBox5.Controls.Add(this.button2);
this.groupBox5.Controls.Add(this.button1);
this.groupBox5.Location = new System.Drawing.Point(9, 44);
this.groupBox5.Location = new System.Drawing.Point(9, 270);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(503, 778);
this.groupBox5.Size = new System.Drawing.Size(503, 552);
this.groupBox5.TabIndex = 18;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "Alarm thresholds ";
@ -358,7 +361,7 @@
//
// button3
//
this.button3.Location = new System.Drawing.Point(213, 6);
this.button3.Location = new System.Drawing.Point(1130, 378);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(85, 30);
this.button3.TabIndex = 19;
@ -368,7 +371,7 @@
//
// button4
//
this.button4.Location = new System.Drawing.Point(304, 6);
this.button4.Location = new System.Drawing.Point(1221, 378);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(85, 30);
this.button4.TabIndex = 20;
@ -390,6 +393,24 @@
this.groupBox6.TabStop = false;
this.groupBox6.Text = "Radio Main";
//
// lblRadioExt
//
this.lblRadioExt.AutoSize = true;
this.lblRadioExt.Location = new System.Drawing.Point(8, 120);
this.lblRadioExt.Name = "lblRadioExt";
this.lblRadioExt.Size = new System.Drawing.Size(10, 13);
this.lblRadioExt.TabIndex = 17;
this.lblRadioExt.Text = "-";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(7, 97);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(188, 13);
this.label5.TabIndex = 16;
this.label5.Text = "SENSUSRADIO_ExtendedAlarmMask";
//
// lblSENSUSRADIO_MainAlarmMask
//
this.lblSENSUSRADIO_MainAlarmMask.AutoSize = true;
@ -418,29 +439,44 @@
this.btnReadMain.UseVisualStyleBackColor = true;
this.btnReadMain.Click += new System.EventHandler(this.btnReadMain_Click);
//
// lblRadioExt
// button5
//
this.lblRadioExt.AutoSize = true;
this.lblRadioExt.Location = new System.Drawing.Point(8, 120);
this.lblRadioExt.Name = "lblRadioExt";
this.lblRadioExt.Size = new System.Drawing.Size(10, 13);
this.lblRadioExt.TabIndex = 17;
this.lblRadioExt.Text = "-";
this.button5.Location = new System.Drawing.Point(1396, 57);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(59, 87);
this.button5.TabIndex = 21;
this.button5.Text = "button5";
this.button5.UseVisualStyleBackColor = true;
this.button5.Click += new System.EventHandler(this.button5_Click);
//
// label5
// button6
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(7, 97);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(188, 13);
this.label5.TabIndex = 16;
this.label5.Text = "SENSUSRADIO_ExtendedAlarmMask";
this.button6.Location = new System.Drawing.Point(101, 46);
this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(166, 30);
this.button6.TabIndex = 22;
this.button6.Text = "2. Update Alarms for Mexico";
this.button6.UseVisualStyleBackColor = true;
this.button6.Click += new System.EventHandler(this.button6_Click);
//
// button7
//
this.button7.Location = new System.Drawing.Point(273, 46);
this.button7.Name = "button7";
this.button7.Size = new System.Drawing.Size(189, 31);
this.button7.TabIndex = 23;
this.button7.Text = "3., Abmelden vom Zähler";
this.button7.UseVisualStyleBackColor = true;
this.button7.Click += new System.EventHandler(this.button7_Click);
//
// FrmAlarmMng
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1525, 830);
this.Controls.Add(this.button7);
this.Controls.Add(this.button6);
this.Controls.Add(this.button5);
this.Controls.Add(this.groupBox6);
this.Controls.Add(this.button4);
this.Controls.Add(this.button3);
@ -506,6 +542,9 @@
private System.Windows.Forms.Button btnReadMain;
private System.Windows.Forms.Label lblRadioExt;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Button button6;
private System.Windows.Forms.Button button7;
//CUSTOMER_ExcessFlowVolumeThreshold UInt32 Flow rate above which broken pipe alarm is set in 1/256 l/h 0 4294967295 639999

View File

@ -1,8 +1,10 @@
using ByteArrayStyle;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
@ -129,31 +131,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
}
private void btnConnect_Click(Object sender, EventArgs e)
{
Int32 slotNR = 0;
if (!string.IsNullOrEmpty(cbComSlot.SelectedItem.ToString()) &&
int.TryParse(cbComSlot.SelectedItem.ToString(), out slotNR))
{
try
{
_meterBatch.RemoveAllMeters();
_currentGenesis = new GenesisMeter();
_currentGenesis.SetupFromConfigFile(slotNR);
_currentGenesis.EnableAutoLogon();
_meterBatch.AddMeter(_currentGenesis);
_meterBatch.MetersLogin();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
private void btnRead_Click(Object sender, EventArgs e)
{
@ -407,5 +385,153 @@ namespace Xylem.Common.Ui.GenesisToolBox
_currentGenesis.WriteRegister("SENSUSRADIO_SYSTEMSTATE", 0xFF, true, false);
}
}
private void button5_Click(object sender, EventArgs e)
{
if (_currentGenesis != null && _currentGenesis.IsLoggedOn)
{
_currentGenesis.ResetAlarm(GenesisMeter.Alarm.ALL);
}
}
private void finishMeter(GenesisMeter Meter)
{
Meter.ResetAlarm(GenesisMeter.Alarm.ALL);//(true, new byte[] { 0x00, 0x00, 0x00, 0x01 });
Meter.SetLcdText(true, new byte[] { 0x00, 0x00, 0x00, 0x01 });
Meter.ResetAlarm(GenesisMeter.Alarm.EMPTY_PIPE);//(true, new byte[] { 0x00, 0x00, 0x00, 0x01 });
_currentGenesis.WriteRegister(Register.Mertrologyasst.PulseMode, 5, true, true);
var useRadio = true;
if (useRadio)
{
if (Meter.StoreAllApps())
{
var writeList = new List<bool>();
writeList.Add(Meter.WriteRegister("SENSUSRADIO_SystemState", 1, true, false));
writeList.Add(Meter.WriteRegister("SENSUSRADIO_MainAlarmMask", 0, true, false));
writeList.Add(Meter.WriteRegister("SENSUSRADIO_ExtendedAlarmMask", 0, true, false));
writeList.Add(Meter.WriteRegister("SENSUSRADIO_SystemState", 0xFF, true, false));
//Thread.Sleep(5000);
Meter.Logout();
Thread.Sleep(5000);
Meter.ReLogin();
var radioResetSuccess = Meter.ReadRegister("SENSUSRADIO_SystemState");
var SENSUSRADIO_MainAlarmMask = Meter.ReadRegister("SENSUSRADIO_MainAlarmMask");
var SENSUSRADIO_ExtendedAlarmMask = Meter.ReadRegister("SENSUSRADIO_ExtendedAlarmMask");
}
}
}
private void btnConnect_Click(Object sender, EventArgs e)
{
Int32 slotNR = 0;
if (!string.IsNullOrEmpty(cbComSlot.SelectedItem.ToString()) &&
int.TryParse(cbComSlot.SelectedItem.ToString(), out slotNR))
{
try
{
button6.Enabled = false;
button7.Enabled = false;
_meterBatch.RemoveAllMeters();
_currentGenesis = new GenesisMeter();
_currentGenesis.SetupFromConfigFile(slotNR);
// _currentGenesis.EnableAutoLogon();
_meterBatch.AddMeter(_currentGenesis);
if (_currentGenesis.Login())
{
_currentGenesis.WriteRegister(Register.Mertrologyasst.PulseMode, 0);
button6.Enabled = true;
button7.Enabled = false;
MessageBox.Show("Weiter");
}
else
{
MessageBox.Show("Noch mal 1. Connect");
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
private void button6_Click(object sender, EventArgs e)
{
_currentGenesis.WriteRegister("CUSTOMER_AlarmEnableMask", new byte[] { 0x00, 0x00, 0x80, 0x53 }.Reverse().ToArray());
_currentGenesis.WriteRegister("CUSTOMER_AlarmBroadcastMask", new byte[] { 0x00, 0x00, 0x1f, 0xdc }.Reverse().ToArray());
_currentGenesis.WriteRegister("CUSTOMER_AlarmVisualMask", new byte[] { 0x00, 0x00, 0x1f, 0xdc }.Reverse().ToArray());
ReadAlarm("CUSTOMER_AlarmEnableMask", lblAEM, clbAEM);
ReadAlarm("CUSTOMER_AlarmBroadcastMask", lblABM, clbABM);
ReadAlarm("CUSTOMER_AlarmVisualMask", lblAVM, clbAVM);
var cAlarm = _currentGenesis.GetAlarms();
//MessageBox.Show($"Checkalarm EMPTY_PIPE = { _currentGenesis.HasAlarms(GenesisMeter.Alarm.EMPTY_PIPE)}");
bool retry = false;
bool roland = false;
if (lblAEM.Text == "00-00-80-53" && lblABM.Text == "00-00-1F-DC" && lblAVM.Text == "00-00-1F-DC")
{
if (cAlarm == GenesisMeter.Alarm.EMPTY_PIPE)
{
MessageBox.Show("weiter");
}
else
{
MessageBox.Show("Emptypipe fehlt bitte vor dem verpacken überprüfen");
}
button7.Enabled = true;
return;
}
else
{
MessageBox.Show("fehler");
}
}
private void button7_Click(object sender, EventArgs e)
{
try
{
finishMeter(_currentGenesis);
File.AppendAllText("WriteLines.txt", _currentGenesis.PcbId + "mit Update;");
MessageBox.Show("fertig");
button6.Enabled = false;
button7.Enabled = false;
}
catch (Exception ex)
{
File.AppendAllText("WriteLinesError.txt", ex.Message );
if (ex.Message.Contains("Check the configuration.json for latest version!"))
{
_currentGenesis.Login();
MessageBox.Show("Wiederholen 3.");
}
MessageBox.Show("fehler");
}
}
}
}

View File

@ -288,10 +288,10 @@ namespace Xylem.Common.Ui.GenesisToolBox
{
actionResult = null;
setActionResult(_currentGenesis.WriteRegister("GENESISFLOW_SealDisplay", 0));
setActionResult(_currentGenesis.WriteRegister("CUSTOMER_Locale", 208));
setActionResult(_currentGenesis.WriteRegister("CUSTOMER_Locale", 0));
setActionResult(_currentGenesis.WriteRegister("GENESISFLOW_DisplayPow10", 253));
setActionResult(_currentGenesis.WriteRegister("GENESISFLOW_DisplayUnits", 0));
setActionResult(_currentGenesis.WriteRegister("METROLOGYASST_FlowUnits", 4));
setActionResult(_currentGenesis.WriteRegister("METROLOGYASST_FlowUnits", 1));
setActionResult(_currentGenesis.StoreAllApps());
setActionResult(_currentGenesis.WriteRegister("SENSUSRADIO_SYSTEMSTATE", 0xFF, true, false));
}

View File

@ -999,6 +999,10 @@ namespace Xylem.Common.Ui.GenesisToolBox
}
private Boolean CheckUpdateEnabled()
{
SetControlDownloadsUnlocked();
return true;
//this check has been placed here to force display update
if (_meterFwUpdate != null && _currentGenesis != null &&
_packageFileToFileAppsValidated &&

View File

@ -28,42 +28,75 @@
/// </summary>
private void InitializeComponent()
{
this.ctlCheckTestBenchReady1 = new XylemCommonUiLegacyGenCtl.ctlBenchRdy();
this.btnCheckAll = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
this.textBox2 = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// ctlCheckTestBenchReady1
// textBox1
//
this.ctlCheckTestBenchReady1.Location = new System.Drawing.Point(12, 58);
this.ctlCheckTestBenchReady1.Name = "ctlCheckTestBenchReady1";
this.ctlCheckTestBenchReady1.Size = new System.Drawing.Size(1175, 917);
this.ctlCheckTestBenchReady1.TabIndex = 15;
this.textBox1.Location = new System.Drawing.Point(120, 120);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(367, 20);
this.textBox1.TabIndex = 0;
//
// btnCheckAll
// button1
//
this.btnCheckAll.Location = new System.Drawing.Point(224, 12);
this.btnCheckAll.Name = "btnCheckAll";
this.btnCheckAll.Size = new System.Drawing.Size(90, 40);
this.btnCheckAll.TabIndex = 14;
this.btnCheckAll.Text = "CheckBatch";
this.btnCheckAll.UseVisualStyleBackColor = true;
this.btnCheckAll.Click += new System.EventHandler(this.btnCheckAll_Click);
this.button1.Location = new System.Drawing.Point(274, 25);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(132, 47);
this.button1.TabIndex = 1;
this.button1.Text = "button1";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// panel1
//
this.panel1.Location = new System.Drawing.Point(554, 112);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(450, 30);
this.panel1.TabIndex = 2;
//
// panel2
//
this.panel2.Location = new System.Drawing.Point(554, 156);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(450, 30);
this.panel2.TabIndex = 4;
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(120, 164);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(367, 20);
this.textBox2.TabIndex = 3;
//
// FrmLegacyTestAppStart
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1378, 871);
this.Controls.Add(this.btnCheckAll);
this.Controls.Add(this.ctlCheckTestBenchReady1);
this.Controls.Add(this.panel2);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.panel1);
this.Controls.Add(this.button1);
this.Controls.Add(this.textBox1);
this.Name = "FrmLegacyTestAppStart";
this.Text = "FrmLegacyTestApp";
this.Load += new System.EventHandler(this.FrmLegacyTestAppStart_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private XylemCommonUiLegacyGenCtl.ctlBenchRdy ctlCheckTestBenchReady1;
private System.Windows.Forms.Button btnCheckAll;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.TextBox textBox2;
}
}

View File

@ -1,5 +1,6 @@
using System;
using System.Windows.Forms;
using XylemCommonUiLegacyGenCtl;
namespace GenesisToolBox
{
@ -9,14 +10,40 @@ namespace GenesisToolBox
{
InitializeComponent();
}
private void btnCheckAll_Click(object sender, EventArgs e)
private ctlEasyMeterRdy ctlEasyMeterRdy1;
private ctlEasyMeterRdy ctlEasyMeterRdy2;
private void FrmLegacyTestAppStart_Load(object sender, EventArgs e)
{
ctlEasyMeterRdy1 = new ctlEasyMeterRdy(1);
ctlEasyMeterRdy2 = new ctlEasyMeterRdy(2);
ctlCheckTestBenchReady1.Init(10);
panel1.Controls.Add(ctlEasyMeterRdy1);
panel2.Controls.Add(ctlEasyMeterRdy2);
ctlEasyMeterRdy1.Expand += CtlEasyMeterRdy1_Expand;
ctlEasyMeterRdy2.Expand += CtlEasyMeterRdy2_Expand;
CtlEasyMeterRdy1_Expand(null, new PopEventArgs() { Show = false });
CtlEasyMeterRdy2_Expand(null, new PopEventArgs() { Show = false });
}
private void CtlEasyMeterRdy1_Expand(object sender, PopEventArgs e)
{
}
private void CtlEasyMeterRdy2_Expand(object sender, PopEventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
ctlEasyMeterRdy1.Start(false);
}
}
}

View File

@ -109,14 +109,63 @@ namespace Xylem.Common.Ui.GenesisToolBox
foreach (var fileName in fl)
{
var gg = RegisterConverter.ConvertTo<UInt32>(_currentGenesis.ReadRegister(Register.System.MonotonicSeconds));
print.AppendLine($"Reading the log files");
print.AppendLine($"Reading the log files {gg}");
var fileData = new List<Byte>();
var mf = new Hardware.WaterMeter.Genesis.GenesisFile.MeterFile(_currentGenesis);
//var r = mf.ReadMeterFile($"{1}\\{fileName}", fileData);
//data.Add(fileName, fileData);
var listBack = new List<Byte>();
var namelist = new List<String>();
//write file name to meter with meter open command, don't wait for response
_currentGenesis.WriteRegister(Register.Configexchange.FileOpen, $"{1}\\{fileName}", false);
//write access flag
_currentGenesis.WriteRegister(Register.Configexchange.FileOpen, "r", false);
//CONFIGEXCHANGE_FOpen -> 02040400315c6c6f67696e646578000072000000
//get the file pointer
var _filePointer = RegisterConverter.ConvertTo<Int32>(_currentGenesis.ReadRegister(
Register.Configexchange.FileOpen));
_currentGenesis.WriteRegister("CONFIGEXCHANGE_FSeek", _filePointer, false);
_currentGenesis.WriteRegister("CONFIGEXCHANGE_FSeek", 0, false);
_currentGenesis.WriteRegister("CONFIGEXCHANGE_FSeek", 2, false);
_currentGenesis.WriteRegister("CONFIGEXCHANGE_FTell", _filePointer, false);
var fixedReadBackCount = RegisterConverter.ConvertTo<Int32>(_currentGenesis.ReadRegister("CONFIGEXCHANGE_FTell"));
_currentGenesis.WriteRegister("CONFIGEXCHANGE_FSeek", _filePointer, false);
_currentGenesis.WriteRegister("CONFIGEXCHANGE_FSeek", 0, false);
_currentGenesis.WriteRegister("CONFIGEXCHANGE_FSeek", 0, false);
_currentGenesis.WriteRegister("CONFIGEXCHANGE_FRead", 1, false);
_currentGenesis.WriteRegister("CONFIGEXCHANGE_FRead", fixedReadBackCount, false);
_currentGenesis.WriteRegister("CONFIGEXCHANGE_FRead", _filePointer, false);
var count_ret = RegisterConverter.ConvertTo<Int32>(_currentGenesis.ReadRegister("CONFIGEXCHANGE_FRead"));
while (count_ret != 0)
{
var numRead = 0;
//
while (numRead <= count_ret / 4)
{
var readAdd = _currentGenesis.ReadRegister("CONFIGEXCHANGE_FRead");
if (readAdd != null)
{
fileData.AddRange(readAdd);
}
numRead = numRead + 1;
}
count_ret = RegisterConverter.ConvertTo<Int32>(_currentGenesis.ReadRegister("CONFIGEXCHANGE_FRead"));
}
_currentGenesis.WriteRegister(Register.Configexchange.FileClose, _filePointer);
data.Add(fileName, fileData);
}
var loglines = new List<String>();
@ -125,8 +174,8 @@ namespace Xylem.Common.Ui.GenesisToolBox
print.AppendLine(item.Key);
print.AppendLine($"all data: { ByteArrayStyle.ByteStyler.ToString(item.Value.ToArray())}");
if (item.Value != null && item.Value.Count >= 4)
{
var logtype = item.Value.GetRange(0, 1).First().ToString();
@ -198,32 +247,51 @@ namespace Xylem.Common.Ui.GenesisToolBox
}
private List<String> get_filenames(GenesisMeter m, Int32 drive = 1)
{
var mf = new Hardware.WaterMeter.Genesis.GenesisFile.MeterFile(m);
var by = new List<string>();
var r = mf.ReadMeterFileCatalog(out by,drive.ToString(), "logindex");
var i = 0;
var intlist = new List<UInt32>();
var listBack = new List<Byte>();
var namelist = new List<String>();
while (i * 4 < by.Count)
{
//var a = BitConverter.ToUInt32(by.GetRange(i * 4, 4).ToArray(), 0);
//intlist.Add(a);
//write file name to meter with meter open command, don't wait for response
m.WriteRegister(Register.Configexchange.FileOpen, $"1\\logindex", false);
//write access flag
m.WriteRegister(Register.Configexchange.FileOpen, "r", false);
//CONFIGEXCHANGE_FOpen -> 02040400315c6c6f67696e646578000072000000
i = i + 1;
}
//get the file pointer
var _filePointer = RegisterConverter.ConvertTo<Int32>(m.ReadRegister(
Register.Configexchange.FileOpen));
intlist.Sort();
foreach (var item in intlist)
//set timeout back to default value
//CONFIGEXCHANGE_FOpen <- 030a0000584400209ae0 (536888408)
var eof = false;
while (!eof)
{
namelist.Add(item.ToString("X8"));
//CONFIGEXCHANGE_FEOF-> 9b2007020b0904584400207a27(XD)
m.WriteRegister("CONFIGEXCHANGE_FEOF", _filePointer, false);
//CONFIGEXCHANGE_FEOF <-030a0000000000004194 (0)
var res = RegisterConverter.ConvertTo<Int32>(m.ReadRegister("CONFIGEXCHANGE_FEOF"));
if (res != 0)
{
eof = true;
break;
}
m.WriteRegister("CONFIGEXCHANGE_FRead", 4, false);
m.WriteRegister("CONFIGEXCHANGE_FRead", 1, false);
m.WriteRegister("CONFIGEXCHANGE_FRead", _filePointer, false);
var resLength = RegisterConverter.ConvertTo<Int32>(m.ReadRegister("CONFIGEXCHANGE_FRead"));
var filecontent = m.ReadRegister("CONFIGEXCHANGE_FRead", resLength);
namelist.Add(RegisterConverter.ConvertTo<Int32>(filecontent).ToString("X8"));
}
_currentGenesis.WriteRegister(Register.Configexchange.FileClose, _filePointer);
return namelist;
}
private void label2_Click(object sender, EventArgs e)

View File

@ -42,6 +42,10 @@
this.label3 = new System.Windows.Forms.Label();
this.tbxRegExMatch = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.cbxRemoveLastTab = new System.Windows.Forms.CheckBox();
this.nudFileLength = new System.Windows.Forms.NumericUpDown();
this.label5 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.nudFileLength)).BeginInit();
this.SuspendLayout();
//
// tbxFilePathSource
@ -51,6 +55,7 @@
this.tbxFilePathSource.ReadOnly = true;
this.tbxFilePathSource.Size = new System.Drawing.Size(443, 20);
this.tbxFilePathSource.TabIndex = 5;
this.tbxFilePathSource.TextChanged += new System.EventHandler(this.tbxFilePathSource_TextChanged);
//
// label1
//
@ -60,6 +65,7 @@
this.label1.Size = new System.Drawing.Size(88, 13);
this.label1.TabIndex = 4;
this.label1.Text = "Source File Path:";
this.label1.Click += new System.EventHandler(this.label1_Click);
//
// btnOpenUpdateDirectory
//
@ -155,11 +161,45 @@
this.label4.TabIndex = 15;
this.label4.Text = "IsMatch RegEx:";
//
// cbxRemoveLastTab
//
this.cbxRemoveLastTab.AutoSize = true;
this.cbxRemoveLastTab.Location = new System.Drawing.Point(29, 162);
this.cbxRemoveLastTab.Name = "cbxRemoveLastTab";
this.cbxRemoveLastTab.Size = new System.Drawing.Size(105, 17);
this.cbxRemoveLastTab.TabIndex = 16;
this.cbxRemoveLastTab.Text = "RemoveLastTab";
this.cbxRemoveLastTab.UseVisualStyleBackColor = true;
//
// nudFileLength
//
this.nudFileLength.Location = new System.Drawing.Point(299, 161);
this.nudFileLength.Maximum = new decimal(new int[] {
-889552896,
2095475,
0,
0});
this.nudFileLength.Name = "nudFileLength";
this.nudFileLength.Size = new System.Drawing.Size(121, 20);
this.nudFileLength.TabIndex = 17;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(162, 161);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(131, 13);
this.label5.TabIndex = 18;
this.label5.Text = "Lines per File (0 = no limit):";
//
// FrmLogSplit
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(784, 561);
this.Controls.Add(this.label5);
this.Controls.Add(this.nudFileLength);
this.Controls.Add(this.cbxRemoveLastTab);
this.Controls.Add(this.label4);
this.Controls.Add(this.tbxRegExMatch);
this.Controls.Add(this.tbxFilePathCorrupted);
@ -177,6 +217,7 @@
this.Name = "FrmLogSplit";
this.Text = "FrmLogSplit";
this.Load += new System.EventHandler(this.FrmLogSplit_Load);
((System.ComponentModel.ISupportInitialize)(this.nudFileLength)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@ -198,5 +239,8 @@
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox tbxRegExMatch;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.CheckBox cbxRemoveLastTab;
private System.Windows.Forms.NumericUpDown nudFileLength;
private System.Windows.Forms.Label label5;
}
}

View File

@ -37,6 +37,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
private void btnOpenUpdateDirectory_Click(Object sender, EventArgs e)
{
if (openFileDialog.ShowDialog() != DialogResult.OK)
{
return;
@ -47,7 +48,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
tbxFilePathDestMisc.Text = $"{tbxFilePathSource.Text}_NoMatch";
tbxFilePathCorrupted.Text = $"{tbxFilePathSource.Text}_Corrupted";
foreach (var item in FileMatchControls)
{
@ -87,7 +88,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
var regexMatch = tbxRegExMatch.Text;
var serachDic = new Dictionary<String, TextFileMatchControl>();
bool removeLastTab = cbxRemoveLastTab.Checked;
foreach (var item in FileMatchControls)
{
item.PrepareRun();
@ -106,19 +107,42 @@ namespace Xylem.Common.Ui.GenesisToolBox
foreach (var line in lines)
{
var match = false;
var matchingStr = line.Replace(" ", "");
var matchingStr = "";
if (removeLastTab)
{
matchingStr = line.Substring(0, line.Trim().LastIndexOf(' '));
}
matchingStr = matchingStr.Replace(" ", "");
if (matchingStr.Length >= 16)
{
matchingStr = matchingStr.Substring(0, matchingStr.Length - 15);
}
matchingStr = matchingStr.Replace("@h", "");
matchingStr = matchingStr.Replace("@f", "");
matchingStr = matchingStr.Replace("-", "");
matchingStr = matchingStr.Replace(":", "");
if (matchingStr.Length >= 26)
{
matchingStr = matchingStr.Substring(26, matchingStr.Length - 26);
}
if (System.Text.RegularExpressions.Regex.IsMatch(matchingStr, @"^[0-9A-F]+$"))
{
var finLine = line;
if (removeLastTab)
{
finLine = line.Substring(0, line.Trim().LastIndexOf(' '));
}
foreach (var item in serachDic)
{
if (line.Contains(item.Key))
if (finLine.Contains(item.Key))
{
if (item.Value.AddText(line))
if (item.Value.AddText(finLine))
{
match = true;
}
@ -129,7 +153,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
}
if (!match)
{
sbNoMatch.AppendLine(line);
sbNoMatch.AppendLine(finLine);
}
}
else
@ -139,11 +163,42 @@ namespace Xylem.Common.Ui.GenesisToolBox
}
File.WriteAllText(tbxFilePathDestMisc.Text, sbNoMatch.ToString());
File.WriteAllText(tbxFilePathCorrupted.Text, sbCorrupted.ToString());
int fileLines = (int)nudFileLength.Value;
foreach (var item in serachDic)
{
var fileName = item.Value.GetMainFile().Split('.')[0];
var fileType = item.Value.GetMainFile().Split('.')[1];
StringBuilder sb = new StringBuilder();
var lineToWrite = item.Value.getResult();
if (nudFileLength.Value < 1 || lineToWrite.Count <= fileLines)
{
lineToWrite.ForEach(l => sb.AppendLine(l));
File.WriteAllText(item.Value.GetMainFile(), sb.ToString());
}
else
{
for (int i = 0; i < (lineToWrite.Count / fileLines) + 1; i++)
{
sb = new StringBuilder();
if (i == (lineToWrite.Count / fileLines))
{
lineToWrite.GetRange(fileLines * i, lineToWrite.Count - (fileLines * i)).ForEach(l => sb.AppendLine(l));
}
else
{
lineToWrite.GetRange(fileLines * i, fileLines).ForEach(l => sb.AppendLine(l));
}
File.WriteAllText($"{fileName}P{i:D10}.{fileType}", sb.ToString());
}
}
File.WriteAllText(item.Value.GetMainFile(), item.Value.getResult());
}
MessageBox.Show("done");
@ -157,6 +212,14 @@ namespace Xylem.Common.Ui.GenesisToolBox
}
private void tbxFilePathSource_TextChanged(object sender, EventArgs e)
{
}
private void label1_Click(object sender, EventArgs e)
{
}
}
}

View File

@ -0,0 +1,153 @@
namespace Xylem.Common.Ui.GenesisToolBox
{
partial class FrmPressure
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.label1 = new System.Windows.Forms.Label();
this.cblSlots = new System.Windows.Forms.CheckedListBox();
this.btnStart = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
this.label2 = new System.Windows.Forms.Label();
this.timer1 = new System.Windows.Forms.Timer(this.components);
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(4, 16);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(36, 13);
this.label1.TabIndex = 8;
this.label1.Text = "Slot(s)";
//
// cblSlots
//
this.cblSlots.FormattingEnabled = true;
this.cblSlots.Items.AddRange(new object[] {
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10"});
this.cblSlots.Location = new System.Drawing.Point(46, 12);
this.cblSlots.Name = "cblSlots";
this.cblSlots.Size = new System.Drawing.Size(114, 154);
this.cblSlots.TabIndex = 7;
//
// btnStart
//
this.btnStart.Location = new System.Drawing.Point(166, 93);
this.btnStart.Name = "btnStart";
this.btnStart.Size = new System.Drawing.Size(116, 73);
this.btnStart.TabIndex = 9;
this.btnStart.Text = "Start";
this.btnStart.UseVisualStyleBackColor = true;
this.btnStart.Click += new System.EventHandler(this.btnStart_Click);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(46, 193);
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(236, 237);
this.textBox1.TabIndex = 10;
//
// numericUpDown1
//
this.numericUpDown1.Location = new System.Drawing.Point(169, 28);
this.numericUpDown1.Maximum = new decimal(new int[] {
1440,
0,
0,
0});
this.numericUpDown1.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.numericUpDown1.Name = "numericUpDown1";
this.numericUpDown1.Size = new System.Drawing.Size(65, 20);
this.numericUpDown1.TabIndex = 11;
this.numericUpDown1.Value = new decimal(new int[] {
60,
0,
0,
0});
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(166, 12);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(116, 13);
this.label2.TabIndex = 12;
this.label2.Text = "Read pressure rate in s";
//
// timer1
//
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// FrmPressure
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(914, 430);
this.Controls.Add(this.label2);
this.Controls.Add(this.numericUpDown1);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.btnStart);
this.Controls.Add(this.label1);
this.Controls.Add(this.cblSlots);
this.Name = "FrmPressure";
this.Text = "FrmLegacyControl";
this.Load += new System.EventHandler(this.FrmPressure_Load);
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.CheckedListBox cblSlots;
private System.Windows.Forms.Button btnStart;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.NumericUpDown numericUpDown1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Timer timer1;
}
}

View File

@ -0,0 +1,148 @@
using Newtonsoft.Json;
using System;
using System.IO;
using System.Text;
using System.Windows.Forms;
using Xylem.Common.CommonCore.Consts;
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig;
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
namespace Xylem.Common.Ui.GenesisToolBox
{
public partial class FrmPressure : Form
{
public FrmPressure()
{
InitializeComponent();
}
private void FrmPressure_Load(object sender, System.EventArgs e)
{
var configFile = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), nameof(Hardware.WaterMeter.Genesis), ProgramConfig.SerialConfigFileName);
if (!File.Exists(configFile))
{
configFile = Path.Combine(ProgramConfig.SerialConfigFileName);
if (!File.Exists(configFile))
{
throw new ApplicationException($"Configuration file {configFile} not found ");
}
}
if (!File.Exists(configFile))
{
return;
}
SlotConfig[] meterConfigList;
using (var tr = new StreamReader(configFile))
{
var _fileString = tr.ReadToEnd();
meterConfigList = JsonConvert.DeserializeObject<SlotConfig[]>(_fileString);
}
cblSlots.Items.Clear();
foreach (var item in meterConfigList)
{
cblSlots.Items.Add(item.Slot, false);
}
}
private void button1_Click(object sender, System.EventArgs e)
{
}
private void timer1_Tick(object sender, System.EventArgs e)
{
if (meterBatch != null)
{
var sb = new StringBuilder();
sb.Append($"{DateTime.Now} ;");
foreach (var item in meterBatch.ListOfMeters)
{
if (item is GenesisMeter meter)
{
try
{
if (meter.ReLogin())
{
var a = meter.WriteRegister("METROLOGYASST_PressureMeasure", 1, true);
if (a)
{
var toEinheit = RegisterConverter.ConvertTo<Int32>(meter.ReadRegister("METROLOGYASST_PressureMeasure"));
sb.Append($" {meter.Slot } : {toEinheit} Pa;");
meter.WriteLog($" Pressure : {toEinheit} Pa;");
}
}
}
catch (Exception ex)
{
sb.Append($" {meter.Slot } : {ex} ;");
}
}
}
textBox1.Text = textBox1.Text + System.Environment.NewLine + sb.ToString();
}
}
private MeterBatch meterBatch;
private void btnStart_Click(object sender, EventArgs e)
{
btnStart.Enabled = false;
try
{
if (!timer1.Enabled)
{
timer1.Interval = (int)numericUpDown1.Value * 1000;
timer1.Enabled = true;
meterBatch = new MeterBatch();
foreach (var item in cblSlots.CheckedItems)
{
var meter = new GenesisMeter();
meter.SetupFromConfigFile((int)item);
meterBatch.AddMeter(meter);
meter.Login();
meter.WriteRegister("METROLOGYASST_PressurePresent", true, true);
}
btnStart.Text = "Stop";
}
else
{
btnStart.Text = "Start";
meterBatch.Dispose();
timer1.Enabled = false;
}
}
catch (Exception ex)
{
btnStart.Text = "Start";
meterBatch.Dispose();
timer1.Enabled = false;
}
finally
{
btnStart.Enabled = true;
}
}
}
}

View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@ -0,0 +1,110 @@
using Logic.ProductionToProductMapper.Cordonel;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Xylem.Common.CommonCore.Configuration;
using Xylem.Common.Logic.SoftwareAccessHelper;
namespace Xylem.Common.Ui.GenesisToolBox
{
public partial class FrmProductionData : Form
{
public FrmProductionData()
{
InitializeComponent();
}
private void FrmProductionData_Load(object sender, EventArgs e)
{
cbxDn.Items.Clear();
foreach (MeterSize size in (MeterSize[])Enum.GetValues(typeof(MeterSize)))
{
cbxDn.Items.Add(size);
}
}
private void tabPage1_Click(object sender, EventArgs e)
{
cbxDn.Items.Clear();
foreach (MeterSize size in (MeterSize[])Enum.GetValues(typeof(MeterSize)))
{
cbxDn.Items.Add(size);
}
}
private void btnLoad_Click(object sender, EventArgs e)
{
load();
}
private void btnWrite_Click(object sender, EventArgs e)
{
if (cbxDn.SelectedItem is MeterSize selected)
{
var newParameter = new Dictionary<string, UInt32>();
foreach (var item in gbxParameter.Controls)
{
if (item is NumericUpDown nudtofind)
{
newParameter.Add(nudtofind.Name.Substring(3), (UInt32)nudtofind.Value);
}
}
var r = LocalWebRequest.PostRequestAsync($"{ ServiceUrls.GenesisFinalCheckServiceUrl()}/SetMetersizeProgrammingData?ParameterMeterSize={selected.GetHashCode()}", 3000, JsonConvert.SerializeObject(newParameter));
load();
}
}
private void load()
{
if (cbxDn.SelectedItem is MeterSize selected)
{
try
{
var r = LocalWebRequest.GetRequest($"{ ServiceUrls.GenesisFinalCheckServiceUrl()}GetMetersizeProgrammingData?MeterSize={selected.GetHashCode()}", 2000);
var dt = JsonConvert.DeserializeObject<Dictionary<string, UInt32>>(r);
foreach (var item in gbxParameter.Controls)
{
if (item is NumericUpDown nudtofind)
{
uint value = 0;
if (dt.TryGetValue(nudtofind.Name.Substring(3), out value))
{
nudtofind.Value = value;
}
}
}
}
catch (Exception ex )
{
MessageBox.Show(ex.Message);
}
}
}
private void cbxDn_SelectedIndexChanged(object sender, EventArgs e)
{
load();
gbxParameter.Enabled = true;
}
}
}

View File

@ -0,0 +1,325 @@
namespace Xylem.Common.Ui.GenesisToolBox
{
partial class FrmRawDataInterpreter
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.cbFVolumeCm = new System.Windows.Forms.CheckBox();
this.cbFTimeS = new System.Windows.Forms.CheckBox();
this.cbHChannel = new System.Windows.Forms.CheckBox();
this.cbHValidation = new System.Windows.Forms.CheckBox();
this.cbHTotalTimeOfFlightS = new System.Windows.Forms.CheckBox();
this.cbHDeltaTimeOfFlightS = new System.Windows.Forms.CheckBox();
this.cbHDeltaVolumeQm = new System.Windows.Forms.CheckBox();
this.cbHVolumeCm = new System.Windows.Forms.CheckBox();
this.cbHSampleIntervalS = new System.Windows.Forms.CheckBox();
this.cbHAmplitudeUpV = new System.Windows.Forms.CheckBox();
this.cbHAmplitudeDownV = new System.Windows.Forms.CheckBox();
this.cbHPulseWidthRatioUp = new System.Windows.Forms.CheckBox();
this.cbHPulseWidthRatioDown = new System.Windows.Forms.CheckBox();
this.cbHTemperatureDegC = new System.Windows.Forms.CheckBox();
this.cbHTimeS = new System.Windows.Forms.CheckBox();
this.tbxFilePathSource = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.btnOpenUpdateDirectory = new System.Windows.Forms.Button();
this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
this.tbxFilePathDest = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.btnWriteCsv = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// cbFVolumeCm
//
this.cbFVolumeCm.AutoSize = true;
this.cbFVolumeCm.Location = new System.Drawing.Point(143, 100);
this.cbFVolumeCm.Name = "cbFVolumeCm";
this.cbFVolumeCm.Size = new System.Drawing.Size(96, 17);
this.cbFVolumeCm.TabIndex = 12;
this.cbFVolumeCm.Text = "@F VolumeCm";
this.cbFVolumeCm.UseVisualStyleBackColor = true;
//
// cbFTimeS
//
this.cbFTimeS.AutoSize = true;
this.cbFTimeS.Location = new System.Drawing.Point(143, 123);
this.cbFTimeS.Name = "cbFTimeS";
this.cbFTimeS.Size = new System.Drawing.Size(76, 17);
this.cbFTimeS.TabIndex = 13;
this.cbFTimeS.Text = "@F TimeS";
this.cbFTimeS.UseVisualStyleBackColor = true;
//
// cbHChannel
//
this.cbHChannel.AutoSize = true;
this.cbHChannel.Location = new System.Drawing.Point(144, 157);
this.cbHChannel.Name = "cbHChannel";
this.cbHChannel.Size = new System.Drawing.Size(87, 17);
this.cbHChannel.TabIndex = 14;
this.cbHChannel.Text = "@H Channel";
this.cbHChannel.UseVisualStyleBackColor = true;
//
// cbHValidation
//
this.cbHValidation.AutoSize = true;
this.cbHValidation.Location = new System.Drawing.Point(144, 180);
this.cbHValidation.Name = "cbHValidation";
this.cbHValidation.Size = new System.Drawing.Size(94, 17);
this.cbHValidation.TabIndex = 15;
this.cbHValidation.Text = "@H Validation";
this.cbHValidation.UseVisualStyleBackColor = true;
//
// cbHTotalTimeOfFlightS
//
this.cbHTotalTimeOfFlightS.AutoSize = true;
this.cbHTotalTimeOfFlightS.Location = new System.Drawing.Point(144, 203);
this.cbHTotalTimeOfFlightS.Name = "cbHTotalTimeOfFlightS";
this.cbHTotalTimeOfFlightS.Size = new System.Drawing.Size(138, 17);
this.cbHTotalTimeOfFlightS.TabIndex = 16;
this.cbHTotalTimeOfFlightS.Text = "@H TotalTimeOfFlightS";
this.cbHTotalTimeOfFlightS.UseVisualStyleBackColor = true;
//
// cbHDeltaTimeOfFlightS
//
this.cbHDeltaTimeOfFlightS.AutoSize = true;
this.cbHDeltaTimeOfFlightS.Location = new System.Drawing.Point(143, 226);
this.cbHDeltaTimeOfFlightS.Name = "cbHDeltaTimeOfFlightS";
this.cbHDeltaTimeOfFlightS.Size = new System.Drawing.Size(139, 17);
this.cbHDeltaTimeOfFlightS.TabIndex = 17;
this.cbHDeltaTimeOfFlightS.Text = "@H DeltaTimeOfFlightS";
this.cbHDeltaTimeOfFlightS.UseVisualStyleBackColor = true;
//
// cbHDeltaVolumeQm
//
this.cbHDeltaVolumeQm.AutoSize = true;
this.cbHDeltaVolumeQm.Location = new System.Drawing.Point(143, 249);
this.cbHDeltaVolumeQm.Name = "cbHDeltaVolumeQm";
this.cbHDeltaVolumeQm.Size = new System.Drawing.Size(124, 17);
this.cbHDeltaVolumeQm.TabIndex = 18;
this.cbHDeltaVolumeQm.Text = "@H DeltaVolumeQm";
this.cbHDeltaVolumeQm.UseVisualStyleBackColor = true;
//
// cbHVolumeCm
//
this.cbHVolumeCm.AutoSize = true;
this.cbHVolumeCm.Location = new System.Drawing.Point(143, 272);
this.cbHVolumeCm.Name = "cbHVolumeCm";
this.cbHVolumeCm.Size = new System.Drawing.Size(98, 17);
this.cbHVolumeCm.TabIndex = 19;
this.cbHVolumeCm.Text = "@H VolumeCm";
this.cbHVolumeCm.UseVisualStyleBackColor = true;
//
// cbHSampleIntervalS
//
this.cbHSampleIntervalS.AutoSize = true;
this.cbHSampleIntervalS.Location = new System.Drawing.Point(143, 295);
this.cbHSampleIntervalS.Name = "cbHSampleIntervalS";
this.cbHSampleIntervalS.Size = new System.Drawing.Size(125, 17);
this.cbHSampleIntervalS.TabIndex = 20;
this.cbHSampleIntervalS.Text = "@H SampleIntervalS";
this.cbHSampleIntervalS.UseVisualStyleBackColor = true;
//
// cbHAmplitudeUpV
//
this.cbHAmplitudeUpV.AutoSize = true;
this.cbHAmplitudeUpV.Location = new System.Drawing.Point(142, 318);
this.cbHAmplitudeUpV.Name = "cbHAmplitudeUpV";
this.cbHAmplitudeUpV.Size = new System.Drawing.Size(115, 17);
this.cbHAmplitudeUpV.TabIndex = 21;
this.cbHAmplitudeUpV.Text = "@H AmplitudeUpV";
this.cbHAmplitudeUpV.UseVisualStyleBackColor = true;
//
// cbHAmplitudeDownV
//
this.cbHAmplitudeDownV.AutoSize = true;
this.cbHAmplitudeDownV.Location = new System.Drawing.Point(142, 341);
this.cbHAmplitudeDownV.Name = "cbHAmplitudeDownV";
this.cbHAmplitudeDownV.Size = new System.Drawing.Size(129, 17);
this.cbHAmplitudeDownV.TabIndex = 22;
this.cbHAmplitudeDownV.Text = "@H AmplitudeDownV";
this.cbHAmplitudeDownV.UseVisualStyleBackColor = true;
//
// cbHPulseWidthRatioUp
//
this.cbHPulseWidthRatioUp.AutoSize = true;
this.cbHPulseWidthRatioUp.Location = new System.Drawing.Point(142, 364);
this.cbHPulseWidthRatioUp.Name = "cbHPulseWidthRatioUp";
this.cbHPulseWidthRatioUp.Size = new System.Drawing.Size(141, 17);
this.cbHPulseWidthRatioUp.TabIndex = 23;
this.cbHPulseWidthRatioUp.Text = "@H PulseWidthRatioUp";
this.cbHPulseWidthRatioUp.UseVisualStyleBackColor = true;
//
// cbHPulseWidthRatioDown
//
this.cbHPulseWidthRatioDown.AutoSize = true;
this.cbHPulseWidthRatioDown.Location = new System.Drawing.Point(142, 385);
this.cbHPulseWidthRatioDown.Name = "cbHPulseWidthRatioDown";
this.cbHPulseWidthRatioDown.Size = new System.Drawing.Size(155, 17);
this.cbHPulseWidthRatioDown.TabIndex = 24;
this.cbHPulseWidthRatioDown.Text = "@H PulseWidthRatioDown";
this.cbHPulseWidthRatioDown.UseVisualStyleBackColor = true;
//
// cbHTemperatureDegC
//
this.cbHTemperatureDegC.AutoSize = true;
this.cbHTemperatureDegC.Checked = true;
this.cbHTemperatureDegC.CheckState = System.Windows.Forms.CheckState.Checked;
this.cbHTemperatureDegC.Location = new System.Drawing.Point(142, 408);
this.cbHTemperatureDegC.Name = "cbHTemperatureDegC";
this.cbHTemperatureDegC.Size = new System.Drawing.Size(135, 17);
this.cbHTemperatureDegC.TabIndex = 25;
this.cbHTemperatureDegC.Text = "@H TemperatureDegC";
this.cbHTemperatureDegC.UseVisualStyleBackColor = true;
//
// cbHTimeS
//
this.cbHTimeS.AutoSize = true;
this.cbHTimeS.Location = new System.Drawing.Point(142, 431);
this.cbHTimeS.Name = "cbHTimeS";
this.cbHTimeS.Size = new System.Drawing.Size(78, 17);
this.cbHTimeS.TabIndex = 26;
this.cbHTimeS.Text = "@H TimeS";
this.cbHTimeS.UseVisualStyleBackColor = true;
//
// tbxFilePathSource
//
this.tbxFilePathSource.Location = new System.Drawing.Point(144, 24);
this.tbxFilePathSource.Name = "tbxFilePathSource";
this.tbxFilePathSource.ReadOnly = true;
this.tbxFilePathSource.Size = new System.Drawing.Size(443, 20);
this.tbxFilePathSource.TabIndex = 8;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(28, 28);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(88, 13);
this.label1.TabIndex = 7;
this.label1.Text = "Source File Path:";
//
// btnOpenUpdateDirectory
//
this.btnOpenUpdateDirectory.Location = new System.Drawing.Point(593, 22);
this.btnOpenUpdateDirectory.Name = "btnOpenUpdateDirectory";
this.btnOpenUpdateDirectory.Size = new System.Drawing.Size(116, 23);
this.btnOpenUpdateDirectory.TabIndex = 6;
this.btnOpenUpdateDirectory.Text = "Browse";
this.btnOpenUpdateDirectory.UseVisualStyleBackColor = true;
this.btnOpenUpdateDirectory.Click += new System.EventHandler(this.btnOpenUpdateDirectory_Click);
//
// openFileDialog
//
this.openFileDialog.FileName = "openFileDialog";
//
// tbxFilePathDest
//
this.tbxFilePathDest.Location = new System.Drawing.Point(144, 64);
this.tbxFilePathDest.Name = "tbxFilePathDest";
this.tbxFilePathDest.ReadOnly = true;
this.tbxFilePathDest.Size = new System.Drawing.Size(443, 20);
this.tbxFilePathDest.TabIndex = 11;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(28, 68);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(107, 13);
this.label2.TabIndex = 10;
this.label2.Text = "Destination File Path:";
//
// btnWriteCsv
//
this.btnWriteCsv.Location = new System.Drawing.Point(593, 64);
this.btnWriteCsv.Name = "btnWriteCsv";
this.btnWriteCsv.Size = new System.Drawing.Size(116, 20);
this.btnWriteCsv.TabIndex = 27;
this.btnWriteCsv.Text = "WriteCsv";
this.btnWriteCsv.UseVisualStyleBackColor = true;
this.btnWriteCsv.Click += new System.EventHandler(this.btnWriteCsv_Click);
//
// FrmRawDataInterpreter
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.btnWriteCsv);
this.Controls.Add(this.cbFVolumeCm);
this.Controls.Add(this.cbFTimeS);
this.Controls.Add(this.cbHChannel);
this.Controls.Add(this.cbHValidation);
this.Controls.Add(this.cbHTotalTimeOfFlightS);
this.Controls.Add(this.cbHDeltaTimeOfFlightS);
this.Controls.Add(this.cbHDeltaVolumeQm);
this.Controls.Add(this.cbHVolumeCm);
this.Controls.Add(this.cbHSampleIntervalS);
this.Controls.Add(this.cbHAmplitudeUpV);
this.Controls.Add(this.cbHAmplitudeDownV);
this.Controls.Add(this.cbHPulseWidthRatioUp);
this.Controls.Add(this.cbHPulseWidthRatioDown);
this.Controls.Add(this.cbHTemperatureDegC);
this.Controls.Add(this.cbHTimeS);
this.Controls.Add(this.tbxFilePathDest);
this.Controls.Add(this.label2);
this.Controls.Add(this.tbxFilePathSource);
this.Controls.Add(this.label1);
this.Controls.Add(this.btnOpenUpdateDirectory);
this.Name = "FrmRawDataInterpreter";
this.Text = "FrmRawDataInterpreter";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox tbxFilePathSource;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnOpenUpdateDirectory;
private System.Windows.Forms.OpenFileDialog openFileDialog;
private System.Windows.Forms.TextBox tbxFilePathDest;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.CheckBox cbFVolumeCm;
private System.Windows.Forms.CheckBox cbFTimeS;
private System.Windows.Forms.CheckBox cbHChannel;
private System.Windows.Forms.CheckBox cbHValidation;
private System.Windows.Forms.CheckBox cbHTotalTimeOfFlightS;
private System.Windows.Forms.CheckBox cbHDeltaTimeOfFlightS;
private System.Windows.Forms.CheckBox cbHDeltaVolumeQm;
private System.Windows.Forms.CheckBox cbHVolumeCm;
private System.Windows.Forms.CheckBox cbHSampleIntervalS;
private System.Windows.Forms.CheckBox cbHAmplitudeUpV;
private System.Windows.Forms.CheckBox cbHAmplitudeDownV;
private System.Windows.Forms.CheckBox cbHPulseWidthRatioUp;
private System.Windows.Forms.CheckBox cbHPulseWidthRatioDown;
private System.Windows.Forms.CheckBox cbHTemperatureDegC;
private System.Windows.Forms.CheckBox cbHTimeS;
private System.Windows.Forms.Button btnWriteCsv;
}
}

View File

@ -0,0 +1,257 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol;
namespace Xylem.Common.Ui.GenesisToolBox
{
public partial class FrmRawDataInterpreter : Form
{
public FrmRawDataInterpreter()
{
InitializeComponent();
}
private void btnOpenUpdateDirectory_Click(object sender, EventArgs e)
{
if (openFileDialog.ShowDialog() != DialogResult.OK)
{
return;
}
tbxFilePathSource.Text = openFileDialog.FileName;
tbxFilePathDest.Text = "same folder!";
}
private string ToLine(string time, List<string> entries)
{
var ret = time + ";";
foreach (var item in entries)
{
ret = ret + item + ";";
}
if (ret.Any())
{
ret.Substring(0, ret.Length - 1);
}
return ret;
}
private void btnWriteCsv_Click(object sender, EventArgs e)
{
var lines = File.ReadAllLines(tbxFilePathSource.Text).ToList();
var listF = new List<string>();
var listH1 = new List<string>();
var listH2 = new List<string>();
var listH3 = new List<string>();
var outputFVolumeCm = cbFVolumeCm.Checked;
var outputFTimeS = cbFTimeS.Checked;
var outputHChannel = cbHChannel.Checked;
var outputHValidation = cbHValidation.Checked;
var outputHTotalTimeOfFlightS = cbHTotalTimeOfFlightS.Checked;
var outputHDeltaTimeOfFlightS = cbHDeltaTimeOfFlightS.Checked;
var outputHDeltaVolumeQm = cbHDeltaVolumeQm.Checked;
var outputHVolumeCm = cbHVolumeCm.Checked;
var outputHSampleIntervalS = cbHSampleIntervalS.Checked;
var outputHAmplitudeUpV = cbHAmplitudeUpV.Checked;
var outputHAmplitudeDownV = cbHAmplitudeDownV.Checked;
var outputHPulseWidthRatioUp = cbHPulseWidthRatioUp.Checked;
var outputHPulseWidthRatioDown = cbHPulseWidthRatioDown.Checked;
var outputHTemperatureDegC = cbHTemperatureDegC.Checked;
var outputHTimeS = cbHTimeS.Checked;
var header = "";
if (outputFVolumeCm) { header = header + "@F VolumeCm ;"; }
if (outputFTimeS) { header = header + "@F TimeS ;"; }
listF.Add("time;" + header);
header = "";
if (outputHChannel) { header = header + "@H Channel ;"; }
if (outputHValidation)
{
header = header + "@H Validation; ";
}
if (outputHTotalTimeOfFlightS)
{
header = header + "@H TotalTimeOfFlightS; ";
}
if (outputHDeltaTimeOfFlightS)
{
header = header + "@H DeltaTimeOfFlightS; ";
}
if (outputHDeltaVolumeQm)
{
header = header + "@H DeltaVolumeQm; ";
}
if (outputHVolumeCm)
{
header = header + "@H VolumeCm; ";
}
if (outputHSampleIntervalS)
{
header = header + "@H SampleIntervalS; ";
}
if (outputHAmplitudeUpV)
{
header = header + "@H AmplitudeUpV; ";
}
if (outputHAmplitudeDownV)
{
header = header + "@H AmplitudeDownV; ";
}
if (outputHPulseWidthRatioUp)
{
header = header + "@H PulseWidthRatioUp; ";
}
if (outputHPulseWidthRatioDown)
{
header = header + "@H PulseWidthRatioDown; ";
}
if (outputHTemperatureDegC)
{
header = header + "@H TemperatureDegC; ";
}
if (outputHTimeS)
{
header = header + "@H TimeS; ";
}
listH1.Add("time;" + header);
listH2.Add("time;" + header);
listH3.Add("time;" + header);
var _streamingDecode = new StreamingDecoder(false);
foreach (var txtline in lines)
{
var timeentry = txtline.Replace("| Trace |", "|").Split('|');
_streamingDecode = new StreamingDecoder(false);
if (_streamingDecode.DecodeMsg(timeentry[1].Trim()))
{
List<string> thisLine = new List<string>();
if (_streamingDecode.DataFlowTest != null)
{
if (outputFVolumeCm) { thisLine.Add(_streamingDecode.DataFlowTest.VolumeCm.ToString()); }
if (outputFTimeS)
{
thisLine.Add(_streamingDecode.DataFlowTest.TimeS.ToString());
}
listF.Add(ToLine(timeentry[0], thisLine));
}
else if (_streamingDecode.DataCalib != null)
{
if (outputHChannel)
{
thisLine.Add(_streamingDecode.DataCalib.Channel.ToString());
}
if (outputHValidation)
{
thisLine.Add(_streamingDecode.DataCalib.Validation.ToString());
}
if (outputHTotalTimeOfFlightS)
{
thisLine.Add(_streamingDecode.DataCalib.TotalTimeOfFlightS.ToString());
}
if (outputHDeltaTimeOfFlightS)
{
thisLine.Add(_streamingDecode.DataCalib.DeltaTimeOfFlightS.ToString());
}
if (outputHDeltaVolumeQm)
{
thisLine.Add(_streamingDecode.DataCalib.DeltaVolumeQm.ToString());
}
if (outputHVolumeCm)
{
thisLine.Add(_streamingDecode.DataCalib.VolumeCm.ToString());
}
if (outputHSampleIntervalS)
{
thisLine.Add(_streamingDecode.DataCalib.SampleIntervalS.ToString());
}
if (outputHAmplitudeUpV)
{
thisLine.Add(_streamingDecode.DataCalib.AmplitudeUpV.ToString());
}
if (outputHAmplitudeDownV)
{
thisLine.Add(_streamingDecode.DataCalib.AmplitudeDownV.ToString());
}
if (outputHPulseWidthRatioUp)
{
thisLine.Add(_streamingDecode.DataCalib.PulseWidthRatioUp.ToString());
}
if (outputHPulseWidthRatioDown)
{
thisLine.Add(_streamingDecode.DataCalib.PulseWidthRatioDown.ToString());
}
if (outputHTemperatureDegC)
{
thisLine.Add(_streamingDecode.DataCalib.TemperatureDegC.ToString());
}
if (outputHTimeS)
{
thisLine.Add(_streamingDecode.DataCalib.TimeS.ToString());
}
var fullAtrLine = ToLine(timeentry[0], thisLine);
if (_streamingDecode.DataCalib.Channel == 1)
{
listH1.Add(fullAtrLine);
}
if (_streamingDecode.DataCalib.Channel == 2)
{
listH2.Add(fullAtrLine);
}
if (_streamingDecode.DataCalib.Channel == 3)
{
listH3.Add(fullAtrLine);
}
}
}
}
var newfilenanme = tbxFilePathSource.Text.Substring(0, tbxFilePathSource.Text.Length - 4);
try
{
File.WriteAllLines(newfilenanme + "F.csv", listF.ToArray());
File.WriteAllLines(newfilenanme + "H1.csv", listH1.ToArray());
File.WriteAllLines(newfilenanme + "H2.csv", listH2.ToArray());
File.WriteAllLines(newfilenanme + "H3.csv", listH3.ToArray());
MessageBox.Show("done");
}
catch (Exception ex )
{
MessageBox.Show("abspeichern nicht geklappt . ggf. ist die datei noch geöffnet oder wir haben nicht genug rechte");
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More