From cc98a29fc39647c420f963cd6d60933eceefff7e Mon Sep 17 00:00:00 2001 From: Roland Drabesch Date: Mon, 27 Oct 2025 08:24:33 +0100 Subject: [PATCH 01/15] laptop merge --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 323da9f6..b1edc3f1 100644 --- a/.gitignore +++ b/.gitignore @@ -400,3 +400,4 @@ FodyWeavers.xsd /Common/CommonConsole /Common/Common.v3.ncrunchsolution /TBF_V2/Sources/TBF/TBF/BenchControl/TestMethods/GenesisCommunication.zip +/Common.zip From 039eb787422ffcb7aad8bfb577e9d64d7529dab0 Mon Sep 17 00:00:00 2001 From: Roland Drabesch Date: Tue, 13 Jan 2026 11:11:54 +0100 Subject: [PATCH 02/15] change url to new server --- .../ServiceUrlsBackUp_New.cs | 24 ++-- .../CordonelPreadjustmentUi.csproj | 2 +- Common/LaaPackages | 2 +- .../Controllers/PasswordController.cs | 2 +- .../Controllers/ProccesStateController.cs | 126 ++++++++++-------- .../MeterProcessState.csproj.user | 2 +- 6 files changed, 86 insertions(+), 72 deletions(-) diff --git a/Common/CommonCore.Configuration/ServiceUrlsBackUp_New.cs b/Common/CommonCore.Configuration/ServiceUrlsBackUp_New.cs index d726eca2..8b16549e 100644 --- a/Common/CommonCore.Configuration/ServiceUrlsBackUp_New.cs +++ b/Common/CommonCore.Configuration/ServiceUrlsBackUp_New.cs @@ -9,18 +9,20 @@ namespace Xylem.Common.CommonCore.Configuration /// 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"; @@ -206,7 +208,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 +475,7 @@ namespace Xylem.Common.CommonCore.Configuration /// 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}"; } /// @@ -486,7 +488,7 @@ namespace Xylem.Common.CommonCore.Configuration /// 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}"; } /// diff --git a/Common/CordonelPreadjustmentUi/CordonelPreadjustmentUi.csproj b/Common/CordonelPreadjustmentUi/CordonelPreadjustmentUi.csproj index 39e39463..d1c6afd6 100644 --- a/Common/CordonelPreadjustmentUi/CordonelPreadjustmentUi.csproj +++ b/Common/CordonelPreadjustmentUi/CordonelPreadjustmentUi.csproj @@ -5,7 +5,7 @@ Debug AnyCPU {D0C8D887-ED52-40AB-A069-90BCE0E801E2} - WinExe + Library Properties Xylem.Common.Ui.CordonelPreadjustmentUi Xylem.Common.Ui.CordonelPreadjustmentUi diff --git a/Common/LaaPackages b/Common/LaaPackages index 3bbddfd4..df99a430 160000 --- a/Common/LaaPackages +++ b/Common/LaaPackages @@ -1 +1 @@ -Subproject commit 3bbddfd4b74803aaa886d1c884eb5a86c6b660ac +Subproject commit df99a43005ea24a5ebc95ee451cf3f67cc8ad94d diff --git a/Common/Service/MeterProcessState/Controllers/PasswordController.cs b/Common/Service/MeterProcessState/Controllers/PasswordController.cs index 75cbb096..abf05472 100644 --- a/Common/Service/MeterProcessState/Controllers/PasswordController.cs +++ b/Common/Service/MeterProcessState/Controllers/PasswordController.cs @@ -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()); diff --git a/Common/Service/MeterProcessState/Controllers/ProccesStateController.cs b/Common/Service/MeterProcessState/Controllers/ProccesStateController.cs index 3bbd066f..802b9b19 100644 --- a/Common/Service/MeterProcessState/Controllers/ProccesStateController.cs +++ b/Common/Service/MeterProcessState/Controllers/ProccesStateController.cs @@ -28,7 +28,7 @@ namespace Service.MeterProcessState.Controllers } [Route("SetPressureStateDetailed"), HttpPost] - public async Task SetPressureStateDetailed([FromBody]PressureResultData testResult) + public async Task 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 SetPressureState(String PcbId, Int32 FertigungsauftragsNr, [FromBody]PressureTestResult testResult) + public async Task 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(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(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 "); diff --git a/Common/Service/MeterProcessState/MeterProcessState.csproj.user b/Common/Service/MeterProcessState/MeterProcessState.csproj.user index 9b1bfe9a..d31c59d6 100644 --- a/Common/Service/MeterProcessState/MeterProcessState.csproj.user +++ b/Common/Service/MeterProcessState/MeterProcessState.csproj.user @@ -2,7 +2,7 @@ Debug|Any CPU - E:\REPO\lab\la_operations\laa_production\Common\Service\MeterProcessState\Properties\PublishProfiles\a.pubxml + E:\REPO\lab\la_operations\laa_production\Common\Service\MeterProcessState\Properties\PublishProfiles\IISProfile.pubxml true From 4965a1447e7c42a697afa79ba93055c7648d66f0 Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Mon, 19 Jan 2026 13:56:59 +0100 Subject: [PATCH 03/15] fdr, content mask, name refact --- Common/CommonConsole/Program.cs | 56 ++++++++++--------- .../Eregister.cs | 2 +- .../EregisterBatch.cs | 4 +- Common/LaaPackages | 2 +- .../ViewModels/EregisterInitializeVM.cs | 2 +- 5 files changed, 34 insertions(+), 32 deletions(-) diff --git a/Common/CommonConsole/Program.cs b/Common/CommonConsole/Program.cs index d0cbeb2a..f6d32a76 100644 --- a/Common/CommonConsole/Program.cs +++ b/Common/CommonConsole/Program.cs @@ -19,7 +19,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 +28,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 +43,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 +55,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 +73,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 +88,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 +98,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 diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs index b1f95bc2..4bb3e5d2 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs @@ -122,7 +122,7 @@ 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; diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterBatch.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterBatch.cs index b1702bfe..5b7c4cdc 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterBatch.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterBatch.cs @@ -47,7 +47,7 @@ } } - public void StartProgrammingAsync(CancellationToken cancellationToken) + public void StartProgramming(CancellationToken cancellationToken) { var eregisters = new ConcurrentQueue(this.eregisters); @@ -55,7 +55,7 @@ { while (!cancellationToken.IsCancellationRequested && eregisters.TryDequeue(out var eregister)) { - eregister.StartProgrammingAsync(cancellationToken); + eregister.StartProgramming(cancellationToken); } }); } diff --git a/Common/LaaPackages b/Common/LaaPackages index 8bda7ec6..a9ef9051 160000 --- a/Common/LaaPackages +++ b/Common/LaaPackages @@ -1 +1 @@ -Subproject commit 8bda7ec658f56be11f53f97ddf6616447d1abf36 +Subproject commit a9ef9051cabb74806a4ce0293794cf95756883e6 diff --git a/Common/Ui/Common.UI/ViewModels/EregisterInitializeVM.cs b/Common/Ui/Common.UI/ViewModels/EregisterInitializeVM.cs index 517b5f6f..1db2eb1e 100644 --- a/Common/Ui/Common.UI/ViewModels/EregisterInitializeVM.cs +++ b/Common/Ui/Common.UI/ViewModels/EregisterInitializeVM.cs @@ -228,7 +228,7 @@ } this.timer.Start(); - this.eregisterFactory.StartProgrammingAsync(this.cancellationToken); + this.eregisterFactory.StartProgramming(this.cancellationToken); this.StopProgrammingCommandHandler(); this.prepeared = false; From 038f5b33b7714bceae306cd98c405a99a8cc15a3 Mon Sep 17 00:00:00 2001 From: Roland Drabesch Date: Tue, 20 Jan 2026 13:13:43 +0100 Subject: [PATCH 04/15] PCB stock checks --- .../Genesis/GenesisCore/configuration.json | 2 +- .../Controllers/LUControler.cs | 315 +++++++++++------- Common/Ui/GenesisToolBox/FrmQsTool.cs | 3 + 3 files changed, 202 insertions(+), 118 deletions(-) diff --git a/Common/Hardware/WaterMeter/Genesis/GenesisCore/configuration.json b/Common/Hardware/WaterMeter/Genesis/GenesisCore/configuration.json index 35026198..66a2b2a2 100644 --- a/Common/Hardware/WaterMeter/Genesis/GenesisCore/configuration.json +++ b/Common/Hardware/WaterMeter/Genesis/GenesisCore/configuration.json @@ -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 �repair tool� that must be allowed to make such repairs to legally relevant configuration in the field.", "region": { "emea": { "values": { diff --git a/Common/Service/MeterProcessState/Controllers/LUControler.cs b/Common/Service/MeterProcessState/Controllers/LUControler.cs index 8fd79e7b..3d582276 100644 --- a/Common/Service/MeterProcessState/Controllers/LUControler.cs +++ b/Common/Service/MeterProcessState/Controllers/LUControler.cs @@ -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 SyncKitronData() { - + StringBuilder query = new StringBuilder(); @@ -233,7 +235,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers } [Route("SyncKitronDataByPbc")] - public async Task SyncKitronDataByPbc(int PcbId) + public async Task SyncKitronDataByPbc(int PcbId) { using (var dataAccess = new SqlDataAccess(GlobalConfig.connectionString.Value)) @@ -326,150 +328,229 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers } - public async Task 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 GetPcbInfoPicking(int PcbId) + { + + return await Task.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 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 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 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 + + + } + } \ No newline at end of file diff --git a/Common/Ui/GenesisToolBox/FrmQsTool.cs b/Common/Ui/GenesisToolBox/FrmQsTool.cs index a1bef8c2..e3f6e9f1 100644 --- a/Common/Ui/GenesisToolBox/FrmQsTool.cs +++ b/Common/Ui/GenesisToolBox/FrmQsTool.cs @@ -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) From 1a087755dc8477666450a0ce9d718f278c82553e Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Tue, 20 Jan 2026 15:09:13 +0100 Subject: [PATCH 05/15] WritePamTask - change encryption key option (... using second key) --- Common/CommonConsole/PAM03.cs | 2 +- Common/CommonConsole/Program.cs | 81 ++++++++++++++++++- .../Tasks/WritePamTask.cs | 10 ++- .../Eregister.cs | 12 +-- .../EregisterTask.cs | 4 +- .../RFTelegrams/SIRTServer.cs | 6 +- .../ViewModels/ManualProgrammingVM.cs | 2 +- 7 files changed, 100 insertions(+), 17 deletions(-) diff --git a/Common/CommonConsole/PAM03.cs b/Common/CommonConsole/PAM03.cs index 215a6f22..f97b84e9 100644 --- a/Common/CommonConsole/PAM03.cs +++ b/Common/CommonConsole/PAM03.cs @@ -43,7 +43,7 @@ WakeUpCmd = true, WakeUpModul = true, RequestAddress = address, - EncryptionKey = key, + EncryptionKeyI = key, IsEncrypted = true }; diff --git a/Common/CommonConsole/Program.cs b/Common/CommonConsole/Program.cs index f6d32a76..04fa7ee4 100644 --- a/Common/CommonConsole/Program.cs +++ b/Common/CommonConsole/Program.cs @@ -1,11 +1,90 @@ namespace CommonConsole { + using Common.Hardware.SIRT; + using Common.Hardware.SIRT.Tasks; + using Common.Hardware.WaterMeter.eRegister.Features; + using System; - using System.Collections; + using System.Collections.Concurrent; + using System.Collections.Generic; public static class Program { + static int frequency = 868; + static int timeout = 15_000; + static Dictionary testAddresses868 = new Dictionary + { + // { 4291923131, "6182ACF7E60266965951BBFB160C1707" }, + // { 4291922821, "B9CC9CCD2CDCB285100B44995497071E" }, + // { 4291868627, "4BC9FEBE927ADA57AE9EE699BBBAC4DC" }, + { 4291808024, "4BC9FEBE927ADA57AE9EE699BBBAC4DC" }, + { 4291759578, "4BC9FEBE927ADA57AE9EE699BBBAC4DC" }, + { 4291709169, "4BC9FEBE927ADA57AE9EE699BBBAC4DC" }, + { 4291657730, "B9CC9CCD2CDCB285100B44995497071E" }, + { 4291535650, "E6C88800DEB868C0D6A84880CE982840" }, + { 4291377834, "E6C88800DEB868C0D6A84880CE982840" }, + { 4291377829, "E6C88800DEB868C0D6A84880CE982840" }, + // { 4291134308, "B9CC9CCD2CDCB285100B44995497071E" }, + { 4291094212, "B9CC9CCD2CDCB285100B44995497071E" }, + }; + static void Main() + { + var sirt868 = new SIRTBroadcaster("COM7"); + SIRTLogger.Message += Console.WriteLine; + sirt868.Open(); + + var etasks = new ConcurrentQueue(); + + foreach (var kvp in testAddresses868) + { + etasks.Enqueue(new WritePamTask + { + Timeout = timeout, + DelPamSemi = true, + WakeUpCmd = true, + WakeUpModul = true, + RequireLAT = true, + RequireDEBUG = true, + Frequency = frequency, + RequestAddress = kvp.Key, + ResponseAddress = kvp.Key, + EncryptionKeyI = kvp.Value.GetEncryptionKey(), + Data = new OpticalTelegram(1).Append(new ProvidePin(AuthLevel.III)) + }); + } + + var pendingAddresses = new Queue(); + + while (etasks.TryDequeue(out var etask)) + { + for (var i = 0; i < 2 && etask.State != SIRTTaskState.Completed && etask.State != SIRTTaskState.Cancelled; i++) + { + etask.SetPending(); + + if (sirt868.Start(etask)) + { + etask.Wait(); + } + } + + if (etask.State != SIRTTaskState.Completed) + { + pendingAddresses.Enqueue(etask.RequestAddress); + } + } + + sirt868.Close(); + + Console.WriteLine(); + + foreach (var address in pendingAddresses) + { + Console.WriteLine(address); + } + } + + static void Main_CSD_Alarms() { var alarmMask = 0 << AlarmMask.ALARM_REBOOT | 1 << AlarmMask.ALARM_LOW_BATTERY diff --git a/Common/Hardware/Common.Hardware.SIRT/Tasks/WritePamTask.cs b/Common/Hardware/Common.Hardware.SIRT/Tasks/WritePamTask.cs index 4dd3deae..1ff16e1b 100644 --- a/Common/Hardware/Common.Hardware.SIRT/Tasks/WritePamTask.cs +++ b/Common/Hardware/Common.Hardware.SIRT/Tasks/WritePamTask.cs @@ -40,7 +40,9 @@ public bool IsEncrypted { get; set; } - public byte[] EncryptionKey { get; set; } + public byte[] EncryptionKeyI { get; set; } + + public byte[] EncryptionKeyII { get; set; } public bool WakeUpModul { @@ -206,7 +208,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[11] != 0) { this.SetPending(); } @@ -259,7 +261,7 @@ if (this.IsEncrypted) { - payload = payload.EncryptRequest(this.EncryptionKey, this.RequestAddress); + payload = payload.EncryptRequest(this.EncryptionKeyI, this.RequestAddress); } } @@ -270,7 +272,7 @@ { this.IsEncrypted = true; - response.Payload = response.Payload.DecryptResponse(this.EncryptionKey); + response.Payload = response.Payload.DecryptResponse(this.EncryptionKeyI); } private void SetP811(Action p811Setter) diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs index 4bb3e5d2..47ee65af 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs @@ -67,7 +67,7 @@ SerialNr = features.SerialNr, RequestAddress = features.RequestAddress, ResponseAddress = features.ResponseAddress, - EncryptionKey = features.EncryptionKey, + EncryptionKeyI = features.EncryptionKey, Name = "Change Meter Type" }); } @@ -95,7 +95,7 @@ SerialNr = features.SerialNr, RequestAddress = features.RequestAddress, ResponseAddress = features.ResponseAddress, - EncryptionKey = features.EncryptionKey, + EncryptionKeyI = features.EncryptionKey, }); this.runningTasks.Enqueue(new EregisterTask(this.parameters.Frequency) @@ -106,7 +106,7 @@ SerialNr = features.SerialNr, RequestAddress = features.RequestAddress, ResponseAddress = features.ResponseAddress, - EncryptionKey = features.EncryptionKey, + EncryptionKeyI = features.EncryptionKey, Data = new ChangeWakeUp((WakeUpMode)this.parameters.Wake_Up_Interval) .Append(new ChangeNumberOfLatWindows(this.parameters.LAT_Interval)) .Append(new ChangeTransmissionInterval(this.parameters.Transmission_Intervall)) @@ -270,7 +270,7 @@ SerialNr = features.SerialNr, RequestAddress = features.RequestAddress, ResponseAddress = features.ResponseAddress, - EncryptionKey = features.EncryptionKey, + EncryptionKeyI = features.EncryptionKey, Data = new ChangeWakeUp(WakeUpMode.StayAwake) .Append(new ChangeNumberOfLatWindows(this.parameters.LatWindowsInitialization)) .Append(new ChangeTransmissionInterval(this.parameters.TransmissionIntervalInitialization)) @@ -284,7 +284,7 @@ SerialNr = features.SerialNr, RequestAddress = features.RequestAddress, ResponseAddress = features.ResponseAddress, - EncryptionKey = features.EncryptionKey, + EncryptionKeyI = features.EncryptionKey, }); foreach (var pam in features.BuildPams()) @@ -296,7 +296,7 @@ SerialNr = features.SerialNr, RequestAddress = features.RequestAddress, ResponseAddress = features.ResponseAddress, - EncryptionKey = features.EncryptionKey, + EncryptionKeyI = features.EncryptionKey, Data = pam.Value, Name = pam.Key }); diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterTask.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterTask.cs index 63f30424..ecfc9491 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterTask.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterTask.cs @@ -46,7 +46,9 @@ } } - public string Info { get; private set; } + public bool ChangeRadioAddress { get; set; } + + public bool ChangeEncryptionKey { get; set; } public string RSSI { get; private set; } diff --git a/Common/Production/ProductionUiCordonel/ProductionProcesses/RFTelegrams/SIRTServer.cs b/Common/Production/ProductionUiCordonel/ProductionProcesses/RFTelegrams/SIRTServer.cs index 156e6f8c..81782f37 100644 --- a/Common/Production/ProductionUiCordonel/ProductionProcesses/RFTelegrams/SIRTServer.cs +++ b/Common/Production/ProductionUiCordonel/ProductionProcesses/RFTelegrams/SIRTServer.cs @@ -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); diff --git a/Common/Ui/Common.UI/ViewModels/ManualProgrammingVM.cs b/Common/Ui/Common.UI/ViewModels/ManualProgrammingVM.cs index 8ae9154c..0f8204b2 100644 --- a/Common/Ui/Common.UI/ViewModels/ManualProgrammingVM.cs +++ b/Common/Ui/Common.UI/ViewModels/ManualProgrammingVM.cs @@ -84,7 +84,7 @@ DelPamSemi = true, WakeUpModul = true, RequestAddress = this.Address.Value, - EncryptionKey = encryptionKey, + EncryptionKeyI = encryptionKey, Data = new ChangeFactoryState { FactoryState = FactoryState.Production From 2b14a9589d47eebb22f9351d015ebe5e4344d962 Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Fri, 23 Jan 2026 11:16:38 +0100 Subject: [PATCH 06/15] latest changes --- .../Common.Services.LaserImport.csproj | 22 +++++ Common/Common.Services.LaserImport/Program.cs | 15 +++- Common/CommonConsole/Program.cs | 82 +++++++------------ .../Tasks/WritePamTask.cs | 59 ++++++++++--- .../Eregister.cs | 11 ++- .../EregisterTask.cs | 4 - .../Models/EregisterProgrammingParameters.cs | 1 - Common/Ui/Common.UI/App.config | 2 +- .../Ui/Common.UI/Models/AuftragDbContext.cs | 3 +- Common/Ui/Common.UI/Models/SQLiteKeyStore.cs | 12 +++ 10 files changed, 136 insertions(+), 75 deletions(-) diff --git a/Common/Common.Services.LaserImport/Common.Services.LaserImport.csproj b/Common/Common.Services.LaserImport/Common.Services.LaserImport.csproj index de15ea70..074510b1 100644 --- a/Common/Common.Services.LaserImport/Common.Services.LaserImport.csproj +++ b/Common/Common.Services.LaserImport/Common.Services.LaserImport.csproj @@ -12,6 +12,21 @@ 512 true + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true AnyCPU @@ -50,5 +65,12 @@ + + + False + .NET Framework 3.5 SP1 + false + + \ No newline at end of file diff --git a/Common/Common.Services.LaserImport/Program.cs b/Common/Common.Services.LaserImport/Program.cs index 99c3c2ad..e36d54df 100644 --- a/Common/Common.Services.LaserImport/Program.cs +++ b/Common/Common.Services.LaserImport/Program.cs @@ -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) diff --git a/Common/CommonConsole/Program.cs b/Common/CommonConsole/Program.cs index 04fa7ee4..95edf21b 100644 --- a/Common/CommonConsole/Program.cs +++ b/Common/CommonConsole/Program.cs @@ -5,86 +5,64 @@ using Common.Hardware.WaterMeter.eRegister.Features; using System; - using System.Collections.Concurrent; using System.Collections.Generic; + + // { 4291923131, "6182ACF7E60266965951BBFB160C1707" }, + // { 4291922821, "B9CC9CCD2CDCB285100B44995497071E" }, + // { 4291868627, "4BC9FEBE927ADA57AE9EE699BBBAC4DC" }, + // { 4291134308, "B9CC9CCD2CDCB285100B44995497071E" }, + public static class Program { static int frequency = 868; static int timeout = 15_000; + static string defaultEncryptionKey = "E6C88800DEB868C0D6A84880CE982840"; static Dictionary testAddresses868 = new Dictionary { - // { 4291923131, "6182ACF7E60266965951BBFB160C1707" }, - // { 4291922821, "B9CC9CCD2CDCB285100B44995497071E" }, - // { 4291868627, "4BC9FEBE927ADA57AE9EE699BBBAC4DC" }, { 4291808024, "4BC9FEBE927ADA57AE9EE699BBBAC4DC" }, { 4291759578, "4BC9FEBE927ADA57AE9EE699BBBAC4DC" }, { 4291709169, "4BC9FEBE927ADA57AE9EE699BBBAC4DC" }, { 4291657730, "B9CC9CCD2CDCB285100B44995497071E" }, - { 4291535650, "E6C88800DEB868C0D6A84880CE982840" }, + { 4291535650, "5DD3EF5233B4DAA6836721F2866182DA" }, { 4291377834, "E6C88800DEB868C0D6A84880CE982840" }, { 4291377829, "E6C88800DEB868C0D6A84880CE982840" }, - // { 4291134308, "B9CC9CCD2CDCB285100B44995497071E" }, { 4291094212, "B9CC9CCD2CDCB285100B44995497071E" }, }; - static void Main() + static void Main_ER() { var sirt868 = new SIRTBroadcaster("COM7"); SIRTLogger.Message += Console.WriteLine; sirt868.Open(); - var etasks = new ConcurrentQueue(); - - foreach (var kvp in testAddresses868) + var CSD_38102_BU_Key = "5DD3EF5233B4DAA6836721F2866182DA"; + var task = new WritePamTask { - etasks.Enqueue(new WritePamTask - { - Timeout = timeout, - DelPamSemi = true, - WakeUpCmd = true, - WakeUpModul = true, - RequireLAT = true, - RequireDEBUG = true, - Frequency = frequency, - RequestAddress = kvp.Key, - ResponseAddress = kvp.Key, - EncryptionKeyI = kvp.Value.GetEncryptionKey(), - Data = new OpticalTelegram(1).Append(new ProvidePin(AuthLevel.III)) - }); - } - - var pendingAddresses = new Queue(); - - while (etasks.TryDequeue(out var etask)) - { - for (var i = 0; i < 2 && etask.State != SIRTTaskState.Completed && etask.State != SIRTTaskState.Cancelled; i++) - { - etask.SetPending(); - - if (sirt868.Start(etask)) - { - etask.Wait(); - } - } - - if (etask.State != SIRTTaskState.Completed) - { - pendingAddresses.Enqueue(etask.RequestAddress); - } + Timeout = timeout, + DelPamSemi = true, + WakeUpCmd = true, + WakeUpModul = true, + RequireLAT = true, + RequireDEBUG = true, + Frequency = frequency, + RequestAddress = 4291535650, + ResponseAddress = 4291535650, + EncryptionKeyI = CSD_38102_BU_Key.GetEncryptionKey(), + Data = new OpticalTelegram(1).Append(new ProvidePin(AuthLevel.III)) + }; + + for (var i = 0; i < 3 || task.State == SIRTTaskState.Completed || task.State == SIRTTaskState.Cancelled; i++) + { + sirt868.Start(task); + task.Wait(); } + Console.ReadKey(); sirt868.Close(); - - Console.WriteLine(); - - foreach (var address in pendingAddresses) - { - Console.WriteLine(address); - } } - static void Main_CSD_Alarms() + static void Main() { var alarmMask = 0 << AlarmMask.ALARM_REBOOT | 1 << AlarmMask.ALARM_LOW_BATTERY diff --git a/Common/Hardware/Common.Hardware.SIRT/Tasks/WritePamTask.cs b/Common/Hardware/Common.Hardware.SIRT/Tasks/WritePamTask.cs index 1ff16e1b..2d4cf063 100644 --- a/Common/Hardware/Common.Hardware.SIRT/Tasks/WritePamTask.cs +++ b/Common/Hardware/Common.Hardware.SIRT/Tasks/WritePamTask.cs @@ -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 MessageSent; @@ -42,7 +46,16 @@ public byte[] EncryptionKeyI { get; set; } - public byte[] EncryptionKeyII { get; set; } + private byte[] encryptionKeyII; + public byte[] EncryptionKeyII + { + get => this.encryptionKeyII; + set + { + this.encryptionKeyII = value; + this.IsEncrypted = true; + } + } public bool WakeUpModul { @@ -92,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 MessageQueue { get; set; } = new Queue(); + 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]; @@ -208,7 +230,7 @@ protected virtual void OnSEMIReceived(SIRTMessage semi) { - if ((this.RequireLAT && !this.latReceived) || (this.RequireDEBUG && !this.debugReceived) || semi.Payload[11] != 0) + if ((this.RequireLAT && !this.latReceived) || (this.RequireDEBUG && !this.debugReceived) || semi.Payload[this.PamStatusIX] != 0) { this.SetPending(); } @@ -225,7 +247,7 @@ protected virtual bool UseEncryption(SIRTMessage response) { - if (response is null) + if (response is null || this.EncryptionKeyI is null) { return false; } @@ -239,7 +261,7 @@ var payloadLength = payload.Length; - if (payloadLength == 0) + if (payloadLength == 0 || payloadLength == this.DebugLength || payloadLength == this.SemiLength) { return false; } @@ -270,9 +292,22 @@ private void DecriptResponse(SIRTMessage response) { - this.IsEncrypted = true; + var payload = new byte[response.Length]; + Array.Copy(response.Payload, 0, payload, 0, payload.Length); - response.Payload = response.Payload.DecryptResponse(this.EncryptionKeyI); + response.Payload = payload.DecryptResponse(this.EncryptionKeyI); + + if (response.Payload[this.PamStatusIX] != 0 && this.EncryptionKeyII != null) + { + response.Payload = payload.DecryptResponse(this.EncryptionKeyII); + + if (response.Payload[this.PamStatusIX] == 0) + { + var oldEncryptionKey = this.EncryptionKeyI; + this.EncryptionKeyI = this.EncryptionKeyII; + this.EncryptionKeyII = oldEncryptionKey; + } + } } private void SetP811(Action p811Setter) diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs index 47ee65af..8b855856 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs @@ -139,12 +139,15 @@ { 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 < 5) { if (this.sirtHub.Start(task)) { this.history.Push(task); task.Wait(); + next++; } else { @@ -196,6 +199,11 @@ break; } + + if (next >= 5) + { + break; + } } if (stopProgramming) @@ -275,6 +283,7 @@ .Append(new ChangeNumberOfLatWindows(this.parameters.LatWindowsInitialization)) .Append(new ChangeTransmissionInterval(this.parameters.TransmissionIntervalInitialization)) .Append(new ProvidePin(AuthLevel.II)), + Timeout = 10_000 }); this.runningTasks.Enqueue(new EregisterCheckInitializationTask(this.parameters, frequency) diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterTask.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterTask.cs index ecfc9491..c24cb353 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterTask.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterTask.cs @@ -46,10 +46,6 @@ } } - public bool ChangeRadioAddress { get; set; } - - public bool ChangeEncryptionKey { get; set; } - public string RSSI { get; private set; } public P11 P11 { get; private set; } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Models/EregisterProgrammingParameters.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Models/EregisterProgrammingParameters.cs index 56fa974e..000f56e3 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Models/EregisterProgrammingParameters.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Models/EregisterProgrammingParameters.cs @@ -270,7 +270,6 @@ // return features; //} - ///////////////////////////////////////////////////// features.Debug = new EregisterDebugFeatures(); features.ChangeMeterReading = this.DisplayVolume; diff --git a/Common/Ui/Common.UI/App.config b/Common/Ui/Common.UI/App.config index 27cd2dde..6cf404ce 100644 --- a/Common/Ui/Common.UI/App.config +++ b/Common/Ui/Common.UI/App.config @@ -7,7 +7,7 @@ - + diff --git a/Common/Ui/Common.UI/Models/AuftragDbContext.cs b/Common/Ui/Common.UI/Models/AuftragDbContext.cs index fc80c860..5decde20 100644 --- a/Common/Ui/Common.UI/Models/AuftragDbContext.cs +++ b/Common/Ui/Common.UI/Models/AuftragDbContext.cs @@ -36,7 +36,7 @@ , 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) + -- , TempAdresse = ISNULL(@{nameof(state.TempAdresse)}, er.TempAdresse) FROM eRegister AS er JOIN AuftragPositionSerienNr AS aps ON er.Seriennummer = aps.SerienNr @@ -101,6 +101,7 @@ SELECT CAST((SELECT DISTINCT * FROM VieweRegisterProgrammingParameters WHERE SharedId = @{nameof(sharedId)} + AND SerienNr IN (SELECT Serialno FROM eRegister_Shared WHERE P2000_Shared_Id = @{nameof(sharedId)} AND Completed = 0) -- AND Completed = @{nameof(completed)} -- AND SlotNr > 0 FOR XML PATH('{nameof(EregisterProgrammingParameters)}') diff --git a/Common/Ui/Common.UI/Models/SQLiteKeyStore.cs b/Common/Ui/Common.UI/Models/SQLiteKeyStore.cs index dc57ee91..6c6dc0c3 100644 --- a/Common/Ui/Common.UI/Models/SQLiteKeyStore.cs +++ b/Common/Ui/Common.UI/Models/SQLiteKeyStore.cs @@ -25,6 +25,18 @@ public bool TryGetKey(uint address1, uint address2, out string encryptionKey) { + //var existing = this.connection + // .Table() + // .Where(x => x.Address == 4291535650) + // .FirstOrDefault(); + + //if (existing != null) + //{ + // existing.EncryptionKey = "5DD3EF5233B4DAA6836721F2866182DA"; + + // this.connection.Update(existing); + //} + encryptionKey = this.connection .Table() .FirstOrDefault(x => x.Address == address1 || x.Address == address2) From 7f3dd958eb3de374fc84be29fc57a8447cfab8a4 Mon Sep 17 00:00:00 2001 From: Roland Drabesch Date: Tue, 27 Jan 2026 12:21:20 +0100 Subject: [PATCH 07/15] Picking Model with inventory check --- .../ServiceUrlsBackUp_New.cs | 5 + .../Model/PickingModel.cs | 32 ++++++ .../CordonelPreadjustmentUi.csproj | 5 +- .../Parameters/FlushParams.cs | 3 +- Common/LaaPackages | 2 +- .../OrderData/OrderProgrammingParameters.cs | 107 +++++++++--------- .../MeterProcessState.csproj.user | 2 +- 7 files changed, 100 insertions(+), 56 deletions(-) diff --git a/Common/CommonCore.Configuration/ServiceUrlsBackUp_New.cs b/Common/CommonCore.Configuration/ServiceUrlsBackUp_New.cs index 8b16549e..3ca26f06 100644 --- a/Common/CommonCore.Configuration/ServiceUrlsBackUp_New.cs +++ b/Common/CommonCore.Configuration/ServiceUrlsBackUp_New.cs @@ -198,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="; + + /// /// usage: string.Format(CordonelPressureSensorTestURL_GetTestResults, pcbId); /// diff --git a/Common/CordonelAssemblyLine/Model/PickingModel.cs b/Common/CordonelAssemblyLine/Model/PickingModel.cs index 57933253..7db16b4f 100644 --- a/Common/CordonelAssemblyLine/Model/PickingModel.cs +++ b/Common/CordonelAssemblyLine/Model/PickingModel.cs @@ -554,6 +554,16 @@ namespace CordonelAssemblyLine.Model } + + public class PickingInfo + { + public string Error { get; set; } + + public string Warning { get; set; } + + public string Info { get; set; } + } + public Boolean Compare(Dictionary checkAppsIdVersion, UInt32 frequency, UInt32 meterSize, Boolean pressurePresent) { using (var batch = new MeterBatch()) @@ -566,6 +576,8 @@ namespace CordonelAssemblyLine.Model if (meter.Login()) { + + meter.SetProcessState(DisplayCodes.PickingStarted); var ret = RunCheck(checkAppsIdVersion, frequency, meterSize, pressurePresent, meter); lblS08Color = _progressWaiting; @@ -1134,6 +1146,8 @@ namespace CordonelAssemblyLine.Model // _pcbId = "221520009"; _pcbId = tryMeter.GetPcbId(); + + var hasDetect = !string.IsNullOrEmpty(_pcbId); if (hasDetect) @@ -1141,6 +1155,24 @@ namespace CordonelAssemblyLine.Model SetState($"Pcb gefunden {_pcbId}"); Log($"New PcbID detected {_pcbId}"); + + var retWanring = LocalWebRequest.GetRequest(ServiceUrls.PickingURL_GetPcbInfoPicking + _pcbId, 4000); + var PickingINfo = JsonConvert.DeserializeObject(retWanring); + if (!String.IsNullOrEmpty(PickingINfo.Error)) + { + lblS08Text = PickingINfo.Error; + lblS08Color = _progressError; + MessageBox.Show(PickingINfo.Error); + _state = PickingStateMachine.MeterError; + } + + if (!String.IsNullOrEmpty(PickingINfo.Warning)) + { + SetState(PickingINfo.Warning); + } + + + try { for (var i = 0; i < 3; i++) diff --git a/Common/CordonelPreadjustmentUi/CordonelPreadjustmentUi.csproj b/Common/CordonelPreadjustmentUi/CordonelPreadjustmentUi.csproj index d1c6afd6..0156ad34 100644 --- a/Common/CordonelPreadjustmentUi/CordonelPreadjustmentUi.csproj +++ b/Common/CordonelPreadjustmentUi/CordonelPreadjustmentUi.csproj @@ -5,7 +5,7 @@ Debug AnyCPU {D0C8D887-ED52-40AB-A069-90BCE0E801E2} - Library + WinExe Properties Xylem.Common.Ui.CordonelPreadjustmentUi Xylem.Common.Ui.CordonelPreadjustmentUi @@ -149,6 +149,9 @@ prompt MinimumRecommendedRules.ruleset + + true + ..\packages\Newtonsoft.Json.13.0.3\lib\net40\Newtonsoft.Json.dll diff --git a/Common/CordonelPreadjustmentUi/Parameters/FlushParams.cs b/Common/CordonelPreadjustmentUi/Parameters/FlushParams.cs index 8f8a1ae1..d902cc61 100644 --- a/Common/CordonelPreadjustmentUi/Parameters/FlushParams.cs +++ b/Common/CordonelPreadjustmentUi/Parameters/FlushParams.cs @@ -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; diff --git a/Common/LaaPackages b/Common/LaaPackages index a9ef9051..df99a430 160000 --- a/Common/LaaPackages +++ b/Common/LaaPackages @@ -1 +1 @@ -Subproject commit a9ef9051cabb74806a4ce0293794cf95756883e6 +Subproject commit df99a43005ea24a5ebc95ee451cf3f67cc8ad94d diff --git a/Common/Logic/ProductionOrderCore/OrderData/OrderProgrammingParameters.cs b/Common/Logic/ProductionOrderCore/OrderData/OrderProgrammingParameters.cs index f2c2485e..52d9e1be 100644 --- a/Common/Logic/ProductionOrderCore/OrderData/OrderProgrammingParameters.cs +++ b/Common/Logic/ProductionOrderCore/OrderData/OrderProgrammingParameters.cs @@ -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(); - 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(); + 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) diff --git a/Common/Service/MeterProcessState/MeterProcessState.csproj.user b/Common/Service/MeterProcessState/MeterProcessState.csproj.user index d31c59d6..9b1bfe9a 100644 --- a/Common/Service/MeterProcessState/MeterProcessState.csproj.user +++ b/Common/Service/MeterProcessState/MeterProcessState.csproj.user @@ -2,7 +2,7 @@ Debug|Any CPU - E:\REPO\lab\la_operations\laa_production\Common\Service\MeterProcessState\Properties\PublishProfiles\IISProfile.pubxml + E:\REPO\lab\la_operations\laa_production\Common\Service\MeterProcessState\Properties\PublishProfiles\a.pubxml true From f2109e577d79c2af282d33592273afecb745cfed Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Wed, 4 Feb 2026 15:09:53 +0100 Subject: [PATCH 08/15] change enc key --- Common/CommonConsole/CommonConsole.csproj | 5 +- Common/CommonConsole/PAM03.cs | 201 ------------------ Common/CommonConsole/Program.cs | 80 +++---- .../Parameters/PAMStatus.cs | 7 +- .../Common.Hardware.SIRT/SIRTExtensions.cs | 5 + .../Hardware/Common.Hardware.SIRT/SIRTHub.cs | 17 -- .../Common.Hardware.SIRT/SIRTMessage.cs | 26 ++- .../Tasks/WritePamTask.cs | 65 ++++-- .../Eregister.cs | 71 +++---- .../EregisterBatch.cs | 2 +- .../EregisterChangeMeterTypeTask.cs | 4 +- .../EregisterExtensions.cs | 120 +++++------ .../Ui/Common.UI/Infrastructure/VMLocator.cs | 2 +- .../Ui/Common.UI/Models/AuftragDbContext.cs | 15 +- Common/Ui/Common.UI/ViewModels/HomeVM.cs | 3 - 15 files changed, 205 insertions(+), 418 deletions(-) delete mode 100644 Common/CommonConsole/PAM03.cs diff --git a/Common/CommonConsole/CommonConsole.csproj b/Common/CommonConsole/CommonConsole.csproj index 2d2e99d3..37154e77 100644 --- a/Common/CommonConsole/CommonConsole.csproj +++ b/Common/CommonConsole/CommonConsole.csproj @@ -44,7 +44,6 @@ - @@ -55,6 +54,10 @@ {4e8bb839-d40a-488c-88ce-f21811f1f476} Common.Hardware.WaterMeter.eRegister + + {F90B940C-9A83-496D-AAE0-11CD02CE0A22} + LaaPackages.SqlClient + \ No newline at end of file diff --git a/Common/CommonConsole/PAM03.cs b/Common/CommonConsole/PAM03.cs deleted file mode 100644 index f97b84e9..00000000 --- a/Common/CommonConsole/PAM03.cs +++ /dev/null @@ -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) - { - /// - /// Process.ExitCode: - /// 0 - OK - /// 1 - Execution Error - /// 2 - Connection Error - /// 3 - Invalid Arguments - /// - 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, - EncryptionKeyI = 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); - } - } - } - } -} diff --git a/Common/CommonConsole/Program.cs b/Common/CommonConsole/Program.cs index 95edf21b..4c06270c 100644 --- a/Common/CommonConsole/Program.cs +++ b/Common/CommonConsole/Program.cs @@ -1,68 +1,36 @@ namespace CommonConsole { - using Common.Hardware.SIRT; - using Common.Hardware.SIRT.Tasks; - using Common.Hardware.WaterMeter.eRegister.Features; - using System; - using System.Collections.Generic; - - // { 4291923131, "6182ACF7E60266965951BBFB160C1707" }, - // { 4291922821, "B9CC9CCD2CDCB285100B44995497071E" }, - // { 4291868627, "4BC9FEBE927ADA57AE9EE699BBBAC4DC" }, - // { 4291134308, "B9CC9CCD2CDCB285100B44995497071E" }, - - public static class Program + public static partial class Program { - static int frequency = 868; - static int timeout = 15_000; - static string defaultEncryptionKey = "E6C88800DEB868C0D6A84880CE982840"; - static Dictionary testAddresses868 = new Dictionary + static void Main() { - { 4291808024, "4BC9FEBE927ADA57AE9EE699BBBAC4DC" }, - { 4291759578, "4BC9FEBE927ADA57AE9EE699BBBAC4DC" }, - { 4291709169, "4BC9FEBE927ADA57AE9EE699BBBAC4DC" }, - { 4291657730, "B9CC9CCD2CDCB285100B44995497071E" }, - { 4291535650, "5DD3EF5233B4DAA6836721F2866182DA" }, - { 4291377834, "E6C88800DEB868C0D6A84880CE982840" }, - { 4291377829, "E6C88800DEB868C0D6A84880CE982840" }, - { 4291094212, "B9CC9CCD2CDCB285100B44995497071E" }, - }; - static void Main_ER() - { - var sirt868 = new SIRTBroadcaster("COM7"); - SIRTLogger.Message += Console.WriteLine; - sirt868.Open(); - - var CSD_38102_BU_Key = "5DD3EF5233B4DAA6836721F2866182DA"; - var task = new WritePamTask - { - Timeout = timeout, - DelPamSemi = true, - WakeUpCmd = true, - WakeUpModul = true, - RequireLAT = true, - RequireDEBUG = true, - Frequency = frequency, - RequestAddress = 4291535650, - ResponseAddress = 4291535650, - EncryptionKeyI = CSD_38102_BU_Key.GetEncryptionKey(), - Data = new OpticalTelegram(1).Append(new ProvidePin(AuthLevel.III)) - }; - - for (var i = 0; i < 3 || task.State == SIRTTaskState.Completed || task.State == SIRTTaskState.Cancelled; i++) - { - sirt868.Start(task); - task.Wait(); - } - - Console.ReadKey(); - sirt868.Close(); } - static void Main() + + + + + + + + + + + + + + + + + + + + + + static void Main_ProgrammingParameters_Cordonel() { var alarmMask = 0 << AlarmMask.ALARM_REBOOT | 1 << AlarmMask.ALARM_LOW_BATTERY diff --git a/Common/Hardware/Common.Hardware.SIRT/Parameters/PAMStatus.cs b/Common/Hardware/Common.Hardware.SIRT/Parameters/PAMStatus.cs index 7afeecea..79bf2298 100644 --- a/Common/Hardware/Common.Hardware.SIRT/Parameters/PAMStatus.cs +++ b/Common/Hardware/Common.Hardware.SIRT/Parameters/PAMStatus.cs @@ -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) diff --git a/Common/Hardware/Common.Hardware.SIRT/SIRTExtensions.cs b/Common/Hardware/Common.Hardware.SIRT/SIRTExtensions.cs index 996bf806..9a81998c 100644 --- a/Common/Hardware/Common.Hardware.SIRT/SIRTExtensions.cs +++ b/Common/Hardware/Common.Hardware.SIRT/SIRTExtensions.cs @@ -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; diff --git a/Common/Hardware/Common.Hardware.SIRT/SIRTHub.cs b/Common/Hardware/Common.Hardware.SIRT/SIRTHub.cs index 37dada32..bd191b39 100644 --- a/Common/Hardware/Common.Hardware.SIRT/SIRTHub.cs +++ b/Common/Hardware/Common.Hardware.SIRT/SIRTHub.cs @@ -138,23 +138,6 @@ return broadcaster.IsOpen; } - public static void OnMessageReceived(Action 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}"); } diff --git a/Common/Hardware/Common.Hardware.SIRT/SIRTMessage.cs b/Common/Hardware/Common.Hardware.SIRT/SIRTMessage.cs index 7c164f02..cead4f1c 100644 --- a/Common/Hardware/Common.Hardware.SIRT/SIRTMessage.cs +++ b/Common/Hardware/Common.Hardware.SIRT/SIRTMessage.cs @@ -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(); + } + + 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; diff --git a/Common/Hardware/Common.Hardware.SIRT/Tasks/WritePamTask.cs b/Common/Hardware/Common.Hardware.SIRT/Tasks/WritePamTask.cs index 2d4cf063..37e8d0d5 100644 --- a/Common/Hardware/Common.Hardware.SIRT/Tasks/WritePamTask.cs +++ b/Common/Hardware/Common.Hardware.SIRT/Tasks/WritePamTask.cs @@ -180,6 +180,8 @@ { this.latReceived = false; this.debugReceived = false; + + var payload = this.EncryptRequest(); var message = new SIRTMessage { Direction = this.request.Direction, @@ -187,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, }; @@ -259,14 +261,24 @@ return false; } - var payloadLength = payload.Length; + var length = payload.Length; - if (payloadLength == 0 || payloadLength == this.DebugLength || payloadLength == this.SemiLength) + 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; } @@ -292,20 +304,41 @@ private void DecriptResponse(SIRTMessage response) { - var payload = new byte[response.Length]; - Array.Copy(response.Payload, 0, payload, 0, payload.Length); + var payloadLength = response.Length; - response.Payload = payload.DecryptResponse(this.EncryptionKeyI); - - if (response.Payload[this.PamStatusIX] != 0 && this.EncryptionKeyII != null) + if (payloadLength <= 0) { - response.Payload = payload.DecryptResponse(this.EncryptionKeyII); + return; + } + + var payload = new byte[payloadLength]; + Array.Copy(response.Payload, 0, payload, 0, payloadLength); - if (response.Payload[this.PamStatusIX] == 0) + if (this.IsEncrypted) + { + response.Payload = payload.DecryptResponse(this.EncryptionKeyI); + + // Check if SEMI received + if (payloadLength > this.SemiLength) { - var oldEncryptionKey = this.EncryptionKeyI; - this.EncryptionKeyI = this.EncryptionKeyII; - this.EncryptionKeyII = oldEncryptionKey; + 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; + } + } } } } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs index 8b855856..7e44ee7a 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs @@ -16,6 +16,8 @@ public class Eregister { + const string SENSUS_STANDARD = "E6C88800DEB868C0D6A84880CE982840"; + private readonly ConcurrentQueue runningTasks; private readonly EregisterProgrammingParameters parameters; private readonly EregisterHistory history; @@ -68,6 +70,7 @@ RequestAddress = features.RequestAddress, ResponseAddress = features.ResponseAddress, EncryptionKeyI = features.EncryptionKey, + EncryptionKeyII = SENSUS_STANDARD.GetEncryptionKey(), Name = "Change Meter Type" }); } @@ -96,6 +99,7 @@ RequestAddress = features.RequestAddress, ResponseAddress = features.ResponseAddress, EncryptionKeyI = features.EncryptionKey, + EncryptionKeyII = SENSUS_STANDARD.GetEncryptionKey(), }); this.runningTasks.Enqueue(new EregisterTask(this.parameters.Frequency) @@ -107,6 +111,7 @@ RequestAddress = features.RequestAddress, ResponseAddress = features.ResponseAddress, 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)) @@ -127,15 +132,13 @@ this.history.SerienNr = this.parameters.SerienNr; this.history.Adresse = this.parameters.Adresse; this.history.TempAdresse = this.parameters.TempAdresse; - - var stopProgramming = false; + 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 && this.runningTasks.TryDequeue(out var task)) { task.MessageReceived += this.history.Push; @@ -163,52 +166,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; - } - } - else if (task.State == SIRTTaskState.Cancelled) - { - stopProgramming = true; - - break; + this.state.SemiDebugDatum = DateTime.Now; } - if (next >= 5) + if (task.RequestAddress == this.parameters.Adresse) { - break; + this.state.FunkadresseDatum = DateTime.Now; } - } - if (stopProgramming) - { - return; + if (factoryState == FactoryState.Shipment) + { + this.state.GeschlossenDatum = DateTime.Now; + } } this.state.ShouldUpdate = true; @@ -219,13 +202,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) @@ -249,6 +225,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) { @@ -279,6 +257,7 @@ RequestAddress = features.RequestAddress, ResponseAddress = features.ResponseAddress, EncryptionKeyI = features.EncryptionKey, + EncryptionKeyII = SENSUS_STANDARD.GetEncryptionKey(), Data = new ChangeWakeUp(WakeUpMode.StayAwake) .Append(new ChangeNumberOfLatWindows(this.parameters.LatWindowsInitialization)) .Append(new ChangeTransmissionInterval(this.parameters.TransmissionIntervalInitialization)) @@ -294,6 +273,7 @@ RequestAddress = features.RequestAddress, ResponseAddress = features.ResponseAddress, EncryptionKeyI = features.EncryptionKey, + EncryptionKeyII = SENSUS_STANDARD.GetEncryptionKey(), }); foreach (var pam in features.BuildPams()) @@ -306,6 +286,7 @@ RequestAddress = features.RequestAddress, ResponseAddress = features.ResponseAddress, EncryptionKeyI = features.EncryptionKey, + EncryptionKeyII = SENSUS_STANDARD.GetEncryptionKey(), Data = pam.Value, Name = pam.Key }); diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterBatch.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterBatch.cs index 5b7c4cdc..97973208 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterBatch.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterBatch.cs @@ -53,7 +53,7 @@ Parallel.For(0, 5, _ => { - while (!cancellationToken.IsCancellationRequested && eregisters.TryDequeue(out var eregister)) + while (eregisters.TryDequeue(out var eregister)) { eregister.StartProgramming(cancellationToken); } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterChangeMeterTypeTask.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterChangeMeterTypeTask.cs index 18f38034..10effa3c 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterChangeMeterTypeTask.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterChangeMeterTypeTask.cs @@ -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"; } } diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterExtensions.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterExtensions.cs index 3b9f590f..334eb131 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterExtensions.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/EregisterExtensions.cs @@ -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; + //} } } \ No newline at end of file diff --git a/Common/Ui/Common.UI/Infrastructure/VMLocator.cs b/Common/Ui/Common.UI/Infrastructure/VMLocator.cs index 229fe6fe..d2fc09b1 100644 --- a/Common/Ui/Common.UI/Infrastructure/VMLocator.cs +++ b/Common/Ui/Common.UI/Infrastructure/VMLocator.cs @@ -4,7 +4,7 @@ public class VMLocator { - public SIRTBroadcastersVM SIRTBroadcasterVM { get; } = new SIRTBroadcastersVM(); + public SIRTBroadcastersVM SIRTBroadcasterVM => new SIRTBroadcastersVM(); public EregisterHistoryVM EregisterHistoryVM { get; } = new EregisterHistoryVM(); diff --git a/Common/Ui/Common.UI/Models/AuftragDbContext.cs b/Common/Ui/Common.UI/Models/AuftragDbContext.cs index 5decde20..2c773076 100644 --- a/Common/Ui/Common.UI/Models/AuftragDbContext.cs +++ b/Common/Ui/Common.UI/Models/AuftragDbContext.cs @@ -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(); } @@ -101,14 +99,9 @@ SELECT CAST((SELECT DISTINCT * FROM VieweRegisterProgrammingParameters WHERE SharedId = @{nameof(sharedId)} - AND SerienNr IN (SELECT Serialno FROM eRegister_Shared WHERE P2000_Shared_Id = @{nameof(sharedId)} AND Completed = 0) - -- 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(0)); var xmlDeserialized = default(object); diff --git a/Common/Ui/Common.UI/ViewModels/HomeVM.cs b/Common/Ui/Common.UI/ViewModels/HomeVM.cs index ae0679d7..1238716b 100644 --- a/Common/Ui/Common.UI/ViewModels/HomeVM.cs +++ b/Common/Ui/Common.UI/ViewModels/HomeVM.cs @@ -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(); this.Addresses868 = new ObservableCollection(); @@ -40,8 +39,6 @@ this.InvokeTaskAsync(() => { this.timer.Start(); - //this.sirtHub.Open("COM6"); - //this.sirtHub.Open("COM8"); }); } From 2abd383fcda8a297da3f0b0031acec70e3c5f75b Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Thu, 5 Feb 2026 08:50:14 +0100 Subject: [PATCH 09/15] eregister tasks execution --- .../Eregister.cs | 27 ++++++------- .../Ui/Common.UI/Models/AuftragDbContext.cs | 39 +------------------ 2 files changed, 13 insertions(+), 53 deletions(-) diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs index 7e44ee7a..0e3dee19 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs @@ -18,7 +18,7 @@ { const string SENSUS_STANDARD = "E6C88800DEB868C0D6A84880CE982840"; - private readonly ConcurrentQueue runningTasks; + private readonly ICollection runningTasks; private readonly EregisterProgrammingParameters parameters; private readonly EregisterHistory history; private readonly EregisterState state; @@ -36,14 +36,10 @@ this.sirtHub = sirtHub; this.state = new EregisterState(); this.history = new EregisterHistory(); - this.runningTasks = new ConcurrentQueue(); + this.runningTasks = new List(); } - public void Clear() - { - // Just clear the queue - while (this.runningTasks.TryDequeue(out var _)) ; - } + public void Clear() => this.runningTasks.Clear(); internal IEnumerable LoadInspectionInitializationTasks() { @@ -62,7 +58,7 @@ if (this.runningTasks.Any()) { - this.runningTasks.Enqueue(new EregisterChangeMeterTypeTask(features.Frequency) + this.runningTasks.Add(new EregisterChangeMeterTypeTask(features.Frequency) { SlotNr = features.SlotNr, PoNr = features.PoNr, @@ -90,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, @@ -102,7 +98,7 @@ 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, @@ -132,13 +128,14 @@ this.history.SerienNr = this.parameters.SerienNr; this.history.Adresse = this.parameters.Adresse; this.history.TempAdresse = this.parameters.TempAdresse; - + + var tasks = new ConcurrentQueue(this.runningTasks); var factoryState = FactoryState.Production; var lat = default(LAT); var debug = default(DEBUG); var semi = default(SEMI); - while (!cancellationToken.IsCancellationRequested && this.runningTasks.TryDequeue(out var task)) + while (!cancellationToken.IsCancellationRequested && tasks.TryDequeue(out var task)) { task.MessageReceived += this.history.Push; @@ -246,7 +243,7 @@ var frequency = this.parameters.Frequency; - this.runningTasks.Enqueue(new EregisterTask(frequency) + this.runningTasks.Add(new EregisterTask(frequency) { Name = "WUP", WakeUpCmd = true, @@ -265,7 +262,7 @@ 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, @@ -278,7 +275,7 @@ foreach (var pam in features.BuildPams()) { - this.runningTasks.Enqueue(new EregisterTask(frequency) + this.runningTasks.Add(new EregisterTask(frequency) { SlotNr = features.SlotNr, PoNr = features.PoNr, diff --git a/Common/Ui/Common.UI/Models/AuftragDbContext.cs b/Common/Ui/Common.UI/Models/AuftragDbContext.cs index 2c773076..bcbedbfb 100644 --- a/Common/Ui/Common.UI/Models/AuftragDbContext.cs +++ b/Common/Ui/Common.UI/Models/AuftragDbContext.cs @@ -80,7 +80,7 @@ } } - internal class Eregister_Shared + internal class eRegister_Shared { internal static List LoadActions(int sharedId) => sqlConnection.LoadActions(sharedId); @@ -122,42 +122,5 @@ 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(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(); - } } } From a1fed4856bdbfa108ff73174dd693f49fcb3ba11 Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Thu, 5 Feb 2026 11:49:23 +0100 Subject: [PATCH 10/15] * 0.5 - Drained battery usage for assembly line, publish in auftrag folder --- Common/CordonelAssemblyLine/App.xaml.cs | 12 ++--- .../CordonelAssemblyLine.csproj | 29 +++++++---- Common/CordonelAssemblyLine/MainWindow.xaml | 16 ++++++- .../CordonelAssemblyLine/MainWindow.xaml.cs | 7 +++ .../Model/PickingModel.cs | 45 ++++++++---------- .../Properties/Resources.Designer.cs | 6 +-- .../Properties/Resources.resx | 13 +++-- .../CordonelAssemblyLine/Resources/sensus.png | Bin 0 -> 233 bytes Common/CordonelAssemblyLine/sensus.ico | Bin 0 -> 4286 bytes 9 files changed, 77 insertions(+), 51 deletions(-) create mode 100644 Common/CordonelAssemblyLine/Resources/sensus.png create mode 100644 Common/CordonelAssemblyLine/sensus.ico diff --git a/Common/CordonelAssemblyLine/App.xaml.cs b/Common/CordonelAssemblyLine/App.xaml.cs index 9a251da4..627d1c33 100644 --- a/Common/CordonelAssemblyLine/App.xaml.cs +++ b/Common/CordonelAssemblyLine/App.xaml.cs @@ -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; + /// /// Interaction logic for App.xaml /// diff --git a/Common/CordonelAssemblyLine/CordonelAssemblyLine.csproj b/Common/CordonelAssemblyLine/CordonelAssemblyLine.csproj index 04c79b28..49b0f092 100644 --- a/Common/CordonelAssemblyLine/CordonelAssemblyLine.csproj +++ b/Common/CordonelAssemblyLine/CordonelAssemblyLine.csproj @@ -14,10 +14,11 @@ 4 true true - true - \\SLA12IIS01\LaaProductionWeb\Apps\CordonelAssembly\ + false + + Z:\Aktuelle Anwendungen\Publish\Cordonel Assembly Line\ true - Web + Unc true Foreground 7 @@ -25,19 +26,17 @@ false false true - http://sla12iis01.emea.sensus.net/LaaProductionWeb/Apps/CordonelAssembly/ + \\sla12file\auftrag\Aktuelle Anwendungen\Publish\Cordonel Assembly Line\ Cordonel Assembly Line Xylem Sensus Laatzen Cordonel Assembly Line - true publish.htm - 8 + 13 1.0.0.%2a false true true true - AnyCPU @@ -81,7 +80,7 @@ true - 305BF210A6BBE3C987AD135C96F7B55EC538E555 + 254AA244F3F29F0692A7B2FAA31F24C884355262 CordonelAssemblyLine_TemporaryKey.pfx @@ -118,6 +117,11 @@ MinimumRecommendedRules.ruleset true + + sensus.ico + + + ..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll @@ -128,6 +132,7 @@ + @@ -204,7 +209,7 @@ True - ResXFileCodeGenerator + PublicResXFileCodeGenerator Resources.Designer.cs @@ -295,6 +300,12 @@ false + + + + + + del /Q /S *.xml *.pdb diff --git a/Common/CordonelAssemblyLine/MainWindow.xaml b/Common/CordonelAssemblyLine/MainWindow.xaml index 39f5e09d..03b71f77 100644 --- a/Common/CordonelAssemblyLine/MainWindow.xaml +++ b/Common/CordonelAssemblyLine/MainWindow.xaml @@ -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"> + @@ -114,5 +118,15 @@ [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. /// [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; } diff --git a/Common/CordonelAssemblyLine/Properties/Resources.resx b/Common/CordonelAssemblyLine/Properties/Resources.resx index af7dbebb..1af7de15 100644 --- a/Common/CordonelAssemblyLine/Properties/Resources.resx +++ b/Common/CordonelAssemblyLine/Properties/Resources.resx @@ -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. --> + @@ -68,9 +69,10 @@ - + + @@ -85,9 +87,10 @@ - + + @@ -109,9 +112,9 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 \ No newline at end of file diff --git a/Common/CordonelAssemblyLine/Resources/sensus.png b/Common/CordonelAssemblyLine/Resources/sensus.png new file mode 100644 index 0000000000000000000000000000000000000000..3e9d6ed41b4901ee2e3811ef6e85df0978acf1d2 GIT binary patch literal 233 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1SD@H!x2AA6$+S6}hN-9%vmdKI;Vst04O9%8~^|S literal 0 HcmV?d00001 diff --git a/Common/CordonelAssemblyLine/sensus.ico b/Common/CordonelAssemblyLine/sensus.ico new file mode 100644 index 0000000000000000000000000000000000000000..fd3c4f71106dcf2041f3b72584a20df4e3b59266 GIT binary patch literal 4286 zcmeH|I|{-;6h+@?Cnz>rr*sK|jfGffVJ}#@0}FqkSXir|EaI eL#GcufBrmt!;f0wM+PR{nz1f#>*m{@bngqf+0uOg literal 0 HcmV?d00001 From dc78e7954e09ff36b477e75786736091f3bbdedc Mon Sep 17 00:00:00 2001 From: Stoyan Zlatev Date: Fri, 6 Feb 2026 11:45:31 +0100 Subject: [PATCH 11/15] laapackages update --- Common/Common.sln | 233 ++++++------------ .../CordonelAssemblyLine.csproj | 2 +- .../Model/PickingModel.cs | 2 +- .../Eregister.cs | 15 +- Common/LaaPackages | 2 +- .../Ui/Common.UI/Models/Eregister_Shared.cs | 3 +- LaaProductionWeb/LaaPackages | 2 +- 7 files changed, 91 insertions(+), 168 deletions(-) diff --git a/Common/Common.sln b/Common/Common.sln index cfd1744d..c3ba97fe 100644 --- a/Common/Common.sln +++ b/Common/Common.sln @@ -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 diff --git a/Common/CordonelAssemblyLine/CordonelAssemblyLine.csproj b/Common/CordonelAssemblyLine/CordonelAssemblyLine.csproj index 49b0f092..c4609387 100644 --- a/Common/CordonelAssemblyLine/CordonelAssemblyLine.csproj +++ b/Common/CordonelAssemblyLine/CordonelAssemblyLine.csproj @@ -31,7 +31,7 @@ Xylem Sensus Laatzen Cordonel Assembly Line publish.htm - 13 + 14 1.0.0.%2a false true diff --git a/Common/CordonelAssemblyLine/Model/PickingModel.cs b/Common/CordonelAssemblyLine/Model/PickingModel.cs index 6ccf7667..c47d05a0 100644 --- a/Common/CordonelAssemblyLine/Model/PickingModel.cs +++ b/Common/CordonelAssemblyLine/Model/PickingModel.cs @@ -626,7 +626,7 @@ namespace CordonelAssemblyLine.Model if (genesisStatus.AlternativeRequiredBatteryLoadPercent != null && - genesisStatus.AlternativeRequiredBatteryLoadPercent > (requirements.MaxDrainedBatteryLoadPercentAssembly * 0.5)) + genesisStatus.AlternativeRequiredBatteryLoadPercent > requirements.MaxDrainedBatteryLoadPercentAssembly * 0.5) { sbMSG.AppendLine($"{nameof(genesisStatus.AlternativeRequiredBatteryLoadPercent)}: " + $"{genesisStatus.AlternativeRequiredBatteryLoadPercent} > " + $"{requirements.MaxDrainedBatteryLoadPercentAssembly}"); diff --git a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs index 0e3dee19..3e0e75d0 100644 --- a/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs +++ b/Common/Hardware/WaterMeter/eRegister/Common.Hardware.WaterMeter.eRegister/Eregister.cs @@ -45,10 +45,10 @@ { this.executionType = nameof(LoadInspectionInitializationTasks); - if (this.parameters.Completed) - { - return new EregisterTask[] { }; - } + //if (this.parameters.Completed) + //{ + // return new EregisterTask[] { }; + //} var features = this.parameters.LoadInspectionInitializationFeatures(); @@ -141,7 +141,7 @@ var next = 0; - while (task.State != SIRTTaskState.Completed && task.State != SIRTTaskState.Cancelled && !cancellationToken.IsCancellationRequested && next < 5) + while (task.State != SIRTTaskState.Completed && task.State != SIRTTaskState.Cancelled && !cancellationToken.IsCancellationRequested && next < 30) { if (this.sirtHub.Start(task)) { @@ -149,10 +149,6 @@ task.Wait(); next++; } - else - { - continue; - } if (task.ErrorMessage != null) { @@ -258,6 +254,7 @@ 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 }); diff --git a/Common/LaaPackages b/Common/LaaPackages index a9ef9051..653498d4 160000 --- a/Common/LaaPackages +++ b/Common/LaaPackages @@ -1 +1 @@ -Subproject commit a9ef9051cabb74806a4ce0293794cf95756883e6 +Subproject commit 653498d43dcca1234a8fba95959ca02bb2c3f480 diff --git a/Common/Ui/Common.UI/Models/Eregister_Shared.cs b/Common/Ui/Common.UI/Models/Eregister_Shared.cs index 1a46cdb5..04ca86d3 100644 --- a/Common/Ui/Common.UI/Models/Eregister_Shared.cs +++ b/Common/Ui/Common.UI/Models/Eregister_Shared.cs @@ -27,7 +27,8 @@ internal static List LoadActions(this SqlConnection sqlConnection, int sharedId) => sqlConnection .CreateCommand($@" - SELECT Id + SELECT DISTINCT + Id , P2000_Shared_Id , Slotno , Serialno diff --git a/LaaProductionWeb/LaaPackages b/LaaProductionWeb/LaaPackages index a9ef9051..653498d4 160000 --- a/LaaProductionWeb/LaaPackages +++ b/LaaProductionWeb/LaaPackages @@ -1 +1 @@ -Subproject commit a9ef9051cabb74806a4ce0293794cf95756883e6 +Subproject commit 653498d43dcca1234a8fba95959ca02bb2c3f480 From 71f3909c84e761588bc3415d87c34dc0866921f0 Mon Sep 17 00:00:00 2001 From: "roland.drabesch@xyleminc.com" Date: Tue, 10 Feb 2026 09:25:09 +0100 Subject: [PATCH 12/15] cordo plot --- .../.vs/Common/config/applicationhost.config | 8 + Common/CordoPlot/App.xaml | 2 +- Common/CordoPlot/CordoPlot.csproj | 14 + Common/CordoPlot/GridCopy.xaml | 13 + Common/CordoPlot/GridCopy.xaml.cs | 40 +++ Common/CordoPlot/MainWindow.xaml | 109 +++---- Common/CordoPlot/MainWindow.xaml.cs | 230 +++++++++++++- Common/CordoPlot/PlotableTestResults.cs | 286 +++++++++++++++++- Common/CordoPlot/StartDialog.xaml | 32 ++ Common/CordoPlot/StartDialog.xaml.cs | 259 ++++++++++++++++ .../Model/PickingModel.cs | 16 +- .../CordonelPreadjustmentUi.csproj | 6 +- .../Processes/Actions/LoginProcess.cs | 12 +- .../Core/Schema/SecuredApplicationHelpers.cs | 2 +- .../Certificates/CertificateFactory.cs | 2 +- .../Controllers/TestBenchController.cs | 20 +- .../MeterProcessState.csproj.user | 2 +- SPSLogger/UA_Client_1500/UAClientHelperAPI.cs | 2 +- 18 files changed, 951 insertions(+), 104 deletions(-) create mode 100644 Common/CordoPlot/GridCopy.xaml create mode 100644 Common/CordoPlot/GridCopy.xaml.cs create mode 100644 Common/CordoPlot/StartDialog.xaml create mode 100644 Common/CordoPlot/StartDialog.xaml.cs diff --git a/Common/.vs/Common/config/applicationhost.config b/Common/.vs/Common/config/applicationhost.config index 5616ab8b..3f0b69a3 100644 --- a/Common/.vs/Common/config/applicationhost.config +++ b/Common/.vs/Common/config/applicationhost.config @@ -176,6 +176,14 @@ + + + + + + + + diff --git a/Common/CordoPlot/App.xaml b/Common/CordoPlot/App.xaml index 60149e7c..6b991c7c 100644 --- a/Common/CordoPlot/App.xaml +++ b/Common/CordoPlot/App.xaml @@ -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"> diff --git a/Common/CordoPlot/CordoPlot.csproj b/Common/CordoPlot/CordoPlot.csproj index 41b51618..3423efe9 100644 --- a/Common/CordoPlot/CordoPlot.csproj +++ b/Common/CordoPlot/CordoPlot.csproj @@ -116,6 +116,13 @@ MSBuild:Compile Designer + + StartDialog.xaml + + + Designer + MSBuild:Compile + MSBuild:Compile Designer @@ -124,10 +131,17 @@ App.xaml Code + + GridCopy.xaml + MainWindow.xaml Code + + Designer + MSBuild:Compile + diff --git a/Common/CordoPlot/GridCopy.xaml b/Common/CordoPlot/GridCopy.xaml new file mode 100644 index 00000000..6edf3c56 --- /dev/null +++ b/Common/CordoPlot/GridCopy.xaml @@ -0,0 +1,13 @@ + + + + + diff --git a/Common/CordoPlot/GridCopy.xaml.cs b/Common/CordoPlot/GridCopy.xaml.cs new file mode 100644 index 00000000..9c27e6cd --- /dev/null +++ b/Common/CordoPlot/GridCopy.xaml.cs @@ -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 +{ + /// + /// Interaktionslogik für GridCopy.xaml + /// + public partial class GridCopy : Window + { + public GridCopy() + { + InitializeComponent(); + } + + public WpfPlot Chart { get; internal set; } + + public void ShowChart(List lastListOfIndex, List lastListOfValues,string title) + { + WpfPlot1.Plot.Add.Scatter(lastListOfIndex.ToArray(), lastListOfValues.ToArray(), ScottPlot.Colors.Blue); + WpfPlot1.Plot.Title(title); + WpfPlot1.Plot.Axes.AutoScale(); + WpfPlot1.Refresh(); + + + } + } +} diff --git a/Common/CordoPlot/MainWindow.xaml b/Common/CordoPlot/MainWindow.xaml index ca4a9b4a..3d798e67 100644 --- a/Common/CordoPlot/MainWindow.xaml +++ b/Common/CordoPlot/MainWindow.xaml @@ -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"> - - - - + + + + + @@ -24,15 +25,15 @@ - - - - - - + - + + + + + + @@ -42,53 +43,57 @@ - - - - - - - - - - - - + + + - Serialnr - TestRunNr - TestBenchNr - Date - MeterSize - AirTempC - AirPressure - AirHumanity - WaterTempC - TotalMeters - Remark - - - - - - - - - - - - - - + x:Name="dataGridInfo" + Grid.Row="1" + Grid.Column="1" Grid.ColumnSpan="2" ItemsSource="{Binding}"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +