This commit is contained in:
Thomas Wiedebusch
2022-08-11 12:06:31 +02:00
23 changed files with 1114 additions and 239 deletions
+1 -1
View File
@@ -155,7 +155,7 @@
</site>
<site name="MeterProcessState" id="2">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="D:\Projekte\SENSUS_GitLab\laa_production\Common\Service\MeterProcessState" />
<virtualDirectory path="/" physicalPath="C:\Users\drabesch_ro\Repo\lab\la_operations\laa_production\Common\Service\MeterProcessState" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:56011:localhost" />
@@ -111,6 +111,21 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol
// save the raw message for CRC calculation before separation to fields
_rawMsgForCrc = rawMsg;
// extract message and split it to fields
//Dn 50
//2022-07-21 07:22:06.9871 | @f 8497D 062E4216 9B2A
//2022-07-21 07:22:06.9871 | @h 1 0 0A1F59C4 00017A43 00115C45 72E1596B 00000400 00001998 7D91B652 7D4F37E6 000191E6 0C 062E4A9C 5331
//2022-07-21 07:22:07.0171 | @h 2 0 0A1B1FE8 00017B7F 00116B56 72B77427 00000400 0000199A 7DC09688 7B570006 000191E6 0C 062E5326 95BD
//rawMsg = "@h 3 0 0A1DF1D5 00017EA8 00118037 741F80F3 00000400 00001998 7E58A62E 7CC2C606 000191E6 0C 062E5BAE D40E";
//DN80
// 2022-04-28 15:19:54.9167 | @f AA754B 4D0CEE78 5D89
//2022-04-28 15:19:54.9337 | @h 1 0 0EF4A130 0002AAB8 000DAC8C 02B98FBD 00000200 00000FFC 643BCF30 63C9CFF6 00015096 0C 4D0CF3CC 3E87
//2022-04-28 15:19:54.9497 | @h 2 0 0EFA3000 000283E7 000CE580 E3D5EFFA 00000200 00001000 6DC0A84E 6CD462C2 00015096 0C 4D0CF922 1646
//2022-04-28 15:19:54.9627 | @h 3 0 0EFF7F91 0002AC39 000DB43D FE1C0254 00000200 00000FFE 6C932DE6 6D20005D 00015096 0C 4D0CFE76 868A
//2022-04-28 15:19:54.9787 | @f AA7C01 4D0CFE76 B08F
// rawMsg = "@h 3 0 0EFF7F91 0002AC39 000DB43D FE1C0254 00000200 00000FFE 6C932DE6 6D20005D 00015096 0C 4D0CFE76 868A ";
rawMsg = rawMsg.Replace('\n', ' ');
var field = rawMsg.Split(' ');
@@ -119,20 +134,31 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol
case "@f":
isSuccessfulDecoded = DecodeProtocolF(field);
if (isSuccessfulDecoded || !_ignoreCorruptedData)
{
DataFlowTest = _dataFlowTestRec;
}
break;
case "@g":
{
isSuccessfulDecoded = DecodeProtocolG(ref _dataCalibRec, field);
if (isSuccessfulDecoded || !_ignoreCorruptedData)
{
DataCalib = _dataCalibRec;
}
break;
}
case "@h":
{
isSuccessfulDecoded = DecodeProtocolH(ref _dataCalibRec, field);
if (isSuccessfulDecoded || !_ignoreCorruptedData)
{
DataCalib = _dataCalibRec;
}
break;
}
}
@@ -157,7 +183,10 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol
var byteArraySize = _rawMsgForCrc.Length - 4;
var byteArray = new Byte[byteArraySize];
for (var i = 0; i < byteArraySize; i++)
{
byteArray[i] = (Byte)_rawMsgForCrc[i];
}
_rawMsgForCrc = null;
var calculatedCrc = Crc16Ccitt.CalculateMsb1021(byteArray);
@@ -197,7 +226,10 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol
var byteArraySize = _rawMsgForCrc.Length - 4;
var byteArray = new Byte[byteArraySize];
for (var i = 0; i < byteArraySize; i++)
{
byteArray[i] = (Byte)_rawMsgForCrc[i];
}
_rawMsgForCrc = null;
var calculatedCrc = Crc16Ccitt.CalculateMsb1021(byteArray);
@@ -212,7 +244,9 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol
//compare received with calculated CRC
if (calculatedCrc != dataProtGRec.Crc || IsValidProtG != dataProtGRec.Validation)
{
return false;
}
//decode rest of message only if CRC and mode are valid
dataProtGRec.IsValid = true;
@@ -300,7 +334,10 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol
var byteArraySize = _rawMsgForCrc.Length - 4;
var byteArray = new Byte[byteArraySize];
for (var i = 0; i < byteArraySize; i++)
{
byteArray[i] = (Byte)_rawMsgForCrc[i];
}
_rawMsgForCrc = null;
var calculatedCrc = Crc16Ccitt.CalculateMsb1021(byteArray);
@@ -56,6 +56,7 @@ namespace Xylem.Common.Hardware.WaterMeter.WaterMeterCore
}
_listOfMeters.Add(meterToAdd);
meterToAdd.ConnectMeter();
}
@@ -67,6 +68,7 @@ namespace Xylem.Common.Hardware.WaterMeter.WaterMeterCore
meterToAdd.LoadConfiguration(!string.IsNullOrEmpty(_sourceLocation) ? _sourceLocation : Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)));
}
}
@@ -1 +1 @@
1a3d4919c9c702245832d925951f2b7cb72fc333
5ed75d99ee45ff67821090f1b3dbb001dd9e4fe3
@@ -0,0 +1,21 @@
using System.Collections.Generic;
namespace Logic.ProductionToProductMapper.Cordonel
{
public class CordonelMetrologyLut
{
public int Id { get; set; }
public int FileId { get; set; }
public string FileName { get; set; }
public MeterSize MeterSize { get; set; }
public string Region { get; set; }
public int FileCrc { get; set; }
public bool CurrentVerionForProd { get; set; }
public int DataLength { get; set; }
public string Version { get; set; }
public byte[] FileContent { get; set; }
}
}
@@ -1,22 +0,0 @@
using Logic.ProductionToProductMapper.Cordonel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Logic.ProductionToProductMapper.Files.Lut
{
public class CordonelMetrologyLut
{
public int FileId { get; set; }
public string FileName { get; set; }
public MeterSize MeterSize { get; set; }
public string Region { get; set; }
public int CRC { get; set; }
public bool ForProduction { get; set; }
public List<byte> Content { get; set; }
}
}
@@ -80,7 +80,7 @@
<Compile Include="Cordonel\RegisterHisory.cs" />
<Compile Include="Files\Fw\ClusteredFile.cs" />
<Compile Include="Files\Fw\FilePart.cs" />
<Compile Include="Files\Lut\CordonelMetrologyLut.cs" />
<Compile Include="Cordonel\CordonelMetrologyLut.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
@@ -97,6 +97,8 @@
<Name>ProductionOrderCore</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Folder Include="Files\Lut\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
@@ -784,6 +784,441 @@ namespace Xylem.Common.Logic.ProductionOrderCore.KitronTestResults
[JsonProperty("RFRemeasurePower Loop_12")]
public string RFRemeasurePowerLoop12 { get; set; }
[JsonProperty("ResultCalibration Loop_13")]
public string ResultCalibrationLoop13 { get; set; }
[JsonProperty("LengthCode Loop_13")]
public string LengthCodeLoop13 { get; set; }
[JsonProperty("RunCalibrate Loop_13")]
public string RunCalibrateLoop13 { get; set; }
[JsonProperty("RFCalibrationCurrent Loop_13")]
public string RFCalibrationCurrentLoop13 { get; set; }
[JsonProperty("RFCalibrationPower Loop_13")]
public string RFCalibrationPowerLoop13 { get; set; }
[JsonProperty("PowerlevelReference Loop_13")]
public string PowerlevelReferenceLoop13 { get; set; }
[JsonProperty("PowerLevelCalculated Loop_13")]
public string PowerLevelCalculatedLoop13 { get; set; }
[JsonProperty("AntennaMatching Loop_13")]
public string AntennaMatchingLoop13 { get; set; }
[JsonProperty("LookupTableCSV Loop_13")]
public string LookupTableCSVLoop13 { get; set; }
[JsonProperty("RunRemeasure Loop_13")]
public string RunRemeasureLoop13 { get; set; }
[JsonProperty("ResultRFRemeasure Loop_13")]
public string ResultRFRemeasureLoop13 { get; set; }
[JsonProperty("RFRemeasureCurrent Loop_13")]
public string RFRemeasureCurrentLoop13 { get; set; }
[JsonProperty("RFRemeasurePower Loop_13")]
public string RFRemeasurePowerLoop13 { get; set; }
[JsonProperty("ResultCalibration Loop_14")]
public string ResultCalibrationLoop14 { get; set; }
[JsonProperty("LengthCode Loop_14")]
public string LengthCodeLoop14 { get; set; }
[JsonProperty("RunCalibrate Loop_14")]
public string RunCalibrateLoop14 { get; set; }
[JsonProperty("RFCalibrationCurrent Loop_14")]
public string RFCalibrationCurrentLoop14 { get; set; }
[JsonProperty("RFCalibrationPower Loop_14")]
public string RFCalibrationPowerLoop14 { get; set; }
[JsonProperty("PowerlevelReference Loop_14")]
public string PowerlevelReferenceLoop14 { get; set; }
[JsonProperty("PowerLevelCalculated Loop_14")]
public string PowerLevelCalculatedLoop14 { get; set; }
[JsonProperty("AntennaMatching Loop_14")]
public string AntennaMatchingLoop14 { get; set; }
[JsonProperty("LookupTableCSV Loop_14")]
public string LookupTableCSVLoop14 { get; set; }
[JsonProperty("RunRemeasure Loop_14")]
public string RunRemeasureLoop14 { get; set; }
[JsonProperty("ResultRFRemeasure Loop_14")]
public string ResultRFRemeasureLoop14 { get; set; }
[JsonProperty("RFRemeasureCurrent Loop_14")]
public string RFRemeasureCurrentLoop14 { get; set; }
[JsonProperty("RFRemeasurePower Loop_14")]
public string RFRemeasurePowerLoop14 { get; set; }
[JsonProperty("ResultCalibration Loop_15")]
public string ResultCalibrationLoop15 { get; set; }
[JsonProperty("LengthCode Loop_15")]
public string LengthCodeLoop15 { get; set; }
[JsonProperty("RunCalibrate Loop_15")]
public string RunCalibrateLoop15 { get; set; }
[JsonProperty("RFCalibrationCurrent Loop_15")]
public string RFCalibrationCurrentLoop15 { get; set; }
[JsonProperty("RFCalibrationPower Loop_15")]
public string RFCalibrationPowerLoop15 { get; set; }
[JsonProperty("PowerlevelReference Loop_15")]
public string PowerlevelReferenceLoop15 { get; set; }
[JsonProperty("PowerLevelCalculated Loop_15")]
public string PowerLevelCalculatedLoop15 { get; set; }
[JsonProperty("AntennaMatching Loop_15")]
public string AntennaMatchingLoop15 { get; set; }
[JsonProperty("LookupTableCSV Loop_15")]
public string LookupTableCSVLoop15 { get; set; }
[JsonProperty("RunRemeasure Loop_15")]
public string RunRemeasureLoop15 { get; set; }
[JsonProperty("ResultRFRemeasure Loop_15")]
public string ResultRFRemeasureLoop15 { get; set; }
[JsonProperty("RFRemeasureCurrent Loop_15")]
public string RFRemeasureCurrentLoop15 { get; set; }
[JsonProperty("RFRemeasurePower Loop_15")]
public string RFRemeasurePowerLoop15 { get; set; }
[JsonProperty("ResultCalibration Loop_16")]
public string ResultCalibrationLoop16 { get; set; }
[JsonProperty("LengthCode Loop_16")]
public string LengthCodeLoop16 { get; set; }
[JsonProperty("RunCalibrate Loop_16")]
public string RunCalibrateLoop16 { get; set; }
[JsonProperty("RFCalibrationCurrent Loop_16")]
public string RFCalibrationCurrentLoop16 { get; set; }
[JsonProperty("RFCalibrationPower Loop_16")]
public string RFCalibrationPowerLoop16 { get; set; }
[JsonProperty("PowerlevelReference Loop_16")]
public string PowerlevelReferenceLoop16 { get; set; }
[JsonProperty("PowerLevelCalculated Loop_16")]
public string PowerLevelCalculatedLoop16 { get; set; }
[JsonProperty("AntennaMatching Loop_16")]
public string AntennaMatchingLoop16 { get; set; }
[JsonProperty("LookupTableCSV Loop_16")]
public string LookupTableCSVLoop16 { get; set; }
[JsonProperty("RunRemeasure Loop_16")]
public string RunRemeasureLoop16 { get; set; }
[JsonProperty("ResultRFRemeasure Loop_16")]
public string ResultRFRemeasureLoop16 { get; set; }
[JsonProperty("RFRemeasureCurrent Loop_16")]
public string RFRemeasureCurrentLoop16 { get; set; }
[JsonProperty("RFRemeasurePower Loop_16")]
public string RFRemeasurePowerLoop16 { get; set; }
[JsonProperty("ResultCalibration Loop_17")]
public string ResultCalibrationLoop17 { get; set; }
[JsonProperty("LengthCode Loop_17")]
public string LengthCodeLoop17 { get; set; }
[JsonProperty("RunCalibrate Loop_17")]
public string RunCalibrateLoop17 { get; set; }
[JsonProperty("RFCalibrationCurrent Loop_17")]
public string RFCalibrationCurrentLoop17 { get; set; }
[JsonProperty("RFCalibrationPower Loop_17")]
public string RFCalibrationPowerLoop17 { get; set; }
[JsonProperty("PowerlevelReference Loop_17")]
public string PowerlevelReferenceLoop17 { get; set; }
[JsonProperty("PowerLevelCalculated Loop_17")]
public string PowerLevelCalculatedLoop17 { get; set; }
[JsonProperty("AntennaMatching Loop_17")]
public string AntennaMatchingLoop17 { get; set; }
[JsonProperty("LookupTableCSV Loop_17")]
public string LookupTableCSVLoop17 { get; set; }
[JsonProperty("RunRemeasure Loop_17")]
public string RunRemeasureLoop17 { get; set; }
[JsonProperty("ResultRFRemeasure Loop_17")]
public string ResultRFRemeasureLoop17 { get; set; }
[JsonProperty("RFRemeasureCurrent Loop_17")]
public string RFRemeasureCurrentLoop17 { get; set; }
[JsonProperty("RFRemeasurePower Loop_17")]
public string RFRemeasurePowerLoop17 { get; set; }
[JsonProperty("ResultCalibration Loop_18")]
public string ResultCalibrationLoop18 { get; set; }
[JsonProperty("LengthCode Loop_18")]
public string LengthCodeLoop18 { get; set; }
[JsonProperty("RunCalibrate Loop_18")]
public string RunCalibrateLoop18 { get; set; }
[JsonProperty("RFCalibrationCurrent Loop_18")]
public string RFCalibrationCurrentLoop18 { get; set; }
[JsonProperty("RFCalibrationPower Loop_18")]
public string RFCalibrationPowerLoop18 { get; set; }
[JsonProperty("PowerlevelReference Loop_18")]
public string PowerlevelReferenceLoop18 { get; set; }
[JsonProperty("PowerLevelCalculated Loop_18")]
public string PowerLevelCalculatedLoop18 { get; set; }
[JsonProperty("AntennaMatching Loop_18")]
public string AntennaMatchingLoop18 { get; set; }
[JsonProperty("LookupTableCSV Loop_18")]
public string LookupTableCSVLoop18 { get; set; }
[JsonProperty("RunRemeasure Loop_18")]
public string RunRemeasureLoop18 { get; set; }
[JsonProperty("ResultRFRemeasure Loop_18")]
public string ResultRFRemeasureLoop18 { get; set; }
[JsonProperty("RFRemeasureCurrent Loop_18")]
public string RFRemeasureCurrentLoop18 { get; set; }
[JsonProperty("RFRemeasurePower Loop_18")]
public string RFRemeasurePowerLoop18 { get; set; }
[JsonProperty("ResultCalibration Loop_19")]
public string ResultCalibrationLoop19 { get; set; }
[JsonProperty("LengthCode Loop_19")]
public string LengthCodeLoop19 { get; set; }
[JsonProperty("RunCalibrate Loop_19")]
public string RunCalibrateLoop19 { get; set; }
[JsonProperty("RFCalibrationCurrent Loop_19")]
public string RFCalibrationCurrentLoop19 { get; set; }
[JsonProperty("RFCalibrationPower Loop_19")]
public string RFCalibrationPowerLoop19 { get; set; }
[JsonProperty("PowerlevelReference Loop_19")]
public string PowerlevelReferenceLoop19 { get; set; }
[JsonProperty("PowerLevelCalculated Loop_19")]
public string PowerLevelCalculatedLoop19 { get; set; }
[JsonProperty("AntennaMatching Loop_19")]
public string AntennaMatchingLoop19 { get; set; }
[JsonProperty("LookupTableCSV Loop_19")]
public string LookupTableCSVLoop19 { get; set; }
[JsonProperty("RunRemeasure Loop_19")]
public string RunRemeasureLoop19 { get; set; }
[JsonProperty("ResultRFRemeasure Loop_19")]
public string ResultRFRemeasureLoop19 { get; set; }
[JsonProperty("RFRemeasureCurrent Loop_19")]
public string RFRemeasureCurrentLoop19 { get; set; }
[JsonProperty("RFRemeasurePower Loop_19")]
public string RFRemeasurePowerLoop19 { get; set; }
[JsonProperty("ResultCalibration Loop_20")]
public string ResultCalibrationLoop20 { get; set; }
[JsonProperty("LengthCode Loop_20")]
public string LengthCodeLoop20 { get; set; }
[JsonProperty("RunCalibrate Loop_20")]
public string RunCalibrateLoop20 { get; set; }
[JsonProperty("RFCalibrationCurrent Loop_20")]
public string RFCalibrationCurrentLoop20 { get; set; }
[JsonProperty("RFCalibrationPower Loop_20")]
public string RFCalibrationPowerLoop20 { get; set; }
[JsonProperty("PowerlevelReference Loop_20")]
public string PowerlevelReferenceLoop20 { get; set; }
[JsonProperty("PowerLevelCalculated Loop_20")]
public string PowerLevelCalculatedLoop20 { get; set; }
[JsonProperty("AntennaMatching Loop_20")]
public string AntennaMatchingLoop20 { get; set; }
[JsonProperty("LookupTableCSV Loop_20")]
public string LookupTableCSVLoop20 { get; set; }
[JsonProperty("RunRemeasure Loop_20")]
public string RunRemeasureLoop20 { get; set; }
[JsonProperty("ResultRFRemeasure Loop_20")]
public string ResultRFRemeasureLoop20 { get; set; }
[JsonProperty("RFRemeasureCurrent Loop_20")]
public string RFRemeasureCurrentLoop20 { get; set; }
[JsonProperty("RFRemeasurePower Loop_20")]
public string RFRemeasurePowerLoop20 { get; set; }
[JsonProperty("ResultCalibration Loop_21")]
public string ResultCalibrationLoop21 { get; set; }
[JsonProperty("LengthCode Loop_21")]
public string LengthCodeLoop21 { get; set; }
[JsonProperty("RunCalibrate Loop_21")]
public string RunCalibrateLoop21 { get; set; }
[JsonProperty("RFCalibrationCurrent Loop_21")]
public string RFCalibrationCurrentLoop21 { get; set; }
[JsonProperty("RFCalibrationPower Loop_21")]
public string RFCalibrationPowerLoop21 { get; set; }
[JsonProperty("PowerlevelReference Loop_21")]
public string PowerlevelReferenceLoop21 { get; set; }
[JsonProperty("PowerLevelCalculated Loop_21")]
public string PowerLevelCalculatedLoop21 { get; set; }
[JsonProperty("AntennaMatching Loop_21")]
public string AntennaMatchingLoop21 { get; set; }
[JsonProperty("LookupTableCSV Loop_21")]
public string LookupTableCSVLoop21 { get; set; }
[JsonProperty("RunRemeasure Loop_21")]
public string RunRemeasureLoop21 { get; set; }
[JsonProperty("ResultRFRemeasure Loop_21")]
public string ResultRFRemeasureLoop21 { get; set; }
[JsonProperty("RFRemeasureCurrent Loop_21")]
public string RFRemeasureCurrentLoop21 { get; set; }
[JsonProperty("RFRemeasurePower Loop_21")]
public string RFRemeasurePowerLoop21 { get; set; }
[JsonProperty("ResultCalibration Loop_22")]
public string ResultCalibrationLoop22 { get; set; }
[JsonProperty("LengthCode Loop_22")]
public string LengthCodeLoop22 { get; set; }
[JsonProperty("RunCalibrate Loop_22")]
public string RunCalibrateLoop22 { get; set; }
[JsonProperty("RFCalibrationCurrent Loop_22")]
public string RFCalibrationCurrentLoop22 { get; set; }
[JsonProperty("RFCalibrationPower Loop_22")]
public string RFCalibrationPowerLoop22 { get; set; }
[JsonProperty("PowerlevelReference Loop_22")]
public string PowerlevelReferenceLoop22 { get; set; }
[JsonProperty("PowerLevelCalculated Loop_22")]
public string PowerLevelCalculatedLoop22 { get; set; }
[JsonProperty("AntennaMatching Loop_22")]
public string AntennaMatchingLoop22 { get; set; }
[JsonProperty("LookupTableCSV Loop_22")]
public string LookupTableCSVLoop22 { get; set; }
[JsonProperty("RunRemeasure Loop_22")]
public string RunRemeasureLoop22 { get; set; }
[JsonProperty("ResultRFRemeasure Loop_22")]
public string ResultRFRemeasureLoop22 { get; set; }
[JsonProperty("RFRemeasureCurrent Loop_22")]
public string RFRemeasureCurrentLoop22 { get; set; }
[JsonProperty("RFRemeasurePower Loop_22")]
public string RFRemeasurePowerLoop22 { get; set; }
[JsonProperty("ResultCalibration Loop_23")]
public string ResultCalibrationLoop23 { get; set; }
[JsonProperty("LengthCode Loop_23")]
public string LengthCodeLoop23 { get; set; }
[JsonProperty("RunCalibrate Loop_23")]
public string RunCalibrateLoop23 { get; set; }
[JsonProperty("RFCalibrationCurrent Loop_23")]
public string RFCalibrationCurrentLoop23 { get; set; }
[JsonProperty("RFCalibrationPower Loop_23")]
public string RFCalibrationPowerLoop23 { get; set; }
[JsonProperty("PowerlevelReference Loop_23")]
public string PowerlevelReferenceLoop23 { get; set; }
[JsonProperty("PowerLevelCalculated Loop_23")]
public string PowerLevelCalculatedLoop23 { get; set; }
[JsonProperty("AntennaMatching Loop_23")]
public string AntennaMatchingLoop23 { get; set; }
[JsonProperty("LookupTableCSV Loop_23")]
public string LookupTableCSVLoop23 { get; set; }
[JsonProperty("RunRemeasure Loop_23")]
public string RunRemeasureLoop23 { get; set; }
[JsonProperty("ResultRFRemeasure Loop_23")]
public string ResultRFRemeasureLoop23 { get; set; }
[JsonProperty("RFRemeasureCurrent Loop_23")]
public string RFRemeasureCurrentLoop23 { get; set; }
[JsonProperty("RFRemeasurePower Loop_23")]
public string RFRemeasurePowerLoop23 { get; set; }
}
public class Root
@@ -417,7 +417,158 @@ namespace Xylem.Common.Logic.ProductionOrderCore.KitronTestResults
}
alternateReturnObj.TestStepLoopCalibrate.Values.SetValue(add12, 11);
var add13 = new Xylem.Common.Logic.ProductionOrderCore.KitronTestResults.Value();
add13.ResultCalibration = newFromat.JsonObject.ResultCalibrationLoop13;
add13.LengthCode = newFromat.JsonObject.LengthCodeLoop13;
add13.SLookupTablePower = newFromat.JsonObject.AttachmentFile.ToLower();
add13.IPowerLevelCalculated = newFromat.JsonObject.PowerLevelCalculatedLoop13;
add13.IAntennaMatching = newFromat.JsonObject.AntennaMatchingLoop13;
if (add13.ResultCalibration == null)
{
return alternateReturnObj;
}
alternateReturnObj.TestStepLoopCalibrate.Values.SetValue(add13, 12);
var add14 = new Xylem.Common.Logic.ProductionOrderCore.KitronTestResults.Value();
add14.ResultCalibration = newFromat.JsonObject.ResultCalibrationLoop14;
add14.LengthCode = newFromat.JsonObject.LengthCodeLoop14;
add14.SLookupTablePower = newFromat.JsonObject.AttachmentFile.ToLower();
add14.IPowerLevelCalculated = newFromat.JsonObject.PowerLevelCalculatedLoop14;
add14.IAntennaMatching = newFromat.JsonObject.AntennaMatchingLoop14;
if (add14.ResultCalibration == null)
{
return alternateReturnObj;
}
alternateReturnObj.TestStepLoopCalibrate.Values.SetValue(add14, 13);
var add15 = new Xylem.Common.Logic.ProductionOrderCore.KitronTestResults.Value();
add15.ResultCalibration = newFromat.JsonObject.ResultCalibrationLoop15;
add15.LengthCode = newFromat.JsonObject.LengthCodeLoop15;
add15.SLookupTablePower = newFromat.JsonObject.AttachmentFile.ToLower();
add15.IPowerLevelCalculated = newFromat.JsonObject.PowerLevelCalculatedLoop15;
add15.IAntennaMatching = newFromat.JsonObject.AntennaMatchingLoop15;
if (add15.ResultCalibration == null)
{
return alternateReturnObj;
}
alternateReturnObj.TestStepLoopCalibrate.Values.SetValue(add15, 14);
var add16 = new Xylem.Common.Logic.ProductionOrderCore.KitronTestResults.Value();
add16.ResultCalibration = newFromat.JsonObject.ResultCalibrationLoop16;
add16.LengthCode = newFromat.JsonObject.LengthCodeLoop16;
add16.SLookupTablePower = newFromat.JsonObject.AttachmentFile.ToLower();
add16.IPowerLevelCalculated = newFromat.JsonObject.PowerLevelCalculatedLoop16;
add16.IAntennaMatching = newFromat.JsonObject.AntennaMatchingLoop16;
if (add16.ResultCalibration == null)
{
return alternateReturnObj;
}
alternateReturnObj.TestStepLoopCalibrate.Values.SetValue(add16, 15);
var add17 = new Xylem.Common.Logic.ProductionOrderCore.KitronTestResults.Value();
add17.ResultCalibration = newFromat.JsonObject.ResultCalibrationLoop17;
add17.LengthCode = newFromat.JsonObject.LengthCodeLoop17;
add17.SLookupTablePower = newFromat.JsonObject.AttachmentFile.ToLower();
add17.IPowerLevelCalculated = newFromat.JsonObject.PowerLevelCalculatedLoop17;
add17.IAntennaMatching = newFromat.JsonObject.AntennaMatchingLoop17;
if (add17.ResultCalibration == null)
{
return alternateReturnObj;
}
alternateReturnObj.TestStepLoopCalibrate.Values.SetValue(add17, 16);
var add18 = new Xylem.Common.Logic.ProductionOrderCore.KitronTestResults.Value();
add18.ResultCalibration = newFromat.JsonObject.ResultCalibrationLoop18;
add18.LengthCode = newFromat.JsonObject.LengthCodeLoop18;
add18.SLookupTablePower = newFromat.JsonObject.AttachmentFile.ToLower();
add18.IPowerLevelCalculated = newFromat.JsonObject.PowerLevelCalculatedLoop18;
add18.IAntennaMatching = newFromat.JsonObject.AntennaMatchingLoop18;
if (add18.ResultCalibration == null)
{
return alternateReturnObj;
}
alternateReturnObj.TestStepLoopCalibrate.Values.SetValue(add18, 17);
var add19 = new Xylem.Common.Logic.ProductionOrderCore.KitronTestResults.Value();
add19.ResultCalibration = newFromat.JsonObject.ResultCalibrationLoop19;
add19.LengthCode = newFromat.JsonObject.LengthCodeLoop19;
add19.SLookupTablePower = newFromat.JsonObject.AttachmentFile.ToLower();
add19.IPowerLevelCalculated = newFromat.JsonObject.PowerLevelCalculatedLoop19;
add19.IAntennaMatching = newFromat.JsonObject.AntennaMatchingLoop19;
if (add19.ResultCalibration == null)
{
return alternateReturnObj;
}
alternateReturnObj.TestStepLoopCalibrate.Values.SetValue(add19, 18);
var add20 = new Xylem.Common.Logic.ProductionOrderCore.KitronTestResults.Value();
add20.ResultCalibration = newFromat.JsonObject.ResultCalibrationLoop20;
add20.LengthCode = newFromat.JsonObject.LengthCodeLoop20;
add20.SLookupTablePower = newFromat.JsonObject.AttachmentFile.ToLower();
add20.IPowerLevelCalculated = newFromat.JsonObject.PowerLevelCalculatedLoop20;
add20.IAntennaMatching = newFromat.JsonObject.AntennaMatchingLoop20;
if (add20.ResultCalibration == null)
{
return alternateReturnObj;
}
alternateReturnObj.TestStepLoopCalibrate.Values.SetValue(add20, 19);
var add21 = new Xylem.Common.Logic.ProductionOrderCore.KitronTestResults.Value();
add21.ResultCalibration = newFromat.JsonObject.ResultCalibrationLoop21;
add21.LengthCode = newFromat.JsonObject.LengthCodeLoop21;
add21.SLookupTablePower = newFromat.JsonObject.AttachmentFile.ToLower();
add21.IPowerLevelCalculated = newFromat.JsonObject.PowerLevelCalculatedLoop21;
add21.IAntennaMatching = newFromat.JsonObject.AntennaMatchingLoop21;
if (add21.ResultCalibration == null)
{
return alternateReturnObj;
}
alternateReturnObj.TestStepLoopCalibrate.Values.SetValue(add21, 20);
var add22 = new Xylem.Common.Logic.ProductionOrderCore.KitronTestResults.Value();
add22.ResultCalibration = newFromat.JsonObject.ResultCalibrationLoop22;
add22.LengthCode = newFromat.JsonObject.LengthCodeLoop22;
add22.SLookupTablePower = newFromat.JsonObject.AttachmentFile.ToLower();
add22.IPowerLevelCalculated = newFromat.JsonObject.PowerLevelCalculatedLoop22;
add22.IAntennaMatching = newFromat.JsonObject.AntennaMatchingLoop22;
if (add22.ResultCalibration == null)
{
return alternateReturnObj;
}
alternateReturnObj.TestStepLoopCalibrate.Values.SetValue(add22, 21);
var add23 = new Xylem.Common.Logic.ProductionOrderCore.KitronTestResults.Value();
add23.ResultCalibration = newFromat.JsonObject.ResultCalibrationLoop23;
add23.LengthCode = newFromat.JsonObject.LengthCodeLoop23;
add23.SLookupTablePower = newFromat.JsonObject.AttachmentFile.ToLower();
add23.IPowerLevelCalculated = newFromat.JsonObject.PowerLevelCalculatedLoop23;
add23.IAntennaMatching = newFromat.JsonObject.AntennaMatchingLoop23;
if (add23.ResultCalibration == null)
{
return alternateReturnObj;
}
alternateReturnObj.TestStepLoopCalibrate.Values.SetValue(add23, 22);
return alternateReturnObj;
@@ -54,7 +54,7 @@ namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
}
ret.Add(new ProgrammingParameters("SENSUSRADIO_EncryptionKey", radioParams.EncryptionKey.Reverse().ToArray()));
ret.Add(new ProgrammingParameters("SENSUSRADIO_EncryptionKey", radioParams.EncryptionKey.ToArray()));
@@ -99,8 +99,8 @@ namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
var a = radioTestResult.TestStepLoopCalibrate.Values.Where(w => w != null && ( w.ResultCalibration.ToLower() == "ok" && w.LengthCode.StartsWith($"DN{dnString}") && w.LengthCode.Contains($"-{LengthString}{pressure}") && !w.LengthCode.Contains($"-{LengthString}{pressure}o"))).ToList();
var ao = radioTestResult.TestStepLoopCalibrate.Values.Where(w => w != null && (w.ResultCalibration.ToLower() == "ok" && w.LengthCode.StartsWith($"DN{dnString}") && w.LengthCode.Contains($"-{LengthString}{pressure}o"))).ToList();
var a = radioTestResult.TestStepLoopCalibrate.Values.Where(w => w != null && ( w.LengthCode != null && w.ResultCalibration.ToLower() == "ok" && w.LengthCode.StartsWith($"DN{dnString}") && w.LengthCode.Contains($"-{LengthString}{pressure}") && !w.LengthCode.Contains($"-{LengthString}{pressure}o"))).ToList();
var ao = radioTestResult.TestStepLoopCalibrate.Values.Where(w => w != null && (w.LengthCode != null && (w.ResultCalibration.ToLower() == "ok" && w.LengthCode.StartsWith($"DN{dnString}") && w.LengthCode.Contains($"-{LengthString}{pressure}o")))).ToList();
var snb = new List<string>();
foreach (var lengthItem in radioTestResult.TestStepLoopCalibrate.Values)
@@ -75,7 +75,6 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
}
catch (Exception ex)
{
return new List<ProgrammingParameters>() { };
}
@@ -116,14 +116,23 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
foreach (var item in myJsonResponse.Where(m => m.Source == ProgrammingSource.Vako))
{
if (item.RegisterName == "CUSTOMER_LeakFlowThreshold")
{
}
//todo: find a better sln for SENSUSRADIO_EncryptionKey
//SENSUSRADIO_EncryptionKey dont reserve SENSUSRADIO_EncryptionKey!
if (item.RegisterName.ToLower().Contains("SENSUSRADIO_EncryptionKey".ToLower()))
{
overAllResult.Add(_currentGenesis_WriteRegister(item.RegisterName, item.RegisterValue.ToArray(), true, true));
}
else
{
overAllResult.Add(_currentGenesis_WriteRegister(item.RegisterName, item.RegisterValue.Reverse().ToArray(), true, true));
//if (item.RegisterName.ToLower().Contains("SENSUSRADIO_EncryptionKey".ToLower()))
//{
// overAllResult.Add(_currentGenesis_WriteRegister(item.RegisterName, item.RegisterValue.ToArray(), true, true));
//}
}
//else if (!item.RegisterName.ToLower().Contains("apparrangement"))
//{
// overAllResult.Add(_currentGenesis_WriteRegister(item.RegisterName, item.RegisterValue.Reverse().ToArray(), true, true));
@@ -137,6 +146,8 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
foreach (var item in myJsonResponse.Where(m => m.Source == ProgrammingSource.Csd))
{
//todo: find a better sln for SENSUSRADIO_EncryptionKey
//SENSUSRADIO_EncryptionKey dont reserve SENSUSRADIO_EncryptionKey!
if (item.RegisterName.ToLower().Contains("SENSUSRADIO_EncryptionKey".ToLower()))
{
overAllResult.Add(_currentGenesis_WriteRegister(item.RegisterName, item.RegisterValue.ToArray(), true, true));
@@ -158,6 +169,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
overAllResult.Add(wirteRegisterInBetweenCheck("SYSTEM_CalendarSeconds", Convert.ToInt32(ts.TotalSeconds)));
overAllResult.Add(wirteRegisterInBetweenCheck("IRDA_MfgDate", Convert.ToInt32(ts.TotalSeconds)));
overAllResult.Add(_currentGenesis_WriteRegister("LOGGER_TriggerLogFlush",
(new Byte[] { 0x00, 0x00, 0x00, 0x01 }).Reverse().ToArray(), true, false));
@@ -191,7 +203,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
}
else
{
if (cTask.Result.Item1.ToLower().Contains("Metersize".ToLower()) || cTask.Result.Item1.ToLower() == "SENSUSRADIO_MetroRadioLifeTimeCounter".ToLower() || cTask.Result.Item1.ToLower() == "CUSTOMER_LeakFlowThreshold".ToLower() || cTask.Result.Item1.ToLower() == "CUSTOMER_ExcessFlowVolumeThreshold".ToLower())
if (cTask.Result.Item1.ToLower().Contains("Metersize".ToLower()) || cTask.Result.Item1.ToLower().Contains("CUSTOMER_ExcessFlowVolumeThreshold".ToLower()) || cTask.Result.Item1.ToLower().Contains("NFC_EraseRMA".ToLower()) || cTask.Result.Item1.ToLower() == "SENSUSRADIO_MetroRadioLifeTimeCounter".ToLower() || cTask.Result.Item1.ToLower() == "CUSTOMER_LeakFlowThreshold".ToLower())
{
base.NewStatus($"Warnung!Schreiben des Parameter {cTask.Result.Item1} war nicht erfolgreich");
}
@@ -205,11 +217,13 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
}
}
catch (Exception)
catch (Exception ex)
{
if (cTask.Result.Item1 != "GENESISFLOW_MaxDeltaToFRange")
{
throw;
}
}
base.Progress = 15 + ((Int32)Math.Round(((Double)done / (Double)overAllResult.Count) * 85, 0));
@@ -62,13 +62,21 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
UserControl.lblText.Dispatcher.Invoke(DispatcherPriority.Send,
new Action(() =>
{
UserControl.lblText.Content = $"Read {dic.GetIdent()}({done}/{total.Count})";
}
));
if (dic.RegisterName.ToLower() != "password" && dic.RegisterDetail.Privilege.Lvl8 != Access.Wo)
{
switch (dic.GetIdent().ToLower())
{
case "sensusradio_encryptionkey":
Meter.ReadRegister(dic.GetIdent(), 32);
break;
default:
Meter.ReadRegister(dic.GetIdent());
break;
}
}
base.Progress = (Int32)Math.Round(((Double)done / (Double)total.Count) * 100, 0);
}
@@ -92,7 +92,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
System.Windows.Forms.MessageBox.Show("Funkschlüssel überprüfen!");
}
EncyptionKey = BitConverter.ToString(enc.ToArray()).Replace("-", "");
//if (freq == 868)
//{
@@ -1,4 +1,5 @@
using Newtonsoft.Json;
using Logic.ProductionToProductMapper.Cordonel;
using Newtonsoft.Json;
using Service.Core;
using System;
using System.Collections.Generic;
@@ -10,10 +11,8 @@ using System.Text;
using System.Threading.Tasks;
using System.Web;
using System.Web.Http;
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore.Consts;
using Xylem.Common.Logic.ProductionOrderCore.File;
using Xylem.Common.Logic.ProductionOrderCore.FW;
using Logic.ProductionToProductMapper.Cordonel;
namespace Xylem.Common.Service.MeterProcessState.Controllers
{
@@ -154,6 +153,89 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
}
/// <summary>
/// Set LUT JSON content
/// </summary>
/// <returns></returns>
[Route("PostLutFile"), HttpPost]
public async Task<HttpResponseMessage> PostLutFile(int DataLength, string version, int crc, int Metersize, string Region)
{
var httpFiles = HttpContext.Current.Request.Files;
var listOfFiles = new List<Tuple<string, byte[]>>();
foreach (var a in httpFiles)
{
try
{
if (HttpContext.Current.Request.Files[a.ToString()] is HttpPostedFile f)
{
listOfFiles.Add(new Tuple<string, byte[]>(f.FileName, GetFileBytes(f)));
}
}
catch (Exception)
{
}
}
var fileID = 0;
return await Task.Run(() =>
{
try
{
int? retId = null;
int FileCounter = StoreFiles(out retId, true, listOfFiles.First().Item1, FileCategoryID: 7, listOfFiles: listOfFiles);
if (FileCounter == listOfFiles.Count && retId.HasValue)
{
fileID = retId.Value;
}
if (fileID != 0)
{
using (var dataacces = new SqlDataAccess(GlobalConfig.connectionString.Value))
{
var sb = new StringBuilder();
sb.AppendLine($" insert into [Cordonel_Lut] ");
sb.AppendLine($" select ");
sb.AppendLine($" {fileID} ");
sb.AppendLine($" , {DataLength} ");
sb.AppendLine($" , '{version}' ");
sb.AppendLine($" , '{crc}' ");
sb.AppendLine($" , '{Metersize}' ");
sb.AppendLine($" , '{Region}' ");
sb.AppendLine($" , 0 "); // [CurrentVerionForProd]
sb.AppendLine($" select @@IDENTITY ");
var retDT = dataacces.ExecuteQuery(sb.ToString());
return Request.CreateResponse(HttpStatusCode.OK, retDT.Rows[0][0]);
}
}
else
{
throw new ApplicationException($"file was not uploaded. Without error");
}
}
catch (Exception ex)
{
throw new ApplicationException($"file was not uploaded {ex.Message}");
}
throw new ApplicationException("file was not uploaded");
});
}
public virtual byte[] GetFileBytes(HttpPostedFile uploadedFile)
{
var bytes = new byte[uploadedFile.ContentLength];
@@ -162,6 +244,54 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
}
/// <summary>
/// Set LUT JSON content
/// </summary>
/// <returns></returns>
[Route("GetLutFiles"), HttpGet]
public async Task<HttpResponseMessage> GetLutFiles(int? Metersize = null, string Region = null, bool? ForProd = null)
{
return await Task.Run(() =>
{
try
{
using (var dataacces = new SqlDataAccess(GlobalConfig.connectionString.Value))
{
var sb = new StringBuilder();
sb.AppendLine($" SELECT [Id] ");
sb.AppendLine($" ,lut.[FileID] ");
sb.AppendLine($" ,[DataLength] ");
sb.AppendLine($" ,[Version] ");
sb.AppendLine($" ,[FileCrc] ");
sb.AppendLine($" ,[MeterSize] ");
sb.AppendLine($" ,[Region] ");
sb.AppendLine($" ,[CurrentVerionForProd] ");
sb.AppendLine($" ,files.[FileName] ");
sb.AppendLine($" ,files.FileContent ");
sb.AppendLine($" FROM [Auftrag].[dbo].[Cordonel_Lut] lut ");
sb.AppendLine($" inner join [Auftrag].[dbo].[FileClusterStore] fileMaster on fileMaster.FileId = lut.[FileID] ");
sb.AppendLine($" inner join [Auftrag].[dbo].[FileMapToCluster] map on fileMaster.FileIsDeleted = 0 and fileMaster.FileId = map.[FileMapToCluster_FileClusterId] ");
sb.AppendLine($" inner join [Auftrag].[dbo].[File] files on files.FileId = map.[FileMapToCluster_FileId] ");
var retDT = dataacces.ExecuteQuery(sb.ToString());
return Request.CreateResponse(HttpStatusCode.OK, retDT);
}
}
catch (Exception ex)
{
throw new ApplicationException($"file was not uploaded {ex.Message}");
}
throw new ApplicationException("file was not uploaded");
});
}
/// <summary>
/// Set TextFile content PostFileJsonContent
@@ -213,6 +343,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
//4 Cordonel Update Safe
//5 Cordonel Update Sotware
//6 Cordonel Release Config
//7 Cordonel Look up table
FileClusterStoreId = null;
+75 -115
View File
@@ -38,27 +38,22 @@
this.tmrProgressUpdate = new System.Windows.Forms.Timer(this.components);
this.tbxRegionRadio = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.tbxMeterFw = new System.Windows.Forms.TextBox();
this.tbxMeterMeterSize = new System.Windows.Forms.TextBox();
this.tbxMeterLutCrc = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.lblFwVersion = new System.Windows.Forms.Label();
this.cbForProd = new System.Windows.Forms.CheckBox();
this.btnOpenLutFile = new System.Windows.Forms.Button();
this.btnStore = new System.Windows.Forms.Button();
this.dgvLuts = new System.Windows.Forms.DataGridView();
this.FileId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.FileName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.FW = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.LUTCRC = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.MeterSize = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Region = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ForProd = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.Dele = new System.Windows.Forms.DataGridViewButtonColumn();
this.cordonelMetrologyLutBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.btnLoad = new System.Windows.Forms.Button();
this.tbxVersion = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.tbxDataLengt = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgvLuts)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cordonelMetrologyLutBindingSource)).BeginInit();
this.SuspendLayout();
//
// label7
@@ -108,7 +103,7 @@
//
// tbxRegionRadio
//
this.tbxRegionRadio.Location = new System.Drawing.Point(97, 151);
this.tbxRegionRadio.Location = new System.Drawing.Point(97, 128);
this.tbxRegionRadio.Name = "tbxRegionRadio";
this.tbxRegionRadio.ReadOnly = true;
this.tbxRegionRadio.Size = new System.Drawing.Size(144, 20);
@@ -117,23 +112,15 @@
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(17, 158);
this.label8.Location = new System.Drawing.Point(17, 135);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(44, 13);
this.label8.TabIndex = 53;
this.label8.Text = "Region:";
//
// tbxMeterFw
//
this.tbxMeterFw.Location = new System.Drawing.Point(97, 73);
this.tbxMeterFw.Name = "tbxMeterFw";
this.tbxMeterFw.ReadOnly = true;
this.tbxMeterFw.Size = new System.Drawing.Size(144, 20);
this.tbxMeterFw.TabIndex = 51;
//
// tbxMeterMeterSize
//
this.tbxMeterMeterSize.Location = new System.Drawing.Point(97, 125);
this.tbxMeterMeterSize.Location = new System.Drawing.Point(97, 102);
this.tbxMeterMeterSize.Name = "tbxMeterMeterSize";
this.tbxMeterMeterSize.ReadOnly = true;
this.tbxMeterMeterSize.Size = new System.Drawing.Size(144, 20);
@@ -141,7 +128,7 @@
//
// tbxMeterLutCrc
//
this.tbxMeterLutCrc.Location = new System.Drawing.Point(97, 99);
this.tbxMeterLutCrc.Location = new System.Drawing.Point(97, 76);
this.tbxMeterLutCrc.Name = "tbxMeterLutCrc";
this.tbxMeterLutCrc.ReadOnly = true;
this.tbxMeterLutCrc.Size = new System.Drawing.Size(144, 20);
@@ -150,7 +137,7 @@
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(17, 132);
this.label5.Location = new System.Drawing.Point(17, 109);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(60, 13);
this.label5.TabIndex = 48;
@@ -159,32 +146,13 @@
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(17, 106);
this.label6.Location = new System.Drawing.Point(17, 83);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(56, 13);
this.label6.TabIndex = 47;
this.label6.Text = "LUT CRC:";
this.label6.Click += new System.EventHandler(this.label6_Click);
//
// lblFwVersion
//
this.lblFwVersion.AutoSize = true;
this.lblFwVersion.Location = new System.Drawing.Point(17, 80);
this.lblFwVersion.Name = "lblFwVersion";
this.lblFwVersion.Size = new System.Drawing.Size(27, 13);
this.lblFwVersion.TabIndex = 46;
this.lblFwVersion.Text = "FW:";
//
// cbForProd
//
this.cbForProd.AutoSize = true;
this.cbForProd.Location = new System.Drawing.Point(97, 203);
this.cbForProd.Name = "cbForProd";
this.cbForProd.Size = new System.Drawing.Size(95, 17);
this.cbForProd.TabIndex = 55;
this.cbForProd.Text = "For Production";
this.cbForProd.UseVisualStyleBackColor = true;
//
// btnOpenLutFile
//
this.btnOpenLutFile.Location = new System.Drawing.Point(260, 47);
@@ -209,16 +177,9 @@
//
this.dgvLuts.AllowUserToAddRows = false;
this.dgvLuts.AllowUserToDeleteRows = false;
this.dgvLuts.AutoGenerateColumns = false;
this.dgvLuts.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvLuts.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.FileId,
this.FileName,
this.FW,
this.LUTCRC,
this.MeterSize,
this.Region,
this.ForProd,
this.Dele});
this.dgvLuts.DataSource = this.cordonelMetrologyLutBindingSource;
this.dgvLuts.Location = new System.Drawing.Point(3, 378);
this.dgvLuts.Name = "dgvLuts";
this.dgvLuts.ReadOnly = true;
@@ -226,54 +187,6 @@
this.dgvLuts.Size = new System.Drawing.Size(775, 149);
this.dgvLuts.TabIndex = 58;
//
// FileId
//
this.FileId.HeaderText = "FileId";
this.FileId.Name = "FileId";
this.FileId.ReadOnly = true;
//
// FileName
//
this.FileName.HeaderText = "FileName";
this.FileName.Name = "FileName";
this.FileName.ReadOnly = true;
//
// FW
//
this.FW.HeaderText = "Fw";
this.FW.Name = "FW";
this.FW.ReadOnly = true;
//
// LUTCRC
//
this.LUTCRC.HeaderText = "LUT CRC";
this.LUTCRC.Name = "LUTCRC";
this.LUTCRC.ReadOnly = true;
//
// MeterSize
//
this.MeterSize.HeaderText = "MeterSize";
this.MeterSize.Name = "MeterSize";
this.MeterSize.ReadOnly = true;
//
// Region
//
this.Region.HeaderText = "Region";
this.Region.Name = "Region";
this.Region.ReadOnly = true;
//
// ForProd
//
this.ForProd.HeaderText = "ForProd";
this.ForProd.Name = "ForProd";
this.ForProd.ReadOnly = true;
//
// Dele
//
this.Dele.HeaderText = "Delete";
this.Dele.Name = "Dele";
this.Dele.ReadOnly = true;
//
// btnLoad
//
this.btnLoad.Location = new System.Drawing.Point(12, 344);
@@ -282,6 +195,41 @@
this.btnLoad.TabIndex = 59;
this.btnLoad.Text = "Load";
this.btnLoad.UseVisualStyleBackColor = true;
this.btnLoad.Click += new System.EventHandler(this.btnLoad_Click);
//
// tbxVersion
//
this.tbxVersion.Location = new System.Drawing.Point(97, 154);
this.tbxVersion.Name = "tbxVersion";
this.tbxVersion.ReadOnly = true;
this.tbxVersion.Size = new System.Drawing.Size(144, 20);
this.tbxVersion.TabIndex = 61;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(17, 161);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(45, 13);
this.label1.TabIndex = 60;
this.label1.Text = "Version:";
//
// tbxDataLengt
//
this.tbxDataLengt.Location = new System.Drawing.Point(97, 180);
this.tbxDataLengt.Name = "tbxDataLengt";
this.tbxDataLengt.ReadOnly = true;
this.tbxDataLengt.Size = new System.Drawing.Size(144, 20);
this.tbxDataLengt.TabIndex = 63;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(17, 187);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(66, 13);
this.label2.TabIndex = 62;
this.label2.Text = "Data Length";
//
// FrmLutManagement
//
@@ -289,21 +237,22 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(784, 561);
this.Controls.Add(this.tbxDataLengt);
this.Controls.Add(this.label2);
this.Controls.Add(this.tbxVersion);
this.Controls.Add(this.label1);
this.Controls.Add(this.btnLoad);
this.Controls.Add(this.dgvLuts);
this.Controls.Add(this.btnStore);
this.Controls.Add(this.btnOpenLutFile);
this.Controls.Add(this.cbForProd);
this.Controls.Add(this.tbxRegionRadio);
this.Controls.Add(this.label8);
this.Controls.Add(this.tbxMeterFw);
this.Controls.Add(this.tbxMeterMeterSize);
this.Controls.Add(this.tbxLutFilePathName);
this.Controls.Add(this.label4);
this.Controls.Add(this.tbxMeterLutCrc);
this.Controls.Add(this.label5);
this.Controls.Add(this.label6);
this.Controls.Add(this.lblFwVersion);
this.Controls.Add(this.label7);
this.Controls.Add(this.pictureBox1);
this.MaximizeBox = false;
@@ -314,6 +263,7 @@
this.Text = "Metrology Lookup Table Managment";
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dgvLuts)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cordonelMetrologyLutBindingSource)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -330,24 +280,34 @@
private System.Windows.Forms.Timer tmrProgressUpdate;
private System.Windows.Forms.TextBox tbxRegionRadio;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox tbxMeterFw;
private System.Windows.Forms.TextBox tbxMeterMeterSize;
private System.Windows.Forms.TextBox tbxMeterLutCrc;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label lblFwVersion;
private System.Windows.Forms.CheckBox cbForProd;
private System.Windows.Forms.Button btnOpenLutFile;
private System.Windows.Forms.Button btnStore;
private System.Windows.Forms.DataGridView dgvLuts;
private System.Windows.Forms.DataGridViewTextBoxColumn FileId;
private System.Windows.Forms.DataGridViewTextBoxColumn FileName;
private System.Windows.Forms.DataGridViewTextBoxColumn FW;
private System.Windows.Forms.DataGridViewTextBoxColumn LUTCRC;
private System.Windows.Forms.DataGridViewTextBoxColumn MeterSize;
private System.Windows.Forms.DataGridViewTextBoxColumn Region;
private System.Windows.Forms.DataGridViewCheckBoxColumn ForProd;
private System.Windows.Forms.DataGridViewButtonColumn Dele;
private System.Windows.Forms.Button btnLoad;
private System.Windows.Forms.TextBox tbxVersion;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox tbxDataLengt;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.DataGridViewTextBoxColumn fileIdDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn fileNameDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn meterSizeDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn regionDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn cRCDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewCheckBoxColumn forProductionDataGridViewCheckBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn idDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4;
private System.Windows.Forms.DataGridViewTextBoxColumn fileCrcDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn dataLengthDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn versionDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewCheckBoxColumn currentVerionForProdDataGridViewCheckBoxColumn;
private System.Windows.Forms.DataGridViewImageColumn fileContentDataGridViewImageColumn;
private System.Windows.Forms.BindingSource cordonelMetrologyLutBindingSource;
}
}
+164 -13
View File
@@ -1,16 +1,18 @@
using System;
using Logic.ProductionToProductMapper.Cordonel;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using Logic.ProductionToProductMapper.Cordonel;
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile;
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
using Xylem.Common.Utils.ProcessExec.EventArguments;
using Xylem.Common.Logic.ProductionOrderCore.File;
using Xylem.Common.Logic.SoftwareAccessHelper;
using Xylem.Common.Utils.Crc16Ccitt;
namespace Xylem.Common.Ui.GenesisToolBox
{
@@ -20,12 +22,6 @@ namespace Xylem.Common.Ui.GenesisToolBox
public partial class FrmLutManagement : Form
{
#region Variables
private readonly MeterBatch _meterBatch = new MeterBatch();
private GenesisMeter _currentGenesis;
private const String StrConnecting = "Connecting to PCB";
private const String StrNotConnected = "NOT CONNECTED";
private const String StrPartPcbConnected = "PCB ID: ";
private const String StrOverallProcess = "Overall Process";
private MeterLutUpdate _meterLutUpdate;
@@ -43,6 +39,35 @@ namespace Xylem.Common.Ui.GenesisToolBox
private const String StrLutFileInvalid = "LUT FILE INVALID";
private const String StrLutFileValid = "LUT file loaded";
private const String StrLutFileId = "GEN_LUT\0";
private const Int32 IndexLutFileId = 0;
private const Int32 LengthLutFileId = 8;
// data length, calculated from version field to the end of the data section
private const Int32 IndexDataLength = 8;
private const Int32 LengthDataLength = 4;
// CCITT-CRC-16 , calculated from version field to the end of the data section
private const Int32 IndexCrc = 12;
private const Int32 LengthCrc = 2;
// version
private const Int32 IndexVersion = 14;
private const Int32 LengthVersion = 2;
// meter size as enumeration
private const Int32 IndexMeterSize = 16;
// header size of file
private const Int32 LutFileHeaderLength = LengthLutFileId + LengthDataLength + LengthCrc + LengthVersion;
// data size of file
private const Int32 LutFileDataLength = 730;
// LUT file entire file size
private const Int32 SizeLutFile = LutFileHeaderLength + LutFileDataLength;
// external update remarks form
private readonly FrmHistory _frmHistory = new FrmHistory();
@@ -65,15 +90,91 @@ namespace Xylem.Common.Ui.GenesisToolBox
public FrmLutManagement()
{
InitializeComponent();
//
// cordonelMetrologyLutBindingSource
//
this.cordonelMetrologyLutBindingSource.DataSource = typeof(CordonelMetrologyLut);
var cultureInfo = new CultureInfo("en-GB");
Thread.CurrentThread.CurrentUICulture = cultureInfo;
Thread.CurrentThread.CurrentCulture = cultureInfo;
_version = Assembly.GetExecutingAssembly().GetName().Version;
}
string _StrLutRegion;
string _StrLutVersion;
MeterSize _MeterSize;
UInt16 _FileCrc;
UInt16 _Version;
UInt32 _DataLength;
string lutFilePathName;
string lutFileName;
private void btnOpenLutFile_Click(object sender, EventArgs e)
{
if (dlgOpenLuFile.ShowDialog() != DialogResult.OK)
{
return;
}
var ErrorMessage = "";
lutFilePathName = dlgOpenLuFile.FileName;
lutFileName = Path.GetFileNameWithoutExtension(lutFilePathName);
var BinData = new List<Byte>(File.ReadAllBytes(lutFilePathName));
// check if LUT file contains data
if (BinData == null)
{
ErrorMessage = "File size mismatch!";
}
btnStore.Enabled = false;
var IsValid = false;
var IndexLutFileId = 0;
var LengthLutFileId = 8;
var IndexDataLength = 8;
var LengthDataLength = 4;
// extract the identifier and check, if this is a LUT file
var StrLutFileId = Encoding.UTF8.GetString(BinData.ToArray(), IndexLutFileId, IndexDataLength);
_StrLutRegion = lutFileName.Split('_')[3];
_StrLutVersion = lutFileName.Split('_')[2];
_MeterSize = (MeterSize)BinData[IndexMeterSize];
_FileCrc = (UInt16)(BinData[IndexCrc] + (BinData[IndexCrc + 1] << 8));
_Version = (UInt16)(BinData[IndexVersion] + (BinData[IndexVersion + 1] << 8));
_DataLength = (UInt32)(BinData[IndexDataLength]
+ (BinData[IndexDataLength + 1] << 8)
+ (BinData[IndexDataLength + 2] << 16)
+ (BinData[IndexDataLength + 3] << 24));
// calculate CRC and compare this with the file CRC
var entireFile = new List<Byte>();
entireFile.AddRange(BinData);
var payload = new List<Byte>();
payload.AddRange(entireFile.GetRange(IndexVersion, LutFileDataLength + LengthVersion));
var calculatedCrc = Crc16Ccitt.CalculateMsb1021(payload.ToArray());
if (calculatedCrc != _FileCrc)
{
ErrorMessage = "CRC mismatch!";
}
var CalculatedCrc = calculatedCrc;
IsValid = true;
btnStore.Enabled = IsValid;
tbxLutFilePathName.Text = lutFilePathName;
tbxMeterLutCrc.Text = _FileCrc.ToString("X4");
tbxMeterMeterSize.Text = _MeterSize.ToString();
tbxRegionRadio.Text = _StrLutRegion;
tbxVersion.Text = _StrLutVersion;
tbxDataLengt.Text = _DataLength.ToString();
//lutFilePathName.
////mettbl_202203101419_v0.04_EMEA_DN50_v1.00_0xC50F
}
/// <summary>
/// Clear data table and set genesis to not connected
/// </summary>
@@ -92,11 +193,61 @@ namespace Xylem.Common.Ui.GenesisToolBox
private void button1_Click(object sender, EventArgs e)
{
var FileList = new Dictionary<String, String>();
var fileConfig = new FileInfo(tbxLutFilePathName.Text);
FileList = new Dictionary<String, String>();
FileList.Add(fileConfig.Name, fileConfig.FullName);
StringBuilder sbUrl = new StringBuilder();
// sbUrl.Append("http://10.49.40.25/MeterProcessState/api/FileUpToDate/PostLutFile");
sbUrl.Append("http://localhost:56011//api/FileUpToDate/PostLutFile");
//
sbUrl.Append($"?DataLength={_DataLength}");
sbUrl.Append($"&version={_Version}");
sbUrl.Append($"&crc={_FileCrc}");
sbUrl.Append($"&Metersize={_MeterSize.GetHashCode()}");
sbUrl.Append($"&Region={_StrLutRegion}");
var result = LocalWebRequest.PostBinaryFileRequestAsync(sbUrl.ToString(), lutFileName, File.ReadAllBytes(lutFilePathName), 2800);
}
private void label4_Click(object sender, EventArgs e)
{
}
private void btnLoad_Click(object sender, EventArgs e)
{
StringBuilder sbUrl = new StringBuilder();
// sbUrl.Append("http://10.49.40.25/MeterProcessState/api/FileUpToDate/GetLutFiles");
sbUrl.Append("http://localhost:56011/api/FileUpToDate/GetLutFiles");
//sbUrl.Append($"?DataLength={_DataLength}");
//sbUrl.Append($"&version={_Version}");
//sbUrl.Append($"&crc={_FileCrc}");
//sbUrl.Append($"&Metersize={_MeterSize.GetHashCode()}");
//sbUrl.Append($"&Region={_StrLutRegion}");
var ret = LocalWebRequest.GetRequest(sbUrl.ToString());
var a = JsonConvert.DeserializeObject<List<CordonelMetrologyLut>>(ret);
dgvLuts.DataSource = a;
}
}
}
+2 -47
View File
@@ -126,52 +126,7 @@
<metadata name="tmrProgressUpdate.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>274, 17</value>
</metadata>
<metadata name="FileId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="FileName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="FW.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="LUTCRC.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="MeterSize.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Region.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ForProd.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Dele.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="FileId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="FileName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="FW.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="LUTCRC.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="MeterSize.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Region.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ForProd.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Dele.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
<metadata name="cordonelMetrologyLutBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>572, 17</value>
</metadata>
</root>
@@ -545,8 +545,10 @@
<None Include="packages.config" />
<None Include="Properties\app.manifest" />
<None Include="Properties\DataSources\Logic.PrdoctionToProductMapper.Cordonel.CalibrationResult.datasource" />
<None Include="Properties\DataSources\Logic.ProductionToProductMapper.Cordonel.CordonelMetrologyLut.datasource" />
<None Include="Properties\DataSources\Logic.ProductionToProductMapper.Cordonel.RegisterHisory.datasource" />
<None Include="Properties\DataSources\Logic.ProductionToProductMapper.Files.Fw.FilePart.datasource" />
<None Include="Properties\DataSources\Logic.ProductionToProductMapper.Files.Lut.CordonelMetrologyLut.datasource" />
<None Include="Properties\DataSources\OfflinePaswordItem.datasource" />
<None Include="Properties\DataSources\RegisterWriteItem.datasource" />
<None Include="Properties\DataSources\Xylem.Common.Ui.GenesisToolBox.Properties.Resources.datasource" />
@@ -664,6 +666,10 @@
<Project>{8a619cd5-6c8d-420c-a132-7946c6f13e6e}</Project>
<Name>ByteArrayStyle</Name>
</ProjectReference>
<ProjectReference Include="..\..\Utils\Crc16Ccitt\Crc16Ccitt.csproj">
<Project>{91DEF0C0-AA4F-40AE-8F18-CB717FDE7E7F}</Project>
<Name>Crc16Ccitt</Name>
</ProjectReference>
<ProjectReference Include="..\..\Utils\Logging\Logging.csproj">
<Project>{4b88b0d3-e791-4774-9521-eabeacdc420e}</Project>
<Name>Logging</Name>
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is automatically generated by Visual Studio .Net. It is
used to store generic object data source configuration information.
Renaming the file extension or editing the content of this file may
cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="CordonelMetrologyLut" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>Logic.ProductionToProductMapper.Cordonel.CordonelMetrologyLut, Logic.ProductionToProductMapper, Version=2.2.8.24795, Culture=neutral, PublicKeyToken=null</TypeInfo>
</GenericObjectDataSource>
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is automatically generated by Visual Studio .Net. It is
used to store generic object data source configuration information.
Renaming the file extension or editing the content of this file may
cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="CordonelMetrologyLut" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>Logic.ProductionToProductMapper.Files.Lut.CordonelMetrologyLut, Logic.ProductionToProductMapper, Version=2.2.8.19216, Culture=neutral, PublicKeyToken=null</TypeInfo>
</GenericObjectDataSource>
@@ -632,6 +632,11 @@ namespace XylemCommonUiLegacyGenCtl
setBusy(true, $"Füge {serialNumber} hinzu");
Task.Factory.StartNew(() =>
{
if (batch.ListOfMeters.Any(f => f.Slot == slot))
{
batch.RemoveMeter(batch.ListOfMeters.First(f => f.Slot == slot));
}
var meter = new GenesisMeter();
meter.SerialNumber = serialNumber;
meter.CurrentActionText = "FlowTest";