MeterSize moved from "Logic.PrdctionToProductMapper" to "ProductionOrderCore",
RegionRadio split to Region (string) and RadioFrequencyMhz (Int32?), CoreRevision changed from string to Int32?, Service\MeterProcessState\Controllers\GetCorondelFw changed to GetCordonelFw and corrected
This commit is contained in:
parent
51c5934b8b
commit
ef0d333d66
@ -155,7 +155,7 @@
|
||||
</site>
|
||||
<site name="MeterProcessState" id="2">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\drabesch_ro\Repo\lab\la_operations\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" />
|
||||
|
||||
@ -10,139 +10,144 @@ namespace Xylem.Common.CommonCore.Configuration
|
||||
public static class ServiceUrls
|
||||
{
|
||||
private const String DefaultGetPcbIdsFromSafeServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/GetPcbIdsFromSafe?ContainerDbId=";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/GetPcbIdsFromSafe?ContainerDbId=";
|
||||
|
||||
private const String DefaultAddPcbIdsToSafeServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/AddPcbIdsToSafe?ContainerDbId=";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/AddPcbIdsToSafe?ContainerDbId=";
|
||||
|
||||
private const String DefaultDownloadFilesPartsServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/api/FileUpToDate/GetFileParts?ParentFileId=";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/FileUpToDate/GetFileParts?ParentFileId=";
|
||||
|
||||
private const String DefaultListAllFwPackagesServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/api/FileUpToDate/GetFwFiles?FileIsForDeveloperOnly=false&FileCategoryID=1";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/FileUpToDate/GetFwFiles?FileIsForDeveloperOnly=false&FileCategoryID=1";
|
||||
|
||||
private const String DefaultListAllSwPackagesServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/api/FileUpToDate/GetFwFiles?FileIsForDeveloperOnly=false&FileCategoryID=5";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/FileUpToDate/GetFwFiles?FileIsForDeveloperOnly=false&FileCategoryID=5";
|
||||
|
||||
private const String DefaultListAllConfigFilePackagesServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/api/FileUpToDate/GetFwFiles?FileIsForDeveloperOnly=false&FileCategoryID=6";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/FileUpToDate/GetFwFiles?FileIsForDeveloperOnly=false&FileCategoryID=6";
|
||||
|
||||
private const String DefaultListAllFwUpdateSafesServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/api/FileUpToDate/GetFwFiles?FileIsForDeveloperOnly=false&FileCategoryID=4";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/FileUpToDate/GetFwFiles?FileIsForDeveloperOnly=false&FileCategoryID=4";
|
||||
|
||||
private const String DefaultSetCordonelAppVersionServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/api/ProccesState/SetCordonelProgress?PcbId=";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/ProccesState/SetCordonelProgress?PcbId=";
|
||||
|
||||
private const String DefaultGetCordonelAppVersionServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/api/ProccesState/GetCordonelAppVersion?PcbId=";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/ProccesState/GetCordonelAppVersion?PcbId=";
|
||||
|
||||
private const String DefaultListAllCordonelCustomersWithFilterServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/api/Order/GetCordonelCustomers?FilterName=";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/Order/GetCordonelCustomers?FilterName=";
|
||||
|
||||
private const String DefaultListAllCordonelCustomerOrdersServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/api/Order/GetCustomersCordonelOrders?CustomerNumber=";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/Order/GetCustomersCordonelOrders?CustomerNumber=";
|
||||
|
||||
private const String DefaultListAllOrderCordonelsServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/api/Order/GetCordonelOrderList?CustomerOrderNumber=";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/Order/GetCordonelOrderList?CustomerOrderNumber=";
|
||||
|
||||
private const String DefaultDownloadFwUpdateSafeServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/GetFWUpdateSafeContainerContent?SafeContainerId=";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/GetFWUpdateSafeContainerContent?SafeContainerId=";
|
||||
|
||||
private const String DefaultListAllFwUpdateSafesForUserServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/GetFWUpdateSafeContainers?UserId=";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/GetFWUpdateSafeContainers?UserId=";
|
||||
|
||||
private const String DefaultFileContentDownloadServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/GetFileContent?FileId=";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/GetFileContent?FileId=";
|
||||
|
||||
private const String DefaultFwUpdateReportUploadServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/PostFWUpdateReportFile";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/PostFWUpdateReportFile";
|
||||
|
||||
private const String DefaultFwUpdateReportDownloadServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/GetFWUpdateReportFile?";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/GetFWUpdateReportFile?";
|
||||
|
||||
private const String DefaultFwUpdateSafeContainerUploadServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/PostFWUpdateSafeOdd";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/PostFWUpdateSafeOdd";
|
||||
|
||||
private const String DefaultEditFwUpdateUserValidityServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/EditUserValidity?Id=";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/EditUserValidity?Id=";
|
||||
|
||||
private const String DefaultRefreshFwUpdateUsersHardwareIdServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/RefreshUsersHardwareId?Id=";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/RefreshUsersHardwareId?Id=";
|
||||
|
||||
private const String DefaultRefreshFwUpdateUsersPasswordHashServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/RefreshUsersPasswordHash?Id=";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/RefreshUsersPasswordHash?Id=";
|
||||
|
||||
private const String DefaultCreateNewFwUpdateUserServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/AddNewUser?";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/AddNewUser?";
|
||||
|
||||
private const String DefaultListAllFwUpdateUsersServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/GetUserList";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/GetUserList";
|
||||
|
||||
private const String DefaultListAllFwUpdateBuilderOperatorsServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/GetAllBuilderOperator";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/GetAllBuilderOperator";
|
||||
|
||||
private const String DefaultGetFwUpdateUserByIdServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/GetUserList?Id=";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/GetUserList?Id=";
|
||||
|
||||
private const String DefaultGetFwUpdateUserByLoginNameServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/GetUserList?LogInName=";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/GetUserList?LogInName=";
|
||||
|
||||
private const String DefaultRegisterWatchServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/api/RegisterWatch/";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/RegisterWatch/";
|
||||
|
||||
private const String DefaultGenesisGetOrderNumberServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/api/Password/ordernumber?PcbId=";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/Password/ordernumber?PcbId=";
|
||||
|
||||
private const String DefaultGenesisGetRadioAddressServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/api/Password/radioadress?PcbId=";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/Password/radioadress?PcbId=";
|
||||
|
||||
private const String DefaultGenesisGetKeySetIdServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/api/Password/getkeysetid?PcbId=";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/Password/getkeysetid?PcbId=";
|
||||
|
||||
private const String DefaultGenesisGetPasswordServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/api/Password/GetPassword?PcbId=";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/Password/GetPassword?PcbId=";
|
||||
|
||||
private const String DefaultGenesisSetPasswordServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/api/Password/setpassword?PcbId=";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/Password/setpassword?PcbId=";
|
||||
|
||||
private const String DefaultGenesisPasswordContainerServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/api/Password/GetPasswordHashFileContent?PcbId=";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/Password/GetPasswordHashFileContent?PcbId=";
|
||||
|
||||
private const String DefaultMarriageServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/api/Marriage/";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/Marriage/";
|
||||
|
||||
private const String DefaultMeterProcessStateUrl =
|
||||
"http://10.49.40.25/MeterProcessState/api/ProccesState/";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/ProccesState/";
|
||||
|
||||
private const String DefaultGenesisFinalCheckServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/api/FinalCheck/";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/FinalCheck/";
|
||||
|
||||
private const String DefaultGenesisRadioCheckServiceUrl =
|
||||
"http://10.49.40.25/MeterProcessState/api/RadioCheck/";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/RadioCheck/";
|
||||
|
||||
private const String DefaultGetSoftwareStartUpAccessUrl =
|
||||
"http://10.49.40.25/MeterProcessState/api/SoftwareAccess/GetVersionIsValid";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/SoftwareAccess/GetVersionIsValid";
|
||||
|
||||
private const String DefaultSetSoftwareLicenseUrl =
|
||||
"http://10.49.40.25/MeterProcessState/api/SoftwareAccess/SetVersionIsValid?Program=";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/SoftwareAccess/SetVersionIsValid?Program=";
|
||||
|
||||
private const String DefaultGetSoftwareLicenseUrl =
|
||||
"http://10.49.40.25/MeterProcessState/api/SoftwareAccess/GetCurrentVersion?Program=";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/SoftwareAccess/GetCurrentVersion?Program=";
|
||||
|
||||
private const String DefaultGenesisCalibrationResult =
|
||||
"http://10.49.40.25/MeterProcessState/api/GenesisMeter/PostCalibrationResult";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/GenesisMeter/PostCalibrationResult";
|
||||
|
||||
private const String DefaultGenesisMeter =
|
||||
"http://10.49.40.25/MeterProcessState/api/GenesisMeter/";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/GenesisMeter/";
|
||||
|
||||
private const String DefaultFileContentController =
|
||||
"http://10.49.40.25/MeterProcessState/api/FileUpToDate/";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/FileUpToDate/";
|
||||
|
||||
private const String DefaultKeyServerCustom =
|
||||
"https://nodes.sms-esaap.com/keygenproxy/api/v3/custom/";
|
||||
|
||||
private const String DefaultMeterInfoForTestBench =
|
||||
"http://10.49.40.25/MeterProcessState/api/TestBench/GetMeterInfoForTestBench?PcbID=";
|
||||
"http://sla12iis01.emea.sensus.net/MeterProcessState/api/TestBench/GetMeterInfoForTestBench?PcbID=";
|
||||
|
||||
//private const String DefaultCordonelFwInfoUrl =
|
||||
// "http://sla12iis01.emea.sensus.net/MeterProcessState/api/FileUpToDate/GetCordonelFw";
|
||||
private const String DefaultCordonelFwInfoUrl =
|
||||
"http://localhost:56011/api/FileUpToDate/GetCordonelFw";
|
||||
|
||||
|
||||
|
||||
@ -186,6 +191,15 @@ namespace Xylem.Common.CommonCore.Configuration
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// List all Cordonel FW packages.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static String ListAllCordonelFwPackagesUrl()
|
||||
{
|
||||
return ConfigurationManager.AppSettings["CordonelFwInfoUrl"] ??
|
||||
DefaultCordonelFwInfoUrl;
|
||||
}
|
||||
/// <summary>
|
||||
/// List all PCB IDs from a safe. As the safe may be deleted, this information is still accessible.
|
||||
/// </summary>
|
||||
|
||||
@ -257,6 +257,10 @@
|
||||
<Project>{D0C859D9-D55E-4E85-AC50-0FF31B1CE50D}</Project>
|
||||
<Name>Logic.ProductionToProductMapper</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Logic\ProductionOrderCore\ProductionOrderCore.csproj">
|
||||
<Project>{6D2777BB-7A88-466D-A49B-3266F9BF0160}</Project>
|
||||
<Name>ProductionOrderCore</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Metrology\Measurements\Measurements.csproj">
|
||||
<Project>{6CCDB656-C676-4360-BABA-C4596AAD175D}</Project>
|
||||
<Name>Measurements</Name>
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
using System;
|
||||
using Logic.ProductionToProductMapper.Cordonel;
|
||||
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
||||
|
||||
namespace CordonelPreadjustmentUi.Parameters
|
||||
namespace Xylem.Common.Ui.CordonelPreadjustmentUi.Parameters
|
||||
{
|
||||
public class FlushParams
|
||||
{
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
using CordonelPreadjustmentUi.Parameters;
|
||||
using CordonelPreadjustmentUi.Processes;
|
||||
using CordonelPreadjustmentUi.Processes;
|
||||
using CordonelPreadjustmentUi.Processes.Actions;
|
||||
using CordonelPreadjustmentUi.Processes.Itinerary;
|
||||
using Logic.ProductionToProductMapper.Cordonel;
|
||||
@ -13,6 +12,8 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
||||
using Xylem.Common.Ui.CordonelPreadjustmentUi.Parameters;
|
||||
|
||||
namespace CordonelPreadjustmentUi
|
||||
{
|
||||
|
||||
@ -5,6 +5,7 @@ using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore.Consts;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
||||
|
||||
namespace CordonelPreadjustmentUi
|
||||
{
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
using CordonelPreadjustmentUi.Parameters;
|
||||
using System;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Globalization;
|
||||
using System.Threading;
|
||||
@ -8,6 +7,8 @@ using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore.Consts;
|
||||
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts;
|
||||
using Xylem.Common.Ui.CordonelPreadjustmentUi;
|
||||
using System.Collections.Generic;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
||||
using Xylem.Common.Ui.CordonelPreadjustmentUi.Parameters;
|
||||
|
||||
namespace CordonelPreadjustmentUi.Processes.Itinerary
|
||||
{
|
||||
|
||||
@ -27,7 +27,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.Applications
|
||||
/// <summary>
|
||||
/// Version string of application because of FLEXNETVERSION
|
||||
/// does return a different layout, instead of decimals it
|
||||
/// used hexadecimals. Therefore the version has to be safed as
|
||||
/// used hexadecimals. Therefore the version has to be saved as
|
||||
/// string at time of receiving for the FW-Update comparison
|
||||
/// </summary>
|
||||
public String StrVersion;
|
||||
|
||||
@ -36,6 +36,7 @@ using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
|
||||
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts;
|
||||
using Xylem.Common.Hardware.WaterMeter.WaterMeterRegisters;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.File;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
||||
using Xylem.Common.Logic.RelatePcb;
|
||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||
using Xylem.Common.Metrology.Measurements;
|
||||
@ -1138,6 +1139,19 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
|
||||
return msbPartString + $"{msb & 0x0F:X0}" + "." + $"{(lsb & 0xF0) >> 4:X1}" + $"{lsb & 0x0F:X1}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Building a version string with 2 decimals e.g. " 12.34"
|
||||
/// </summary>
|
||||
/// <remarks date="2022-Dec-02" author="Thomas Wiedebusch">
|
||||
/// - Initial.
|
||||
/// </remarks>
|
||||
/// <param name="version">the version</param>
|
||||
/// <returns>converted version to string </returns>
|
||||
public static String BuildFwVersionString(Int32? version)
|
||||
{
|
||||
return version == null ? "0.00" : $@"{version / 100}.{version % 100 :D2}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// List of all present meter applications
|
||||
/// </summary>
|
||||
@ -1146,7 +1160,8 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
|
||||
/// <summary>
|
||||
/// Core revision of boot code.
|
||||
/// </summary>
|
||||
public String CoreRevision;
|
||||
//public String CoreRevision;
|
||||
public Int32? CoreRevision;
|
||||
|
||||
/// <summary>
|
||||
/// This is the FLEXNET version which describes the entire packet.
|
||||
@ -1164,9 +1179,14 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
|
||||
public String MeterSize;
|
||||
|
||||
/// <summary>
|
||||
/// Region (EMEA or NA) and Radio frequency (433 or 868 or null).
|
||||
/// Region (EMEA or NA).
|
||||
/// </summary>
|
||||
public String RegionRadio;
|
||||
public String Region;
|
||||
|
||||
/// <summary>
|
||||
/// Radio frequency in MHz (433 or 868 or null).
|
||||
/// </summary>
|
||||
public Int32? RadioFrequencyMhz;
|
||||
|
||||
/// <summary>
|
||||
/// Metrology upgrade permission.
|
||||
@ -1192,6 +1212,13 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
|
||||
/// <remarks date="2022-Apr-27" author="Thomas Wiedebusch">
|
||||
/// - Read lockup table CRC bugfix with try, catch for legacy versions, where this register does not exists.
|
||||
/// </remarks>
|
||||
/// <remarks date="2022-Dec-02" author="Thomas Wiedebusch">
|
||||
/// - CoreRevision from String to Int32?,
|
||||
/// - MeterSize from String to MeterSize,
|
||||
/// - Region separated from RadioRegion as String,
|
||||
/// - RadioFrequencyMhz introduced as Int32? (null if "NA" region or not installed),
|
||||
/// - LutCrc from String to Int32?.
|
||||
/// </remarks>
|
||||
private void ReadMeterFirmwareAndAssignRegisters()
|
||||
{
|
||||
//avoid overwriting of list if this already exits
|
||||
@ -1284,18 +1311,32 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
|
||||
|
||||
//read core revision
|
||||
var coreRegisterRead = RegisterConverter.ConvertTo<String>(ReadRegister(Register.System.CoreRevision, 16));
|
||||
var coreRevision = coreRegisterRead?.Split('\0');
|
||||
CoreRevision = coreRevision == null ? "0.00" : $"{coreRevision[0].ToLower().Replace("cordonel ", "")}";
|
||||
CoreRevision = null;
|
||||
if (!string.IsNullOrEmpty(coreRegisterRead))
|
||||
{
|
||||
var coreRevisionStrings = coreRegisterRead.Split('\0');
|
||||
//remove Cordonel sub-string and the blanks
|
||||
var coreRevisionSubString = $"{coreRevisionStrings[0].ToLower().Replace("cordonel ", "")}";
|
||||
var coreRevisionSubStrings = coreRevisionSubString.Split('.');
|
||||
if (Int32.TryParse(coreRevisionSubStrings[0], out var coreRevisionMsb))
|
||||
{
|
||||
if (Int32.TryParse(coreRevisionSubStrings[1], out var coreRevisionLsb))
|
||||
{
|
||||
CoreRevision = coreRevisionMsb * 100 + coreRevisionLsb;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//read radio frequency
|
||||
RegionRadio = "NA";
|
||||
Region = "NA";
|
||||
RadioFrequencyMhz = null;
|
||||
try
|
||||
{
|
||||
var radioFrequencyRaw = ReadRegister(Register.Sensusradio.FrequencyIndicator);
|
||||
if (radioFrequencyRaw != null)
|
||||
{
|
||||
var radioFrequency = RegisterConverter.ConvertTo<UInt16>(radioFrequencyRaw);
|
||||
RegionRadio = $"EMEA_{radioFrequency}";
|
||||
Region = "EMEA";
|
||||
RadioFrequencyMhz = RegisterConverter.ConvertTo<Int32>(radioFrequencyRaw);
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
@ -1309,10 +1350,15 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
|
||||
_logger.Info($"Date time (UTC): {DateTimeOffset.UtcNow}");
|
||||
if (CoreRevision != null)
|
||||
{
|
||||
_logger.Info("System Core Revision: " + CoreRevision);
|
||||
_logger.Info("System Core Revision: " + BuildFwVersionString(CoreRevision));
|
||||
}
|
||||
|
||||
_logger.Info("Region and radio frequency[Mhz]: " + RegionRadio);
|
||||
_logger.Info("Region: " + Region);
|
||||
|
||||
if (RadioFrequencyMhz != null)
|
||||
{
|
||||
_logger.Info($"Radio frequency [MHz]: {RadioFrequencyMhz}");
|
||||
}
|
||||
|
||||
foreach (var fm in MeterAppListVersion.OrderBy(o => o.AppId))
|
||||
{
|
||||
@ -2144,9 +2190,10 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
|
||||
apps.Add(new CordonelAppVersion(item.AppId, item.StrVersion, item.AppId != 15));
|
||||
}
|
||||
|
||||
apps.Add(new CordonelAppVersion(-1, CoreRevision, false));
|
||||
apps.Add(new CordonelAppVersion(-1, BuildFwVersionString(CoreRevision), false));
|
||||
|
||||
var url = $"{ServiceUrls.MeterProcessStateUrl()}SetCordonelProgress?PcbId={PcbId}&ProgressName={progressName}&version={version}";
|
||||
var url = $"{ServiceUrls.MeterProcessStateUrl()}SetCordonelProgress?PcbId={PcbId}" +
|
||||
$"&ProgressName={progressName}&version={version}";
|
||||
LocalWebRequest.PostRequestAsync(url, json: apps);
|
||||
|
||||
}
|
||||
|
||||
@ -136,6 +136,10 @@
|
||||
<Project>{D0C859D9-D55E-4E85-AC50-0FF31B1CE50D}</Project>
|
||||
<Name>Logic.ProductionToProductMapper</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Logic\ProductionOrderCore\ProductionOrderCore.csproj">
|
||||
<Project>{6D2777BB-7A88-466D-A49B-3266F9BF0160}</Project>
|
||||
<Name>ProductionOrderCore</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Utils\Crc16Ccitt\Crc16Ccitt.csproj">
|
||||
<Project>{91DEF0C0-AA4F-40AE-8F18-CB717FDE7E7F}</Project>
|
||||
<Name>Crc16Ccitt</Name>
|
||||
|
||||
@ -99,19 +99,13 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
|
||||
public Int32 MaxPartialFileDataSize = 2 * 1024;
|
||||
|
||||
/// <summary>
|
||||
/// Core revision minimum as double for comparison
|
||||
/// Core revision minimum as int32? with major * 100 + minor for comparison
|
||||
/// </summary>
|
||||
public Double? CoreRevisionMinimum
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
public Int32? CoreRevisionMinimum { get; private set; }
|
||||
/// <summary>
|
||||
/// Core revision maximum as double for comparison
|
||||
/// Core revision maximum as int32? with major * 100 + minor for comparison
|
||||
/// </summary>
|
||||
public Double? CoreRevisionMaximum
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
public Int32? CoreRevisionMaximum { get; private set; }
|
||||
|
||||
//reminder for the core minimum requirement as string
|
||||
private String _strCoreRevisionMinimum;
|
||||
@ -1950,9 +1944,9 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
|
||||
/// </summary>
|
||||
/// <param name="version"></param>
|
||||
/// <returns></returns>
|
||||
public static String ConvertVersionToString(UInt32 version)
|
||||
public static String ConvertVersionToString(Int32? version)
|
||||
{
|
||||
return $"{version / 100}.{version % 100:D2}";
|
||||
return version == null ? "0.00" : $"{version / 100}.{version % 100:D2}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2062,7 +2056,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
|
||||
/// Checks if the core version is in range of required minimum to maximum version.
|
||||
/// The package file has to be read in advance as this contains the min/max.
|
||||
/// </summary>
|
||||
/// <param name="coreVersionString">string containing the core version</param>
|
||||
/// <param name="coreRevision">containing the core version</param>
|
||||
/// <returns>true if version is in range</returns>
|
||||
/// <remarks date="2020-Dec-08" author="Thomas Wiedebusch">
|
||||
/// - Initial.
|
||||
@ -2070,16 +2064,18 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
|
||||
/// <remarks date="2021-Mar-10" author="Thomas Wiedebusch">
|
||||
/// - Removed "Cordonel " string check.
|
||||
/// </remarks>
|
||||
public Boolean CheckCoreRevision(String coreVersionString)
|
||||
/// <remarks date="2022-Dec-05" author="Thomas Wiedebusch">
|
||||
/// - Core revision data type changed from string ti int32?.
|
||||
/// </remarks>
|
||||
public Boolean CheckCoreRevision(Int32? coreRevision)
|
||||
{
|
||||
if (null == CoreRevisionMaximum || null == CoreRevisionMinimum || null == coreVersionString ||
|
||||
if (null == CoreRevisionMaximum || null == CoreRevisionMinimum || null == coreRevision ||
|
||||
null == _packageDescriptionFile)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var meterCoreRevision = ExtractVersionFromString(coreVersionString);
|
||||
return meterCoreRevision >= CoreRevisionMinimum && meterCoreRevision <= CoreRevisionMaximum;
|
||||
return coreRevision >= CoreRevisionMinimum && coreRevision <= CoreRevisionMaximum;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2097,7 +2093,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
|
||||
/// <remarks date="2021-Mar-09" author="Thomas Wiedebusch">
|
||||
/// - Changed to Int32 with major * 100 + minor.
|
||||
/// </remarks>
|
||||
public static Int32 ExtractVersionFromString(String versionString)
|
||||
private static Int32 ExtractVersionFromString(String versionString)
|
||||
|
||||
{
|
||||
var majorVersion = 0;
|
||||
|
||||
@ -57,15 +57,18 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
|
||||
/// The package file has to be read in advance as this contains the min/max.
|
||||
/// </summary>
|
||||
/// <param name="meterFwUpdate"></param>
|
||||
/// <param name="coreVersionString">string containing the core version</param>
|
||||
/// <param name="coreRevision">containing the core version</param>
|
||||
/// <returns>true if version is in range</returns>
|
||||
/// <remarks date="2020-Dec-08" author="Thomas Wiedebusch">
|
||||
/// - Initial.
|
||||
/// </remarks>
|
||||
public static Boolean CheckCoreRevision(MeterFwUpdate meterFwUpdate, String coreVersionString)
|
||||
/// <remarks date="2022-Dec-05" author="Thomas Wiedebusch">
|
||||
/// - Core revision data type changed from string ti int32?.
|
||||
/// </remarks>
|
||||
public static Boolean CheckCoreRevision(MeterFwUpdate meterFwUpdate, Int32? coreRevision)
|
||||
{
|
||||
if (meterFwUpdate == null || coreVersionString == null) return false;
|
||||
return meterFwUpdate.CheckCoreRevision(coreVersionString);
|
||||
if (meterFwUpdate == null || coreRevision == null) return false;
|
||||
return meterFwUpdate.CheckCoreRevision(coreRevision);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Logic.ProductionToProductMapper.Cordonel;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
||||
|
||||
namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile
|
||||
{
|
||||
|
||||
@ -4,12 +4,12 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using Logic.ProductionToProductMapper.Cordonel;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore.Consts;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile.Consts;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
||||
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
||||
using Xylem.Common.Utils.Crc16Ccitt;
|
||||
using Xylem.Common.Utils.ProcessExec;
|
||||
using Xylem.Common.Utils.ProcessExec.EventArguments;
|
||||
|
||||
@ -1 +1 @@
|
||||
5ed75d99ee45ff67821090f1b3dbb001dd9e4fe3
|
||||
1a3d4919c9c702245832d925951f2b7cb72fc333
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
||||
|
||||
namespace Logic.ProductionToProductMapper.Cordonel
|
||||
{
|
||||
|
||||
@ -73,9 +73,7 @@
|
||||
</Compile>
|
||||
<Compile Include="Cordonel\CalibrationResult.cs" />
|
||||
<Compile Include="Cordonel\CordonelAppVersion.cs" />
|
||||
<Compile Include="Cordonel\MeterSize.cs" />
|
||||
<Compile Include="Cordonel\MarriagePossibleEnum.cs" />
|
||||
<Compile Include="Cordonel\MeterSizeConverter.cs" />
|
||||
<Compile Include="Cordonel\PickingCompareItem.cs" />
|
||||
<Compile Include="Cordonel\RegisterHistory.cs" />
|
||||
<Compile Include="Cordonel\SkipProcess.cs" />
|
||||
|
||||
@ -1,40 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
||||
|
||||
namespace Xylem.Common.Logic.ProductionOrderCore.FW
|
||||
{
|
||||
public class CordonelFw
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public int RadioFrequencyMhz { get; set; }
|
||||
|
||||
public int FlexnetAppId { get; set; }
|
||||
|
||||
public int Version { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
public string FileName { get; set; }
|
||||
public DateTime? DeletedDate { get; set; }
|
||||
|
||||
public bool ForPressure { get; set; }
|
||||
public int Metersize { get; set; }
|
||||
public Region Region { get; set; }
|
||||
public bool CurrentForProd { get; set; }
|
||||
public int? FileClusterStoreId { get; set; }
|
||||
public Int32? CoreRevisionMin { get; set; }
|
||||
public Int32? CoreRevisionMax { get; set; }
|
||||
public Int32? MetrologyVersion { get; set; }
|
||||
public Boolean IsReleased { get; set; }
|
||||
public DateTime? ReleaseDate { get; set; }
|
||||
public String Remark { get; set; }
|
||||
|
||||
public bool IsDeleted() { return DeletedDate.HasValue; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
107
Common/Logic/ProductionOrderCore/FW/CordonelFwPackageInfo.cs
Normal file
107
Common/Logic/ProductionOrderCore/FW/CordonelFwPackageInfo.cs
Normal file
@ -0,0 +1,107 @@
|
||||
using System;
|
||||
|
||||
namespace Xylem.Common.Logic.ProductionOrderCore.FW
|
||||
{
|
||||
/// <summary>
|
||||
/// This class collects all information needed to specify the FW-Update package.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class CordonelFwPackageInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Used to keep the selection information on e.g. data tables stuck at the Cordonel.
|
||||
/// </summary>
|
||||
public Boolean IsSelected;
|
||||
|
||||
/// <summary>
|
||||
/// DB table entry
|
||||
/// </summary>
|
||||
public Int32 Id;
|
||||
|
||||
/// <summary>
|
||||
/// Frequency in MHz, null if not used or not assigned
|
||||
/// </summary>
|
||||
public Int32? RadioFrequencyMhz;
|
||||
|
||||
/// <summary>
|
||||
/// Application Id of FLEXNETVERSION
|
||||
/// </summary>
|
||||
public Int32 FlexnetAppId;
|
||||
|
||||
/// <summary>
|
||||
/// Version of FLEXNETVERSION as number
|
||||
/// </summary>
|
||||
public Int32? Version;
|
||||
|
||||
/// <summary>
|
||||
/// Version of FLEXNETVERSION as string
|
||||
/// </summary>
|
||||
public String Name;
|
||||
|
||||
/// <summary>
|
||||
/// Meter size
|
||||
/// </summary>
|
||||
public String MeterSize;
|
||||
|
||||
/// <summary>
|
||||
/// Meter size
|
||||
/// </summary>
|
||||
public String Region;
|
||||
|
||||
/// <summary>
|
||||
/// Current version for production
|
||||
/// </summary>
|
||||
public Boolean CurrentForProd;
|
||||
|
||||
/// <summary>
|
||||
/// Clustered file to connect to physical content
|
||||
/// </summary>
|
||||
public Int32 FileClusterStoreId;
|
||||
|
||||
/// <summary>
|
||||
/// Required minimum core version
|
||||
/// </summary>
|
||||
public Int32? CoreRevisionMin;
|
||||
|
||||
/// <summary>
|
||||
/// Required maximum core version
|
||||
/// </summary>
|
||||
public Int32? CoreRevisionMax;
|
||||
|
||||
/// <summary>
|
||||
/// Required metrology version
|
||||
/// </summary>
|
||||
public Int32? MetrologyVersion;
|
||||
|
||||
/// <summary>
|
||||
/// Marker if it is released.
|
||||
/// </summary>
|
||||
public Boolean IsReleased;
|
||||
|
||||
/// <summary>
|
||||
/// Date of release approval
|
||||
/// </summary>
|
||||
public DateTime? ReleaseDate;
|
||||
|
||||
/// <summary>
|
||||
/// Comment
|
||||
/// </summary>
|
||||
public String Remark;
|
||||
|
||||
/// <summary>
|
||||
/// Complete name of the FW release package
|
||||
/// </summary>
|
||||
public String FileName;
|
||||
|
||||
/// <summary>
|
||||
/// Date of deletion
|
||||
/// </summary>
|
||||
public DateTime? DeletedDate;
|
||||
|
||||
/// <summary>
|
||||
/// Returns is deleted if deletion date is set
|
||||
/// </summary>
|
||||
public Boolean IsDeleted() { return DeletedDate.HasValue; }
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
namespace Logic.ProductionToProductMapper.Cordonel
|
||||
namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
|
||||
{
|
||||
/// <summary>
|
||||
/// Enumeration of meter sizes named as flow tube inner diameter,
|
||||
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Logic.ProductionToProductMapper.Cordonel
|
||||
namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
|
||||
{
|
||||
/// <summary>
|
||||
/// Converter from meter size of production order to name or MeterSize enum or vice versa.
|
||||
@ -10,8 +10,9 @@ namespace Logic.ProductionToProductMapper.Cordonel
|
||||
/// <summary>
|
||||
/// Convert Meter size enumeration to name .
|
||||
/// </summary>
|
||||
public static String ConvertMeterSizeEnumToSizeName(MeterSize meterSizeId)
|
||||
public static String ConvertMeterSizeEnumToSizeName(MeterSize? meterSizeId)
|
||||
{
|
||||
if (meterSizeId == null) return "*";
|
||||
switch (meterSizeId)
|
||||
{
|
||||
case MeterSize.DN40:
|
||||
@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
|
||||
namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
|
||||
{
|
||||
public enum Region
|
||||
{
|
||||
|
||||
@ -0,0 +1,33 @@
|
||||
using System;
|
||||
|
||||
namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
|
||||
{
|
||||
/// <summary>
|
||||
/// Converter for region.
|
||||
/// </summary>
|
||||
public static class RegionConverter
|
||||
{
|
||||
/// <summary>
|
||||
/// Convert region enumeration to name .
|
||||
/// </summary>
|
||||
public static String ConvertRegionEnumToRegionName(Region? regionId)
|
||||
{
|
||||
if (regionId == null) return "*";
|
||||
|
||||
switch (regionId)
|
||||
{
|
||||
case Region.EMEA:
|
||||
return "EMEA";
|
||||
|
||||
case Region.NA:
|
||||
return "NA";
|
||||
|
||||
case Region.China:
|
||||
return "China";
|
||||
|
||||
default:
|
||||
return "*";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -88,11 +88,14 @@
|
||||
</Compile>
|
||||
<Compile Include="Csd\CsdParameterResult.cs" />
|
||||
<Compile Include="File\BaseFile.cs" />
|
||||
<Compile Include="FW\CordonelFw.cs" />
|
||||
<Compile Include="FW\CordonelFwPackageInfo.cs" />
|
||||
<Compile Include="FW\CordonelFWTypeEnum.cs" />
|
||||
<Compile Include="IProductionData.cs" />
|
||||
<Compile Include="KitronTestResults\JsonObject.cs" />
|
||||
<Compile Include="KitronTestResults\RadioTest.cs" />
|
||||
<Compile Include="OrderData\MeterSize.cs" />
|
||||
<Compile Include="OrderData\MeterSizeConverter.cs" />
|
||||
<Compile Include="OrderData\RegionConverter.cs" />
|
||||
<Compile Include="OrderData\OrderOverViewCordonel.cs" />
|
||||
<Compile Include="OrderData\OrderRadioParameter.cs" />
|
||||
<Compile Include="OrderData\OrderProgrammingParameters.cs" />
|
||||
|
||||
@ -6,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System.Windows.Controls;
|
||||
using Xylem.Common.CommonCore.Configuration;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||
|
||||
namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||
@ -46,13 +47,13 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||
var apps = new List<CordonelAppVersion>();
|
||||
foreach (var item in Meter.MeterAppListVersion)
|
||||
{
|
||||
apps.Add(new CordonelAppVersion(item.AppId, item.StrVersion, (item.AppId != 15 ? true : false)));
|
||||
apps.Add(new CordonelAppVersion(item.AppId, item.StrVersion, item.AppId != 15));
|
||||
}
|
||||
|
||||
apps.Add(new CordonelAppVersion(-1, Meter.CoreRevision, false));
|
||||
apps.Add(new CordonelAppVersion(-1, GenesisMeter.BuildFwVersionString(Meter.CoreRevision), false));
|
||||
|
||||
var url = $"{ServiceUrls.MeterProcessStateUrl()}SetCordonelProgress?PcbId={Meter.PcbId}&ProgressName=Shipping&version={Assembly.GetExecutingAssembly().GetName().Version.ToString()}";
|
||||
var a = LocalWebRequest.PostRequestAsync(url, json: apps);
|
||||
var url = $"{ServiceUrls.MeterProcessStateUrl()}SetCordonelProgress?PcbId={Meter.PcbId}&ProgressName=Shipping&version={Assembly.GetExecutingAssembly().GetName().Version}";
|
||||
LocalWebRequest.PostRequestAsync(url, json: apps);
|
||||
Meter.PushProgress("Shipping", Assembly.GetExecutingAssembly().GetName().Version.ToString());
|
||||
Meter.Logout();
|
||||
|
||||
|
||||
@ -12,6 +12,7 @@ using System.Web;
|
||||
using System.Web.Http;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.File;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.FW;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
||||
using Xylem.Common.Logic.ServiceCore;
|
||||
|
||||
namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
@ -460,26 +461,24 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Retruns filted FW files for Cordonel without content
|
||||
/// Returns filtered FW files for Cordonel without content
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Route("GetCorondelFw"), HttpGet]
|
||||
public async Task<HttpResponseMessage> GetCorondelFw(Int32? Metersize = null, int? Frequency = null, String Region = null, Boolean? ForProd = null, Boolean? Deleted = false)
|
||||
[Route("GetCordonelFw"), HttpGet]
|
||||
public async Task<HttpResponseMessage> GetCordonelFw(Int32? meterSize = null, Int32? radioFrequencyMhz = null,
|
||||
String region = null, Boolean? forProd = null, Boolean? deleted = false)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
return await Task.Run(() =>
|
||||
{
|
||||
var ret = new List<CordonelFw>();
|
||||
var ret = new List<CordonelFwPackageInfo>();
|
||||
|
||||
|
||||
|
||||
using (var dataacces = new SqlDataAccess(GlobalConfig.connectionString.Value))
|
||||
using (var dataAccess = new SqlDataAccess(GlobalConfig.connectionString.Value))
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
|
||||
|
||||
sb.AppendLine($" SELECT [Id] ");
|
||||
sb.AppendLine($" ,[RadioFrequencyMhz] ");
|
||||
sb.AppendLine($" ,[FlexnetAppId] ");
|
||||
@ -500,104 +499,88 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
sb.AppendLine($" FROM[Auftrag].[dbo].[Cordonel_CurrentFw] ");
|
||||
sb.AppendLine($" left outer join [Auftrag].[dbo].[FileClusterStore] on [FileId] = [FileClusterStoreId]");
|
||||
sb.AppendLine($" where 1= 1 ");
|
||||
if (Metersize.HasValue)
|
||||
if (meterSize != null)
|
||||
{
|
||||
sb.AppendLine($" and Metersize= {Metersize.Value} ");
|
||||
sb.AppendLine($" and Metersize={meterSize} ");
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Region))
|
||||
if (radioFrequencyMhz != null)
|
||||
{
|
||||
sb.AppendLine($" and Region ='{Region}' ");
|
||||
sb.AppendLine($" and radioFrequencyMhz={radioFrequencyMhz} ");
|
||||
}
|
||||
if (ForProd.HasValue)
|
||||
if (region != null)
|
||||
{
|
||||
sb.AppendLine($" and currentForProd ={(ForProd.Value ? "1" : "0") } ");
|
||||
sb.AppendLine($" and Region ='{region}' ");
|
||||
}
|
||||
if (Deleted.HasValue)
|
||||
if (forProd.HasValue)
|
||||
{
|
||||
sb.AppendLine($" and Deleted is {(Deleted.Value ? "not" : "")} null");
|
||||
sb.AppendLine($" and currentForProd ={(forProd.Value ? "1" : "0") } ");
|
||||
}
|
||||
if (deleted.HasValue)
|
||||
{
|
||||
sb.AppendLine($" and Deleted is {(deleted.Value ? "not" : "")} null");
|
||||
}
|
||||
|
||||
var retDT = dataacces.ExecuteQuery(sb.ToString());
|
||||
var retDT = dataAccess.ExecuteQuery(sb.ToString());
|
||||
|
||||
foreach (DataRow item in retDT.Rows)
|
||||
{
|
||||
|
||||
var add = new CordonelFw() { Id = (int)item["Id"] };
|
||||
add.RadioFrequencyMhz = (int)item["RadioFrequencyMhz"];
|
||||
add.Name = (string)item["Name"];
|
||||
|
||||
add.FileName = "";
|
||||
var add = new CordonelFwPackageInfo
|
||||
{
|
||||
Id = (Int32)item["Id"],
|
||||
RadioFrequencyMhz = (Int32?)item["RadioFrequencyMhz"],
|
||||
Name = (String)item["Name"],
|
||||
FlexnetAppId = (Int32)item["FlexnetAppId"],
|
||||
Version = (Int32)item["Version"],
|
||||
FileClusterStoreId = (Int32)item["FileClusterStoreId"],
|
||||
FileName = ""
|
||||
};
|
||||
|
||||
if (item["FileName"].GetType() != typeof(DBNull))
|
||||
{
|
||||
add.FileName = (string)item["FileName"];
|
||||
add.FileName = (String)item["FileName"];
|
||||
}
|
||||
|
||||
|
||||
if (item["Deleted"].GetType() != typeof(DBNull))
|
||||
{
|
||||
add.DeletedDate = (DateTime)item["Deleted"];
|
||||
}
|
||||
|
||||
add.FlexnetAppId = (int)item["FlexnetAppId"];
|
||||
add.Version = (int)item["Version"];
|
||||
|
||||
add.Metersize = (Int16)item["Metersize"];
|
||||
|
||||
|
||||
|
||||
add.FileClusterStoreId = null;
|
||||
if (item["FileClusterStoreId"].GetType() != typeof(DBNull))
|
||||
|
||||
if (item["Metersize"].GetType() != typeof(DBNull))
|
||||
{
|
||||
add.FileClusterStoreId = (int)item["FileClusterStoreId"];
|
||||
add.MeterSize = MeterSizeConverter.ConvertMeterSizeEnumToSizeName((MeterSize)(Int16)item["Metersize"]);
|
||||
}
|
||||
|
||||
add.CurrentForProd = false;
|
||||
if (item["CurrentForProd"].GetType() != typeof(DBNull))
|
||||
{
|
||||
|
||||
add.CurrentForProd = (bool)item["CurrentForProd"];
|
||||
add.CurrentForProd = (Boolean)item["CurrentForProd"];
|
||||
}
|
||||
|
||||
|
||||
switch ((string)item["Region"].ToString())
|
||||
if (item["Region"].GetType() != typeof(DBNull))
|
||||
{
|
||||
case "emea":
|
||||
add.Region = Logic.ProductionOrderCore.OrderData.Region.EMEA;
|
||||
break;
|
||||
case "na":
|
||||
add.Region = Logic.ProductionOrderCore.OrderData.Region.NA;
|
||||
break;
|
||||
case "china":
|
||||
add.Region = Logic.ProductionOrderCore.OrderData.Region.China;
|
||||
break;
|
||||
default:
|
||||
add.Region = Logic.ProductionOrderCore.OrderData.Region.EMEA;
|
||||
break;
|
||||
}
|
||||
var reg = (String)item["Region"];
|
||||
add.Region = reg.Replace(" ","");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
add.CoreRevisionMin = null;
|
||||
if (item["CoreRevisionMin"].GetType() != typeof(DBNull))
|
||||
{
|
||||
|
||||
add.CoreRevisionMin = (int)item["CoreRevisionMin"];
|
||||
add.CoreRevisionMin = (Int32)item["CoreRevisionMin"];
|
||||
}
|
||||
|
||||
add.CoreRevisionMax = null;
|
||||
if (item["CoreRevisionMax"].GetType() != typeof(DBNull))
|
||||
{
|
||||
|
||||
add.CoreRevisionMin = (int)item["CoreRevisionMax"];
|
||||
add.CoreRevisionMax = (Int32)item["CoreRevisionMax"];
|
||||
}
|
||||
add.MetrologyVersion = null;
|
||||
if (item["MetrologyVersion"].GetType() != typeof(DBNull))
|
||||
{
|
||||
|
||||
add.CoreRevisionMin = (int)item["MetrologyVersion"];
|
||||
add.MetrologyVersion = (Int32)item["MetrologyVersion"];
|
||||
}
|
||||
|
||||
|
||||
@ -605,7 +588,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
if (item["IsReleased"].GetType() != typeof(DBNull))
|
||||
{
|
||||
|
||||
add.IsReleased = (bool)item["IsReleased"];
|
||||
add.IsReleased = (Boolean)item["IsReleased"];
|
||||
}
|
||||
add.ReleaseDate = null;
|
||||
if (item["ReleaseDate"].GetType() != typeof(DBNull))
|
||||
|
||||
@ -723,16 +723,19 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
}
|
||||
|
||||
[Route("GetRecoveryFile"), HttpGet]
|
||||
public async Task<HttpResponseMessage> GetRecoveryFile(Int32 PcbID, Int32? RadioFrq, String Region, String FlexnetVersion)
|
||||
public async Task<HttpResponseMessage> GetRecoveryFile(Int32 pcbId, Int32? radioFrq, String region, String flexnetVersion)
|
||||
{
|
||||
|
||||
var file = new RecoverySettings() { PcbId = PcbID, RadioFrequencyMhz = RadioFrq, Region = Region, Release = FlexnetVersion };
|
||||
file.RecoveryRegisters = new List<RecoveryRegisterItem>();
|
||||
file.RecoveryRegisters.Add(new RecoveryRegisterItem() { RegisterIdent = "GENESISFLOW_SealDisplay", WriteValue = new Byte[] { 0x00, 0x00, 0x00, 0x00 }, IsCiritcal = true, ReadbackValue = new Byte[] { 0x00, 0x00, 0x00, 0x00 } });
|
||||
var file = new RecoverySettings { PcbId = pcbId, RadioFrequencyMhz = radioFrq, Region = region, Release = flexnetVersion,
|
||||
RecoveryRegisters = new List<RecoveryRegisterItem>
|
||||
{
|
||||
new RecoveryRegisterItem() { RegisterIdent = "GENESISFLOW_SealDisplay", WriteValue = new Byte[] { 0x00, 0x00, 0x00, 0x00 },
|
||||
IsCritical = true, ReadBackValue = new Byte[] { 0x00, 0x00, 0x00, 0x00 } }
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
var csdRet = OrderProgrammingParameters.GetProgrammingParameters(PcbID.ToString(), GlobalConfig.connectionString.Value);
|
||||
var csdRet = OrderProgrammingParameters.GetProgrammingParameters(pcbId.ToString(), GlobalConfig.connectionString.Value);
|
||||
|
||||
|
||||
foreach (var item in csdRet.Where(w => w.Source == Logic.ProductionOrderCore.ProgrammingSource.Vako))
|
||||
@ -741,8 +744,8 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
{
|
||||
RegisterIdent = item.RegisterName,
|
||||
WriteValue = item.RegisterValue,
|
||||
ReadbackValue = null,
|
||||
IsCiritcal = false,
|
||||
ReadBackValue = null,
|
||||
IsCritical = false,
|
||||
Access = RegisterRecoveryAccess.SetAlways,
|
||||
});
|
||||
}
|
||||
@ -753,26 +756,26 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
{
|
||||
RegisterIdent = item.RegisterName,
|
||||
WriteValue = item.RegisterValue,
|
||||
ReadbackValue = null,
|
||||
IsCiritcal = false,
|
||||
ReadBackValue = null,
|
||||
IsCritical = false,
|
||||
Access = RegisterRecoveryAccess.SetAlways,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
file.RecoveryRegisters.Add(new RecoveryRegisterItem() { RegisterIdent = "GENESISFLOW_SealDisplay", WriteValue = new Byte[] { 0x00, 0x00, 0x00, 0x01 }, IsCiritcal = true });
|
||||
file.RecoveryRegisters.Add(new RecoveryRegisterItem() { RegisterIdent = "GENESISFLOW_SealDisplay", WriteValue = new Byte[] { 0x00, 0x00, 0x00, 0x01 }, IsCritical = true });
|
||||
|
||||
|
||||
file.RecoveryRegisters.Add(new RecoveryRegisterItem() { RegisterIdent = "SENSUSRADIO_SystemState", WriteValue = new Byte[] { 0x00, 0x00, 0x00, 0x01 }, IsCiritcal = true, ReadbackValue = new Byte[] { 0x00, 0x00, 0x00, 0x0c } });
|
||||
file.RecoveryRegisters.Add(new RecoveryRegisterItem() { RegisterIdent = "SENSUSRADIO_SystemState", WriteValue = new Byte[] { 0x00, 0x00, 0x00, 0x01 }, IsCritical = true, ReadBackValue = new Byte[] { 0x00, 0x00, 0x00, 0x0c } });
|
||||
file.RecoveryRegisters.Add(new RecoveryRegisterItem() { RegisterIdent = "SENSUSRADIO_MainAlarmMask", WriteValue = new Byte[] { 0x00, 0x00, 0x00, 0x00 } });
|
||||
file.RecoveryRegisters.Add(new RecoveryRegisterItem() { RegisterIdent = "SENSUSRADIO_ExtendedAlarmMask", WriteValue = new Byte[] { 0x00, 0x00, 0x00, 0x00 } });
|
||||
|
||||
file.RecoveryRegisters.Add(new RecoveryRegisterItem() { RegisterIdent = "SENSUSRADIO_SystemState", WriteValue = new Byte[] { 0x00, 0x00, 0x00, 0xFF }, IsCiritcal = true, ReadbackValue = new Byte[] { 0x00, 0x00, 0x00, 0x0c } });
|
||||
file.RecoveryRegisters.Add(new RecoveryRegisterItem() { RegisterIdent = "SENSUSRADIO_SystemState", WriteValue = new Byte[] { 0x00, 0x00, 0x00, 0xFF }, IsCritical = true, ReadBackValue = new Byte[] { 0x00, 0x00, 0x00, 0x0c } });
|
||||
|
||||
|
||||
|
||||
var blacklist = new List<String>()
|
||||
var blackList = new List<String>()
|
||||
{
|
||||
"CUSTOMER_RebootCount",
|
||||
"GENESISFLOW_ForwardArrow",
|
||||
@ -785,7 +788,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
};
|
||||
|
||||
|
||||
var Crit = new List<String>()
|
||||
var Critical = new List<String>()
|
||||
{
|
||||
"GENESISFLOW_SealDisplay",
|
||||
"GENESISFLOW_MeterSize",
|
||||
@ -811,14 +814,9 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
|
||||
};
|
||||
|
||||
file.RecoveryRegisters.Where(d => Critical.Contains(d.RegisterIdent)).ToList().ForEach(f => { f.IsCritical = true; f.ReadBackValue = f.WriteValue; });
|
||||
|
||||
|
||||
|
||||
file.RecoveryRegisters.Where(d => Crit.Contains(d.RegisterIdent)).ToList().ForEach(f => { f.IsCiritcal = true; f.ReadbackValue = f.WriteValue; });
|
||||
|
||||
|
||||
|
||||
var onlyIfDefaultl = new List<String>()
|
||||
var onlyIfDefault = new List<String>()
|
||||
{
|
||||
"METROLOGYASST_PulseWeight",
|
||||
"METROLOGYASST_PressureUnits",
|
||||
@ -841,7 +839,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
|
||||
};
|
||||
|
||||
file.RecoveryRegisters.Where(d => onlyIfDefaultl.Contains(d.RegisterIdent)).ToList().ForEach(f => f.Access = RegisterRecoveryAccess.SetIfDefault);
|
||||
file.RecoveryRegisters.Where(d => onlyIfDefault.Contains(d.RegisterIdent)).ToList().ForEach(f => f.Access = RegisterRecoveryAccess.SetIfDefault);
|
||||
|
||||
return Request.CreateResponse(HttpStatusCode.OK, file);
|
||||
}
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
using Logic.ProductionToProductMapper.Cordonel;
|
||||
using Logic.ProductionToProductMapper.Files.Fw;
|
||||
using Logic.ProductionToProductMapper.Files.Fw;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -10,6 +9,7 @@ using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using Xylem.Common.CommonCore.Configuration;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.FW;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||
|
||||
|
||||
|
||||
@ -20,6 +20,7 @@ using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
||||
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.FW;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||
using Xylem.Common.Ui.GenesisToolBox.Properties;
|
||||
|
||||
@ -730,7 +731,8 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
lblConnectPcb.Text = StrPartPcbConnected + _currentGenesis.PcbId;
|
||||
lblCoreRevision.Text = StrCoreRevision + _currentGenesis.CoreRevision;
|
||||
lblCoreRevision.Text = StrCoreRevision +
|
||||
GenesisMeter.BuildFwVersionString(_currentGenesis.CoreRevision);
|
||||
lblConnectPcb.ForeColor = Color.Green;
|
||||
_meterFwUpdate?.CompareAllMeterAndFileApps();
|
||||
FillDataGridWithAllInfos();
|
||||
@ -1857,10 +1859,9 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
else if (item.FileName.ToLower().EndsWith(".txt"))
|
||||
{
|
||||
//encode content
|
||||
String controlFileContent;
|
||||
|
||||
System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
|
||||
controlFileContent = enc.GetString(item.FileContent.ToArray());
|
||||
var enc = new System.Text.ASCIIEncoding();
|
||||
var controlFileContent = enc.GetString(item.FileContent.ToArray());
|
||||
|
||||
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ using System.Text;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.File;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||
using Xylem.Common.Utils.Crc16Ccitt;
|
||||
|
||||
|
||||
57
Common/Ui/GenesisToolBox/FrmLutUpdate.Designer.cs
generated
57
Common/Ui/GenesisToolBox/FrmLutUpdate.Designer.cs
generated
@ -30,7 +30,7 @@
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.grpSetup = new System.Windows.Forms.GroupBox();
|
||||
this.tbxRegionRadio = new System.Windows.Forms.TextBox();
|
||||
this.tbxRegion = new System.Windows.Forms.TextBox();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.tbxPcbId = new System.Windows.Forms.TextBox();
|
||||
this.tbxMeterFw = new System.Windows.Forms.TextBox();
|
||||
@ -74,6 +74,8 @@
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.lblUpdateTime = new System.Windows.Forms.Label();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.tbxRadio = new System.Windows.Forms.TextBox();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.grpSetup.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.groupBox1.SuspendLayout();
|
||||
@ -81,7 +83,9 @@
|
||||
//
|
||||
// grpSetup
|
||||
//
|
||||
this.grpSetup.Controls.Add(this.tbxRegionRadio);
|
||||
this.grpSetup.Controls.Add(this.label10);
|
||||
this.grpSetup.Controls.Add(this.tbxRadio);
|
||||
this.grpSetup.Controls.Add(this.tbxRegion);
|
||||
this.grpSetup.Controls.Add(this.label8);
|
||||
this.grpSetup.Controls.Add(this.tbxPcbId);
|
||||
this.grpSetup.Controls.Add(this.tbxMeterFw);
|
||||
@ -96,31 +100,31 @@
|
||||
this.grpSetup.Controls.Add(this.cbComSlot);
|
||||
this.grpSetup.Location = new System.Drawing.Point(12, 69);
|
||||
this.grpSetup.Name = "grpSetup";
|
||||
this.grpSetup.Size = new System.Drawing.Size(248, 250);
|
||||
this.grpSetup.Size = new System.Drawing.Size(257, 250);
|
||||
this.grpSetup.TabIndex = 24;
|
||||
this.grpSetup.TabStop = false;
|
||||
this.grpSetup.Text = "Cordonel";
|
||||
//
|
||||
// tbxRegionRadio
|
||||
// tbxRegion
|
||||
//
|
||||
this.tbxRegionRadio.Location = new System.Drawing.Point(124, 178);
|
||||
this.tbxRegionRadio.Name = "tbxRegionRadio";
|
||||
this.tbxRegionRadio.ReadOnly = true;
|
||||
this.tbxRegionRadio.Size = new System.Drawing.Size(68, 20);
|
||||
this.tbxRegionRadio.TabIndex = 34;
|
||||
this.tbxRegion.Location = new System.Drawing.Point(128, 178);
|
||||
this.tbxRegion.Name = "tbxRegion";
|
||||
this.tbxRegion.ReadOnly = true;
|
||||
this.tbxRegion.Size = new System.Drawing.Size(68, 20);
|
||||
this.tbxRegion.TabIndex = 34;
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Location = new System.Drawing.Point(10, 182);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(105, 13);
|
||||
this.label8.Size = new System.Drawing.Size(44, 13);
|
||||
this.label8.TabIndex = 33;
|
||||
this.label8.Text = "Region/Radio[MHz]:";
|
||||
this.label8.Text = "Region:";
|
||||
//
|
||||
// tbxPcbId
|
||||
//
|
||||
this.tbxPcbId.Location = new System.Drawing.Point(124, 59);
|
||||
this.tbxPcbId.Location = new System.Drawing.Point(128, 59);
|
||||
this.tbxPcbId.Name = "tbxPcbId";
|
||||
this.tbxPcbId.ReadOnly = true;
|
||||
this.tbxPcbId.Size = new System.Drawing.Size(68, 20);
|
||||
@ -128,7 +132,7 @@
|
||||
//
|
||||
// tbxMeterFw
|
||||
//
|
||||
this.tbxMeterFw.Location = new System.Drawing.Point(124, 88);
|
||||
this.tbxMeterFw.Location = new System.Drawing.Point(128, 88);
|
||||
this.tbxMeterFw.Name = "tbxMeterFw";
|
||||
this.tbxMeterFw.ReadOnly = true;
|
||||
this.tbxMeterFw.Size = new System.Drawing.Size(68, 20);
|
||||
@ -136,7 +140,7 @@
|
||||
//
|
||||
// tbxMeterMeterSize
|
||||
//
|
||||
this.tbxMeterMeterSize.Location = new System.Drawing.Point(124, 148);
|
||||
this.tbxMeterMeterSize.Location = new System.Drawing.Point(128, 148);
|
||||
this.tbxMeterMeterSize.Name = "tbxMeterMeterSize";
|
||||
this.tbxMeterMeterSize.ReadOnly = true;
|
||||
this.tbxMeterMeterSize.Size = new System.Drawing.Size(68, 20);
|
||||
@ -144,7 +148,7 @@
|
||||
//
|
||||
// tbxMeterLutCrc
|
||||
//
|
||||
this.tbxMeterLutCrc.Location = new System.Drawing.Point(124, 118);
|
||||
this.tbxMeterLutCrc.Location = new System.Drawing.Point(128, 118);
|
||||
this.tbxMeterLutCrc.Name = "tbxMeterLutCrc";
|
||||
this.tbxMeterLutCrc.ReadOnly = true;
|
||||
this.tbxMeterLutCrc.Size = new System.Drawing.Size(68, 20);
|
||||
@ -179,7 +183,7 @@
|
||||
//
|
||||
// btnConnect
|
||||
//
|
||||
this.btnConnect.Location = new System.Drawing.Point(123, 24);
|
||||
this.btnConnect.Location = new System.Drawing.Point(128, 24);
|
||||
this.btnConnect.Name = "btnConnect";
|
||||
this.btnConnect.Size = new System.Drawing.Size(116, 25);
|
||||
this.btnConnect.TabIndex = 24;
|
||||
@ -534,6 +538,23 @@
|
||||
this.label7.TabIndex = 32;
|
||||
this.label7.Text = "Cordonel LUT Update";
|
||||
//
|
||||
// tbxRadio
|
||||
//
|
||||
this.tbxRadio.Location = new System.Drawing.Point(128, 208);
|
||||
this.tbxRadio.Name = "tbxRadio";
|
||||
this.tbxRadio.ReadOnly = true;
|
||||
this.tbxRadio.Size = new System.Drawing.Size(68, 20);
|
||||
this.tbxRadio.TabIndex = 35;
|
||||
//
|
||||
// label10
|
||||
//
|
||||
this.label10.AutoSize = true;
|
||||
this.label10.Location = new System.Drawing.Point(10, 212);
|
||||
this.label10.Name = "label10";
|
||||
this.label10.Size = new System.Drawing.Size(116, 13);
|
||||
this.label10.TabIndex = 36;
|
||||
this.label10.Text = "Radio frequency[MHz]:";
|
||||
//
|
||||
// FrmLutUpdate
|
||||
//
|
||||
this.AccessibleRole = System.Windows.Forms.AccessibleRole.Sound;
|
||||
@ -608,7 +629,7 @@
|
||||
private System.Windows.Forms.TextBox tbxMeterFw;
|
||||
private System.Windows.Forms.TextBox tbxPcbId;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.TextBox tbxRegionRadio;
|
||||
private System.Windows.Forms.TextBox tbxRegion;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private System.Windows.Forms.Label lblSelectDb;
|
||||
private System.Windows.Forms.RadioButton rbtDb;
|
||||
@ -617,5 +638,7 @@
|
||||
private System.Windows.Forms.RadioButton rbtProd;
|
||||
private System.Windows.Forms.ComboBox cbxDbLuts;
|
||||
private System.Windows.Forms.Button btnLoadfromDb;
|
||||
private System.Windows.Forms.Label label10;
|
||||
private System.Windows.Forms.TextBox tbxRadio;
|
||||
}
|
||||
}
|
||||
@ -13,6 +13,7 @@ using Newtonsoft.Json;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile;
|
||||
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||
using Xylem.Common.Utils.ProcessExec.EventArguments;
|
||||
|
||||
@ -235,11 +236,17 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
tbxMeterFw.Text = _currentGenesis.FwVersion;
|
||||
tbxMeterMeterSize.Text = _currentGenesis.MeterSize;
|
||||
tbxMeterLutCrc.Text = _currentGenesis.LutCrc;
|
||||
tbxRegionRadio.Text = _currentGenesis.RegionRadio;
|
||||
tbxRegion.Text = _currentGenesis.Region;
|
||||
LogText("Meter FW Version: " + _currentGenesis.FwVersion);
|
||||
LogText("Meter LUT CRC: " + _currentGenesis.LutCrc);
|
||||
LogText("Meter Size: " + _currentGenesis.MeterSize);
|
||||
LogText("Meter Region/Radio[MHz]: " + _currentGenesis.RegionRadio);
|
||||
LogText("Meter Region: " + _currentGenesis.Region);
|
||||
if (_currentGenesis.RadioFrequencyMhz != null)
|
||||
{
|
||||
tbxRadio.Text = $@"{_currentGenesis.RadioFrequencyMhz}";
|
||||
LogText($"Meter radio frequency [MHz]: {_currentGenesis.RadioFrequencyMhz}");
|
||||
}
|
||||
|
||||
lblConnectPcb.ForeColor = Color.Green;
|
||||
CheckUpdateEnabled();
|
||||
_currentGenesis.Logout();
|
||||
@ -379,7 +386,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
return;
|
||||
LogText(StrSeparator);
|
||||
LogText($"PCB ID: {_currentGenesis.PcbId}");
|
||||
LogText($"Core Version: {_currentGenesis.CoreRevision}");
|
||||
LogText($"Core Version: {GenesisMeter.BuildFwVersionString(_currentGenesis.CoreRevision)}");
|
||||
LogText("");
|
||||
LogText("Installed Applications:");
|
||||
|
||||
|
||||
@ -9,6 +9,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using Xylem.Common.CommonCore.Configuration;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||
|
||||
namespace Xylem.Common.Ui.GenesisToolBox
|
||||
|
||||
@ -1092,7 +1092,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
var sb = new StringBuilder();
|
||||
sb.AppendLine($"PCBID: {_currentGenesis.PcbId}");
|
||||
sb.AppendLine($"Date: {DateTimeOffset.UtcNow}");
|
||||
sb.AppendLine($"System Core Revision: {_currentGenesis.CoreRevision}");
|
||||
sb.AppendLine($"System Core Revision: {GenesisMeter.BuildFwVersionString(_currentGenesis.CoreRevision)}");
|
||||
foreach (var fm in _currentGenesis.MeterAppListVersion.OrderBy(o => o.AppId))
|
||||
{
|
||||
var versionString = fm.IsInstalled
|
||||
@ -1879,15 +1879,18 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
/// <remarks date="2021-Mar-10" author="Thomas Wiedebusch">
|
||||
/// - Changed version from Uint32 to String
|
||||
/// </remarks>
|
||||
/// <remarks date="2022-Dec-02" author="Thomas Wiedebusch">
|
||||
/// - Changed core revision from string to Int32?.
|
||||
/// </remarks>
|
||||
private void button3_Click(Object sender, EventArgs e)
|
||||
{
|
||||
var apps = new List<CordonelAppVersion>();
|
||||
foreach (var item in _currentGenesis.MeterAppListVersion)
|
||||
{
|
||||
apps.Add(new CordonelAppVersion(item.AppId, item.StrVersion, (item.AppId != 15 ? true : false)));
|
||||
apps.Add(new CordonelAppVersion(item.AppId, item.StrVersion, item.AppId != 15));
|
||||
}
|
||||
|
||||
apps.Add(new CordonelAppVersion(-1, _currentGenesis.CoreRevision, false));
|
||||
apps.Add(new CordonelAppVersion(-1, BuildFwVersionString(_currentGenesis.CoreRevision), false));
|
||||
|
||||
var url = $"{ServiceUrls.MeterProcessStateUrl()}SetCordonelProgress?PcbId={_currentGenesis.PcbId}&ProgressName=toolbox&version={Assembly.GetExecutingAssembly().GetName().Version}";
|
||||
var a = LocalWebRequest.PostRequestAsync(url, json: apps);
|
||||
|
||||
@ -1,8 +1,4 @@
|
||||
using Logic.ProductionToProductMapper.Cordonel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
||||
using XylemCommonUiLegacyGenCtl.Enums;
|
||||
|
||||
namespace XylemCommonUiLegacyGenCtl.DataPackage
|
||||
|
||||
@ -226,6 +226,10 @@
|
||||
<Project>{D0C859D9-D55E-4E85-AC50-0FF31B1CE50D}</Project>
|
||||
<Name>Logic.ProductionToProductMapper</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Logic\ProductionOrderCore\ProductionOrderCore.csproj">
|
||||
<Project>{6D2777BB-7A88-466D-A49B-3266F9BF0160}</Project>
|
||||
<Name>ProductionOrderCore</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Metrology\Measurements\Measurements.csproj">
|
||||
<Project>{6CCDB656-C676-4360-BABA-C4596AAD175D}</Project>
|
||||
<Name>Measurements</Name>
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
using CordonelPreadjustmentUi;
|
||||
using CordonelPreadjustmentUi.Parameters;
|
||||
using CordonelPreadjustmentUi.Processes.Itinerary;
|
||||
using Newtonsoft.Json;
|
||||
using NLog;
|
||||
@ -12,6 +11,7 @@ using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using Xylem.Common.CommonCore.Consts;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig;
|
||||
using Xylem.Common.Ui.CordonelPreadjustmentUi.Parameters;
|
||||
using Xylem.Common.Utils.Logging;
|
||||
using XylemCommonUiLegacyGenCtl.DataPackage;
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
using Logic.ProductionToProductMapper.Cordonel;
|
||||
using System;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
||||
using XylemCommonUiLegacyGenCtl.DataPackage;
|
||||
|
||||
namespace XylemCommonUiLegacyGenCtl
|
||||
|
||||
@ -772,7 +772,7 @@
|
||||
this.ctlMeterReady10.CustomerSerialNr = null;
|
||||
this.ctlMeterReady10.LastTestBechState = 0;
|
||||
this.ctlMeterReady10.Location = new System.Drawing.Point(3, 635);
|
||||
this.ctlMeterReady10.Metersize = Logic.ProductionToProductMapper.Cordonel.MeterSize.DN40;
|
||||
this.ctlMeterReady10.Metersize = Xylem.Common.Logic.ProductionOrderCore.OrderData.MeterSize.DN40;
|
||||
this.ctlMeterReady10.Name = "ctlMeterReady10";
|
||||
this.ctlMeterReady10.OrderNumber = null;
|
||||
this.ctlMeterReady10.RadioAdress = null;
|
||||
@ -786,7 +786,7 @@
|
||||
this.ctlMeterReady9.CustomerSerialNr = null;
|
||||
this.ctlMeterReady9.LastTestBechState = 0;
|
||||
this.ctlMeterReady9.Location = new System.Drawing.Point(3, 579);
|
||||
this.ctlMeterReady9.Metersize = Logic.ProductionToProductMapper.Cordonel.MeterSize.DN40;
|
||||
this.ctlMeterReady9.Metersize = Xylem.Common.Logic.ProductionOrderCore.OrderData.MeterSize.DN40;
|
||||
this.ctlMeterReady9.Name = "ctlMeterReady9";
|
||||
this.ctlMeterReady9.OrderNumber = null;
|
||||
this.ctlMeterReady9.RadioAdress = null;
|
||||
@ -800,7 +800,7 @@
|
||||
this.ctlMeterReady8.CustomerSerialNr = null;
|
||||
this.ctlMeterReady8.LastTestBechState = 0;
|
||||
this.ctlMeterReady8.Location = new System.Drawing.Point(3, 522);
|
||||
this.ctlMeterReady8.Metersize = Logic.ProductionToProductMapper.Cordonel.MeterSize.DN40;
|
||||
this.ctlMeterReady8.Metersize = Xylem.Common.Logic.ProductionOrderCore.OrderData.MeterSize.DN40;
|
||||
this.ctlMeterReady8.Name = "ctlMeterReady8";
|
||||
this.ctlMeterReady8.OrderNumber = null;
|
||||
this.ctlMeterReady8.RadioAdress = null;
|
||||
@ -814,7 +814,7 @@
|
||||
this.ctlMeterReady7.CustomerSerialNr = null;
|
||||
this.ctlMeterReady7.LastTestBechState = 0;
|
||||
this.ctlMeterReady7.Location = new System.Drawing.Point(3, 466);
|
||||
this.ctlMeterReady7.Metersize = Logic.ProductionToProductMapper.Cordonel.MeterSize.DN40;
|
||||
this.ctlMeterReady7.Metersize = Xylem.Common.Logic.ProductionOrderCore.OrderData.MeterSize.DN40;
|
||||
this.ctlMeterReady7.Name = "ctlMeterReady7";
|
||||
this.ctlMeterReady7.OrderNumber = null;
|
||||
this.ctlMeterReady7.RadioAdress = null;
|
||||
@ -828,7 +828,7 @@
|
||||
this.ctlMeterReady6.CustomerSerialNr = null;
|
||||
this.ctlMeterReady6.LastTestBechState = 0;
|
||||
this.ctlMeterReady6.Location = new System.Drawing.Point(3, 410);
|
||||
this.ctlMeterReady6.Metersize = Logic.ProductionToProductMapper.Cordonel.MeterSize.DN40;
|
||||
this.ctlMeterReady6.Metersize = Xylem.Common.Logic.ProductionOrderCore.OrderData.MeterSize.DN40;
|
||||
this.ctlMeterReady6.Name = "ctlMeterReady6";
|
||||
this.ctlMeterReady6.OrderNumber = null;
|
||||
this.ctlMeterReady6.RadioAdress = null;
|
||||
@ -842,7 +842,7 @@
|
||||
this.ctlMeterReady5.CustomerSerialNr = null;
|
||||
this.ctlMeterReady5.LastTestBechState = 0;
|
||||
this.ctlMeterReady5.Location = new System.Drawing.Point(3, 354);
|
||||
this.ctlMeterReady5.Metersize = Logic.ProductionToProductMapper.Cordonel.MeterSize.DN40;
|
||||
this.ctlMeterReady5.Metersize = Xylem.Common.Logic.ProductionOrderCore.OrderData.MeterSize.DN40;
|
||||
this.ctlMeterReady5.Name = "ctlMeterReady5";
|
||||
this.ctlMeterReady5.OrderNumber = null;
|
||||
this.ctlMeterReady5.RadioAdress = null;
|
||||
@ -856,7 +856,7 @@
|
||||
this.ctlMeterReady4.CustomerSerialNr = null;
|
||||
this.ctlMeterReady4.LastTestBechState = 0;
|
||||
this.ctlMeterReady4.Location = new System.Drawing.Point(3, 298);
|
||||
this.ctlMeterReady4.Metersize = Logic.ProductionToProductMapper.Cordonel.MeterSize.DN40;
|
||||
this.ctlMeterReady4.Metersize = Xylem.Common.Logic.ProductionOrderCore.OrderData.MeterSize.DN40;
|
||||
this.ctlMeterReady4.Name = "ctlMeterReady4";
|
||||
this.ctlMeterReady4.OrderNumber = null;
|
||||
this.ctlMeterReady4.RadioAdress = null;
|
||||
@ -870,7 +870,7 @@
|
||||
this.ctlMeterReady3.CustomerSerialNr = null;
|
||||
this.ctlMeterReady3.LastTestBechState = 0;
|
||||
this.ctlMeterReady3.Location = new System.Drawing.Point(3, 242);
|
||||
this.ctlMeterReady3.Metersize = Logic.ProductionToProductMapper.Cordonel.MeterSize.DN40;
|
||||
this.ctlMeterReady3.Metersize = Xylem.Common.Logic.ProductionOrderCore.OrderData.MeterSize.DN40;
|
||||
this.ctlMeterReady3.Name = "ctlMeterReady3";
|
||||
this.ctlMeterReady3.OrderNumber = null;
|
||||
this.ctlMeterReady3.RadioAdress = null;
|
||||
@ -884,7 +884,7 @@
|
||||
this.ctlMeterReady2.CustomerSerialNr = null;
|
||||
this.ctlMeterReady2.LastTestBechState = 0;
|
||||
this.ctlMeterReady2.Location = new System.Drawing.Point(3, 186);
|
||||
this.ctlMeterReady2.Metersize = Logic.ProductionToProductMapper.Cordonel.MeterSize.DN40;
|
||||
this.ctlMeterReady2.Metersize = Xylem.Common.Logic.ProductionOrderCore.OrderData.MeterSize.DN40;
|
||||
this.ctlMeterReady2.Name = "ctlMeterReady2";
|
||||
this.ctlMeterReady2.OrderNumber = null;
|
||||
this.ctlMeterReady2.RadioAdress = null;
|
||||
@ -900,7 +900,7 @@
|
||||
this.ctlMeterReady1.CustomerSerialNr = null;
|
||||
this.ctlMeterReady1.LastTestBechState = 0;
|
||||
this.ctlMeterReady1.Location = new System.Drawing.Point(3, 130);
|
||||
this.ctlMeterReady1.Metersize = Logic.ProductionToProductMapper.Cordonel.MeterSize.DN40;
|
||||
this.ctlMeterReady1.Metersize = Xylem.Common.Logic.ProductionOrderCore.OrderData.MeterSize.DN40;
|
||||
this.ctlMeterReady1.Name = "ctlMeterReady1";
|
||||
this.ctlMeterReady1.OrderNumber = null;
|
||||
this.ctlMeterReady1.RadioAdress = null;
|
||||
|
||||
@ -10,6 +10,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||
using XylemCommonUiLegacyGenCtl.DataPackage;
|
||||
using XylemCommonUiLegacyGenCtl.Enums;
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
using Logic.ProductionToProductMapper.Cordonel;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
@ -15,6 +14,7 @@ using Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
||||
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||
using XylemCommonUiLegacyGenCtl.DataPackage;
|
||||
using XylemCommonUiLegacyGenCtl.Enums;
|
||||
|
||||
@ -15,6 +15,7 @@ using Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
||||
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||
using XylemCommonUiLegacyGenCtl.DataPackage;
|
||||
using XylemCommonUiLegacyGenCtl.Enums;
|
||||
|
||||
@ -23,9 +23,9 @@ namespace Xylem.ServiceFwUpdate.Common.FwUpdateDb
|
||||
public Boolean IsRemoved;
|
||||
|
||||
/// <summary>
|
||||
/// Reason for update denied
|
||||
/// Reason for update denial as text for user in "Pre-Build-Summary-Tab"
|
||||
/// </summary>
|
||||
public String ReasonForUpdateDenied;
|
||||
public String ReasonForUpdateDenial;
|
||||
|
||||
/// <summary>
|
||||
/// PCB ID
|
||||
|
||||
@ -9,6 +9,7 @@ using Newtonsoft.Json;
|
||||
using Xylem.Common.CommonCore.Configuration;
|
||||
using Xylem.Common.Cryptology.Security;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisPwd;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.FW;
|
||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||
using Xylem.Common.Utils.DateTimeServer;
|
||||
using Xylem.ServiceFwUpdate.Common.FwUpdateSafe;
|
||||
@ -51,6 +52,16 @@ namespace Xylem.ServiceFwUpdate.Common.FwUpdateDb
|
||||
/// </summary>
|
||||
public List<ClusteredFile> DbCordonelFwPackages { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Cordonel FW packages information.
|
||||
/// </summary>
|
||||
public List<CordonelFwPackageInfo> DbCordonelFwPackagesInfo { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Single Cordonel FW package.
|
||||
/// </summary>
|
||||
public ClusteredFile DbCordonelFwPackage { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Cordonel safes.
|
||||
/// </summary>
|
||||
@ -351,38 +362,38 @@ namespace Xylem.ServiceFwUpdate.Common.FwUpdateDb
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get all Cordonel FW packages info files from DB.
|
||||
/// </summary>
|
||||
/// <returns>true if successful</returns>
|
||||
/// <remarks date="2021-Apr-08" author="Thomas Wiedebusch">
|
||||
/// - Initial.
|
||||
/// </remarks>
|
||||
public Boolean GetAllCordonelFwInfoFilesFromDb()
|
||||
{
|
||||
if (DbCordonelFwPackages == null) DbCordonelFwPackages = new List<ClusteredFile>();
|
||||
DbCordonelFwPackages.Clear();
|
||||
///// <summary>
|
||||
///// Get all Cordonel FW packages info files from DB.
|
||||
///// </summary>
|
||||
///// <returns>true if successful</returns>
|
||||
///// <remarks date="2021-Apr-08" author="Thomas Wiedebusch">
|
||||
///// - Initial.
|
||||
///// </remarks>
|
||||
//public Boolean GetAllCordonelFwInfoFilesFromDb()
|
||||
//{
|
||||
// if (DbCordonelFwPackages == null) DbCordonelFwPackages = new List<ClusteredFile>();
|
||||
// DbCordonelFwPackages.Clear();
|
||||
|
||||
try
|
||||
{
|
||||
var url = ServiceUrls.ListAllFwPackages();
|
||||
var requestResponse = LocalWebRequest.GetRequest(url, 10000);
|
||||
if (string.IsNullOrEmpty(requestResponse))
|
||||
{
|
||||
DbIsConnected = false;
|
||||
return false;
|
||||
}
|
||||
// try
|
||||
// {
|
||||
// var url = ServiceUrls.ListAllFwPackages();
|
||||
// var requestResponse = LocalWebRequest.GetRequest(url, 10000);
|
||||
// if (string.IsNullOrEmpty(requestResponse))
|
||||
// {
|
||||
// DbIsConnected = false;
|
||||
// return false;
|
||||
// }
|
||||
|
||||
DbIsConnected = true;
|
||||
DbCordonelFwPackages = JsonConvert.DeserializeObject<List<ClusteredFile>>(requestResponse);
|
||||
return DbCordonelFwPackages != null && DbCordonelFwPackages.Count != 0;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
DbIsConnected = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// DbIsConnected = true;
|
||||
// DbCordonelFwPackages = JsonConvert.DeserializeObject<List<ClusteredFile>>(requestResponse);
|
||||
// return DbCordonelFwPackages != null && DbCordonelFwPackages.Count != 0;
|
||||
// }
|
||||
// catch (Exception)
|
||||
// {
|
||||
// DbIsConnected = false;
|
||||
// return false;
|
||||
// }
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// Load the latest FW update SW package from DB.
|
||||
@ -619,7 +630,7 @@ namespace Xylem.ServiceFwUpdate.Common.FwUpdateDb
|
||||
/// <summary>
|
||||
/// Get a single Cordonel FW package from DB.
|
||||
/// </summary>
|
||||
/// <param name="fileId">the file id previously read with <see cref="GetAllCordonelFwInfoFilesFromDb"/></param>
|
||||
/// <param name="fileId">the file id previously read with <see cref="GetAllCordonelFwPackagesInfoFromDb"/></param>
|
||||
/// <param name="fwPackage">the FW as package</param>
|
||||
/// <param name="readContent">reading content if true, else only the file information</param>
|
||||
/// <returns>true if successful</returns>
|
||||
@ -770,6 +781,40 @@ namespace Xylem.ServiceFwUpdate.Common.FwUpdateDb
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Get all Cordonel FW packages information from DB.
|
||||
/// </summary>
|
||||
/// <returns>true if successful</returns>
|
||||
/// <remarks date="2022-Nov-30" author="Thomas Wiedebusch">
|
||||
/// - Initial.
|
||||
/// </remarks>
|
||||
public Boolean GetAllCordonelFwPackagesInfoFromDb()
|
||||
{
|
||||
if (DbCordonelFwPackagesInfo == null)
|
||||
DbCordonelFwPackagesInfo = new List<CordonelFwPackageInfo>();
|
||||
DbCordonelFwPackagesInfo.Clear();
|
||||
|
||||
try
|
||||
{
|
||||
var url = ServiceUrls.ListAllCordonelFwPackagesUrl();
|
||||
var requestResponse = LocalWebRequest.GetRequest(url, 1200);
|
||||
if (string.IsNullOrEmpty(requestResponse))
|
||||
{
|
||||
DbIsConnected = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
DbIsConnected = true;
|
||||
DbCordonelFwPackagesInfo =
|
||||
JsonConvert.DeserializeObject<List<CordonelFwPackageInfo>>(requestResponse);
|
||||
return DbCordonelFwPackagesInfo != null && DbCordonelFwPackagesInfo.Count != 0;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DbIsConnected = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Simple command to access the DB and check therefore if it is available.
|
||||
/// </summary>
|
||||
/// <returns>true if successful</returns>
|
||||
|
||||
@ -99,6 +99,10 @@
|
||||
<Project>{d0c859d9-d55e-4e85-ac50-0ff31b1ce50d}</Project>
|
||||
<Name>Logic.ProductionToProductMapper</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Common\Logic\ProductionOrderCore\ProductionOrderCore.csproj">
|
||||
<Project>{6d2777bb-7a88-466d-a49b-3266f9bf0160}</Project>
|
||||
<Name>ProductionOrderCore</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Common\SoftwareAccessHelper\SoftwareAccessHelper.csproj">
|
||||
<Project>{a33e3c6d-eaae-4a20-a0ee-f9e6922fd029}</Project>
|
||||
<Name>SoftwareAccessHelper</Name>
|
||||
|
||||
@ -29,9 +29,9 @@ namespace Xylem.ServiceFwUpdate.Common.FwUpdateSafe
|
||||
public String RequiredRelease;
|
||||
|
||||
/// <summary>
|
||||
/// Setting reference file
|
||||
/// Recovery reference file
|
||||
/// </summary>
|
||||
public String CordonelSettingsFileName;
|
||||
public String CordonelRecoveryFileName;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Logic.ProductionToProductMapper.Files.Fw;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.FW;
|
||||
|
||||
namespace Xylem.ServiceFwUpdate.Common.FwUpdateSafe
|
||||
{
|
||||
@ -13,9 +14,9 @@ namespace Xylem.ServiceFwUpdate.Common.FwUpdateSafe
|
||||
/// <summary>
|
||||
/// Release version of this package
|
||||
/// </summary>
|
||||
public String ReleaseNameVersion;
|
||||
public CordonelFwPackageInfo FwPackageInfo;
|
||||
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// Binary application files
|
||||
/// </summary>
|
||||
public List<FilePart> BinaryApplicationFiles;
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Xylem.ServiceFwUpdate.Common.FwUpdateSafe
|
||||
{
|
||||
/// <summary>
|
||||
/// Settings to adjust the Cordonel after FW update.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public struct CordonelSettings
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -72,7 +72,6 @@
|
||||
<Compile Include="FwUpdatePaths.cs" />
|
||||
<Compile Include="CordonelDeviceInfo.cs" />
|
||||
<Compile Include="CordonelFirmware.cs" />
|
||||
<Compile Include="CordonelSettings.cs" />
|
||||
<Compile Include="FwUpdateCrypt.cs" />
|
||||
<Compile Include="FwUpdateSafe.cs" />
|
||||
<Compile Include="MeterRecovery\RecoverySettings.cs" />
|
||||
@ -94,6 +93,10 @@
|
||||
<Project>{d0c859d9-d55e-4e85-ac50-0ff31b1ce50d}</Project>
|
||||
<Name>Logic.ProductionToProductMapper</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Common\Logic\ProductionOrderCore\ProductionOrderCore.csproj">
|
||||
<Project>{6d2777bb-7a88-466d-a49b-3266f9bf0160}</Project>
|
||||
<Name>ProductionOrderCore</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
|
||||
@ -8,37 +8,31 @@ namespace Xylem.ServiceFwUpdate.Common.FwUpdateSafe.MeterRecovery
|
||||
public class RecoveryRegisterItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Register name, use the latest configuration.json to make sure that the adress will be correct
|
||||
/// Register name, use the latest configuration.json to make sure that the address will be correct
|
||||
/// </summary>
|
||||
public String RegisterIdent { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Content to write
|
||||
/// </summary>
|
||||
public Byte[] WriteValue { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// check if the wirtten value is sett like this
|
||||
/// check if the written value is sett like this
|
||||
/// Null or not set if a read back is not needed
|
||||
/// </summary>
|
||||
public Byte[] ReadbackValue { get; set; }
|
||||
public Byte[] ReadBackValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Mark Update as failed if write was not successful
|
||||
/// </summary>
|
||||
public Boolean IsCiritcal { get; set; }
|
||||
|
||||
public Boolean IsCritical { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Condition when the register will be overridden
|
||||
/// </summary>
|
||||
public RegisterRecoveryAccess Access { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -6,41 +6,45 @@ namespace Xylem.ServiceFwUpdate.Common.FwUpdateSafe.MeterRecovery
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class RecoverySettings
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Null if check in not necessary if is an number check it agianst the pcbid from meter
|
||||
/// Null if check in not necessary if is an number check it against the pcbid from meter
|
||||
/// </summary>
|
||||
public Int32? PcbId { get; set; }
|
||||
public Int32? PcbId;
|
||||
|
||||
/// <summary>
|
||||
/// Null if check in not necessary if is an number check it agianst the radio FRQ
|
||||
/// Radio frequency in MHz referenced a SENSUSRADIO AppId 0x10, Register FrequencyIndicator Id 0x05
|
||||
/// values: default 433, minimum 433, maximum 868 or null if region is "NA" or if for all frequencies
|
||||
/// </summary>
|
||||
public Int32? RadioFrequencyMhz { get; set; }
|
||||
public Int32? RadioFrequencyMhz;
|
||||
|
||||
/// <summary>
|
||||
/// Null till meter handles regions
|
||||
/// </summary>
|
||||
public String Region { get; set; } = null;
|
||||
public String Region;
|
||||
|
||||
/// <summary>
|
||||
/// Null till meter handles regions
|
||||
/// Release string which is the FLEXNETVERSION
|
||||
/// </summary>
|
||||
public String Release { get; set; }
|
||||
public String Release;
|
||||
|
||||
/// <summary>
|
||||
/// User name
|
||||
/// </summary>
|
||||
public String ApproverName { get; set; }
|
||||
|
||||
public String ApproverName;
|
||||
|
||||
/// <summary>
|
||||
///null means not approved
|
||||
/// Null means not approved
|
||||
/// </summary>
|
||||
public DateTimeOffset? ApprovalDate { get; set; }
|
||||
public DateTimeOffset? ApprovalDate;
|
||||
|
||||
/// <summary>
|
||||
/// List of registers to recover
|
||||
/// </summary>
|
||||
public List<RecoveryRegisterItem> RecoveryRegisters { get; set; }
|
||||
public List<RecoveryRegisterItem> RecoveryRegisters;
|
||||
|
||||
/// <summary>
|
||||
/// File name for this recovery register set
|
||||
@ -48,8 +52,7 @@ namespace Xylem.ServiceFwUpdate.Common.FwUpdateSafe.MeterRecovery
|
||||
/// <returns></returns>
|
||||
public String GenerateFileName()
|
||||
{
|
||||
return $"{PcbId}_{RadioFrequencyMhz}_{Region}_{Release}.config";
|
||||
|
||||
return $"{PcbId}_{Region}_{Release}.recovery";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Xylem.ServiceFwUpdate.Common.FwUpdateSafe.MeterRecovery;
|
||||
|
||||
namespace Xylem.ServiceFwUpdate.Common.FwUpdateSafe
|
||||
{
|
||||
@ -16,11 +17,11 @@ namespace Xylem.ServiceFwUpdate.Common.FwUpdateSafe
|
||||
/// <summary>
|
||||
/// Cordonel device information
|
||||
/// </summary>
|
||||
public List<CordonelFirmware> CordonelFwPackages;
|
||||
public CordonelFirmware CordonelFwPackage;
|
||||
/// <summary>
|
||||
/// Cordonel device information
|
||||
/// Cordonel register recovery settings
|
||||
/// </summary>
|
||||
public List<CordonelSettings> CordonelSettingFiles;
|
||||
public List<RecoverySettings> CordonelRegisterRecoveries;
|
||||
/// <summary>
|
||||
/// Cordonel device information
|
||||
/// </summary>
|
||||
|
||||
Binary file not shown.
@ -191,6 +191,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".shared", ".shared", "{79D2
|
||||
..\Common\.shared\SharedAssemblyInfo.cs = ..\Common\.shared\SharedAssemblyInfo.cs
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProductionOrderCore", "..\Common\Logic\ProductionOrderCore\ProductionOrderCore.csproj", "{6D2777BB-7A88-466D-A49B-3266F9BF0160}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SharedMSBuildProjectFiles) = preSolution
|
||||
..\Common\Utils\FileIoShared\FileIoShared.projitems*{200f4f65-47df-47c6-876f-e91c48799aff}*SharedItemsImports = 13
|
||||
@ -1578,6 +1580,48 @@ Global
|
||||
{E98A8975-0912-4826-824B-A5842D072042}.XP32bit|x64.Build.0 = Release|Any CPU
|
||||
{E98A8975-0912-4826-824B-A5842D072042}.XP32bit|x86.ActiveCfg = Release|Any CPU
|
||||
{E98A8975-0912-4826-824B-A5842D072042}.XP32bit|x86.Build.0 = Release|Any CPU
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}._MANUAL_CONTROL|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}._MANUAL_CONTROL|Any CPU.Build.0 = _MANUAL_CONTROL|Any CPU
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}._MANUAL_CONTROL|x64.ActiveCfg = _MANUAL_CONTROL|x64
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}._MANUAL_CONTROL|x64.Build.0 = _MANUAL_CONTROL|x64
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}._MANUAL_CONTROL|x86.ActiveCfg = _MANUAL_CONTROL|Any CPU
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}._MANUAL_CONTROL|x86.Build.0 = _MANUAL_CONTROL|Any CPU
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.COM|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.COM|Any CPU.Build.0 = _MANUAL_CONTROL|Any CPU
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.COM|x64.ActiveCfg = _MANUAL_CONTROL|x64
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.COM|x64.Build.0 = _MANUAL_CONTROL|x64
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.COM|x86.ActiveCfg = _MANUAL_CONTROL|Any CPU
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.COM|x86.Build.0 = _MANUAL_CONTROL|Any CPU
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.Debug|x64.Build.0 = Debug|x64
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.PerformTest|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.PerformTest|Any CPU.Build.0 = _MANUAL_CONTROL|Any CPU
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.PerformTest|x64.ActiveCfg = _MANUAL_CONTROL|x64
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.PerformTest|x64.Build.0 = _MANUAL_CONTROL|x64
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.PerformTest|x86.ActiveCfg = _MANUAL_CONTROL|Any CPU
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.PerformTest|x86.Build.0 = _MANUAL_CONTROL|Any CPU
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.Release|x64.ActiveCfg = Release|x64
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.Release|x64.Build.0 = Release|x64
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.Release|x86.Build.0 = Release|Any CPU
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.ReleaseTest|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.ReleaseTest|Any CPU.Build.0 = Release|Any CPU
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.ReleaseTest|x64.ActiveCfg = Release|x64
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.ReleaseTest|x64.Build.0 = Release|x64
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.ReleaseTest|x86.ActiveCfg = Release|Any CPU
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.ReleaseTest|x86.Build.0 = Release|Any CPU
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.XP32bit|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.XP32bit|Any CPU.Build.0 = _MANUAL_CONTROL|Any CPU
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.XP32bit|x64.ActiveCfg = _MANUAL_CONTROL|x64
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.XP32bit|x64.Build.0 = _MANUAL_CONTROL|x64
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.XP32bit|x86.ActiveCfg = _MANUAL_CONTROL|Any CPU
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160}.XP32bit|x86.Build.0 = _MANUAL_CONTROL|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@ -1666,6 +1710,7 @@ Global
|
||||
{BC77E7B0-10EC-4FFF-B8B1-F42266DBA6BF} = {FE839055-E425-4C3F-9147-93AE2D87A00C}
|
||||
{200F4F65-47DF-47C6-876F-E91C48799AFF} = {BC77E7B0-10EC-4FFF-B8B1-F42266DBA6BF}
|
||||
{E98A8975-0912-4826-824B-A5842D072042} = {086C204C-7CA7-46D0-BEBF-80986D1FF5F8}
|
||||
{6D2777BB-7A88-466D-A49B-3266F9BF0160} = {20791BCF-EF3F-4692-B42E-BAA1FE54574C}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {A3EA9D1C-40DE-43F8-9EC8-7657B0D78A00}
|
||||
|
||||
@ -1,69 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
{
|
||||
/// <summary>
|
||||
/// This class collects all information needed to specify the FW-Update package.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class CordonelFwPackageInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Used to keep the selection information on e.g. data tables stuck at the FW.
|
||||
/// </summary>
|
||||
public Boolean IsSelected;
|
||||
/// <summary>
|
||||
/// Marker for the latest release.
|
||||
/// </summary>
|
||||
public Boolean FileIsLatest;
|
||||
/// <summary>
|
||||
/// Marker if it is released.
|
||||
/// </summary>
|
||||
public Boolean FwIsReleased;
|
||||
/// <summary>
|
||||
/// Name of the release e.g. PROD_EMEA_868_DN50_R1066
|
||||
/// </summary>
|
||||
public String ReleaseNameVersion;
|
||||
/// <summary>
|
||||
/// Release version e.g. 10.67 referenced as FLEXNETVERSION AppId 0x18
|
||||
/// </summary>
|
||||
public String ReleaseVersion;
|
||||
/// <summary>
|
||||
/// Region "EMEA" or "NA"
|
||||
/// </summary>
|
||||
public String Region;
|
||||
/// <summary>
|
||||
/// Core version minimum
|
||||
/// </summary>
|
||||
public Int32 CoreVersionMin;
|
||||
/// <summary>
|
||||
/// Core version maximum
|
||||
/// </summary>
|
||||
public Int32 CoreVersionMax;
|
||||
/// <summary>
|
||||
/// Version of metrology, as this may not permitted to update, referenced as GENESISFLOW AppId 0x0F.
|
||||
/// </summary>
|
||||
public String MetrologyVersion;
|
||||
/// <summary>
|
||||
/// Radio frequency in MHz referenced a SENSUSRADIO AppId 0x10, Register FrequencyIndicator Id 0x05
|
||||
/// values: default 433, minimum 433, maximum 868 or null if region is "NA"
|
||||
/// </summary>
|
||||
public String RadioFrequencyMhz;
|
||||
/// <summary>
|
||||
/// Meter size e.g. DN40, DN50, or null if for all sizes or null for all
|
||||
/// </summary>
|
||||
public String MeterSize;
|
||||
/// <summary>
|
||||
/// Name of person which approves the release
|
||||
/// </summary>
|
||||
public String ApproverName;
|
||||
/// <summary>
|
||||
/// Date of approval
|
||||
/// </summary>
|
||||
public DateTime ApprovalDate;
|
||||
/// <summary>
|
||||
/// Date of release
|
||||
/// </summary>
|
||||
public DateTime ReleaseDate;
|
||||
}
|
||||
}
|
||||
@ -15,11 +15,12 @@ using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Logic.ProductionToProductMapper.Cordonel;
|
||||
using Xylem.Common.CommonCore.Consts;
|
||||
using Xylem.Common.CommonCore.ThreadWatcher;
|
||||
using Xylem.Common.Cryptology.Security;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.FW;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
||||
using Xylem.Common.Utils.DateTimeServer;
|
||||
using Xylem.Common.Utils.Logging;
|
||||
using Xylem.Common.Utils.UiInvoker;
|
||||
@ -156,13 +157,13 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
/// The FW-Update package is a collection of all needed applications and settings to install into the Cordonel!
|
||||
/// This information will be passed to the FW-Update SW if any Cordonel requires this package.
|
||||
/// </summary>
|
||||
private readonly List<CordonelFirmware> _fwUpdatePackages = new List<CordonelFirmware>();
|
||||
private CordonelFirmware _fwUpdatePackage = new CordonelFirmware();
|
||||
///<summary>
|
||||
/// All Cordonel FW package information needed to select the right package for installation! This is going to be
|
||||
/// filled with information from the read packages from DB.
|
||||
/// This information will only be used by the FW Update Builder!
|
||||
/// </summary>
|
||||
private readonly List<CordonelFwPackageInfo> _cordonelFwPackageInfoSearch = new List<CordonelFwPackageInfo>();
|
||||
//private readonly List<CordonelFwPackageInfo> _cordonelFwPackageInfoSearch = new List<CordonelFwPackageInfo>();
|
||||
|
||||
private readonly List<String> _metrologySearchItems = new List<String>();
|
||||
private readonly List<String> _coreSearchItems = new List<String>();
|
||||
@ -185,7 +186,7 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
private String _fwUpdateSafeName;
|
||||
private FwUpdateSafeDb _fwUpdateSafeDb;
|
||||
private Int32 _updateOperatorId;
|
||||
private readonly List<MeterFwUpdateRuler> _meterFwUpdateRuler = new List<MeterFwUpdateRuler>();
|
||||
//private readonly List<MeterFwUpdateRuler> _meterFwUpdateRuler = new List<MeterFwUpdateRuler>();
|
||||
|
||||
/// <summary>
|
||||
/// Reminder to avoid repeated reading of DB contents and reset of selection if item has already been assigned
|
||||
@ -672,10 +673,13 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
/// <remarks date="2021-Apr-13" author="Thomas Wiedebusch">
|
||||
/// - Initial.
|
||||
/// </remarks>
|
||||
/// <remarks date="2022-Nov-29" author="Thomas Wiedebusch">
|
||||
/// - Single FW-Update package.
|
||||
/// </remarks>
|
||||
private void btnFwPackageSearch_Click(Object sender, EventArgs e)
|
||||
{
|
||||
// Load fw packages only if not selected indicated in count
|
||||
if (_fwUpdatePackages.Count > 0)
|
||||
// Load fw packages only if not selected
|
||||
if (_fwUpdatePackage?.FwPackageInfo != null)
|
||||
return;
|
||||
|
||||
DisableAllControlsInvoked();
|
||||
@ -716,6 +720,9 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
/// <remarks date="2022-Apr-13" author="Thomas Wiedebusch">
|
||||
/// - Set status progress bar active for pre-build summary as this takes a lot of time.
|
||||
/// </remarks>
|
||||
/// <remarks date="2022-Nov-29" author="Thomas Wiedebusch">
|
||||
/// - Single FW-Update package.
|
||||
/// </remarks>
|
||||
private void tabControlSelection_Selected(Object sender, TabControlEventArgs e)
|
||||
{
|
||||
_processState = ProcessState.Idle;
|
||||
@ -771,8 +778,9 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
if (e.TabPage == tabPageFwPackageSelection)
|
||||
{
|
||||
// Load fw packages only if not selected indicated in count
|
||||
if (_fwUpdatePackages.Count > 0 ||
|
||||
_cordonelFwPackageInfoSearch != null && _cordonelFwPackageInfoSearch.Count > 0)
|
||||
if (_fwUpdatePackage?.FwPackageInfo != null ||
|
||||
(_fwUpdateDbAccess?.DbCordonelFwPackagesInfo != null &&
|
||||
_fwUpdateDbAccess.DbCordonelFwPackagesInfo.Count > 0))
|
||||
return;
|
||||
|
||||
DisableAllControlsInvoked();
|
||||
@ -885,16 +893,16 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
/// <remarks date="2021-Apr-23" author="Thomas Wiedebusch">
|
||||
/// - Clear content of FW package to force reload and output of loaded package on rebuild of safe.
|
||||
/// </remarks>
|
||||
/// <remarks date="2022-Nov-29" author="Thomas Wiedebusch">
|
||||
/// - Single FW-Update package.
|
||||
/// </remarks>
|
||||
private void btnBuildFwUpdateSafe_Click(Object sender, EventArgs e)
|
||||
{
|
||||
SetStatusProgressBar();
|
||||
_dbAccessDelayCtrMs = 0;
|
||||
// clear FW packages content to force reload from data base and therefore report generation,
|
||||
// clear FW package content to force reload from data base and therefore report generation,
|
||||
// this is essential for rebuilding of a safe
|
||||
foreach (var package in _fwUpdatePackages)
|
||||
{
|
||||
package?.BinaryApplicationFiles?.Clear();
|
||||
}
|
||||
_fwUpdatePackage?.BinaryApplicationFiles?.Clear();
|
||||
rtbReport.Clear();
|
||||
rtbReport.ForeColor = ColorDefault;
|
||||
lblStatusDbConnect.Text = Resources.StrFwUpdateSafeBuilding;
|
||||
@ -982,11 +990,14 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
/// - Library added to NLogConfig source path, as this is the release source, copy files only if not
|
||||
/// identical.
|
||||
/// </remarks>
|
||||
/// <remarks date="2022-Nov-29" author="Thomas Wiedebusch">
|
||||
/// - Removed FUpdateRuler, all data are going to be taken from DB.
|
||||
/// </remarks>
|
||||
public FrmFwUpdateBuilder()
|
||||
{
|
||||
_cultureInfo = Thread.CurrentThread.CurrentCulture;
|
||||
var fwUpdateBuilderExePath = AppDomain.CurrentDomain.BaseDirectory;
|
||||
var fwUpdateBuilderLibraryPath = Path.Combine(fwUpdateBuilderExePath, FwUpdateConfig.LibrarySubFolderName);
|
||||
//var fwUpdateBuilderLibraryPath = Path.Combine(fwUpdateBuilderExePath, FwUpdateConfig.LibrarySubFolderName);
|
||||
var fwUpdateBuilderConfigPath = Path.Combine(fwUpdateBuilderExePath, FwUpdateConfig.ConfigSubFolderName);
|
||||
|
||||
var nLogConfigSourcePathName = Path.Combine(fwUpdateBuilderConfigPath, ProgramConfig.NlogConfig);
|
||||
@ -1008,16 +1019,16 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
if (File.Exists(nLogConfigSourcePathName) && !File.Exists(NLogConfigurationDestPathFile))
|
||||
SystemControl.CopyFile(nLogConfigSourcePathName, NLogConfigurationDestPathFile);
|
||||
|
||||
var rulerPathName = Path.Combine(fwUpdateBuilderLibraryPath,
|
||||
FwUpdateConfig.MeterFwUpdateRulerConfigFileName);
|
||||
if (!File.Exists(rulerPathName))
|
||||
rulerPathName = Path.Combine(AppDomain.CurrentDomain.BaseDirectory,
|
||||
FwUpdateConfig.MeterFwUpdateRulerConfigFileName);
|
||||
if (File.Exists(rulerPathName))
|
||||
{
|
||||
var rulerFile = File.ReadAllText(rulerPathName, Encoding.UTF8);
|
||||
_meterFwUpdateRuler = JsonConvert.DeserializeObject<List<MeterFwUpdateRuler>>(rulerFile);
|
||||
}
|
||||
//var rulerPathName = Path.Combine(fwUpdateBuilderLibraryPath,
|
||||
// FwUpdateConfig.MeterFwUpdateRulerConfigFileName);
|
||||
//if (!File.Exists(rulerPathName))
|
||||
// rulerPathName = Path.Combine(AppDomain.CurrentDomain.BaseDirectory,
|
||||
// FwUpdateConfig.MeterFwUpdateRulerConfigFileName);
|
||||
//if (File.Exists(rulerPathName))
|
||||
//{
|
||||
// var rulerFile = File.ReadAllText(rulerPathName, Encoding.UTF8);
|
||||
// _meterFwUpdateRuler = JsonConvert.DeserializeObject<List<MeterFwUpdateRuler>>(rulerFile);
|
||||
//}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
@ -1177,11 +1188,17 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
/// <remarks date="2021-Oct-29" author="Thomas Wiedebusch">
|
||||
/// - Skip loading of FW update SW if already done in preceding run.
|
||||
/// </remarks>
|
||||
/// <remarks date="2022-Jul-2" author="Thomas Wiedebusch">
|
||||
/// <remarks date="2022-Jul-02" author="Thomas Wiedebusch">
|
||||
/// - Removed special characters (e.g. characters from other language like "Umlaute") from file name,
|
||||
/// as DB problems may ocure on FwUpdateSafe load, limit customer name length to 45 characters to
|
||||
/// as DB problems may occur on FwUpdateSafe load, limit customer name length to 45 characters to
|
||||
/// keep the file name small.
|
||||
/// </remarks>
|
||||
/// <remarks date="2022-Nov-29" author="Thomas Wiedebusch">
|
||||
/// - New FW-Update safe:
|
||||
/// - Simply one FW-update package per safe,
|
||||
/// - Register recovery implemented,
|
||||
/// - FW information taken from fields instead of the name.
|
||||
/// </remarks>
|
||||
public Boolean BuildFwUpdateSafe()
|
||||
{
|
||||
if (string.IsNullOrEmpty(lblUpdateOperator.Text))
|
||||
@ -1292,10 +1309,10 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
|
||||
fwUpdateSafe.Updates = new UpdateContainer
|
||||
{
|
||||
CordonelFwPackages = new List<CordonelFirmware>(),
|
||||
CordonelFwPackage = new CordonelFirmware(),
|
||||
CordonelDeviceInfos = new List<CordonelDeviceInfo>()
|
||||
};
|
||||
fwUpdateSafe.Updates.CordonelFwPackages = _fwUpdatePackages;
|
||||
fwUpdateSafe.Updates.CordonelFwPackage = _fwUpdatePackage;
|
||||
fwUpdateSafe.Updates.CordonelDeviceInfos = _cordonelUpdateList;
|
||||
|
||||
var serializedData = JsonConvert.SerializeObject(fwUpdateSafe);
|
||||
@ -1453,6 +1470,10 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
/// <remarks date="2022-Apr-12" author="Thomas Wiedebusch">
|
||||
/// - Initial.
|
||||
/// </remarks>
|
||||
/// <remarks date="2022-Dec-01" author="Thomas Wiedebusch">
|
||||
/// - Single FW-Update package,
|
||||
/// - Used fw update package id instead of name.
|
||||
/// </remarks>
|
||||
private String PreSelectFwPackages(CordonelProductionInfosDb cordonel)
|
||||
{
|
||||
|
||||
@ -1464,46 +1485,41 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
cordonel.IsApproved = false;
|
||||
cordonel.RequiredReleaseNameVersion = null;
|
||||
|
||||
if (_fwUpdatePackages == null || _fwUpdatePackages.Count == 0)
|
||||
if (_fwUpdatePackage?.FwPackageInfo == null || _fwUpdateDbAccess?.DbCordonelFwPackagesInfo == null)
|
||||
{
|
||||
return "?";
|
||||
}
|
||||
|
||||
foreach (var fwPack in _fwUpdatePackages)
|
||||
foreach (var fw in _fwUpdateDbAccess.DbCordonelFwPackagesInfo)
|
||||
{
|
||||
foreach (var fw in _cordonelFwPackageInfoSearch)
|
||||
// check if this is compatible to the Cordonel
|
||||
if (_fwUpdatePackage.FwPackageInfo.Id != fw.Id)
|
||||
continue;
|
||||
|
||||
// assign the unique version for all devices, even if these are having a lack of information
|
||||
cordonel.RequiredReleaseNameVersion = fw.Name;
|
||||
|
||||
if (cordonel.CoreRevision != null && !cordonel.CoreRevision.Contains("?"))
|
||||
{
|
||||
// as for the _cordonelFwPackageInfoSearch all fields are extracted, these can be used to
|
||||
// check if this is compatible to the Cordonel, the _fwUpdatePackages do not contain this info!
|
||||
if (fwPack.ReleaseNameVersion != fw.ReleaseNameVersion)
|
||||
continue;
|
||||
|
||||
// assign the unique version for all devices, even if these are having a lack of information
|
||||
cordonel.RequiredReleaseNameVersion = fw.ReleaseNameVersion;
|
||||
// extract the Cordonel core version
|
||||
var coreVersion = cordonel.CoreRevision;
|
||||
coreVersion = coreVersion.Replace(".", "");
|
||||
Int32.TryParse(coreVersion, out var requiredCoreVersion);
|
||||
|
||||
if (cordonel.CoreRevision != null && !cordonel.CoreRevision.Contains("?"))
|
||||
if (cordonel.Region.Contains(fw.Region) &&
|
||||
(cordonel.RadioFrequency == fw.RadioFrequencyMhz.ToString() ||
|
||||
string.IsNullOrEmpty(fw.RadioFrequencyMhz.ToString())) &&
|
||||
requiredCoreVersion <= fw.CoreRevisionMax &&
|
||||
requiredCoreVersion >= fw.CoreRevisionMin &&
|
||||
cordonel.Diameter == fw.MeterSize)
|
||||
{
|
||||
|
||||
// extract the Cordonel core version
|
||||
var coreVersion = cordonel.CoreRevision;
|
||||
coreVersion = coreVersion.Replace(".", "");
|
||||
Int32.TryParse(coreVersion, out var requiredCoreVersion);
|
||||
|
||||
if (cordonel.Region.Contains(fw.Region) &&
|
||||
(cordonel.RadioFrequency.Contains(fw.RadioFrequencyMhz) ||
|
||||
string.IsNullOrEmpty(fw.RadioFrequencyMhz) ||
|
||||
fw.RadioFrequencyMhz.Contains("*") ||
|
||||
fw.RadioFrequencyMhz.Contains("?")) &&
|
||||
requiredCoreVersion <= fw.CoreVersionMax &&
|
||||
requiredCoreVersion >= fw.CoreVersionMin)
|
||||
{
|
||||
cordonel.IsRemoved = false;
|
||||
cordonel.IsApproved = true;
|
||||
}
|
||||
cordonel.IsRemoved = false;
|
||||
cordonel.IsApproved = true;
|
||||
}
|
||||
|
||||
return cordonel.RequiredReleaseNameVersion;
|
||||
}
|
||||
|
||||
return cordonel.RequiredReleaseNameVersion;
|
||||
}
|
||||
|
||||
return "?";
|
||||
@ -1679,6 +1695,9 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
/// <remarks date="2021-Apr-29" author="Thomas Wiedebusch">
|
||||
/// - Use selected Cordonels to fill the FW package search infos.
|
||||
/// </remarks>
|
||||
/// <remarks date="2022-Nov-29" author="Thomas Wiedebusch">
|
||||
/// - Single FW-Update package.
|
||||
/// </remarks>
|
||||
private void CheckDataCollectionStatus()
|
||||
{
|
||||
// Customer Orders ----------------------------------------------------------------------------------------
|
||||
@ -1774,23 +1793,22 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
|
||||
// Selected FW-Packages -----------------------------------------------------------------------------------
|
||||
// Add fw packages to fw package selection combo box for Cordonel FW to install selection
|
||||
if (_fwUpdateDbAccess?.DbCordonelFwPackages != null && _fwUpdatePackages != null &&
|
||||
if (_fwUpdateDbAccess?.DbCordonelFwPackages != null && _fwUpdatePackage?.FwPackageInfo != null &&
|
||||
_cbxFwReleaseSelection != null)
|
||||
{
|
||||
if (_cbxFwReleaseSelection.Items.Count != _fwUpdatePackages.Count)
|
||||
if (_cbxFwReleaseSelection.Items.Count < 1)
|
||||
{
|
||||
_cbxFwReleaseSelection.Items.Clear();
|
||||
foreach (var fw in _fwUpdatePackages)
|
||||
{
|
||||
_cbxFwReleaseSelection.Items.Add(fw.ReleaseNameVersion);
|
||||
}
|
||||
_cbxFwReleaseSelection.Items.Add(_fwUpdatePackage.FwPackageInfo.Name);
|
||||
}
|
||||
}
|
||||
|
||||
// Check if FW packages are selected
|
||||
if (_fwUpdatePackages != null && lblSelectedFwPackages.Text != _fwUpdatePackages.Count.ToString())
|
||||
lblSelectedFwPackages.Text = _fwUpdatePackages.Count.ToString();
|
||||
backGroundColor = _fwUpdatePackages != null && _fwUpdatePackages.Count == 0 ? ColorBkMissing : ColorBkValid;
|
||||
if (_fwUpdatePackage?.FwPackageInfo != null && lblSelectedFwPackages.Text != @"1")
|
||||
lblSelectedFwPackages.Text = @"1";
|
||||
else if (_fwUpdatePackage?.FwPackageInfo == null)
|
||||
lblSelectedFwPackages.Text = @"0";
|
||||
backGroundColor = _fwUpdatePackage?.FwPackageInfo == null ? ColorBkMissing : ColorBkValid;
|
||||
|
||||
if (backGroundColor != lblSelectedFwPackages.BackColor)
|
||||
{
|
||||
@ -1944,7 +1962,7 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
lblFwUpdateDutyDate.BackColor != ColorBkValid ||
|
||||
tbxCustomerName.BackColor != ColorBkValid ||
|
||||
tbxOrderNumber.BackColor != ColorBkValid ||
|
||||
_fwUpdatePackages.Count == 0 ||
|
||||
_fwUpdatePackage == null ||
|
||||
_cordonelUpdateList.Count == 0 ||
|
||||
updateLocked)
|
||||
{
|
||||
@ -2036,10 +2054,13 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
/// <remarks date="2021-Apr-04" author="Thomas Wiedebusch">
|
||||
/// - Locked if FW-Packages are not loaded.
|
||||
/// </remarks>
|
||||
/// <remarks date="2021-Dec-01" author="Thomas Wiedebusch">
|
||||
/// - Take FW package info.
|
||||
/// </remarks>
|
||||
private void CheckFwPackageChange()
|
||||
{
|
||||
if (!_fwPackagePropertyChanged || _fwUpdateDbAccess?.DbCordonelFwPackages == null ||
|
||||
_fwUpdateDbAccess.DbCordonelFwPackages.Count == 0)
|
||||
if (!_fwPackagePropertyChanged || _fwUpdateDbAccess?.DbCordonelFwPackagesInfo == null ||
|
||||
_fwUpdateDbAccess.DbCordonelFwPackagesInfo.Count == 0)
|
||||
return;
|
||||
|
||||
_fwPackagePropertyChanged = false;
|
||||
@ -2373,7 +2394,7 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
/// </remarks>
|
||||
private void SetStatusProgressBar(Int32 value = 0, Boolean visible = true)
|
||||
{
|
||||
if (ProgressBarStatus == null || ProgressBarStatus.Visible == false && visible == false)
|
||||
if (ProgressBarStatus == null || (ProgressBarStatus.Visible == false && visible == false))
|
||||
return;
|
||||
ProgressBarStatus.Value = value;
|
||||
ProgressBarStatus.Visible = visible;
|
||||
@ -2668,6 +2689,9 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
/// to the FW package load, as the Builder uses the information of the MeterFwUpdateRuler to
|
||||
/// create the package information!
|
||||
/// </remarks>
|
||||
/// <remarks date="2022-Nov-30" author="Thomas Wiedebusch">
|
||||
/// - Load only the information about the FW packages and not the FW package content.
|
||||
/// </remarks>
|
||||
private void LoadDbCordonelFwPackagesTask()
|
||||
{
|
||||
_invokerProcessState = _processState;
|
||||
@ -2680,7 +2704,7 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
// check DB connection in advance to overcome the timing issues for DB service startup
|
||||
_fwUpdateDbAccess.CheckDbConnection();
|
||||
// has to be done first to extract the MeterFwUpdateRuler
|
||||
GetFwUpdateConfigFilesFromDb();
|
||||
//GetFwUpdateConfigFilesFromDb();
|
||||
// load the packages and use the MeterFwUpdateRuler to assign the DN, EMEA, NA, 868, 433..
|
||||
GetCordonelFwPackagesFromDb();
|
||||
}
|
||||
@ -2913,30 +2937,38 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
/// - Simply one unique FW-package allowed to select,
|
||||
/// - Reset status of pre-selected Cordonels.
|
||||
/// </remarks>
|
||||
/// <remarks date="2022-Dec-01" author="Thomas Wiedebusch">
|
||||
/// - FW package information from DB used.
|
||||
/// </remarks>
|
||||
private void gridViewFwPackagesSelection_CellClick(Object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
if (e.ColumnIndex < 0 || e.RowIndex < 0 || _fwUpdatePackages == null)
|
||||
if (e.ColumnIndex < 0 || e.RowIndex < 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// the e.RowIndex is referenced to the (sorted) data grid view
|
||||
var fwPackage = new CordonelFirmware();
|
||||
var fwPackage = new CordonelFirmware
|
||||
{
|
||||
FwPackageInfo = new CordonelFwPackageInfo()
|
||||
};
|
||||
|
||||
// use the fw update package id for selection
|
||||
for (var columnIndex = 0; columnIndex < gridViewFwPackageSelection.ColumnCount; columnIndex++)
|
||||
{
|
||||
if (gridViewFwPackageSelection.Columns[columnIndex].Name == Resources.StrTableCordonelFwToInstall)
|
||||
fwPackage.ReleaseNameVersion =
|
||||
gridViewFwPackageSelection.Rows[e.RowIndex].Cells[columnIndex].Value.ToString();
|
||||
if (gridViewFwPackageSelection.Columns[columnIndex].Name == Resources.StrTableFileId)
|
||||
fwPackage.FwPackageInfo.Id =
|
||||
(Int32)gridViewFwPackageSelection.Rows[e.RowIndex].Cells[columnIndex].Value;
|
||||
}
|
||||
|
||||
// select FW package
|
||||
if (gridViewFwPackageSelection.Columns[e.ColumnIndex].Name == Resources.StrTableSelect)
|
||||
{
|
||||
// clear list of FW-packages
|
||||
_fwUpdatePackages.Clear();
|
||||
// clear FW-packages
|
||||
_fwUpdatePackage = null;
|
||||
|
||||
// reset status of Cordonels being able to auto-assign new FW-package
|
||||
foreach (var cordonel in _cordonelProductionPreSelectInfos)
|
||||
@ -2951,10 +2983,12 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
{
|
||||
cordonel.RequiredRelease = null;
|
||||
}
|
||||
// Search the FW package name in data table, select if found
|
||||
foreach (var fw in _cordonelFwPackageInfoSearch)
|
||||
// Search the FW package Id in data table, select if found
|
||||
//foreach (var fw in _cordonelFwPackageInfoSearch)
|
||||
if (_fwUpdateDbAccess?.DbCordonelFwPackagesInfo == null) return;
|
||||
foreach (var fw in _fwUpdateDbAccess.DbCordonelFwPackagesInfo)
|
||||
{
|
||||
if (fw.ReleaseNameVersion == fwPackage.ReleaseNameVersion)
|
||||
if (fw.Id == fwPackage.FwPackageInfo.Id)
|
||||
{
|
||||
// toggle selection and set information on main screen
|
||||
if (fw.IsSelected)
|
||||
@ -2964,13 +2998,12 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
}
|
||||
else
|
||||
{
|
||||
// add selected package to list if not already in list
|
||||
if (_fwUpdatePackages.All(x => x.ReleaseNameVersion != fw.ReleaseNameVersion))
|
||||
_fwUpdatePackages.Add(fwPackage);
|
||||
// assign FW package
|
||||
_fwUpdatePackage = fwPackage;
|
||||
// add new FW-package to all Cordonels in update list
|
||||
foreach (var cordonel in _cordonelUpdateList)
|
||||
{
|
||||
cordonel.RequiredRelease = fw.ReleaseNameVersion;
|
||||
cordonel.RequiredRelease = fw.Name;
|
||||
}
|
||||
fw.IsSelected = true;
|
||||
}
|
||||
@ -2984,7 +3017,7 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
for (var idx = 0; idx < _dataTableFwPackages.Rows.Count; idx++)
|
||||
{
|
||||
var dataRow = _dataTableFwPackages.Rows[idx];
|
||||
if (fw.ReleaseNameVersion == (String)dataRow[Resources.StrTableCordonelFwToInstall])
|
||||
if (fw.Id == (Int32)dataRow[Resources.StrTableFileId])
|
||||
{
|
||||
dataRow[Resources.StrTableSelect] = fw.IsSelected;
|
||||
}
|
||||
@ -3013,6 +3046,9 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
/// <remarks date="2021-Apr-15" author="Thomas Wiedebusch">
|
||||
/// - Search extended to metrology.
|
||||
/// </remarks>
|
||||
/// <remarks date="2022-Dec-01" author="Thomas Wiedebusch">
|
||||
/// - FW package information from DB used.
|
||||
/// </remarks>
|
||||
private void FillDataGridWithFwPackageInfos()
|
||||
{
|
||||
grpLanguageSelection.Enabled = false;
|
||||
@ -3024,9 +3060,7 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
_dataTableFwPackages.Columns.Add(Resources.StrTableSelect, typeof(Boolean));
|
||||
|
||||
_dataTableFwPackages.Columns.Add(Resources.StrTableCordonelFwToInstall, typeof(String));
|
||||
_dataTableFwPackages.Columns.Add(Resources.StrTableCordonelFwIsLatest, typeof(Boolean));
|
||||
_dataTableFwPackages.Columns.Add(Resources.StrTableCordonelFwIsReleased, typeof(Boolean));
|
||||
_dataTableFwPackages.Columns.Add(Resources.StrTableCordonelFwVersion, typeof(String));
|
||||
|
||||
_dataTableFwPackages.Columns.Add(Resources.StrTableRegion, typeof(String));
|
||||
_dataTableFwPackages.Columns.Add(Resources.StrTableRadioFrequency, typeof(String));
|
||||
@ -3037,9 +3071,13 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
_dataTableFwPackages.Columns.Add(Resources.StrTableCordonelDiameter, typeof(String));
|
||||
_dataTableFwPackages.Columns.Add(Resources.StrTableReleaseDate, typeof(DateTime));
|
||||
|
||||
//add the fw update package id to simplify selection
|
||||
_dataTableFwPackages.Columns.Add(Resources.StrTableFileId, typeof(Int32));
|
||||
|
||||
try
|
||||
{
|
||||
foreach (var fw in _cordonelFwPackageInfoSearch)
|
||||
if (_fwUpdateDbAccess?.DbCordonelFwPackagesInfo == null) return;
|
||||
foreach (var fw in _fwUpdateDbAccess.DbCordonelFwPackagesInfo)
|
||||
{
|
||||
// pre-selection of displayed FW packages
|
||||
var requiredCoreVersion = 0;
|
||||
@ -3050,31 +3088,34 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
Int32.TryParse(version, out requiredCoreVersion);
|
||||
}
|
||||
|
||||
if (fw.Region != cbxFwPackageRegionMask.Text && cbxFwPackageRegionMask.Text != @"*" ||
|
||||
fw.RadioFrequencyMhz != cbxFwPackageRadioMask.Text && cbxFwPackageRadioMask.Text != @"*" ||
|
||||
fw.MeterSize != cbxFwPackageSizeMask.Text && cbxFwPackageSizeMask.Text != @"*" ||
|
||||
(fw.CoreVersionMin > requiredCoreVersion || requiredCoreVersion > fw.CoreVersionMax) &&
|
||||
cbxFwPackageSearchCore.Text != @"*" ||
|
||||
fw.MetrologyVersion != cbxFwPackageSearchMetrology.Text &&
|
||||
cbxFwPackageSearchMetrology.Text != @"*")
|
||||
if ((fw.Region != cbxFwPackageRegionMask.Text && cbxFwPackageRegionMask.Text != @"*") ||
|
||||
(fw.RadioFrequencyMhz.ToString() != cbxFwPackageRadioMask.Text && cbxFwPackageRadioMask.Text != @"*") ||
|
||||
(fw.MeterSize != cbxFwPackageSizeMask.Text && cbxFwPackageSizeMask.Text != @"*") ||
|
||||
(((fw.CoreRevisionMin != null && fw.CoreRevisionMin > requiredCoreVersion) ||
|
||||
(fw.CoreRevisionMax != null && requiredCoreVersion > fw.CoreRevisionMax)) &&
|
||||
cbxFwPackageSearchCore.Text != @"*") ||
|
||||
(fw.MetrologyVersion.ToString() != cbxFwPackageSearchMetrology.Text &&
|
||||
cbxFwPackageSearchMetrology.Text != @"*"))
|
||||
continue;
|
||||
|
||||
var row = _dataTableFwPackages.NewRow();
|
||||
row[Resources.StrTableSelect] = fw.IsSelected;
|
||||
|
||||
row[Resources.StrTableCordonelFwToInstall] = fw.ReleaseNameVersion;
|
||||
row[Resources.StrTableCordonelFwIsLatest] = fw.FileIsLatest;
|
||||
row[Resources.StrTableCordonelFwIsReleased] = fw.FwIsReleased;
|
||||
row[Resources.StrTableCordonelFwVersion] = fw.ReleaseVersion;
|
||||
row[Resources.StrTableCordonelFwToInstall] = fw.Name;
|
||||
row[Resources.StrTableCordonelFwIsReleased] = fw.IsReleased;
|
||||
|
||||
row[Resources.StrTableRegion] = fw.Region;
|
||||
row[Resources.StrTableRadioFrequency] = fw.RadioFrequencyMhz;
|
||||
row[Resources.StrTableCordonelMetrology] = fw.MetrologyVersion;
|
||||
row[Resources.StrTableFwPackageCoreMin] = $"{fw.CoreVersionMin / 100}.{fw.CoreVersionMin % 100}";
|
||||
row[Resources.StrTableFwPackageCoreMax] = $"{fw.CoreVersionMax / 100}.{fw.CoreVersionMax % 100}";
|
||||
row[Resources.StrTableRegion] = fw.Region ?? "*";
|
||||
row[Resources.StrTableRadioFrequency] = fw.RadioFrequencyMhz == null ? "*" : $@"{fw.RadioFrequencyMhz}";
|
||||
row[Resources.StrTableCordonelMetrology] = MeterFwUpdate.ConvertVersionToString(fw.MetrologyVersion);
|
||||
row[Resources.StrTableFwPackageCoreMin] = MeterFwUpdate.ConvertVersionToString(fw.CoreRevisionMin);
|
||||
row[Resources.StrTableFwPackageCoreMax] = MeterFwUpdate.ConvertVersionToString(fw.CoreRevisionMax);
|
||||
|
||||
row[Resources.StrTableCordonelDiameter] = fw.MeterSize;
|
||||
row[Resources.StrTableReleaseDate] = fw.ReleaseDate.Date;
|
||||
row[Resources.StrTableCordonelDiameter] = fw.MeterSize ?? "*";
|
||||
if (fw.ReleaseDate != null)
|
||||
{
|
||||
row[Resources.StrTableReleaseDate] = fw.ReleaseDate;
|
||||
}
|
||||
row[Resources.StrTableFileId] = fw.Id;
|
||||
|
||||
_dataTableFwPackages.Rows.Add(row);
|
||||
}
|
||||
@ -3124,7 +3165,7 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
Thread.CurrentThread.CurrentCulture = _cultureInfo;
|
||||
_dataTableUpdateSafes = new DataTable();
|
||||
|
||||
// _dataTableUpdateSafes.Columns.Add(Resources.StrTableUserValidDate, typeof(DateTime));
|
||||
// _dataTableUpdateSafes.Columns.Add(Resources.StrTableUserValidDate, typeof(DateTime));
|
||||
_dataTableUpdateSafes.Columns.Add(Resources.StrTableUserValidDate, typeof(String));
|
||||
_dataTableUpdateSafes.Columns.Add(Resources.StrTableCordonelPcbId, typeof(String));
|
||||
|
||||
@ -3147,8 +3188,8 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
var row = _dataTableUpdateSafes.NewRow();
|
||||
|
||||
//row[Resources.StrTableUserValidDate] = safeInfo.ValidDate.DateTime;
|
||||
row[Resources.StrTableUserValidDate] =
|
||||
DateTimeServer.GetSortableDateStringFromDateTime(safeInfo.ValidDate.DateTime,
|
||||
row[Resources.StrTableUserValidDate] =
|
||||
DateTimeServer.GetSortableDateStringFromDateTime(safeInfo.ValidDate.DateTime,
|
||||
_cultureInfo);
|
||||
row[Resources.StrTableCordonelPcbId] = pcbId;
|
||||
|
||||
@ -3317,7 +3358,7 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
var row = _dataTableReportFiles.NewRow();
|
||||
|
||||
//row[Resources.StrTableDate] = report.Date.Date;
|
||||
row[Resources.StrTableDate] =
|
||||
row[Resources.StrTableDate] =
|
||||
DateTimeServer.GetSortableDateStringFromDateTime(report.Date.Date, _cultureInfo);
|
||||
row[Resources.StrTableCordonelPcbId] = report.PcbId;
|
||||
|
||||
@ -3401,28 +3442,6 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
gridViewPreBuildSummary.Rows[e.RowIndex].Cells[columnIndex].Value.ToString();
|
||||
}
|
||||
|
||||
// select FW package with combo box
|
||||
//if (gridViewPreBuildSummary.Columns[e.ColumnIndex].Name == Resources.StrTableCordonelFwToInstall)
|
||||
//{
|
||||
// // take the actual cell value as default
|
||||
// _cbxFwReleaseSelection.Text = cordonelDeviceInfo.RequiredRelease;
|
||||
// // Adding combo box control into DataGridView
|
||||
// gridViewPreBuildSummary.Controls.Add(_cbxFwReleaseSelection);
|
||||
|
||||
// // Rectangular area that represents the display area for a cell
|
||||
// var location = gridViewPreBuildSummary.GetCellDisplayRectangle(e.ColumnIndex, e.RowIndex, true);
|
||||
|
||||
// // Setting Location and size to fit within the cell
|
||||
// _cbxFwReleaseSelection.Height = location.Height;
|
||||
// _cbxFwReleaseSelection.Width = 200;
|
||||
// _cbxFwReleaseSelection.Location = new Point(location.X, location.Y);
|
||||
|
||||
// // The final selection of the fw package
|
||||
// _fwPackageCordonelPcbId = cordonelDeviceInfo.PcbId;
|
||||
// _cbxFwReleaseSelection.DropDownClosed += CbxFwReleaseSelection_DropDownClosed;
|
||||
// _cbxFwReleaseSelection.Visible = true;
|
||||
//}
|
||||
|
||||
// select Cordonel
|
||||
if (gridViewPreBuildSummary.Columns[e.ColumnIndex].Name == Resources.StrTableApprove)
|
||||
{
|
||||
@ -3624,7 +3643,7 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
|
||||
row[Resources.StrTableCordonelDiameter] = cordonel.Diameter ?? "?";
|
||||
|
||||
row[Resources.StrTableReason] = cordonel.ReasonForUpdateDenied ?? "";
|
||||
row[Resources.StrTableReason] = cordonel.ReasonForUpdateDenial ?? "";
|
||||
|
||||
_dataTableSummary.Rows.Add(row);
|
||||
|
||||
@ -4567,7 +4586,7 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get Cordonel FW packages from DB end extract all needed information to select a package to the
|
||||
/// Get Cordonel FW packages information from DB end extract all needed information to select a package to the
|
||||
/// CordonelFwPackageInfo search list.
|
||||
/// </summary>
|
||||
/// <remarks date="2021-Apr-13" author="Thomas Wiedebusch">
|
||||
@ -4583,83 +4602,14 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
/// - Starting with FW 1.2.* all frequencies will be supported, removed frequency check,
|
||||
/// - Supported China as new region.
|
||||
/// </remarks>
|
||||
/// <remarks date="2022-Dec-01" author="Thomas Wiedebusch">
|
||||
/// - Removed FUpdateRuler, all data are going to be taken from DB,
|
||||
/// - file name no longer used to identify capability of release, all information from DB.
|
||||
/// </remarks>
|
||||
private void GetCordonelFwPackagesFromDb()
|
||||
{
|
||||
if (_fwUpdateDbAccess == null || !_fwUpdateDbAccess.GetAllCordonelFwInfoFilesFromDb() ||
|
||||
_fwUpdateDbAccess.DbCordonelFwPackages.Count == 0 || _cordonelFwPackageInfoSearch == null)
|
||||
return;
|
||||
|
||||
_cordonelFwPackageInfoSearch.Clear();
|
||||
// The configuration files contain the latest MeterFwUpdateRuler.json (needed for the FwUpdateBuilder),
|
||||
// the latest configuration.json and the latest MeterEraseRestore.json (needed for the FwUpdateSw).
|
||||
// GetConfigurationFilesFromDb();
|
||||
|
||||
// Start with the last package, as this will be the latest
|
||||
for (var idx = _fwUpdateDbAccess.DbCordonelFwPackages.Count - 1;
|
||||
idx > _fwUpdateDbAccess.DbCordonelFwPackages.Count - 40; idx--)
|
||||
{
|
||||
// read the package without the content, skip all if fwPackageFilesInfo returns null
|
||||
var dbCordonelFwFile = _fwUpdateDbAccess.DbCordonelFwPackages[idx];
|
||||
var fileId = dbCordonelFwFile.FileId;
|
||||
// Split to PROD_EMEA_433_DN50_R101D
|
||||
var nameSplit = dbCordonelFwFile.FileName.Split('_');
|
||||
if (_fwUpdateDbAccess.GetCordonelFwPackageFromDb(fileId, out var fwPackageFilesInfo, false) &&
|
||||
fwPackageFilesInfo != null && fwPackageFilesInfo.Count > 0)
|
||||
{
|
||||
// parse file information
|
||||
if (dbCordonelFwFile.CordonelFwFile_Dn != null)
|
||||
{
|
||||
var fwPackInfo = new CordonelFwPackageInfo
|
||||
{
|
||||
ReleaseNameVersion = dbCordonelFwFile.FileName,
|
||||
Region =
|
||||
dbCordonelFwFile.FileName.Contains("_NA_") ? "NA" :
|
||||
dbCordonelFwFile.FileName.Contains("_EMEA_") ? "EMEA" :
|
||||
dbCordonelFwFile.FileName.Contains("_China_") ? "China" : "*",
|
||||
RadioFrequencyMhz = dbCordonelFwFile.FileName.Contains("433") ? "433" :
|
||||
dbCordonelFwFile.FileName.Contains("868") ? "868" : "*",
|
||||
FileIsLatest = dbCordonelFwFile.FileIsLatest,
|
||||
MeterSize = MeterSizeConverter.ConvertOrderSizeNumberToSizeName(
|
||||
MeterSizeConverter.ConvertToOrder((MeterSize)dbCordonelFwFile.CordonelFwFile_Dn)),
|
||||
ReleaseDate = dbCordonelFwFile.FileDate,
|
||||
ReleaseVersion = $"{nameSplit[nameSplit.Length - 1].Substring(0, 3)}." +
|
||||
$"{nameSplit[nameSplit.Length - 1].Substring(3, 2)}"
|
||||
};
|
||||
// the release version is always the last element of the name split
|
||||
foreach (var binfile in fwPackageFilesInfo)
|
||||
{
|
||||
// extract metrology version
|
||||
if (binfile.FileName.Contains("binfile0F_"))
|
||||
{
|
||||
var msb = binfile.FileName.Substring(10, 2);
|
||||
// remove leading 0
|
||||
var msbMsb = msb.Substring(0, 1);
|
||||
if (msbMsb == "0")
|
||||
msb = msb.Remove(0, 1);
|
||||
var lsb = binfile.FileName.Substring(12, 2);
|
||||
fwPackInfo.MetrologyVersion = $"{msb}.{lsb}";
|
||||
break;
|
||||
}
|
||||
}
|
||||
// take the meter fw update ruler to extract core min /max and released
|
||||
foreach (var rule in _meterFwUpdateRuler)
|
||||
{
|
||||
var releaseVersion = $"{rule.Release.Substring(0, 3)}." +
|
||||
$"{rule.Release.Substring(3, 2)}";
|
||||
if (releaseVersion == fwPackInfo.ReleaseVersion)
|
||||
{
|
||||
int.TryParse(rule.CoreVersionMin, out var x);
|
||||
fwPackInfo.CoreVersionMin = x;
|
||||
int.TryParse(rule.CoreVersionMax, out x);
|
||||
fwPackInfo.CoreVersionMax = x;
|
||||
fwPackInfo.FwIsReleased = !string.IsNullOrEmpty(rule.ApproverName);
|
||||
}
|
||||
}
|
||||
|
||||
_cordonelFwPackageInfoSearch.Add(fwPackInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (_fwUpdateDbAccess == null) return;
|
||||
_fwUpdateDbAccess.GetAllCordonelFwPackagesInfoFromDb();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -5289,19 +5239,22 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
/// <remarks date="2021-Apr-10" author="Thomas Wiedebusch">
|
||||
/// - Removed configuration.json from FW package as this is part of the SW package.
|
||||
/// </remarks>
|
||||
/// <remarks date="2022-Nov-29" author="Thomas Wiedebusch">
|
||||
/// - Single FW-Update package.
|
||||
/// </remarks>
|
||||
private Boolean GetFwPackageFromDb(String releaseName)
|
||||
{
|
||||
// if this packages has already been loaded, exit immediately
|
||||
if (_fwUpdatePackages.Any(package => package.ReleaseNameVersion == releaseName &&
|
||||
package.BinaryApplicationFiles != null &&
|
||||
package.BinaryApplicationFiles.Count > 0))
|
||||
if (_fwUpdatePackage.FwPackageInfo.Name == releaseName &&
|
||||
_fwUpdatePackage.BinaryApplicationFiles != null &&
|
||||
_fwUpdatePackage.BinaryApplicationFiles.Count > 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
String msg;
|
||||
// search file id in ClusteredFiles but as the name in unambiguous and files are stored several times
|
||||
// with this file name, the last and therefor latest item has to be taken
|
||||
// with this file name, the last and therefore latest item has to be taken
|
||||
if (_fwUpdateDbAccess?.DbCordonelFwPackages != null)
|
||||
{
|
||||
var fileId = (from cu in _fwUpdateDbAccess.DbCordonelFwPackages
|
||||
@ -5313,19 +5266,19 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
try
|
||||
{
|
||||
// search the cordonel firmware
|
||||
foreach (var fw in _fwUpdatePackages.Where(fw => fw.ReleaseNameVersion == releaseName))
|
||||
if (_fwUpdatePackage.FwPackageInfo.Name == releaseName)
|
||||
{
|
||||
fw.PackageDescriptionFile = new FilePart();
|
||||
fw.BinaryApplicationFiles = new List<FilePart>();
|
||||
_fwUpdatePackage.PackageDescriptionFile = new FilePart();
|
||||
_fwUpdatePackage.BinaryApplicationFiles = new List<FilePart>();
|
||||
|
||||
foreach (var f in fwPackage)
|
||||
{
|
||||
// load the ADF
|
||||
if (f.FileName.Contains("product") && f.FileName.EndsWith(".txt"))
|
||||
{
|
||||
fw.PackageDescriptionFile.FileName = f.FileName;
|
||||
fw.PackageDescriptionFile.FileContent = new Byte[f.FileContent.Length];
|
||||
fw.PackageDescriptionFile.FileContent = f.FileContent.ToArray();
|
||||
_fwUpdatePackage.PackageDescriptionFile.FileName = f.FileName;
|
||||
_fwUpdatePackage.PackageDescriptionFile.FileContent = new Byte[f.FileContent.Length];
|
||||
_fwUpdatePackage.PackageDescriptionFile.FileContent = f.FileContent.ToArray();
|
||||
}
|
||||
|
||||
// load the binaries
|
||||
@ -5337,7 +5290,7 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
FileContent = new Byte[f.FileContent.Length]
|
||||
};
|
||||
filePart.FileContent = f.FileContent.ToArray();
|
||||
fw.BinaryApplicationFiles.Add(filePart);
|
||||
_fwUpdatePackage.BinaryApplicationFiles.Add(filePart);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -113,7 +113,6 @@
|
||||
<DependentUpon>FrmRegister.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FwUpdateCapability.cs" />
|
||||
<Compile Include="CordonelFwPackageInfo.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="FrmFwUpdateBuilder.de.resx">
|
||||
@ -163,9 +162,6 @@
|
||||
</Compile>
|
||||
<None Include="FwUpdateBuilder_1_TemporaryKey.pfx" />
|
||||
<None Include="FwUpdateBuilder_TemporaryKey.pfx" />
|
||||
<None Include="MeterFwUpdateRuler.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="MeterFwUpdateRuler_Template.json" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
@ -206,6 +202,10 @@
|
||||
<Project>{d0c859d9-d55e-4e85-ac50-0ff31b1ce50d}</Project>
|
||||
<Name>Logic.ProductionToProductMapper</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Common\Logic\ProductionOrderCore\ProductionOrderCore.csproj">
|
||||
<Project>{6D2777BB-7A88-466D-A49B-3266F9BF0160}</Project>
|
||||
<Name>ProductionOrderCore</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Common\SoftwareAccessHelper\SoftwareAccessHelper.csproj">
|
||||
<Project>{a33e3c6d-eaae-4a20-a0ee-f9e6922fd029}</Project>
|
||||
<Name>SoftwareAccessHelper</Name>
|
||||
|
||||
@ -1,276 +0,0 @@
|
||||
[
|
||||
{
|
||||
"Release": "R1108",
|
||||
"Region": "EMEA",
|
||||
"CoreVersionMin": "162",
|
||||
"CoreVersionMax": "169",
|
||||
"MetrologyVersion": "287",
|
||||
"RadioFrequencyMhz": "868",
|
||||
"MeterSizes": [
|
||||
"DN50"
|
||||
],
|
||||
"ApproverName": null,
|
||||
"ApprovalDate": "2000-01-01"
|
||||
},
|
||||
{
|
||||
"Release": "R1107",
|
||||
"Region": "EMEA",
|
||||
"CoreVersionMin": "162",
|
||||
"CoreVersionMax": "169",
|
||||
"MetrologyVersion": "287",
|
||||
"RadioFrequencyMhz": "433",
|
||||
"MeterSizes": [
|
||||
"DN50"
|
||||
],
|
||||
"ApproverName": null,
|
||||
"ApprovalDate": "2000-01-01"
|
||||
},
|
||||
{
|
||||
"Release": "R1106",
|
||||
"Region": "EMEA",
|
||||
"CoreVersionMin": "162",
|
||||
"CoreVersionMax": "169",
|
||||
"MetrologyVersion": "287",
|
||||
"RadioFrequencyMhz": "868",
|
||||
"MeterSizes": [
|
||||
"DN50"
|
||||
],
|
||||
"ApproverName": null,
|
||||
"ApprovalDate": "2000-01-01"
|
||||
},
|
||||
{
|
||||
"Release": "R1105",
|
||||
"Region": "EMEA",
|
||||
"CoreVersionMin": "162",
|
||||
"CoreVersionMax": "169",
|
||||
"MetrologyVersion": "287",
|
||||
"RadioFrequencyMhz": "433",
|
||||
"MeterSizes": [
|
||||
"DN50"
|
||||
],
|
||||
"ApproverName": null,
|
||||
"ApprovalDate": "2000-01-01"
|
||||
},
|
||||
{
|
||||
"Release": "R1104",
|
||||
"Region": "EMEA",
|
||||
"CoreVersionMin": "162",
|
||||
"CoreVersionMax": "169",
|
||||
"MetrologyVersion": "287",
|
||||
"RadioFrequencyMhz": "868",
|
||||
"MeterSizes": [
|
||||
"DN50"
|
||||
],
|
||||
"ApproverName": null,
|
||||
"ApprovalDate": "2000-01-01"
|
||||
},
|
||||
{
|
||||
"Release": "R1103",
|
||||
"Region": "EMEA",
|
||||
"CoreVersionMin": "162",
|
||||
"CoreVersionMax": "169",
|
||||
"MetrologyVersion": "287",
|
||||
"RadioFrequencyMhz": "433",
|
||||
"MeterSizes": [
|
||||
"DN50"
|
||||
],
|
||||
"ApproverName": null,
|
||||
"ApprovalDate": "2000-01-01"
|
||||
},
|
||||
{
|
||||
"Release": "R1102",
|
||||
"Region": "EMEA",
|
||||
"CoreVersionMin": "162",
|
||||
"CoreVersionMax": "169",
|
||||
"MetrologyVersion": "287",
|
||||
"RadioFrequencyMhz": "433",
|
||||
"MeterSizes": [
|
||||
"DN50"
|
||||
],
|
||||
"ApproverName": null,
|
||||
"ApprovalDate": "2000-01-01"
|
||||
},
|
||||
{
|
||||
"Release": "R1101",
|
||||
"Region": "EMEA",
|
||||
"CoreVersionMin": "162",
|
||||
"CoreVersionMax": "167",
|
||||
"MetrologyVersion": "287",
|
||||
"RadioFrequencyMhz": "433",
|
||||
"MeterSizes": [
|
||||
"DN50"
|
||||
],
|
||||
"ApproverName": null,
|
||||
"ApprovalDate": "2000-01-01"
|
||||
},
|
||||
{
|
||||
"Release": "R1100",
|
||||
"Region": "EMEA",
|
||||
"CoreVersionMin": "162",
|
||||
"CoreVersionMax": "167",
|
||||
"MetrologyVersion": "287",
|
||||
"RadioFrequencyMhz": "433",
|
||||
"MeterSizes": [
|
||||
"DN50"
|
||||
],
|
||||
"ApproverName": null,
|
||||
"ApprovalDate": "2000-01-01"
|
||||
},
|
||||
{
|
||||
"Release": "R1073",
|
||||
"Region": "EMEA",
|
||||
"CoreVersionMin": "162",
|
||||
"CoreVersionMax": "167",
|
||||
"MetrologyVersion": "287",
|
||||
"RadioFrequencyMhz": "433",
|
||||
"MeterSizes": [
|
||||
"DN50"
|
||||
],
|
||||
"ApproverName": null,
|
||||
"ApprovalDate": "2000-01-01"
|
||||
},
|
||||
{
|
||||
"Release": "R1072",
|
||||
"Region": "EMEA",
|
||||
"CoreVersionMin": "162",
|
||||
"CoreVersionMax": "167",
|
||||
"MetrologyVersion": "287",
|
||||
"RadioFrequencyMhz": "433",
|
||||
"MeterSizes": [
|
||||
"DN50"
|
||||
],
|
||||
"ApproverName": null,
|
||||
"ApprovalDate": "2000-01-01"
|
||||
},
|
||||
{
|
||||
"Release": "R1071",
|
||||
"Region": "EMEA",
|
||||
"CoreVersionMin": "162",
|
||||
"CoreVersionMax": "167",
|
||||
"MetrologyVersion": "287",
|
||||
"RadioFrequencyMhz": "433",
|
||||
"MeterSizes": [
|
||||
"DN50"
|
||||
],
|
||||
"ApproverName": null,
|
||||
"ApprovalDate": "2000-01-01"
|
||||
},
|
||||
{
|
||||
"Release": "B1070",
|
||||
"Region": "NA",
|
||||
"CoreVersionMin": "162",
|
||||
"CoreVersionMax": "166",
|
||||
"MetrologyVersion": "508",
|
||||
"RadioFrequencyMhz": "",
|
||||
"MeterSizes": [
|
||||
"US2"
|
||||
],
|
||||
"ApproverName": null,
|
||||
"ApprovalDate": "2000-01-01"
|
||||
},
|
||||
{
|
||||
"Release": "R106F",
|
||||
"Region": "EMEA",
|
||||
"CoreVersionMin": "162",
|
||||
"CoreVersionMax": "166",
|
||||
"MetrologyVersion": "287",
|
||||
"RadioFrequencyMhz": "868",
|
||||
"MeterSizes": [
|
||||
"DN50"
|
||||
],
|
||||
"ApproverName": null,
|
||||
"ApprovalDate": "2000-01-01"
|
||||
},
|
||||
{
|
||||
"Release": "R106E",
|
||||
"Region": "EMEA",
|
||||
"CoreVersionMin": "162",
|
||||
"CoreVersionMax": "166",
|
||||
"MetrologyVersion": "287",
|
||||
"RadioFrequencyMhz": "433",
|
||||
"MeterSizes": [
|
||||
"DN50"
|
||||
],
|
||||
"ApproverName": null,
|
||||
"ApprovalDate": "2000-01-01"
|
||||
},
|
||||
{
|
||||
"Release": "R106D",
|
||||
"Region": "EMEA",
|
||||
"CoreVersionMin": "162",
|
||||
"CoreVersionMax": "166",
|
||||
"MetrologyVersion": "295",
|
||||
"RadioFrequencyMhz": "868",
|
||||
"MeterSizes": [
|
||||
"DN50"
|
||||
],
|
||||
"ApproverName": null,
|
||||
"ApprovalDate": "2000-01-01"
|
||||
},
|
||||
{
|
||||
"Release": "R106B",
|
||||
"Region": "EMEA",
|
||||
"CoreVersionMin": "162",
|
||||
"CoreVersionMax": "166",
|
||||
"MetrologyVersion": "295",
|
||||
"RadioFrequencyMhz": "433",
|
||||
"MeterSizes": [
|
||||
"DN50"
|
||||
],
|
||||
"ApproverName": null,
|
||||
"ApprovalDate": "2000-01-01"
|
||||
},
|
||||
{
|
||||
"Release": "R1067",
|
||||
"Region": "EMEA",
|
||||
"CoreVersionMin": "162",
|
||||
"CoreVersionMax": "166",
|
||||
"MetrologyVersion": "287",
|
||||
"RadioFrequencyMhz": "868",
|
||||
"MeterSizes": [
|
||||
"DN50"
|
||||
],
|
||||
"ApproverName": null,
|
||||
"ApprovalDate": "2000-01-01"
|
||||
},
|
||||
{
|
||||
"Release": "R1066",
|
||||
"Region": "EMEA",
|
||||
"CoreVersionMin": "162",
|
||||
"CoreVersionMax": "166",
|
||||
"MetrologyVersion": "287",
|
||||
"RadioFrequencyMhz": "433",
|
||||
"MeterSizes": [
|
||||
"DN50"
|
||||
],
|
||||
"ApproverName": null,
|
||||
"ApprovalDate": "2000-01-01"
|
||||
},
|
||||
{
|
||||
"Release": "R1065",
|
||||
"Region": "EMEA",
|
||||
"CoreVersionMin": "162",
|
||||
"CoreVersionMax": "166",
|
||||
"MetrologyVersion": "287",
|
||||
"RadioFrequencyMhz": "868",
|
||||
"MeterSizes": [
|
||||
"DN50"
|
||||
],
|
||||
"ApproverName": null,
|
||||
"ApprovalDate": "2000-01-01"
|
||||
},
|
||||
{
|
||||
"Release": "R1064",
|
||||
"Region": "EMEA",
|
||||
"CoreVersionMin": "162",
|
||||
"CoreVersionMax": "166",
|
||||
"MetrologyVersion": "287",
|
||||
"RadioFrequencyMhz": "433",
|
||||
"MeterSizes": [
|
||||
"DN50"
|
||||
],
|
||||
"ApproverName": null,
|
||||
"ApprovalDate": "2000-01-01"
|
||||
}
|
||||
|
||||
]
|
||||
@ -983,8 +983,8 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateLoader
|
||||
}
|
||||
|
||||
//#if (!DEBUG)
|
||||
if (_fwUpdateReportFiles != null && _fwUpdateReportFiles.Count > 0 ||
|
||||
_fwUpdateAppVersions != null && _fwUpdateAppVersions.Count > 0)
|
||||
if ((_fwUpdateReportFiles != null && _fwUpdateReportFiles.Count > 0) ||
|
||||
(_fwUpdateAppVersions != null && _fwUpdateAppVersions.Count > 0))
|
||||
{
|
||||
UiInvoker.ToolStripLabelInvoker(lblStatusDbConnect, ColorSuccess, Resources.StrUploadingReports);
|
||||
SetStatusProgressBar();
|
||||
@ -1600,9 +1600,9 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateLoader
|
||||
SendDataToFwUpdateSw(basePaths);
|
||||
|
||||
// send CordonelFirmware to FW-Update SW
|
||||
foreach (var fw in _fwUpdateSafe.Updates.CordonelFwPackages)
|
||||
if (_fwUpdateSafe.Updates.CordonelFwPackage != null)
|
||||
{
|
||||
SendDataToFwUpdateSw(fw);
|
||||
SendDataToFwUpdateSw(_fwUpdateSafe.Updates.CordonelFwPackage);
|
||||
}
|
||||
|
||||
// send Cordonel device information
|
||||
@ -1653,7 +1653,7 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateLoader
|
||||
/// </remarks>
|
||||
private void SetStatusProgressBar(Int32 value = 0, Boolean visible = true)
|
||||
{
|
||||
if (ProgressBarStatus == null || !ProgressBarStatus.Visible && !visible) return;
|
||||
if (ProgressBarStatus == null || (!ProgressBarStatus.Visible && !visible)) return;
|
||||
if (ProgressBarStatus.Visible && visible && ProgressBarStatus.Value == value) return;
|
||||
ProgressBarStatus.Value = value;
|
||||
ProgressBarStatus.Visible = visible;
|
||||
|
||||
@ -69,6 +69,7 @@
|
||||
this.tableLayoutPanel8 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.tableLayoutPanel9 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.tableLayoutPanel6 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.btnReleaseDisplay = new System.Windows.Forms.Button();
|
||||
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.tableLayoutPanel10 = new System.Windows.Forms.TableLayoutPanel();
|
||||
@ -137,20 +138,20 @@
|
||||
//
|
||||
// grpApplications
|
||||
//
|
||||
this.grpApplications.Controls.Add(this.gridViewApplic);
|
||||
resources.ApplyResources(this.grpApplications, "grpApplications");
|
||||
this.grpApplications.Controls.Add(this.gridViewApplic);
|
||||
this.grpApplications.Name = "grpApplications";
|
||||
this.grpApplications.TabStop = false;
|
||||
//
|
||||
// gridViewApplic
|
||||
//
|
||||
resources.ApplyResources(this.gridViewApplic, "gridViewApplic");
|
||||
this.gridViewApplic.AllowUserToAddRows = false;
|
||||
this.gridViewApplic.AllowUserToDeleteRows = false;
|
||||
this.gridViewApplic.AllowUserToResizeColumns = false;
|
||||
this.gridViewApplic.AllowUserToResizeRows = false;
|
||||
this.gridViewApplic.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
|
||||
this.gridViewApplic.BackgroundColor = System.Drawing.SystemColors.ControlLight;
|
||||
resources.ApplyResources(this.gridViewApplic, "gridViewApplic");
|
||||
this.gridViewApplic.Name = "gridViewApplic";
|
||||
this.gridViewApplic.ReadOnly = true;
|
||||
this.gridViewApplic.RowHeadersVisible = false;
|
||||
@ -255,9 +256,9 @@
|
||||
//
|
||||
// grpLanguageSelection
|
||||
//
|
||||
resources.ApplyResources(this.grpLanguageSelection, "grpLanguageSelection");
|
||||
this.grpLanguageSelection.Controls.Add(this.radioBtnGermanLanguage);
|
||||
this.grpLanguageSelection.Controls.Add(this.radioBtnEnglishLanguage);
|
||||
resources.ApplyResources(this.grpLanguageSelection, "grpLanguageSelection");
|
||||
this.grpLanguageSelection.Name = "grpLanguageSelection";
|
||||
this.grpLanguageSelection.TabStop = false;
|
||||
//
|
||||
@ -279,8 +280,8 @@
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
resources.ApplyResources(this.pictureBox1, "pictureBox1");
|
||||
this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
@ -303,8 +304,8 @@
|
||||
//
|
||||
// picBoxLogo
|
||||
//
|
||||
this.picBoxLogo.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
resources.ApplyResources(this.picBoxLogo, "picBoxLogo");
|
||||
this.picBoxLogo.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.picBoxLogo.Name = "picBoxLogo";
|
||||
this.picBoxLogo.TabStop = false;
|
||||
//
|
||||
@ -350,9 +351,17 @@
|
||||
// tableLayoutPanel6
|
||||
//
|
||||
resources.ApplyResources(this.tableLayoutPanel6, "tableLayoutPanel6");
|
||||
this.tableLayoutPanel6.Controls.Add(this.btnReleaseDisplay, 0, 3);
|
||||
this.tableLayoutPanel6.Controls.Add(this.btnHistory, 0, 1);
|
||||
this.tableLayoutPanel6.Name = "tableLayoutPanel6";
|
||||
//
|
||||
// btnReleaseDisplay
|
||||
//
|
||||
resources.ApplyResources(this.btnReleaseDisplay, "btnReleaseDisplay");
|
||||
this.btnReleaseDisplay.Name = "btnReleaseDisplay";
|
||||
this.btnReleaseDisplay.UseVisualStyleBackColor = true;
|
||||
this.btnReleaseDisplay.Click += new System.EventHandler(this.BtnReleaseDisplay_Click);
|
||||
//
|
||||
// tableLayoutPanel2
|
||||
//
|
||||
resources.ApplyResources(this.tableLayoutPanel2, "tableLayoutPanel2");
|
||||
@ -388,8 +397,8 @@
|
||||
//
|
||||
// FrmServiceFwUpdateSw
|
||||
//
|
||||
this.AccessibleRole = System.Windows.Forms.AccessibleRole.Sound;
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AccessibleRole = System.Windows.Forms.AccessibleRole.Sound;
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.tableLayoutPanel10);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
@ -468,5 +477,6 @@
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel10;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel6;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button btnReleaseDisplay;
|
||||
}
|
||||
}
|
||||
@ -128,7 +128,7 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
|
||||
private Int32 _licenseCheckTimerMs = 2000;
|
||||
|
||||
private readonly List<CordonelDeviceInfo> _cordonelDeviceInfos = new List<CordonelDeviceInfo>();
|
||||
private readonly List<CordonelFirmware> _cordonelFirmwarePackages = new List<CordonelFirmware>();
|
||||
private CordonelFirmware _cordonelFirmwarePackage = new CordonelFirmware();
|
||||
|
||||
// external update remarks form
|
||||
private FrmHistory _frmHistory = new FrmHistory();
|
||||
@ -533,6 +533,9 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
|
||||
/// <remarks date="2021-Mar-02" author="Thomas Wiedebusch">
|
||||
/// - Software license object at incoming license information.
|
||||
/// </remarks>
|
||||
/// <remarks date="20212-Nov-29" author="Thomas Wiedebusch">
|
||||
/// - Single FW-package.
|
||||
/// </remarks>
|
||||
// ReSharper disable once UnusedMember.Global this cannot be seen here because its
|
||||
// called from externally
|
||||
public Boolean SetDataContainerJson(Int32 dataContainerId, String serialJsonStream)
|
||||
@ -555,7 +558,7 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
|
||||
return true;
|
||||
|
||||
case DataContainerName.UpdatePackage:
|
||||
_cordonelFirmwarePackages.Add(JsonConvert.DeserializeObject<CordonelFirmware>(serialJsonStream));
|
||||
_cordonelFirmwarePackage = JsonConvert.DeserializeObject<CordonelFirmware>(serialJsonStream);
|
||||
return true;
|
||||
|
||||
default:
|
||||
@ -973,7 +976,7 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
|
||||
|
||||
try
|
||||
{
|
||||
if (_cordonelDeviceInfos == null || _cordonelFirmwarePackages == null)
|
||||
if (_cordonelDeviceInfos == null || _cordonelFirmwarePackage == null)
|
||||
{
|
||||
InfoProcessFailed(lblUpdateInformationStatus, Resources.StrPackageFileInvalid);
|
||||
_processState = errorExitState;
|
||||
@ -984,12 +987,12 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
|
||||
{
|
||||
_updatePackage = device.RequiredRelease;
|
||||
|
||||
foreach (var fwPack in _cordonelFirmwarePackages.Where(x =>
|
||||
x.ReleaseNameVersion == device.RequiredRelease))
|
||||
if (_cordonelFirmwarePackage.FwPackageInfo.Name == device.RequiredRelease)
|
||||
{
|
||||
// here the firmware package is valid, encode content
|
||||
var encoding = new ASCIIEncoding();
|
||||
var packageFile = encoding.GetString(fwPack.PackageDescriptionFile.FileContent.ToArray());
|
||||
var packageFile =
|
||||
encoding.GetString(_cordonelFirmwarePackage.PackageDescriptionFile.FileContent.ToArray());
|
||||
|
||||
// setup package description file in FwUpdate class
|
||||
if (!_meterFwUpdate.LoadPackageFileFromText(packageFile))
|
||||
@ -1001,7 +1004,7 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
|
||||
|
||||
var fileApps = new List<FileApplications>();
|
||||
|
||||
foreach (var app in fwPack.BinaryApplicationFiles.Where(f => f.FileName.EndsWith(".bin")))
|
||||
foreach (var app in _cordonelFirmwarePackage.BinaryApplicationFiles.Where(f => f.FileName.EndsWith(".bin")))
|
||||
{
|
||||
var fileApplication = new FileApplications(app.FileName)
|
||||
{
|
||||
@ -1177,6 +1180,9 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
|
||||
/// <remarks date="2021-Apr-15" author="Thomas Wiedebusch">
|
||||
/// - Success message implemented.
|
||||
/// </remarks>
|
||||
/// <remarks date="2022-Dec-05" author="Thomas Wiedebusch">
|
||||
/// - Core revision data type changed from string ti int32?.
|
||||
/// </remarks>
|
||||
private Boolean CoreRevisionValid()
|
||||
{
|
||||
Thread.CurrentThread.CurrentUICulture = _cultureInfo;
|
||||
@ -1193,7 +1199,7 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
|
||||
LogErrorText(Resources.StrCoreRevision);
|
||||
LogErrorText(@"Minimum :" + _meterFwUpdate.CoreRevisionMinimum);
|
||||
LogErrorText(@"Maximum :" + _meterFwUpdate.CoreRevisionMaximum);
|
||||
LogErrorText(@"Cordonel :" + MeterFwUpdate.ExtractVersionFromString(_currentGenesis.CoreRevision));
|
||||
LogErrorText(@"Cordonel :" + GenesisMeter.BuildFwVersionString(_currentGenesis.CoreRevision));
|
||||
InfoProcessFailed(lblCordonelUpdateCapability, Resources.StrCordonelUpdateCapabilityCoreFailed);
|
||||
_processState = ProcessState.Error;
|
||||
return false;
|
||||
@ -1243,14 +1249,14 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
|
||||
Thread.CurrentThread.CurrentCulture = _cultureInfo;
|
||||
|
||||
// check the update capability
|
||||
var regionRadio = "?";
|
||||
var region = "?";
|
||||
if (!string.IsNullOrEmpty(_updatePackage))
|
||||
{
|
||||
regionRadio =
|
||||
region =
|
||||
_updatePackage.Contains("_NA_") ? "NA" :
|
||||
_updatePackage.Contains("_EMEA_") ? "EMEA" :
|
||||
_updatePackage.Contains("_China_") ? "China" : "*";
|
||||
if (_currentGenesis.RegionRadio.Contains(regionRadio))
|
||||
if (_currentGenesis.Region.Contains(region))
|
||||
{
|
||||
InfoProcessSuccess(null, Resources.StrCordonelUpdateCapabilityRegionRadioSucceeded);
|
||||
return true;
|
||||
@ -1259,8 +1265,8 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
|
||||
// set information of required and detected regions radio, check failed!
|
||||
LogText(StrSeparator);
|
||||
LogErrorText(Resources.StrRegionRadio);
|
||||
LogErrorText(Resources.StrFwPackageRegionRadio + " " + regionRadio);
|
||||
LogErrorText(@"Cordonel: " + _currentGenesis.RegionRadio);
|
||||
LogErrorText(Resources.StrFwPackageRegionRadio + " " + region);
|
||||
LogErrorText(@"Cordonel: " + _currentGenesis.Region);
|
||||
InfoProcessFailed(lblCordonelUpdateCapability, Resources.StrCordonelUpdateCapabilityRegionRadioFailed);
|
||||
_processState = ProcessState.Error;
|
||||
return false;
|
||||
@ -1399,6 +1405,16 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Release Cordonel display from"Idle" to normal operation
|
||||
/// </summary>
|
||||
/// <remarks date="2022-Nov-25" author="Thomas Wiedebusch">
|
||||
/// - Initial
|
||||
/// </remarks>
|
||||
private void BtnReleaseDisplay_Click(Object sender, EventArgs e)
|
||||
{
|
||||
ReleaseDisplay();
|
||||
}
|
||||
|
||||
#endregion --------------------------------------- User Interaction -------------------------------------------
|
||||
|
||||
@ -1451,19 +1467,23 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
|
||||
/// <remarks date="2021-Apr-26" author="Thomas Wiedebusch">
|
||||
/// - Added region and radio.
|
||||
/// </remarks>
|
||||
/// <remarks date="2022-Dec-05" author="Thomas Wiedebusch">
|
||||
/// - Core revision data type changed from string ti int32?.
|
||||
/// </remarks>
|
||||
private void LogInstalledMeterFw()
|
||||
{
|
||||
if (_currentGenesis == null)
|
||||
return;
|
||||
LogText(StrSeparator);
|
||||
LogText($"PCB ID: {_currentGenesis.PcbId}");
|
||||
LogText($"{Resources.StrMessageSystemCoreRevision} {_currentGenesis.CoreRevision}");
|
||||
LogText($"{Resources.StrMessageSystemRegionRadio} {_currentGenesis.RegionRadio}");
|
||||
LogText($"{Resources.StrMessageSystemCoreRevision} {GenesisMeter.BuildFwVersionString(_currentGenesis.CoreRevision)}");
|
||||
LogText($"{Resources.StrMessageSystemRegion} {_currentGenesis.Region}");
|
||||
LogText($"{Resources.StrMessageSystemRadio} {_currentGenesis.RadioFrequencyMhz}");
|
||||
LogText(Resources.StrMessageInstalledApp);
|
||||
var appList = new List<CordonelAppVersion>();
|
||||
|
||||
// the core has the -1 as identifier and is not updateable
|
||||
var coreVersion = new CordonelAppVersion(-1, _currentGenesis.CoreRevision, false);
|
||||
var coreVersion = new CordonelAppVersion(-1, GenesisMeter.BuildFwVersionString(_currentGenesis.CoreRevision), false);
|
||||
appList.Add(coreVersion);
|
||||
|
||||
foreach (var app in _currentGenesis.MeterAppListVersion)
|
||||
@ -1694,6 +1714,7 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
|
||||
{
|
||||
UiInvoker.ControlEnableInvoker(grpLanguageSelection, true);
|
||||
UiInvoker.ControlEnableInvoker(btnStop, false);
|
||||
UiInvoker.ControlEnableInvoker(btnReleaseDisplay, true);
|
||||
UiInvoker.ControlEnableInvoker(btnPortScan, true);
|
||||
UiInvoker.ControlEnableInvoker(btnConnect, true);
|
||||
// set focus
|
||||
@ -1710,6 +1731,7 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
|
||||
{
|
||||
UiInvoker.ControlEnableInvoker(grpLanguageSelection, true);
|
||||
UiInvoker.ControlEnableInvoker(btnStop, false);
|
||||
UiInvoker.ControlEnableInvoker(btnReleaseDisplay, false);
|
||||
UiInvoker.ControlEnableInvoker(btnPortScan, true);
|
||||
UiInvoker.ControlEnableInvoker(btnUpdateFw, false);
|
||||
// set focus
|
||||
@ -1729,6 +1751,7 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
|
||||
UiInvoker.ControlEnableInvoker(btnUpdateFw, false);
|
||||
UiInvoker.ControlEnableInvoker(btnPortScan, false);
|
||||
UiInvoker.ControlEnableInvoker(btnStop, false);
|
||||
UiInvoker.ControlEnableInvoker(btnReleaseDisplay, false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1744,6 +1767,7 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
|
||||
UiInvoker.ControlEnableInvoker(btnConnect, false);
|
||||
UiInvoker.ControlEnableInvoker(btnUpdateFw, false);
|
||||
UiInvoker.ControlEnableInvoker(btnPortScan, false);
|
||||
UiInvoker.ControlEnableInvoker(btnReleaseDisplay, false);
|
||||
// set focus
|
||||
UiInvoker.ControlEnableInvoker(btnStop, true);
|
||||
}
|
||||
@ -2609,14 +2633,16 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
|
||||
// if authentication succeeded, the cordonel port detection must have succeeded in advance,
|
||||
// this information might get lost on Connect() without previous port scan.
|
||||
InfoProcessSuccess(lblCordonelDetection, Resources.StrCordonelDetectSucceeded);
|
||||
InfoProcessSuccess(lblCordonelAuthentication,
|
||||
_finalLoginAfterUpdate ? Resources.StrPasswordFileValid : Resources.StrCordonelAuthenticationSucceeded);
|
||||
InfoProcessSuccess(lblCordonelAuthentication, _finalLoginAfterUpdate
|
||||
? Resources.StrPasswordFileValid
|
||||
: Resources.StrCordonelAuthenticationSucceeded);
|
||||
|
||||
// use here direct text assignment to avoid x or v before label
|
||||
UiInvoker.ControlInvoker(lblConnectPcb, ColorSuccess,
|
||||
Resources.StrPartPcbConnected + @" " + _currentGenesis.PcbId);
|
||||
UiInvoker.ControlInvoker(lblCoreRevision, ColorDefault,
|
||||
Resources.StrCoreRevision + @" " + _currentGenesis.CoreRevision);
|
||||
Resources.StrCoreRevision + @" " +
|
||||
$"{GenesisMeter.BuildFwVersionString(_currentGenesis.CoreRevision)}");
|
||||
// avoid report again on final login after update
|
||||
if (!_finalLoginAfterUpdate && BuildReportFiles())
|
||||
LogInstalledMeterFw();
|
||||
@ -3514,6 +3540,7 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
|
||||
}
|
||||
|
||||
#endregion --------------------------------------- Language ---------------------------------------------------
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -152,10 +152,10 @@
|
||||
<value>Anwendungen</value>
|
||||
</data>
|
||||
<data name="lblUpdateTime.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>429, 0</value>
|
||||
<value>425, 0</value>
|
||||
</data>
|
||||
<data name="label9.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>353, 0</value>
|
||||
<value>349, 0</value>
|
||||
</data>
|
||||
<data name="label9.Text" xml:space="preserve">
|
||||
<value>Zeitmessung [min:s]:</value>
|
||||
@ -251,6 +251,9 @@
|
||||
<data name="btnHistory.Text" xml:space="preserve">
|
||||
<value>Verlauf</value>
|
||||
</data>
|
||||
<data name="grpLanguageSelection.Text" xml:space="preserve">
|
||||
<value>Sprachauswahl</value>
|
||||
</data>
|
||||
<data name="radioBtnGermanLanguage.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>65, 17</value>
|
||||
</data>
|
||||
@ -263,9 +266,6 @@
|
||||
<data name="radioBtnEnglishLanguage.Text" xml:space="preserve">
|
||||
<value>Englisch</value>
|
||||
</data>
|
||||
<data name="grpLanguageSelection.Text" xml:space="preserve">
|
||||
<value>Sprachauswahl</value>
|
||||
</data>
|
||||
<data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
/9j/4AAQSkZJRgABAQEAYABgAAD/4QC8RXhpZgAATU0AKgAAAAgABAESAAMAAAABAAEAAAE7AAIAAAAH
|
||||
@ -462,6 +462,9 @@
|
||||
<data name="picBoxLogo.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>46</value>
|
||||
</data>
|
||||
<data name="btnReleaseDisplay.Text" xml:space="preserve">
|
||||
<value>Anzeige Normal</value>
|
||||
</data>
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAICAQAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAAA
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -548,11 +548,20 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Region and radio frequency[MHz]:.
|
||||
/// Looks up a localized string similar to Radio frequency[MHz]:.
|
||||
/// </summary>
|
||||
internal static string StrMessageSystemRegionRadio {
|
||||
internal static string StrMessageSystemRadio {
|
||||
get {
|
||||
return ResourceManager.GetString("StrMessageSystemRegionRadio", resourceCulture);
|
||||
return ResourceManager.GetString("StrMessageSystemRadio", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Region:.
|
||||
/// </summary>
|
||||
internal static string StrMessageSystemRegion {
|
||||
get {
|
||||
return ResourceManager.GetString("StrMessageSystemRegion", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -259,8 +259,11 @@
|
||||
<data name="StrMessageSystemCoreRevision" xml:space="preserve">
|
||||
<value>Systemkern-Version:</value>
|
||||
</data>
|
||||
<data name="StrMessageSystemRegionRadio" xml:space="preserve">
|
||||
<value>Region und Funkfrequenz[MHz]:</value>
|
||||
<data name="StrMessageSystemRegion" xml:space="preserve">
|
||||
<value>Region:</value>
|
||||
</data>
|
||||
<data name="StrMessageSystemRadio" xml:space="preserve">
|
||||
<value>Funkfrequenz[MHz]:</value>
|
||||
</data>
|
||||
<data name="StrMessageWindowFailed" xml:space="preserve">
|
||||
<value>FEHLER</value>
|
||||
@ -508,4 +511,4 @@
|
||||
<data name="StrDisplayReleased" xml:space="preserve">
|
||||
<value>Display freigegeben für Standardoperation</value>
|
||||
</data>
|
||||
</root>
|
||||
</root>
|
||||
@ -259,8 +259,11 @@
|
||||
<data name="StrMessageSystemCoreRevision" xml:space="preserve">
|
||||
<value>System Core Revision:</value>
|
||||
</data>
|
||||
<data name="StrMessageSystemRegionRadio" xml:space="preserve">
|
||||
<value>Region and radio frequency[MHz]:</value>
|
||||
<data name="StrMessageSystemRegion" xml:space="preserve">
|
||||
<value>Region:</value>
|
||||
</data>
|
||||
<data name="StrMessageSystemRadio" xml:space="preserve">
|
||||
<value>Radio frequency[MHz]:</value>
|
||||
</data>
|
||||
<data name="StrMessageWindowFailed" xml:space="preserve">
|
||||
<value>FAILED</value>
|
||||
|
||||
@ -268,6 +268,10 @@
|
||||
<Project>{D0C859D9-D55E-4E85-AC50-0FF31B1CE50D}</Project>
|
||||
<Name>Logic.ProductionToProductMapper</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Common\Logic\ProductionOrderCore\ProductionOrderCore.csproj">
|
||||
<Project>{6D2777BB-7A88-466D-A49B-3266F9BF0160}</Project>
|
||||
<Name>ProductionOrderCore</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Common\SoftwareAccessHelper\SoftwareAccessHelper.csproj">
|
||||
<Project>{a33e3c6d-eaae-4a20-a0ee-f9e6922fd029}</Project>
|
||||
<Name>SoftwareAccessHelper</Name>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user