ReSharper: -FwUpdate*
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=accu/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Applic/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Approver/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=binfile/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=BUGFIX/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Calib/@EntryIndexedValue">True</s:Boolean>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Xylem.Common.Hardware.WaterMeter.WaterMeterRegisters
|
||||
{
|
||||
@@ -8,10 +7,6 @@ namespace Xylem.Common.Hardware.WaterMeter.WaterMeterRegisters
|
||||
/// </summary>
|
||||
public class MeterTypeRegisters
|
||||
{
|
||||
/// <summary>
|
||||
/// registers list for this meter
|
||||
/// </summary>
|
||||
//public readonly List<IRegister> Registers;
|
||||
/// <summary>
|
||||
/// meter type
|
||||
/// </summary>
|
||||
|
||||
@@ -726,8 +726,8 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
public async Task<HttpResponseMessage> GetRecoveryFile(int PcbID, int? RadioFrq, string Region, string FlexnetVersion)
|
||||
{
|
||||
|
||||
var file = new RecoverySettings() { PcbID = PcbID, RadioFrequencyMhz = RadioFrq, Region = Region, Release = FlexnetVersion };
|
||||
file.RecoveryRegisters = new List<ServiceFwUpdate.Common.FwUpdateSafe.RecoveryRegisterItem>();
|
||||
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 } });
|
||||
|
||||
|
||||
|
||||
@@ -182,7 +182,8 @@ namespace Xylem.ServiceFwUpdate.Common.FwUpdateDb
|
||||
$"&Build={swLicense.Build}&ValidTo={swLicense.ValidTo:yyyy-MM-ddTHH:mm:ss}" +
|
||||
$"&Description={swLicense.Description ?? "null"}&ProgramNameIsUnique={swLicense.ProgramNameIsUnique}";
|
||||
var requestResponse = LocalWebRequest.PostRequestAsyncAndGetContent(url, 1200);
|
||||
if (string.IsNullOrEmpty(requestResponse) && !JsonConvert.DeserializeObject<Boolean>(requestResponse))
|
||||
if (requestResponse != null && string.IsNullOrEmpty(requestResponse) &&
|
||||
!JsonConvert.DeserializeObject<Boolean>(requestResponse))
|
||||
{
|
||||
DbIsConnected = false;
|
||||
return false;
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Xylem.ServiceFwUpdate.Common.FwUpdateSafe
|
||||
{
|
||||
|
||||
@@ -1,36 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Xylem.ServiceFwUpdate.Common.FwUpdateSafe.MeterRecovery;
|
||||
|
||||
namespace Xylem.ServiceFwUpdate.Common.FwUpdateSafe
|
||||
namespace Xylem.ServiceFwUpdate.Common.FwUpdateSafe.MeterRecovery
|
||||
{
|
||||
/// <summary>
|
||||
/// Recovery of registers in the field
|
||||
/// </summary>
|
||||
public class RecoveryRegisterItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Register name, use the latest configuration.json to make sure that the adress will be correct
|
||||
/// </summary>
|
||||
public string RegisterIdent { get; set; }
|
||||
public String RegisterIdent { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Content to write
|
||||
/// </summary>
|
||||
public byte[] WriteValue { get; set; }
|
||||
public Byte[] WriteValue { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// check if the wirtten 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 bool IsCiritcal { get; set; }
|
||||
public Boolean IsCiritcal { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Xylem.ServiceFwUpdate.Common.FwUpdateSafe.MeterRecovery
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class RecoverySettings
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Null if check in not necessary if is an number check it agianst the pcbid from meter
|
||||
/// </summary>
|
||||
public int? PcbID { get; set; }
|
||||
public Int32? PcbId { get; set; }
|
||||
/// <summary>
|
||||
/// Null if check in not necessary if is an number check it agianst the radio FRQ
|
||||
/// </summary>
|
||||
public int? RadioFrequencyMhz { get; set; }
|
||||
public Int32? RadioFrequencyMhz { get; set; }
|
||||
/// <summary>
|
||||
/// Null till meter handels regions
|
||||
/// Null till meter handles regions
|
||||
/// </summary>
|
||||
public string Region { get; set; } = null;
|
||||
public String Region { get; set; } = null;
|
||||
/// <summary>
|
||||
/// Null till meter handels regions
|
||||
/// Null till meter handles regions
|
||||
/// </summary>
|
||||
public string Release { get; set; }
|
||||
public String Release { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// User name
|
||||
/// </summary>
|
||||
public string ApproverName { get; set; }
|
||||
public String ApproverName { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -42,9 +42,13 @@ namespace Xylem.ServiceFwUpdate.Common.FwUpdateSafe.MeterRecovery
|
||||
/// </summary>
|
||||
public List<RecoveryRegisterItem> RecoveryRegisters { get; set; }
|
||||
|
||||
public string GenerateFileName()
|
||||
/// <summary>
|
||||
/// File name for this recovery register set
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public String GenerateFileName()
|
||||
{
|
||||
return $"{PcbID}_{RadioFrequencyMhz}_{Region}_{Release}.config";
|
||||
return $"{PcbId}_{RadioFrequencyMhz}_{Region}_{Release}.config";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,21 @@
|
||||
namespace Xylem.ServiceFwUpdate.Common.FwUpdateSafe.MeterRecovery
|
||||
{
|
||||
/// <summary>
|
||||
/// Recovery rules
|
||||
/// </summary>
|
||||
public enum RegisterRecoveryAccess
|
||||
{
|
||||
/// <summary>
|
||||
/// Set this register always
|
||||
/// </summary>
|
||||
SetAlways,
|
||||
/// <summary>
|
||||
/// Set register if it has the default value
|
||||
/// </summary>
|
||||
SetIfDefault,
|
||||
/// <summary>
|
||||
/// Set the register if it is zero
|
||||
/// </summary>
|
||||
SetIfZero
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Xylem.ServiceFwUpdate.Common.FwUpdateSafe
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user