Merge remote-tracking branch 'origin/main' into Dev_FM2014
This commit is contained in:
commit
9645eba701
1
.gitignore
vendored
1
.gitignore
vendored
@ -401,3 +401,4 @@ FodyWeavers.xsd
|
||||
/Common/Common.v3.ncrunchsolution
|
||||
/TBF_V2/Sources/TBF/TBF/BenchControl/TestMethods/GenesisCommunication.zip
|
||||
/Common/Hardware/WaterMeter/Genesis/GenesisCore/configuration2013.json
|
||||
/LaaProductionWeb/LaaPackages
|
||||
|
||||
@ -176,6 +176,14 @@
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:50075:localhost" />
|
||||
</bindings>
|
||||
</site>
|
||||
<site name="MeterProcessState(3)" id="5">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="E:\REPO\lab\la_operations\laa_production\Common\Service\MeterProcessState" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:50076:localhost" />
|
||||
</bindings>
|
||||
</site>
|
||||
<siteDefaults>
|
||||
<!-- To enable logging, please change the below attribute "enabled" to "true" -->
|
||||
|
||||
@ -12,6 +12,21 @@
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@ -50,5 +65,12 @@
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@ -31,6 +31,11 @@
|
||||
clientWhatcher.IncludeSubdirectories = false;
|
||||
clientWhatcher.EnableRaisingEvents = true;
|
||||
|
||||
WaithLaserReady();
|
||||
}
|
||||
|
||||
private static void WaithLaserReady()
|
||||
{
|
||||
var fg = ConsoleColor.DarkGray;
|
||||
Console.ForegroundColor = fg;
|
||||
|
||||
@ -40,7 +45,7 @@
|
||||
awaiter.Wait();
|
||||
|
||||
Console.ForegroundColor = ConsoleColor.White;
|
||||
Console.Write($"FERTIGMELDEN");
|
||||
Console.Write($"LASERUNG BESTÄTIGEN");
|
||||
Console.ReadLine();
|
||||
Console.ForegroundColor = fg;
|
||||
|
||||
@ -59,6 +64,8 @@
|
||||
Thread.Sleep(100);
|
||||
}
|
||||
}
|
||||
|
||||
Console.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
@ -73,9 +80,9 @@
|
||||
|
||||
if (!File.Exists(fileToDelete))
|
||||
{
|
||||
fileToDelete = string.Empty;
|
||||
|
||||
Console.WriteLine($"{fileToDelete} - dose not exists!");
|
||||
|
||||
fileToDelete = string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -93,6 +100,8 @@
|
||||
var sourceFilePath = args.FullPath;
|
||||
var destinationFilePath = Path.Combine(localFolder, args.Name);
|
||||
|
||||
Thread.Sleep(1000);
|
||||
|
||||
if (File.Exists(sourceFilePath))
|
||||
{
|
||||
while (true)
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.6.33717.318
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.33423.255
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Utils", "Utils", "{7A0EE7B8-6B7E-41E9-B679-319C8CA48CF1}"
|
||||
EndProject
|
||||
@ -354,7 +354,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SIRT", "SIRT", "{02EA681E-C
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "LaaPackages", "LaaPackages", "{7B7EC9A1-2091-4CCD-9F01-C579ABD9241D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaaProductionWeb.Resources", "LaaPackages\LaaProductionWeb.Resources\LaaProductionWeb.Resources.csproj", "{DA65E376-3D35-4D96-913A-7197FCA6DF48}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaaProductionWeb.Resources", "LaaPackages\LaaProductionWeb.Resources\LaaProductionWeb.Resources.csproj", "{9E070488-15DE-418A-8606-5B79056C6E9F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaaPackages.Features.Cordonel", "LaaPackages\LaaPackages.Features.Cordonel\LaaPackages.Features.Cordonel.csproj", "{8BEFD3AC-BB21-4B62-8D9A-CF8CBFD439EB}"
|
||||
EndProject
|
||||
@ -376,9 +376,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FM2014Core", "Hardware\Wate
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common.Services.LaserImport", "Common.Services.LaserImport\Common.Services.LaserImport.csproj", "{6746517C-BE89-4637-A283-0A932A50497A}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SapImport", "Service\SapImport\SapImport.csproj", "{9D4082BA-B62A-4AB5-A89D-21404A598693}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SharedMSBuildProjectFiles) = preSolution
|
||||
Utils\DateTimeServerShared\DateTimeServerShared.projitems*{4806d89a-fbfb-41bc-aaa7-2242444bf55a}*SharedItemsImports = 4
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
_MANUAL_CONTROL|Any CPU = _MANUAL_CONTROL|Any CPU
|
||||
_MANUAL_CONTROL|Mixed Platforms = _MANUAL_CONTROL|Mixed Platforms
|
||||
@ -6005,78 +6006,78 @@ Global
|
||||
{AFC428F5-0141-4A3F-BEF2-470A89D972F6}.XP32bit|x64.Build.0 = Release|Any CPU
|
||||
{AFC428F5-0141-4A3F-BEF2-470A89D972F6}.XP32bit|x86.ActiveCfg = Release|Any CPU
|
||||
{AFC428F5-0141-4A3F-BEF2-470A89D972F6}.XP32bit|x86.Build.0 = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}._MANUAL_CONTROL|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}._MANUAL_CONTROL|Any CPU.Build.0 = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}._MANUAL_CONTROL|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}._MANUAL_CONTROL|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}._MANUAL_CONTROL|x64.ActiveCfg = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}._MANUAL_CONTROL|x64.Build.0 = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}._MANUAL_CONTROL|x86.ActiveCfg = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}._MANUAL_CONTROL|x86.Build.0 = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.COM|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.COM|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.COM|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.COM|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.COM|x64.ActiveCfg = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.COM|x64.Build.0 = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.COM|x86.ActiveCfg = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.COM|x86.Build.0 = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.GenesisDisplayTool_V01|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.GenesisDisplayTool_V01|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.GenesisDisplayTool_V01|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.GenesisDisplayTool_V01|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.GenesisDisplayTool_V01|x64.ActiveCfg = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.GenesisDisplayTool_V01|x64.Build.0 = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.GenesisDisplayTool_V01|x86.ActiveCfg = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.GenesisDisplayTool_V01|x86.Build.0 = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.PerformTest|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.PerformTest|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.PerformTest|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.PerformTest|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.PerformTest|x64.ActiveCfg = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.PerformTest|x64.Build.0 = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.PerformTest|x86.ActiveCfg = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.PerformTest|x86.Build.0 = Debug|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.Release|x64.Build.0 = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.Release|x86.Build.0 = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.ReleaseTest|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.ReleaseTest|Any CPU.Build.0 = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.ReleaseTest|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.ReleaseTest|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.ReleaseTest|x64.ActiveCfg = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.ReleaseTest|x64.Build.0 = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.ReleaseTest|x86.ActiveCfg = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.ReleaseTest|x86.Build.0 = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.VPN_Debug|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.VPN_Debug|Any CPU.Build.0 = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.VPN_Debug|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.VPN_Debug|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.VPN_Debug|x64.ActiveCfg = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.VPN_Debug|x64.Build.0 = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.VPN_Debug|x86.ActiveCfg = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.VPN_Debug|x86.Build.0 = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.XP32bit|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.XP32bit|Any CPU.Build.0 = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.XP32bit|x64.ActiveCfg = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.XP32bit|x64.Build.0 = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.XP32bit|x86.ActiveCfg = Release|Any CPU
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48}.XP32bit|x86.Build.0 = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}._MANUAL_CONTROL|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}._MANUAL_CONTROL|Any CPU.Build.0 = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}._MANUAL_CONTROL|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}._MANUAL_CONTROL|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}._MANUAL_CONTROL|x64.ActiveCfg = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}._MANUAL_CONTROL|x64.Build.0 = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}._MANUAL_CONTROL|x86.ActiveCfg = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}._MANUAL_CONTROL|x86.Build.0 = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.COM|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.COM|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.COM|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.COM|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.COM|x64.ActiveCfg = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.COM|x64.Build.0 = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.COM|x86.ActiveCfg = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.COM|x86.Build.0 = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.GenesisDisplayTool_V01|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.GenesisDisplayTool_V01|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.GenesisDisplayTool_V01|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.GenesisDisplayTool_V01|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.GenesisDisplayTool_V01|x64.ActiveCfg = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.GenesisDisplayTool_V01|x64.Build.0 = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.GenesisDisplayTool_V01|x86.ActiveCfg = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.GenesisDisplayTool_V01|x86.Build.0 = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.PerformTest|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.PerformTest|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.PerformTest|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.PerformTest|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.PerformTest|x64.ActiveCfg = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.PerformTest|x64.Build.0 = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.PerformTest|x86.ActiveCfg = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.PerformTest|x86.Build.0 = Debug|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.Release|x64.Build.0 = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.Release|x86.Build.0 = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.ReleaseTest|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.ReleaseTest|Any CPU.Build.0 = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.ReleaseTest|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.ReleaseTest|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.ReleaseTest|x64.ActiveCfg = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.ReleaseTest|x64.Build.0 = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.ReleaseTest|x86.ActiveCfg = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.ReleaseTest|x86.Build.0 = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.VPN_Debug|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.VPN_Debug|Any CPU.Build.0 = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.VPN_Debug|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.VPN_Debug|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.VPN_Debug|x64.ActiveCfg = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.VPN_Debug|x64.Build.0 = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.VPN_Debug|x86.ActiveCfg = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.VPN_Debug|x86.Build.0 = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.XP32bit|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.XP32bit|Any CPU.Build.0 = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.XP32bit|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.XP32bit|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.XP32bit|x64.ActiveCfg = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.XP32bit|x64.Build.0 = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.XP32bit|x86.ActiveCfg = Release|Any CPU
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F}.XP32bit|x86.Build.0 = Release|Any CPU
|
||||
{8BEFD3AC-BB21-4B62-8D9A-CF8CBFD439EB}._MANUAL_CONTROL|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8BEFD3AC-BB21-4B62-8D9A-CF8CBFD439EB}._MANUAL_CONTROL|Any CPU.Build.0 = Release|Any CPU
|
||||
{8BEFD3AC-BB21-4B62-8D9A-CF8CBFD439EB}._MANUAL_CONTROL|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
@ -6581,78 +6582,6 @@ Global
|
||||
{6746517C-BE89-4637-A283-0A932A50497A}.XP32bit|x64.Build.0 = Release|Any CPU
|
||||
{6746517C-BE89-4637-A283-0A932A50497A}.XP32bit|x86.ActiveCfg = Release|Any CPU
|
||||
{6746517C-BE89-4637-A283-0A932A50497A}.XP32bit|x86.Build.0 = Release|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}._MANUAL_CONTROL|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}._MANUAL_CONTROL|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}._MANUAL_CONTROL|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}._MANUAL_CONTROL|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}._MANUAL_CONTROL|x64.ActiveCfg = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}._MANUAL_CONTROL|x64.Build.0 = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}._MANUAL_CONTROL|x86.ActiveCfg = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}._MANUAL_CONTROL|x86.Build.0 = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.COM|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.COM|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.COM|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.COM|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.COM|x64.ActiveCfg = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.COM|x64.Build.0 = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.COM|x86.ActiveCfg = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.COM|x86.Build.0 = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.GenesisDisplayTool_V01|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.GenesisDisplayTool_V01|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.GenesisDisplayTool_V01|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.GenesisDisplayTool_V01|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.GenesisDisplayTool_V01|x64.ActiveCfg = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.GenesisDisplayTool_V01|x64.Build.0 = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.GenesisDisplayTool_V01|x86.ActiveCfg = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.GenesisDisplayTool_V01|x86.Build.0 = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.PerformTest|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.PerformTest|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.PerformTest|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.PerformTest|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.PerformTest|x64.ActiveCfg = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.PerformTest|x64.Build.0 = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.PerformTest|x86.ActiveCfg = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.PerformTest|x86.Build.0 = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.Release|x64.Build.0 = Release|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.Release|x86.Build.0 = Release|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.ReleaseTest|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.ReleaseTest|Any CPU.Build.0 = Release|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.ReleaseTest|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.ReleaseTest|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.ReleaseTest|x64.ActiveCfg = Release|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.ReleaseTest|x64.Build.0 = Release|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.ReleaseTest|x86.ActiveCfg = Release|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.ReleaseTest|x86.Build.0 = Release|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.VPN_Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.VPN_Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.VPN_Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.VPN_Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.VPN_Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.VPN_Debug|x64.Build.0 = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.VPN_Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.VPN_Debug|x86.Build.0 = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.XP32bit|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.XP32bit|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.XP32bit|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.XP32bit|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.XP32bit|x64.ActiveCfg = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.XP32bit|x64.Build.0 = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.XP32bit|x86.ActiveCfg = Debug|Any CPU
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693}.XP32bit|x86.Build.0 = Debug|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@ -6796,7 +6725,7 @@ Global
|
||||
{D7A7E1FF-D024-407F-B30D-4C519CFA7BF1} = {A6B3AB5A-A567-4C77-80FB-1E1E19A00713}
|
||||
{AFC428F5-0141-4A3F-BEF2-470A89D972F6} = {C17363DF-A043-4F25-8EBA-2B3B078227DC}
|
||||
{02EA681E-C7D8-13C7-8484-4AC65E1B71E8} = {99B23EE9-CE50-4924-A055-C39EFA038721}
|
||||
{DA65E376-3D35-4D96-913A-7197FCA6DF48} = {7B7EC9A1-2091-4CCD-9F01-C579ABD9241D}
|
||||
{9E070488-15DE-418A-8606-5B79056C6E9F} = {7B7EC9A1-2091-4CCD-9F01-C579ABD9241D}
|
||||
{8BEFD3AC-BB21-4B62-8D9A-CF8CBFD439EB} = {7B7EC9A1-2091-4CCD-9F01-C579ABD9241D}
|
||||
{15A06398-ECB6-49C9-ACB4-52A495A886A6} = {7B7EC9A1-2091-4CCD-9F01-C579ABD9241D}
|
||||
{F90B940C-9A83-496D-AAE0-11CD02CE0A22} = {7B7EC9A1-2091-4CCD-9F01-C579ABD9241D}
|
||||
@ -6807,14 +6736,10 @@ Global
|
||||
{3862D89C-E32D-4182-BB58-38777D43EDD9} = {5DFED68B-2113-4E5A-98ED-9DC07D3D39C8}
|
||||
{0B205BE7-90CD-4C3A-8EBD-1E414E39528A} = {5DFED68B-2113-4E5A-98ED-9DC07D3D39C8}
|
||||
{6746517C-BE89-4637-A283-0A932A50497A} = {696A94BE-7237-4AE2-9E36-6059DE519971}
|
||||
{9D4082BA-B62A-4AB5-A89D-21404A598693} = {696A94BE-7237-4AE2-9E36-6059DE519971}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {4BCB7B69-696C-436A-86F7-C91EA5588164}
|
||||
EndGlobalSection
|
||||
GlobalSection(SharedMSBuildProjectFiles) = preSolution
|
||||
Utils\DateTimeServerShared\DateTimeServerShared.projitems*{4806d89a-fbfb-41bc-aaa7-2242444bf55a}*SharedItemsImports = 4
|
||||
EndGlobalSection
|
||||
GlobalSection(Performance) = preSolution
|
||||
HasPerformanceSessions = true
|
||||
EndGlobalSection
|
||||
|
||||
@ -44,7 +44,6 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="PAM03.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Hardware\Common.Hardware.SIRT\Common.Hardware.SIRT.csproj">
|
||||
@ -55,6 +54,10 @@
|
||||
<Project>{4e8bb839-d40a-488c-88ce-f21811f1f476}</Project>
|
||||
<Name>Common.Hardware.WaterMeter.eRegister</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\LaaPackages\LaaPackages.SqlClient\LaaPackages.SqlClient.csproj">
|
||||
<Project>{F90B940C-9A83-496D-AAE0-11CD02CE0A22}</Project>
|
||||
<Name>LaaPackages.SqlClient</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@ -1,201 +0,0 @@
|
||||
namespace CommonConsole
|
||||
{
|
||||
using Common.Hardware.SIRT;
|
||||
using Common.Hardware.SIRT.Parameters;
|
||||
using Common.Hardware.SIRT.Tasks;
|
||||
using Common.Hardware.WaterMeter.eRegister;
|
||||
using Common.Hardware.WaterMeter.eRegister.Features;
|
||||
|
||||
using System;
|
||||
using System.IO.Ports;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
|
||||
public class PAM03
|
||||
{
|
||||
private string portName;
|
||||
private uint address;
|
||||
private byte[] key;
|
||||
|
||||
public int Run(params string[] args)
|
||||
{
|
||||
/// <summary>
|
||||
/// Process.ExitCode:
|
||||
/// 0 - OK
|
||||
/// 1 - Execution Error
|
||||
/// 2 - Connection Error
|
||||
/// 3 - Invalid Arguments
|
||||
/// </summary>
|
||||
var exitCode = this.ParseArguments(args);
|
||||
|
||||
if (exitCode == 0)
|
||||
{
|
||||
var processAwaiter = new ManualResetEventSlim();
|
||||
var sirtBroadcaster = new SIRTBroadcaster(this.portName);
|
||||
var pinI = new ProvidePin { AuthLevel = AuthLevel.I };
|
||||
|
||||
void SIRTBroadcaster_Connected(SIRTBroadcaster sirt)
|
||||
{
|
||||
var task = new CordonelTask(sirt.Frequency)
|
||||
{
|
||||
DelPamSemi = true,
|
||||
WakeUpCmd = true,
|
||||
WakeUpModul = true,
|
||||
RequestAddress = address,
|
||||
EncryptionKey = key,
|
||||
IsEncrypted = true
|
||||
};
|
||||
|
||||
task.SetPending();
|
||||
sirt.Start(task);
|
||||
task.Wait();
|
||||
|
||||
void ResetAlarms(byte alarmMask)
|
||||
{
|
||||
if (exitCode != 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
task.WakeUpCmd = false;
|
||||
task.WakeUpModul = false;
|
||||
task.Data = new ResetAlarms(alarmMask).Append(pinI);
|
||||
task.SetPending();
|
||||
sirt.Start(task);
|
||||
task.Wait();
|
||||
|
||||
if (task.State != SIRTTaskState.Completed)
|
||||
{
|
||||
Console.WriteLine($"{nameof(SIRTTaskState)}.{task.State}");
|
||||
|
||||
exitCode = 1;
|
||||
}
|
||||
|
||||
exitCode = 0;
|
||||
}
|
||||
|
||||
task.SetPending();
|
||||
sirt.Start(task);
|
||||
task.Wait();
|
||||
|
||||
if (task.State != SIRTTaskState.Completed)
|
||||
{
|
||||
exitCode = 1;
|
||||
}
|
||||
|
||||
ResetAlarms(new AlarmsMask(0xFF)
|
||||
{
|
||||
MediumAbsent = false
|
||||
});
|
||||
ResetAlarms(0xFE);
|
||||
processAwaiter.Set();
|
||||
}
|
||||
|
||||
void SIRTBroadcaster_Disconnected(SIRTBroadcaster _)
|
||||
=> processAwaiter.Set();
|
||||
|
||||
sirtBroadcaster.Connected += SIRTBroadcaster_Connected;
|
||||
sirtBroadcaster.Disconnected += SIRTBroadcaster_Disconnected;
|
||||
|
||||
sirtBroadcaster.Open();
|
||||
processAwaiter.Wait();
|
||||
sirtBroadcaster.Close();
|
||||
|
||||
sirtBroadcaster.Disconnected -= SIRTBroadcaster_Disconnected;
|
||||
sirtBroadcaster.Connected -= SIRTBroadcaster_Connected;
|
||||
}
|
||||
|
||||
return exitCode;
|
||||
}
|
||||
|
||||
public int ParseArguments(string[] args)
|
||||
{
|
||||
if (args.Length != 3)
|
||||
{
|
||||
Console.WriteLine($"Falsche anzahl an parameter: '{string.Join("', '", args)}'");
|
||||
Console.WriteLine($"Expected: [COM..n as string] [Address as uint] [EncryptionKey as string]");
|
||||
|
||||
return 3;
|
||||
}
|
||||
|
||||
this.portName = args[0];
|
||||
|
||||
if (Regex.IsMatch($"{this.portName}", "[Cc][Oo][Mm][0-9]+"))
|
||||
{
|
||||
this.portName = this.portName.ToUpper();
|
||||
}
|
||||
else if (SerialPort.GetPortNames().Any(x => x.Equals(this.portName, StringComparison.CurrentCultureIgnoreCase)))
|
||||
{
|
||||
Console.WriteLine($"COM Port: '{this.portName}' - nicht vorhanden");
|
||||
|
||||
return 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine($"Falsche COM PortName: '{this.portName}' - erwartet: [Cc][Oo][Mm][0-9]+");
|
||||
|
||||
return 3;
|
||||
}
|
||||
|
||||
if (!uint.TryParse($"{args[1]}", out this.address))
|
||||
{
|
||||
Console.WriteLine($"Ungültige Funkadresse: '{args[1]}'");
|
||||
|
||||
return 3;
|
||||
}
|
||||
|
||||
this.key = $"{args[2]}".GetBytes();
|
||||
|
||||
if (this.key.Length != 16)
|
||||
{
|
||||
Console.WriteLine($"Ungültige Funkschlüssel: '{BitConverter.ToString(this.key)}'");
|
||||
|
||||
return 3;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public class CordonelTask : EregisterTask
|
||||
{
|
||||
public CordonelTask(int frequency) : base(frequency)
|
||||
{
|
||||
}
|
||||
|
||||
public override Byte[] Start()
|
||||
{
|
||||
Console.WriteLine($"TX|{BitConverter.ToString(this.request)}");
|
||||
|
||||
return base.Start();
|
||||
}
|
||||
|
||||
public override void Receive(SIRTMessage response)
|
||||
{
|
||||
base.Receive(response);
|
||||
|
||||
Console.WriteLine($"RX|{BitConverter.ToString(response)}");
|
||||
|
||||
try
|
||||
{
|
||||
if (this.SEMIMessage != null)
|
||||
{
|
||||
Console.WriteLine($"=========================================");
|
||||
Console.WriteLine($"AlarmsMask");
|
||||
Console.WriteLine($"-----------------------------------------");
|
||||
Console.WriteLine($"{new AlarmsMask(response.Payload[10])}");
|
||||
Console.WriteLine($"=========================================");
|
||||
Console.WriteLine($"RSSI.PAM {response.P2}");
|
||||
Console.WriteLine($"RSSI.SEMI {response.Payload[12]}");
|
||||
Console.WriteLine($"PAMStatus {new PAMStatus(response.Payload[11])}");
|
||||
Console.WriteLine($"=========================================");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,11 +1,36 @@
|
||||
namespace CommonConsole
|
||||
{
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
public static class Program
|
||||
public static partial class Program
|
||||
{
|
||||
static void Main()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static void Main_ProgrammingParameters_Cordonel()
|
||||
{
|
||||
var alarmMask = 0 << AlarmMask.ALARM_REBOOT
|
||||
| 1 << AlarmMask.ALARM_LOW_BATTERY
|
||||
@ -19,7 +44,7 @@
|
||||
| 0 << AlarmMask.ALARM_LOW_PRESSURE
|
||||
| 0 << AlarmMask.ALARM_HIGH_PRESSURE
|
||||
| 0 << AlarmMask.ALARM_LOW_TEMPERATURE
|
||||
| 1 << AlarmMask.ALARM_HIGH_TEMPERATURE
|
||||
| 0 << AlarmMask.ALARM_HIGH_TEMPERATURE
|
||||
| 0 << AlarmMask.ALARM_RADIO_ERROR
|
||||
| 0 << AlarmMask.ALARM_METROLOGY_PARAMS
|
||||
| 0 << AlarmMask.ALARM_METROLOGY_MEASURE
|
||||
@ -28,9 +53,11 @@
|
||||
Array.Reverse(alarmBytes);
|
||||
Console.WriteLine($"{"ALARMS:",11} {alarmMask,11} - {BitConverter.ToString(alarmBytes).Replace("-", "")}");
|
||||
|
||||
uint content = (uint)1 << LogContentBits.AlarmStatus // ALWAYS ON
|
||||
| (uint)1 << LogContentBits.BillingCounter // ALWAYS ON
|
||||
| (uint)0 << LogContentBits.ReverseCounter //
|
||||
|
||||
|
||||
uint content = // (uint)1 << LogContentBits.AlarmStatus // ALWAYS ON
|
||||
//| (uint)1 << LogContentBits.BillingCounter // ALWAYS ON
|
||||
(uint)0 << LogContentBits.ReverseCounter //
|
||||
| (uint)0 << LogContentBits.MaxFlow //
|
||||
| (uint)0 << LogContentBits.MaxFlowTime //
|
||||
| (uint)0 << LogContentBits.PeakFlow //
|
||||
@ -41,9 +68,9 @@
|
||||
| (uint)0 << LogContentBits.MinFlow //
|
||||
| (uint)0 << LogContentBits.MinFlowTime //
|
||||
| (uint)0 << LogContentBits.ForwardCounter //
|
||||
| (uint)1 << LogContentBits._UTC32 // ALWAYS ON
|
||||
| (uint)0 << LogContentBits._MaskSelector_1_1 //
|
||||
| (uint)0 << LogContentBits._MaskSelector_1_2 //
|
||||
| (uint)0 << LogContentBits._UTC32 // ALWAYS ON
|
||||
//| (uint)0 << LogContentBits._MaskSelector_1_1 //
|
||||
//| (uint)0 << LogContentBits._MaskSelector_1_2 //
|
||||
| (uint)0 << LogContentBits.MinPress //
|
||||
| (uint)0 << LogContentBits.MinPressTime //
|
||||
| (uint)0 << LogContentBits.MaxPress //
|
||||
@ -53,17 +80,17 @@
|
||||
| (uint)0 << LogContentBits.MaxTemp //
|
||||
| (uint)0 << LogContentBits.MaxTempTime //
|
||||
| (uint)0 << LogContentBits.CurrentPress //
|
||||
| (uint)0 << LogContentBits.CurrentTemp //
|
||||
| (uint)1 << LogContentBits.ExtendedAlarm // ALWAYS ON
|
||||
| (uint)1 << LogContentBits._RecordCheckSum; // ALWAYS ON - er - 10319033731
|
||||
| (uint)0 << LogContentBits.CurrentTemp; //
|
||||
//| (uint)1 << LogContentBits.ExtendedAlarm // ALWAYS ON
|
||||
//| (uint)1 << LogContentBits._RecordCheckSum; // ALWAYS ON
|
||||
|
||||
var contentBytes = BitConverter.GetBytes(content);
|
||||
Array.Reverse(contentBytes);
|
||||
Console.WriteLine($"{"DATALOGGER:",11} {content,11} - {BitConverter.ToString(contentBytes).Replace("-", "")}");
|
||||
|
||||
uint fdr = (uint)1 << LogContentBits.AlarmStatus // ALWAYS ON
|
||||
| (uint)1 << LogContentBits.BillingCounter // ALWAYS ON
|
||||
| (uint)0 << LogContentBits.ReverseCounter //
|
||||
uint fdr = // (uint)1 << LogContentBits.AlarmStatus // ALWAYS ON
|
||||
//| (uint)1 << LogContentBits.BillingCounter // ALWAYS ON
|
||||
(uint)0 << LogContentBits.ReverseCounter //
|
||||
| (uint)0 << LogContentBits.MaxFlow //
|
||||
| (uint)0 << LogContentBits.MaxFlowTime //
|
||||
| (uint)0 << LogContentBits.PeakFlow //
|
||||
@ -71,12 +98,12 @@
|
||||
| (uint)0 << LogContentBits.AvgFlow //
|
||||
| (uint)0 << LogContentBits.BrokenPipe //
|
||||
| (uint)0 << LogContentBits.BrokenPipeTime //
|
||||
| (uint)1 << LogContentBits.MinFlow //
|
||||
| (uint)0 << LogContentBits.MinFlow //
|
||||
| (uint)0 << LogContentBits.MinFlowTime //
|
||||
| (uint)0 << LogContentBits.ForwardCounter //
|
||||
| (uint)1 << LogContentBits._UTC32 // ALWAYS ON
|
||||
| (uint)0 << LogContentBits._MaskSelector_1_1 //
|
||||
| (uint)0 << LogContentBits._MaskSelector_1_2 //
|
||||
| (uint)0 << LogContentBits._UTC32 // ALWAYS ON
|
||||
//| (uint)0 << LogContentBits._MaskSelector_1_1 //
|
||||
//| (uint)0 << LogContentBits._MaskSelector_1_2 //
|
||||
| (uint)0 << LogContentBits.MinPress //
|
||||
| (uint)0 << LogContentBits.MinPressTime //
|
||||
| (uint)0 << LogContentBits.MaxPress //
|
||||
@ -86,9 +113,9 @@
|
||||
| (uint)0 << LogContentBits.MaxTemp //
|
||||
| (uint)0 << LogContentBits.MaxTempTime //
|
||||
| (uint)0 << LogContentBits.CurrentPress //
|
||||
| (uint)0 << LogContentBits.CurrentTemp //
|
||||
| (uint)1 << LogContentBits.ExtendedAlarm // ALWAYS ON
|
||||
| (uint)1 << LogContentBits._RecordCheckSum; // ALWAYS ON
|
||||
| (uint)0 << LogContentBits.CurrentTemp; //
|
||||
//| (uint)1 << LogContentBits.ExtendedAlarm // ALWAYS ON
|
||||
//| (uint)1 << LogContentBits._RecordCheckSum; // ALWAYS ON
|
||||
|
||||
var fdrBytes = BitConverter.GetBytes(fdr);
|
||||
Array.Reverse(fdrBytes);
|
||||
@ -96,14 +123,14 @@
|
||||
|
||||
Console.WriteLine();
|
||||
|
||||
uint min = 201344787;
|
||||
uint def = 206906379;
|
||||
uint max = 4294967295;
|
||||
//uint min = 201344787;
|
||||
//uint def = 206906379;
|
||||
//uint max = 4294967295;
|
||||
|
||||
for (byte i = 0; i < LogContentBits.BitMask.Length; i++)
|
||||
{
|
||||
Console.WriteLine($"Min: {(min >> i) % 2} - Def: {(def >> i) % 2} - Max: {(max >> i) % 2} - {LogContentBits.BitMask[i]}");
|
||||
}
|
||||
//for (byte i = 0; i < LogContentBits.BitMask.Length; i++)
|
||||
//{
|
||||
// Console.WriteLine($"Min: {(min >> i) % 2} - Def: {(def >> i) % 2} - Max: {(max >> i) % 2} - {LogContentBits.BitMask[i]}");
|
||||
//}
|
||||
|
||||
} // CONTENT: 67110031 - 04-00-04-8F => 0400048F <-> 8F040004 04000C03
|
||||
|
||||
|
||||
@ -9,18 +9,20 @@ namespace Xylem.Common.CommonCore.Configuration
|
||||
/// </summary>
|
||||
public static class ServiceUrls
|
||||
{
|
||||
//#if URI_OLD_DNS // this is defined in build configuration 'VPN_Debug' as the new DNS cannot be reached via VPN
|
||||
// private const String ServerDns = "http://sla12iis01.emea.sensus.net";
|
||||
//#else
|
||||
//#if URI_OLD_DNS // this is defined in build configuration 'VPN_Debug' as the new DNS cannot be reached via VPN
|
||||
// private const String ServerDns = "http://sla12iis01.emea.sensus.net";
|
||||
// private const String ProductionUiServerDns = "http://sla12iis01.emea.sensus.net";
|
||||
//#else
|
||||
private const String ServerDns = "http://delaz1web01.world.fluidtechnology.net";
|
||||
//#endif
|
||||
private const String ProductionUiServerDns = "http://delaz1web01.world.fluidtechnology.net/LaaProductionWeb";
|
||||
//#endif
|
||||
|
||||
private static readonly String DefaultInspectCordonelRequirementInfoUrl =
|
||||
$"http://sla12iis01.emea.sensus.net/LaaProductionWeb/";
|
||||
$"{ProductionUiServerDns}/";
|
||||
|
||||
// return code: 404 not found, 400 Error with text, 200 okay
|
||||
private static readonly String DefaultEolDataForSentinelServiceUrl =
|
||||
$"http://sla12iis01.emea.sensus.net/LaaProductionWeb/api/cordonel/eolprogress/";
|
||||
$"{ProductionUiServerDns}/api/cordonel/eolprogress/";
|
||||
|
||||
private static readonly String DefaultGetPcbIdsFromSafeServiceUrl =
|
||||
$"{ServerDns}/MeterProcessState/GetPcbIdsFromSafe?ContainerDbId=";
|
||||
@ -62,7 +64,7 @@ namespace Xylem.Common.CommonCore.Configuration
|
||||
$"{ServerDns}/MeterProcessState/api/ProccesState/SetCordonelProgress?PcbId=";
|
||||
|
||||
private static readonly String DefaultGetCordonelRequirementInfoUrl =
|
||||
"http://sla12iis01.emea.sensus.net/LaaProductionWeb/api/cordonel/requirements/pcbid/";
|
||||
$"{ProductionUiServerDns}/api/cordonel/requirements/pcbid/";
|
||||
|
||||
private static readonly String DefaultGetCordonelAppVersionServiceUrl =
|
||||
$"{ServerDns}/MeterProcessState/api/ProccesState/GetCordonelAppVersion?PcbId=";
|
||||
@ -188,7 +190,7 @@ namespace Xylem.Common.CommonCore.Configuration
|
||||
$"{ServerDns}/MeterProcessState/api/FileUpToDate/GetCordonelFw";
|
||||
|
||||
private static readonly String DefaultDbDataAtEolServiceUrl =
|
||||
$"http://sla12iis01.emea.sensus.net/MeterProcessState/api/fwupdate/databaseateol/";
|
||||
$"{ServerDns}/MeterProcessState/api/fwupdate/databaseateol/";
|
||||
|
||||
public static readonly String PressureSensorTestURL_GetTestSpec
|
||||
= $"{ServerDns}/MeterProcessState/api/CordonelPressureSensorTest/GetTestSpec";
|
||||
@ -196,6 +198,11 @@ namespace Xylem.Common.CommonCore.Configuration
|
||||
public static readonly String PressureSensorTestURL_PostTestResults
|
||||
= $"{ServerDns}/MeterProcessState/api/CordonelPressureSensorTest/PostTestResults";
|
||||
|
||||
|
||||
public static readonly String PickingURL_GetPcbInfoPicking
|
||||
= $"{ServerDns}/MeterProcessState/api/LuController/GetPcbInfoPicking?PcbId=";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// usage: string.Format(CordonelPressureSensorTestURL_GetTestResults, pcbId);
|
||||
/// </summary>
|
||||
@ -206,7 +213,7 @@ namespace Xylem.Common.CommonCore.Configuration
|
||||
#if DEBUG == false // when false uses always the production url.
|
||||
= "http://localhost:52822";
|
||||
#else
|
||||
= "http://sla12iis01.emea.sensus.net";
|
||||
= "http://delaz1web01.world.fluidtechnology.net/";
|
||||
#endif
|
||||
|
||||
|
||||
@ -473,7 +480,7 @@ namespace Xylem.Common.CommonCore.Configuration
|
||||
/// <returns></returns>
|
||||
public static String GetCordonelRequirementByFANrInfoServiceUrl(String ponr)
|
||||
{
|
||||
return $"http://sla12iis01.emea.sensus.net/LaaProductionWeb/api/cordonel/requirements/pono/{ponr}";
|
||||
return $"{ProductionUiServerDns}/api/cordonel/requirements/pono/{ponr}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -486,7 +493,7 @@ namespace Xylem.Common.CommonCore.Configuration
|
||||
/// <returns></returns>
|
||||
public static String GetCordonelRequirementByMeterSizeInfoServiceUrl(Int32 size)
|
||||
{
|
||||
return $"http://sla12iis01.emea.sensus.net/LaaProductionWeb/api/cordonel/requirements/isize/{size}";
|
||||
return $"{ProductionUiServerDns}/api/cordonel/requirements/isize/{size}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:CordoPlot"
|
||||
StartupUri="MainWindow.xaml">
|
||||
StartupUri="StartDialog.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
|
||||
@ -116,6 +116,13 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Compile Include="StartDialog.xaml.cs">
|
||||
<DependentUpon>StartDialog.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Page Include="GridCopy.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="MainWindow.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@ -124,10 +131,17 @@
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="GridCopy.xaml.cs">
|
||||
<DependentUpon>GridCopy.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MainWindow.xaml.cs">
|
||||
<DependentUpon>MainWindow.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Page Include="StartDialog.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="PlotableTestResults.cs" />
|
||||
|
||||
13
Common/CordoPlot/GridCopy.xaml
Normal file
13
Common/CordoPlot/GridCopy.xaml
Normal file
@ -0,0 +1,13 @@
|
||||
<Window x:Class="CordoPlot.GridCopy"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ScottPlot="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF"
|
||||
xmlns:local="clr-namespace:CordoPlot"
|
||||
mc:Ignorable="d"
|
||||
Title="GridCopy" Height="450" Width="800">
|
||||
<Grid>
|
||||
<ScottPlot:WpfPlot x:Name="WpfPlot1" />
|
||||
</Grid>
|
||||
</Window>
|
||||
40
Common/CordoPlot/GridCopy.xaml.cs
Normal file
40
Common/CordoPlot/GridCopy.xaml.cs
Normal file
@ -0,0 +1,40 @@
|
||||
using ScottPlot.WPF;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace CordoPlot
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für GridCopy.xaml
|
||||
/// </summary>
|
||||
public partial class GridCopy : Window
|
||||
{
|
||||
public GridCopy()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public WpfPlot Chart { get; internal set; }
|
||||
|
||||
public void ShowChart(List<Int32> lastListOfIndex, List<Object> lastListOfValues,string title)
|
||||
{
|
||||
WpfPlot1.Plot.Add.Scatter(lastListOfIndex.ToArray(), lastListOfValues.ToArray(), ScottPlot.Colors.Blue);
|
||||
WpfPlot1.Plot.Title(title);
|
||||
WpfPlot1.Plot.Axes.AutoScale();
|
||||
WpfPlot1.Refresh();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -6,13 +6,14 @@
|
||||
xmlns:ScottPlot="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF"
|
||||
xmlns:local="clr-namespace:CordoPlot"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="450" Width="800">
|
||||
Title="MainWindow" Height="1000" Width="1000">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="10*" />
|
||||
<ColumnDefinition Width="80*"/>
|
||||
<ColumnDefinition Width="40*"/>
|
||||
<ColumnDefinition Width="10*" />
|
||||
<ColumnDefinition Width="71*" />
|
||||
<ColumnDefinition Width="572*"/>
|
||||
<ColumnDefinition Width="163*"/>
|
||||
<ColumnDefinition Width="171*"/>
|
||||
<ColumnDefinition Width="23*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
@ -24,15 +25,15 @@
|
||||
<Label x:Name="FileName" >
|
||||
|
||||
</Label>
|
||||
<Button Click="Button_Click" Grid.Row="0" Grid.Column="2" >File</Button>
|
||||
<ScottPlot:WpfPlot x:Name="WpfPlot1" Grid.Row="1" Grid.Column="1" />
|
||||
|
||||
<ScottPlot:WpfPlot x:Name="WpfPlot2" Grid.Row="2" Grid.Column="1" />
|
||||
|
||||
<ScottPlot:WpfPlot x:Name="WpfPlot3" Grid.Row="2" Grid.Column="2" />
|
||||
<Button Click="Button_Click" Grid.Row="0" Grid.Column="2" Margin="10,10,10,10" >File</Button>
|
||||
|
||||
|
||||
<Grid Grid.Column="2" Grid.Row="1">
|
||||
<ScottPlot:WpfPlot x:Name="WpfPlot2" Grid.Row="2" Margin="0,0,0,60" Grid.RowSpan="2" Grid.Column="1" />
|
||||
<Button Click="Button_Click_1" Grid.Row="3" Grid.Column="1" Margin="10,10,10,10" >CopyWindow</Button>
|
||||
<ScottPlot:WpfPlot x:Name="WpfPlot3" Grid.Row="2" Grid.Column="2" Grid.ColumnSpan="2" Margin="0,0,6,60" Grid.RowSpan="2" />
|
||||
|
||||
|
||||
<Grid Grid.Column="2" Grid.ColumnSpan="2" Margin="0,60,6,288" Grid.RowSpan="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="10*" />
|
||||
<ColumnDefinition Width="40*"/>
|
||||
@ -42,53 +43,57 @@
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="10*"/>
|
||||
<RowDefinition Height="40*"/>
|
||||
<RowDefinition Height="40*"/>
|
||||
<RowDefinition Height="40*"/>
|
||||
<RowDefinition Height="40*"/>
|
||||
<RowDefinition Height="40*"/>
|
||||
<RowDefinition Height="40*"/>
|
||||
<RowDefinition Height="40*"/>
|
||||
<RowDefinition Height="40*"/>
|
||||
<RowDefinition Height="40*"/>
|
||||
<RowDefinition Height="40*"/>
|
||||
<RowDefinition Height="40*"/>
|
||||
<RowDefinition Height="100*"/>
|
||||
<RowDefinition Height="400*"/>
|
||||
<RowDefinition Height="10*"/>
|
||||
<RowDefinition Height="400*"/>
|
||||
<RowDefinition Height="10*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="1">Serialnr</TextBlock>
|
||||
<TextBlock Grid.Row="2" Grid.Column="1">TestRunNr</TextBlock>
|
||||
<TextBlock Grid.Row="3" Grid.Column="1">TestBenchNr</TextBlock>
|
||||
<TextBlock Grid.Row="4" Grid.Column="1">Date</TextBlock>
|
||||
<TextBlock Grid.Row="5" Grid.Column="1">MeterSize</TextBlock>
|
||||
<TextBlock Grid.Row="6" Grid.Column="1">AirTempC</TextBlock>
|
||||
<TextBlock Grid.Row="7" Grid.Column="1">AirPressure</TextBlock>
|
||||
<TextBlock Grid.Row="8" Grid.Column="1">AirHumanity</TextBlock>
|
||||
<TextBlock Grid.Row="9" Grid.Column="1">WaterTempC</TextBlock>
|
||||
<TextBlock Grid.Row="10" Grid.Column="1">TotalMeters</TextBlock>
|
||||
<TextBlock Grid.Row="11" Grid.Column="1">Remark</TextBlock>
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="2" Text="{Binding Path=testBenchresults.Serialnr }"/>
|
||||
<TextBlock Grid.Row="2" Grid.Column="2" Text="{Binding Path=testBenchresults.TestRunNr}"/>
|
||||
<TextBlock Grid.Row="3" Grid.Column="2" Text="{Binding Path=testBenchresults.TestBenchNr}"/>
|
||||
<TextBlock Grid.Row="4" Grid.Column="2" Text="{Binding Path=testBenchresults.Date}"/>
|
||||
<TextBlock Grid.Row="5" Grid.Column="2" Text="{Binding Path=testBenchresults.MeterSize}"/>
|
||||
<TextBlock Grid.Row="6" Grid.Column="2" Text="{Binding Path=testBenchresults.AirTempC}"/>
|
||||
<TextBlock Grid.Row="7" Grid.Column="2" Text="{Binding Path=testBenchresults.AirPressure}"/>
|
||||
<TextBlock Grid.Row="8" Grid.Column="2" Text="{Binding Path=testBenchresults.AirHumanity}"/>
|
||||
<TextBlock Grid.Row="9" Grid.Column="2" Text="{Binding Path=testBenchresults.WaterTempC}"/>
|
||||
<TextBlock Grid.Row="10" Grid.Column="2" Text="{Binding Path=testBenchresults.TotalMeters}"/>
|
||||
<TextBlock Grid.Row="11" Grid.Column="2" Text="{Binding Path=testBenchresults.Remark}"/>
|
||||
|
||||
<TextBlock Grid.Row="12" Grid.Column="2" ></TextBlock>
|
||||
<DataGrid
|
||||
x:Name="dataGrid"
|
||||
Grid.Row="12"
|
||||
Grid.Column="1" Grid.ColumnSpan="2" SelectedCellsChanged="DataGrid_SelectedCellsChanged" />
|
||||
x:Name="dataGridInfo"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1" Grid.ColumnSpan="2" ItemsSource="{Binding}"/>
|
||||
|
||||
|
||||
<DataGrid
|
||||
x:Name="dataGridTestPoints"
|
||||
Grid.Row="3"
|
||||
Grid.Column="1" Grid.ColumnSpan="2" SelectedCellsChanged="DataGrid_SelectedCellsChanged" />
|
||||
|
||||
|
||||
</Grid>
|
||||
<TabControl Margin="0,60,0,288" Grid.RowSpan="3" Grid.Column="1">
|
||||
<TabItem Header="ChartDisplay">
|
||||
<Grid Background="#FFE5E5E5">
|
||||
<ScottPlot:WpfPlot x:Name="WpfPlot1" />
|
||||
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="DataDisplay">
|
||||
<Grid Background="#FFE5E5E5">
|
||||
|
||||
<DataGrid x:Name="dataGridDispl" ItemsSource="{Binding}" SelectionUnit="Cell" IsReadOnly="True" SelectedCellsChanged="dataGridchl1_SelectedCellsChanged" CurrentCellChanged="dataGridchl1_CurrentCellChanged" />
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="DataChnl1">
|
||||
<Grid Background="#FFE5E5E5">
|
||||
|
||||
<DataGrid x:Name="dataGridchl1" ItemsSource="{Binding}" SelectionUnit="Cell" IsReadOnly="True" SelectedCellsChanged="dataGridchl1_SelectedCellsChanged" CurrentCellChanged="dataGridchl1_CurrentCellChanged" />
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="DataChnl2">
|
||||
<Grid Background="#FFE5E5E5">
|
||||
|
||||
<DataGrid x:Name="dataGridchl2" ItemsSource="{Binding}" SelectionUnit="Cell" IsReadOnly="True" SelectedCellsChanged="dataGridchl1_SelectedCellsChanged" CurrentCellChanged="dataGridchl1_CurrentCellChanged" />
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="DataChnl3">
|
||||
<Grid Background="#FFE5E5E5">
|
||||
|
||||
<DataGrid x:Name="dataGridchl3" ItemsSource="{Binding}" SelectionUnit="Cell" IsReadOnly="True" SelectedCellsChanged="dataGridchl1_SelectedCellsChanged" CurrentCellChanged="dataGridchl1_CurrentCellChanged" />
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
|
||||
|
||||
<!--DataContext="{Binding testBenchresults}">
|
||||
|
||||
@ -12,17 +12,53 @@ using Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.TestResults;
|
||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||
using Xylem.Common.Metrology.Measurements;
|
||||
|
||||
using System.Text;
|
||||
using System.Data;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
using ScottPlot;
|
||||
|
||||
namespace CordoPlot
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window , INotifyPropertyChanged
|
||||
public partial class MainWindow : Window, INotifyPropertyChanged
|
||||
{
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
|
||||
public DataTable dspData { get; set; }
|
||||
|
||||
public DataTable chnData1 { get; set; }
|
||||
|
||||
public DataTable chnData2 { get; set; }
|
||||
public DataTable chnData3 { get; set; }
|
||||
|
||||
|
||||
public String CSerialnr { get { return _CSerialnr; } set { _CSerialnr = value; OnPropertyChanged("CSerialnr"); } }
|
||||
public String CTestRunNr { get { return _CTestRunNr; } set { _CTestRunNr = value; OnPropertyChanged("CTestRunNr"); } }
|
||||
public String CTestBenchNr { get { return _CTestBenchNr; } set { _CTestBenchNr = value; OnPropertyChanged("CTestBenchNr"); } }
|
||||
public String CDate { get { return _CDate; } set { _CDate = value; OnPropertyChanged("CDate"); } }
|
||||
public String CMeterSize { get { return _CMeterSize; } set { _CMeterSize = value; OnPropertyChanged("CMeterSize"); } }
|
||||
public String CAirTempC { get { return _CAirTempC; } set { _CAirTempC = value; OnPropertyChanged("CAirTempC"); } }
|
||||
public String CAirPressure { get { return _CAirPressure; } set { _CAirPressure = value; OnPropertyChanged("CAirPressure"); } }
|
||||
public String CAirHumanity { get { return _CAirHumanity; } set { _CAirHumanity = value; OnPropertyChanged("CAirHumanity"); } }
|
||||
public String CWaterTempC { get { return _CWaterTempC; } set { _CWaterTempC = value; OnPropertyChanged("CWaterTempC"); } }
|
||||
public String CTotalMeters { get { return _CTotalMeters; } set { _CTotalMeters = value; OnPropertyChanged("CTotalMeters"); } }
|
||||
public String CRemark { get { return _CRemark; } set { _CRemark = value; OnPropertyChanged("CRemark"); } }
|
||||
|
||||
private String _CSerialnr { get; set; }
|
||||
private String _CTestRunNr { get; set; }
|
||||
private String _CTestBenchNr { get; set; }
|
||||
private String _CDate { get; set; }
|
||||
private String _CMeterSize { get; set; }
|
||||
private String _CAirTempC { get; set; }
|
||||
private String _CAirPressure { get; set; }
|
||||
private String _CAirHumanity { get; set; }
|
||||
private String _CWaterTempC { get; set; }
|
||||
private String _CTotalMeters { get; set; }
|
||||
private String _CRemark { get; set; }
|
||||
|
||||
protected void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
@ -73,13 +109,48 @@ namespace CordoPlot
|
||||
//LedRawData__Slot_7_SN24712962_PG2016079130.log
|
||||
if (filename.Contains("_SN") && filename.Contains("_PG"))
|
||||
{
|
||||
var sn = filename.Substring(filename.LastIndexOf("_SN") + 3, filename.LastIndexOf("_PG") - filename.LastIndexOf("_SN") - 3);
|
||||
var pg = filename.Substring(filename.LastIndexOf("_PG") + 3, filename.LastIndexOf(".log") - filename.LastIndexOf("_PG") - 3);
|
||||
testBenchresults = JsonConvert.DeserializeObject<PlotableTestResults>(LocalWebRequest.GetRequest($"http://10.49.40.25/MeterProcessState/api/TestBench/GetTestResults?SerialNr={sn}&TestRunNr={pg}"));
|
||||
testBenchresults.HasResults = true;
|
||||
try
|
||||
{
|
||||
|
||||
|
||||
var sn = filename.Substring(filename.LastIndexOf("_SN") + 3, filename.LastIndexOf("_PG") - filename.LastIndexOf("_SN") - 3);
|
||||
var pg = filename.Substring(filename.LastIndexOf("_PG") + 3, filename.LastIndexOf(".log") - filename.LastIndexOf("_PG") - 3);
|
||||
testBenchresults = JsonConvert.DeserializeObject<PlotableTestResults>(LocalWebRequest.GetRequest($"http://localhost:50075/api/TestBench/GetTestResults?SerialNr={sn}&TestRunNr={pg}", 10000));
|
||||
testBenchresults.HasResults = true;
|
||||
|
||||
dataGridTestPoints.ItemsSource = testBenchresults.TestPointsMain;
|
||||
dataGridTestPoints.Items.Refresh();
|
||||
|
||||
|
||||
DataTable MainInfoDt = new DataTable("DisplayData");
|
||||
|
||||
|
||||
MainInfoDt.Columns.Add("Prop", typeof(string));
|
||||
MainInfoDt.Columns.Add("Val", typeof(string));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
MainInfoDt.Rows.Add("Serialnr", testBenchresults.Serialnr.ToString());
|
||||
MainInfoDt.Rows.Add("TestRunNr", testBenchresults.TestRunNr.ToString());
|
||||
MainInfoDt.Rows.Add("TestBenchNr", testBenchresults.TestBenchNr.ToString());
|
||||
MainInfoDt.Rows.Add("Date", testBenchresults.Date.ToString());
|
||||
MainInfoDt.Rows.Add("MeterSize", testBenchresults.MeterSize.ToString());
|
||||
MainInfoDt.Rows.Add("AirTempC", testBenchresults.AirTempC.ToString());
|
||||
MainInfoDt.Rows.Add("AirPressure", testBenchresults.AirPressure.ToString());
|
||||
MainInfoDt.Rows.Add("AirHumanity", testBenchresults.AirHumanity.ToString());
|
||||
MainInfoDt.Rows.Add("WaterTempC", testBenchresults.WaterTempC.ToString());
|
||||
MainInfoDt.Rows.Add("TotalMeters", testBenchresults.TotalMeters.ToString());
|
||||
MainInfoDt.Rows.Add("Remark", testBenchresults.Remark.ToString());
|
||||
dataGridInfo.DataContext = MainInfoDt.DefaultView;
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
dataGrid.ItemsSource = testBenchresults.TestPointsMain;
|
||||
dataGrid.Items.Refresh();
|
||||
}
|
||||
|
||||
var listOfData = new List<List<IMeasurementRecord>>();
|
||||
@ -172,6 +243,32 @@ namespace CordoPlot
|
||||
|
||||
|
||||
testBenchresults.MapDataPoints(listOfData);
|
||||
StringBuilder sb;
|
||||
StringBuilder sbDetails;
|
||||
|
||||
|
||||
|
||||
DataTable dspDataRef;
|
||||
|
||||
DataTable chnData1Ref;
|
||||
|
||||
DataTable chnData2Ref;
|
||||
DataTable chnData3Ref;
|
||||
|
||||
|
||||
testBenchresults.PrepExprtDataPoints();
|
||||
|
||||
//dspData = dspDataRef;
|
||||
//chnData1 = chnData1Ref;
|
||||
//chnData2 = chnData2Ref;
|
||||
//chnData3 = chnData3Ref;
|
||||
dataGridDispl.DataContext = dspData.DefaultView;
|
||||
dataGridchl1.DataContext = chnData1.DefaultView;
|
||||
dataGridchl2.DataContext = chnData2.DefaultView;
|
||||
dataGridchl3.DataContext = chnData3.DefaultView;
|
||||
|
||||
//File.WriteAllText(filename + "Display.csv", sb.ToString());
|
||||
//File.WriteAllText(filename + "Details.csv", sbDetails.ToString());
|
||||
|
||||
List<List<double>> Lines = new List<List<double>>();
|
||||
Lines.Add(new List<double>());
|
||||
@ -301,7 +398,7 @@ namespace CordoPlot
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
|
||||
var maxScale = Plotresults.Max(p => p.ScaleLine.Count);
|
||||
var AddScale = Plotresults.First(p => p.ScaleLine.Count == maxScale);
|
||||
var srtExport = new System.Text.StringBuilder();
|
||||
@ -328,7 +425,7 @@ namespace CordoPlot
|
||||
srtExport.AppendLine($"{exprHelpLine};{Plotresults[item.Item1].VolumeLine[exprLine]};");
|
||||
exprLine = exprLine + 1;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
WpfPlot1.Plot.Axes.AutoScale();
|
||||
WpfPlot1.Refresh();
|
||||
@ -350,16 +447,121 @@ namespace CordoPlot
|
||||
|
||||
if (di.Item is TestPoint tp)
|
||||
{
|
||||
|
||||
dataGridDispl.DataContext = dspData.AsEnumerable()
|
||||
.Where(row => row.Field<int>("TestNr") == tp.TestPointNr)
|
||||
.CopyToDataTable();
|
||||
|
||||
|
||||
dataGridchl1.DataContext = chnData1.AsEnumerable()
|
||||
.Where(row => row.Field<int>("TestNr") == tp.TestPointNr)
|
||||
.CopyToDataTable();
|
||||
|
||||
dataGridchl2.DataContext = chnData2.AsEnumerable()
|
||||
.Where(row => row.Field<int>("TestNr") == tp.TestPointNr)
|
||||
.CopyToDataTable();
|
||||
|
||||
dataGridchl3.DataContext = chnData3.AsEnumerable()
|
||||
.Where(row => row.Field<int>("TestNr") == tp.TestPointNr)
|
||||
.CopyToDataTable();
|
||||
|
||||
|
||||
|
||||
|
||||
var ChnlHelper = new List<Tuple<int, WpfPlot, int?>>();
|
||||
ChnlHelper.Add(new Tuple<int, WpfPlot, int?>(0, WpfPlot1, tp.TestPointNr -1 ));
|
||||
ChnlHelper.Add(new Tuple<int, WpfPlot, int?>(1, WpfPlot1, tp.TestPointNr -1));
|
||||
ChnlHelper.Add(new Tuple<int, WpfPlot, int?>(2, WpfPlot1, tp.TestPointNr -1 ));
|
||||
ChnlHelper.Add(new Tuple<int, WpfPlot, int?>(3, WpfPlot1, tp.TestPointNr -1));
|
||||
ChnlHelper.Add(new Tuple<int, WpfPlot, int?>(0, WpfPlot1, tp.TestPointNr - 1));
|
||||
ChnlHelper.Add(new Tuple<int, WpfPlot, int?>(1, WpfPlot1, tp.TestPointNr - 1));
|
||||
ChnlHelper.Add(new Tuple<int, WpfPlot, int?>(2, WpfPlot1, tp.TestPointNr - 1));
|
||||
ChnlHelper.Add(new Tuple<int, WpfPlot, int?>(3, WpfPlot1, tp.TestPointNr - 1));
|
||||
Plot(ChnlHelper);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
string lastTitle = "";
|
||||
List<int> lastListOfIndex = new List<int>();
|
||||
List<object> lastListOfValues = new List<object>();
|
||||
private void dataGridchl1_SelectedCellsChanged(Object sender, SelectedCellsChangedEventArgs e)
|
||||
{
|
||||
if (sender is DataGrid dg)
|
||||
{
|
||||
if (dg.CurrentColumn == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
WpfPlot2.Reset();
|
||||
try
|
||||
{
|
||||
|
||||
|
||||
var c = dg.CurrentColumn.DisplayIndex;
|
||||
|
||||
var currentIndex = dg.Items.IndexOf(dg.CurrentItem);
|
||||
|
||||
var listOfIndex = new List<int>();
|
||||
|
||||
var listOfValues = new List<object>();
|
||||
|
||||
Coordinates? mark = null;
|
||||
|
||||
var i = 0;
|
||||
foreach (var item in dg.Items)
|
||||
{
|
||||
if (item is DataRowView drw)
|
||||
{
|
||||
listOfIndex.Add(i);
|
||||
listOfValues.Add(drw[c]);
|
||||
if (i == currentIndex)
|
||||
{
|
||||
if (drw[c] is double d)
|
||||
{
|
||||
mark = new Coordinates(i, d);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
i = i + 1;
|
||||
}
|
||||
lastListOfValues = listOfValues;
|
||||
lastListOfIndex = listOfIndex;
|
||||
if (mark.HasValue)
|
||||
{
|
||||
|
||||
|
||||
var hs = WpfPlot2.Plot.Add.HorizontalSpan(mark.Value.X, mark.Value.X, ScottPlot.Colors.Gray);
|
||||
hs.LineStyle.Width = 1;
|
||||
hs.LineStyle.Pattern = LinePattern.Dashed;
|
||||
|
||||
}
|
||||
|
||||
WpfPlot2.Plot.Add.Scatter(listOfIndex.ToArray(), listOfValues.ToArray(), ScottPlot.Colors.Blue);
|
||||
|
||||
|
||||
WpfPlot2.Plot.Axes.AutoScale();
|
||||
lastTitle = dg.CurrentColumn.Header.ToString();
|
||||
WpfPlot2.Plot.Title(dg.CurrentColumn.Header.ToString());
|
||||
WpfPlot2.Refresh();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void dataGridchl1_CurrentCellChanged(Object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void Button_Click_1(Object sender, RoutedEventArgs e)
|
||||
{
|
||||
var newWin = new GridCopy();
|
||||
newWin.ShowChart(lastListOfIndex, lastListOfValues, lastTitle);
|
||||
newWin.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using ScottPlot;
|
||||
using Xylem.Common.CommonCore.Consts;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.TestResults;
|
||||
using Xylem.Common.Metrology.Measurements;
|
||||
@ -11,7 +14,7 @@ namespace CordoPlot
|
||||
|
||||
public class PlotCalibrationRecord : CalibrationRecord
|
||||
{
|
||||
public PlotCalibrationRecord(CalibrationRecord c, int linenr)
|
||||
public PlotCalibrationRecord(CalibrationRecord c, int linenr)
|
||||
{
|
||||
base.AccuVolumeRaw = c.AccuVolumeRaw;
|
||||
base.AmplitudeDownV = c.AmplitudeDownV;
|
||||
@ -51,7 +54,7 @@ namespace CordoPlot
|
||||
|
||||
public class PlotFlowTestRecord : FlowTestRecord
|
||||
{
|
||||
public PlotFlowTestRecord(FlowTestRecord c , int linenr)
|
||||
public PlotFlowTestRecord(FlowTestRecord c, int linenr)
|
||||
{
|
||||
|
||||
base.Channel = 0;
|
||||
@ -95,7 +98,7 @@ namespace CordoPlot
|
||||
VolumeLine.Add(double.NaN);
|
||||
ScaleLine.Add(MaxSacle[i]);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -116,9 +119,274 @@ namespace CordoPlot
|
||||
|
||||
}
|
||||
|
||||
|
||||
public System.String FileName { get; set; }
|
||||
public System.Boolean HasResults { get; internal set; } = false;
|
||||
|
||||
|
||||
public DataTable DisplayData { get; internal set; }
|
||||
public DataTable ChlData1 { get; internal set; }
|
||||
public DataTable ChlData2 { get; internal set; }
|
||||
public DataTable ChlData3 { get; internal set; }
|
||||
|
||||
|
||||
|
||||
|
||||
public bool PrepExprtDataPoints()
|
||||
{
|
||||
DisplayData = new DataTable("DisplayData");
|
||||
|
||||
DisplayData.Columns.Add("TestNr", typeof(int));
|
||||
DisplayData.Columns.Add("FlowTargetQmh", typeof(double));
|
||||
DisplayData.Columns.Add("FlowrateQmh", typeof(double));
|
||||
DisplayData.Columns.Add("VolumeQm", typeof(double));
|
||||
DisplayData.Columns.Add("Info", typeof(string));
|
||||
DisplayData.Columns.Add("CALC!DurationS", typeof(double));
|
||||
DisplayData.Columns.Add("ReceivedTimeUtc", typeof(DateTimeOffset));
|
||||
DisplayData.Columns.Add("VolumeCm", typeof(double));
|
||||
DisplayData.Columns.Add("OverflowVolumeCm", typeof(double));
|
||||
DisplayData.Columns.Add("TimeS", typeof(double));
|
||||
DisplayData.Columns.Add("OverflowTimeS", typeof(double));
|
||||
DisplayData.Columns.Add("CRC", typeof(ushort));
|
||||
DisplayData.Columns.Add("IsValid", typeof(bool));
|
||||
DisplayData.Columns.Add("DecodedTimeUtc", typeof(DateTimeOffset));
|
||||
DisplayData.Columns.Add("SyncMarkRecord", typeof(SyncMarkRecord));
|
||||
DisplayData.Columns.Add("CALC!VolumenDiffFromStartQm", typeof(double));
|
||||
DisplayData.Columns.Add("CALC!FlowrateFromStartQmH", typeof(double));
|
||||
DisplayData.Columns.Add("CALC!ShortFlowrateQmH", typeof(double));
|
||||
|
||||
|
||||
ChlData1 = new DataTable("ChlData1");
|
||||
ChlData2 = new DataTable("ChlData2");
|
||||
ChlData3 = new DataTable("ChlData3");
|
||||
|
||||
foreach (var item in testPointResults.Where(f => f.Chnl == 0))
|
||||
{
|
||||
FlowTestRecord firstRecord = null;
|
||||
FlowTestRecord prevRecord = null;
|
||||
|
||||
|
||||
foreach (var raw in item.measurementRecords)
|
||||
{
|
||||
if (raw is FlowTestRecord ftr)
|
||||
{
|
||||
|
||||
if (firstRecord == null)
|
||||
{
|
||||
firstRecord = ftr;
|
||||
prevRecord = ftr;
|
||||
DisplayData.Rows.Add(
|
||||
item.TestNr + 1,
|
||||
this.Details[item.TestNr].FlowTargetQmh,
|
||||
this.Details[item.TestNr].FlowrateQmh,
|
||||
this.Details[item.TestNr].VolumeQm,
|
||||
this.Details[item.TestNr].Info,
|
||||
0,
|
||||
ftr.ReceivedTime,
|
||||
ftr.VolumeCm,
|
||||
ftr.OverflowVolumeCm,
|
||||
ftr.TimeS,
|
||||
ftr.OverflowTimeS,
|
||||
ftr.Crc,
|
||||
ftr.IsValid,
|
||||
ftr.DecodedTime,
|
||||
ftr.SyncMarkRecord,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
var volDiffStart = ftr.VolumeCm - firstRecord.VolumeCm;
|
||||
var volDiffprev = ftr.VolumeCm - prevRecord.VolumeCm;
|
||||
var timeDiffStart = ftr.TimeS - firstRecord.TimeS;
|
||||
var timeDiffprev = ftr.TimeS - prevRecord.TimeS;
|
||||
var ts = (ftr.ReceivedTime - firstRecord.ReceivedTime).TotalSeconds;
|
||||
DisplayData.Rows.Add(
|
||||
item.TestNr + 1,
|
||||
this.Details[item.TestNr].FlowTargetQmh,
|
||||
this.Details[item.TestNr].FlowrateQmh,
|
||||
this.Details[item.TestNr].VolumeQm,
|
||||
this.Details[item.TestNr].Info,
|
||||
ts,
|
||||
ftr.ReceivedTime,
|
||||
ftr.VolumeCm,
|
||||
ftr.OverflowVolumeCm,
|
||||
ftr.TimeS,
|
||||
ftr.OverflowTimeS,
|
||||
ftr.Crc,
|
||||
ftr.IsValid,
|
||||
|
||||
ftr.DecodedTime,
|
||||
ftr.SyncMarkRecord,
|
||||
volDiffStart,
|
||||
(volDiffStart / timeDiffStart) * 3600,
|
||||
(volDiffprev / timeDiffprev) * 3600
|
||||
);
|
||||
|
||||
|
||||
prevRecord = ftr;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
for (int i = 1; i <= 3; i++)
|
||||
{
|
||||
var lCounter = 0;
|
||||
DataTable dtChnl = ChlData3;
|
||||
if (i == 1)
|
||||
{
|
||||
dtChnl = ChlData1;
|
||||
}
|
||||
else if (i == 2)
|
||||
{
|
||||
dtChnl = ChlData2;
|
||||
}
|
||||
else if (i == 2)
|
||||
{
|
||||
dtChnl = ChlData3;
|
||||
}
|
||||
|
||||
dtChnl.Columns.Add("TestNr", typeof(int));
|
||||
dtChnl.Columns.Add("FlowTargetQmh", typeof(double));
|
||||
dtChnl.Columns.Add("FlowrateQmh", typeof(double));
|
||||
dtChnl.Columns.Add("VolumeQm", typeof(double));
|
||||
dtChnl.Columns.Add("Info", typeof(string));
|
||||
dtChnl.Columns.Add("CALC!DurationS", typeof(double));
|
||||
dtChnl.Columns.Add("ReceivedTimeUtc", typeof(DateTimeOffset));
|
||||
dtChnl.Columns.Add("Validation", typeof(ushort));
|
||||
dtChnl.Columns.Add("TotalTimeOfFlightS", typeof(double));
|
||||
dtChnl.Columns.Add("DeltaTimeOfFlightS", typeof(double));
|
||||
dtChnl.Columns.Add("RawTotalTimeOfFlight", typeof(int));
|
||||
dtChnl.Columns.Add("RawDeltaTimeOfFlight", typeof(int));
|
||||
dtChnl.Columns.Add("VolumeScaleRawPerMl", typeof(double));
|
||||
dtChnl.Columns.Add("VolumeFactorRawToQm", typeof(double));
|
||||
dtChnl.Columns.Add("DeltaVolumeRaw", typeof(double));
|
||||
dtChnl.Columns.Add("DeltaVolumeQm", typeof(double));
|
||||
dtChnl.Columns.Add("AccuVolumeRaw", typeof(double));
|
||||
dtChnl.Columns.Add("SampleIntervalS", typeof(double));
|
||||
dtChnl.Columns.Add("AmplitudeUpV", typeof(double));
|
||||
dtChnl.Columns.Add("AmplitudeDownV", typeof(double));
|
||||
dtChnl.Columns.Add("PulseWidthRatioUp", typeof(double));
|
||||
dtChnl.Columns.Add("PulseWidthRatioDown", typeof(double));
|
||||
dtChnl.Columns.Add("TemperatureRaw", typeof(double));
|
||||
dtChnl.Columns.Add("TemperaturePowFactor", typeof(double));
|
||||
dtChnl.Columns.Add("TemperatureDegC", typeof(double));
|
||||
dtChnl.Columns.Add("CALC!VolumenDiffFromStart", typeof(double));
|
||||
dtChnl.Columns.Add("CALC!FlowrateFromStart", typeof(double));
|
||||
dtChnl.Columns.Add("CALC!ShortFlowrate", typeof(double));
|
||||
|
||||
|
||||
|
||||
foreach (var item in testPointResults.Where(f => f.Chnl == i))
|
||||
{
|
||||
CalibrationRecord firstRecord = null;
|
||||
CalibrationRecord prevRecord = null;
|
||||
|
||||
foreach (var raw in item.measurementRecords)
|
||||
{
|
||||
if (raw is CalibrationRecord ftr)
|
||||
{
|
||||
|
||||
if (firstRecord == null)
|
||||
{
|
||||
firstRecord = ftr;
|
||||
prevRecord = ftr;
|
||||
|
||||
|
||||
dtChnl.Rows.Add(item.TestNr + 1,
|
||||
this.Details[item.TestNr].FlowTargetQmh,
|
||||
this.Details[item.TestNr].FlowrateQmh,
|
||||
this.Details[item.TestNr].VolumeQm,
|
||||
this.Details[item.TestNr].Info,
|
||||
0.0,
|
||||
ftr.ReceivedTime,
|
||||
ftr.Validation,
|
||||
ftr.TotalTimeOfFlightS,
|
||||
ftr.DeltaTimeOfFlightS,
|
||||
ftr.RawTotalTimeOfFlight,
|
||||
ftr.RawDeltaTimeOfFlight,
|
||||
ftr.VolumeScaleRawPerMl,
|
||||
ftr.VolumeFactorRawToQm,
|
||||
ftr.DeltaVolumeRaw,
|
||||
ftr.DeltaVolumeQm,
|
||||
ftr.AccuVolumeRaw,
|
||||
ftr.SampleIntervalS,
|
||||
ftr.AmplitudeUpV,
|
||||
ftr.AmplitudeDownV,
|
||||
ftr.PulseWidthRatioUp,
|
||||
ftr.PulseWidthRatioDown,
|
||||
ftr.TemperatureRaw,
|
||||
ftr.TemperaturePowFactor,
|
||||
ftr.TemperatureDegC,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
var volDiffStart = ftr.VolumeCm - firstRecord.VolumeCm;
|
||||
var volDiffprev = ftr.VolumeCm - prevRecord.VolumeCm;
|
||||
var timeDiffStart = ftr.TimeS - firstRecord.TimeS;
|
||||
var timeDiffprev = ftr.TimeS - prevRecord.TimeS;
|
||||
var ts = (ftr.ReceivedTime - firstRecord.ReceivedTime).TotalSeconds;
|
||||
|
||||
dtChnl.Rows.Add(item.TestNr + 1,
|
||||
this.Details[item.TestNr].FlowTargetQmh,
|
||||
this.Details[item.TestNr].FlowrateQmh,
|
||||
this.Details[item.TestNr].VolumeQm,
|
||||
this.Details[item.TestNr].Info,
|
||||
ts,
|
||||
ftr.ReceivedTime,
|
||||
ftr.Validation,
|
||||
ftr.TotalTimeOfFlightS,
|
||||
ftr.DeltaTimeOfFlightS,
|
||||
ftr.RawTotalTimeOfFlight,
|
||||
ftr.RawDeltaTimeOfFlight,
|
||||
ftr.VolumeScaleRawPerMl,
|
||||
ftr.VolumeFactorRawToQm,
|
||||
ftr.DeltaVolumeRaw,
|
||||
ftr.DeltaVolumeQm,
|
||||
ftr.AccuVolumeRaw,
|
||||
ftr.SampleIntervalS,
|
||||
ftr.AmplitudeUpV,
|
||||
ftr.AmplitudeDownV,
|
||||
ftr.PulseWidthRatioUp,
|
||||
ftr.PulseWidthRatioDown,
|
||||
ftr.TemperatureRaw,
|
||||
ftr.TemperaturePowFactor,
|
||||
ftr.TemperatureDegC,
|
||||
volDiffStart,
|
||||
(volDiffStart / timeDiffStart) * 3600,
|
||||
(volDiffprev / timeDiffprev) * 3600
|
||||
|
||||
);
|
||||
prevRecord = ftr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public bool MapDataPoints(List<List<IMeasurementRecord>> listOfRecords)
|
||||
{
|
||||
ListOfRecords = listOfRecords;
|
||||
@ -163,7 +431,7 @@ namespace CordoPlot
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public PlotResult Plot(int Chnl, int? TestNr = null)
|
||||
{
|
||||
//
|
||||
@ -178,7 +446,7 @@ namespace CordoPlot
|
||||
List<double> TofLines = new List<double>();
|
||||
List<double> AmplitudeUpVLines = new List<double>();
|
||||
List<double> AmplitudeDownVLines = new List<double>();
|
||||
|
||||
|
||||
|
||||
var linecounter = 0;
|
||||
var counter = 0;
|
||||
@ -209,14 +477,14 @@ namespace CordoPlot
|
||||
}
|
||||
else if (line is PlotFlowTestRecord disp)
|
||||
{
|
||||
|
||||
|
||||
//VolumeLine.Add(disp.LineNummer);
|
||||
}
|
||||
|
||||
|
||||
if (!VolumeLine.Any())
|
||||
{
|
||||
VolumeLine.Add(0);
|
||||
|
||||
|
||||
LastVolOrig = line.GetVolumeCm();
|
||||
intiVol = 0;
|
||||
}
|
||||
|
||||
32
Common/CordoPlot/StartDialog.xaml
Normal file
32
Common/CordoPlot/StartDialog.xaml
Normal file
@ -0,0 +1,32 @@
|
||||
<Window x:Class="CordoPlot.StartDialog"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:CordoPlot"
|
||||
mc:Ignorable="d"
|
||||
Title="StartDialog" Height="450" Width="800">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="43*"/>
|
||||
<ColumnDefinition Width="523*"/>
|
||||
<ColumnDefinition Width="170*"/>
|
||||
<ColumnDefinition Width="64*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="62*"/>
|
||||
<RowDefinition Height="51*"/>
|
||||
<RowDefinition Height="41*"/>
|
||||
<RowDefinition Height="29*"/>
|
||||
<RowDefinition Height="43*"/>
|
||||
<RowDefinition Height="173*"/>
|
||||
<RowDefinition Height="35*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Button Click="Button_Click" Grid.Row="2" Margin="10,3,17,10" Content="Folder" Grid.Column="2" />
|
||||
<DataGrid Name="Fileoverview" ItemsSource="{Binding}" SelectionUnit="Cell" IsReadOnly="True" SelectedCellsChanged="Fileoverview_SelectedCellsChanged" CurrentCellChanged="Fileoverview_CurrentCellChanged" Grid.Column="1" HorizontalAlignment="Center" Height="266" Grid.Row="2" VerticalAlignment="Top" Width="503" d:ItemsSource="{d:SampleData ItemCount=5}" Margin="0,10,0,0" Grid.RowSpan="4"/>
|
||||
|
||||
|
||||
<Label Name="lblProgress" Grid.Column="2" Margin="10,41,10,0" Grid.Row="2" Content="Open Files" Grid.RowSpan="2" FontSize="7"></Label>
|
||||
<ProgressBar Minimum="0" Maximum="100" Value="75" Name="pbStatus" Grid.Column="2" Margin="10,10,10,10" Grid.Row="4" />
|
||||
</Grid>
|
||||
</Window>
|
||||
264
Common/CordoPlot/StartDialog.xaml.cs
Normal file
264
Common/CordoPlot/StartDialog.xaml.cs
Normal file
@ -0,0 +1,264 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
using Newtonsoft.Json;
|
||||
using Xylem.Common.CommonCore.Consts;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.TestResults;
|
||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||
using Xylem.Common.Metrology.Measurements;
|
||||
|
||||
|
||||
namespace CordoPlot
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für StartDialog.xaml
|
||||
/// </summary>
|
||||
public partial class StartDialog : Window
|
||||
{
|
||||
public StartDialog()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
string[] FileNames;
|
||||
private void Button_Click(Object sender, RoutedEventArgs e)
|
||||
{
|
||||
var dialog = new Microsoft.Win32.OpenFileDialog();
|
||||
dialog.FileName = "led"; // Default file name
|
||||
dialog.DefaultExt = ".log"; // Default file extension
|
||||
dialog.Filter = "Text documents (.log)|*.log"; // Filter files by extension
|
||||
dialog.Multiselect = true;
|
||||
bool? result = dialog.ShowDialog();
|
||||
|
||||
// Process open file dialog box results
|
||||
|
||||
|
||||
if (result == true)
|
||||
{
|
||||
TestResults = new List<PlotableTestResults>();
|
||||
FileNames = dialog.FileNames;
|
||||
|
||||
pbStatus.Maximum = dialog.FileNames.Length;
|
||||
|
||||
BackgroundWorker worker = new BackgroundWorker();
|
||||
worker.WorkerReportsProgress = true;
|
||||
worker.DoWork += worker_DoWork;
|
||||
|
||||
worker.ProgressChanged += worker_ProgressChanged;
|
||||
|
||||
worker.RunWorkerAsync();
|
||||
worker.RunWorkerCompleted += Worker_RunWorkerCompleted;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void Worker_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e)
|
||||
{
|
||||
DataTable MainInfoDt = new DataTable("DisplayData");
|
||||
|
||||
|
||||
MainInfoDt.Columns.Add("Nr", typeof(int));
|
||||
MainInfoDt.Columns.Add("File", typeof(string));
|
||||
MainInfoDt.Columns.Add("Status", typeof(bool));
|
||||
|
||||
|
||||
|
||||
var i = 0;
|
||||
foreach (PlotableTestResults row in TestResults)
|
||||
{
|
||||
i = i + 1;
|
||||
MainInfoDt.Rows.Add(i, row.FileName, row.HasResults);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Fileoverview.DataContext = MainInfoDt.DefaultView;
|
||||
|
||||
}
|
||||
|
||||
void worker_DoWork(object sender, DoWorkEventArgs e)
|
||||
{
|
||||
var i = 0;
|
||||
foreach (var filename in FileNames)
|
||||
{
|
||||
|
||||
|
||||
|
||||
i = i + 1;
|
||||
(sender as BackgroundWorker).ReportProgress(i, $"({i}/{FileNames.Length}){filename}");
|
||||
PlotableTestResults testBenchresults = new PlotableTestResults();
|
||||
testBenchresults.FileName = filename;
|
||||
try
|
||||
{
|
||||
|
||||
|
||||
var AllLines = File.ReadAllLines(filename);
|
||||
|
||||
//LedRawData__Slot_7_SN24712962_PG2016079130.log
|
||||
if (filename.Contains("_SN") && filename.Contains("_PG"))
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
|
||||
var sn = filename.Substring(filename.LastIndexOf("_SN") + 3, filename.LastIndexOf("_PG") - filename.LastIndexOf("_SN") - 3);
|
||||
var pg = filename.Substring(filename.LastIndexOf("_PG") + 3, filename.LastIndexOf(".log") - filename.LastIndexOf("_PG") - 3);
|
||||
testBenchresults = JsonConvert.DeserializeObject<PlotableTestResults>(LocalWebRequest.GetRequest($"http://localhost:50076/api/TestBench/GetTestResults?SerialNr={sn}&TestRunNr={pg}", 10000));
|
||||
testBenchresults.HasResults = true;
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var listOfData = new List<List<IMeasurementRecord>>();
|
||||
listOfData.Add(new List<IMeasurementRecord>());
|
||||
listOfData.Add(new List<IMeasurementRecord>());
|
||||
listOfData.Add(new List<IMeasurementRecord>());
|
||||
listOfData.Add(new List<IMeasurementRecord>());
|
||||
var decoder = new StreamingDecoder();
|
||||
var currentSyncmark = SyncMarkRecord.DecodeEveryPackage;
|
||||
//DecodeMsg
|
||||
var linecounter = 0;
|
||||
foreach (var line in AllLines)
|
||||
{
|
||||
linecounter = linecounter + 1;
|
||||
decoder = new StreamingDecoder();
|
||||
|
||||
if (line.Contains("|"))
|
||||
{
|
||||
|
||||
var t = line.Split('|');
|
||||
DateTime recived = DateTime.Now;
|
||||
DateTime.TryParse(t[0], out recived);
|
||||
if (t[1].Contains("@"))
|
||||
{
|
||||
decoder.DecodeMsg(t[1].Trim());
|
||||
IMeasurementRecord recordToAdd;
|
||||
if (decoder.DataBendDetectTest != null && decoder.DataBendDetectTest.IsValid)
|
||||
{
|
||||
decoder.DataBendDetectTest.ReceivedTime = recived;
|
||||
decoder.DataBendDetectTest.SyncMarkRecord = currentSyncmark;
|
||||
recordToAdd = decoder.DataBendDetectTest;
|
||||
}
|
||||
else if (decoder.DataCalib != null && decoder.DataCalib.IsValid)
|
||||
{
|
||||
decoder.DataCalib.ReceivedTime = recived;
|
||||
decoder.DataCalib.SyncMarkRecord = currentSyncmark;
|
||||
var n = new PlotCalibrationRecord(decoder.DataCalib, linecounter);
|
||||
|
||||
listOfData[n.GetChannel()].Add(n);
|
||||
}
|
||||
else if (decoder.DataFlowTest != null && decoder.DataFlowTest.IsValid)
|
||||
{
|
||||
decoder.DataFlowTest.ReceivedTime = recived;
|
||||
decoder.DataFlowTest.SyncMarkRecord = currentSyncmark;
|
||||
var n = new PlotFlowTestRecord(decoder.DataFlowTest, linecounter);
|
||||
listOfData[n.GetChannel()].Add(n);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//No valid data
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (line.Contains("Mark next incoming record as"))
|
||||
{
|
||||
if (line.Contains("Mark next incoming record as SyncStart"))
|
||||
{
|
||||
currentSyncmark = SyncMarkRecord.SyncStart;
|
||||
}
|
||||
else if (line.Contains("Mark next incoming record as DecodeIntermediate"))
|
||||
{
|
||||
currentSyncmark = SyncMarkRecord.DecodeIntermediate;
|
||||
}
|
||||
else if (line.Contains("Mark next incoming record as SkipDecoding"))
|
||||
{
|
||||
currentSyncmark = SyncMarkRecord.SkipDecoding;
|
||||
}
|
||||
else if (line.Contains("Mark next incoming record as SyncEnd"))
|
||||
{
|
||||
currentSyncmark = SyncMarkRecord.SyncEnd;
|
||||
}
|
||||
else
|
||||
{
|
||||
currentSyncmark = SyncMarkRecord.DecodeEveryPackage;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//FlowTestRecord
|
||||
}
|
||||
|
||||
|
||||
testBenchresults.MapDataPoints(listOfData);
|
||||
|
||||
|
||||
|
||||
|
||||
testBenchresults.PrepExprtDataPoints();
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
TestResults.Add(testBenchresults);
|
||||
Thread.Sleep(100);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void worker_ProgressChanged(object sender, ProgressChangedEventArgs e)
|
||||
{
|
||||
pbStatus.Value = e.ProgressPercentage;
|
||||
lblProgress.Content = (string)e.UserState;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public List<PlotableTestResults> TestResults { get; set; }
|
||||
|
||||
private void Fileoverview_SelectedCellsChanged(Object sender, SelectedCellsChangedEventArgs e)
|
||||
{
|
||||
DataGridCellInfo di = e.AddedCells.First();
|
||||
|
||||
var currentIndex = Fileoverview.Items.IndexOf(Fileoverview.CurrentItem);
|
||||
TestResults[currentIndex];
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void Fileoverview_CurrentCellChanged(Object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,13 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace CordonelAssemblyLine
|
||||
namespace CordonelAssemblyLine
|
||||
{
|
||||
using System.Windows;
|
||||
|
||||
/// <summary>
|
||||
/// Interaction logic for App.xaml
|
||||
/// </summary>
|
||||
|
||||
@ -14,10 +14,11 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<IsWebBootstrapper>true</IsWebBootstrapper>
|
||||
<PublishUrl>\\SLA12IIS01\LaaProductionWeb\Apps\CordonelAssembly\</PublishUrl>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<TargetFrameworkProfile />
|
||||
<PublishUrl>Z:\Aktuelle Anwendungen\Publish\Cordonel Assembly Line\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Web</InstallFrom>
|
||||
<InstallFrom>Unc</InstallFrom>
|
||||
<UpdateEnabled>true</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
@ -25,19 +26,17 @@
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<InstallUrl>http://sla12iis01.emea.sensus.net/LaaProductionWeb/Apps/CordonelAssembly/</InstallUrl>
|
||||
<InstallUrl>\\sla12file\auftrag\Aktuelle Anwendungen\Publish\Cordonel Assembly Line\</InstallUrl>
|
||||
<ProductName>Cordonel Assembly Line</ProductName>
|
||||
<PublisherName>Xylem Sensus Laatzen</PublisherName>
|
||||
<SuiteName>Cordonel Assembly Line</SuiteName>
|
||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||
<WebPage>publish.htm</WebPage>
|
||||
<ApplicationRevision>8</ApplicationRevision>
|
||||
<ApplicationRevision>14</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@ -81,7 +80,7 @@
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ManifestCertificateThumbprint>305BF210A6BBE3C987AD135C96F7B55EC538E555</ManifestCertificateThumbprint>
|
||||
<ManifestCertificateThumbprint>254AA244F3F29F0692A7B2FAA31F24C884355262</ManifestCertificateThumbprint>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ManifestKeyFile>CordonelAssemblyLine_TemporaryKey.pfx</ManifestKeyFile>
|
||||
@ -118,6 +117,11 @@
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>sensus.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup />
|
||||
<PropertyGroup />
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
@ -128,6 +132,7 @@
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Xml" />
|
||||
@ -204,7 +209,7 @@
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<None Include="CordonelAssemblyLine_TemporaryKey.pfx" />
|
||||
@ -295,6 +300,12 @@
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\sensus.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="sensus.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>del /Q /S *.xml *.pdb</PostBuildEvent>
|
||||
|
||||
@ -5,13 +5,17 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ProductionControls1="clr-namespace:Ui.ProductionControls;assembly=ProductionControls"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="450" Width="800" Closing="Window_Closing">
|
||||
Title="Cordonel Assembly Line"
|
||||
Height="450"
|
||||
Width="800"
|
||||
Closing="Window_Closing">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="100"/>
|
||||
<RowDefinition Height="100"/>
|
||||
<RowDefinition Height="100"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="264*"/>
|
||||
@ -114,5 +118,15 @@
|
||||
<Button Name="btn2" Content="2" Grid.Column="3" HorizontalAlignment="Left" Height="28" Margin="52,36,0,0" Grid.Row="2" VerticalAlignment="Top" Width="17" Click="Btn2_Click"/>
|
||||
<Button Name="btn3" Content="3" Grid.Column="3" HorizontalAlignment="Left" Height="28" Margin="89,36,0,0" Grid.Row="2" VerticalAlignment="Top" Width="17" Click="Btn3_Click"/>
|
||||
|
||||
<TextBlock Text="GoTo Current Directory ->"
|
||||
Grid.Row="4"
|
||||
FontFamily="Consolas"
|
||||
FontStyle="Italic"
|
||||
FontSize="10" Padding="0"
|
||||
Margin="13 8"
|
||||
Foreground="LightGray"
|
||||
TextDecorations="Underline"
|
||||
MouseDown="TextBlock_MouseDown"
|
||||
Cursor="Hand"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
@ -167,5 +168,11 @@ namespace CordonelAssemblyLine
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void TextBlock_MouseDown(Object sender, System.Windows.Input.MouseButtonEventArgs e)
|
||||
{
|
||||
Process.Start(Environment.CurrentDirectory);
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -625,14 +625,14 @@ namespace CordonelAssemblyLine.Model
|
||||
|
||||
|
||||
|
||||
//if (genesisStatus.AlternativeRequiredBatteryLoadPercent != null &&
|
||||
// genesisStatus.AlternativeRequiredBatteryLoadPercent > requirements.MaxDrainedBatteryLoadPercentAssembly)
|
||||
//{
|
||||
// sbMSG.AppendLine($"{nameof(genesisStatus.AlternativeRequiredBatteryLoadPercent)}: " +
|
||||
// $"{genesisStatus.AlternativeRequiredBatteryLoadPercent} > " + $"{requirements.MaxDrainedBatteryLoadPercentAssembly}");
|
||||
// ret = false;
|
||||
//}
|
||||
//else sbMSG.AppendLine($"Alternative Batterieverbrauch Montage i.O.");
|
||||
if (genesisStatus.AlternativeRequiredBatteryLoadPercent != null &&
|
||||
genesisStatus.AlternativeRequiredBatteryLoadPercent > requirements.MaxDrainedBatteryLoadPercentAssembly * 0.5)
|
||||
{
|
||||
sbMSG.AppendLine($"{nameof(genesisStatus.AlternativeRequiredBatteryLoadPercent)}: " +
|
||||
$"{genesisStatus.AlternativeRequiredBatteryLoadPercent} > " + $"{requirements.MaxDrainedBatteryLoadPercentAssembly}");
|
||||
ret = false;
|
||||
}
|
||||
else sbMSG.AppendLine($"Alternative Batterieverbrauch Montage i.O.");
|
||||
// max bat verbrauch - MaxDrainedBatteryLoadPercentAssembly
|
||||
|
||||
if (genesisStatus.DrainedBatteryLoadPercent > requirements.MaxDrainedBatteryLoadPercentAssembly)
|
||||
@ -1157,19 +1157,29 @@ namespace CordonelAssemblyLine.Model
|
||||
|
||||
if (rebootsCount > 0)
|
||||
{
|
||||
Log($"{_pcbId} hat {rebootsCount} mal neuegestarted!");
|
||||
|
||||
var messageBoxResult = MessageBox.Show(
|
||||
$"{_pcbId} hat {rebootsCount}-mal neu gestartet!"
|
||||
+ $"{Environment.NewLine}"
|
||||
+ $"{Environment.NewLine}Möchten Sie fortfahren?"
|
||||
, $"PcbId: {_pcbId}"
|
||||
, $"Rechenwerk: {_pcbId}"
|
||||
, MessageBoxButton.YesNo
|
||||
, MessageBoxImage.Error
|
||||
, MessageBoxImage.Warning
|
||||
, MessageBoxResult.Yes
|
||||
, MessageBoxOptions.ServiceNotification);
|
||||
|
||||
if (messageBoxResult == MessageBoxResult.No)
|
||||
{
|
||||
Log($"{_pcbId} hat {rebootsCount} mal neuegestarted!");
|
||||
lblS02Color = _progressError;
|
||||
lblS03Color = _progressError;
|
||||
_state = PickingStateMachine.MeterError;
|
||||
}
|
||||
else
|
||||
{
|
||||
lblS02Color = _progressDone;
|
||||
lblS03Color = _progressWaiting;
|
||||
_state = PickingStateMachine.GetOrderDetails;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1179,19 +1189,6 @@ namespace CordonelAssemblyLine.Model
|
||||
}
|
||||
|
||||
lblS02Text = _pcbId;
|
||||
|
||||
if (_state != PickingStateMachine.MeterError)
|
||||
{
|
||||
lblS02Color = _progressDone;
|
||||
lblS03Color = _progressWaiting;
|
||||
_state = PickingStateMachine.GetOrderDetails;
|
||||
}
|
||||
else
|
||||
{
|
||||
lblS02Color = _progressError;
|
||||
lblS03Color = _progressError;
|
||||
_state = PickingStateMachine.MeterError;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
@ -22,7 +22,7 @@ namespace CordonelAssemblyLine.Properties {
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
public class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
@ -36,7 +36,7 @@ namespace CordonelAssemblyLine.Properties {
|
||||
/// 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 {
|
||||
public static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CordonelAssemblyLine.Properties.Resources", typeof(Resources).Assembly);
|
||||
@ -51,7 +51,7 @@ namespace CordonelAssemblyLine.Properties {
|
||||
/// 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 {
|
||||
public static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
@ -60,6 +60,7 @@
|
||||
: 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">
|
||||
@ -68,9 +69,10 @@
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<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">
|
||||
@ -85,9 +87,10 @@
|
||||
<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="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">
|
||||
@ -109,9 +112,9 @@
|
||||
<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>
|
||||
<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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
BIN
Common/CordonelAssemblyLine/Resources/sensus.png
Normal file
BIN
Common/CordonelAssemblyLine/Resources/sensus.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 233 B |
BIN
Common/CordonelAssemblyLine/sensus.ico
Normal file
BIN
Common/CordonelAssemblyLine/sensus.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
@ -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>
|
||||
@ -149,6 +149,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup />
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
|
||||
|
||||
@ -32,11 +32,12 @@ namespace Xylem.Common.Ui.CordonelPreadjustmentUi.Parameters
|
||||
DurationS = 120;
|
||||
break;
|
||||
case MeterSize.DN100:
|
||||
case MeterSize.DN125:
|
||||
case MeterSize.US4:
|
||||
FlowrateQmH = 140;
|
||||
DurationS = 120;
|
||||
break;
|
||||
case MeterSize.DN125:
|
||||
|
||||
case MeterSize.US6:
|
||||
FlowrateQmH = 400;
|
||||
DurationS = 60;
|
||||
|
||||
@ -14,11 +14,11 @@ using static CordonelPreadjustmentUi.PreAdjustmentControl;
|
||||
|
||||
namespace CordonelPreadjustmentUi.Processes.Actions
|
||||
{
|
||||
public class OfflinePaswordItem
|
||||
public class TempFlanschPaswordItem
|
||||
{
|
||||
public OfflinePaswordItem()
|
||||
public TempFlanschPaswordItem()
|
||||
{ }
|
||||
public OfflinePaswordItem(String pcbID, String password)
|
||||
public TempFlanschPaswordItem(String pcbID, String password)
|
||||
{
|
||||
PcbID = pcbID;
|
||||
Password = password;
|
||||
@ -29,7 +29,7 @@ namespace CordonelPreadjustmentUi.Processes.Actions
|
||||
public String Password { get; set; }
|
||||
|
||||
|
||||
public int? Slot { get; set; }
|
||||
public int Slot { get; set; }
|
||||
|
||||
}
|
||||
public class LoginProcess : BaseProcess
|
||||
@ -60,11 +60,11 @@ namespace CordonelPreadjustmentUi.Processes.Actions
|
||||
if (pp.Setting.GetTempUseTempFlansh())
|
||||
{
|
||||
|
||||
String CurrentConfigDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), ProgramConfig.GenesisBaseFolder, ProgramConfig.OfflineInfoFile);
|
||||
String CurrentConfigDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), ProgramConfig.GenesisBaseFolder, "TempFlansch.json");
|
||||
|
||||
if (File.Exists(CurrentConfigDir))
|
||||
{
|
||||
var listOfOfflinePasswords = JsonConvert.DeserializeObject<List<OfflinePaswordItem>>(
|
||||
var listOfOfflinePasswords = JsonConvert.DeserializeObject<List<TempFlanschPaswordItem>>(
|
||||
File.ReadAllText(CurrentConfigDir));
|
||||
if (listOfOfflinePasswords != null)
|
||||
{
|
||||
|
||||
@ -7,7 +7,10 @@ namespace Common.Hardware.SIRT.Parameters
|
||||
private readonly byte[] bits;
|
||||
|
||||
public PAMStatus(byte _byte)
|
||||
=> this.bits = _byte.GetBits();
|
||||
{
|
||||
this.IsValid = _byte <= 31;
|
||||
this.bits = _byte.GetBits();
|
||||
}
|
||||
|
||||
public bool CMD_UNKNOWN => this.bits[0] == 1;
|
||||
|
||||
@ -19,6 +22,8 @@ namespace Common.Hardware.SIRT.Parameters
|
||||
|
||||
public bool OUT_OF_RANGE => this.bits[4] == 1;
|
||||
|
||||
public bool IsValid { get; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
if (this.bits.GetByte() == 0)
|
||||
|
||||
@ -229,6 +229,11 @@
|
||||
|
||||
public static ushort CRCCCITT(this byte[] bytes, int start = 0, int length = 0)
|
||||
{
|
||||
if (bytes.Length <= 0)
|
||||
{
|
||||
return default(ushort);
|
||||
}
|
||||
|
||||
if (length == 0)
|
||||
{
|
||||
length = bytes.Length;
|
||||
|
||||
@ -138,23 +138,6 @@
|
||||
return broadcaster.IsOpen;
|
||||
}
|
||||
|
||||
public static void OnMessageReceived(Action<SIRTMessage> messageReceivedDelegate)
|
||||
{
|
||||
if (messageReceivedDelegate != null)
|
||||
{
|
||||
messageReceiveDelegates.Add(messageReceivedDelegate);
|
||||
|
||||
foreach (var broadcaster in broadcasters.Values.ToArray())
|
||||
{
|
||||
foreach (var @delegate in messageReceiveDelegates)
|
||||
{
|
||||
broadcaster.MessageReceived -= @delegate;
|
||||
broadcaster.MessageReceived += @delegate;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void LogMessage(object message)
|
||||
=> SIRTLogger.LogMessage($"{nameof(SIRTHub)}|{message}");
|
||||
}
|
||||
|
||||
@ -7,15 +7,31 @@
|
||||
public class SIRTMessage
|
||||
{
|
||||
private byte[] bytes;
|
||||
private bool buildCRC;
|
||||
|
||||
public SIRTMessage()
|
||||
{
|
||||
this.bytes = new byte[MIN_LEN];
|
||||
this.bytes[0] = PC_SIRT;
|
||||
this.buildCRC = true;
|
||||
}
|
||||
|
||||
public SIRTMessage(byte[] bytes)
|
||||
=> this.bytes = bytes;
|
||||
public SIRTMessage(byte[] bytes)
|
||||
{
|
||||
if (bytes is null)
|
||||
{
|
||||
bytes = Array.Empty<byte>();
|
||||
}
|
||||
|
||||
var length = Math.Max(MIN_LEN, bytes.Length);
|
||||
|
||||
this.bytes = new byte[length];
|
||||
|
||||
if (bytes.Length > 0)
|
||||
{
|
||||
Array.Copy(bytes, 0, this.bytes, 0, bytes.Length);
|
||||
}
|
||||
}
|
||||
|
||||
public byte Direction
|
||||
{
|
||||
@ -96,7 +112,11 @@
|
||||
|
||||
public byte[] GetBytes()
|
||||
{
|
||||
this.Crc = this.bytes.CRCCCITT(1, this.bytes.Length - 3);
|
||||
if (this.buildCRC)
|
||||
{
|
||||
this.Crc = this.bytes.CRCCCITT(1, this.bytes.Length - 3);
|
||||
}
|
||||
|
||||
this.End = MSG_END;
|
||||
|
||||
return this.bytes;
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
using Common.Hardware.SIRT.Parameters;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class WritePamTask : SIRTTask
|
||||
{
|
||||
@ -29,6 +30,9 @@
|
||||
this.SEMIReceived += this.OnSEMIReceived;
|
||||
this.UnknownReceived += this.OnUnknownReceived;
|
||||
this.RequireLAT = true;
|
||||
this.PamStatusIX = 11;
|
||||
this.DebugLength = 52;
|
||||
this.SemiLength = 91;
|
||||
}
|
||||
|
||||
public event Action<SIRTMessage> MessageSent;
|
||||
@ -40,7 +44,18 @@
|
||||
|
||||
public bool IsEncrypted { get; set; }
|
||||
|
||||
public byte[] EncryptionKey { get; set; }
|
||||
public byte[] EncryptionKeyI { get; set; }
|
||||
|
||||
private byte[] encryptionKeyII;
|
||||
public byte[] EncryptionKeyII
|
||||
{
|
||||
get => this.encryptionKeyII;
|
||||
set
|
||||
{
|
||||
this.encryptionKeyII = value;
|
||||
this.IsEncrypted = true;
|
||||
}
|
||||
}
|
||||
|
||||
public bool WakeUpModul
|
||||
{
|
||||
@ -90,24 +105,33 @@
|
||||
set => this.request.Payload = value;
|
||||
}
|
||||
|
||||
public byte DebugLength { get; set; }
|
||||
|
||||
public byte SemiLength { get; set; }
|
||||
|
||||
public byte PamStatusIX { get; set; }
|
||||
|
||||
public bool AnyTelegramReceived { get; set; }
|
||||
|
||||
public Queue<SIRTMessage> MessageQueue { get; set; } = new Queue<SIRTMessage>();
|
||||
|
||||
public override void Receive(SIRTMessage response)
|
||||
{
|
||||
if (response.Command == SIRTConstants.ACKN_ANSW)
|
||||
if (this.UseEncryption(response))
|
||||
{
|
||||
this.DecriptResponse(response);
|
||||
}
|
||||
|
||||
this.MessageQueue.Enqueue(response);
|
||||
|
||||
if (response.Command == SIRTConstants.ACKN_ANSW)
|
||||
{
|
||||
this.AKNReceived?.Invoke(response);
|
||||
}
|
||||
else if (response.Command == SIRTConstants.FROM_AIR)
|
||||
{
|
||||
var payload = response?.Payload;
|
||||
|
||||
if (this.UseEncryption(response))
|
||||
{
|
||||
this.DecriptResponse(response);
|
||||
}
|
||||
|
||||
if (payload != null && payload.Length > 0)
|
||||
{
|
||||
var type = payload[0];
|
||||
@ -156,6 +180,8 @@
|
||||
{
|
||||
this.latReceived = false;
|
||||
this.debugReceived = false;
|
||||
|
||||
var payload = this.EncryptRequest();
|
||||
var message = new SIRTMessage
|
||||
{
|
||||
Direction = this.request.Direction,
|
||||
@ -163,7 +189,7 @@
|
||||
P1 = this.request.P1,
|
||||
P2 = this.request.P2,
|
||||
Address = this.request.Address,
|
||||
Payload = this.EncryptRequest(),
|
||||
Payload = payload,
|
||||
Frequency = this.Frequency,
|
||||
SirtId = this.SirtId,
|
||||
};
|
||||
@ -206,7 +232,7 @@
|
||||
|
||||
protected virtual void OnSEMIReceived(SIRTMessage semi)
|
||||
{
|
||||
if ((this.RequireLAT && !this.latReceived) || (this.RequireDEBUG && !this.debugReceived))
|
||||
if ((this.RequireLAT && !this.latReceived) || (this.RequireDEBUG && !this.debugReceived) || semi.Payload[this.PamStatusIX] != 0)
|
||||
{
|
||||
this.SetPending();
|
||||
}
|
||||
@ -223,7 +249,7 @@
|
||||
|
||||
protected virtual bool UseEncryption(SIRTMessage response)
|
||||
{
|
||||
if (response is null)
|
||||
if (response is null || this.EncryptionKeyI is null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -235,14 +261,24 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
var payloadLength = payload.Length;
|
||||
var length = payload.Length;
|
||||
|
||||
if (payloadLength == 0)
|
||||
if (length <= 0)
|
||||
{
|
||||
return false;
|
||||
this.IsEncrypted = false;
|
||||
}
|
||||
else if (length >= this.SemiLength)
|
||||
{
|
||||
this.IsEncrypted = length > this.SemiLength;
|
||||
}
|
||||
else if (length >= this.DebugLength)
|
||||
{
|
||||
this.IsEncrypted = length > this.DebugLength;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.IsEncrypted = payload.GetCrc() != 0;
|
||||
}
|
||||
|
||||
this.IsEncrypted = payload.GetCrc() != 0;
|
||||
|
||||
return this.IsEncrypted;
|
||||
}
|
||||
@ -259,7 +295,7 @@
|
||||
|
||||
if (this.IsEncrypted)
|
||||
{
|
||||
payload = payload.EncryptRequest(this.EncryptionKey, this.RequestAddress);
|
||||
payload = payload.EncryptRequest(this.EncryptionKeyI, this.RequestAddress);
|
||||
}
|
||||
}
|
||||
|
||||
@ -268,9 +304,43 @@
|
||||
|
||||
private void DecriptResponse(SIRTMessage response)
|
||||
{
|
||||
this.IsEncrypted = true;
|
||||
var payloadLength = response.Length;
|
||||
|
||||
response.Payload = response.Payload.DecryptResponse(this.EncryptionKey);
|
||||
if (payloadLength <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var payload = new byte[payloadLength];
|
||||
Array.Copy(response.Payload, 0, payload, 0, payloadLength);
|
||||
|
||||
if (this.IsEncrypted)
|
||||
{
|
||||
response.Payload = payload.DecryptResponse(this.EncryptionKeyI);
|
||||
|
||||
// Check if SEMI received
|
||||
if (payloadLength > this.SemiLength)
|
||||
{
|
||||
var pamStatus = new PAMStatus(response.Payload[this.PamStatusIX]);
|
||||
|
||||
// when pam status > 31 - try decrypt with the other key
|
||||
if (!pamStatus.IsValid && this.EncryptionKeyII != null)
|
||||
{
|
||||
var _payload = payload.DecryptResponse(this.EncryptionKeyII);
|
||||
pamStatus = new PAMStatus(_payload[this.PamStatusIX]);
|
||||
|
||||
// when pam status OK then switch the keys
|
||||
if (pamStatus == PAMStatus.OK)
|
||||
{
|
||||
response.Payload = _payload;
|
||||
|
||||
var _encryptionKey = this.EncryptionKeyI;
|
||||
this.EncryptionKeyI = this.encryptionKeyII;
|
||||
this.encryptionKeyII = _encryptionKey;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SetP811(Action<P811> p811Setter)
|
||||
|
||||
@ -452,7 +452,7 @@ namespace Opc.Ua.Security
|
||||
public System.Security.Cryptography.X509Certificates.X509Certificate2 Find(bool needPrivateKey)
|
||||
{
|
||||
Opc.Ua.CertificateIdentifier output = SecuredApplication.FromCertificateIdentifier(this);
|
||||
return output.Find(needPrivateKey);
|
||||
return output.Find(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -40,7 +40,7 @@ namespace Opc.Ua
|
||||
{
|
||||
if (useCache)
|
||||
{
|
||||
return Load(new X509Certificate2(encodedData), false);
|
||||
return Load(new X509Certificate2(encodedData), false, X509KeyStorageFlags.Exportable );
|
||||
}
|
||||
|
||||
return new X509Certificate2(encodedData);
|
||||
|
||||
@ -12087,7 +12087,7 @@
|
||||
"responsible": [
|
||||
"roland.drabesch@xylem.com"
|
||||
],
|
||||
"remarks": "Display should be sealed at end of manufacture (EMEA only). 251210 FieldTool modification enabled: The guidance was that CustTool is allowed to change legally relevant configuration in the field. So we do not require all legally relevant registers to be in the blacklist. This is because the restriction on changing legally relevant configuration in the field is only applied to customer-facing tools. CustTool is considered an internal ‘repair tool’ that must be allowed to make such repairs to legally relevant configuration in the field.",
|
||||
"remarks": "Display should be sealed at end of manufacture (EMEA only). 251210 FieldTool modification enabled: The guidance was that CustTool is allowed to change legally relevant configuration in the field. So we do not require all legally relevant registers to be in the blacklist. This is because the restriction on changing legally relevant configuration in the field is only applied to customer-facing tools. CustTool is considered an internal <EFBFBD>repair tool<6F> that must be allowed to make such repairs to legally relevant configuration in the field.",
|
||||
"region": {
|
||||
"emea": {
|
||||
"values": {
|
||||
|
||||
@ -16,7 +16,9 @@
|
||||
|
||||
public class Eregister
|
||||
{
|
||||
private readonly ConcurrentQueue<EregisterTask> runningTasks;
|
||||
const string SENSUS_STANDARD = "E6C88800DEB868C0D6A84880CE982840";
|
||||
|
||||
private readonly ICollection<EregisterTask> runningTasks;
|
||||
private readonly EregisterProgrammingParameters parameters;
|
||||
private readonly EregisterHistory history;
|
||||
private readonly EregisterState state;
|
||||
@ -34,23 +36,19 @@
|
||||
this.sirtHub = sirtHub;
|
||||
this.state = new EregisterState();
|
||||
this.history = new EregisterHistory();
|
||||
this.runningTasks = new ConcurrentQueue<EregisterTask>();
|
||||
this.runningTasks = new List<EregisterTask>();
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
// Just clear the queue
|
||||
while (this.runningTasks.TryDequeue(out var _)) ;
|
||||
}
|
||||
public void Clear() => this.runningTasks.Clear();
|
||||
|
||||
internal IEnumerable<EregisterTask> LoadInspectionInitializationTasks()
|
||||
{
|
||||
this.executionType = nameof(LoadInspectionInitializationTasks);
|
||||
|
||||
if (this.parameters.Completed)
|
||||
{
|
||||
return new EregisterTask[] { };
|
||||
}
|
||||
//if (this.parameters.Completed)
|
||||
//{
|
||||
// return new EregisterTask[] { };
|
||||
//}
|
||||
|
||||
var features = this.parameters.LoadInspectionInitializationFeatures();
|
||||
|
||||
@ -60,14 +58,15 @@
|
||||
|
||||
if (this.runningTasks.Any())
|
||||
{
|
||||
this.runningTasks.Enqueue(new EregisterChangeMeterTypeTask(features.Frequency)
|
||||
this.runningTasks.Add(new EregisterChangeMeterTypeTask(features.Frequency)
|
||||
{
|
||||
SlotNr = features.SlotNr,
|
||||
PoNr = features.PoNr,
|
||||
SerialNr = features.SerialNr,
|
||||
RequestAddress = features.RequestAddress,
|
||||
ResponseAddress = features.ResponseAddress,
|
||||
EncryptionKey = features.EncryptionKey,
|
||||
EncryptionKeyI = features.EncryptionKey,
|
||||
EncryptionKeyII = SENSUS_STANDARD.GetEncryptionKey(),
|
||||
Name = "Change Meter Type"
|
||||
});
|
||||
}
|
||||
@ -87,7 +86,7 @@
|
||||
|
||||
if (this.parameters.StatusFertigung == 30)
|
||||
{
|
||||
this.runningTasks.Enqueue(new EregisterCheckFinalizationTask(this.parameters, features.Frequency)
|
||||
this.runningTasks.Add(new EregisterCheckFinalizationTask(this.parameters, features.Frequency)
|
||||
{
|
||||
WakeUpModul = true,
|
||||
SlotNr = features.SlotNr,
|
||||
@ -95,10 +94,11 @@
|
||||
SerialNr = features.SerialNr,
|
||||
RequestAddress = features.RequestAddress,
|
||||
ResponseAddress = features.ResponseAddress,
|
||||
EncryptionKey = features.EncryptionKey,
|
||||
EncryptionKeyI = features.EncryptionKey,
|
||||
EncryptionKeyII = SENSUS_STANDARD.GetEncryptionKey(),
|
||||
});
|
||||
|
||||
this.runningTasks.Enqueue(new EregisterTask(this.parameters.Frequency)
|
||||
this.runningTasks.Add(new EregisterTask(this.parameters.Frequency)
|
||||
{
|
||||
Name = "0, 2, 16",
|
||||
SlotNr = features.SlotNr,
|
||||
@ -106,7 +106,8 @@
|
||||
SerialNr = features.SerialNr,
|
||||
RequestAddress = features.RequestAddress,
|
||||
ResponseAddress = features.ResponseAddress,
|
||||
EncryptionKey = features.EncryptionKey,
|
||||
EncryptionKeyI = features.EncryptionKey,
|
||||
EncryptionKeyII = SENSUS_STANDARD.GetEncryptionKey(),
|
||||
Data = new ChangeWakeUp((WakeUpMode)this.parameters.Wake_Up_Interval)
|
||||
.Append(new ChangeNumberOfLatWindows(this.parameters.LAT_Interval))
|
||||
.Append(new ChangeTransmissionInterval(this.parameters.Transmission_Intervall))
|
||||
@ -122,33 +123,31 @@
|
||||
|
||||
internal EregisterState GetState() => this.state;
|
||||
|
||||
internal void StartProgrammingAsync(CancellationToken cancellationToken)
|
||||
internal void StartProgramming(CancellationToken cancellationToken)
|
||||
{
|
||||
this.history.SerienNr = this.parameters.SerienNr;
|
||||
this.history.Adresse = this.parameters.Adresse;
|
||||
this.history.TempAdresse = this.parameters.TempAdresse;
|
||||
|
||||
var stopProgramming = false;
|
||||
var tasks = new ConcurrentQueue<EregisterTask>(this.runningTasks);
|
||||
var factoryState = FactoryState.Production;
|
||||
var task = default(EregisterTask);
|
||||
var lat = default(LAT);
|
||||
var debug = default(DEBUG);
|
||||
var semi = default(SEMI);
|
||||
|
||||
while (this.runningTasks.TryPeek(out task) && task.State != SIRTTaskState.Cancelled && !cancellationToken.IsCancellationRequested)
|
||||
while (!cancellationToken.IsCancellationRequested && tasks.TryDequeue(out var task))
|
||||
{
|
||||
task.MessageReceived += this.history.Push;
|
||||
|
||||
while (task.State != SIRTTaskState.Completed && task.State != SIRTTaskState.Cancelled && !cancellationToken.IsCancellationRequested)
|
||||
var next = 0;
|
||||
|
||||
while (task.State != SIRTTaskState.Completed && task.State != SIRTTaskState.Cancelled && !cancellationToken.IsCancellationRequested && next < 30)
|
||||
{
|
||||
if (this.sirtHub.Start(task))
|
||||
{
|
||||
this.history.Push(task);
|
||||
task.Wait();
|
||||
}
|
||||
else
|
||||
{
|
||||
continue;
|
||||
next++;
|
||||
}
|
||||
|
||||
if (task.ErrorMessage != null)
|
||||
@ -160,47 +159,32 @@
|
||||
|
||||
task.MessageReceived -= this.history.Push;
|
||||
|
||||
if (stopProgramming)
|
||||
if (task.State != SIRTTaskState.Completed)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
this.UpdateTasksStateInTheQueue(task);
|
||||
|
||||
if (task.State == SIRTTaskState.Completed)
|
||||
lat = task.LATMessage ?? lat;
|
||||
debug = task.DEBUGMessage ?? debug;
|
||||
semi = task.SEMIMessage ?? semi;
|
||||
factoryState = task.FactoryState;
|
||||
|
||||
if (task.DEBUGMessage != null)
|
||||
{
|
||||
if (task.DEBUGMessage != null)
|
||||
{
|
||||
lat = task.LATMessage;
|
||||
debug = task.DEBUGMessage;
|
||||
semi = task.SEMIMessage;
|
||||
factoryState = task.FactoryState;
|
||||
this.state.SemiDebugDatum = DateTime.Now;
|
||||
}
|
||||
|
||||
if (task.RequestAddress == this.parameters.Adresse)
|
||||
{
|
||||
this.state.FunkadresseDatum = DateTime.Now;
|
||||
}
|
||||
|
||||
if (!this.runningTasks.TryDequeue(out task))
|
||||
{
|
||||
stopProgramming = true;
|
||||
|
||||
break;
|
||||
}
|
||||
this.state.SemiDebugDatum = DateTime.Now;
|
||||
}
|
||||
else if (task.State == SIRTTaskState.Cancelled)
|
||||
|
||||
if (task.RequestAddress == this.parameters.Adresse)
|
||||
{
|
||||
stopProgramming = true;
|
||||
|
||||
break;
|
||||
this.state.FunkadresseDatum = DateTime.Now;
|
||||
}
|
||||
}
|
||||
|
||||
if (stopProgramming)
|
||||
{
|
||||
return;
|
||||
if (factoryState == FactoryState.Shipment)
|
||||
{
|
||||
this.state.GeschlossenDatum = DateTime.Now;
|
||||
}
|
||||
}
|
||||
|
||||
this.state.ShouldUpdate = true;
|
||||
@ -211,13 +195,6 @@
|
||||
this.state.SEMI = semi?.ToString()?.Replace('-', '\t');
|
||||
this.state.Seriennummer = this.parameters.SerienNr;
|
||||
this.state.TempAdresse = this.parameters.TempAdresse;
|
||||
|
||||
if (this.executionType == nameof(LoadInspectionFinalizationTasks)
|
||||
&& this.parameters.StatusFertigung == 30
|
||||
&& factoryState == FactoryState.Shipment)
|
||||
{
|
||||
this.state.GeschlossenDatum = DateTime.Now;
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateTasksStateInTheQueue(EregisterTask task)
|
||||
@ -241,6 +218,8 @@
|
||||
eregisterTask.ResponseAddress = task.ResponseAddress;
|
||||
eregisterTask.FactoryState = task.FactoryState;
|
||||
eregisterTask.IsEncrypted = task.IsEncrypted;
|
||||
eregisterTask.EncryptionKeyI = task.EncryptionKeyI;
|
||||
eregisterTask.EncryptionKeyII = task.EncryptionKeyII;
|
||||
|
||||
if (task.DEBUGMessage != null)
|
||||
{
|
||||
@ -260,7 +239,7 @@
|
||||
|
||||
var frequency = this.parameters.Frequency;
|
||||
|
||||
this.runningTasks.Enqueue(new EregisterTask(frequency)
|
||||
this.runningTasks.Add(new EregisterTask(frequency)
|
||||
{
|
||||
Name = "WUP",
|
||||
WakeUpCmd = true,
|
||||
@ -270,33 +249,38 @@
|
||||
SerialNr = features.SerialNr,
|
||||
RequestAddress = features.RequestAddress,
|
||||
ResponseAddress = features.ResponseAddress,
|
||||
EncryptionKey = features.EncryptionKey,
|
||||
EncryptionKeyI = features.EncryptionKey,
|
||||
EncryptionKeyII = SENSUS_STANDARD.GetEncryptionKey(),
|
||||
Data = new ChangeWakeUp(WakeUpMode.StayAwake)
|
||||
.Append(new ChangeNumberOfLatWindows(this.parameters.LatWindowsInitialization))
|
||||
.Append(new ChangeTransmissionInterval(this.parameters.TransmissionIntervalInitialization))
|
||||
// .Append(new ChangeSensusRFEncryptionKey(features.EncryptionKey))
|
||||
.Append(new ProvidePin(AuthLevel.II)),
|
||||
Timeout = 10_000
|
||||
});
|
||||
|
||||
this.runningTasks.Enqueue(new EregisterCheckInitializationTask(this.parameters, frequency)
|
||||
this.runningTasks.Add(new EregisterCheckInitializationTask(this.parameters, frequency)
|
||||
{
|
||||
SlotNr = features.SlotNr,
|
||||
PoNr = features.PoNr,
|
||||
SerialNr = features.SerialNr,
|
||||
RequestAddress = features.RequestAddress,
|
||||
ResponseAddress = features.ResponseAddress,
|
||||
EncryptionKey = features.EncryptionKey,
|
||||
EncryptionKeyI = features.EncryptionKey,
|
||||
EncryptionKeyII = SENSUS_STANDARD.GetEncryptionKey(),
|
||||
});
|
||||
|
||||
foreach (var pam in features.BuildPams())
|
||||
{
|
||||
this.runningTasks.Enqueue(new EregisterTask(frequency)
|
||||
this.runningTasks.Add(new EregisterTask(frequency)
|
||||
{
|
||||
SlotNr = features.SlotNr,
|
||||
PoNr = features.PoNr,
|
||||
SerialNr = features.SerialNr,
|
||||
RequestAddress = features.RequestAddress,
|
||||
ResponseAddress = features.ResponseAddress,
|
||||
EncryptionKey = features.EncryptionKey,
|
||||
EncryptionKeyI = features.EncryptionKey,
|
||||
EncryptionKeyII = SENSUS_STANDARD.GetEncryptionKey(),
|
||||
Data = pam.Value,
|
||||
Name = pam.Key
|
||||
});
|
||||
|
||||
@ -47,15 +47,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
public void StartProgrammingAsync(CancellationToken cancellationToken)
|
||||
public void StartProgramming(CancellationToken cancellationToken)
|
||||
{
|
||||
var eregisters = new ConcurrentQueue<Eregister>(this.eregisters);
|
||||
|
||||
Parallel.For(0, 5, _ =>
|
||||
{
|
||||
while (!cancellationToken.IsCancellationRequested && eregisters.TryDequeue(out var eregister))
|
||||
while (eregisters.TryDequeue(out var eregister))
|
||||
{
|
||||
eregister.StartProgrammingAsync(cancellationToken);
|
||||
eregister.StartProgramming(cancellationToken);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -13,14 +13,14 @@
|
||||
{
|
||||
var numberStyles = NumberStyles.HexNumber | NumberStyles.AllowHexSpecifier;
|
||||
var cultureInfo = CultureInfo.InvariantCulture;
|
||||
var meterTypeCmd = new SetMeterType { Type = MeterTypes.CandI };
|
||||
var meterTypeCmd = new SetMeterType { Type = MeterTypes.CandI__0x0C };
|
||||
this.Name = $"FW: {this.RadioFWHex} - C & I";
|
||||
|
||||
if (int.TryParse($"1108", numberStyles, cultureInfo, out var minFWVersion) && int.TryParse($"110B", numberStyles, cultureInfo, out var exceptFWVersion))
|
||||
{
|
||||
if (this.RadioFWVersion < minFWVersion || this.RadioFWVersion == exceptFWVersion)
|
||||
{
|
||||
meterTypeCmd.Type = MeterTypes.Residential;
|
||||
meterTypeCmd.Type = MeterTypes.Residential__0x0B;
|
||||
this.Name = $"FW: {this.RadioFWHex} - Residential";
|
||||
}
|
||||
}
|
||||
|
||||
@ -143,87 +143,87 @@
|
||||
return bytes;
|
||||
}
|
||||
|
||||
public static byte[] DecryptResponse(this byte[] encryptedData, byte[] encryptionKey)
|
||||
{
|
||||
if (encryptionKey?.Length != 16)
|
||||
{
|
||||
return encryptedData;
|
||||
}
|
||||
//public static byte[] DecryptResponse(this byte[] encryptedData, byte[] encryptionKey)
|
||||
//{
|
||||
// if (encryptionKey?.Length != 16)
|
||||
// {
|
||||
// return encryptedData;
|
||||
// }
|
||||
|
||||
var length = encryptedData?.Length ?? 0;
|
||||
// var length = encryptedData?.Length ?? 0;
|
||||
|
||||
if (length == 0)
|
||||
{
|
||||
return encryptedData;
|
||||
}
|
||||
// if (length == 0)
|
||||
// {
|
||||
// return encryptedData;
|
||||
// }
|
||||
|
||||
var decryptedData = new byte[length];
|
||||
// var decryptedData = new byte[length];
|
||||
|
||||
Array.Copy(encryptedData, 0, decryptedData, 0, length);
|
||||
// Array.Copy(encryptedData, 0, decryptedData, 0, length);
|
||||
|
||||
var token = decryptedData[1];
|
||||
// var token = decryptedData[1];
|
||||
|
||||
for (var x = 6; x < length; x++)
|
||||
{
|
||||
token += (byte)(decryptedData[x - (token & 0x3) - 1] >> ((token >> 6) & 0x1));
|
||||
// for (var x = 6; x < length; x++)
|
||||
// {
|
||||
// token += (byte)(decryptedData[x - (token & 0x3) - 1] >> ((token >> 6) & 0x1));
|
||||
|
||||
decryptedData[x] ^= encryptionKey[(token >> 2) & 0x0F];
|
||||
// decryptedData[x] ^= encryptionKey[(token >> 2) & 0x0F];
|
||||
|
||||
if (token >= 0x80)
|
||||
{
|
||||
decryptedData[x] = (byte)~decryptedData[x];
|
||||
}
|
||||
}
|
||||
// if (token >= 0x80)
|
||||
// {
|
||||
// decryptedData[x] = (byte)~decryptedData[x];
|
||||
// }
|
||||
// }
|
||||
|
||||
return decryptedData;
|
||||
}
|
||||
// return decryptedData;
|
||||
//}
|
||||
|
||||
public static byte[] EncryptRequest(this byte[] plainData, byte[] encryptionKey, uint address)
|
||||
{
|
||||
if (plainData?.Length <= 0 || encryptionKey?.Length != 16 || address <= 0)
|
||||
{
|
||||
return plainData;
|
||||
}
|
||||
//public static byte[] EncryptRequest(this byte[] plainData, byte[] encryptionKey, uint address)
|
||||
//{
|
||||
// if (plainData?.Length <= 0 || encryptionKey?.Length != 16 || address <= 0)
|
||||
// {
|
||||
// return plainData;
|
||||
// }
|
||||
|
||||
var dataLength = plainData.Length;
|
||||
var telegramLength = dataLength + 2;
|
||||
var encryptedData = new byte[telegramLength];
|
||||
// var dataLength = plainData.Length;
|
||||
// var telegramLength = dataLength + 2;
|
||||
// var encryptedData = new byte[telegramLength];
|
||||
|
||||
Array.Copy(plainData, 0, encryptedData, 0, dataLength);
|
||||
// Array.Copy(plainData, 0, encryptedData, 0, dataLength);
|
||||
|
||||
var telegramForCRCLength = telegramLength + 4;
|
||||
var telegramForCRC = new byte[telegramForCRCLength];
|
||||
// var telegramForCRCLength = telegramLength + 4;
|
||||
// var telegramForCRC = new byte[telegramForCRCLength];
|
||||
|
||||
telegramForCRC[0] = (byte)(address >> 24);
|
||||
telegramForCRC[1] = (byte)(address >> 16);
|
||||
telegramForCRC[2] = (byte)(address >> 8);
|
||||
telegramForCRC[3] = (byte)(address >> 0);
|
||||
// telegramForCRC[0] = (byte)(address >> 24);
|
||||
// telegramForCRC[1] = (byte)(address >> 16);
|
||||
// telegramForCRC[2] = (byte)(address >> 8);
|
||||
// telegramForCRC[3] = (byte)(address >> 0);
|
||||
|
||||
Array.Copy(encryptedData, 0, telegramForCRC, 4, telegramLength);
|
||||
// Array.Copy(encryptedData, 0, telegramForCRC, 4, telegramLength);
|
||||
|
||||
var telegramCRC = telegramForCRC.CRCCCITT(1, telegramForCRCLength - 2);
|
||||
encryptedData[telegramLength - 2] = (byte)(telegramCRC >> 8);
|
||||
encryptedData[telegramLength - 1] = (byte)(telegramCRC >> 0);
|
||||
// var telegramCRC = telegramForCRC.CRCCCITT(1, telegramForCRCLength - 2);
|
||||
// encryptedData[telegramLength - 2] = (byte)(telegramCRC >> 8);
|
||||
// encryptedData[telegramLength - 1] = (byte)(telegramCRC >> 0);
|
||||
|
||||
var reference = address;
|
||||
var token = (byte)0xFF;
|
||||
// var reference = address;
|
||||
// var token = (byte)0xFF;
|
||||
|
||||
for (var i = 0; i < telegramLength; i++)
|
||||
{
|
||||
token += (byte)(((reference >> ((token & 0x3) << 3)) & 0xFF) >> ((token >> 6) & 1));
|
||||
// for (var i = 0; i < telegramLength; i++)
|
||||
// {
|
||||
// token += (byte)(((reference >> ((token & 0x3) << 3)) & 0xFF) >> ((token >> 6) & 1));
|
||||
|
||||
reference <<= 8;
|
||||
reference += encryptedData[i];
|
||||
// reference <<= 8;
|
||||
// reference += encryptedData[i];
|
||||
|
||||
encryptedData[i] ^= encryptionKey[(token >> 2) & 0x0F];
|
||||
// encryptedData[i] ^= encryptionKey[(token >> 2) & 0x0F];
|
||||
|
||||
if (token >= 0x80)
|
||||
{
|
||||
encryptedData[i] = (byte)~encryptedData[i];
|
||||
}
|
||||
}
|
||||
// if (token >= 0x80)
|
||||
// {
|
||||
// encryptedData[i] = (byte)~encryptedData[i];
|
||||
// }
|
||||
// }
|
||||
|
||||
return encryptedData;
|
||||
}
|
||||
// return encryptedData;
|
||||
//}
|
||||
}
|
||||
}
|
||||
@ -46,8 +46,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
public string Info { get; private set; }
|
||||
|
||||
public string RSSI { get; private set; }
|
||||
|
||||
public P11 P11 { get; private set; }
|
||||
|
||||
@ -270,7 +270,6 @@
|
||||
// return features;
|
||||
//}
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
features.Debug = new EregisterDebugFeatures();
|
||||
features.ChangeMeterReading = this.DisplayVolume;
|
||||
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit 8bda7ec658f56be11f53f97ddf6616447d1abf36
|
||||
Subproject commit e7aa3e2723a435f0a714df661dc5d86dfd45a71c
|
||||
@ -190,65 +190,68 @@ namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
|
||||
|
||||
|
||||
|
||||
|
||||
if (radioParams.RadioAddress != 0)
|
||||
if (orderNr != 3249279)
|
||||
{
|
||||
if (vakoData.KeyValues.Any(f => f.Name.Contains("C_GEN_FUNKSCHLUESSEL")))
|
||||
|
||||
|
||||
if (radioParams.RadioAddress != 0)
|
||||
{
|
||||
var KeyInfo = vakoData.KeyValues.FirstOrDefault(f => f.Name.Contains("C_GEN_FUNKSCHLUESSEL"));
|
||||
var keyList = ret.FindAll(f => f.RegisterName == "SENSUSRADIO_EncryptionKey");
|
||||
var heightstKey = keyList.OrderByDescending(o => o.Source).First(); //desc
|
||||
|
||||
var defEncryptionKey = new List<Byte>();
|
||||
defEncryptionKey.AddRange(new Byte[] { 0x0E, 0x9F, 0xAC, 0xC6 }.ToArray());
|
||||
defEncryptionKey.AddRange(new Byte[] { 0xA0, 0xE1, 0xEF, 0x1C }.ToArray());
|
||||
defEncryptionKey.AddRange(new Byte[] { 0x3B, 0x27, 0xA4, 0x9B }.ToArray());
|
||||
defEncryptionKey.AddRange(new Byte[] { 0xAC, 0x21, 0x65, 0x35 }.ToArray());
|
||||
|
||||
|
||||
switch (KeyInfo.Charcode)
|
||||
if (vakoData.KeyValues.Any(f => f.Name.Contains("C_GEN_FUNKSCHLUESSEL")))
|
||||
{
|
||||
//1 Standard
|
||||
case "1":
|
||||
|
||||
if (ByteStyler.ToString(heightstKey.RegisterValue) != ByteStyler.ToString(defEncryptionKey.ToArray()))
|
||||
{
|
||||
throw new ApplicationException("Order placed with default encryption, but the datasource has a diffrent key");
|
||||
}
|
||||
var KeyInfo = vakoData.KeyValues.FirstOrDefault(f => f.Name.Contains("C_GEN_FUNKSCHLUESSEL"));
|
||||
var keyList = ret.FindAll(f => f.RegisterName == "SENSUSRADIO_EncryptionKey");
|
||||
var heightstKey = keyList.OrderByDescending(o => o.Source).First(); //desc
|
||||
|
||||
break;
|
||||
//2 Zufallszahl
|
||||
case "2":
|
||||
//notdef
|
||||
|
||||
if (ByteStyler.ToString(heightstKey.RegisterValue) == ByteStyler.ToString(defEncryptionKey.ToArray()))
|
||||
{
|
||||
throw new ApplicationException("Order placed with radom encryption, but the datasource has a default key");
|
||||
}
|
||||
//not csd
|
||||
else if (heightstKey.Source == ProgrammingSource.Csd)
|
||||
{
|
||||
throw new ApplicationException("Order placed with radom encryption, but the datasource has a customer key");
|
||||
}
|
||||
break;
|
||||
//3 nach CSD
|
||||
case "3":
|
||||
if (heightstKey.Source != ProgrammingSource.Csd)
|
||||
{
|
||||
throw new ApplicationException("Order placed with Customer encryption but the datasource has no Customer key");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new ApplicationException("No Vako Key for Radiokey found, unkown parameter");
|
||||
var defEncryptionKey = new List<Byte>();
|
||||
defEncryptionKey.AddRange(new Byte[] { 0x0E, 0x9F, 0xAC, 0xC6 }.ToArray());
|
||||
defEncryptionKey.AddRange(new Byte[] { 0xA0, 0xE1, 0xEF, 0x1C }.ToArray());
|
||||
defEncryptionKey.AddRange(new Byte[] { 0x3B, 0x27, 0xA4, 0x9B }.ToArray());
|
||||
defEncryptionKey.AddRange(new Byte[] { 0xAC, 0x21, 0x65, 0x35 }.ToArray());
|
||||
|
||||
|
||||
switch (KeyInfo.Charcode)
|
||||
{
|
||||
//1 Standard
|
||||
case "1":
|
||||
|
||||
if (ByteStyler.ToString(heightstKey.RegisterValue) != ByteStyler.ToString(defEncryptionKey.ToArray()))
|
||||
{
|
||||
throw new ApplicationException("Order placed with default encryption, but the datasource has a diffrent key");
|
||||
}
|
||||
|
||||
break;
|
||||
//2 Zufallszahl
|
||||
case "2":
|
||||
//notdef
|
||||
|
||||
if (ByteStyler.ToString(heightstKey.RegisterValue) == ByteStyler.ToString(defEncryptionKey.ToArray()))
|
||||
{
|
||||
throw new ApplicationException("Order placed with radom encryption, but the datasource has a default key");
|
||||
}
|
||||
//not csd
|
||||
else if (heightstKey.Source == ProgrammingSource.Csd)
|
||||
{
|
||||
throw new ApplicationException("Order placed with radom encryption, but the datasource has a customer key");
|
||||
}
|
||||
break;
|
||||
//3 nach CSD
|
||||
case "3":
|
||||
if (heightstKey.Source != ProgrammingSource.Csd)
|
||||
{
|
||||
throw new ApplicationException("Order placed with Customer encryption but the datasource has no Customer key");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new ApplicationException("No Vako Key for Radiokey found, unkown parameter");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new ApplicationException("No Vako Key for Radiokey found");
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new ApplicationException("No Vako Key for Radiokey found");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
StringBuilder csv = new StringBuilder();
|
||||
foreach (var item in ret)
|
||||
|
||||
@ -82,7 +82,7 @@
|
||||
task.IsEncrypted = true;
|
||||
task.Frequency = frequency;
|
||||
task.RequestAddress = address;
|
||||
task.EncryptionKey = encryptionBytes;
|
||||
task.EncryptionKeyI = encryptionBytes;
|
||||
task.Data = new DummyPam();
|
||||
}
|
||||
, repeatsCount);
|
||||
@ -96,7 +96,7 @@
|
||||
task.IsEncrypted = true;
|
||||
task.Frequency = frequency;
|
||||
task.RequestAddress = address;
|
||||
task.EncryptionKey = encryptionBytes;
|
||||
task.EncryptionKeyI = encryptionBytes;
|
||||
task.Data = new ResetAlarms(0xFF);
|
||||
}
|
||||
, repeatsCount);
|
||||
@ -110,7 +110,7 @@
|
||||
task.IsEncrypted = true;
|
||||
task.Frequency = frequency;
|
||||
task.RequestAddress = address;
|
||||
task.EncryptionKey = encryptionBytes;
|
||||
task.EncryptionKeyI = encryptionBytes;
|
||||
task.Data = new ResetAlarms(0xFE);
|
||||
}
|
||||
, repeatsCount);
|
||||
|
||||
@ -14,6 +14,8 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Http;
|
||||
using System.Web.UI.WebControls;
|
||||
using Xylem.Common.Cryptology.Security;
|
||||
using Xylem.Common.Logic.ServiceCore;
|
||||
|
||||
|
||||
@ -132,7 +134,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
public async Task<HttpResponseMessage> SyncKitronData()
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
StringBuilder query = new StringBuilder();
|
||||
@ -233,7 +235,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
}
|
||||
|
||||
[Route("SyncKitronDataByPbc")]
|
||||
public async Task<HttpResponseMessage> SyncKitronDataByPbc(int PcbId)
|
||||
public async Task<HttpResponseMessage> SyncKitronDataByPbc(int PcbId)
|
||||
{
|
||||
|
||||
using (var dataAccess = new SqlDataAccess(GlobalConfig.connectionString.Value))
|
||||
@ -326,150 +328,229 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
}
|
||||
|
||||
|
||||
public async Task<DateTime> getLastProductionDateByPcb(string Seriennumer = "")
|
||||
public class PickingInfo
|
||||
{
|
||||
DateTime lastProdDate = DateTime.MinValue;
|
||||
public string Error { get; set; }
|
||||
|
||||
try
|
||||
public string Warning { get; set; }
|
||||
|
||||
public string Info { get; set; }
|
||||
}
|
||||
[Route("GetPcbInfoPicking")]
|
||||
public async Task<HttpResponseMessage> GetPcbInfoPicking(int PcbId)
|
||||
{
|
||||
|
||||
return await Task<PickingInfo>.Run(() =>
|
||||
{
|
||||
|
||||
var sb = new StringBuilder();
|
||||
|
||||
|
||||
sb.AppendLine(" SELECT top 1 [DS_ID] ,[ID_PCB] ,[ID_TEST] ,[JSON] FROM [DELTACHEF].[GENESIS_PCBFUNCTIONALTEST_PD] ");
|
||||
sb.AppendLine($" where [ID_PCB] = '{Seriennumer}' ");
|
||||
sb.AppendLine(" order by ID_TEST desc ");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// create connection
|
||||
using (OracleConnection con = new OracleConnection())
|
||||
try
|
||||
{
|
||||
|
||||
// create connection string using builder
|
||||
OracleConnectionStringBuilder ocsb = new OracleConnectionStringBuilder();
|
||||
ocsb.Password = "senspi2012";
|
||||
ocsb.UserID = "prima_ro";
|
||||
ocsb.DataSource = "//SLUORADB:1521/DT01";
|
||||
|
||||
// connect
|
||||
con.ConnectionString = ocsb.ConnectionString;
|
||||
con.Open();
|
||||
|
||||
|
||||
OracleCommand command = con.CreateCommand();
|
||||
|
||||
command.CommandText = sb.ToString();
|
||||
|
||||
OracleDataReader reader = command.ExecuteReader();
|
||||
while (reader.Read())
|
||||
PickingInfo ret = null;
|
||||
using (var dataacces = new SqlDataAccess(GlobalConfig.connectionString.Value))
|
||||
{
|
||||
var St = ((string)reader["JSON"]);
|
||||
var startInex = St.IndexOf("\"StartDT\":\"") + "\"StartDT\":\"".Length;
|
||||
var datestring = St.Substring(startInex, "29.07.2022 06:47:27".Length);
|
||||
DateTime.ParseExact(datestring, "dd.MM.yyyy HH:mm:ss", CultureInfo.InvariantCulture);
|
||||
var sb = new StringBuilder();
|
||||
sb.AppendLine($" SELECT prim.PcbId, prim.ProdDate, prim.BlockedDate, prim.BlockedRemark, kd.MaterialNumber, count (kd.ID) as CountOlderRegister , min(kd.ProdDate) as CountOlderFrom, max(kd.ProdDate) as CountOlderTo ");
|
||||
sb.AppendLine($" FROM dbo.Cordonel_KitronData prim ");
|
||||
sb.AppendLine($" inner join dbo.Cordonel_KitronData AS kd on prim.MaterialNumber = kd.MaterialNumber left OUTER JOIN ");
|
||||
sb.AppendLine($" dbo.Cordonel_AssignedPicking AS ap ON kd.PcbId = ap.CordonelAssignedPicking_PcbId AND ap.CordonelAssignedPicking_IsDeleted = 0 LEFT OUTER JOIN ");
|
||||
sb.AppendLine($" dbo.MapPcbIdToSerialNumber AS map ON kd.PcbId = map.MapPcbIdToSerialNumber_PcbId AND map.MapPcbIdToSerialNumber_Deleted = 0 LEFT OUTER JOIN ");
|
||||
sb.AppendLine($" dbo.Cordonel_EOL_Progress AS eol ON kd.PcbId = eol.PcbId LEFT OUTER JOIN ");
|
||||
sb.AppendLine($" dbo.AuftragPositionSerienNr AS aps ON aps.SerienNr = map.MapPcbIdToSerialNumber_SerialNumber AND aps.Wiederholungen = - 1 ");
|
||||
sb.AppendLine($" WHERE prim.PcbId = {PcbId} and ap.CordonelAssignedPicking_FertigungsAuftragsNr is null ");
|
||||
sb.AppendLine($" and prim.ProdDate >= kd.ProdDate and kd.BlockedDate is null and kd.SignedOutDate is null ");
|
||||
sb.AppendLine($" ");
|
||||
sb.AppendLine($" group by prim.PcbId, prim.ProdDate, prim.BlockedDate, prim.BlockedRemark , kd.MaterialNumber ");
|
||||
|
||||
|
||||
|
||||
|
||||
var dbResult = dataacces.ExecuteQuery(sb.ToString());
|
||||
foreach (DataRow row in dbResult.Rows)
|
||||
{
|
||||
|
||||
DateTime? CheckBlockedDate =( row["BlockedDate"].GetType() == typeof(System.DBNull) ? null : (DateTime?)row["BlockedDate"]);
|
||||
var CheckProdDate = (DateTime)row["ProdDate"];
|
||||
var blockText = (row["BlockedRemark"].GetType() == typeof(System.DBNull) ? "" : (String)row["BlockedRemark"]);
|
||||
var matNr = (int)row["MaterialNumber"];
|
||||
|
||||
|
||||
DateTime? CountOlderFrom = (row["CountOlderFrom"].GetType() == typeof(System.DBNull) ? null : (DateTime?)row["CountOlderFrom"]);
|
||||
DateTime? CountOlderTo = (row["CountOlderTo"].GetType() == typeof(System.DBNull) ? null : (DateTime?)row["CountOlderTo"]);
|
||||
var CountOlder = (int)row["CountOlderRegister"];
|
||||
|
||||
|
||||
ret = new PickingInfo() { Info = $"{PcbId} ist von Materialnummer: {matNr} und dem Produktiondatum: {CheckProdDate} " };
|
||||
|
||||
if (CheckBlockedDate.HasValue)
|
||||
{
|
||||
ret.Error = $"Gesperrt am {CheckBlockedDate.Value} wegen. {blockText}";
|
||||
}
|
||||
if (CountOlder >= 2)
|
||||
{
|
||||
ret.Warning = $"Es gibt {CountOlder} ältere Register mit der Materialnummer: {matNr}. Produktionsdatum von {CountOlderFrom.Value} bis {CountOlderTo.Value} ";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
return Request.CreateResponse(HttpStatusCode.OK, ret);
|
||||
|
||||
|
||||
|
||||
//return Request.CreateResponse(HttpStatusCode.OK, getUserList(LogInName, Id));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
throw ex;
|
||||
}
|
||||
return lastProdDate;
|
||||
|
||||
catch (Exception ex)
|
||||
{
|
||||
return Request.CreateResponse(HttpStatusCode.InternalServerError, ex);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//connect
|
||||
|
||||
public async Task<DateTime> getLastProductionDateByPcb(string Seriennumer = "")
|
||||
{
|
||||
DateTime lastProdDate = DateTime.MinValue;
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
var sb = new StringBuilder();
|
||||
|
||||
|
||||
sb.AppendLine(" SELECT top 1 [DS_ID] ,[ID_PCB] ,[ID_TEST] ,[JSON] FROM [DELTACHEF].[GENESIS_PCBFUNCTIONALTEST_PD] ");
|
||||
sb.AppendLine($" where [ID_PCB] = '{Seriennumer}' ");
|
||||
sb.AppendLine(" order by ID_TEST desc ");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//If Not rs.EOF Then
|
||||
|
||||
// create connection
|
||||
using (OracleConnection con = new OracleConnection())
|
||||
{
|
||||
|
||||
// create connection string using builder
|
||||
OracleConnectionStringBuilder ocsb = new OracleConnectionStringBuilder();
|
||||
ocsb.Password = "senspi2012";
|
||||
ocsb.UserID = "prima_ro";
|
||||
ocsb.DataSource = "//SLUORADB:1521/DT01";
|
||||
|
||||
// connect
|
||||
con.ConnectionString = ocsb.ConnectionString;
|
||||
con.Open();
|
||||
|
||||
|
||||
OracleCommand command = con.CreateCommand();
|
||||
|
||||
command.CommandText = sb.ToString();
|
||||
|
||||
OracleDataReader reader = command.ExecuteReader();
|
||||
while (reader.Read())
|
||||
{
|
||||
var St = ((string)reader["JSON"]);
|
||||
var startInex = St.IndexOf("\"StartDT\":\"") + "\"StartDT\":\"".Length;
|
||||
var datestring = St.Substring(startInex, "29.07.2022 06:47:27".Length);
|
||||
DateTime.ParseExact(datestring, "dd.MM.yyyy HH:mm:ss", CultureInfo.InvariantCulture);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
throw ex;
|
||||
}
|
||||
return lastProdDate;
|
||||
|
||||
}
|
||||
|
||||
//connect
|
||||
|
||||
|
||||
|
||||
|
||||
// If lngSerial = 0 Then
|
||||
// StatusBar1.SimpleText = "LU: " & lngCount & "/" & ProgressBar1.Max & " " & strSerial & " " & Q1 & "=" & F1 & ", " & Q2 & " =" & F2 & " " & rsSQL("AnlageDatum")
|
||||
// Else
|
||||
// StatusBar1.SimpleText = "LU: " & lngCount & "/" & ProgressBar1.Max & " " & Format(lngSerial, "00000000") & " " & Q1 & "=" & F1 & ", " & Q2 & " =" & F2 & " " & rsSQL("AnlageDatum")
|
||||
// End If
|
||||
|
||||
|
||||
// 'Debug.Print Format(lngSerial, "00000000") & " " & Q1 & "=" & F1 & ", " & Q2 & " =" & F2
|
||||
// DoEvents
|
||||
|
||||
// If Not rsSQL Is Nothing Then
|
||||
|
||||
|
||||
// ' Reihenfolge wieder zurückgesetzt Q1 < Q2 2018-04-19
|
||||
// If Q1<Q2 Then
|
||||
// ' richtig herum
|
||||
// rsSQL("Q1_SOLL") = Q1
|
||||
// rsSQL("FEHLER_Q1") = F1
|
||||
|
||||
|
||||
// rsSQL("Q2_SOLL") = Q2
|
||||
// rsSQL("FEHLER_Q2") = F2
|
||||
// Else
|
||||
// ' Q2 < Q1 => Tauschen
|
||||
// rsSQL("Q1_SOLL") = Q2
|
||||
// rsSQL("FEHLER_Q1") = F2
|
||||
|
||||
|
||||
// rsSQL("Q2_SOLL") = Q1
|
||||
// rsSQL("FEHLER_Q2") = F1
|
||||
// End If
|
||||
|
||||
|
||||
// Debug.Print rs("ZAEHLERNUMMER")
|
||||
|
||||
// If Val(rsSQL("SerienNrNebenzaehlerLU") &"") = 0 And lngSerial > 0 Then
|
||||
// rsSQL("SerienNrNebenzaehlerLU") = lngSerial
|
||||
// End If
|
||||
|
||||
|
||||
// rsSQL("Herkunft") = "L"
|
||||
// rsSQL("ErgaenzungDatum") = Now
|
||||
|
||||
|
||||
// rsSQL.Update
|
||||
// Debug.Print lngCount &"/" & ProgressBar1.Max & " OK " & lngSerial & " / " & strSerial
|
||||
// End If
|
||||
//Else
|
||||
//If Not rs.EOF Then
|
||||
|
||||
|
||||
|
||||
// StatusBar1.SimpleText = lngCount & "/" & ProgressBar1.Max & " unbekannte SNr: " & lngSerial & " / " & strSerial
|
||||
// Debug.Print StatusBar1.SimpleText & " " & Now
|
||||
// 'Debug.Print lngCount & "/" & ProgressBar1.Max & " unbekannt " & Format(lngSerial, "00000000") & " / " & strSerial
|
||||
// DoEvents
|
||||
|
||||
// If lngSerial = 0 Then
|
||||
// StatusBar1.SimpleText = "LU: " & lngCount & "/" & ProgressBar1.Max & " " & strSerial & " " & Q1 & "=" & F1 & ", " & Q2 & " =" & F2 & " " & rsSQL("AnlageDatum")
|
||||
// Else
|
||||
// StatusBar1.SimpleText = "LU: " & lngCount & "/" & ProgressBar1.Max & " " & Format(lngSerial, "00000000") & " " & Q1 & "=" & F1 & ", " & Q2 & " =" & F2 & " " & rsSQL("AnlageDatum")
|
||||
// End If
|
||||
|
||||
|
||||
// 'rsSQL("Q1_SOLL") = 0
|
||||
// 'rsSQL("Herkunft") = "u"
|
||||
// 'rsSQL("Info") = "unbekannt in LU"
|
||||
// 'rsSQL.Update
|
||||
// 'Debug.Print Format(lngSerial, "00000000") & " " & Q1 & "=" & F1 & ", " & Q2 & " =" & F2
|
||||
// DoEvents
|
||||
|
||||
// If Not rsSQL Is Nothing Then
|
||||
|
||||
|
||||
//End If
|
||||
//Exit Sub
|
||||
//Errorhandler:
|
||||
// Dim errnum As Long
|
||||
// Dim errdesc As String
|
||||
// errnum = Err.Number
|
||||
// errdesc = Err.Description
|
||||
// PrintStatus "Fehler " & errnum & " in Ergaenze(): " & errdesc & " SQL=" & strSQL
|
||||
//End Sub
|
||||
// ' Reihenfolge wieder zurückgesetzt Q1 < Q2 2018-04-19
|
||||
// If Q1<Q2 Then
|
||||
// ' richtig herum
|
||||
// rsSQL("Q1_SOLL") = Q1
|
||||
// rsSQL("FEHLER_Q1") = F1
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
// rsSQL("Q2_SOLL") = Q2
|
||||
// rsSQL("FEHLER_Q2") = F2
|
||||
// Else
|
||||
// ' Q2 < Q1 => Tauschen
|
||||
// rsSQL("Q1_SOLL") = Q2
|
||||
// rsSQL("FEHLER_Q1") = F2
|
||||
|
||||
|
||||
// rsSQL("Q2_SOLL") = Q1
|
||||
// rsSQL("FEHLER_Q2") = F1
|
||||
// End If
|
||||
|
||||
|
||||
// Debug.Print rs("ZAEHLERNUMMER")
|
||||
|
||||
// If Val(rsSQL("SerienNrNebenzaehlerLU") &"") = 0 And lngSerial > 0 Then
|
||||
// rsSQL("SerienNrNebenzaehlerLU") = lngSerial
|
||||
// End If
|
||||
|
||||
|
||||
// rsSQL("Herkunft") = "L"
|
||||
// rsSQL("ErgaenzungDatum") = Now
|
||||
|
||||
|
||||
// rsSQL.Update
|
||||
// Debug.Print lngCount &"/" & ProgressBar1.Max & " OK " & lngSerial & " / " & strSerial
|
||||
// End If
|
||||
//Else
|
||||
|
||||
|
||||
|
||||
// StatusBar1.SimpleText = lngCount & "/" & ProgressBar1.Max & " unbekannte SNr: " & lngSerial & " / " & strSerial
|
||||
// Debug.Print StatusBar1.SimpleText & " " & Now
|
||||
// 'Debug.Print lngCount & "/" & ProgressBar1.Max & " unbekannt " & Format(lngSerial, "00000000") & " / " & strSerial
|
||||
// DoEvents
|
||||
|
||||
|
||||
// 'rsSQL("Q1_SOLL") = 0
|
||||
// 'rsSQL("Herkunft") = "u"
|
||||
// 'rsSQL("Info") = "unbekannt in LU"
|
||||
// 'rsSQL.Update
|
||||
|
||||
|
||||
//End If
|
||||
//Exit Sub
|
||||
//Errorhandler:
|
||||
// Dim errnum As Long
|
||||
// Dim errdesc As String
|
||||
// errnum = Err.Number
|
||||
// errdesc = Err.Description
|
||||
// PrintStatus "Fehler " & errnum & " in Ergaenze(): " & errdesc & " SQL=" & strSQL
|
||||
//End Sub
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -45,7 +45,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.AppendLine($"update auftrag.dbo.Genesis_PcbPassword set [password] ='{password}' where PcbId='{PcbId}'");
|
||||
sb.AppendLine($"update auftrag.dbo.Genesis_PcbPassword set [password] ='{password}' where PcbId='{PcbId}' ");
|
||||
|
||||
|
||||
var dt = dataAccess.ExecuteQuery(sb.ToString());
|
||||
|
||||
@ -28,7 +28,7 @@ namespace Service.MeterProcessState.Controllers
|
||||
}
|
||||
|
||||
[Route("SetPressureStateDetailed"), HttpPost]
|
||||
public async Task<HttpResponseMessage> SetPressureStateDetailed([FromBody]PressureResultData testResult)
|
||||
public async Task<HttpResponseMessage> SetPressureStateDetailed([FromBody] PressureResultData testResult)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -128,7 +128,7 @@ namespace Service.MeterProcessState.Controllers
|
||||
var dt = dataacces.ExecuteQuery(query.ToString());
|
||||
|
||||
return "1";
|
||||
|
||||
|
||||
// return ((int)dt.Rows[0]["PressuretestNeeded"]).ToString();
|
||||
|
||||
}
|
||||
@ -289,7 +289,7 @@ namespace Service.MeterProcessState.Controllers
|
||||
}
|
||||
|
||||
[Route("SetPressureState"), HttpPost]
|
||||
public async Task<HttpResponseMessage> SetPressureState(String PcbId, Int32 FertigungsauftragsNr, [FromBody]PressureTestResult testResult)
|
||||
public async Task<HttpResponseMessage> SetPressureState(String PcbId, Int32 FertigungsauftragsNr, [FromBody] PressureTestResult testResult)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -315,7 +315,7 @@ namespace Service.MeterProcessState.Controllers
|
||||
query.AppendLine(" ) ");
|
||||
query.AppendLine(" VALUES ");
|
||||
query.AppendLine($" ({PcbId} ");
|
||||
query.AppendLine($",{ FertigungsauftragsNr} ");
|
||||
query.AppendLine($",{FertigungsauftragsNr} ");
|
||||
query.AppendLine($" ,GETUTCDATE() ");
|
||||
query.AppendLine($" ,{ResultText} ");
|
||||
query.AppendLine($" ,0 ");
|
||||
@ -406,66 +406,78 @@ namespace Service.MeterProcessState.Controllers
|
||||
{
|
||||
using (var dataacces = new SqlDataAccess(GlobalConfig.connectionString.Value))
|
||||
{
|
||||
var dt = dataacces.ExecuteQuery($"Insert into dbo.MeterProcessState (ProcessState_PcbId, [ProcessState_State],ProcessState_DateUtc ) values ({PcbId}, {code.GetHashCode()}, GETUTCDATE())");
|
||||
}
|
||||
if (!string.IsNullOrEmpty(version))
|
||||
{
|
||||
try
|
||||
if (version.ToLower() == "sentinel")
|
||||
{
|
||||
var fixDisplaycode = DisplayCodes.None;
|
||||
var SapCode = 0;
|
||||
if (Enum.TryParse<DisplayCodes>(code.ToString(), out fixDisplaycode))
|
||||
SaveSapState(PcbId, 310, version);
|
||||
SaveSapState(PcbId, 400, version);
|
||||
SaveSapState(PcbId, 997, version);
|
||||
SaveSapState(PcbId, 998, version);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
var dt = dataacces.ExecuteQuery($"Insert into dbo.MeterProcessState (ProcessState_PcbId, [ProcessState_State],ProcessState_DateUtc ) values ({PcbId}, {code.GetHashCode()}, GETUTCDATE())");
|
||||
}
|
||||
if (!string.IsNullOrEmpty(version))
|
||||
{
|
||||
try
|
||||
{
|
||||
switch (fixDisplaycode)
|
||||
var fixDisplaycode = DisplayCodes.None;
|
||||
var SapCode = 0;
|
||||
if (Enum.TryParse<DisplayCodes>(code.ToString(), out fixDisplaycode))
|
||||
{
|
||||
case DisplayCodes.None:
|
||||
case DisplayCodes.Error:
|
||||
case DisplayCodes.PressureTestedFailed:
|
||||
case DisplayCodes.PickingFailed:
|
||||
case DisplayCodes.FwUpdateActive:
|
||||
case DisplayCodes.FwUpdateFailed:
|
||||
case DisplayCodes.FwUpToDate:
|
||||
case DisplayCodes.FlowTestFailed:
|
||||
case DisplayCodes.FinalTestFailed:
|
||||
case DisplayCodes.PickingStarted:
|
||||
case DisplayCodes.FlowCalibrationOurOfRange:
|
||||
case DisplayCodes.ZeroFlowFailed:
|
||||
case DisplayCodes.FlowCalibrated:
|
||||
case DisplayCodes.PickingTested:
|
||||
default:
|
||||
break;
|
||||
switch (fixDisplaycode)
|
||||
{
|
||||
case DisplayCodes.None:
|
||||
case DisplayCodes.Error:
|
||||
case DisplayCodes.PressureTestedFailed:
|
||||
case DisplayCodes.PickingFailed:
|
||||
case DisplayCodes.FwUpdateActive:
|
||||
case DisplayCodes.FwUpdateFailed:
|
||||
case DisplayCodes.FwUpToDate:
|
||||
case DisplayCodes.FlowTestFailed:
|
||||
case DisplayCodes.FinalTestFailed:
|
||||
case DisplayCodes.PickingStarted:
|
||||
case DisplayCodes.FlowCalibrationOurOfRange:
|
||||
case DisplayCodes.ZeroFlowFailed:
|
||||
case DisplayCodes.FlowCalibrated:
|
||||
case DisplayCodes.PickingTested:
|
||||
default:
|
||||
break;
|
||||
|
||||
|
||||
case DisplayCodes.PressureTested:
|
||||
SapCode = 110;
|
||||
break;
|
||||
case DisplayCodes.Mounted:
|
||||
SapCode = 300;
|
||||
break;
|
||||
case DisplayCodes.ZeroFlow:
|
||||
SapCode = 120;
|
||||
break;
|
||||
case DisplayCodes.FlowTested:
|
||||
SapCode = 200;
|
||||
break;
|
||||
case DisplayCodes.PressureTested:
|
||||
SapCode = 110;
|
||||
break;
|
||||
case DisplayCodes.Mounted:
|
||||
SapCode = 300;
|
||||
break;
|
||||
case DisplayCodes.ZeroFlow:
|
||||
SapCode = 120;
|
||||
break;
|
||||
case DisplayCodes.FlowTested:
|
||||
SapCode = 200;
|
||||
break;
|
||||
|
||||
}
|
||||
if (SapCode != 0)
|
||||
{
|
||||
SaveSapState(PcbId, SapCode, version);
|
||||
}
|
||||
|
||||
}
|
||||
if (SapCode != 0)
|
||||
{
|
||||
SaveSapState(PcbId, SapCode, version);
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
return Request.CreateResponse(HttpStatusCode.OK, await Task.Run(() => { return "store"; }));
|
||||
}
|
||||
return Request.CreateResponse(HttpStatusCode.OK, await Task.Run(() => { return "store"; }));
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -569,12 +581,12 @@ namespace Service.MeterProcessState.Controllers
|
||||
sb.AppendLine($" inner join [Auftrag].[dbo].[Fortschrittsrueckmeldung] ");
|
||||
sb.AppendLine($" sap on sap.FertigungsauftragNr = @order ");
|
||||
sb.AppendLine($" and c.ProgressFeedbackID = sap.id ");
|
||||
sb.AppendLine($" and sap.Vorgangsnr = @ProgressNr ");
|
||||
sb.AppendLine($" if @count =0 ");
|
||||
sb.AppendLine($" begin ");
|
||||
sb.AppendLine($" insert into [Auftrag].[dbo].[Fortschrittsrueckmeldung] ");
|
||||
sb.AppendLine($" and sap.Vorgangsnr = @ProgressNr and c.PcbID = @PcbID ");
|
||||
sb.AppendLine($" if @count =0 ");
|
||||
sb.AppendLine($" begin ");
|
||||
sb.AppendLine($" insert into [Auftrag].[dbo].[Fortschrittsrueckmeldung] ");
|
||||
sb.AppendLine($" select 'GNS', @order, 1, CURRENT_TIMESTAMP, @ProgressNr,null,0,null,0,'{version}','webrequest'; ");
|
||||
sb.AppendLine($" insert into Cordonel_ProgressFeedback ");
|
||||
sb.AppendLine($" insert into Cordonel_ProgressFeedback ");
|
||||
sb.AppendLine($" select @PcbID ,@@IDENTITY ");
|
||||
sb.AppendLine($" end ");
|
||||
sb.AppendLine($" select @count ");
|
||||
|
||||
@ -347,12 +347,20 @@
|
||||
tr.Date = Convert.ToDateTime(dr["Datum"]);
|
||||
tr.MeterType = dt.Rows[0]["Typ"].ToString();
|
||||
tr.MeterSize = Convert.ToInt32(dr["Nennweite"]);
|
||||
tr.AirTempC = Convert.ToDouble(dr["Lufttemperatur"]);
|
||||
tr.AirPressure = Convert.ToDouble(dr["LuftDruck"]);
|
||||
tr.AirHumanity = Convert.ToDouble(dr["RelativeFeuchte"]);
|
||||
tr.WaterTempC = Convert.ToDouble(dr["Vorlauftemperatur"]);
|
||||
tr.TotalMeters = Convert.ToInt32(dr["Anzahl"]);
|
||||
tr.Remark = dr["Bemerkung"].ToString();
|
||||
try
|
||||
{
|
||||
tr.AirTempC = Convert.ToDouble(dr["Lufttemperatur"]);
|
||||
tr.AirPressure = Convert.ToDouble(dr["LuftDruck"]);
|
||||
tr.AirHumanity = Convert.ToDouble(dr["RelativeFeuchte"]);
|
||||
tr.WaterTempC = Convert.ToDouble(dr["Vorlauftemperatur"]);
|
||||
tr.TotalMeters = Convert.ToInt32(dr["Anzahl"]);
|
||||
tr.Remark = dr["Bemerkung"].ToString();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
tr.Remark = "temp nicht lesbar";
|
||||
}
|
||||
|
||||
|
||||
tr.Details = new List<TestPointDetail>();
|
||||
tr.TestPointsChannels = new List<ChnlTestPoint>();
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>56011</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>http://localhost:50075/</IISUrl>
|
||||
<IISUrl>http://localhost:50076/</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>False</UseCustomServer>
|
||||
<CustomServerUrl>
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
<!--<add key="ConnectionString" value="Server=SLASQL01.emea.sensus.net; Database=Testreplikation; User ID=sa; Password=sqlserver;" />-->
|
||||
<add key="ConnectionString" value="Server=DELAZ1SQL01.world.fluidtechnology.net; Database=Auftrag; User ID=sa; Password=sqlserver;" />
|
||||
<add key="EncryptionKeisUrl" value="http://sla12iis01.emea.sensus.net/LaaProductionWeb/api/eregister/radiokey/byserialno/{0}" />
|
||||
<add key="SIRTComPorts" value="COM6,COM8" />
|
||||
<add key="SIRTComPorts" value="COM6,COM7" />
|
||||
<add key="PSNR" value="1000" />
|
||||
<add key="SIRT_433" value=""/>
|
||||
<add key="SIRT_868" value=""/>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
public class VMLocator
|
||||
{
|
||||
public SIRTBroadcastersVM SIRTBroadcasterVM { get; } = new SIRTBroadcastersVM();
|
||||
public SIRTBroadcastersVM SIRTBroadcasterVM => new SIRTBroadcastersVM();
|
||||
|
||||
public EregisterHistoryVM EregisterHistoryVM { get; } = new EregisterHistoryVM();
|
||||
|
||||
|
||||
@ -29,14 +29,13 @@
|
||||
sqlConnection
|
||||
.CreateCommand($@"
|
||||
UPDATE eRegister
|
||||
SET Bemerkung = ISNULL(@{nameof(state.Bemerkung)}, er.Bemerkung)
|
||||
SET Bemerkung = ISNULL(er.Bemerkung, @{nameof(state.Bemerkung)})
|
||||
, BUP = ISNULL(@{nameof(state.BUP)}, er.BUP)
|
||||
, SEMI = ISNULL(@{nameof(state.SEMI)}, er.SEMI)
|
||||
, DEBUG = ISNULL(@{nameof(state.DEBUG)}, er.DEBUG)
|
||||
, SemiDebugDatum = ISNULL(@{nameof(state.SemiDebugDatum)}, er.SemiDebugDatum)
|
||||
, GeschlossenDatum = ISNULL(@{nameof(state.GeschlossenDatum)}, er.GeschlossenDatum)
|
||||
, FunkadresseDatum = ISNULL(@{nameof(state.FunkadresseDatum)}, er.FunkadresseDatum)
|
||||
, TempAdresse = ISNULL(@{nameof(state.TempAdresse)}, er.TempAdresse)
|
||||
, GeschlossenDatum = ISNULL(er.GeschlossenDatum, @{nameof(state.GeschlossenDatum)})
|
||||
, FunkadresseDatum = ISNULL(er.FunkadresseDatum, @{nameof(state.FunkadresseDatum)})
|
||||
FROM eRegister AS er
|
||||
JOIN AuftragPositionSerienNr AS aps
|
||||
ON er.Seriennummer = aps.SerienNr
|
||||
@ -49,7 +48,6 @@
|
||||
.SetParameter(nameof(state.SemiDebugDatum), state.SemiDebugDatum)
|
||||
.SetParameter(nameof(state.GeschlossenDatum), state.GeschlossenDatum)
|
||||
.SetParameter(nameof(state.FunkadresseDatum), state.FunkadresseDatum)
|
||||
.SetParameter(nameof(state.TempAdresse), state.TempAdresse)
|
||||
.SetParameter(nameof(state.Seriennummer), state.Seriennummer)
|
||||
.ExecuteNonQuery();
|
||||
}
|
||||
@ -82,7 +80,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
internal class Eregister_Shared
|
||||
internal class eRegister_Shared
|
||||
{
|
||||
internal static List<EregisterShared> LoadActions(int sharedId)
|
||||
=> sqlConnection.LoadActions(sharedId);
|
||||
@ -101,50 +99,9 @@
|
||||
SELECT CAST((SELECT DISTINCT *
|
||||
FROM VieweRegisterProgrammingParameters
|
||||
WHERE SharedId = @{nameof(sharedId)}
|
||||
-- AND Completed = @{nameof(completed)}
|
||||
-- AND SlotNr > 0
|
||||
FOR XML PATH('{nameof(EregisterProgrammingParameters)}')
|
||||
, ROOT('{nameof(EregisterProgrammingParametersList)}'))
|
||||
AS XML)")
|
||||
, ROOT('{nameof(EregisterProgrammingParametersList)}')) AS XML)")
|
||||
.SetParameter(nameof(sharedId), sharedId)
|
||||
.SetParameter(nameof(completed), completed)
|
||||
.FirstOrDefault(x => x.GetValue<string>(0));
|
||||
var xmlDeserialized = default(object);
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(xmlList))
|
||||
{
|
||||
var xmlSerializer = new XmlSerializer(typeof(EregisterProgrammingParametersList));
|
||||
var xmlReader = new StringReader(xmlList);
|
||||
|
||||
try
|
||||
{
|
||||
xmlDeserialized = xmlSerializer.Deserialize(xmlReader);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
AppHost.NLogger.Error(e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
return xmlDeserialized as EregisterProgrammingParametersList ?? new EregisterProgrammingParametersList();
|
||||
}
|
||||
|
||||
internal static EregisterProgrammingParametersList LoadEregisterProgrammingParametersListForSerialNr(int serialNr)
|
||||
{
|
||||
var xmlList = sqlConnection
|
||||
.CreateCommand($@"
|
||||
SELECT CAST((SELECT ersh.P2000_Shared_Id
|
||||
, ersh.Slotno
|
||||
, erpp.*
|
||||
FROM eRegister_Shared AS ersh
|
||||
JOIN VieweRegisterProgrammingParameters AS erpp
|
||||
ON ersh.Serialno = erpp.SerienNr
|
||||
WHERE ersh.Serialno = @{nameof(serialNr)}
|
||||
AND ersh.Completed = 0
|
||||
FOR XML PATH('{nameof(EregisterProgrammingParameters)}')
|
||||
, ROOT('{nameof(EregisterProgrammingParametersList)}'))
|
||||
AS XML)")
|
||||
.SetParameter(nameof(serialNr), serialNr)
|
||||
.FirstOrDefault(x => x.GetValue<string>(0));
|
||||
var xmlDeserialized = default(object);
|
||||
|
||||
|
||||
@ -27,7 +27,8 @@
|
||||
internal static List<EregisterShared> LoadActions(this SqlConnection sqlConnection, int sharedId)
|
||||
=> sqlConnection
|
||||
.CreateCommand($@"
|
||||
SELECT Id
|
||||
SELECT DISTINCT
|
||||
Id
|
||||
, P2000_Shared_Id
|
||||
, Slotno
|
||||
, Serialno
|
||||
|
||||
@ -25,6 +25,18 @@
|
||||
|
||||
public bool TryGetKey(uint address1, uint address2, out string encryptionKey)
|
||||
{
|
||||
//var existing = this.connection
|
||||
// .Table<RadioKey>()
|
||||
// .Where(x => x.Address == 4291535650)
|
||||
// .FirstOrDefault();
|
||||
|
||||
//if (existing != null)
|
||||
//{
|
||||
// existing.EncryptionKey = "5DD3EF5233B4DAA6836721F2866182DA";
|
||||
|
||||
// this.connection.Update(existing);
|
||||
//}
|
||||
|
||||
encryptionKey = this.connection
|
||||
.Table<RadioKey>()
|
||||
.FirstOrDefault(x => x.Address == address1 || x.Address == address2)
|
||||
|
||||
@ -228,7 +228,7 @@
|
||||
}
|
||||
|
||||
this.timer.Start();
|
||||
this.eregisterFactory.StartProgrammingAsync(this.cancellationToken);
|
||||
this.eregisterFactory.StartProgramming(this.cancellationToken);
|
||||
this.StopProgrammingCommandHandler();
|
||||
|
||||
this.prepeared = false;
|
||||
|
||||
@ -23,7 +23,6 @@
|
||||
this.timer = new Timer(3000);
|
||||
this.timer.Elapsed += this.Timer_Elapsed;
|
||||
this.sirtHub = new SIRTHub();
|
||||
// TODO: this.sirtHub.MessageProcessed += this.SirtHub_MessageProcessed;
|
||||
this.StartScanning = new Command(this.StartScanning_Command);
|
||||
this.Addresses433 = new ObservableCollection<uint>();
|
||||
this.Addresses868 = new ObservableCollection<uint>();
|
||||
@ -40,8 +39,6 @@
|
||||
this.InvokeTaskAsync(() =>
|
||||
{
|
||||
this.timer.Start();
|
||||
//this.sirtHub.Open("COM6");
|
||||
//this.sirtHub.Open("COM8");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -84,7 +84,7 @@
|
||||
DelPamSemi = true,
|
||||
WakeUpModul = true,
|
||||
RequestAddress = this.Address.Value,
|
||||
EncryptionKey = encryptionKey,
|
||||
EncryptionKeyI = encryptionKey,
|
||||
Data = new ChangeFactoryState
|
||||
{
|
||||
FactoryState = FactoryState.Production
|
||||
|
||||
@ -703,6 +703,9 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
try
|
||||
{
|
||||
|
||||
_currentGenesis.WriteRegister(Register.Powermon.BatteryQuantity, 2, true, true);
|
||||
|
||||
|
||||
// var requirements = new CordonelRequirements();
|
||||
|
||||
// TODO THW Just display lifetime as is in Low Level Tools as Order is not assigned and meter size is unknown (ROLAND)
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit a9ef9051cabb74806a4ce0293794cf95756883e6
|
||||
Subproject commit e7aa3e2723a435f0a714df661dc5d86dfd45a71c
|
||||
@ -37,7 +37,7 @@ namespace Siemens.UAClientHelper
|
||||
public UAClientHelperAPI()
|
||||
{
|
||||
// Creats the application configuration (containing the certificate) on construction
|
||||
mApplicationConfig = CreateClientConfiguration();
|
||||
// mApplicationConfig = CreateClientConfiguration();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user