Merge branch 'main' of https://slm.sms-esaap.com/la_operations/laa_production
This commit is contained in:
@@ -14,5 +14,5 @@ using System.Reflection;
|
||||
//[assembly: AssemblyVersion("1.2.*.0")]
|
||||
|
||||
|
||||
[assembly: AssemblyVersion("2.6.9.*")]
|
||||
[assembly: AssemblyFileVersion("2.6.9.0")]
|
||||
[assembly: AssemblyVersion("2.6.10.*")]
|
||||
[assembly: AssemblyFileVersion("2.6.10.0")]
|
||||
@@ -155,7 +155,7 @@
|
||||
</site>
|
||||
<site name="MeterProcessState" id="2">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\SZLATEV\source\repos\laa_production\Common\Service\MeterProcessState" />
|
||||
<virtualDirectory path="/" physicalPath="D:\Projekte\SENSUS_GitLab\LAA_PRODUCTION\Common\Service\MeterProcessState" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:56011:localhost" />
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Xylem.Common.Utils.Clone
|
||||
{
|
||||
public static class ReflectionExtensions
|
||||
{
|
||||
private static readonly ConcurrentDictionary<Type, IDictionary<Func<Object, Object[], Object>, Action<Object, Object, Object[]>>> metadata
|
||||
= new ConcurrentDictionary<Type, IDictionary<Func<Object, Object[], Object>, Action<Object, Object, Object[]>>>();
|
||||
|
||||
public static void CloneProperties<T>(T source, T destination) //where T : class
|
||||
{
|
||||
var type = typeof(T);
|
||||
var properties = metadata.GetOrAdd(type, AddTypeProperties);
|
||||
|
||||
foreach (var kvp in properties)
|
||||
{
|
||||
var getter = kvp.Key;
|
||||
var setter = kvp.Value;
|
||||
var value = getter(source, null);
|
||||
setter(destination, value, null);
|
||||
}
|
||||
}
|
||||
|
||||
private static IDictionary<Func<Object, Object[], Object>, Action<Object, Object, Object[]>> AddTypeProperties(Type type)
|
||||
{
|
||||
var properties = new Dictionary<Func<Object, Object[], Object>, Action<Object, Object, Object[]>>();
|
||||
|
||||
foreach (var property in type.GetProperties(BindingFlags.Instance | BindingFlags.Public))
|
||||
{
|
||||
if (property.CanWrite)
|
||||
{
|
||||
properties[property.GetValue] = property.SetValue;
|
||||
}
|
||||
}
|
||||
return properties;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{96D3867D-E4C0-4880-AA2A-71342DBA8C2C}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Xylem.Common.Utils.Clone</RootNamespace>
|
||||
<AssemblyName>Xylem.Common.Utils.Clone</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Clone.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Properties\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -116,9 +116,8 @@
|
||||
<PropertyGroup />
|
||||
<PropertyGroup />
|
||||
<PropertyGroup />
|
||||
<PropertyGroup>
|
||||
<NoWin32Manifest>true</NoWin32Manifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup />
|
||||
<PropertyGroup />
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
|
||||
namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore.Consts
|
||||
{
|
||||
/// <summary>
|
||||
/// Update capability check for all necessary settings according to meter.
|
||||
/// </summary>
|
||||
public static class MetrologyDefinition
|
||||
{
|
||||
/// <summary>
|
||||
/// It is allowed to upgrade the metrology, causing an upgrade capability check to pass always.
|
||||
/// </summary>
|
||||
public const Byte MetrologyUpgradePermitted = 0xFF;
|
||||
/// <summary>
|
||||
/// The name of the metrology application.
|
||||
/// </summary>
|
||||
public const String MetrologyName = "GENESISFLOW";
|
||||
|
||||
}
|
||||
}
|
||||
@@ -229,6 +229,7 @@
|
||||
<Link>Properties\SharedAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="Consts\PowCorrConst.cs" />
|
||||
<Compile Include="Consts\MetrologyDefinition.cs" />
|
||||
<Compile Include="PowerCorrectionCalc.cs" />
|
||||
<Compile Include="PowerCorrection.cs" />
|
||||
<Compile Include="Consts\ErrorState.cs" />
|
||||
|
||||
@@ -2556,12 +2556,20 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
|
||||
/// </summary>
|
||||
/// <param name="progressName"></param>
|
||||
/// <param name="version"></param>
|
||||
/// <remarks date="2019-Apr-06" author="Roland Drabesch">
|
||||
/// - Initial
|
||||
/// </remarks>
|
||||
/// <remarks date="2024-Aug-06" author="Thomas Wiedebusch">
|
||||
/// - Using MetrologyUpgradePermission to flag if metrology is updateable as for "NA" versions this is the case.
|
||||
/// </remarks>
|
||||
public void PushProgress(String progressName, String version)
|
||||
{
|
||||
var apps = new List<CordonelAppVersion>();
|
||||
foreach (var item in MeterAppListVersion)
|
||||
{
|
||||
apps.Add(new CordonelAppVersion(item.AppId, item.StrVersion, item.AppId != 15));
|
||||
var isUpdateable = !(item.AppName.Equals(MetrologyDefinition.MetrologyName) &&
|
||||
MetrologyUpgradePermission != MetrologyDefinition.MetrologyUpgradePermitted);
|
||||
apps.Add(new CordonelAppVersion(item.AppId, item.StrVersion, isUpdateable));
|
||||
}
|
||||
|
||||
apps.Add(new CordonelAppVersion(-1, StrCoreRevision, false));
|
||||
|
||||
@@ -114,6 +114,7 @@
|
||||
<Compile Include="Consts\FwUpdateState.cs" />
|
||||
<Compile Include="Consts\FwUpdateStateInfo.cs" />
|
||||
<Compile Include="Consts\FwUpdateStateText.cs" />
|
||||
<Compile Include="MeterFwUpdateCapability.cs" />
|
||||
<Compile Include="MeterLogFiles.cs" />
|
||||
<Compile Include="MeterLutFile.cs" />
|
||||
<Compile Include="MeterFileRestore.cs" />
|
||||
@@ -121,7 +122,6 @@
|
||||
<Compile Include="MeterResetPsu.cs" />
|
||||
<Compile Include="MeterLutUpdate.cs" />
|
||||
<Compile Include="MeterFwUpdate.cs" />
|
||||
<Compile Include="MeterFwUpdateCapability.cs" />
|
||||
<Compile Include="MeterPowerCorrectionFile.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="MeterFile.cs" />
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore.Consts;
|
||||
|
||||
namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
|
||||
{
|
||||
@@ -9,15 +10,6 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
|
||||
/// </summary>
|
||||
public static class MeterFwUpdateCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// It is allowed to upgrade the metrology, causing an upgrade capability check to pass always.
|
||||
/// </summary>
|
||||
public const Byte MetrologyUpgradePermitted = 0xFF;
|
||||
/// <summary>
|
||||
/// The name of the metrology application.
|
||||
/// </summary>
|
||||
public const String MetrologyName = "GENESISFLOW";
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the metrology upgrade is allowed or the version is already installed.
|
||||
/// The application description file "ADF" has to be read in advance as this contains the "GENSISFLOW" version.
|
||||
@@ -36,11 +28,11 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
|
||||
if (meterFwUpdate == null || currentGenesis == null) return false;
|
||||
|
||||
// if the update is allowed, a version check is not needed
|
||||
if (currentGenesis.MetrologyUpgradePermission == MetrologyUpgradePermitted) return true;
|
||||
if (currentGenesis.MetrologyUpgradePermission == MetrologyDefinition.MetrologyUpgradePermitted) return true;
|
||||
|
||||
// extract the metrology version and CRC from the Genesis meter.
|
||||
var installedMetrology =
|
||||
currentGenesis.MeterAppListVersion.FirstOrDefault(im => im.AppName == MetrologyName);
|
||||
currentGenesis.MeterAppListVersion.FirstOrDefault(im => im.AppName == MetrologyDefinition.MetrologyName);
|
||||
|
||||
// extract version and CRC from the ADF, ATTENTION the AppName is not det here, so check for AppId!
|
||||
var requiredMetrology = meterFwUpdate.FileApps.FirstOrDefault(rm => installedMetrology != null &&
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
89102b0142e574de38a9f47d370f3334e5e6c268
|
||||
8fbe991b217e7692af4817ad205b768685aa5a72
|
||||
|
||||
@@ -37,5 +37,17 @@ namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
|
||||
/// Cordonel length
|
||||
/// </summary>
|
||||
public Int64? Length { get; set; }
|
||||
/// <summary>
|
||||
/// Meter size code from SAP
|
||||
/// </summary>
|
||||
public String CordonelMeterSizeCode { get; set; }
|
||||
/// <summary>
|
||||
/// Meter size name
|
||||
/// </summary>
|
||||
public String CordonelMeterSizeName { get; set; }
|
||||
/// <summary>
|
||||
/// Meter size id fro direct programming to meter
|
||||
/// </summary>
|
||||
public Int64 CordonelMeterSizeId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/// <summary>
|
||||
/// Enumeration of meter sizes named as flow tube inner diameter,
|
||||
/// DNx is for the metric system with the unit millimeters mm and
|
||||
/// USx is for the imperial system with the unit inches inc or ".
|
||||
/// x INC is for the imperial system with the unit inches inc or ".
|
||||
///
|
||||
/// ATTENTION:
|
||||
/// These values are sorted and duplicated in the data base, be
|
||||
|
||||
@@ -8,8 +8,104 @@ namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
|
||||
/// </summary>
|
||||
public static class MeterSizeConverter
|
||||
{
|
||||
// metric in millimeter
|
||||
private const String StrDN40 = "DN40";
|
||||
private const String StrDN50 = "DN50";
|
||||
private const String StrDN65 = "DN65";
|
||||
private const String StrDN80 = "DN80";
|
||||
private const String StrDN100 = "DN100";
|
||||
private const String StrDN125 = "DN125";
|
||||
private const String StrDN150 = "DN150";
|
||||
private const String StrDN200 = "DN200";
|
||||
private const String StrDN250 = "DN250";
|
||||
private const String StrDN300 = "DN300";
|
||||
|
||||
// imperial in inch "
|
||||
private const String StrINC1_5 = "1 1/2 INC";
|
||||
private const String StrINC2 = "2 INC";
|
||||
private const String StrINC3 = "3 INC";
|
||||
private const String StrINC4 = "4 INC";
|
||||
private const String StrINC6 = "6 INC";
|
||||
private const String StrINC8 = "8 INC";
|
||||
private const String StrINC10 = "10 INC";
|
||||
private const String StrINC12 = "12 INC";
|
||||
|
||||
// imperial in inch "
|
||||
private const String StrUS1_5 = "US1_2";
|
||||
private const String StrUS2 = "US2";
|
||||
private const String StrUS3 = "US3";
|
||||
private const String StrUS4 = "US4";
|
||||
private const String StrUS6 = "US6";
|
||||
private const String StrUS8 = "US8";
|
||||
private const String StrUS10 = "US10";
|
||||
private const String StrUS12 = "US12";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Convert Meter size enumeration to name .
|
||||
/// Converts the meter size name to the enumeration (MeterSizeId):
|
||||
/// Takes the "DN40".."DN300" for metrical sizes and the "US1_5".."US12" or "1 1/2 INC".."12 INC"
|
||||
/// for imperial naming. The requirements uses the "1 1/2 INC" notation, the internal usage is "US1_5".
|
||||
/// </summary>
|
||||
/// <param name="meterSizeName"></param>
|
||||
/// <returns></returns>
|
||||
public static MeterSize ConvertMeterSizeNameToEnum(String meterSizeName)
|
||||
{
|
||||
if (string.IsNullOrEmpty(meterSizeName)) return MeterSize.NA;
|
||||
switch (meterSizeName)
|
||||
{
|
||||
case StrUS1_5:
|
||||
case StrINC1_5:
|
||||
return MeterSize.US1_5;
|
||||
case StrUS2:
|
||||
case StrINC2:
|
||||
return MeterSize.US2;
|
||||
case StrUS3:
|
||||
case StrINC3:
|
||||
return MeterSize.US3;
|
||||
case StrUS4:
|
||||
case StrINC4:
|
||||
return MeterSize.US4;
|
||||
case StrUS6:
|
||||
case StrINC6:
|
||||
return MeterSize.US6;
|
||||
case StrUS8:
|
||||
case StrINC8:
|
||||
return MeterSize.US8;
|
||||
case StrUS10:
|
||||
case StrINC10:
|
||||
return MeterSize.US10;
|
||||
case StrUS12:
|
||||
case StrINC12:
|
||||
return MeterSize.US12;
|
||||
|
||||
case StrDN40:
|
||||
return MeterSize.DN40;
|
||||
case StrDN50:
|
||||
return MeterSize.DN50;
|
||||
case StrDN65:
|
||||
return MeterSize.DN65;
|
||||
case StrDN80:
|
||||
return MeterSize.DN80;
|
||||
case StrDN100:
|
||||
return MeterSize.DN100;
|
||||
case StrDN125:
|
||||
return MeterSize.DN125;
|
||||
case StrDN150:
|
||||
return MeterSize.DN150;
|
||||
case StrDN200:
|
||||
return MeterSize.DN200;
|
||||
case StrDN250:
|
||||
return MeterSize.DN250;
|
||||
case StrDN300:
|
||||
return MeterSize.DN300;
|
||||
|
||||
default:
|
||||
return MeterSize.NA;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert Meter size enumeration to name (in DB dbo.CordonelMeterSizes named as Dn_InternalId).
|
||||
/// </summary>
|
||||
public static String ConvertMeterSizeEnumToSizeName(MeterSize? meterSizeId)
|
||||
{
|
||||
@@ -17,42 +113,42 @@ namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
|
||||
switch (meterSizeId)
|
||||
{
|
||||
case MeterSize.DN40:
|
||||
return "DN40";
|
||||
case MeterSize.DN50 :
|
||||
return "DN50";
|
||||
return StrDN40;
|
||||
case MeterSize.DN50:
|
||||
return StrDN50;
|
||||
case MeterSize.DN65:
|
||||
return "DN65";
|
||||
return StrDN65;
|
||||
case MeterSize.DN80:
|
||||
return "DN80";
|
||||
return StrDN80;
|
||||
case MeterSize.DN100:
|
||||
return "DN100";
|
||||
return StrDN100;
|
||||
case MeterSize.DN125:
|
||||
return "DN125";
|
||||
return StrDN125;
|
||||
case MeterSize.DN150:
|
||||
return "DN150";
|
||||
return StrDN150;
|
||||
case MeterSize.DN200:
|
||||
return "DN200";
|
||||
return StrDN200;
|
||||
case MeterSize.DN250:
|
||||
return "DN250";
|
||||
return StrDN250;
|
||||
case MeterSize.DN300:
|
||||
return "DN300";
|
||||
return StrDN300;
|
||||
|
||||
case MeterSize.US1_5:
|
||||
return "US1_5";
|
||||
return StrUS1_5;
|
||||
case MeterSize.US2:
|
||||
return "US2";
|
||||
return StrUS2;
|
||||
case MeterSize.US3:
|
||||
return "US3";
|
||||
return StrUS3;
|
||||
case MeterSize.US4:
|
||||
return "US4";
|
||||
return StrUS4;
|
||||
case MeterSize.US6:
|
||||
return "US6";
|
||||
return StrUS6;
|
||||
case MeterSize.US8:
|
||||
return "US8";
|
||||
return StrUS8;
|
||||
case MeterSize.US10:
|
||||
return "US10";
|
||||
return StrUS10;
|
||||
case MeterSize.US12:
|
||||
return "US12";
|
||||
return StrUS12;
|
||||
|
||||
case MeterSize.DNMAX:
|
||||
return Constants.StrWildcard;
|
||||
@@ -72,59 +168,59 @@ namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
|
||||
case 0: // All sizes
|
||||
return Constants.StrWildcard;
|
||||
case 40:
|
||||
return "DN40";
|
||||
return StrDN40;
|
||||
case 50 :
|
||||
return "DN50";
|
||||
return StrDN50;
|
||||
case 65:
|
||||
return "DN65";
|
||||
return StrDN65;
|
||||
case 80:
|
||||
return "DN80";
|
||||
return StrDN80;
|
||||
case 100:
|
||||
return "DN100";
|
||||
return StrDN100;
|
||||
case 125:
|
||||
return "DN125";
|
||||
return StrDN125;
|
||||
case 150:
|
||||
return "DN150";
|
||||
return StrDN150;
|
||||
case 200:
|
||||
return "DN200";
|
||||
return StrDN200;
|
||||
case 250:
|
||||
return "DN250";
|
||||
return StrDN250;
|
||||
case 300:
|
||||
return "DN300";
|
||||
return StrDN300;
|
||||
|
||||
case 1:
|
||||
return "US1_5";
|
||||
return StrUS1_5;
|
||||
case 2:
|
||||
return "US2";
|
||||
return StrUS2;
|
||||
case 3:
|
||||
return "US3";
|
||||
return StrUS3;
|
||||
case 4:
|
||||
return "US4";
|
||||
return StrUS4;
|
||||
case 5:
|
||||
return "US6";
|
||||
return StrUS6;
|
||||
case 6:
|
||||
return "US8";
|
||||
return StrUS8;
|
||||
case 7:
|
||||
return "US10";
|
||||
return StrUS10;
|
||||
case 8:
|
||||
return "US12";
|
||||
return StrUS12;
|
||||
|
||||
case 38:
|
||||
return "US1_5";
|
||||
return StrUS1_5;
|
||||
case 51:
|
||||
return "US2";
|
||||
return StrUS2;
|
||||
case 76:
|
||||
return "US3";
|
||||
return StrUS3;
|
||||
case 102:
|
||||
return "US4";
|
||||
return StrUS4;
|
||||
case 152:
|
||||
return "US6";
|
||||
return StrUS6;
|
||||
case 203:
|
||||
return "US8";
|
||||
return StrUS8;
|
||||
case 254:
|
||||
return "US10";
|
||||
return StrUS10;
|
||||
case 305:
|
||||
return "US12";
|
||||
return StrUS12;
|
||||
default:
|
||||
return Constants.StrWildcard;
|
||||
}
|
||||
@@ -167,13 +263,13 @@ namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
|
||||
return MeterSize.US3;
|
||||
case 4:
|
||||
return MeterSize.US4;
|
||||
case 6:
|
||||
case 5:
|
||||
return MeterSize.US6;
|
||||
case 8:
|
||||
case 6:
|
||||
return MeterSize.US8;
|
||||
case 10:
|
||||
case 7:
|
||||
return MeterSize.US10;
|
||||
case 12:
|
||||
case 8:
|
||||
return MeterSize.US12;
|
||||
|
||||
case 38:
|
||||
|
||||
@@ -75,6 +75,10 @@ namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
|
||||
|
||||
var csdIdent = vakoData.KeyValues.FirstOrDefault(a => a.Name == "C_GEN_CSD")?.Value;
|
||||
|
||||
if (String.IsNullOrEmpty(csdIdent))
|
||||
{
|
||||
throw new ApplicationException("CSD Could not befound");
|
||||
}
|
||||
if (orderNr == 3204790)
|
||||
{
|
||||
csdIdent = "773328";
|
||||
@@ -141,8 +145,6 @@ namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
|
||||
ident += vakoData.KeyValues.First(k => k.Key == "Nennweite").Charcode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
var retStr = LocalWebRequest.GetRequest($"http://sla12iis01/csdcore/csdservice/getstampings?CsdIdent={csdIdent}&GroupId=1&ProductIdent={ident}&ProductDn={rawVako.Dn}&ShowOnlyValidStampings=0", 8000);
|
||||
var retListRealCsd = JsonConvert.DeserializeObject<List<CsdParameterResult>>(retStr);
|
||||
if (retListRealCsd != null && retListRealCsd.Any())
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
mc:Ignorable="d"
|
||||
Title="FinalTest" MinHeight="500" MinWidth="600" Height="638" Width="800" Initialized="Window_Initialized" Closing="Window_Closing" PreviewKeyDown="Window_PreviewKeyDown">
|
||||
<DockPanel HorizontalAlignment="Stretch" Width="800" Height="600" VerticalAlignment="Top" Margin="0,0,2,0">
|
||||
<ToolBarTray DockPanel.Dock="Top" Visibility="Visible">
|
||||
<ToolBarTray DockPanel.Dock="Top" Visibility="Collapsed">
|
||||
<ToolBar>
|
||||
<Label>Slot:</Label>
|
||||
<ComboBox Name="cbxSlotBox" Margin="0,5,0,0" VerticalAlignment="Top" SelectionChanged="CbxSlotBox_SelectionChanged" />
|
||||
|
||||
+5
-18
@@ -75,6 +75,9 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||
|
||||
var res = JsonConvert.DeserializeObject<String[]>(csdRet);
|
||||
|
||||
|
||||
|
||||
|
||||
var CalibrationRun = res[4];
|
||||
var LastTestBechState = 0;
|
||||
Boolean? HyState;
|
||||
@@ -122,7 +125,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||
var genesisStatus = new GenesisStatus();
|
||||
|
||||
// this calculates all life time values
|
||||
if (!GenesisStatusHandler.BuildLifeTimeInformation(Meter, genesisStatus))
|
||||
if (!GenesisStatusHandler.BuildLifeTimeInformation(Meter, genesisStatus))
|
||||
{
|
||||
|
||||
setTxt("Batterie nicht lesbar", true, true);
|
||||
@@ -145,23 +148,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||
{
|
||||
|
||||
|
||||
if (
|
||||
Meter.PcbId == "235130036" ||
|
||||
Meter.PcbId == "235130211" ||
|
||||
Meter.PcbId == "235130121" ||
|
||||
Meter.PcbId == "235130122" ||
|
||||
Meter.PcbId == "235130353" ||
|
||||
Meter.PcbId == "235130447" ||
|
||||
Meter.PcbId == "235130112" ||
|
||||
Meter.PcbId == "235130582" ||
|
||||
Meter.PcbId == "235130237")
|
||||
{
|
||||
//currentProcessState = ProductionProcessState.Error;
|
||||
}
|
||||
else
|
||||
{
|
||||
//currentProcessState = ProductionProcessState.Error;
|
||||
}
|
||||
currentProcessState = ProductionProcessState.Error;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -523,7 +523,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
|
||||
var sbQuery = new StringBuilder();
|
||||
|
||||
sbQuery.AppendLine($" SELECT ");
|
||||
sbQuery.AppendLine($" SELECT distinct ");
|
||||
sbQuery.AppendLine($" [Seriennummer] ");
|
||||
sbQuery.AppendLine($" ,mps.MapPcbIdToSerialNumber_PcbId ");
|
||||
sbQuery.AppendLine($" ,[Adresse] ");
|
||||
@@ -536,6 +536,8 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
sbQuery.AppendLine($" ,passwordtbl.Password ");
|
||||
sbQuery.AppendLine($" ,passwordtbl.KitronSkeletonKey as Skeleton ");
|
||||
sbQuery.AppendLine($" ,passwordtbl.ProcessorID as ProcessorUid ");
|
||||
sbQuery.AppendLine($" ,passwordtbl.radioAdress ");
|
||||
|
||||
sbQuery.AppendLine($" FROM [Auftrag].[dbo].[Genesis_Meter] meter ");
|
||||
sbQuery.AppendLine($" inner join MapPcbIdToSerialNumber mps" +
|
||||
$" on mps.MapPcbIdToSerialNumber_SerialNumber = meter.Seriennummer and mps.MapPcbIdToSerialNumber_Deleted = 0 ");
|
||||
@@ -556,13 +558,26 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
using (var dataAccess = new SqlDataAccess(GlobalConfig.connectionString.Value))
|
||||
{
|
||||
var dt = dataAccess.ExecuteQuery(sbQuery.ToString());
|
||||
if (dt.Rows.Count != 1)
|
||||
{
|
||||
return Request.CreateResponse(HttpStatusCode.InternalServerError, new PcbIdNotException("Pcb not unique, mapping problem", new Guid("160B4C44-6EF7-41DC-A48D-4B4105B4779B")));
|
||||
}
|
||||
foreach (var item in dt.Select())
|
||||
{
|
||||
result.OrderNumber = (Int32)item["FertigungsauftragNr"];
|
||||
result.RadioAddress = (Int64)item["Adresse"];
|
||||
result.Skeleton = (String)item["Skeleton"];
|
||||
result.Password = (String)item["Password"];
|
||||
result.PasswordFileIdent = (result.RadioAddress.HasValue && result.RadioAddress.Value != 0) ? result.RadioAddress.Value.ToString() : PcbId;
|
||||
if (item["radioAdress"].GetType() != typeof(System.DBNull))
|
||||
{
|
||||
result.PasswordFileIdent = (String)item["radioAdress"].ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
result.PasswordFileIdent = (result.RadioAddress.HasValue && result.RadioAddress.Value != 0) ? result.RadioAddress.Value.ToString() : PcbId;
|
||||
}
|
||||
|
||||
|
||||
if (item["KeySetId"].GetType() != typeof(System.DBNull))
|
||||
{
|
||||
result.KeySetId = (String)item["KeySetId"];
|
||||
@@ -864,10 +879,10 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
|
||||
return LocalWebRequest.PostRequestAsyncAndGetContent(url: Url, header: header, json: helpArray.ToArray(), timeoutMs: 20000);
|
||||
}
|
||||
catch (Exception)
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
throw;
|
||||
return ex.Message;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -133,8 +133,8 @@
|
||||
$"{x.GetValue<Int32>(0)}", // SerialNr,
|
||||
$"{x.GetValue<Int32>(1)}", // FertigungsNr,
|
||||
$"{x.GetValue<Int64>(2)}", // RadioAddress,
|
||||
$"{x.GetValue<Int32?>(3)}", // CustomerSerialNr,
|
||||
$"{x.GetValue<String>(4)}", // CalibrationRunID,
|
||||
$"{x.GetValue<String>(3)}", // CustomerSerialNr,
|
||||
$"{x.GetValue<Int32?>(4)}", // CalibrationRunID,
|
||||
$"{x.GetValue<Byte>(5)}", // LastProcessState,
|
||||
$"{x.GetValue<Int32>(6)}", // Dn,
|
||||
$"{x.GetValue<Int32>(7)}", // NewNennweiteID,
|
||||
|
||||
@@ -446,7 +446,6 @@ namespace Xylem.Common.Logic.SoftwareAccessHelper
|
||||
private static HttpResponse<T> AsJson<T>(this Method method, String url, Action<RestRequestHeaders> headersHandler = null, Object model = null, Int32? timeoutMs = null)
|
||||
{
|
||||
var httpResponse = new HttpResponse<T>();
|
||||
var response = default(IRestResponse);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -474,7 +473,7 @@ namespace Xylem.Common.Logic.SoftwareAccessHelper
|
||||
|
||||
ServicePointManager.Expect100Continue = false;
|
||||
|
||||
response = client.Execute(request);
|
||||
var response = client.Execute(request);
|
||||
httpResponse.HttpStatusCode = response.StatusCode;
|
||||
|
||||
if (HttpStatusCode.OK <= response.StatusCode && response.StatusCode < HttpStatusCode.BadRequest)
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
338bdd8d71c148c9df0972f903098eb23eacf0c9
|
||||
1babc7d629fd8c486aff20f4990c117c2e58a68f
|
||||
|
||||
@@ -14,6 +14,7 @@ using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Applications.Const;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore.Consts;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisPwd;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisStatus;
|
||||
@@ -542,8 +543,8 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
var appVersion = new CordonelAppVersion(app.AppId, app.StrVersion);
|
||||
|
||||
// Copy metrology update permission
|
||||
if (app.AppName == MeterFwUpdateCapability.MetrologyName &&
|
||||
_currentGenesis.MetrologyUpgradePermission != MeterFwUpdateCapability.MetrologyUpgradePermitted)
|
||||
if (app.AppName == MetrologyDefinition.MetrologyName &&
|
||||
_currentGenesis.MetrologyUpgradePermission != MetrologyDefinition.MetrologyUpgradePermitted)
|
||||
{
|
||||
appVersion.IsUpdateable = false;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ using Logic.ProductionToProductMapper.Cordonel;
|
||||
using Newtonsoft.Json;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Applications.Const;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore.Consts;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile;
|
||||
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
||||
@@ -106,7 +107,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
lblFwUpdateInfo.Text = $@"Version: {version.Major}.{version.Minor}.{version.Build}";
|
||||
_resetTimeMeasurement = true;
|
||||
Init();
|
||||
|
||||
|
||||
var xPosition = Location.X + Size.Width;
|
||||
var yPosition = Location.Y;
|
||||
if (_frmHistory != null)
|
||||
@@ -353,7 +354,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
tbxMeterMeterSize.Text = _currentGenesis.MeterSize;
|
||||
tbxMeterLutCrc.Text = _currentGenesis.LutCrc;
|
||||
tbxRegion.Text = _currentGenesis.Region;
|
||||
|
||||
|
||||
if (!_lutFileSuccessfulWritten)
|
||||
{
|
||||
lblLutFileLoadedInfo.ForeColor = Color.Red;
|
||||
@@ -371,7 +372,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
}
|
||||
else
|
||||
{
|
||||
LogSuccessText(StrUpdateSuccessMessage);
|
||||
LogSuccessText(StrUpdateSuccessMessage);
|
||||
MessageBoxShow(StrUpdateSuccessMessage, @"SUCCESS",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
@@ -409,8 +410,8 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
var appVersion = new CordonelAppVersion(app.AppId, app.StrVersion);
|
||||
|
||||
// Copy metrology update permission
|
||||
if (app.AppName == MeterFwUpdateCapability.MetrologyName &&
|
||||
_currentGenesis.MetrologyUpgradePermission != MeterFwUpdateCapability.MetrologyUpgradePermitted)
|
||||
if (app.AppName == MetrologyDefinition.MetrologyName &&
|
||||
_currentGenesis.MetrologyUpgradePermission != MetrologyDefinition.MetrologyUpgradePermitted)
|
||||
{
|
||||
appVersion.IsUpdateable = false;
|
||||
}
|
||||
@@ -762,13 +763,13 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
cbxDbLuts.SelectedIndex = -1;
|
||||
cbxDbLuts.Items.Clear();
|
||||
|
||||
if (a == null) return;
|
||||
foreach (var item in a)
|
||||
{
|
||||
if (!prod || item.CurrentVersionForProd)
|
||||
{
|
||||
cbxDbLuts.Items.Add(item);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -126,6 +126,32 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
sbMSG.AppendLine("");
|
||||
sbMSG.AppendLine($"Remaining life time in years {genesisStatus.RemainingLifeTimeYears:F2}");
|
||||
sbMSG.AppendLine($"Totally drained battery load in % {genesisStatus.DrainedBatteryLoadPercent:F2}");
|
||||
sbMSG.AppendLine("");
|
||||
if (genesisStatus.UNTStatus)
|
||||
{
|
||||
sbMSG.AppendLine($"UNT Limit OK ");
|
||||
}
|
||||
else
|
||||
{
|
||||
sbMSG.AppendLine($"UNT Limit Failed ");
|
||||
}
|
||||
sbMSG.AppendLine($"UNT Limit data Limit {genesisStatus.UNTLimit} Meter has {genesisStatus.DrainedBatteryLoad_uAs}");
|
||||
|
||||
if (genesisStatus.DrainedBatteryLoad_uAs <= genesisStatus.ExceededLifeTime_s * 77.7)
|
||||
{
|
||||
sbMSG.AppendLine($"UNT Limit before testbench OK");
|
||||
}
|
||||
else
|
||||
{
|
||||
sbMSG.AppendLine($"UNT Limit before testbench Failed");
|
||||
}
|
||||
sbMSG.AppendLine($"UNT Limit before testbench {genesisStatus.ExceededLifeTime_s * 77.7} Meter has {genesisStatus.DrainedBatteryLoad_uAs}");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//ExceededLifeTime_s * 77.7)
|
||||
|
||||
MessageBox.Show(sbMSG.ToString(), $"Battery for {_currentGenesis.PcbId} has remaining life " +
|
||||
$"time of {genesisStatus.RemainingLifeTimeYears:F2} years");
|
||||
|
||||
@@ -9,7 +9,6 @@ using Newtonsoft.Json;
|
||||
using Xylem.Common.CommonCore.Configuration;
|
||||
using Xylem.Common.CommonCore.Consts;
|
||||
using Xylem.Common.Cryptology.Security;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Applications.Properties;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisPwd;
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Cordonel detected.
|
||||
/// Looks up a localized string similar to Cordonel detected..
|
||||
/// </summary>
|
||||
internal static string StrCordonelDetectSucceeded {
|
||||
get {
|
||||
@@ -206,7 +206,7 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Metrology version is approved.
|
||||
/// Looks up a localized string similar to Metrology version is approved..
|
||||
/// </summary>
|
||||
internal static string StrCordonelUpdateCapabilityMetrologySucceeded {
|
||||
get {
|
||||
@@ -214,6 +214,15 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Metrology version update permitted..
|
||||
/// </summary>
|
||||
internal static string StrCordonelUpdateCapabilityMetrologyUpdateable {
|
||||
get {
|
||||
return ResourceManager.GetString("StrCordonelUpdateCapabilityMetrologyUpdateable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ERROR: Deviating radio frequency!.
|
||||
/// </summary>
|
||||
@@ -224,7 +233,7 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Radio frequency is approved!.
|
||||
/// Looks up a localized string similar to Radio frequency is approved..
|
||||
/// </summary>
|
||||
internal static string StrCordonelUpdateCapabilityRadioSucceeded {
|
||||
get {
|
||||
@@ -242,7 +251,7 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Region is approved!.
|
||||
/// Looks up a localized string similar to Region is approved..
|
||||
/// </summary>
|
||||
internal static string StrCordonelUpdateCapabilityRegionSucceeded {
|
||||
get {
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
<value>ERROR: Cordonel detection failed</value>
|
||||
</data>
|
||||
<data name="StrCordonelDetectSucceeded" xml:space="preserve">
|
||||
<value>Cordonel detected</value>
|
||||
<value>Cordonel detected.</value>
|
||||
</data>
|
||||
<data name="StrCordonelDetectUnspecified" xml:space="preserve">
|
||||
<value>Cordonel detection.</value>
|
||||
@@ -200,13 +200,16 @@
|
||||
<value>ERROR: Deviating metrology version!</value>
|
||||
</data>
|
||||
<data name="StrCordonelUpdateCapabilityMetrologySucceeded" xml:space="preserve">
|
||||
<value>Metrology version is approved</value>
|
||||
<value>Metrology version is approved.</value>
|
||||
</data>
|
||||
<data name="StrCordonelUpdateCapabilityMetrologyUpdateable" xml:space="preserve">
|
||||
<value>Metrology version update permitted.</value>
|
||||
</data>
|
||||
<data name="StrCordonelUpdateCapabilityRegionFailed" xml:space="preserve">
|
||||
<value>ERROR: Deviating region!</value>
|
||||
</data>
|
||||
<data name="StrCordonelUpdateCapabilityRegionSucceeded" xml:space="preserve">
|
||||
<value>Region is approved!</value>
|
||||
<value>Region is approved.</value>
|
||||
</data>
|
||||
<data name="StrCordonelUpdateCapabilityMeterSizeFailed" xml:space="preserve">
|
||||
<value>ERROR: Deviating meter size!</value>
|
||||
@@ -218,7 +221,7 @@
|
||||
<value>ERROR: Deviating radio frequency!</value>
|
||||
</data>
|
||||
<data name="StrCordonelUpdateCapabilityRadioSucceeded" xml:space="preserve">
|
||||
<value>Radio frequency is approved!</value>
|
||||
<value>Radio frequency is approved.</value>
|
||||
</data>
|
||||
<data name="StrCordonelUpdateCapabilitySucceeded" xml:space="preserve">
|
||||
<value>Update capability validated.</value>
|
||||
|
||||
@@ -1035,7 +1035,7 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
_logger = NLogHelper.CreateOrGetLogger("ServiceFwUpdateBuilder");
|
||||
_assemblyName = Assembly.GetExecutingAssembly().GetName();
|
||||
_version = _assemblyName.Version;
|
||||
_versionString = $"{_assemblyName.Name} Version: {_version.Major}.{_version.Minor}.{_version.Build}";
|
||||
_versionString = $"{_assemblyName.Name} Version: {_version.Major}.{_version.Minor}.{_version.Build}.{_version.Revision}";
|
||||
_logger.Info(StrSeparator);
|
||||
_logger.Info(_versionString);
|
||||
_logger.Info(StrSeparator);
|
||||
@@ -4732,6 +4732,9 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
/// <remarks date="2024-Apr-30" author="Thomas Wiedebusch">
|
||||
/// - order.Length == null taken into account.
|
||||
/// </remarks>
|
||||
/// <remarks date="2024-Aug-05" author="Thomas Wiedebusch">
|
||||
/// - Display correct "USx" meter size from newly added order.CordonelMeterSizeId,
|
||||
/// </remarks>
|
||||
private void GetAllCordonelSerialNumbersOfOrderFromDb()
|
||||
{
|
||||
// get the customer ID
|
||||
@@ -4757,7 +4760,7 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
CatalogNumber = order.CatalogNumber,
|
||||
CustomerOrderNumber = order.CustomerOrderNumber,
|
||||
CustomerOrderPos = order.CustomerOrderPos,
|
||||
Diameter = MeterSizeConverter.ConvertOrderSizeNumberToSizeName(order.Diameter),
|
||||
Diameter = MeterSizeConverter.ConvertMeterSizeEnumToSizeName((MeterSize?)order.CordonelMeterSizeId),
|
||||
Length = order.Length == null
|
||||
? "?"
|
||||
: (order.Length < 150 ? $"{order.Length}\"" : $"{order.Length} mm"),
|
||||
|
||||
@@ -547,7 +547,7 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateLoader
|
||||
_logger = NLogHelper.CreateOrGetLogger("ServiceFwUpdateLoader");
|
||||
_version = Assembly.GetExecutingAssembly().GetName().Version;
|
||||
_logger.Info(StrSeparator);
|
||||
_logger.Info($"Service FW-Update Loader Version: {_version.Major}.{_version.Minor}.{_version.Build}");
|
||||
_logger.Info($"Service FW-Update Loader Version: {_version.Major}.{_version.Minor}.{_version.Build}.{_version.Revision}");
|
||||
_logger.Info(StrSeparator);
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
@@ -757,7 +757,7 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
|
||||
|
||||
// Log version to files for debug purposes
|
||||
_logger.Info(StrSeparator);
|
||||
_logger.Info($"Service FwUpdateSw Version: {_version.Major}.{_version.Minor}.{_version.Build}");
|
||||
_logger.Info($"Service FwUpdateSw Version: {_version.Major}.{_version.Minor}.{_version.Build}.{_version.Revision}");
|
||||
_logger.Info(StrSeparator);
|
||||
|
||||
_meterBatch = new MeterBatch();
|
||||
@@ -1602,12 +1602,20 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
|
||||
/// <remarks date="2021-Apr-15" author="Thomas Wiedebusch">
|
||||
/// - Success message implemented.
|
||||
/// </remarks>
|
||||
/// <remarks date="2024-Aug-06" author="Thomas Wiedebusch">
|
||||
/// - Success message implemented.
|
||||
/// </remarks>
|
||||
private Boolean MetrologyUpdateCapability()
|
||||
{
|
||||
// check the update capability
|
||||
if (MeterFwUpdateCapability.CheckMetrology(_meterFwUpdate, _currentGenesis))
|
||||
{
|
||||
InfoProcessSuccess(null, Resources.StrCordonelUpdateCapabilityMetrologySucceeded);
|
||||
if (_currentGenesis.MetrologyUpgradePermission == MetrologyDefinition.MetrologyUpgradePermitted)
|
||||
{
|
||||
InfoProcessSuccess(null, Resources.StrCordonelUpdateCapabilityMetrologyUpdateable);
|
||||
}
|
||||
else
|
||||
InfoProcessSuccess(null, Resources.StrCordonelUpdateCapabilityMetrologySucceeded);
|
||||
return true;
|
||||
}
|
||||
InfoProcessFailed(lblCordonelUpdateCapability, Resources.StrCordonelUpdateCapabilityMetrologyFailed);
|
||||
@@ -2468,8 +2476,8 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
|
||||
var appVersion = new CordonelAppVersion(app.AppId, app.StrVersion);
|
||||
|
||||
// Copy metrology update permission
|
||||
if (app.AppName == MeterFwUpdateCapability.MetrologyName &&
|
||||
_currentGenesis.MetrologyUpgradePermission != MeterFwUpdateCapability.MetrologyUpgradePermitted)
|
||||
if (app.AppName == MetrologyDefinition.MetrologyName &&
|
||||
_currentGenesis.MetrologyUpgradePermission != MetrologyDefinition.MetrologyUpgradePermitted)
|
||||
{
|
||||
appVersion.IsUpdateable = false;
|
||||
}
|
||||
@@ -5062,7 +5070,7 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
|
||||
{
|
||||
LogText($"{Resources.StrTestReportDate} {DateTime.UtcNow:dddd, dd-MMM-yyyy HH:mm:ss} UTC");
|
||||
LogText($"{Resources.StrTestReportSwNameVersion} " +
|
||||
$"{_version.Major}.{_version.Minor}.{_version.Build}");
|
||||
$"{_version.Major}.{_version.Minor}.{_version.Build}.{_version.Revision}");
|
||||
LogText(StrSeparator);
|
||||
|
||||
if (_fwUpdateSafeInfo != null)
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Cordonel detected.
|
||||
/// Looks up a localized string similar to Cordonel detected..
|
||||
/// </summary>
|
||||
internal static string StrCordonelDetectSucceeded {
|
||||
get {
|
||||
@@ -206,7 +206,7 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Metrology version is approved.
|
||||
/// Looks up a localized string similar to Metrology version is approved..
|
||||
/// </summary>
|
||||
internal static string StrCordonelUpdateCapabilityMetrologySucceeded {
|
||||
get {
|
||||
@@ -214,6 +214,15 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Metrology version update permitted..
|
||||
/// </summary>
|
||||
internal static string StrCordonelUpdateCapabilityMetrologyUpdateable {
|
||||
get {
|
||||
return ResourceManager.GetString("StrCordonelUpdateCapabilityMetrologyUpdateable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ERROR: Deviating radio frequency!.
|
||||
/// </summary>
|
||||
@@ -224,7 +233,7 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Radio frequency is approved!.
|
||||
/// Looks up a localized string similar to Radio frequency is approved..
|
||||
/// </summary>
|
||||
internal static string StrCordonelUpdateCapabilityRadioSucceeded {
|
||||
get {
|
||||
@@ -242,7 +251,7 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Region is approved!.
|
||||
/// Looks up a localized string similar to Region is approved..
|
||||
/// </summary>
|
||||
internal static string StrCordonelUpdateCapabilityRegionSucceeded {
|
||||
get {
|
||||
|
||||
@@ -202,6 +202,9 @@
|
||||
<data name="StrCordonelUpdateCapabilityMetrologySucceeded" xml:space="preserve">
|
||||
<value>Metrologieversion ist genehmigt.</value>
|
||||
</data>
|
||||
<data name="StrCordonelUpdateCapabilityMetrologyUpdateable" xml:space="preserve">
|
||||
<value>Metrologieversion Update genehmigt.</value>
|
||||
</data>
|
||||
<data name="StrCordonelUpdateCapabilityRegionFailed" xml:space="preserve">
|
||||
<value>FEHLER: Abweichender Region!</value>
|
||||
</data>
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
<value>ERROR: Cordonel detection failed</value>
|
||||
</data>
|
||||
<data name="StrCordonelDetectSucceeded" xml:space="preserve">
|
||||
<value>Cordonel detected</value>
|
||||
<value>Cordonel detected.</value>
|
||||
</data>
|
||||
<data name="StrCordonelDetectUnspecified" xml:space="preserve">
|
||||
<value>Cordonel detection.</value>
|
||||
@@ -200,13 +200,16 @@
|
||||
<value>ERROR: Deviating metrology version!</value>
|
||||
</data>
|
||||
<data name="StrCordonelUpdateCapabilityMetrologySucceeded" xml:space="preserve">
|
||||
<value>Metrology version is approved</value>
|
||||
<value>Metrology version is approved.</value>
|
||||
</data>
|
||||
<data name="StrCordonelUpdateCapabilityMetrologyUpdateable" xml:space="preserve">
|
||||
<value>Metrology version update permitted.</value>
|
||||
</data>
|
||||
<data name="StrCordonelUpdateCapabilityRegionFailed" xml:space="preserve">
|
||||
<value>ERROR: Deviating region!</value>
|
||||
</data>
|
||||
<data name="StrCordonelUpdateCapabilityRegionSucceeded" xml:space="preserve">
|
||||
<value>Region is approved!</value>
|
||||
<value>Region is approved.</value>
|
||||
</data>
|
||||
<data name="StrCordonelUpdateCapabilityMeterSizeFailed" xml:space="preserve">
|
||||
<value>ERROR: Deviating meter size!</value>
|
||||
@@ -218,7 +221,7 @@
|
||||
<value>ERROR: Deviating radio frequency!</value>
|
||||
</data>
|
||||
<data name="StrCordonelUpdateCapabilityRadioSucceeded" xml:space="preserve">
|
||||
<value>Radio frequency is approved!</value>
|
||||
<value>Radio frequency is approved.</value>
|
||||
</data>
|
||||
<data name="StrCordonelUpdateCapabilitySucceeded" xml:space="preserve">
|
||||
<value>Update capability validated.</value>
|
||||
|
||||
Reference in New Issue
Block a user