Compare commits

..
Author SHA1 Message Date
michal 19ff06b01e PreAdjustment preparation 2026-06-09 16:23:00 +02:00
michal d73eac8332 Merge branch 'develop/SLM-PT50_genesisDirectDecode' into develop/SLM-PT50_genesisDirectDecode_special 2026-06-08 09:17:46 +02:00
michal 63041c0fc9 Increment assembly version to 3.9.3130.0, replace iPerl_Communication_in_progress with Meter_Communication_in_progress across resources and sequences, and update string resources for improved clarity and consistency. 2026-06-04 14:56:56 +02:00
michal 77c131f414 Increment assembly version to 3.9.3129.0, streamline context menu options in iPerlCommunicationForm, consolidate unused menu items, improve PBC_Read_Build_Async with retry logic for slot and PCB ID operations, and optimize GenesisSmartReader communication and debugging. 2026-06-04 11:00:20 +02:00
michal 4173512ecc Increment assembly version to 3.9.3128.0, enhance thread handling for iPerlCommunicationForm with improved delay logic and UI checks, and replace ReadRegisterAsync with ReadRegisterWithRetryAsync for more robust Genesis register operations. 2026-06-04 08:16:13 +02:00
michal c991d530d5 Increment assembly version to 3.9.3126.0. 2026-06-03 12:46:18 +02:00
michal 2ba0bfe2b1 Enhance PrepareSlotQ3Calibration and WriteSlotQ3Calibration methods with improved logging, refined error handling, and additional debug details for iHead operations. 2026-06-03 12:45:03 +02:00
michal 13490009a3 Increment assembly version to 3.9.3125.3. 2026-06-03 10:43:22 +02:00
michal c6849deaef Improve Q3Channel handling by refining water meter result copying logic, enhancing error handling, and updating calibration factor processing for multi-channel scenarios. 2026-06-03 10:27:45 +02:00
michal 0b7dd2bafa Store Q3Channel to DB
Refine water meter processing logic by adding Q3Channel checks and adjusting removal and test result evaluation conditions.
2026-06-03 09:50:31 +02:00
michal 2d8cc912a3 Increment assembly version to 3.9.3124.3, implement GetEachMeterTestRslt method, enhance error handling in calibration-related methods, refine Q3 calibration data simulation and storage logic, and improve debug logging across Genesis operations. 2026-06-03 09:49:34 +02:00
michal 0b246b2ff5 Merge branch 'develop/SLM-PT50_genesisDirectDecode_special_3121_17969' into develop/SLM-PT50_genesisDirectDecode_special
# Conflicts:
#	TBF/Rig/RegisterReaders/GenesisRegReader/communication/OptoHeadTest.cs
2026-05-29 15:52:16 +02:00
michal 8b025a0fca Increment assembly version to 3.9.3121.3, enhance debug logging in PrepareQ3Calibration and related methods, improve calibration factor handling with multi-value support, add exception handling for simulated DB responses, and refine Q3 calibration logic in GenesisSmartReader. 2026-05-29 15:40:20 +02:00
michal 0f407920ac Update predefined calibration value in PrepareMeterSizeAndCalibration from 15625 to 17969. 2026-05-29 08:51:51 +02:00
michal 347a8798b8 Enhance Q3 calibration logic by refining PrepareSlotQ3Calibration and WriteSlotQ3Calibration methods, improving handling of TestRsltCalibFactor storage across multiple channels, and extending exception handling and debug logging for Genesis operations. 2026-05-28 14:29:02 +02:00
michal 3cd488fc76 Increment assembly version to 3.9.3121.1, add FailedPrepare error constant and handling in iPerlCommunicationForm, enhance PrepareSlotQ3Calibration and WriteSlotQ3Calibration with exception handling and logging, introduce IsCalibFactorValid property and mappings for calibration logic, and extend debug logging across Genesis operations. 2026-05-27 14:00:40 +02:00
michal e88e441875 Refactor preadjustmenActionsViewButton to preadjustmentActionsViewButton, add Q3Channel property to entities and mappings, implement schema migrations for Q3Channel, update GenesisSmartReader Q3Channel logic, replace file paths for clarity, upgrade projects to .NET Framework 4.8, and extend debug logging. 2026-05-25 09:21:32 +02:00
michal 89cfcb75e8 Merge branch 'develop/SLM-PT50_genesisDirectDecode' into develop/SLM-PT50_genesisDirectDecode_special
# Conflicts:
#	GenesisCordonelInterface/UI/LaatzenAPI_CordonelPreadjustmentUI/FrmCordonelPreadjustmentUI.cs
#	TBF/TBF.csproj
2026-05-22 12:58:48 +02:00
michal db90a096e3 Add calibration factor support to Genesis, implement TestRsltCalibFactor entity, related mappings, table creation logic, and data persistence methods. Extend GenesisSmartReader with Q3 calibration enhancements and introduce new debug logging. 2026-05-22 09:18:41 +02:00
michal 6f919ede9b Increment assembly version to 3.9.3104.1, add CheckMeterPrepare functionality and CheckMeterPrepareStr constant in iPerlCommunicationForm, implement error handling and UI safeguarding for communication events, introduce TriggerIdle constant in RadioService, and enhance GenesisSmartReader with CheckMeterPrepare logic and improved debug logging. 2026-05-19 15:21:20 +02:00
michal 44b6060113 Increment assembly version to 3.9.3103.1, add HoldSlotStr constant and HoldOn functionality in iPerlCommunicationForm, implement message box synchronization for multi-threaded operations, enhance slot operation handling with ProcessWaterMetersDialogConfirmation, and improve debug logging and error management in Genesis operations. 2026-05-18 16:23:00 +02:00
michal fde090c437 Increment assembly version to 3.9.3102.1, enhance FlyingStartMassCollectionSeq by removing unused code, improve error handling for flow calculations in FlyingStartSeq, extend GenesisSmartReader integration, and introduce WaterMeterParentCopy method for multi-channel handling in test sequences. 2026-05-15 13:02:09 +02:00
michal 0af975f670 Increment assembly version to 3.9.3101.1, increase thread support to 10 across relevant configurations, extend Genesis communication ranges, enhance debug logging for slot initialization, and update Genesis configuration controls with parallel access parameters. 2026-05-15 10:39:37 +02:00
michal 6d0d2cd34e Increment assembly version to 3.9.3100.1. 2026-05-15 08:02:46 +02:00
michal d9a14ea3e1 Increment assembly version to 3.9.3098.1, add Q3 calibration support in iPerlCommunicationForm, implement PrepareSlotQ3Calibration and WriteSlotQ3Calibration methods in OptoHeadTest, extend GenesisSmartReader with Q3 calibration logic, and update slot operation and test sequence handling to include calibration-related data. 2026-05-15 08:02:28 +02:00
michal 2526e997e3 Increment assembly version to 3.9.3097.1, add SlotGroupedLogin support in iPerlCommunicationForm, implement GroupedLoginSlot method in OptoHeadTest, and update slot operation logic with enhanced error messaging. 2026-05-13 12:57:23 +02:00
michal d346dcfa03 Merge branch 'develop/SLM-PT50_genesisDirectDecode' into develop/SLM-PT50_genesisDirectDecode_special
# Conflicts:
#	GenesisCordonelInterface/API/InterfaceGCIToLaatzen.cs
#	TBF/Rig/BridgeComponents/GciBridge/GciBridge.cs
#	TBF/TBF.csproj
2026-05-13 10:03:46 +02:00
michal 8437952478 Increment assembly version to 3.9.3095.1, expand iPerlCommunicationForm with new slot-related constants and error definitions, implement slot handling methods in OptoHeadTest, introduce PcbReadResult for PCB reading flow, and enhance connection and slot operation logic. 2026-05-13 09:48:41 +02:00
michal 34bf5d5473 Increment assembly version to 3.9.3094.1, extend iPerlCommunicationForm with new context menu options and associated slot handling, introduce bend detection support in Genesis streaming protocol, add data members for radio configuration, and enhance asynchronous operations in JSON handling. 2026-05-12 16:03:28 +02:00
michal 6c4c7e73bb Merge branch 'develop/SLM-PT50_genesisDirectDecode' into develop/SLM-PT50_genesisDirectDecode_special 2026-05-12 14:00:42 +02:00
michal f97c406ae8 Update DLL references for Xylem.Common components across hardware and metrology modules. 2026-05-12 07:51:02 +02:00
michal 9cfadb8075 Merge remote-tracking branch 'private-origin/develop/SLM-PT50_genesisDirectDecode_special' into develop/SLM-PT50_genesisDirectDecode_special 2026-05-12 07:50:18 +02:00
michal 1709ef842d Refactor iPerlCommunication module to integrate GenesisSmartReader, update related logic and methods, optimize asynchronous operations, and increment assembly version to 3.9.3091.1. 2026-05-12 07:50:03 +02:00
michal 8e694dc910 Refactor iPerlCommunication module to integrate GenesisSmartReader, update related logic and methods, optimize asynchronous operations, and increment assembly version to 3.9.3091.1. 2026-05-12 07:49:13 +02:00
michal 0b1e09e0df Merge branch 'develop/SLM-PT50_genesisDirectDecode' into develop/SLM-PT50_genesisDirectDecode_special
# Conflicts:
#	TBF/TBF.csproj
2026-05-11 17:29:13 +02:00
michal 84307f4bf4 Merge branch 'develop/SLM-PT50_genesisDirectDecode' into develop/SLM-PT50_genesisDirectDecode_special 2026-05-08 12:25:23 +02:00
michal 463fb16b23 Remove iPerlCommunication module entirely.
Deleted all related classes, configurations, and implementations for the `iPerlCommunication` module, including `TestMethod`, `TestMethodCfg`, and associated components. This cleanup reflects either a deprecated or unused feature.
2026-05-08 12:24:42 +02:00
michal b4c0384b57 Refactor RadioService for improved asynchronous handling, consolidate unused namespaces, update OptoHeadTest logic, and increment assembly version to 3.9.3085.1. 2026-05-08 10:44:27 +02:00
michal f4b8e42f59 Merge branch 'develop/SLM-PT50_genesisDirectDecode' into develop/SLM-PT50_genesisDirectDecode_special
# Conflicts:
#	TBF/Rig/RegisterReaders/GenesisRegReader/communication/RadioService.cs
2026-05-07 21:37:05 +02:00
michal abee5fa6b1 Update DLL references for Xylem.Common components across multiple modules. 2026-05-07 21:33:41 +02:00
michal b8926ef93f Add unit tests for OptoHeadTest handling simulated Genesis readers, refine project references, and increment assembly version to 3.9.3079.1. 2026-05-07 21:30:19 +02:00
michal 502804c2de Merge remote-tracking branch 'private-origin/develop/SLM-PT50_genesisDirectDecode' into develop/SLM-PT50_genesisDirectDecode 2026-05-06 15:32:41 +02:00
michal 296621a590 * Increment assembly version to 3.9.3069.1
* Logs update
2026-05-06 15:32:33 +02:00
960 changed files with 10651 additions and 293873 deletions
-6
View File
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Root Type="DevExpress.CodeRush.Foundation.CodePlaces.Options.FavoritesListContainer">
<Options Language="Neutral">
<Groups />
</Options>
</Root>
+2 -2
View File
@@ -8,7 +8,7 @@
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<RootNamespace>AppDiagnostic</RootNamespace> <RootNamespace>AppDiagnostic</RootNamespace>
<AssemblyName>AppDiagnostic</AssemblyName> <AssemblyName>AppDiagnostic</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
@@ -102,4 +102,4 @@
<None Include="Resources\TBF_icon.ico" /> <None Include="Resources\TBF_icon.ico" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>
+3 -3
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Common</RootNamespace> <RootNamespace>Common</RootNamespace>
<AssemblyName>Common</AssemblyName> <AssemblyName>Common</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -114,4 +114,4 @@
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
--> -->
</Project> </Project>
+1 -1
View File
@@ -56,7 +56,7 @@ namespace Common.Iperl
public double Flow(double scalingFactor) { return 0.225 * scalingFactor * (double)FlowRaw; } public double Flow(double scalingFactor) { return 0.225 * scalingFactor * (double)FlowRaw; }
public double Volume(double scalingFactor) { return 0.0000625 * scalingFactor * (double)VolumeRawExt; } public double Volume(double scalingFactor) { return 0.0000625 * scalingFactor * (double)VolumeRawExt; }
public Int32 FlipTime() { return Impedance; } public Int32 FlipTime() { return Impedance; }
public decimal TimestampDec() { return (decimal)TimestampExt; } public decimal TimestampDec() { return (decimal)TimestampExt / (decimal)8192; }
public double VolumeDelta(double scalingFactor, OptoTelegramRaw previous) { return (previous == null) ? 0 : Volume(scalingFactor) - previous.Volume(scalingFactor); } public double VolumeDelta(double scalingFactor, OptoTelegramRaw previous) { return (previous == null) ? 0 : Volume(scalingFactor) - previous.Volume(scalingFactor); }
public decimal TimeDelta() { return TimestampDec() - TestStartTimestampDec; } public decimal TimeDelta() { return TimestampDec() - TestStartTimestampDec; }
public string Label() public string Label()
+54 -55
View File
@@ -2,7 +2,6 @@
/// Copyright (c) 2016-2021 Sensus Slovensko a.s. /// Copyright (c) 2016-2021 Sensus Slovensko a.s.
/// ///
using System; using System;
using System.Linq;
namespace Common namespace Common
{ {
@@ -287,97 +286,97 @@ namespace Common
public static bool IsQuantity(Unit unit, Quantity quantity) public static bool IsQuantity(Unit unit, Quantity quantity)
{ {
return GetQuantity(unit).Contains(quantity); return (quantity == GetQuantity(unit));
} }
public static Quantity[] GetQuantity(Unit unit) public static Quantity GetQuantity(Unit unit)
{ {
switch (unit) switch (unit)
{ {
case Unit.pulse: case Unit.pulse:
case Unit.degree: case Unit.degree:
return new[] { Quantity.Pulses }; return Quantity.Pulses;
case Unit.ml: case Unit.ml:
return new[] { Quantity.Volume, Quantity.MultiFunctionalVariables }; return Quantity.Volume;
case Unit.l: case Unit.l:
return new[] { Quantity.Volume, Quantity.MultiFunctionalVariables }; return Quantity.Volume;
case Unit.dm3: case Unit.dm3:
return new[] { Quantity.Volume, Quantity.MultiFunctionalVariables }; return Quantity.Volume;
case Unit.USgal: case Unit.USgal:
return new[] { Quantity.Volume, Quantity.MultiFunctionalVariables }; return Quantity.Volume;
case Unit.UKgal: case Unit.UKgal:
return new[] { Quantity.Volume, Quantity.MultiFunctionalVariables }; return Quantity.Volume;
case Unit.cf: case Unit.cf:
return new[] { Quantity.Volume, Quantity.MultiFunctionalVariables }; return Quantity.Volume;
case Unit.m3: case Unit.m3:
return new[] { Quantity.Volume, Quantity.MultiFunctionalVariables }; return Quantity.Volume;
case Unit.lph: case Unit.lph:
return new[] { Quantity.Flow }; return Quantity.Flow;
case Unit.cfph: case Unit.cfph:
return new[] { Quantity.Flow }; return Quantity.Flow;
case Unit.lpm: case Unit.lpm:
return new[] { Quantity.Flow }; return Quantity.Flow;
case Unit.USgalpm: case Unit.USgalpm:
return new[] { Quantity.Flow }; return Quantity.Flow;
case Unit.m3ph: case Unit.m3ph:
return new[] { Quantity.Flow }; return Quantity.Flow;
case Unit.lps: case Unit.lps:
return new[] { Quantity.Flow }; return Quantity.Flow;
case Unit.USgalps: case Unit.USgalps:
return new[] { Quantity.Flow }; return Quantity.Flow;
case Unit.m3pm: case Unit.m3pm:
return new[] { Quantity.Flow }; return Quantity.Flow;
case Unit.cfs: case Unit.cfs:
return new[] { Quantity.Flow }; return Quantity.Flow;
case Unit.gps: case Unit.gps:
return new[] { Quantity.MassFlow}; return Quantity.MassFlow;
case Unit.gpm: case Unit.gpm:
return new[] { Quantity.MassFlow}; return Quantity.MassFlow;
case Unit.gph: case Unit.gph:
return new[] { Quantity.MassFlow}; return Quantity.MassFlow;
case Unit.kgps: case Unit.kgps:
return new[] { Quantity.MassFlow}; return Quantity.MassFlow;
case Unit.kgpm: case Unit.kgpm:
return new[] { Quantity.MassFlow}; return Quantity.MassFlow;
case Unit.kgph: case Unit.kgph:
return new[] { Quantity.MassFlow}; return Quantity.MassFlow;
case Unit.tps: case Unit.tps:
return new[] { Quantity.MassFlow}; return Quantity.MassFlow;
case Unit.tpm: case Unit.tpm:
return new[] { Quantity.MassFlow}; return Quantity.MassFlow;
case Unit.tph: case Unit.tph:
return new[] { Quantity.MassFlow}; return Quantity.MassFlow;
case Unit.lbps: case Unit.lbps:
return new[] { Quantity.MassFlow}; return Quantity.MassFlow;
case Unit.lbpm: case Unit.lbpm:
return new[] { Quantity.MassFlow}; return Quantity.MassFlow;
case Unit.lbph: case Unit.lbph:
return new[] { Quantity.MassFlow}; return Quantity.MassFlow;
case Unit.g: case Unit.g:
return new[] { Quantity.Mass, Quantity.MultiFunctionalVariables }; return Quantity.Mass;
case Unit.oz: case Unit.oz:
return new[] { Quantity.Mass, Quantity.MultiFunctionalVariables }; return Quantity.Mass;
case Unit.lb: case Unit.lb:
return new[] { Quantity.Mass, Quantity.MultiFunctionalVariables }; return Quantity.Mass;
case Unit.kg: case Unit.kg:
return new[] { Quantity.Mass, Quantity.MultiFunctionalVariables }; return Quantity.Mass;
case Unit.t: case Unit.t:
return new[] { Quantity.Mass, Quantity.MultiFunctionalVariables }; return Quantity.Mass;
case Unit.ms: case Unit.ms:
case Unit.s: case Unit.s:
case Unit.min: case Unit.min:
case Unit.hour: case Unit.hour:
return new[] { Quantity.Time }; return Quantity.Time;
case Unit.C: case Unit.C:
case Unit.F: case Unit.F:
case Unit.K: case Unit.K:
return new[] { Quantity.Temperature }; return Quantity.Temperature;
case Unit.Pa: case Unit.Pa:
case Unit.hPa: case Unit.hPa:
@@ -387,14 +386,14 @@ namespace Common
case Unit.psi: case Unit.psi:
case Unit.bar: case Unit.bar:
case Unit.MPa: case Unit.MPa:
return new[] { Quantity.Pressure }; return Quantity.Pressure;
case Unit.RPct: case Unit.RPct:
return new[] { Quantity.Humidity }; return Quantity.Humidity;
case Unit.Promile: case Unit.Promile:
case Unit.Pct: case Unit.Pct:
return new[] { Quantity.Error }; return Quantity.Error;
case Unit.mm: case Unit.mm:
case Unit.cm: case Unit.cm:
@@ -403,23 +402,23 @@ namespace Common
case Unit.foot: case Unit.foot:
case Unit.yard: case Unit.yard:
case Unit.m: case Unit.m:
return new[] { Quantity.Length }; return Quantity.Length;
case Unit.kgpm3: case Unit.kgpm3:
case Unit.kgpl: case Unit.kgpl:
return new[] { Quantity.Density }; return Quantity.Density;
case Unit.J: case Unit.J:
case Unit.kJ: case Unit.kJ:
case Unit.MJ: case Unit.MJ:
case Unit.Wh: case Unit.Wh:
case Unit.kWh: case Unit.kWh:
case Unit.MWh: case Unit.MWh:
return new[] { Quantity.Energy }; return Quantity.Energy;
case Unit.uSpcm: case Unit.uSpcm:
case Unit.mSpm: case Unit.mSpm:
return new[] { Quantity.Conductivity }; return Quantity.Conductivity;
case Unit.ppl: case Unit.ppl:
case Unit.ppdm3: case Unit.ppdm3:
@@ -429,22 +428,22 @@ namespace Common
case Unit.dm3pp: case Unit.dm3pp:
case Unit.lpdeg: case Unit.lpdeg:
case Unit.dm3pdeg: case Unit.dm3pdeg:
return new[] { Quantity.PulsePerLtr }; return Quantity.PulsePerLtr;
case Unit.ppkWh: case Unit.ppkWh:
case Unit.kWhpp: case Unit.kWhpp:
return new[] { Quantity.PulsePerKWh }; return Quantity.PulsePerKWh;
case Unit.A: case Unit.A:
case Unit.mA: case Unit.mA:
return new[] { Quantity.Current }; return Quantity.Current;
case Unit.V: case Unit.V:
case Unit.mV: case Unit.mV:
return new[] { Quantity.Voltage }; return Quantity.Voltage;
default: default:
return new[] { Quantity.Number }; return Quantity.Number;
} }
} }
+3 -3
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Config</RootNamespace> <RootNamespace>Config</RootNamespace>
<AssemblyName>Config</AssemblyName> <AssemblyName>Config</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
@@ -150,4 +150,4 @@
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
--> -->
</Project> </Project>
+3 -3
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DataMatrix4Net</RootNamespace> <RootNamespace>DataMatrix4Net</RootNamespace>
<AssemblyName>DataMatrix4Net</AssemblyName> <AssemblyName>DataMatrix4Net</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
@@ -58,4 +58,4 @@
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
--> -->
</Project> </Project>
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DataStreamInterface</RootNamespace> <RootNamespace>DataStreamInterface</RootNamespace>
<AssemblyName>DataStreamInterface</AssemblyName> <AssemblyName>DataStreamInterface</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
@@ -61,4 +61,4 @@
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
--> -->
</Project> </Project>
+3 -3
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Decrypt</RootNamespace> <RootNamespace>Decrypt</RootNamespace>
<AssemblyName>Decrypt</AssemblyName> <AssemblyName>Decrypt</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile> <TargetFrameworkProfile>
</TargetFrameworkProfile> </TargetFrameworkProfile>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
@@ -63,4 +63,4 @@
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
--> -->
</Project> </Project>
+3 -3
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DeviceTest</RootNamespace> <RootNamespace>DeviceTest</RootNamespace>
<AssemblyName>DeviceTest</AssemblyName> <AssemblyName>DeviceTest</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile> <TargetFrameworkProfile>
</TargetFrameworkProfile> </TargetFrameworkProfile>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
@@ -114,4 +114,4 @@
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
--> -->
</Project> </Project>
-16
View File
@@ -7,22 +7,6 @@
<assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral" /> <assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" /> <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
</configuration> </configuration>
+3 -3
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Dirichlet.Numerics</RootNamespace> <RootNamespace>Dirichlet.Numerics</RootNamespace>
<AssemblyName>Dirichlet.Numerics</AssemblyName> <AssemblyName>Dirichlet.Numerics</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile> <TargetFrameworkProfile>
</TargetFrameworkProfile> </TargetFrameworkProfile>
@@ -51,4 +51,4 @@
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
--> -->
</Project> </Project>
+3 -3
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Encrypt</RootNamespace> <RootNamespace>Encrypt</RootNamespace>
<AssemblyName>Encrypt</AssemblyName> <AssemblyName>Encrypt</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile> <TargetFrameworkProfile>
</TargetFrameworkProfile> </TargetFrameworkProfile>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
@@ -63,4 +63,4 @@
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
--> -->
</Project> </Project>
+3 -3
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>EventViewer</RootNamespace> <RootNamespace>EventViewer</RootNamespace>
<AssemblyName>EventViewer</AssemblyName> <AssemblyName>EventViewer</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -142,4 +142,4 @@
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
--> -->
</Project> </Project>
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FeatureVectorCalculator</RootNamespace> <RootNamespace>FeatureVectorCalculator</RootNamespace>
<AssemblyName>FeatureVectorCalculator</AssemblyName> <AssemblyName>FeatureVectorCalculator</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -97,4 +97,4 @@
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
--> -->
</Project> </Project>
+3 -3
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup> <PropertyGroup>
<ProjectType>Local</ProjectType> <ProjectType>Local</ProjectType>
@@ -28,7 +28,7 @@
<UpgradeBackupLocation> <UpgradeBackupLocation>
</UpgradeBackupLocation> </UpgradeBackupLocation>
<OldToolsVersion>3.5</OldToolsVersion> <OldToolsVersion>3.5</OldToolsVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<PublishUrl>publish\</PublishUrl> <PublishUrl>publish\</PublishUrl>
<Install>true</Install> <Install>true</Install>
<InstallFrom>Disk</InstallFrom> <InstallFrom>Disk</InstallFrom>
@@ -180,4 +180,4 @@
<PostBuildEvent> <PostBuildEvent>
</PostBuildEvent> </PostBuildEvent>
</PropertyGroup> </PropertyGroup>
</Project> </Project>
+3 -3
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0"> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
<PropertyGroup> <PropertyGroup>
<ProjectType>Local</ProjectType> <ProjectType>Local</ProjectType>
@@ -35,7 +35,7 @@
</FileUpgradeFlags> </FileUpgradeFlags>
<UpgradeBackupLocation> <UpgradeBackupLocation>
</UpgradeBackupLocation> </UpgradeBackupLocation>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<OldToolsVersion>2.0</OldToolsVersion> <OldToolsVersion>2.0</OldToolsVersion>
<PublishUrl>publish\</PublishUrl> <PublishUrl>publish\</PublishUrl>
<Install>true</Install> <Install>true</Install>
@@ -146,4 +146,4 @@
<PostBuildEvent> <PostBuildEvent>
</PostBuildEvent> </PostBuildEvent>
</PropertyGroup> </PropertyGroup>
</Project> </Project>
+3 -3
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>GenericTest</RootNamespace> <RootNamespace>GenericTest</RootNamespace>
<AssemblyName>GenericTest</AssemblyName> <AssemblyName>GenericTest</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile> <TargetFrameworkProfile>
</TargetFrameworkProfile> </TargetFrameworkProfile>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
@@ -160,4 +160,4 @@
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
--> -->
</Project> </Project>
-16
View File
@@ -7,22 +7,6 @@
<assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral" /> <assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" /> <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
</configuration> </configuration>
-17
View File
@@ -1,17 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GenesisCordonelInterface.API
{
public class Enums
{
public enum DataStorageReaderTypes : sbyte
{
LoginPasswordsReader,
CalibrationParamsReader
}
}
}
@@ -42,6 +42,7 @@ namespace GenesisCordonelInterface.API
private readonly MeterBatch _meterBatch = new MeterBatch(); private readonly MeterBatch _meterBatch = new MeterBatch();
//Preadjustment //Preadjustment
public PreAdjustmentSettingsContainer _settings = new PreAdjustmentSettingsContainer();
public ProcessProgress _progressProcess = new ProcessProgress(); public ProcessProgress _progressProcess = new ProcessProgress();
public List<MeterStateControl> _meterControls = new List<MeterStateControl>(); public List<MeterStateControl> _meterControls = new List<MeterStateControl>();
public List<MeterStateControl> _tempMeterControls = new List<MeterStateControl>(); public List<MeterStateControl> _tempMeterControls = new List<MeterStateControl>();
@@ -54,11 +55,6 @@ namespace GenesisCordonelInterface.API
private readonly ConcurrentDictionary<int, bool> _selectedSlots = new ConcurrentDictionary<int, bool>(); private readonly ConcurrentDictionary<int, bool> _selectedSlots = new ConcurrentDictionary<int, bool>();
public InterfaceGCIToLaatzen()
{
}
#endregion #endregion
#region ================================== Worker ================================== #region ================================== Worker ==================================
@@ -1596,30 +1592,22 @@ namespace GenesisCordonelInterface.API
IEnumerable<PublicModels.MeterBatchDebugStatus> selectedSlots, IEnumerable<PublicModels.MeterBatchDebugStatus> selectedSlots,
CancellationToken token = default) CancellationToken token = default)
{ {
return Task.Run(() => Preadjustment_Detect(selectedSlots, token), token); return Task.Run(() => Preadjustment_DetectCore(selectedSlots, token), token);
}
public PreadjustmentDetectResult PreAdjustment_DetectDirect(
IEnumerable<PublicModels.MeterBatchDebugStatus> selectedSlots,
CancellationToken token = default)
{
return Preadjustment_Detect(selectedSlots, token);
} }
private PreadjustmentDetectResult Preadjustment_Detect( private PreadjustmentDetectResult Preadjustment_DetectCore(
IEnumerable<PublicModels.MeterBatchDebugStatus> selectedSlots, IEnumerable<PublicModels.MeterBatchDebugStatus> selectedSlots,
CancellationToken token = default) CancellationToken token)
{ {
const string operation = nameof(Preadjustment_Detect); const string operation = nameof(Preadjustment_DetectCore);
try try
{ {
LogInfo(operation, "Start.");
MeterBatch globalMeterBatch = new MeterBatch(); MeterBatch globalMeterBatch = new MeterBatch();
MeterBatch thermoMeterBatch = new MeterBatch(); MeterBatch thermoMeterBatch = new MeterBatch();
if (_progressProcess.Setting == null) if (_settings == null)
throw new ArgumentNullException(nameof(_progressProcess.Setting)); throw new ArgumentNullException(nameof(_settings));
if (_meterControls == null) if (_meterControls == null)
throw new ArgumentNullException(nameof(_meterControls)); throw new ArgumentNullException(nameof(_meterControls));
@@ -1636,7 +1624,7 @@ namespace GenesisCordonelInterface.API
globalMeterBatch = _meterBatch; globalMeterBatch = _meterBatch;
_meterControls = CreateMeterControls(selectedSlots); _meterControls = CreateMeterControls(selectedSlots);
if (!_progressProcess.Setting.GetTempUseTempFlansh()) if (!_settings.GetTempUseTempFlansh())
_tempMeterControls.Clear(); _tempMeterControls.Clear();
var allMeterControls = new List<MeterStateControl>(); var allMeterControls = new List<MeterStateControl>();
@@ -1666,7 +1654,7 @@ namespace GenesisCordonelInterface.API
SetUnknownStatus(allMeterControls); SetUnknownStatus(allMeterControls);
CheckTemperatureMeters( CheckTemperatureMeters(
_progressProcess.Setting, _settings,
_tempMeterControls, _tempMeterControls,
token); token);
@@ -1696,6 +1684,7 @@ namespace GenesisCordonelInterface.API
{ {
var ctl = new MeterStateControl(slot.Slot); var ctl = new MeterStateControl(slot.Slot);
ctl.SetChecked(true);
ctl.IsEnabled = true; ctl.IsEnabled = true;
controls.Add(ctl); controls.Add(ctl);
@@ -1829,16 +1818,11 @@ namespace GenesisCordonelInterface.API
token); token);
} }
public PreAdjustmentProcessResult PreAdjustment_PreparationDirect()
{
return PreAdjustment_Preparation();
}
/// <summary> /// <summary>
/// Executes standalone preparation process. /// Executes standalone preparation process.
/// </summary> /// </summary>
public PreAdjustmentProcessResult PreAdjustment_Preparation( public PreAdjustmentProcessResult PreAdjustment_Preparation(
int slot = -1) int slot)
{ {
const string operation = nameof(PreAdjustment_Preparation); const string operation = nameof(PreAdjustment_Preparation);
@@ -1846,6 +1830,9 @@ namespace GenesisCordonelInterface.API
{ {
LogInfo(operation, $"Start. Slot={slot}"); LogInfo(operation, $"Start. Slot={slot}");
var meter = GetMeterThreadSafe(slot);
EnsureConnected(meter);
BaseProcess process = CreatePreparationProcess(_progressProcess); BaseProcess process = CreatePreparationProcess(_progressProcess);
bool success = bool success =
@@ -1904,17 +1891,6 @@ namespace GenesisCordonelInterface.API
PreAdjustmentControl.PredefinedMessages.PreparationFailed(pp.Setting.Culture), PreAdjustmentControl.PredefinedMessages.PreparationFailed(pp.Setting.Culture),
60); 60);
} }
public bool PreAdjustment_PushCalibrationParams(double temperature)
{
if (_progressProcess != null)
{
_progressProcess.PushedTestBenchTemp = temperature;
_progressProcess.TempretureSelected = true;
return true;
}
return false;
}
#endregion #endregion
@@ -1928,13 +1904,8 @@ namespace GenesisCordonelInterface.API
token); token);
} }
public PreAdjustmentProcessResult PreAdjustment_AmplitudeTestDirect()
{
return PreAdjustment_AmplitudeTest();
}
public PreAdjustmentProcessResult PreAdjustment_AmplitudeTest( public PreAdjustmentProcessResult PreAdjustment_AmplitudeTest(
int slot = -1) int slot)
{ {
const string operation = nameof(PreAdjustment_AmplitudeTest); const string operation = nameof(PreAdjustment_AmplitudeTest);
@@ -1942,6 +1913,9 @@ namespace GenesisCordonelInterface.API
{ {
LogInfo(operation, $"Start. Slot={slot}"); LogInfo(operation, $"Start. Slot={slot}");
var meter = GetMeterThreadSafe(slot);
EnsureConnected(meter);
if (_progressProcess.Setting.TempOnly) if (_progressProcess.Setting.TempOnly)
{ {
return new PreAdjustmentProcessResult return new PreAdjustmentProcessResult
@@ -2018,19 +1992,19 @@ namespace GenesisCordonelInterface.API
token); token);
} }
public PreAdjustmentProcessResult PreAdjustment_TemperatureCalibrationDirect()
{
return PreAdjustment_TemperatureCalibration();
}
public PreAdjustmentProcessResult PreAdjustment_TemperatureCalibration( public PreAdjustmentProcessResult PreAdjustment_TemperatureCalibration(
int slot = -1) int slot)
{ {
const string operation = nameof(PreAdjustment_TemperatureCalibration); const string operation = nameof(PreAdjustment_TemperatureCalibration);
try try
{ {
LogInfo(operation, $"Start."); LogInfo(operation, $"Start. Slot={slot}");
var meter =
GetMeterThreadSafe(slot);
EnsureConnected(meter);
BaseProcess process = CreateTemperatureCalibrationProcess(_progressProcess); BaseProcess process = CreateTemperatureCalibrationProcess(_progressProcess);
@@ -2065,18 +2039,6 @@ namespace GenesisCordonelInterface.API
} }
} }
public bool PreAdjustment_PushTemperature(double temperature)
{
if (_progressProcess != null)
{
_progressProcess.PushedTestBenchTemp = temperature;
_progressProcess.TempretureSelected = true;
return true;
}
return false;
}
/// <summary> /// <summary>
/// Creates temperature calibration process instance based on current configuration. /// Creates temperature calibration process instance based on current configuration.
/// </summary> /// </summary>
@@ -2115,13 +2077,8 @@ namespace GenesisCordonelInterface.API
token); token);
} }
public PreAdjustmentProcessResult PreAdjustment_OffsetTestDirect()
{
return PreAdjustment_OffsetTest();
}
public PreAdjustmentProcessResult PreAdjustment_OffsetTest( public PreAdjustmentProcessResult PreAdjustment_OffsetTest(
int slot = -1) int slot)
{ {
const string operation = nameof(PreAdjustment_OffsetTest); const string operation = nameof(PreAdjustment_OffsetTest);
@@ -2129,6 +2086,10 @@ namespace GenesisCordonelInterface.API
{ {
LogInfo(operation, $"Start. Slot={slot}"); LogInfo(operation, $"Start. Slot={slot}");
var meter = GetMeterThreadSafe(slot);
EnsureConnected(meter);
if (_progressProcess.Setting.TempOnly) if (_progressProcess.Setting.TempOnly)
{ {
return new PreAdjustmentProcessResult return new PreAdjustmentProcessResult
@@ -2210,19 +2171,19 @@ namespace GenesisCordonelInterface.API
token); token);
} }
public PreAdjustmentProcessResult PreAdjustment_CompletionDirect()
{
return PreAdjustment_Completion();
}
public PreAdjustmentProcessResult PreAdjustment_Completion( public PreAdjustmentProcessResult PreAdjustment_Completion(
int slot = -1) int slot)
{ {
const string operation = nameof(PreAdjustment_Completion); const string operation = nameof(PreAdjustment_Completion);
try try
{ {
LogInfo(operation, $"Start."); LogInfo(operation, $"Start. Slot={slot}");
var meter =
GetMeterThreadSafe(slot);
EnsureConnected(meter);
BaseProcess process = CreateCompletionProcess(_progressProcess); BaseProcess process = CreateCompletionProcess(_progressProcess);
@@ -1,16 +1,11 @@
using CordonelPreadjustmentUi; using CordonelPreadjustmentUi;
using CordonelPreadjustmentUi.Processes.Itinerary; using CordonelPreadjustmentUi.Processes.Itinerary;
using GenesisCordonelInterface.Core.DataStorage.Config;
using GenesisCordonelInterface.Core.DataStorage.Reading.Common.Models;
using GenesisCordonelInterface.Core.DataStorage.Reading.Implementation.MeterLoginPasswords;
using GenesisCordonelInterface.Core.DataStorage.Reading.Implementation.PreAdjustmentCalibrationParams;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO.Ports; using System.IO.Ports;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore; using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
using Xylem.Common.Ui.CordonelPreadjustmentUi; using Xylem.Common.Ui.CordonelPreadjustmentUi;
using static GenesisCordonelInterface.API.PublicModels; using static GenesisCordonelInterface.API.PublicModels;
@@ -40,55 +35,13 @@ namespace GenesisCordonelInterface.API
/// Occurs when meter batch status information changes. /// Occurs when meter batch status information changes.
/// </summary> /// </summary>
public event Action<List<MeterBatchDebugStatus>> MeterBatchStatusChanged; public event Action<List<MeterBatchDebugStatus>> MeterBatchStatusChanged;
private readonly IMeterLoginPasswordReader loginPasswordsReader;
private readonly IPreAdjustmentCalibrationParamsReader calibrationParamsReader;
/// <summary> /// <summary>
/// Initializes a new instance of the public GCI facade. /// Initializes a new instance of the public GCI facade.
/// </summary> /// </summary>
public InterfaceOutsideToGCI() public InterfaceOutsideToGCI()
{ {
_innerMeterAPI = new InterfaceGCIToLaatzen();
}
/// <summary>
/// Initializes a new instance of the public GCI facade.
/// </summary>
public InterfaceOutsideToGCI(
InterfaceGCIToLaatzen innerMeterApi,
IMeterLoginPasswordReader passwordReader,
IPreAdjustmentCalibrationParamsReader calibrationReader)
{
_innerMeterAPI = innerMeterApi?? throw new ArgumentNullException(nameof(innerMeterApi));
loginPasswordsReader = passwordReader ?? throw new ArgumentNullException(nameof(passwordReader));
calibrationParamsReader = calibrationReader ?? throw new ArgumentNullException(nameof(calibrationReader));
//init handlers
//_innerMeterAPI._progressProcess.OnRequestedCalibrationParamsFromDb += RequestedCalibrationParamsFromDb;
}
private async void RequestedCalibrationParamsFromDb(
object sender,
EventArgsProcessProgress e)
{
try
{
DataQuery query = new DataQuery();
query.QueryParams.Add(((int)e.Value.Setting.MeterSize).ToString());
Dictionary<string, UInt32> calibrationParams = await ReadPreAdjustmentCalibrationParamsAsync(query).ConfigureAwait(false);
e.Value.PushedCalibrationParams = calibrationParams;
}
catch (Exception ex)
{
e.Value.DebugMessage(
$"Calibration params reading failed: {ex.Message}");
}
finally
{
e.Value.CalibrationParamsReadEvent.Set();
}
} }
// Laatzen ToolBox actions // Laatzen ToolBox actions
@@ -97,7 +50,7 @@ namespace GenesisCordonelInterface.API
public PortDetectionResult DetectStreamingPort(int slot) public PortDetectionResult DetectStreamingPort(int slot)
{ {
var result = _innerMeterAPI?.DetectStreamingPort(slot); var result = _innerMeterAPI.DetectStreamingPort(slot);
//RaiseMeterBatchStatusChanged(); //RaiseMeterBatchStatusChanged();
return result; return result;
} }
@@ -106,14 +59,14 @@ namespace GenesisCordonelInterface.API
int slot, int slot,
CancellationToken token = default(CancellationToken)) CancellationToken token = default(CancellationToken))
{ {
var result = await _innerMeterAPI?.DetectStreamingPortAsync(slot, token); var result = await _innerMeterAPI.DetectStreamingPortAsync(slot, token);
//RaiseMeterBatchStatusChanged(); //RaiseMeterBatchStatusChanged();
return result; return result;
} }
public PortDetectionResult DetectRequestPort(int slot) public PortDetectionResult DetectRequestPort(int slot)
{ {
var result = _innerMeterAPI?.DetectRequestPort(slot); var result = _innerMeterAPI.DetectRequestPort(slot);
//RaiseMeterBatchStatusChanged(); //RaiseMeterBatchStatusChanged();
return result; return result;
} }
@@ -122,7 +75,7 @@ namespace GenesisCordonelInterface.API
int slot, int slot,
CancellationToken token = default(CancellationToken)) CancellationToken token = default(CancellationToken))
{ {
var result = await _innerMeterAPI?.DetectRequestPortAsync(slot, token); var result = await _innerMeterAPI.DetectRequestPortAsync(slot, token);
//RaiseMeterBatchStatusChanged(); //RaiseMeterBatchStatusChanged();
return result; return result;
} }
@@ -531,7 +484,6 @@ namespace GenesisCordonelInterface.API
return result; return result;
} }
#endregion #endregion
#region ================================== DEBUG STATUS ================================== #region ================================== DEBUG STATUS ==================================
@@ -545,7 +497,7 @@ namespace GenesisCordonelInterface.API
/// </returns> /// </returns>
public List<WorkerDebugStatus> GetWorkerDebugStatuses() public List<WorkerDebugStatus> GetWorkerDebugStatuses()
{ {
return _innerMeterAPI?.GetWorkerDebugStatuses(); return _innerMeterAPI.GetWorkerDebugStatuses();
} }
/// <summary> /// <summary>
@@ -557,7 +509,7 @@ namespace GenesisCordonelInterface.API
/// </returns> /// </returns>
public List<MeterBatchDebugStatus> GetMeterBatchDebugStatuses() public List<MeterBatchDebugStatus> GetMeterBatchDebugStatuses()
{ {
return _innerMeterAPI?.GetMeterBatchDebugStatuses(); return _innerMeterAPI.GetMeterBatchDebugStatuses();
} }
/// <summary> /// <summary>
@@ -586,7 +538,7 @@ namespace GenesisCordonelInterface.API
/// <param name="selected">Selection state.</param> /// <param name="selected">Selection state.</param>
public void SetSlotSelected(int slot, bool selected) public void SetSlotSelected(int slot, bool selected)
{ {
_innerMeterAPI?.SetSlotSelected(slot, selected); _innerMeterAPI.SetSlotSelected(slot, selected);
RaiseMeterBatchStatusChanged(); RaiseMeterBatchStatusChanged();
} }
@@ -599,7 +551,7 @@ namespace GenesisCordonelInterface.API
/// </returns> /// </returns>
public bool IsSlotSelected(int slot) public bool IsSlotSelected(int slot)
{ {
return (bool)(_innerMeterAPI?.IsSlotSelected(slot)); return _innerMeterAPI.IsSlotSelected(slot);
} }
/// <summary> /// <summary>
@@ -610,7 +562,7 @@ namespace GenesisCordonelInterface.API
/// </returns> /// </returns>
public List<int> GetSelectedSlots() public List<int> GetSelectedSlots()
{ {
return _innerMeterAPI?.GetSelectedSlots(); return _innerMeterAPI.GetSelectedSlots();
} }
#endregion #endregion
@@ -625,7 +577,7 @@ namespace GenesisCordonelInterface.API
/// </returns> /// </returns>
public List<string> GetAllRegisterNames() public List<string> GetAllRegisterNames()
{ {
return _innerMeterAPI?.GetAllRegisterNames(); return _innerMeterAPI.GetAllRegisterNames();
} }
#endregion #endregion
@@ -637,10 +589,7 @@ namespace GenesisCordonelInterface.API
ProcessProgress pp, ProcessProgress pp,
List<MeterStateControl> mc) List<MeterStateControl> mc)
{ {
//init handlers return _innerMeterAPI.Preadjustment_Initialization(pp, mc);
pp.OnRequestedCalibrationParamsFromDb += RequestedCalibrationParamsFromDb;
return _innerMeterAPI?.Preadjustment_Initialization(pp, mc);
} }
public Task<PreadjustmentDetectResult> PreAdjustment_DetectAsync( public Task<PreadjustmentDetectResult> PreAdjustment_DetectAsync(
@@ -650,13 +599,6 @@ namespace GenesisCordonelInterface.API
return _innerMeterAPI.PreAdjustment_DetectAsync(selectedSlots, token); return _innerMeterAPI.PreAdjustment_DetectAsync(selectedSlots, token);
} }
public PreadjustmentDetectResult PreAdjustment_DetectDirect(
IEnumerable<PublicModels.MeterBatchDebugStatus> selectedSlots,
CancellationToken token = default)
{
return _innerMeterAPI.PreAdjustment_DetectDirect(selectedSlots, token);
}
public Task<PreAdjustmentProcessResult> PreAdjustment_PreparationAsync( public Task<PreAdjustmentProcessResult> PreAdjustment_PreparationAsync(
int slot, int slot,
CancellationToken token = default) CancellationToken token = default)
@@ -664,11 +606,6 @@ namespace GenesisCordonelInterface.API
return _innerMeterAPI.PreAdjustment_PreparationAsync(slot, token); return _innerMeterAPI.PreAdjustment_PreparationAsync(slot, token);
} }
public PreAdjustmentProcessResult PreAdjustment_PreparationDirect()
{
return _innerMeterAPI.PreAdjustment_PreparationDirect();
}
public Task<PreAdjustmentProcessResult> PreAdjustment_AmplitudeTestAsync( public Task<PreAdjustmentProcessResult> PreAdjustment_AmplitudeTestAsync(
int slot, int slot,
CancellationToken token = default) CancellationToken token = default)
@@ -676,11 +613,6 @@ namespace GenesisCordonelInterface.API
return _innerMeterAPI.PreAdjustment_AmplitudeTestAsync(slot, token); return _innerMeterAPI.PreAdjustment_AmplitudeTestAsync(slot, token);
} }
public PreAdjustmentProcessResult PreAdjustment_AmplitudeTestDirect()
{
return _innerMeterAPI.PreAdjustment_AmplitudeTestDirect();
}
public Task<PreAdjustmentProcessResult> PreAdjustment_TemperatureCalibrationAsync( public Task<PreAdjustmentProcessResult> PreAdjustment_TemperatureCalibrationAsync(
int slot, int slot,
CancellationToken token = default) CancellationToken token = default)
@@ -688,17 +620,6 @@ namespace GenesisCordonelInterface.API
return _innerMeterAPI.PreAdjustment_TemperatureCalibrationAsync(slot, token); return _innerMeterAPI.PreAdjustment_TemperatureCalibrationAsync(slot, token);
} }
public PreAdjustmentProcessResult PreAdjustment_TemperatureCalibrationDirect()
{
return _innerMeterAPI.PreAdjustment_TemperatureCalibrationDirect();
}
public bool PreAdjustment_PushTemperature(
double temperature)
{
return _innerMeterAPI.PreAdjustment_PushTemperature(temperature);
}
public Task<PreAdjustmentProcessResult> PreAdjustment_OffsetTestAsync( public Task<PreAdjustmentProcessResult> PreAdjustment_OffsetTestAsync(
int slot, int slot,
CancellationToken token = default) CancellationToken token = default)
@@ -706,11 +627,6 @@ namespace GenesisCordonelInterface.API
return _innerMeterAPI.PreAdjustment_OffsetTestAsync(slot, token); return _innerMeterAPI.PreAdjustment_OffsetTestAsync(slot, token);
} }
public PreAdjustmentProcessResult PreAdjustment_OffsetTestDirect()
{
return _innerMeterAPI.PreAdjustment_OffsetTestDirect();
}
public Task<PreAdjustmentProcessResult> PreAdjustment_CompletionAsync( public Task<PreAdjustmentProcessResult> PreAdjustment_CompletionAsync(
int slot, int slot,
CancellationToken token = default) CancellationToken token = default)
@@ -718,68 +634,6 @@ namespace GenesisCordonelInterface.API
return _innerMeterAPI.PreAdjustment_CompletionAsync(slot, token); return _innerMeterAPI.PreAdjustment_CompletionAsync(slot, token);
} }
public PreAdjustmentProcessResult PreAdjustment_CompletionDirect()
{
return _innerMeterAPI.PreAdjustment_CompletionDirect();
}
#endregion
#region ================================== UNI DATA STORAGE READER ==================================
//LoginPasswords reading
/// <summary>
/// Reads meter login password from configured GCI data storage.
/// </summary>
/// <param name="query">
/// Data query containing PCB ID or another configured lookup value.
/// </param>
/// <param name="token">
/// Cancellation token used to cancel the asynchronous operation.
/// </param>
/// <returns>
/// Password if found; otherwise null.
/// </returns>
public Task<string> ReadMeterLoginPasswordAsync(
DataQuery query,
CancellationToken token = default)
{
return loginPasswordsReader.ReadMeterLoginPasswordAsync(
query,
token);
}
//CalibrationParams reading
/// <summary>
/// Reads pre-adjustment calibration parameters
/// from configured GCI data storage.
/// </summary>
/// <param name="query">
/// Data query containing meter size or another configured lookup value.
/// </param>
/// <param name="token">
/// Cancellation token used to cancel the asynchronous operation.
/// </param>
/// <returns>
/// Dictionary:
///
/// Key:
/// Calibration parameter name
///
/// Value:
/// Calibration parameter value
/// </returns>
public Task<Dictionary<string, UInt32>> ReadPreAdjustmentCalibrationParamsAsync(
DataQuery query,
CancellationToken token = default)
{
return calibrationParamsReader.ReadCalibrationParamsAsync(
query,
token);
}
#endregion #endregion
} }
} }
@@ -1,12 +1,5 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Xylem.Common.Hardware.Interfaces.Ports.PortCore;
using static GenesisCordonelInterface.API.InterfaceOutsideToGCI;
using static Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore.GenesisMeter;
namespace GenesisCordonelInterface.API namespace GenesisCordonelInterface.API
{ {
@@ -21,16 +21,15 @@
"PreAdjustmentCalibrationParams": { "PreAdjustmentCalibrationParams": {
"___Documentation___": { "___Documentation___": {
"Description": "Reads pre-adjustment calibration parameters by meter size", "Description": "Reads pre-adjustment values from CSV",
"Type": "Supported: LocalDatabase, RemoteDatabase, LocalCsv, LocalJson, RestApi", "DataSource": "Relative path resolved from application directory",
"DataSource": "Database connection string", "QueryTemplate": "CSV/JSON syntax: SELECT [ReturnColumn] WHERE [MatchColumn]=QUERYPARAM or SELECT COLUMN(1) WHERE COLUMN(0)=QUERYPARAM"
"QueryTemplate": "QUERYPARAM is placeholder for runtime value. Example: WHERE [MeterSize]=QUERYPARAM -> meter size provided during ReadCalibrationParamsAsync()."
}, },
"Name": "PreAdjustmentCalibrationParams", "Name": "PreAdjustmentCalibrationParams",
"Type": "LocalDatabase", "Type": "LocalCsv",
"DataSource": "Server=(localdb)\\MojaDB;Database=UnionTownCalibAndSkeleton;Integrated Security=True;", "DataSource": "Data\\preadjustment_params.csv",
"QueryTemplate": "SELECT [ParameterName], [ParameterValue] FROM [dbo].[PreAdjustmentCalibrationParams] WHERE [MeterSize] = QUERYPARAM" "QueryTemplate": "SELECT [Offset] WHERE [PcbId] = QUERYPARAM"
} }
} }
} }
@@ -1,32 +0,0 @@
namespace GenesisCordonelInterface.Core.Config
{
/// <summary>
/// Root GCI configuration object loaded from gci_config.json.
///
/// This class represents the top-level configuration structure
/// and serves as an entry point for all configurable GCI features.
///
/// Example:
///
/// {
/// "DataStorageSection":
/// {
/// ...
/// }
/// }
/// </summary>
public class GciConfig
{
/// <summary>
/// Data storage configuration section.
///
/// Contains definitions for all configured readers and writers,
/// such as:
///
/// - MeterLoginPasswords
/// - PreAdjustmentCalibrationParams
/// - future storage providers
/// </summary>
public DataStorage.Config.GciDataStorageConfig DataStorageSection { get; set; }
}
}
@@ -1,177 +0,0 @@
using System;
using System.IO;
using GenesisCordonelInterface.Core.DataStorage.Reading.Common;
using GenesisCordonelInterface.Core.DataStorage.Reading.Common.Models;
using Newtonsoft.Json;
namespace GenesisCordonelInterface.Core.Config
{
/// <summary>
/// Loads GCI configuration from gci_config.json.
///
/// Responsibilities:
/// - Locate configuration file
/// - Deserialize JSON into strongly typed objects
/// - Normalize relative file paths
/// - Preserve database connection strings and REST URLs
///
/// Example:
///
/// Config/
/// gci_config.json
///
/// Data/
/// meter_passwords.csv
///
/// Relative paths:
/// Data\file.csv
///
/// become:
///
/// C:\App\bin\Debug\Data\file.csv
///
/// Database sources remain unchanged:
///
/// Server=(localdb)\MojaDB;Database=...
/// </summary>
public static class GciConfigLoader
{
/// <summary>
/// Loads default GCI configuration from:
///
/// Config\gci_config.json
/// </summary>
/// <returns>
/// Loaded GCI configuration.
/// </returns>
public static GciConfig LoadDefault()
{
string baseDirectory = AppDomain.CurrentDomain.BaseDirectory;
string configPath = Path.Combine(
baseDirectory,
"Config",
"gci_config.json");
return Load(configPath, baseDirectory);
}
/// <summary>
/// Loads GCI configuration from specified file.
/// </summary>
/// <param name="configPath">
/// Path to configuration json file.
/// </param>
/// <param name="baseDirectory">
/// Base directory used for resolving relative paths.
/// </param>
/// <returns>
/// Loaded configuration object.
/// </returns>
public static GciConfig Load(
string configPath,
string baseDirectory = null)
{
if (string.IsNullOrWhiteSpace(configPath))
throw new ArgumentException(
"Config path must not be empty.",
nameof(configPath));
if (!File.Exists(configPath))
throw new FileNotFoundException(
"GCI config file was not found.",
configPath);
string json = File.ReadAllText(configPath);
GciConfig config =
JsonConvert.DeserializeObject<GciConfig>(json);
if (config == null)
throw new InvalidOperationException(
"GCI config could not be loaded.");
NormalizeDataStoragePaths(
config,
baseDirectory ?? Path.GetDirectoryName(configPath));
return config;
}
/// <summary>
/// Normalizes paths for all configured data storage entries.
///
/// Converts relative file paths into absolute paths.
/// Database connection strings remain untouched.
/// </summary>
/// <param name="config">
/// Loaded configuration object.
/// </param>
/// <param name="baseDirectory">
/// Base path used for relative resolution.
/// </param>
private static void NormalizeDataStoragePaths(
GciConfig config,
string baseDirectory)
{
if (config.DataStorageSection == null)
return;
NormalizePath(
config.DataStorageSection.MeterLoginPasswords,
baseDirectory);
NormalizePath(
config.DataStorageSection.PreAdjustmentCalibrationParams,
baseDirectory);
}
/// <summary>
/// Converts relative file paths into absolute paths.
///
/// Applies only to:
/// - LocalCsv
/// - RemoteCsv
/// - LocalJson
/// - RemoteJson
///
/// Does not modify:
/// - Database connection strings
/// - REST URLs
/// </summary>
/// <param name="storageConfig">
/// Storage configuration.
/// </param>
/// <param name="baseDirectory">
/// Base path for resolution.
/// </param>
private static void NormalizePath(
DataStorageConfig storageConfig,
string baseDirectory)
{
if (storageConfig == null)
return;
if (string.IsNullOrWhiteSpace(storageConfig.DataSource))
return;
// Database connection strings and URLs
// must never be treated as file paths.
if (storageConfig.Type == DataStorageType.LocalDatabase ||
storageConfig.Type == DataStorageType.RemoteDatabase ||
storageConfig.Type == DataStorageType.RestApi)
{
return;
}
if (Path.IsPathRooted(storageConfig.DataSource))
return;
storageConfig.DataSource =
Path.GetFullPath(
Path.Combine(
baseDirectory,
storageConfig.DataSource));
}
}
}
@@ -1,36 +0,0 @@
{
"_Comment": "GCI DataStorage configuration",
"DataStorageSection": {
"MeterLoginPasswords": {
"___Documentation___": {
"Description": "Reads login passwords for meters by PCB ID",
"Type": "Supported: LocalDatabase, RemoteDatabase, LocalCsv, LocalJson, RestApi",
"DataSource": "Database connection string",
"QueryTemplate": "QUERYPARAM is placeholder for runtime value. Example: WHERE [PcbId]=QUERYPARAM -> PCB ID provided during GetPasswordAsync()."
},
"Name": "MeterLoginPasswords",
"Type": "LocalDatabase",
"DataSource": "Server=(localdb)\\SensusLocalDB;Database=UnionTownCalibAndSkeleton;Integrated Security=True;",
"QueryTemplate": "SELECT [Password] FROM [dbo].[SkeletonKeys] WHERE [PcbId] = QUERYPARAM"
},
"PreAdjustmentCalibrationParams": {
"___Documentation___": {
"Description": "Reads pre-adjustment calibration parameters by meter size",
"Type": "Supported: LocalDatabase, RemoteDatabase, LocalCsv, LocalJson, RestApi",
"DataSource": "Database connection string",
"QueryTemplate": "QUERYPARAM is placeholder for runtime value. Example: WHERE [MeterSize]=QUERYPARAM -> meter size provided during ReadCalibrationParamsAsync()."
},
"Name": "PreAdjustmentCalibrationParams",
"Type": "LocalDatabase",
"DataSource": "Server=(localdb)\\SensusLocalDB;Database=UnionTownCalibAndSkeleton;Integrated Security=True;",
"QueryTemplate": "SELECT [ParameterName], [ParameterValue] FROM [dbo].[PreAdjustmentCalibrationParams] WHERE [MeterSize] = QUERYPARAM"
}
}
}
@@ -46,17 +46,5 @@ namespace GenesisCordonelInterface.Core.DataStorage.Reading.Common.Models
/// WHERE [PcbId]=QUERYPARAM /// WHERE [PcbId]=QUERYPARAM
/// </summary> /// </summary>
public string QueryTemplate { get; set; } public string QueryTemplate { get; set; }
public DataStorageConfig(
string name,
DataStorageType type,
string dataSource,
string queryTemplate)
{
Name = name;
Type = type;
DataSource = dataSource;
QueryTemplate = queryTemplate;
}
} }
} }
@@ -2,52 +2,17 @@
namespace GenesisCordonelInterface.Core.DataStorage.Reading.Common.Models namespace GenesisCordonelInterface.Core.DataStorage.Reading.Common.Models
{ {
/// <summary> public class DatabaseSearchResult
/// Represents result returned by database-based
/// data storage readers.
///
/// Supports both:
///
/// - Single-row lookups
/// (e.g. MeterLoginPasswords)
///
/// - Multi-row queries
/// (e.g. PreAdjustmentCalibrationParams)
/// </summary>
internal class DatabaseSearchResult
{ {
/// <summary>
/// Indicates whether at least one record
/// was found.
/// </summary>
public bool Found { get; set; } public bool Found { get; set; }
/// <summary>
/// Executed SQL query text.
/// Mainly intended for diagnostics
/// and troubleshooting.
/// </summary>
public string Query { get; set; } public string Query { get; set; }
/// <summary> public Dictionary<string, object> Values { get; set; }
/// First returned row represented as
/// column/value pairs.
///
/// Preserved for backward compatibility
/// with existing readers expecting
/// a single database record.
/// </summary>
public Dictionary<string, object> Values { get; }
= new Dictionary<string, object>();
/// <summary> public DatabaseSearchResult()
/// All returned rows represented as {
/// a collection of column/value dictionaries. Values = new Dictionary<string, object>();
/// }
/// Intended for queries returning
/// multiple records.
/// </summary>
public List<Dictionary<string, object>> Rows { get; }
= new List<Dictionary<string, object>>();
} }
} }
@@ -1,5 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Data; using System.Data;
using System.Data.SqlClient; using System.Data.SqlClient;
using GenesisCordonelInterface.Core.DataStorage.Reading.Common.Models; using GenesisCordonelInterface.Core.DataStorage.Reading.Common.Models;
@@ -15,152 +14,76 @@ namespace GenesisCordonelInterface.Core.DataStorage.Reading.Common.Providers
/// QueryTemplate must contain QUERYPARAM placeholder. /// QueryTemplate must contain QUERYPARAM placeholder.
/// ///
/// Example: /// Example:
/// SELECT [Password] FROM [dbo].[SkeletonKeys] WHERE [PcbId] = QUERYPARAM
/// ///
/// SELECT [Password] /// The placeholder is internally converted to SQL parameter @value.
/// FROM [dbo].[SkeletonKeys]
/// WHERE [PcbId] = QUERYPARAM
///
/// or
///
/// SELECT [ParameterName], [ParameterValue]
/// FROM [dbo].[PreAdjustmentCalibrationParams]
/// WHERE [Dn_InternalId] = QUERYPARAM
///
/// The placeholder is internally converted
/// to SQL parameter @value.
///
/// Supports both:
///
/// - Single-row lookups
/// - Multi-row result sets
/// </summary> /// </summary>
public class DatabaseDataStorageReader : IDataStorageReader public class DatabaseDataStorageReader : IDataStorageReader
{ {
/// <summary> /// <summary>
/// Data storage configuration containing /// Data storage configuration containing connection string and query template.
/// connection string and query template.
/// </summary> /// </summary>
private readonly DataStorageConfig config; private readonly DataStorageConfig config;
/// <summary> /// <summary>
/// Creates SQL Server data storage reader /// Creates SQL Server data storage reader using provided configuration.
/// using provided configuration.
/// </summary> /// </summary>
/// <param name="config"> /// <param name="config">
/// Data storage configuration loaded /// Data storage configuration loaded from gci_config.json.
/// from gci_config.json.
/// </param> /// </param>
public DatabaseDataStorageReader( public DatabaseDataStorageReader(DataStorageConfig config)
DataStorageConfig config)
{ {
this.config = this.config = config ?? throw new ArgumentNullException(nameof(config));
config ?? throw new ArgumentNullException(nameof(config));
} }
/// <summary> /// <summary>
/// Executes configured SQL query and returns /// Executes configured SQL query and returns first matching row.
/// matching database records.
///
/// Single-row queries populate:
/// DatabaseSearchResult.Values
///
/// Multi-row queries populate:
/// DatabaseSearchResult.Rows
///
/// For backward compatibility, the first row
/// is also stored in Values.
/// </summary> /// </summary>
/// <param name="query"> /// <param name="query">
/// Query object containing lookup parameter. /// Query object containing lookup parameter.
/// </param> /// </param>
/// <returns> /// <returns>
/// DatabaseSearchResult containing returned /// DatabaseSearchResult containing returned SQL columns and values.
/// database records.
///
/// Values contains the first returned row.
///
/// Rows contains the complete result set.
/// </returns> /// </returns>
public object GetData(DataQuery query) public object GetData(DataQuery query)
{ {
if (query == null) if (query == null)
throw new ArgumentNullException(nameof(query)); throw new ArgumentNullException(nameof(query));
ReaderDiagnosticResult sourceResult = ReaderDiagnosticResult sourceResult = TestSource(true);
TestSource(true);
if (!sourceResult.Success) if (!sourceResult.Success)
throw new InvalidOperationException(sourceResult.Message); throw new InvalidOperationException(sourceResult.Message);
string sqlText = string sqlText = PrepareSqlText(config.QueryTemplate);
PrepareSqlText(config.QueryTemplate); object queryValue = ExtractQueryValue(query);
object queryValue = using (SqlConnection connection = new SqlConnection(config.DataSource))
ExtractQueryValue(query); using (SqlCommand command = new SqlCommand(sqlText, connection))
using (SqlConnection connection =
new SqlConnection(config.DataSource))
using (SqlCommand command =
new SqlCommand(sqlText, connection))
{ {
AddQueryParameter(command, queryValue); AddQueryParameter(command, queryValue);
connection.Open(); connection.Open();
// Full result set is required because some using (SqlDataReader reader = command.ExecuteReader(CommandBehavior.SingleRow))
// storage definitions return multiple records
// (e.g. PreAdjustmentCalibrationParams).
using (SqlDataReader reader =
command.ExecuteReader())
{ {
DatabaseSearchResult result = DatabaseSearchResult result = new DatabaseSearchResult
new DatabaseSearchResult
{
Query = sqlText
};
while (reader.Read())
{ {
result.Found = true; Query = sqlText
};
// Represents one database row. if (!reader.Read())
Dictionary<string, object> row =
new Dictionary<string, object>();
for (int i = 0; i < reader.FieldCount; i++)
{
object value =
reader.GetValue(i);
object normalizedValue =
value == DBNull.Value
? null
: value;
row[reader.GetName(i)] =
normalizedValue;
}
// Preserve first row for legacy consumers
// expecting a single returned database record
// (e.g. MeterLoginPasswordReader).
if (result.Rows.Count == 0)
{
foreach (var item in row)
{
result.Values[item.Key] =
item.Value;
}
}
// Store complete database result set.
result.Rows.Add(row);
}
if (result.Rows.Count == 0)
{ {
result.Found = false; result.Found = false;
return result;
}
result.Found = true;
for (int i = 0; i < reader.FieldCount; i++)
{
object value = reader.GetValue(i);
result.Values[reader.GetName(i)] =
value == DBNull.Value ? null : value;
} }
return result; return result;
@@ -169,8 +92,7 @@ namespace GenesisCordonelInterface.Core.DataStorage.Reading.Common.Providers
} }
/// <summary> /// <summary>
/// Tests whether SQL Server connection /// Tests whether SQL Server connection can be opened.
/// can be opened.
/// </summary> /// </summary>
/// <param name="enableDiagnostics"> /// <param name="enableDiagnostics">
/// Enables detailed diagnostic output. /// Enables detailed diagnostic output.
@@ -178,70 +100,45 @@ namespace GenesisCordonelInterface.Core.DataStorage.Reading.Common.Providers
/// <returns> /// <returns>
/// Diagnostic result of SQL connection test. /// Diagnostic result of SQL connection test.
/// </returns> /// </returns>
public ReaderDiagnosticResult TestSource( public ReaderDiagnosticResult TestSource(bool enableDiagnostics)
bool enableDiagnostics)
{ {
ReaderDiagnosticResult result = ReaderDiagnosticResult result = new ReaderDiagnosticResult();
new ReaderDiagnosticResult();
try try
{ {
if (string.IsNullOrWhiteSpace(config.DataSource)) if (string.IsNullOrWhiteSpace(config.DataSource))
{ throw new InvalidOperationException("Data source is empty.");
throw new InvalidOperationException(
"Data source is empty.");
}
Log( Log(result, enableDiagnostics, "Opening SQL connection.");
result,
enableDiagnostics,
"Opening SQL connection.");
using (SqlConnection connection = using (SqlConnection connection = new SqlConnection(config.DataSource))
new SqlConnection(config.DataSource))
{ {
connection.Open(); connection.Open();
Log( Log(result, enableDiagnostics, "Connection opened successfully.");
result,
enableDiagnostics,
"Connection opened successfully.");
using (SqlCommand command = using (SqlCommand command = new SqlCommand("SELECT 1", connection))
new SqlCommand("SELECT 1", connection))
{ {
object value = object value = command.ExecuteScalar();
command.ExecuteScalar(); Log(result, enableDiagnostics, "Test query result: " + value);
Log(
result,
enableDiagnostics,
"Test query result: " + value);
} }
} }
result.Success = true; result.Success = true;
result.Message = result.Message = "Connection to SQL Server OK.";
"Connection to SQL Server OK.";
} }
catch (Exception ex) catch (Exception ex)
{ {
result.Success = false; result.Success = false;
result.Message = result.Message = "Failed to connect to SQL Server. " + ex.Message;
"Failed to connect to SQL Server. " + ex.Message; Log(result, enableDiagnostics, ex.ToString());
Log(
result,
enableDiagnostics,
ex.ToString());
} }
return result; return result;
} }
/// <summary> /// <summary>
/// Tests whether configured SQL query /// Tests whether configured SQL query can be prepared and executed.
/// can be prepared and executed.
/// </summary> /// </summary>
/// <param name="enableDiagnostics"> /// <param name="enableDiagnostics">
/// Enables detailed diagnostic output. /// Enables detailed diagnostic output.
@@ -249,22 +146,16 @@ namespace GenesisCordonelInterface.Core.DataStorage.Reading.Common.Providers
/// <returns> /// <returns>
/// Diagnostic result of query execution test. /// Diagnostic result of query execution test.
/// </returns> /// </returns>
public ReaderDiagnosticResult TestQuery( public ReaderDiagnosticResult TestQuery(bool enableDiagnostics)
bool enableDiagnostics)
{ {
ReaderDiagnosticResult result = ReaderDiagnosticResult result = new ReaderDiagnosticResult();
new ReaderDiagnosticResult();
try try
{ {
if (string.IsNullOrWhiteSpace(config.QueryTemplate)) if (string.IsNullOrWhiteSpace(config.QueryTemplate))
{ throw new InvalidOperationException("Query template is empty.");
throw new InvalidOperationException(
"Query template is empty.");
}
string sqlText = string sqlText = PrepareSqlText(config.QueryTemplate);
PrepareSqlText(config.QueryTemplate);
Log(result, enableDiagnostics, "Original template:"); Log(result, enableDiagnostics, "Original template:");
Log(result, enableDiagnostics, config.QueryTemplate); Log(result, enableDiagnostics, config.QueryTemplate);
@@ -272,91 +163,69 @@ namespace GenesisCordonelInterface.Core.DataStorage.Reading.Common.Providers
Log(result, enableDiagnostics, "Prepared SQL:"); Log(result, enableDiagnostics, "Prepared SQL:");
Log(result, enableDiagnostics, sqlText); Log(result, enableDiagnostics, sqlText);
using (SqlConnection connection = using (SqlConnection connection = new SqlConnection(config.DataSource))
new SqlConnection(config.DataSource)) using (SqlCommand command = new SqlCommand(sqlText, connection))
using (SqlCommand command =
new SqlCommand(sqlText, connection))
{ {
AddQueryParameter(command, "TEST"); AddQueryParameter(command, "TEST");
connection.Open(); connection.Open();
object value = command.ExecuteScalar();
object value =
command.ExecuteScalar();
result.Data = value; result.Data = value;
Log( Log(result, enableDiagnostics, "Query executed successfully.");
result,
enableDiagnostics,
"Query executed successfully.");
} }
result.Success = true; result.Success = true;
result.Message = result.Message = "Query executed successfully.";
"Query executed successfully.";
} }
catch (Exception ex) catch (Exception ex)
{ {
result.Success = false; result.Success = false;
result.Message = result.Message = "Query execution failed. " + ex.Message;
"Query execution failed. " + ex.Message; Log(result, enableDiagnostics, ex.ToString());
Log(
result,
enableDiagnostics,
ex.ToString());
} }
return result; return result;
} }
/// <summary> /// <summary>
/// Converts configured QueryTemplate /// Converts configured QueryTemplate to executable SQL text.
/// to executable SQL text.
/// </summary> /// </summary>
/// <param name="queryTemplate"> /// <param name="queryTemplate">
/// SQL query template containing /// SQL query template containing QUERYPARAM placeholder.
/// QUERYPARAM placeholder.
/// </param> /// </param>
/// <returns> /// <returns>
/// SQL text with QUERYPARAM replaced /// SQL text with QUERYPARAM replaced by @value parameter.
/// by @value parameter.
/// </returns> /// </returns>
private static string PrepareSqlText( private static string PrepareSqlText(string queryTemplate)
string queryTemplate)
{ {
if (string.IsNullOrWhiteSpace(queryTemplate)) if (string.IsNullOrWhiteSpace(queryTemplate))
{
throw new ArgumentException( throw new ArgumentException(
"Query template must not be empty.", "Query template must not be empty.",
nameof(queryTemplate)); nameof(queryTemplate));
}
if (!queryTemplate.Contains("QUERYPARAM")) if (!queryTemplate.Contains("QUERYPARAM"))
{
throw new InvalidOperationException( throw new InvalidOperationException(
"Query template must contain QUERYPARAM placeholder."); "Query template must contain QUERYPARAM placeholder.");
}
return queryTemplate.Replace( return queryTemplate.Replace("QUERYPARAM", "@value");
"QUERYPARAM",
"@value");
} }
/// <summary> /// <summary>
/// Extracts first query parameter value. /// Extracts first query parameter value.
/// </summary> /// </summary>
private static object ExtractQueryValue( /// <param name="query">
DataQuery query) /// Data query containing query parameters.
/// </param>
/// <returns>
/// First query parameter value.
/// </returns>
private static object ExtractQueryValue(DataQuery query)
{ {
if (query.QueryParams == null || if (query.QueryParams == null || query.QueryParams.Count == 0)
query.QueryParams.Count == 0)
{
throw new InvalidOperationException( throw new InvalidOperationException(
"DataQuery does not contain any query parameter."); "DataQuery does not contain any query parameter.");
}
return query.QueryParams[0]; return query.QueryParams[0];
} }
@@ -364,25 +233,32 @@ namespace GenesisCordonelInterface.Core.DataStorage.Reading.Common.Providers
/// <summary> /// <summary>
/// Adds lookup parameter to SQL command. /// Adds lookup parameter to SQL command.
/// </summary> /// </summary>
private static void AddQueryParameter( /// <param name="command">
SqlCommand command, /// SQL command.
object value) /// </param>
/// <param name="value">
/// Query parameter value.
/// </param>
private static void AddQueryParameter(SqlCommand command, object value)
{ {
command.Parameters.Clear(); command.Parameters.Clear();
SqlParameter parameter = SqlParameter parameter = command.Parameters.Add("@value", SqlDbType.Variant);
command.Parameters.Add( parameter.Value = value ?? DBNull.Value;
"@value",
SqlDbType.Variant);
parameter.Value =
value ?? DBNull.Value;
} }
/// <summary> /// <summary>
/// Adds diagnostic line when diagnostics /// Adds diagnostic line when diagnostics are enabled.
/// are enabled.
/// </summary> /// </summary>
/// <param name="result">
/// Diagnostic result object.
/// </param>
/// <param name="enableDiagnostics">
/// Indicates whether diagnostics are enabled.
/// </param>
/// <param name="message">
/// Diagnostic message.
/// </param>
private static void Log( private static void Log(
ReaderDiagnosticResult result, ReaderDiagnosticResult result,
bool enableDiagnostics, bool enableDiagnostics,
@@ -1,5 +1,4 @@
using GenesisCordonelInterface.Core.DataStorage.Reading.Common.Models; using System.Threading;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace GenesisCordonelInterface.Core.DataStorage.Reading.Implementation.MeterLoginPasswords namespace GenesisCordonelInterface.Core.DataStorage.Reading.Implementation.MeterLoginPasswords
@@ -28,7 +27,7 @@ namespace GenesisCordonelInterface.Core.DataStorage.Reading.Implementation.Meter
/// <returns> /// <returns>
/// Password if found; otherwise null. /// Password if found; otherwise null.
/// </returns> /// </returns>
string GetPassword(DataQuery query); string GetPassword(string queryParam);
/// <summary> /// <summary>
/// Reads meter login password asynchronously. /// Reads meter login password asynchronously.
@@ -44,8 +43,8 @@ namespace GenesisCordonelInterface.Core.DataStorage.Reading.Implementation.Meter
/// <returns> /// <returns>
/// Password if found; otherwise null. /// Password if found; otherwise null.
/// </returns> /// </returns>
Task<string> ReadMeterLoginPasswordAsync( Task<string> GetPasswordAsync(
DataQuery query, string queryParam,
CancellationToken token = default); CancellationToken token = default);
} }
} }
@@ -7,120 +7,85 @@ using System.Reflection;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace GenesisCordonelInterface.Core.DataStorage.Reading.Implementation.MeterLoginPasswords /// <summary>
/// Reads meter login password from configured GCI data storage.
/// </summary>
public class MeterLoginPasswordReader : IMeterLoginPasswordReader
{ {
/// <summary> /// <summary>
/// Reads meter login password from configured GCI data storage. /// Universal data storage reader selected by configuration.
/// Can represent database, CSV, JSON or REST reader.
/// </summary> /// </summary>
public class MeterLoginPasswordReader : IMeterLoginPasswordReader private readonly IDataStorageReader reader;
/// <summary>
/// Ensures that only one password lookup is executed at a time.
/// </summary>
private readonly SemaphoreSlim readLock = new SemaphoreSlim(1, 1);
/// <summary>
/// Creates password reader using provided data storage configuration.
/// </summary>
/// <param name="config">Data storage configuration loaded from gci_config.json.</param>
public MeterLoginPasswordReader(DataStorageConfig config)
{ {
/// <summary> reader = DataStorageReaderFactory.Create(config);
/// Universal data storage reader selected by configuration. }
/// Can represent database, CSV, JSON or REST reader.
/// </summary>
private readonly IDataStorageReader reader;
/// <summary> /// <summary>
/// Ensures that only one password lookup is executed at a time. /// Asynchronously reads meter login password by query parameter.
/// </summary> /// </summary>
private readonly SemaphoreSlim readLock = new SemaphoreSlim(1, 1); /// <param name="queryParam">PCB ID or another configured lookup value.</param>
/// <param name="token">Cancellation token.</param>
/// <returns>Password if found; otherwise null.</returns>
public async Task<string> GetPasswordAsync(
string queryParam,
CancellationToken token = default)
{
if (string.IsNullOrWhiteSpace(queryParam))
throw new ArgumentException("Query parameter must not be empty.", nameof(queryParam));
/// <summary> await readLock.WaitAsync(token);
/// Creates password reader using provided data storage configuration.
/// </summary> try
/// <param name="config">Data storage configuration loaded from gci_config.json.</param>
public MeterLoginPasswordReader(DataStorageConfig config)
{ {
reader = DataStorageReaderFactory.Create(config); return await Task.Run(
() => GetPassword(queryParam),
token);
} }
finally
/// <summary>
/// Asynchronously reads meter login password using
/// the provided data query.
///
/// Thread-safe implementation may serialize
/// access to the underlying storage.
/// </summary>
/// <param name="query">
/// Data query containing lookup parameter values.
/// </param>
/// <param name="token">
/// Cancellation token.
/// </param>
/// <returns>
/// Password if found; otherwise null.
/// </returns>
public async Task<string> ReadMeterLoginPasswordAsync(
DataQuery query,
CancellationToken token = default)
{ {
if (query == null) readLock.Release();
throw new ArgumentNullException(nameof(query));
if (query.QueryParams.Count == 0)
throw new ArgumentException(
"Query does not contain any parameter.",
nameof(query));
await readLock.WaitAsync(token);
try
{
return await Task.Run(
() => GetPassword(query),
token);
}
finally
{
readLock.Release();
}
}
/// <summary>
/// Reads meter login password using
/// the provided data query.
/// </summary>
/// <param name="query">
/// Data query containing lookup parameter values.
/// </param>
/// <returns>
/// Password if found; otherwise null.
/// </returns>
public string GetPassword(
DataQuery query)
{
if (query == null)
throw new ArgumentNullException(nameof(query));
if (query.QueryParams.Count == 0)
throw new ArgumentException(
"Query does not contain any parameter.",
nameof(query));
object result =
reader.GetData(query);
if (result is ReaderDiagnosticResult diagnosticResult)
{
return diagnosticResult.Data?.ToString();
}
if (result is DatabaseSearchResult dbResult)
{
if (!dbResult.Found ||
dbResult.Values == null ||
dbResult.Values.Count == 0)
{
return null;
}
foreach (object value in dbResult.Values.Values)
{
return value?.ToString();
}
}
return result?.ToString();
} }
} }
/// <summary>
/// Reads meter login password by query parameter.
/// </summary>
/// <param name="queryParam">PCB ID or another configured lookup value.</param>
/// <returns>Password if found; otherwise null.</returns>
public string GetPassword(string queryParam)
{
if (string.IsNullOrWhiteSpace(queryParam))
throw new ArgumentException("Query parameter must not be empty.", nameof(queryParam));
DataQuery query = new DataQuery();
query.QueryParams.Add(queryParam);
object result = reader.GetData(query);
if (result is ReaderDiagnosticResult csvResult)
return csvResult.Data?.ToString();
if (result is DatabaseSearchResult dbResult)
{
if (!dbResult.Found || dbResult.Values == null || dbResult.Values.Count == 0)
return null;
foreach (object value in dbResult.Values.Values)
return value?.ToString();
}
return result?.ToString();
}
} }
@@ -1,62 +1,43 @@
using GenesisCordonelInterface.Core.DataStorage.Reading.Common.Models; using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace GenesisCordonelInterface.Core.DataStorage.Reading.Implementation.PreAdjustmentCalibrationParams namespace GenesisCordonelInterface.Core.DataStorage.Reading.Implementation.PreAdjustmentCalibrationParams
{ {
/// <summary> /// <summary>
/// Provides access to pre-adjustment calibration parameters /// Provides access to pre-adjustment calibration parameters
/// stored in the configured GCI data source. /// stored in the configured data source.
/// ///
/// Expected structure: /// Expected structure:
/// /// Dn_InternalId | ParameterName | ParameterValue
/// MeterSize | ParameterName | ParameterValue
/// ///
/// Example: /// Example:
/// 3 | GENESISFLOW_MinValidToF | 21990232
/// 3 | GENESISFLOW_Timeout | 1
/// ///
/// 2 | GENESISFLOW_MinValidToF | 21990232 /// Parameters are grouped by Dn_InternalId and returned
/// 2 | GENESISFLOW_Timeout | 1
///
/// Parameters are grouped by MeterSize and returned
/// as key/value pairs where: /// as key/value pairs where:
/// ///
/// Key = ParameterName /// Key = ParameterName
/// Value = ParameterValue /// Value = ParameterValue
/// </summary> /// </summary>
public interface IPreAdjustmentCalibrationParamsReader internal interface IPreAdjustmentCalibrationParamsReader
{ {
/// <summary> /// <summary>
/// Reads all pre-adjustment calibration parameters /// Reads all calibration parameters assigned
/// using the provided data query synchronously. /// to a specific DN identifier.
/// </summary> /// </summary>
/// <param name="query"> /// <param name="dnInternalId">
/// Data query containing meter size as lookup parameter. /// Internal DN identifier (meter size).
/// </param> /// </param>
/// <returns> /// <returns>
/// Dictionary where key is GENESISFLOW parameter name /// Dictionary:
/// and value is stored parameter value. ///
/// Key:
/// GENESISFLOW parameter name
///
/// Value:
/// Stored parameter value
/// </returns> /// </returns>
Dictionary<string, UInt32> GetCalibrationParams( Task<Dictionary<string, string>> ReadParamsAsync(int dnInternalId);
DataQuery query);
/// <summary>
/// Reads all pre-adjustment calibration parameters
/// using the provided data query asynchronously.
/// </summary>
/// <param name="query">
/// Data query containing meter size as lookup parameter.
/// </param>
/// <param name="token">
/// Cancellation token.
/// </param>
/// <returns>
/// Dictionary where key is GENESISFLOW parameter name
/// and value is stored parameter value.
/// </returns>
Task<Dictionary<string, UInt32>> ReadCalibrationParamsAsync(
DataQuery query,
CancellationToken token = default);
} }
} }
@@ -1,305 +1,87 @@
using GenesisCordonelInterface.Core.DataStorage.Reading.Common; using System;
using GenesisCordonelInterface.Core.DataStorage.Reading.Common.Contracts;
using GenesisCordonelInterface.Core.DataStorage.Reading.Common.Models;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading; using System.Data.SqlClient;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace GenesisCordonelInterface.Core.DataStorage.Reading.Implementation.PreAdjustmentCalibrationParams namespace GenesisCordonelInterface.Core.DataStorage.Reading.Implementation.PreAdjustmentCalibrationParams
{ {
/// <summary> /// <summary>
/// Reads pre-adjustment calibration parameters /// Reads pre-adjustment calibration parameters
/// from configured GCI data storage. /// from SQL database storage.
/// ///
/// The underlying storage type is selected /// Expected table:
/// through IDataStorageReader and may represent:
/// ///
/// - SQL database /// dbo.PreAdjustmentCalibrationParams
/// - CSV
/// - JSON
/// - REST API
/// ///
/// Expected storage structure: /// Columns:
/// /// Dn_InternalId
/// MeterSize | ParameterName | ParameterValue /// ParameterName
/// ParameterValue
/// ///
/// Example: /// Example:
/// ///
/// 2 | GENESISFLOW_MinValidToF | 21990232 /// 3 | GENESISFLOW_MinValidToF | 21990232
/// 2 | GENESISFLOW_Timeout | 1 /// 3 | GENESISFLOW_Timeout | 1
/// ///
/// Returned data are represented as: /// Returns values as dictionary:
/// ///
/// Key = ParameterName /// GENESISFLOW_MinValidToF -> 21990232
/// Value = ParameterValue /// GENESISFLOW_Timeout -> 1
/// </summary> /// </summary>
public class PreAdjustmentCalibrationParamsReader internal class PreAdjustmentCalibrationParamsReader: IPreAdjustmentCalibrationParamsReader
: IPreAdjustmentCalibrationParamsReader
{ {
/// <summary> private readonly string _connectionString;
/// Universal data storage reader selected by configuration.
/// Can represent database, CSV, JSON or REST reader.
/// </summary>
private readonly IDataStorageReader reader;
/// <summary> /// <summary>
/// Ensures that only one calibration parameter lookup /// Initializes calibration parameter reader.
/// is executed at a time.
/// </summary> /// </summary>
private readonly SemaphoreSlim readLock = /// <param name="connectionString">
new SemaphoreSlim(1, 1); /// SQL database connection string.
/// <summary>
/// Creates calibration parameter reader using
/// provided data storage configuration.
/// </summary>
/// <param name="config">
/// Data storage configuration loaded from gci_config.json.
/// </param> /// </param>
public PreAdjustmentCalibrationParamsReader( public PreAdjustmentCalibrationParamsReader(
DataStorageConfig config) string connectionString)
{ {
if (config == null) _connectionString = connectionString?? throw new ArgumentNullException(nameof(connectionString));
throw new ArgumentNullException(nameof(config));
reader = DataStorageReaderFactory.Create(config);
} }
/// <summary> /// <inheritdoc/>
/// Reads all pre-adjustment calibration parameters public async Task<Dictionary<string, string>> ReadParamsAsync(int dnInternalId)
/// using the provided data query asynchronously.
///
/// The query is expected to contain meter size
/// as the first lookup parameter.
/// </summary>
/// <param name="query">
/// Data query containing lookup parameter values.
/// </param>
/// <param name="token">
/// Cancellation token.
/// </param>
/// <returns>
/// Dictionary:
///
/// Key:
/// GENESISFLOW parameter name
///
/// Value:
/// Stored parameter value
/// </returns>
public async Task<Dictionary<string, UInt32>> ReadCalibrationParamsAsync(
DataQuery query,
CancellationToken token = default)
{ {
ValidateQuery(query); var result = new Dictionary<string, string>();
return await Task.Run( const string query = @"
() => GetCalibrationParams(query), SELECT ParameterName, ParameterValue
token).ConfigureAwait(false); ; FROM dbo.PreAdjustmentCalibrationParams
WHERE Dn_InternalId=@Dn_InternalId";
/*await readLock.WaitAsync(token); using (var connection = new SqlConnection(_connectionString))
try using (var command = new SqlCommand(query, connection))
{ {
return await Task.Run( command.Parameters.AddWithValue(
() => GetCalibrationParams(query), "@Dn_InternalId",
token); dnInternalId);
}
finally
{
readLock.Release();
}*/
}
/// <summary> await connection.OpenAsync();
/// Reads all pre-adjustment calibration parameters
/// using the provided data query.
///
/// The query is expected to contain meter size
/// as the first lookup parameter.
/// </summary>
/// <param name="query">
/// Data query containing lookup parameter values.
/// </param>
/// <returns>
/// Dictionary:
///
/// Key:
/// GENESISFLOW parameter name
///
/// Value:
/// Stored parameter value
/// </returns>
public Dictionary<string, UInt32> GetCalibrationParams(
DataQuery query)
{
ValidateQuery(query);
object result = using (var reader =
reader.GetData(query); await command.ExecuteReaderAsync())
return ConvertResultToDictionary(result);
}
/// <summary>
/// Validates that data query exists
/// and contains at least one lookup parameter.
/// </summary>
/// <param name="query">
/// Data query to validate.
/// </param>
private static void ValidateQuery(
DataQuery query)
{
if (query == null)
throw new ArgumentNullException(nameof(query));
if (query.QueryParams == null ||
query.QueryParams.Count == 0)
{
throw new ArgumentException(
"Query does not contain any parameter.",
nameof(query));
}
}
/// <summary>
/// Converts provider-specific result objects
/// returned by IDataStorageReader into a unified
/// dictionary representation.
/// </summary>
/// <param name="result">
/// Raw result returned by the configured storage reader.
/// </param>
/// <returns>
/// Dictionary containing calibration parameter
/// name/value pairs.
/// </returns>
private Dictionary<string, UInt32> ConvertResultToDictionary(
object result)
{
Dictionary<string, UInt32> values =
new Dictionary<string, UInt32>();
if (result == null)
return values;
if (result is DatabaseSearchResult dbResult)
{
if (!dbResult.Found)
return values;
foreach (Dictionary<string, object> row in dbResult.Rows)
{ {
if (!row.TryGetValue("ParameterName", out object parameterNameObject)) while (await reader.ReadAsync())
continue;
if (!row.TryGetValue("ParameterValue", out object parameterValueObject))
continue;
string parameterName =
parameterNameObject?.ToString();
if (string.IsNullOrWhiteSpace(parameterName))
continue;
if (TryConvertToUInt32(parameterValueObject, out UInt32 parameterValue))
{ {
values[parameterName] = var parameterName = reader["ParameterName"].ToString();
parameterValue;
var parameterValue = reader["ParameterValue"].ToString();
if (!string.IsNullOrWhiteSpace(parameterName))
{
result[parameterName] = parameterValue;
}
} }
} }
return values;
} }
if (result is ReaderDiagnosticResult diagnosticResult) return result;
{
if (diagnosticResult.Data is Dictionary<string, UInt32> uintDictionary)
return uintDictionary;
if (diagnosticResult.Data is Dictionary<string, string> stringDictionary)
{
foreach (var item in stringDictionary)
{
if (TryConvertToUInt32(item.Value, out UInt32 value))
values[item.Key] = value;
}
return values;
}
if (diagnosticResult.Data is Dictionary<string, object> objectDictionary)
{
foreach (var item in objectDictionary)
{
if (TryConvertToUInt32(item.Value, out UInt32 value))
values[item.Key] = value;
}
return values;
}
}
if (result is Dictionary<string, UInt32> directUIntDictionary)
return directUIntDictionary;
if (result is Dictionary<string, string> directStringDictionary)
{
foreach (var item in directStringDictionary)
{
if (TryConvertToUInt32(item.Value, out UInt32 value))
values[item.Key] = value;
}
return values;
}
if (result is Dictionary<string, object> directObjectDictionary)
{
foreach (var item in directObjectDictionary)
{
if (TryConvertToUInt32(item.Value, out UInt32 value))
values[item.Key] = value;
}
}
return values;
}
private static bool TryConvertToUInt32(
object value,
out UInt32 result)
{
result = 0;
if (value == null)
return false;
if (value is UInt32 uintValue)
{
result = uintValue;
return true;
}
if (value is int intValue && intValue >= 0)
{
result = Convert.ToUInt32(intValue);
return true;
}
if (value is long longValue &&
longValue >= 0 &&
longValue <= UInt32.MaxValue)
{
result = Convert.ToUInt32(longValue);
return true;
}
return UInt32.TryParse(
value.ToString(),
out result);
} }
} }
} }
@@ -1,73 +0,0 @@
using GenesisCordonelInterface.API;
using GenesisCordonelInterface.Core.Config;
using GenesisCordonelInterface.Core.DataStorage.Reading.Common.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.AccessControl;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using UdsReaderType_CalibrationParams = GenesisCordonelInterface.Core.DataStorage.Reading.Implementation.PreAdjustmentCalibrationParams.PreAdjustmentCalibrationParamsReader;
using UdsReaderType_LoginPasswords = GenesisCordonelInterface.Core.DataStorage.Reading.Implementation.MeterLoginPasswords.MeterLoginPasswordReader;
using GciPublicModels = GenesisCordonelInterface.API.PublicModels;
using GciEnums = GenesisCordonelInterface.API.Enums;
using GciType = GenesisCordonelInterface.API.InterfaceOutsideToGCI;
using GciDataStorageReadingModels = GenesisCordonelInterface.Core.DataStorage.Reading.Common.Models;
using GciGUIType = GenesisCordonelInterface.UI.MainView;
namespace GenesisCordonelInterface.Core
{
public class Engine
{
GciConfig gciConfig;
public UdsReaderType_LoginPasswords loginPasswordsDataStorageReader;
public UdsReaderType_CalibrationParams calibrationParamsStorageReader;
//readonly UdsWriterType writer;
//diag GUI for GCI
GciGUIType gciGUI;
Form gciGuiHostForm;
//diag GUI for GciBridge
public UserControl gciBridgeGUIUserControl;
public UI.MainForm gciBridgeGuiForm;
public InterfaceOutsideToGCI gciExternalInterface;
/// <summary>
/// Initializes a new instance of the public GCI facade.
/// </summary>
public Engine()
{
gciConfig = GciConfigLoader.LoadDefault();
loginPasswordsDataStorageReader = new UdsReaderType_LoginPasswords
(
new GciDataStorageReadingModels.DataStorageConfig
(
nameof(GciEnums.DataStorageReaderTypes.LoginPasswordsReader),
GciDataStorageReadingModels.DataStorageType.LocalDatabase,
gciConfig.DataStorageSection.MeterLoginPasswords.DataSource,
gciConfig.DataStorageSection.MeterLoginPasswords.QueryTemplate
)
);
calibrationParamsStorageReader = new UdsReaderType_CalibrationParams
(
new GciDataStorageReadingModels.DataStorageConfig
(
nameof(GciEnums.DataStorageReaderTypes.CalibrationParamsReader),
GciDataStorageReadingModels.DataStorageType.LocalDatabase,
gciConfig.DataStorageSection.PreAdjustmentCalibrationParams.DataSource,
gciConfig.DataStorageSection.PreAdjustmentCalibrationParams.QueryTemplate
)
);
gciExternalInterface = new InterfaceOutsideToGCI(
new InterfaceGCIToLaatzen(),
loginPasswordsDataStorageReader,
calibrationParamsStorageReader);
}
}
}
@@ -81,9 +81,6 @@
<Reference Include="Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig"> <Reference Include="Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig">
<HintPath>..\packages\Common\Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig.dll</HintPath> <HintPath>..\packages\Common\Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig.dll</HintPath>
</Reference> </Reference>
<Reference Include="Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore">
<HintPath>..\packages\Common\Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore.dll</HintPath>
</Reference>
<Reference Include="Xylem.Common.Hardware.WaterMeter.Genesis.Registers"> <Reference Include="Xylem.Common.Hardware.WaterMeter.Genesis.Registers">
<HintPath>..\packages\Common\Xylem.Common.Hardware.WaterMeter.Genesis.Registers.dll</HintPath> <HintPath>..\packages\Common\Xylem.Common.Hardware.WaterMeter.Genesis.Registers.dll</HintPath>
</Reference> </Reference>
@@ -120,10 +117,9 @@
<Compile Include="API\InterfaceOutsideToGCI.cs" /> <Compile Include="API\InterfaceOutsideToGCI.cs" />
<Compile Include="API\InterfaceGCIToLaatzen.cs" /> <Compile Include="API\InterfaceGCIToLaatzen.cs" />
<Compile Include="API\PublicModels.cs" /> <Compile Include="API\PublicModels.cs" />
<Compile Include="Core\Config\GciConfig.cs" /> <Compile Include="Core\DataStorage\Config\GciConfig.cs" />
<Compile Include="Core\Config\GciConfigLoader.cs" /> <Compile Include="Core\DataStorage\Config\GciConfigLoader.cs" />
<Compile Include="Core\DataStorage\Config\GciDataStorageConfig.cs" /> <Compile Include="Core\DataStorage\Config\GciDataStorageConfig.cs" />
<Compile Include="API\Enums.cs" />
<Compile Include="Core\DataStorage\Reading\Common\Providers\CsvDataStorageReader.cs" /> <Compile Include="Core\DataStorage\Reading\Common\Providers\CsvDataStorageReader.cs" />
<Compile Include="Core\DataStorage\Reading\Common\Providers\DatabaseDataStorageReader.cs" /> <Compile Include="Core\DataStorage\Reading\Common\Providers\DatabaseDataStorageReader.cs" />
<Compile Include="Core\DataStorage\Reading\Common\Models\DatabaseSearchResult.cs" /> <Compile Include="Core\DataStorage\Reading\Common\Models\DatabaseSearchResult.cs" />
@@ -141,7 +137,6 @@
<Compile Include="Core\DataStorage\Reading\Implementation\MeterLoginPasswords\MeterLoginPasswordReader.cs" /> <Compile Include="Core\DataStorage\Reading\Implementation\MeterLoginPasswords\MeterLoginPasswordReader.cs" />
<Compile Include="Core\DataStorage\Reading\Implementation\PreAdjustmentCalibrationParams\IPreAdjustmentCalibrationParamsReader.cs" /> <Compile Include="Core\DataStorage\Reading\Implementation\PreAdjustmentCalibrationParams\IPreAdjustmentCalibrationParamsReader.cs" />
<Compile Include="Core\DataStorage\Reading\Implementation\PreAdjustmentCalibrationParams\PreAdjustmentCalibrationParamsReader.cs" /> <Compile Include="Core\DataStorage\Reading\Implementation\PreAdjustmentCalibrationParams\PreAdjustmentCalibrationParamsReader.cs" />
<Compile Include="Core\Engine\Engine.cs" />
<Compile Include="Core\Logging\UiLogBus.cs" /> <Compile Include="Core\Logging\UiLogBus.cs" />
<Compile Include="Core\Logging\UiTarget.cs" /> <Compile Include="Core\Logging\UiTarget.cs" />
<Compile Include="Core\Threading\ApiWorker\ApiWorker.cs" /> <Compile Include="Core\Threading\ApiWorker\ApiWorker.cs" />
@@ -228,8 +223,6 @@
<Content Include="docs\images\GCI__Onboarding_Overview_drawio.svg" /> <Content Include="docs\images\GCI__Onboarding_Overview_drawio.svg" />
<Content Include="docs\images\GCI__Onboarding_Overview_drawio__API_architecture__Current_state.svg" /> <Content Include="docs\images\GCI__Onboarding_Overview_drawio__API_architecture__Current_state.svg" />
<Content Include="docs\images\GCI__Onboarding_Overview_drawio__API_architecture__Target_state.svg" /> <Content Include="docs\images\GCI__Onboarding_Overview_drawio__API_architecture__Target_state.svg" />
<Content Include="docs\images\GCI__Onboarding_Overview_drawio__Data_collection_domain.svg" />
<Content Include="docs\images\GCI__Onboarding_Overview_drawio__Meter_management_domain.svg" />
<Content Include="docs\images\logo\logo.png" /> <Content Include="docs\images\logo\logo.png" />
<Content Include="docs\images\logo\logo.svg" /> <Content Include="docs\images\logo\logo.svg" />
<Content Include="docs\images\logo\sensus-logo-white-green-rgb.png" /> <Content Include="docs\images\logo\sensus-logo-white-green-rgb.png" />
@@ -262,11 +255,9 @@
<EmbeddedResource Include="UI\StaraTuraAPI_GenesisCordonelInterface\FrmGCIAPI.resx"> <EmbeddedResource Include="UI\StaraTuraAPI_GenesisCordonelInterface\FrmGCIAPI.resx">
<DependentUpon>FrmGCIAPI.cs</DependentUpon> <DependentUpon>FrmGCIAPI.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<Content Include="Core\Config\gci_config.json"> <Content Include="Config\gci_config.json">
<Link>Config\gci_config.json</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<None Include="Core\Config\gci_config.json" />
<None Include="docs\articles\API\index.md" /> <None Include="docs\articles\API\index.md" />
<None Include="docs\articles\API\PublicModels.md" /> <None Include="docs\articles\API\PublicModels.md" />
<None Include="docs\articles\API\InterfaceGCIToLaatzen.md" /> <None Include="docs\articles\API\InterfaceGCIToLaatzen.md" />
@@ -288,11 +279,6 @@
<None Include="docs\pages\gci\page_gci__implementation_to_tbf.md" /> <None Include="docs\pages\gci\page_gci__implementation_to_tbf.md" />
<None Include="docs\pages\gci\page_gci__implementation_universal.md" /> <None Include="docs\pages\gci\page_gci__implementation_universal.md" />
<None Include="docs\pages\gci\page_gci__workers.md" /> <None Include="docs\pages\gci\page_gci__workers.md" />
<None Include="docs\pages\platform\page_platform__configuration_domain.md" />
<None Include="docs\pages\platform\page_platform__data_collection_domain.md" />
<None Include="docs\pages\platform\page_platform__tbf_implementation.md" />
<None Include="docs\pages\platform\page_platform__current_state.md" />
<None Include="docs\pages\platform\page_platform__home.md" />
<None Include="docs\toc.yml" /> <None Include="docs\toc.yml" />
<None Include="packages.config" /> <None Include="packages.config" />
<None Include="Properties\Settings.settings"> <None Include="Properties\Settings.settings">
@@ -309,7 +295,6 @@
<None Include="App.config" /> <None Include="App.config" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Config\" />
<Folder Include="Core\DataStorage\Writing\NewFolder1\" /> <Folder Include="Core\DataStorage\Writing\NewFolder1\" />
<Folder Include="RuntimePackage\Package\" /> <Folder Include="RuntimePackage\Package\" />
</ItemGroup> </ItemGroup>
@@ -317,6 +302,10 @@
<WCFMetadata Include="Connected Services\" /> <WCFMetadata Include="Connected Services\" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\ExternalProjects\Laatzen\Genesis\Common\Hardware\WaterMeter\Genesis\GenesisCore\GenesisCore.csproj">
<Project>{04201E95-90A0-4B73-A72F-379739B2A3AE}</Project>
<Name>GenesisCore</Name>
</ProjectReference>
<ProjectReference Include="..\ExternalProjects\Laatzen\Genesis\Common\CordonelPreadjustmentUi\CordonelPreadjustmentUi.csproj"> <ProjectReference Include="..\ExternalProjects\Laatzen\Genesis\Common\CordonelPreadjustmentUi\CordonelPreadjustmentUi.csproj">
<Project>{D0C8D887-ED52-40AB-A069-90BCE0E801E2}</Project> <Project>{D0C8D887-ED52-40AB-A069-90BCE0E801E2}</Project>
<Name>CordonelPreadjustmentUi</Name> <Name>CordonelPreadjustmentUi</Name>
@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Xylem.Common.CommonCore" publicKeyToken="null" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.8.18.17954" newVersion="2.8.18.17954" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
@@ -1,15 +0,0 @@
{
"Erase": [
"1\\tstfile",
"1\\fdrdata",
"1\\logdata",
"1\\blklist",
"1\\pulsedbg",
"1\\upg*",
"1\\img*"
],
"Restore": [
{
}
]
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,87 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<variable name="BasePath" value="\\DELAZ1FSOPS01-1\CordonelDS$\${loggerpc}" />
<targets>
<!--CalibrationHelper-->
<target name="CalibrationHelper" xsi:type="File" fileName="${BasePath}\${shortdate}\${processname}\CalibrationHelper.log" CreateDirs="True" layout ="${longdate} | ${level} | ${message} ${exception:format=toString}" archiveAboveSize="50000000" archiveFileName="${BasePath}\${shortdate}\${processname}\{##}CalibrationHelper.log" />
<!--LedRawData-->
<target xsi:type="BufferingWrapper"
name="TargetLedRawDataBase"
bufferSize="10000"
flushTimeout="-1"
slidingTimeout="true"
>
<target name="LedRawDataBase" xsi:type="File" fileName="${BasePath}\${shortdate}\${processname}\LedRawData_BASE.log" CreateDirs="True" layout ="${longdate} | ${message} ${exception:format=toString}" archiveAboveSize="50000000" archiveFileName="${BasePath}\${shortdate}\${processname}\{##}_LedRawData_BASE.log" />
</target>
<!--C:\GenesisLog\${shortdate}
C:\GenesisLog\${shortdate}-->
<!--MeterBatch-->
<target name="MeterBatch" xsi:type="File" fileName="${BasePath}\${shortdate}\${processname}\Meter_BASE.log" CreateDirs="True" layout ="${longdate} | ${level} | ${message} ${exception:format=toString}" archiveAboveSize="50000000" archiveFileName="${BasePath}\${shortdate}\${processname}\{##}_Meter_BASE.log" />
<!--Meter-->
<target name="MeterBase" xsi:type="File" fileName="${BasePath}\${shortdate}\${processname}\Meter_BASE.log" CreateDirs="True" layout ="${longdate} | ${level} | ${message} ${exception:format=toString}" archiveAboveSize="50000000" archiveFileName="${BasePath}\${shortdate}\${processname}\{##}_Meter_BASE.log" />
<target name="Slot:0" xsi:type="File" fileName="${BasePath}\${shortdate}\${processname}\Meter_SlotSlot:0.log" CreateDirs="True" layout ="${longdate} | ${level} | ${message} ${exception:format=toString}" archiveAboveSize="50000000" archiveFileName="${BasePath}\${shortdate}\${processname}\{##}_Meter_SlotSlot:0.log" />
<!--COM-->
<target name="COMBase" xsi:type="File" fileName="${BasePath}\${shortdate}\${processname}\COM_BASE.log" CreateDirs="True" layout ="${longdate} | ${level} | ${message} ${exception:format=toString}" archiveAboveSize="50000000" archiveFileName="${BasePath}\${shortdate}\${processname}\{##}_COM_BASE.log" />
<!--ServiceFwUpdateBuilder-->
<target name="ServiceFwUpdateBuilder" xsi:type="File" fileName="${BasePath}\${shortdate}\${processname}\ServiceFwUpdateBuilder.log" CreateDirs="True" layout ="${longdate} | ${level} | ${message} ${exception:format=toString}" archiveAboveSize="50000000" archiveFileName="${BasePath}\${shortdate}\${processname}\{##}_ServiceFwUpdateBuilder.log" />
<!--ServiceFwUpdateLoader-->
<target name="ServiceFwUpdateLoader" xsi:type="File" fileName="${BasePath}\${shortdate}\${processname}\ServiceFwUpdateLoader.log" CreateDirs="True" layout ="${longdate} | ${level} | ${message} ${exception:format=toString}" archiveAboveSize="50000000" archiveFileName="${BasePath}\${shortdate}\${processname}\{##}_ServiceFwUpdateLoader.log" />
<!--ServiceFwUpdateSw-->
<target name="ServiceFwUpdateSw" xsi:type="File" fileName="${BasePath}\${shortdate}\${processname}\ServiceFwUpdateSw.log" CreateDirs="True" layout ="${longdate} | ${level} | ${message} ${exception:format=toString}" archiveAboveSize="50000000" archiveFileName="${BasePath}\${shortdate}\${processname}\{##}_ServiceFwUpdateSw.log" />
<!--default-->
<target name="default" xsi:type="File" fileName="${BasePath}\${shortdate}\${processname}\default.log" CreateDirs="True" layout ="${longdate} | ${level} | ${message} ${exception:format=toString}" archiveAboveSize="50000000" archiveFileName="${BasePath}\${shortdate}\${processname}\{##}_default.log" />
<target name="PreAdjWr" xsi:type="File" fileName="${BasePath}\${shortdate}\${processname}\PreAdjWr.log" CreateDirs="True" layout ="${longdate} | ${level} | ${message} ${exception:format=toString}" />
<target name="ctlBatch" xsi:type="File" fileName="${BasePath}\${shortdate}\${processname}\ctlBatch.log" CreateDirs="True" layout ="${longdate} | ${level} | ${message} ${exception:format=toString}" archiveAboveSize="50000000" archiveFileName="${BasePath}\${shortdate}\${processname}\{##}_ctlBatch.log" />
<target name="StreamingQualityFile" xsi:type="File" fileName="${BasePath}\${shortdate}\${processname}\StreamingQuality.log" CreateDirs="True" layout ="${longdate} | ${level} | ${message} ${exception:format=toString}" />
<target name="ProductionUIFile" xsi:type="File" fileName="${BasePath}\${shortdate}\${processname}\ProductionUIFile.log" CreateDirs="True" layout ="${longdate} | ${level} | ${message} ${exception:format=toString}" />
</targets>
<rules>
<!--ServiceFwUpdateBuilder-->
<logger name="ServiceFwUpdateBuilder" minLevel="Trace" appendTo="ServiceFwUpdateSw"/>
<!--ServiceFwUpdateLoader-->
<logger name="ServiceFwUpdateLoader" minLevel="Trace" appendTo="ServiceFwUpdateLoader"/>
<!--ServiceFwUpdateSw-->
<logger name="ServiceFwUpdateSw" minLevel="Trace" appendTo="ServiceFwUpdateSw"/>
<!--CalibrationHelper-->
<logger name="CalibrationHelper" minLevel="Trace" appendTo="CalibrationHelper"/>
<!--LedRawData-->
<logger name="LedRawDataBase" minLevel="Trace" appendTo="TargetLedRawDataBase"/>
<!--MeterBatch-->
<logger name="MeterBatch" minLevel="Trace" appendTo="MeterBatch"/>
<!--Meter-->
<logger name="MeterBase" minLevel="Trace" appendTo="MeterBase"/>
<logger name="Slot:0" minLevel="Trace" appendTo="Slot:0"/>
<logger name="GenesisRequestProtocolBase" minLevel="Trace" appendTo="MeterBase"/>
<logger name="MeasurementBase" minLevel="Trace" appendTo="MeterBase"/>
<!--COM-->
<logger name="SerialComPortBase" minLevel="Trace" appendTo="COMBase"/>
<logger name="IrdaBase" minLevel="Trace" appendTo="COMBase"/>
<logger name="RfidBase" minLevel="Trace" appendTo="COMBase"/>
<logger name="TransmitProtocolBase" minLevel="Trace" appendTo="COMBase"/>
<!--default-->
<logger name="*" minLevel="Debug" appendTo="default"/>
<!--Ui logger-->
<logger name="ctlBatch" minLevel="Trace" appendTo="ctlBatch"/>
<logger name="StreamingQuality" minLevel="Trace" appendTo="StreamingQualityFile"/>
<logger name="PreAdjWr" minLevel="Trace" appendTo="PreAdjWr"/>
<logger name="ProductionUI" minLevel="Trace" appendTo="ProductionUIFile"/>
</rules>
</nlog>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
</configuration>
@@ -1,312 +0,0 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>Xylem.Common.Hardware.Interfaces.Ports.PortCore</name>
</assembly>
<members>
<member name="T:Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments.BasePortDataEventArgs">
<inheritdoc cref="T:System.EventArgs" />
</member>
<member name="F:Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments.BasePortDataEventArgs._receivedTime">
<summary>
Marker for incoming record at time of the PC
</summary>
</member>
<member name="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments.BasePortDataEventArgs.GetData">
<inheritdoc />
</member>
<member name="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments.BasePortDataEventArgs.SetData(System.Object)">
<inheritdoc />
</member>
<member name="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments.BasePortDataEventArgs.SetReceivedTime(System.DateTimeOffset)">
<inheritdoc />
</member>
<member name="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments.BasePortDataEventArgs.GetReceivedTime">
<inheritdoc />
</member>
<member name="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments.BasePortDataEventArgs.SetSyncMarkRecord(Xylem.Common.CommonCore.Consts.SyncMarkRecord)">
<inheritdoc />
</member>
<member name="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments.BasePortDataEventArgs.GetSyncMarkRecord">
<inheritdoc />
</member>
<member name="T:Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments.IPortDataEventArgs">
<summary>
Interface for port data event arguments
</summary>
</member>
<member name="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments.IPortDataEventArgs.GetData">
<summary>
Read data
</summary>
<returns></returns>
</member>
<member name="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments.IPortDataEventArgs.SetData(System.Object)">
<summary>
Write data
</summary>
<param name="data"></param>
</member>
<member name="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments.IPortDataEventArgs.GetReceivedTime">
<summary>
Reading received time
</summary>
<returns></returns>
</member>
<member name="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments.IPortDataEventArgs.SetReceivedTime(System.DateTimeOffset)">
<summary>
Writing received time
</summary>
<param name="receivedTime"></param>
</member>
<member name="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments.IPortDataEventArgs.SetSyncMarkRecord(Xylem.Common.CommonCore.Consts.SyncMarkRecord)">
<summary>
Setting the data marker
</summary>
<param name="syncMarkRecord"></param>
</member>
<member name="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments.IPortDataEventArgs.GetSyncMarkRecord">
<summary>
Getting the data marker
</summary>
<returns></returns>
</member>
<member name="T:Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments.ListBytePortDataEventArgs">
<inheritdoc />
</member>
<member name="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments.ListBytePortDataEventArgs.#ctor(System.Collections.Generic.List{System.Byte},System.DateTimeOffset,Xylem.Common.CommonCore.Consts.SyncMarkRecord)">
<inheritdoc />
</member>
<member name="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments.ListBytePortDataEventArgs.GetData">
<inheritdoc />
</member>
<member name="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments.ListBytePortDataEventArgs.SetData(System.Object)">
<inheritdoc />
</member>
<member name="T:Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments.StringPortDataEventArgs">
<inheritdoc />
</member>
<member name="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments.StringPortDataEventArgs.#ctor(System.String,System.DateTimeOffset,Xylem.Common.CommonCore.Consts.SyncMarkRecord)">
<inheritdoc />
</member>
<member name="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments.StringPortDataEventArgs.GetData">
<inheritdoc />
</member>
<member name="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments.StringPortDataEventArgs.SetData(System.Object)">
<inheritdoc />
</member>
<member name="T:Xylem.Common.Hardware.Interfaces.Ports.PortCore.IPort">
<summary>
Interface for Ports
</summary>
</member>
<member name="E:Xylem.Common.Hardware.Interfaces.Ports.PortCore.IPort.OnRawRecordReceived">
<summary>
event for record received, either bytes or string
</summary>
</member>
<member name="E:Xylem.Common.Hardware.Interfaces.Ports.PortCore.IPort.OnRawRecordSendOut">
<summary>
event for record received, either bytes or string
</summary>
</member>
<member name="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.IPort.SynchronizeReceiveBuffer(Xylem.Common.CommonCore.Consts.SyncMarkRecord)">
<summary>
set specific mark
and flush or delete all incoming byte from buffer when SyncMarkRecord is <see cref="F:Xylem.Common.CommonCore.Consts.SyncMarkRecord.SyncStart"/> or
<see cref="F:Xylem.Common.CommonCore.Consts.SyncMarkRecord.SyncEnd"/>
</summary>
<param name="syncMarkRecord"></param>
</member>
<member name="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.IPort.Open">
<summary>
if the port needs stuff to open, always open for better logical handling
</summary>
</member>
<member name="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.IPort.Dispose">
<summary>
close and dispose all connections
</summary>
</member>
<member name="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.IPort.IsOpen">
<summary>
indicates if the Port is open (also on Ports that did not have an open state)
</summary>
<returns></returns>
</member>
<member name="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.IPort.PortWrite(System.Byte[])">
<summary>
Write byte[] to the Stream/Port on Child Class
wrapped with base class error handling
</summary>
<param name="data">Array of bytes to write</param>
</member>
<member name="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.IPort.Clear">
<summary>
discard all buffers
</summary>
</member>
<member name="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.IPort.GetPortName">
<summary>
Return the port name
</summary>
<returns>name of the port as string</returns>
</member>
<member name="T:Xylem.Common.Hardware.Interfaces.Ports.PortCore.PortConfig">
<summary>
Collection of port settings
</summary>
</member>
<member name="P:Xylem.Common.Hardware.Interfaces.Ports.PortCore.PortConfig.PortName">
<summary>
Assigns a port name and creates the serial port object
Port name e.g. "COM2"
</summary>
</member>
<member name="P:Xylem.Common.Hardware.Interfaces.Ports.PortCore.PortConfig.Type">
<summary>
setup of port type from name (referenced as "Type" in config file)
</summary>
</member>
<member name="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.PortConfig.GetSerialPort">
<summary>
using dotNets <see cref="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.PortConfig.GetSerialPort"/> for connection
</summary>
</member>
<member name="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.PortConfig.SetSerialPort(System.IO.Ports.SerialPort)">
<summary>
using dotNets <see cref="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.PortConfig.GetSerialPort"/> for connection
</summary>
</member>
<member name="T:Xylem.Common.Hardware.Interfaces.Ports.PortCore.SlotConfig">
<summary>
Container for port configuration
</summary>
</member>
<member name="P:Xylem.Common.Hardware.Interfaces.Ports.PortCore.SlotConfig.Slot">
<summary>
Slot number
</summary>
</member>
<member name="P:Xylem.Common.Hardware.Interfaces.Ports.PortCore.SlotConfig.Request">
<summary>
Request port settings
</summary>
</member>
<member name="P:Xylem.Common.Hardware.Interfaces.Ports.PortCore.SlotConfig.Streaming">
<summary>
Streaming port settings
</summary>
</member>
<member name="P:Xylem.Common.Hardware.Interfaces.Ports.PortCore.SlotConfig.Type">
<summary>
Streaming port settings
</summary>
</member>
<member name="T:Xylem.Common.Hardware.Interfaces.Ports.PortCore.SlotType">
<summary>
Definition of type for slot
</summary>
</member>
<member name="F:Xylem.Common.Hardware.Interfaces.Ports.PortCore.SlotType.DutMeter">
<summary>
Cordonel used as DUT with two serial ports
</summary>
</member>
<member name="F:Xylem.Common.Hardware.Interfaces.Ports.PortCore.SlotType.TemperatureMeter">
<summary>
Cordonel used as temperature meter with one serial port streaming the temperature
</summary>
</member>
<member name="T:Xylem.Common.Hardware.Interfaces.Ports.PortCore.TransmitPortSettings">
<summary>
Store Port settings set most likely from transmit protocol
</summary>
</member>
<member name="M:Xylem.Common.Hardware.Interfaces.Ports.PortCore.TransmitPortSettings.#ctor(System.Nullable{System.Byte},System.Nullable{System.UInt16},System.UInt16,System.Int32,System.UInt32,System.Nullable{System.UInt32},System.Boolean,System.Char,System.Int32,System.IO.Ports.Parity)">
<summary>
The transmission protocol needs to inform the communication port how to set up,
this is the data container.
</summary>
<param name="protSyncByte"></param>
<param name="protLengthIndex"></param>
<param name="protAddLength"></param>
<param name="responseTimeoutMs"></param>
<param name="baudRate"></param>
<param name="receiveBufferFlushThreshold"></param>
<param name="doubleSyncByte"></param>
<param name="stringDelimiter"></param>
<param name="dataBits"></param>
<param name="parity"></param>
<remarks date="2026-Jan-05" author="T.Wiedebusch">
- String delimiter for ASCII to support others than LF "\n",
- Flexible DataBits,
- Flexible parity.
</remarks>
</member>
<member name="F:Xylem.Common.Hardware.Interfaces.Ports.PortCore.TransmitPortSettings.StringDelimiter">
<summary>
String delimiter for ASCII to support others than LF "\n"
</summary>
</member>
<member name="F:Xylem.Common.Hardware.Interfaces.Ports.PortCore.TransmitPortSettings.DataBits">
<summary>
Flexible DataBits to support 7 bits.
</summary>
</member>
<member name="F:Xylem.Common.Hardware.Interfaces.Ports.PortCore.TransmitPortSettings.Parity">
<summary>
Flexible parity
</summary>
</member>
<member name="F:Xylem.Common.Hardware.Interfaces.Ports.PortCore.TransmitPortSettings.ProtSyncByte">
<summary>
start of receiving synchronization byte at byte receive routine
syncByte == null: use the readLine routine (ASCII) and NOT the BYTE routine,
lengthPosition and additionalLength are not used
</summary>
</member>
<member name="F:Xylem.Common.Hardware.Interfaces.Ports.PortCore.TransmitPortSettings.ProtLengthIndex">
<summary>
position of length information field in received BYTE record
lengthIndex == null: take the constant receive length of additionalLength
because the record doesn't contain length information
</summary>
</member>
<member name="F:Xylem.Common.Hardware.Interfaces.Ports.PortCore.TransmitPortSettings.ProtAddLength">
<summary>
additional record length NOT covert by the record length information field
lengthIndex == null: constant length for received record
Being used for the BYTE records indicated by a valid syncByte,
not being used for ASCII records.
</summary>
</member>
<member name="F:Xylem.Common.Hardware.Interfaces.Ports.PortCore.TransmitPortSettings.ResponseTimeoutMs">
<summary>
Response time out in milliseconds
</summary>
</member>
<member name="F:Xylem.Common.Hardware.Interfaces.Ports.PortCore.TransmitPortSettings.BaudRate">
<summary>
BaudRate for Port
</summary>
</member>
<member name="F:Xylem.Common.Hardware.Interfaces.Ports.PortCore.TransmitPortSettings.ReceiveBufferFlushThreshold">
<summary>
lower threshold for buffer flushing if dataMarker != SkipDecoding
receiveBufferFlushThreshold == null: never flush the communication buffer
receiveBufferFlushThreshold == 0: flush always the communication buffer
receiveBufferFlushThreshold == x: flush communication buffer if it exceeds x Byte
waste old records if an up-to-date record is being needed for start/stop synchronization
of a measurement. This is the level at which the old data have to be flushed because the
data have been dammed up in the communication port input buffer which means they are to
old for synchronization purposes.
/// </summary>
</member>
<member name="F:Xylem.Common.Hardware.Interfaces.Ports.PortCore.TransmitPortSettings.DoubleSyncByte">
<summary>
a special implementation may require the doubling of the sync byte to re-synchronize
</summary>
</member>
</members>
</doc>
@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
@@ -1,384 +0,0 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages</name>
</assembly>
<members>
<member name="T:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.EventArguments.CalibDataEventArgs">
<inheritdoc />
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.EventArguments.CalibDataEventArgs.CalibChl">
<summary>
Stream record for calibration on channel
</summary>
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.EventArguments.CalibDataEventArgs.GetEventData">
<inheritdoc />
</member>
<member name="T:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.EventArguments.BendDetectDataEventArgs">
<inheritdoc />
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.EventArguments.BendDetectDataEventArgs.NewData">
<summary>
new record from Stream
</summary>
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.EventArguments.BendDetectDataEventArgs.GetEventData">
<inheritdoc />
</member>
<member name="T:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.EventArguments.FlowDataEventArgs">
<inheritdoc />
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.EventArguments.FlowDataEventArgs.NewData">
<summary>
new record from Stream
</summary>
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.EventArguments.FlowDataEventArgs.GetEventData">
<inheritdoc />
</member>
<member name="T:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.EventArguments.RegisterUpdatedEventArgs">
<inheritdoc />
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.EventArguments.RegisterUpdatedEventArgs.#ctor(Xylem.Common.Hardware.WaterMeter.Genesis.Registers.RegisterDefinition,System.Byte[])">
<inheritdoc />
<summary>
Ctor with base record
</summary>
<param name="register">base record <see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.EventArguments.RegisterUpdatedEventArgs.Register" /></param>
<param name="value">base record <see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.EventArguments.RegisterUpdatedEventArgs.Value" /></param>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.EventArguments.RegisterUpdatedEventArgs.Register">
<summary>
Register witch has updated
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.EventArguments.RegisterUpdatedEventArgs.Value">
<summary>
New Value in Register
</summary>
</member>
<member name="T:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.EventArguments.RequestResponseDataEventArgs">
<inheritdoc />
<summary>
EventArgs for Request Responses
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.EventArguments.RequestResponseDataEventArgs.RequestResponseData">
<summary>
Request response from meter
</summary>
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.EventArguments.RequestResponseDataEventArgs.GetEventData">
<inheritdoc />
</member>
<member name="T:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.BendDetectionRecord">
<inheritdoc />
<summary>
Streaming record for protocol M (information about bend detection and correction)
</summary>
</member>
<member name="T:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.BendDetectionRecord.StatusBendU0Enum">
<summary>
The status of the U0 detection for this measurement
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.BendDetectionRecord.StatusBendU0Enum.OKAY">
<summary>
Status okay
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.BendDetectionRecord.StatusBendU0Enum.ERROR_GENESISFLOW_INSTALLATION_HIGH_TIME_DIFF">
<summary>
Error code as defined by field name
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.BendDetectionRecord.StatusBendU0Enum.ERROR_GENESISFLOW_INSTALLATION_LOW_FLOW_IGNORE">
<summary>
Error code as defined by field name
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.BendDetectionRecord.StatusBendU0Enum.ERROR_GENESISFLOW_INSTALLATION_BAD_CHANNELS">
<summary>
Error code as defined by field name
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.BendDetectionRecord.StatusBendU0Enum.ERROR_GENESISFLOW_INSTALLATION_FIXED">
<summary>
Error code as defined by field name
</summary>
</member>
<member name="T:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.BendDetectionRecord.InstallationTypeEnum">
<summary>
An enum describing the installation type detected
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.BendDetectionRecord.InstallationTypeEnum.INSTALLATION_U0_180_360">
<summary>
Installation type code as defined by field name
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.BendDetectionRecord.InstallationTypeEnum.INSTALLATION_U0_90_270">
<summary>
Installation type code as defined by field name
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.BendDetectionRecord.InstallationTypeEnum.INSTALLATION_UNDISTURBED">
<summary>
Installation type code as defined by field name
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.BendDetectionRecord.StatusBendU0">
<summary>
Status of U0 Bend detection
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.BendDetectionRecord.InstallationType">
<summary>
Installation type code
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.BendDetectionRecord.CorrectionFactor_percent">
<summary>
The proportion of the installation correction to apply based on the detected
installation. 100% == 0x8000
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.BendDetectionRecord.DefaultCorrectionFactor">
<summary>
The default proportion of the installation correction to apply based on the
detected installation. 100% == 0x8000
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.BendDetectionRecord.CorrectionFactorScale">
<summary>
Scale for correction factor to apply to convert it to percentage value 100% == 0x8000
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.BendDetectionRecord.PreCorrectionVolumeRaw">
<summary>
The volume in internal units before correction applied
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.BendDetectionRecord.PostCorrectionVolumeRaw">
<summary>
The volume in internal units after correction applied
</summary>
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.BendDetectionRecord.ToString">
<summary>
Get result as string
</summary>
<returns></returns>
</member>
<member name="T:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.CalibrationRecord">
<inheritdoc />
<summary>
hold streaming record for protocol H (contains calibration record)
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.CalibrationRecord.Validation">
<summary>
record validation
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.CalibrationRecord.TotalTimeOfFlightS">
<summary>
total time of flight in seconds
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.CalibrationRecord.DeltaTimeOfFlightS">
<summary>
delta time of flight in seconds
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.CalibrationRecord.RawTotalTimeOfFlight">
<summary>
total time of flight in cordonel units
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.CalibrationRecord.RawDeltaTimeOfFlight">
<summary>
delta time of flight in cordonel units
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.CalibrationRecord.VolumeScaleRawPerMl">
<summary>
volume scale (default: 1024) means
1024digits = 1ml
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.CalibrationRecord.VolumeFactorRawToQm">
<summary>
volume factor to convert raw to m³
uses 1E-6 (ml to m³) / VolumeScaleRawPerMl
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.CalibrationRecord.DeltaVolumeRaw">
<summary>
raw volume between two samples
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.CalibrationRecord.DeltaVolumeQm">
<summary>
calculated out of dRawVolume * VolumeFactorRawToQm .
in cubic meters
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.CalibrationRecord.AccuVolumeRaw">
<summary>
accumulated raw volume
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.CalibrationRecord.SampleIntervalS">
<summary>
sample interval between two samples in seconds
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.CalibrationRecord.AmplitudeUpV">
<summary>
high threshold amplitude in V
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.CalibrationRecord.AmplitudeDownV">
<summary>
low threshold amplitude in V
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.CalibrationRecord.PulseWidthRatioUp">
<summary>
high ratio for pulse width
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.CalibrationRecord.PulseWidthRatioDown">
<summary>
low ratio for pulse width
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.CalibrationRecord.TemperatureRaw">
<summary>
raw temperature
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.CalibrationRecord.TemperaturePowFactor">
<summary>
temperature scale
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.CalibrationRecord.TemperatureDegC">
<summary>
calculated temperature in degree C
</summary>
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.CalibrationRecord.ToString">
<summary>
Get result as string
</summary>
<returns></returns>
</member>
<member name="T:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.FlowTestRecord">
<inheritdoc />
<summary>
struct to hold Led record for protocol F (contains measurement record)
</summary>
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.FlowTestRecord.ToString">
<summary>
Get result as string
</summary>
<returns></returns>
</member>
<member name="T:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.RadioConfigurationParams">
<summary>
All parameters needed for radio setup
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.RadioConfigurationParams.PcbId">
<summary>
Pcb identification
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.RadioConfigurationParams.SerialNumber">
<summary>
Serial number
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.RadioConfigurationParams.RadioAddress">
<summary>
Radio address
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.RadioConfigurationParams.PowerLevel">
<summary>
Power level
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.RadioConfigurationParams.PowerLevelOption">
<summary>
Power level option
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.RadioConfigurationParams.ImpedanceCodeNew">
<summary>
New code for impedance
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.RadioConfigurationParams.ImpedanceCodeOption">
<summary>
Impedance code option
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.RadioConfigurationParams.EncryptionKey">
<summary>
Encryption key
</summary>
</member>
<member name="P:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.RadioConfigurationParams.FrqOffset">
<summary>
Frequency offset
</summary>
</member>
<member name="T:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.RegisterToDb">
<summary>
</summary>
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.RegisterToDb.#ctor(System.Byte[],System.Byte[])">
<summary>
Register address and value to DB
</summary>
<param name="adresse"></param>
<param name="value"></param>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.RegisterToDb.Adresse">
<summary>
Address
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.RegisterToDb.Value">
<summary>
Value
</summary>
</member>
<member name="T:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.TempTofCalc">
<summary>
Temperature Time Of Flight calculation
</summary>
</member>
<member name="P:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.TempTofCalc.RefDate">
<summary>
Reference data
</summary>
</member>
<member name="P:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.TempTofCalc.RefTemp">
<summary>
Reference temperature
</summary>
</member>
<member name="P:Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.TempTofCalc.Tof">
<summary>
Time Of Flight
</summary>
</member>
</members>
</doc>
@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
@@ -1,697 +0,0 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol</name>
</assembly>
<members>
<member name="T:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands">
<summary>
Commands that the genesis meter support over the request protocol.
Functional Specification Breeze Core and Applications Revision:3.03(12748DOC11 - functional spec ICOE472.pdf)
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.Nop">
<summary>
9.2.5
Command 0x00 (NOP)
This command will do nothing, and will have no response.
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.QueryCaps">
<summary>
9.2.6
Command 0x01 (Query capabilities)
This command will be used by the external computer to discover the protocol parameters that may be varied.
These can then be compared with the external computers capabilities and the best match selected.
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.QueryCapsReply">
<summary>
response on <see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.QueryCaps"/>
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.SetCaps">
<summary>
9.2.7
Command 0x03 (Set capabilities)
Used to finalize the baud rate and packet settings after negotiation.
The reply will be sent at the currently selected baud rate and packet length,
after which the settings will take effect
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.SetCapsReply">
<summary>
response on <see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.SetCaps"/>
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.Train">
<summary>
9.2.8
Command 0x05 (Train)
This command will perform target driven data training, that is, where the target is in control of the data flow.
See also command 0x11.
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.TrainReply">
<summary>
response on <see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.Train"/>
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.RepeatLast">
<summary>
9.2.9
Command 0x07 (Repeat last)
Used by the external computer to request the last response to be resent, for example if it was found to be corrupted.
Note that the response 0x08 will never be sent, the reply to command 0x07 will be a verbatim resend of the last response.
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.RepeatLastReply">
<summary>
response on <see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.RepeatLast"/>
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.ReadData">
<summary>
9.2.10
Command 0x09 (Read data)
This command makes reads of any random selection of configuration registers, up to the maximum packet size negotiated.
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.ReadDataReply">
<summary>
response on <see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.ReadData"/>
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.WriteData">
<summary>
9.2.11
Command 0x0B (Write data)
This command makes writes to any random selection of configuration registers, up to the maximum packet size negotiated.
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.WriteDataReply">
<summary>
response on <see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.WriteData"/>
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.MultipleReadData">
<summary>
9.2.12
Command 0x0D (Multiple read data)
This command makes reads of one register multiple times, which will be more efficient than performing successive reads using command 0x09.
This command will be available from protocol version 0.40, for earlier protocol versions command 0x09 should be used.
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.MultipleReadDataReply">
<summary>
response on <see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.MultipleReadData"/>
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.MultipleWriteData">
<summary>
9.2.13
Command 0x0F (Multiple write data)
This command makes writes to one register multiple times, which will be more efficient than performing successive reads using command 0x0B.
This command will be available from protocol version 0.40, for earlier protocol versions command 0x0B should be used.
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.MultipleWriteDataReply">
<summary>
response on <see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.MultipleWriteData"/>
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.SetLevel">
<summary>
9.2.14
Command 0x11 (Set level)
This command will perform external driven data training, that is, where the external computer is in control of the data flow.
This command will be available from protocol version 0.42, for earlier protocol versions command 0x05 should be used.
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.SetLevelReply">
<summary>
response on <see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.SetLevel"/>
</summary>
</member>
<member name="T:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.ConfigExErrors">
<summary>
Config Exchange error codes.
</summary>
</member>
<member name="T:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.HighLevelErrors">
<summary>
Transport errors for request protocol
</summary>
</member>
<member name="T:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.LowLevelErrors">
<summary>
List of constance for error codes from genesis meter
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.LowLevelErrors.NoError">
<summary>
everything is fine
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.LowLevelErrors.SerialPortClosed">
<summary>
Port is not open
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.LowLevelErrors.SerialPortWriteFailure">
<summary>
fails to write to serial port
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.LowLevelErrors.SerialPortReadFailure">
<summary>
fails to read from serial port
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.LowLevelErrors.MaxDataLength">
<summary>
Command is to long
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.LowLevelErrors.Exception">
<summary>
deeper exception, check out log if this happen
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.LowLevelErrors.CrcCalcError">
<summary>
wrong CRC
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.LowLevelErrors.Unknown">
<summary>
something strange
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.LowLevelErrors.Timeout">
<summary>
Timeout occur
</summary>
</member>
<member name="T:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.RequestAcknowledgeState">
<summary>
Acknowledge feedback from meter after communication
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.RequestAcknowledgeState.CommandNotAssigned">
<summary>
Acknowledge code for unassigned command
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.RequestAcknowledgeState.Unsent">
<summary>
Will be used initially as the record is not sent
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.RequestAcknowledgeState.NoResponse">
<summary>
Response missing
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.RequestAcknowledgeState.CommandError">
<summary>
Response command not match the required command
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.RequestAcknowledgeState.AuthorizationRequired">
<summary>
Lost connection (logged out from meter), a re-authorization is required
to access this command and/or register
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.RequestAcknowledgeState.MeterError">
<summary>
Meter error received, a retry may be useful
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.RequestAcknowledgeState.DecodingError">
<summary>
The response record couldn't be decoded
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.RequestAcknowledgeState.WakeupMessage">
<summary>
The meter sent a wakeup message instead of the required data
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.RequestAcknowledgeState.Ok">
<summary>
Valid meter response record
</summary>
</member>
<member name="T:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Exceptions.RequestProtocolException">
<summary>
Holds all errors can occur on the request protocol
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Exceptions.RequestProtocolException.Command">
<summary>
Exception occurred on this command
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Exceptions.RequestProtocolException.ReceivedData">
<summary>
Exception occurred while receiving this data
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Exceptions.RequestProtocolException.ConfigExErrorCode">
<summary>
Error is interpreted and has a define error code
if its not null is Genesis.Protocols.Request.Const.ConfigExErrors
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Exceptions.RequestProtocolException.HighLevelErrorCode">
<summary>
Error is interpreted and has a define error code
if its not null is Genesis.Protocols.Request.Const.HighLevelError
</summary>
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Exceptions.RequestProtocolException.#ctor(System.String)">
<summary>
Ctor with only message
</summary>
<param name="message">error message</param>
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Exceptions.RequestProtocolException.#ctor(System.String,System.Object)">
<summary>
Ctor with message and <see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Exceptions.RequestProtocolException.Command"/>
</summary>
<param name="message">error message</param>
<param name="command"><see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Exceptions.RequestProtocolException.Command"/></param>
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Exceptions.RequestProtocolException.#ctor(System.String,System.Object,System.Object)">
<summary>
Ctor with message, <see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Exceptions.RequestProtocolException.Command"/> and <see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Exceptions.RequestProtocolException.ReceivedData"/>
</summary>
<param name="message">error message</param>
<param name="command"><see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Exceptions.RequestProtocolException.Command"/></param>
<param name="receivedData"><see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Exceptions.RequestProtocolException.ReceivedData"/> </param>
</member>
<member name="T:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestRecord">
<summary>
Holds request commands with detail parameters to see processing state
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestRecord.ResponseCommand">
<summary>
Indicates the base command <see cref="T:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands" />
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestRecord.Register">
<summary>
the register the command refers to.
needed to set Register dictionary to link response with dictionary key
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestRecord.Acknowledge">
<summary>
Command acknowledged
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestRecord.RetryCtr">
<summary>
Retry counter
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestRecord.WakeupMessageRetryCtr">
<summary>
Wakeup-message retry counter
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestRecord.ResponseErrorBase">
<summary>
indicates error base on <see cref="T:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestRecord"/>
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestRecord.ResponseErrorReason">
<summary>
indicates error reason on <see cref="T:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestRecord"/>
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestRecord.ResponseErrorCode">
<summary>
Combined error code of base and reason
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestRecord.ResponseErrorPosition">
<summary>
Chunk position of error on multiple read/write access
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestRecord.RequestProtocolData">
<summary>
Data containing the request protocol
</summary>
</member>
<member name="P:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestRecord.EncodedRequestData">
<summary>
Encoded with transmit protocol, ready to stream to port as is
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestRecord.ResponsePayload">
<summary>
Extracted payload of response
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestRecord.ResponseTimeoutMs">
<summary>
Extracted payload of response
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestRecord.HideDataInLog">
<summary>
avoid logging for e.g. password
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestRecord.SkipRetryErrorCode">
<summary>
error mask to skip retries for functional errors <see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestRecord.ResponseErrorCode"/>
</summary>
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestRecord.#ctor(System.Byte,System.Collections.Generic.List{System.Byte},System.Collections.Generic.List{System.Byte},System.Int32,Xylem.Common.Hardware.WaterMeter.Genesis.Registers.RegisterDefinition,System.Boolean,System.UInt16)">
<summary>
Ctor for an base command <see cref="T:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands" />
</summary>
<param name="command"><see cref="T:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands" /> as an byte</param>
<param name="requestProtocolData">Request protocol data for logging</param>
<param name="encodedRequestData"> Ready to send data encoded with transmit protocol retries</param>
<param name="responseTimeoutMs">Timeout for response</param>
<param name="register"><see cref="T:Xylem.Common.Hardware.WaterMeter.Genesis.Registers.RegisterDefinition"/> to do command with</param>
<param name="hideDataInLog">hiding data in log file to avoid spying of passwords</param>
<param name="skipRetryErrorCode">error mask to skip retries <see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestRecord.ResponseErrorCode"/></param>
</member>
<member name="T:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.EventArguments.AuthorizationRequiredEventArgs">
<inheritdoc />
<summary>
if session is gone and a re authorization is necessary
</summary>
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.EventArguments.AuthorizationRequiredEventArgs.#ctor(Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestRecord)">
<inheritdoc />
<summary>
Ctor
</summary>
<param name="command">this command will be resend after authorization</param>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.EventArguments.AuthorizationRequiredEventArgs.Command">
<summary>
Command to resend
</summary>
</member>
<member name="T:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestProtocol">
<summary>
a bidirectional protocol support read and write genesis meter registers
needed for
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestProtocol._recordsSendFifo">
<summary>
FIFO of records to be send next
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestProtocol._recordInProcess">
<summary>
This is the actual record in the send loop
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestProtocol.LastCommTime">
<summary>
Last communication time for session refresh
</summary>
</member>
<member name="E:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestProtocol.OnRecordReadyToSend">
<inheritdoc />
</member>
<member name="E:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestProtocol.OnRecordIsDecoded">
<inheritdoc />
</member>
<member name="E:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestProtocol.OnAuthorizationGrant">
<summary>
Occurs when a meter Response for write password is good
</summary>
</member>
<member name="E:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestProtocol.OnMeterRegisterUpdated">
<summary>
Event after a register entries changed
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestProtocol.AdditionalRetryTimeoutMs">
<summary>
User adjustable additional retry timeout. This is 0 ms for standard operation.
</summary>
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestProtocol.#ctor(System.String)">
<inheritdoc />
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestProtocol.ProcessRecordList">
<summary>
Process all records needed to be sent, this routine has to be called
to kick-off the communication of all RequestRecords saved to the send
FIFO <see cref="M:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestProtocol.AddRecordToSendFifo(System.Byte,System.Byte[],Xylem.Common.Hardware.WaterMeter.Genesis.Registers.RegisterDefinition,System.Boolean,System.UInt16)"/>
</summary>
<remarks date="2018-Dec-07" author="T.Wiedebusch">
- Initial
</remarks>
<remarks date="2018-Dec-09" author="T.Wiedebusch">
- Logging of raw RequestProtocol at time of sending,
- Logging of retries.
</remarks>
<remarks date="2018-Dec-12" author="T.Wiedebusch">
- Added timeout from transmit protocol.
</remarks>
<remarks date="2019-Jan-02" author="Drabesch">
- Added reorder FIFO to bring login at first position
</remarks>
<remarks date="2019-Apr-11" author="T.Wiedebusch">
- Hide data in logging for e.g. passwords
</remarks>
<remarks date="2019-Jun-06" author="T.Wiedebusch">
- Retry counter reset if authorization required and this record will be put back into FIFO,
- Retry delay corrected for all errors.
</remarks>
<remarks date="2019-Jun-12" author="T.Wiedebusch">
- Dynamic retry delay: ResponseTimeoutMs * Retry counter.
</remarks>
<remarks date="2019-Jun-28" author="T.Wiedebusch">
- Skip retries on specific error mask to speed up communication on functional errors
or informational feed backs (e.g FW not installed 0x0004)
<see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestRecord.ResponseErrorCode"/>
</remarks>
<remarks date="2019-Aug-29" author="T.Wiedebusch">
- User adjustable additional retry timeout.
</remarks>
<remarks date="2020-Jan-17/18" author="T.Wiedebusch">
- Response timeout message output,
- Initialize acknowledge code before communication to NoResponse.
</remarks>
<remarks date="2020-Jan-22" author="T.Wiedebusch">
- Response timeout deviated from system time.
</remarks>
<remarks date="2021-Feb-02" author="T.Wiedebusch">
- Avoid enqueue of _recordInProcess if retry counter is 0.
</remarks>
<remarks date="2022-Nov-04" author="T.Wiedebusch">
- Additional DEBUG information included about FIFO and loops.
</remarks>
<remarks date="2022-Nov-07" author="T.Wiedebusch">
- Command not assigned response for recordInProcess == null.
</remarks>
<remarks date="2024-Apr-22" author="T.Wiedebusch">
- Initial request acknowledge state changed from NotDecoded to NoResponse.
</remarks>
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestProtocol.AddRecordToSendFifo(System.Byte,System.Byte[],Xylem.Common.Hardware.WaterMeter.Genesis.Registers.RegisterDefinition,System.Boolean,System.UInt16)">
<summary>
Assemble record with transmit protocol and put it to record-send-FIFO,
backup the ready-to-send, which is the dataEncodedWithTransmitProtocol,
to the RequestRecord object for sending including the retry capability.
</summary>
<param name="payload">Data package with all details like CRC, etc</param>
<param name="cmd">Command identifier <see cref="T:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands" /></param>
<param name="register"><see cref="T:Xylem.Common.Hardware.WaterMeter.Genesis.Registers.RegisterDefinition" /> which is intend</param>
<param name="hideDataInLog">hiding data in log file to avoid spying of passwords</param>
<param name="skipRetryErrorCode">error mask to skip retries</param>
<returns>the assembled record for the send FIFO</returns>
<remarks date="2018-Dec-08" author="T.Wiedebusch">
- Initial
</remarks>
<remarks date="2018-Dec-09" author="T.Wiedebusch">
- Logging of raw data (RequestProtocol) moved to ProcessRecordList.
</remarks>
<remarks date="2018-Dec-12" author="T.Wiedebusch">
- Added timeout from transmit protocol.
</remarks>
<remarks date="2019-Apr-11" author="T.Wiedebusch">
- Hide data in logging for e.g. passwords
</remarks>
<remarks date="2019-Jun-28" author="T.Wiedebusch">
- Skip retries on specific error mask to speed up communication on functional errors
or informational feed backs (e.g FW not installed 0x0004)
<see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestRecord.ResponseErrorCode"/>
</remarks>
<remarks date="2020-Jan-18" author="T.Wiedebusch">
- Initial skip retry error code set to 0x0004 (e.g FW not installed 0x0004).
</remarks>
<remarks date="2023-Mai-16" author="T.Wiedebusch">
- Hide data in log forwarded to DecodeDateForPhysicalLayer to hide passwords in log files.
</remarks>
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestProtocol.AddRecordToSendFifoUI1236(System.String,System.Byte[],Xylem.Common.Hardware.WaterMeter.Genesis.Registers.RegisterDefinition,System.Boolean,System.UInt16)">
<summary>
Record dispatcher to send FIFO of UI1236 command
</summary>
<remarks date="2022-Aug-24" author="R.Drabesch">
- Initial
</remarks>
<param name="ident">string for logging of slot</param>
<param name="payload">Data package with all details like CRC, etc</param>
<param name="register"><see cref="T:Xylem.Common.Hardware.WaterMeter.Genesis.Registers.RegisterDefinition" /> which is intend</param>
<param name="hideDataInLog">hiding data in log file to avoid spying of passwords</param>
<param name="skipRetryErrorCode">error mask to skip retries</param>
<returns>the assembled record for the send FIFO</returns>
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestProtocol.DecodeRecord(Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments.IPortDataEventArgs)">
<summary>
Called after successful response.
Decode and check record, handle Errors and dispatch result.
Invokes <see cref="E:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestProtocol.OnRecordIsDecoded" />if somebody is listening
</summary>
<remarks date="2018-Mar-15" author="R.Drahbesch">
- Initial
</remarks>
<remarks date="2018-Dec-08" author="T.Wiedebusch">
- First part reworked to extract the response protocol information
</remarks>
<remarks date="2019-Apr-11" author="T.Wiedebusch">
- Hide data in logging for e.g. passwords
</remarks>
<remarks date="2019-Jun-28" author="T.Wiedebusch">
- Error code extraction changed for <see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestRecord.SkipRetryErrorCode"/>
</remarks>
<remarks date="2019-Dec-12/16" author="T.Wiedebusch">
- Wakeup-message will avoid further timeout (during FW update this is in the range
of 15000ms).
- Allow one additional retry on decoding error, which is often the wakeup-message.
</remarks>
<remarks date="2019-Jan-17" author="T.Wiedebusch">
- Send time reminder for timeout time calculation as output in log-file,
- OnRecordIsDecoded?.Invoke moved before return to assure that the Acknowledge status is set.
</remarks>
<remarks date="2019-Jan-22" author="T.Wiedebusch">
- Avoid activation of wakeup retry if record is meanwhile acknowledged.
</remarks>
<remarks date="2022-Jul-19" author="T.Wiedebusch">
- Wakeup message handling changed,
- Multiple replies on wakeup message allowed.
</remarks>
<remarks date="2022-Oct-02" author="T.Wiedebusch">
- On wakeup message 5 retires are allowed to avoid an infinite loop.
</remarks>
<remarks date="2022-Oct-04" author="T.Wiedebusch">
- On wakeup message exit this routine.
</remarks>
<remarks date="2023-Feb-13" author="T.Wiedebusch">
- Early exit on _recordInProcess == null,
- Wakeup message retries from 5 to 2,
- Removed error base from error code decision as error base is only the AppId
</remarks>
<remarks date="2023-Sep-01" author="T.Wiedebusch">
- HideDataInLog.
</remarks>
<remarks date="2024-Jan-24" author="T.Wiedebusch">
- Ignore wakeup if message already acknowledged (avoid to set
"_recordInProcess.Acknowledge = RequestAcknowledgeState.NotDecoded"),
- Avoid to overwrite "_recordInProcess.Acknowledge = RequestAcknowledgeState.Acknowledge" with
"RequestAcknowledgeState.WakeupMessage".
</remarks>
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestProtocol.CommandToMeter(System.Byte,Xylem.Common.Hardware.WaterMeter.Genesis.Registers.RegisterDefinition,System.Byte[],System.Nullable{System.Int32},System.Boolean,System.UInt16)">
<summary>
Method to send basic Commands to Meter. Creates an integer of 4 bytes for the payload.
Supported Commands are: <see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.ReadData" />,<see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.MultipleReadData" />,
<see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.WriteData" />, <see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.MultipleWriteData" /> and <see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.QueryCaps" />.
Calculate CRCs and Command length and check if command is valid.
Use <see cref="M:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestProtocol.AddRecordToSendFifo(System.Byte,System.Byte[],Xylem.Common.Hardware.WaterMeter.Genesis.Registers.RegisterDefinition,System.Boolean,System.UInt16)" /> to push data to Port/Meter.
</summary>
<param name="command">
Supported <see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.ReadData" />,<see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.MultipleReadData" />,
<see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.WriteData" />, <see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.MultipleWriteData" /> and <see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.QueryCaps" />.
</param>
<param name="meterRegister">Register to Read or Write, null for <see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.QueryCaps" /></param>
<param name="payload">
Data to push into the <see cref="T:Xylem.Common.Hardware.WaterMeter.Genesis.Registers.RegisterDefinition" />.
must be null on Read Commands ( <see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.ReadData" />,<see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.MultipleReadData" />)
and not null on WriteData (<see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.WriteData" /> and <see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.Consts.Commands.MultipleWriteData" />)
</param>
<param name="expectedLength"></param>
<param name="hideDataInLog">hiding data in log file to avoid spying of passwords</param>
<param name="skipRetryErrorCode">mask to skip reties on error</param>
<returns>an new command just send to port/meter </returns>
<remarks date="2018-Mar-15" author="R.Drahbesch">
- Initial
</remarks>
<remarks date="2018-Dec-08" author="T.Wiedebusch">
- Reworked to zero pad payload with chunks of 4 bytes, the caller needn't take care of the size
</remarks>
<remarks date="2018-Dec-09" author="T.Wiedebusch">
- Corrected payload content in request protocol
</remarks>
<remarks date="2019-Apr-11" author="T.Wiedebusch">
- Hide data in logging for e.g. passwords
</remarks>
<remarks date="2019-Jun-28" author="T.Wiedebusch">
- Skip retries on specific error mask to speed up communication on functional errors
or informational feed backs (e.g FW not installed 0x0004)
<see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestRecord.ResponseErrorCode"/>
</remarks>
<remarks date="2019-Aug-28" author="R.Drabesch">
- Multiple read for string split to simple reads.
</remarks>
<remarks date="2019-Jan-18" author="T.Wiedebusch">
- Default <see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig.CommunicationConfig.SkipRetryErrorCode"/> set.
</remarks>
<remarks date="2023-Sep-06" author="T.Wiedebusch">
- MultipleReadData based on data size.
</remarks>
<remarks date="2023-Nov-24" author="T.Wiedebusch">
- Exit multiple read date if retries exceeded.
</remarks>
<remarks date="2024-Apr-11" author="T.Wiedebusch">
- Exit multiple read date if retries exceeded increased to <see cref="F:Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig.CommunicationConfig.MaxRequestRetries"/>.
</remarks>
<remarks date="2024-Apr-11 Version 2" author="T.Wiedebusch">
- Rewound to version from 06.09.2023 14:44:33 before Commit 8c9d7704.
</remarks>
<remarks date="2024-Apr-15" author="T.Wiedebusch">
- Removed useless too short comments as every string is going to be delimited by a 0 and usually won't match
to a 4 byte chunk.
</remarks>
<remarks date="2026-Jan-06" author="T.Wiedebusch">
- Removed redundant 'return cRecord'.
</remarks>
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestProtocol.CheckErrorCode">
<summary>
Analyzes the error code
</summary>
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestProtocol.ReorderRecordList(System.String)">
<summary>
Reorders the record list so that first entry is the defined topRegister
</summary>
<param name="topRegister"></param>
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.RequestProtocol.ContainsRegisterIdent(System.String)">
<summary>
Checks the active register to access
</summary>
<param name="registerName"></param>
<returns></returns>
</member>
</members>
</doc>
@@ -1,144 +0,0 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol</name>
</assembly>
<members>
<member name="T:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol.StreamingProtocol">
<inheritdoc />
<summary>
Layer between <see cref="T:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol.StreamingDecoder" /> CRC16CCITT handler and Events
block trashy telegrams
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol.StreamingProtocol._streamingDecode">
<summary>
Decode data and hold results
</summary>
</member>
<member name="E:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol.StreamingProtocol.OnRecordIsDecoded">
<inheritdoc />
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol.StreamingProtocol.DecodeRecord(Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments.IPortDataEventArgs)">
<inheritdoc />
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol.StreamingProtocol.#ctor(System.String,System.Boolean)">
<inheritdoc />
</member>
<member name="T:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol.StreamingDecoder">
<summary>
Data fields and definitions for GENESIS streaming protocol
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol.StreamingDecoder._bendDetectionDefault">
<summary>
Default data for bend detection tests of Genesis
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol.StreamingDecoder._dataDefault">
<summary>
Default data for flow tests of Genesis
</summary>
</member>
<member name="F:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol.StreamingDecoder._rawDataDefault">
<summary>
Default data for calibration of Genesis
</summary>
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol.StreamingDecoder.#ctor(System.Boolean)">
<summary>
Constructor initializes all decoded members with default values
</summary>
</member>
<member name="P:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol.StreamingDecoder.DataCalib">
<summary>
Calibration data
</summary>
</member>
<member name="P:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol.StreamingDecoder.DataFlowTest">
<summary>
Flow test data
</summary>
</member>
<member name="P:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol.StreamingDecoder.DataBendDetectTest">
<summary>
Bend detection test data
</summary>
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol.StreamingDecoder.DecodeMsg(System.String)">
<summary>
Decoding the raw message
</summary>
<param name="rawMsg">message received as one line delimited with LF</param>
<returns>true if decoding was successful and data has been validated</returns>
<remarks date="2023-Mar-09" author="T.Wiedebusch">
- Modified using common CRC check before branching to the protocol specific decoder.
</remarks>
<remarks date="2023-Dec-06" author="T.Wiedebusch">
- Introduced protocol 'm' for bending detection.
</remarks>
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol.StreamingDecoder.DecodeProtocolM(Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.BendDetectionRecord@,System.Collections.Generic.IList{System.String})">
<summary>
Extracting message from string fields for protocol 'm'
</summary>
<param name="dataBendTestRec">reference to bend detection test record</param>
<param name="fields">Separated fields containing the measurement as string</param>
<returns></returns>
<remarks date="2023-Mar-09" author="T.Wiedebusch">
- Modified using common CRC check in advance.
</remarks>
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol.StreamingDecoder.DecodeProtocolF(Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.FlowTestRecord@,System.Collections.Generic.IList{System.String})">
<summary>
Extracting message from string fields for protocol 'f'
</summary>
<param name="dataFlowTestRec">reference to flow test record</param>
<param name="fields">Separated fields containing the measurement as string</param>
<returns></returns>
<remarks date="2023-Mar-09" author="T.Wiedebusch">
- Modified using common CRC check in advance.
</remarks>
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol.StreamingDecoder.DecodeProtocolG(Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.CalibrationRecord@,System.Collections.Generic.IList{System.String})">
<summary>
Extracting message from string fields to individual raw channel for protocol 'g'
</summary>
<param name="dataProtGRec">Reference to result structure for raw data for one channel</param>
<param name="fields">Separated fields containing the measurement as string</param>
<returns>true if protocol is valid</returns>
<remarks date="2018-Mar-22" author="T.Wiedebusch">
- Usage of VolumeFactorRawToQm and calculation of AccuDutOverflowVolumeCm
</remarks>
<remarks date="2023-Mar-09" author="T.Wiedebusch">
- Modified using common CRC check in advance.
</remarks>
</member>
<member name="M:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol.StreamingDecoder.DecodeProtocolH(Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.CalibrationRecord@,System.Collections.Generic.IList{System.String})">
<summary>
Extracting message from string fields to individual raw channel for protocol 'g'
</summary>
<param name="dataProtHRec">Reference to result structure for raw data for one channel</param>
<param name="fields">Separated fields containing the measurement as string</param>
<returns>true if protocol is valid</returns>
<remarks date="2018-Mar-22" author="T.Wiedebusch">
- Usage of VolumeFactorRawToQm and calculation of AccuDutOverflowVolumeCm
</remarks>
<remarks date="2023-Mar-09" author="T.Wiedebusch">
- Modified using common CRC check in advance.
</remarks>
</member>
<member name="T:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol.StreamingDecoder.ProtFsubString">
field position in protocol 'f'
</member>
<member name="T:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol.StreamingDecoder.ProtMsubString">
field position in protocol 'm'
</member>
<member name="T:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol.StreamingDecoder.ProtGsubString">
field position in protocol 'g'
</member>
<member name="T:Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol.StreamingDecoder.ProtHsubString">
field position in protocol 'h'
</member>
</members>
</doc>

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