ReSharper: -Logic.ProductionToProductMapper
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
<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:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=DN/@EntryIndexedValue">DN</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=FW/@EntryIndexedValue">FW</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=LUT/@EntryIndexedValue">LUT</s:String>
|
||||
<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/=Battey/@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>
|
||||
@@ -11,7 +15,9 @@
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=CONFIGEXCHANGE/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Consts/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Cordonel/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Cordonels/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=dispached/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=DNMAX/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Drabesch/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Drahbesch/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=FFFF/@EntryIndexedValue">True</s:Boolean>
|
||||
@@ -21,6 +27,7 @@
|
||||
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=GENSISFLOW/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Irda/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=KITRON/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=licence/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Metrology/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=METROLOGYASST/@EntryIndexedValue">True</s:Boolean>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/AutoDetectedNamingRules/=PublicFields/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/AutoDetectedNamingRules/=StaticReadonly/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/AutoDetectedNamingRules/=TypesAndNamespaces/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=EnumMember/@EntryIndexedValue"><Policy Inspect="False" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||
<s:String x:Key="/Default/Environment/AssemblyExplorer/XmlDocument/@EntryValue"><AssemblyExplorer>
|
||||
<Assembly Path="D:\Projekte\SENSUS_tfs_workspaces\WorkBenchV2\Main\Common\Ui\IrdaFunctionalTestApp\bin\Debug\Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.dll" />
|
||||
</AssemblyExplorer></s:String>
|
||||
|
||||
@@ -465,7 +465,7 @@ namespace CordonelAssemblyLine.Model
|
||||
sm = PickingStateMachine.MappingError;
|
||||
}
|
||||
List<string> MappingText = new List<string>();
|
||||
if (retInt.HasFlag(MarriagePossibleEnum.NotPossibleDueAlredayMatch))
|
||||
if (retInt.HasFlag(MarriagePossibleEnum.NotPossibleDueToAlreadyMarried))
|
||||
{
|
||||
MappingText.Add("Pcb ist schon mit dieser Seriennummer verbunden.Display aktualisiert");
|
||||
using (var Batch = new MeterBatch())
|
||||
@@ -508,7 +508,7 @@ namespace CordonelAssemblyLine.Model
|
||||
}
|
||||
}
|
||||
}
|
||||
if (retInt.HasFlag(MarriagePossibleEnum.NotPossibleDuePcblocked))
|
||||
if (retInt.HasFlag(MarriagePossibleEnum.NotPossibleDuePcbLocked))
|
||||
{
|
||||
MappingText.Add("Pcb ist schon mit einer anderen Seriennummer verbunden.");
|
||||
}
|
||||
|
||||
@@ -692,7 +692,7 @@ namespace CordonelPreadjustmentUi
|
||||
{
|
||||
throw new ApplicationException("Detect failed");
|
||||
}
|
||||
if (settings.MeterSize != MeterSize.NAN)
|
||||
if (settings.MeterSize != MeterSize.NA)
|
||||
{
|
||||
btn_ZeroFlowCal_Start_Click(null, EventArgs.Empty);
|
||||
}
|
||||
@@ -1770,7 +1770,7 @@ namespace CordonelPreadjustmentUi
|
||||
var ts = DateTimeOffset.UtcNow - totalStartOffset.Value;
|
||||
DebugMessage($"offset duration= {ts.TotalSeconds}");
|
||||
|
||||
MeterStateCtls.ForEach(f => f.Meter?.calibrationResult?.AddAditonlaLog($"offset duration=", $"{ts.TotalSeconds}S"));
|
||||
MeterStateCtls.ForEach(f => f.Meter?.calibrationResult?.AddAdditionalLog($"offset duration=", $"{ts.TotalSeconds}S"));
|
||||
|
||||
totalStartOffset = null;
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ namespace CordonelPreadjustmentUi.Processes.Actions
|
||||
if (meanVal == 0)
|
||||
{
|
||||
pp.DebugMessage($"Mean value is zero at {meterctl.Meter.Slot}; PATH{(Path + 1).ToString(pp.Setting.Culture)}; Value = {Math.Round(meanVal, 4).ToString("000.0000", pp.Setting.Culture)}", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
meterctl.Meter.calibrationResult.AddAditonlaLog($"" +
|
||||
meterctl.Meter.calibrationResult.AddAdditionalLog($"" +
|
||||
$"PATH {Path + 1}", Math.Round(meanVal, 4).ToString("000.0000", pp.Setting.Culture));
|
||||
|
||||
if (CheckAbort(false, meterctl)) { return false; }
|
||||
@@ -169,7 +169,7 @@ namespace CordonelPreadjustmentUi.Processes.Actions
|
||||
|
||||
pp.DebugMessage($"Mean value at {meterctl.Meter.Slot}; PATH{(Path + 1).ToString(pp.Setting.Culture)}; Value = {Math.Round(meanVal, 4).ToString("000.0000", pp.Setting.Culture)}", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
|
||||
meterctl.Meter.calibrationResult.AddAditonlaLog($"Amp. Test Mean value PATH {Path + 1}", $"at {FirstHitLevelPercentage}={Math.Round(meanVal, 4).ToString("000.0000", pp.Setting.Culture)}");
|
||||
meterctl.Meter.calibrationResult.AddAdditionalLog($"Amp. Test Mean value PATH {Path + 1}", $"at {FirstHitLevelPercentage}={Math.Round(meanVal, 4).ToString("000.0000", pp.Setting.Culture)}");
|
||||
var cTofAvgMeanTotal = TofAvgMeanTotal.Get(Path).ToList();
|
||||
|
||||
cTofAvgMeanTotal.Add(meanVal);
|
||||
@@ -223,12 +223,12 @@ namespace CordonelPreadjustmentUi.Processes.Actions
|
||||
|
||||
if (!r)
|
||||
{
|
||||
meterctl.Meter.calibrationResult.AddAditonlaLog($"Amp. Test OptimalPoint PATH {Path + 1}", OptimalPoint.Get(Path).ToString(pp.Setting.Culture));
|
||||
meterctl.Meter.calibrationResult.AddAdditionalLog($"Amp. Test OptimalPoint PATH {Path + 1}", OptimalPoint.Get(Path).ToString(pp.Setting.Culture));
|
||||
pp.DebugMessage($"Optimal point calculation successful PATH{Path + 1}; Value = {OptimalPoint.Get(Path).ToString(pp.Setting.Culture)}", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
}
|
||||
else
|
||||
{
|
||||
meterctl.Meter.calibrationResult.AddAditonlaLog($"Amp. Test OptimalPoint PATH {Path + 1}", "NaN");
|
||||
meterctl.Meter.calibrationResult.AddAdditionalLog($"Amp. Test OptimalPoint PATH {Path + 1}", "NaN");
|
||||
pp.DebugMessage($"Optimal point calculation failed, PATH{Path + 1}", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
if (CheckAbort(!r, meterctl)) { return !r; }
|
||||
}
|
||||
|
||||
@@ -193,8 +193,8 @@ namespace CordonelPreadjustmentUi.Processes.Actions
|
||||
|
||||
pp.DebugMessage($"Average positive amplitude, PATH{(Path + 1)}: {Math.Round(amplitudeValuesMeanUp.Get(Path), 2).ToString("000.00")}mV", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
pp.DebugMessage($"Average negative amplitude, PATH{(Path + 1)}: {Math.Round(amplitudeValuesMeanDown.Get(Path), 2).ToString("000.00")}mV", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
meterctl.Meter.calibrationResult.AddAditonlaLog($"Offset Average positive amplitude PATH { (Path + 1)}", $"{ Math.Round(amplitudeValuesMeanUp.Get(Path), 2).ToString("000.00")}mV");
|
||||
meterctl.Meter.calibrationResult.AddAditonlaLog($"Offset Average negative amplitude PATH { (Path + 1)}", $"{ Math.Round(amplitudeValuesMeanDown.Get(Path), 2).ToString("000.00")}mV");
|
||||
meterctl.Meter.calibrationResult.AddAdditionalLog($"Offset Average positive amplitude PATH { (Path + 1)}", $"{ Math.Round(amplitudeValuesMeanUp.Get(Path), 2).ToString("000.00")}mV");
|
||||
meterctl.Meter.calibrationResult.AddAdditionalLog($"Offset Average negative amplitude PATH { (Path + 1)}", $"{ Math.Round(amplitudeValuesMeanDown.Get(Path), 2).ToString("000.00")}mV");
|
||||
|
||||
if ((amplitudeValuesMeanUp.Get(Path) > pp.Setting.OffsetTestUpperVoltageLimitMV) ||
|
||||
(amplitudeValuesMeanUp.Get(Path) < pp.Setting.OffsetTestLowerVoltageLimitMV) ||
|
||||
@@ -206,8 +206,8 @@ namespace CordonelPreadjustmentUi.Processes.Actions
|
||||
}
|
||||
|
||||
pp.DebugMessage($"Average delta time of flight valuePATH{(Path + 1)}: Raw{DeltaTimeOfFlightAverage.Get(Path)} -> in picoseconds= { Math.Round((DeltaTimeOfFlightAverage.Get(Path) / (Math.Pow(2, 38) * Math.Pow(10, 12))), 2).ToString("000.00")}", meterctl.Meter.Slot, "APP", meterctl.Meter.PcbId);
|
||||
meterctl.Meter.calibrationResult.AddAditonlaLog($"Offset Average delta time of flight value PATH { (Path + 1)} RAW ", $"{DeltaTimeOfFlightAverage.Get(Path)}");
|
||||
meterctl.Meter.calibrationResult.AddAditonlaLog($"Offset Average delta time of flight value PATH { (Path + 1)} picoseconds ", $"{Math.Round((DeltaTimeOfFlightAverage.Get(Path) / (Math.Pow(2, 38) * Math.Pow(10, 12))), 2).ToString("000.00")}");
|
||||
meterctl.Meter.calibrationResult.AddAdditionalLog($"Offset Average delta time of flight value PATH { (Path + 1)} RAW ", $"{DeltaTimeOfFlightAverage.Get(Path)}");
|
||||
meterctl.Meter.calibrationResult.AddAdditionalLog($"Offset Average delta time of flight value PATH { (Path + 1)} picoseconds ", $"{Math.Round((DeltaTimeOfFlightAverage.Get(Path) / (Math.Pow(2, 38) * Math.Pow(10, 12))), 2).ToString("000.00")}");
|
||||
|
||||
if ((DeltaTimeOfFlightAverage.Get(Path) > pp.Setting.OffsetTestOffsetLimitPS) ||
|
||||
(DeltaTimeOfFlightAverage.Get(Path) < -pp.Setting.OffsetTestOffsetLimitPS))
|
||||
|
||||
@@ -93,8 +93,8 @@ namespace CordonelPreadjustmentUi.Processes.Actions
|
||||
}
|
||||
|
||||
}
|
||||
meterctl.Meter.calibrationResult.AddAditonlaLog($"OffsetTestNumberOfLines", pp.Setting.OffsetTestNumberOfLines.ToString());
|
||||
meterctl.Meter.calibrationResult.AddAditonlaLog($"Samplerate", pp.Setting.Samplerate.ToString());
|
||||
meterctl.Meter.calibrationResult.AddAdditionalLog($"OffsetTestNumberOfLines", pp.Setting.OffsetTestNumberOfLines.ToString());
|
||||
meterctl.Meter.calibrationResult.AddAdditionalLog($"Samplerate", pp.Setting.Samplerate.ToString());
|
||||
|
||||
|
||||
Ok = WriteRegisterSafe(meterctl.Meter, "Samplerate", Register.Genesisflow.SampleRate, pp.Setting.Samplerate);
|
||||
|
||||
@@ -150,8 +150,8 @@ namespace CordonelPreadjustmentUi.Processes.Actions
|
||||
pp.StatusLabel = PredefinedMessages.WaitUntilRegisterWriteFinished(pp.Setting.Culture);
|
||||
Ok = WriteRegisterSafe(putTempIntoMeter.Meter, "Temperature calibration", Register.Genesisflow.ToFTempCalibrate, TempToRegister, false);
|
||||
if (CheckAbort(Ok, putTempIntoMeter)) { return Ok; }
|
||||
putTempIntoMeter.Meter.calibrationResult.AddAditonlaLog($"Temperature calibration Register", TempToRegister.ToString());
|
||||
putTempIntoMeter.Meter.calibrationResult.AddAditonlaLog($"Temperature calibration Origin", originTemp.ToString());
|
||||
putTempIntoMeter.Meter.calibrationResult.AddAdditionalLog($"Temperature calibration Register", TempToRegister.ToString());
|
||||
putTempIntoMeter.Meter.calibrationResult.AddAdditionalLog($"Temperature calibration Origin", originTemp.ToString());
|
||||
|
||||
#endregion
|
||||
#region Wait for some seconds
|
||||
|
||||
@@ -3,84 +3,167 @@ using System.Collections.Generic;
|
||||
|
||||
namespace Logic.ProductionToProductMapper.Cordonel
|
||||
{
|
||||
/// <summary>
|
||||
/// Container for calibration results
|
||||
/// </summary>
|
||||
public class CalibrationResult
|
||||
{
|
||||
private UInt32 calFactor1;
|
||||
private UInt32 calFactor2;
|
||||
private UInt32 calFactor3;
|
||||
private Int32 zeroOffset1;
|
||||
private Int32 zeroOffset2;
|
||||
private Int32 zeroOffset3;
|
||||
private UInt16 firstHitUpdatePeriod;
|
||||
private UInt16 firstHitShift;
|
||||
private UInt16 firstHitPercent1;
|
||||
private UInt16 firstHitPercent2;
|
||||
private UInt16 firstHitPercent3;
|
||||
private Int32 toFTempOffset1;
|
||||
private Int32 toFTempOffset2;
|
||||
private Int32 toFTempOffset3;
|
||||
private UInt16 meterSize;
|
||||
/// <summary>
|
||||
/// The meter size code.
|
||||
/// </summary>
|
||||
public UInt16 MeterSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Calibration factor of path 1.
|
||||
/// </summary>
|
||||
public UInt32 CalFactor1 { get; set; }
|
||||
|
||||
public UInt16 MeterSize { get => meterSize; set => meterSize = value; }
|
||||
public UInt32 CalFactor1 { get => calFactor1; set => calFactor1 = value; }
|
||||
public UInt32 CalFactor2 { get => calFactor2; set => calFactor2 = value; }
|
||||
public UInt32 CalFactor3 { get => calFactor3; set => calFactor3 = value; }
|
||||
public Int32 ZeroOffset1 { get => zeroOffset1; set => zeroOffset1 = value; }
|
||||
public Int32 ZeroOffset2 { get => zeroOffset2; set => zeroOffset2 = value; }
|
||||
public Int32 ZeroOffset3 { get => zeroOffset3; set => zeroOffset3 = value; }
|
||||
/// <summary>
|
||||
/// Calibration factor of path 2.
|
||||
/// </summary>
|
||||
public UInt32 CalFactor2 { get; set; }
|
||||
|
||||
public UInt16 FirstHitUpdatePeriod { get => firstHitUpdatePeriod; set => firstHitUpdatePeriod = value; }
|
||||
/// <summary>
|
||||
/// Calibration factor of path 3.
|
||||
/// </summary>
|
||||
public UInt32 CalFactor3 { get; set; }
|
||||
|
||||
public UInt16 FirstHitShift { get => firstHitShift; set => firstHitShift = value; }
|
||||
public UInt16 FirstHitPercent1 { get => firstHitPercent1; set => firstHitPercent1 = value; }
|
||||
public UInt16 FirstHitPercent2 { get => firstHitPercent2; set => firstHitPercent2 = value; }
|
||||
public UInt16 FirstHitPercent3 { get => firstHitPercent3; set => firstHitPercent3 = value; }
|
||||
public Int32 ToFTempOffset1 { get => toFTempOffset1; set => toFTempOffset1 = value; }
|
||||
public Int32 ToFTempOffset2 { get => toFTempOffset2; set => toFTempOffset2 = value; }
|
||||
public Int32 ToFTempOffset3 { get => toFTempOffset3; set => toFTempOffset3 = value; }
|
||||
/// <summary>
|
||||
/// Zero flow offset value of path 1.
|
||||
/// </summary>
|
||||
public Int32 ZeroOffset1 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Zero flow offset value of path 2.
|
||||
/// </summary>
|
||||
public Int32 ZeroOffset2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Zero flow offset value of path 3.
|
||||
/// </summary>
|
||||
public Int32 ZeroOffset3 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// First hit level update period.
|
||||
/// </summary>
|
||||
public UInt16 FirstHitUpdatePeriod { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// First hit level shift value.
|
||||
/// </summary>
|
||||
public UInt16 FirstHitShift { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// First hit level percentage of path 1.
|
||||
/// </summary>
|
||||
public UInt16 FirstHitPercent1 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// First hit level percentage of path 2.
|
||||
/// </summary>
|
||||
public UInt16 FirstHitPercent2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// First hit level percentage of path 3.
|
||||
/// </summary>
|
||||
public UInt16 FirstHitPercent3 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Time of flight temperature offset of path 1.
|
||||
/// </summary>
|
||||
public Int32 ToFTempOffset1 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Time of flight temperature offset of path 2.
|
||||
/// </summary>
|
||||
public Int32 ToFTempOffset2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Time of flight temperature offset of path 3.
|
||||
/// </summary>
|
||||
public Int32 ToFTempOffset3 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Time and date of this record.
|
||||
/// </summary>
|
||||
public DateTimeOffset Date { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Data base entry.
|
||||
/// </summary>
|
||||
public Int32 DbId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Dictionary of additional logging information.
|
||||
/// </summary>
|
||||
public Dictionary<String, String> AdditionalLogInfos;
|
||||
|
||||
/// <summary>
|
||||
/// ctor.
|
||||
/// </summary>
|
||||
public CalibrationResult()
|
||||
{
|
||||
AdditionalLogInfos = new Dictionary<String, String>();
|
||||
}
|
||||
public CalibrationResult(UInt32 roCalFactor1, UInt32 roCalFactor2, UInt32 roCalFactor3, Int32 roZeroOffset1, Int32 roZeroOffset2, Int32 roZeroOffset3, UInt16 roFirstHitUpdatePeriod, UInt16 roFirstHitShift, UInt16 roFirstHitPercent1, UInt16 roFirstHitPercent2, UInt16 roFirstHitPercent3, Int32 roToFTempOffset1, Int32 roToFTempOffset2, Int32 roToFTempOffset3, UInt16 roMeterSize)
|
||||
|
||||
/// <summary>
|
||||
/// Calibration results
|
||||
/// </summary>
|
||||
/// <param name="roCalFactor1"></param>
|
||||
/// <param name="roCalFactor2"></param>
|
||||
/// <param name="roCalFactor3"></param>
|
||||
/// <param name="roZeroOffset1"></param>
|
||||
/// <param name="roZeroOffset2"></param>
|
||||
/// <param name="roZeroOffset3"></param>
|
||||
/// <param name="roFirstHitUpdatePeriod"></param>
|
||||
/// <param name="roFirstHitShift"></param>
|
||||
/// <param name="roFirstHitPercent1"></param>
|
||||
/// <param name="roFirstHitPercent2"></param>
|
||||
/// <param name="roFirstHitPercent3"></param>
|
||||
/// <param name="roToFTempOffset1"></param>
|
||||
/// <param name="roToFTempOffset2"></param>
|
||||
/// <param name="roToFTempOffset3"></param>
|
||||
/// <param name="roMeterSize"></param>
|
||||
public CalibrationResult(UInt32 roCalFactor1, UInt32 roCalFactor2, UInt32 roCalFactor3,
|
||||
Int32 roZeroOffset1, Int32 roZeroOffset2, Int32 roZeroOffset3,
|
||||
UInt16 roFirstHitUpdatePeriod, UInt16 roFirstHitShift,
|
||||
UInt16 roFirstHitPercent1, UInt16 roFirstHitPercent2, UInt16 roFirstHitPercent3,
|
||||
Int32 roToFTempOffset1, Int32 roToFTempOffset2, Int32 roToFTempOffset3,
|
||||
UInt16 roMeterSize)
|
||||
{
|
||||
CalFactor1 = roCalFactor1;
|
||||
CalFactor2 = roCalFactor2;
|
||||
CalFactor3 = roCalFactor3;
|
||||
ZeroOffset1 = roToFTempOffset1;
|
||||
ZeroOffset2 = roToFTempOffset1;
|
||||
ZeroOffset3 = roToFTempOffset1;
|
||||
ZeroOffset1 = roZeroOffset1;
|
||||
ZeroOffset2 = roZeroOffset2;
|
||||
ZeroOffset3 = roZeroOffset3;
|
||||
FirstHitUpdatePeriod = roFirstHitUpdatePeriod;
|
||||
FirstHitShift = roFirstHitShift;
|
||||
FirstHitPercent1 = roFirstHitPercent1;
|
||||
FirstHitPercent2 = roFirstHitPercent2;
|
||||
FirstHitPercent3 = roFirstHitPercent3;
|
||||
ToFTempOffset1 = roToFTempOffset1;
|
||||
ToFTempOffset2 = roToFTempOffset1;
|
||||
ToFTempOffset3 = roToFTempOffset1;
|
||||
ToFTempOffset2 = roToFTempOffset2;
|
||||
ToFTempOffset3 = roToFTempOffset3;
|
||||
MeterSize = roMeterSize;
|
||||
AdditionalLogInfos = new Dictionary<String, String>();
|
||||
}
|
||||
|
||||
public void AddAditonlaLog(String key, String value)
|
||||
/// <summary>
|
||||
/// Additional logging information
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="value"></param>
|
||||
public void AddAdditionalLog(String key, String value)
|
||||
{
|
||||
if (AdditionalLogInfos.ContainsKey(key))
|
||||
{
|
||||
AdditionalLogInfos[key] = $"{ AdditionalLogInfos[key]} {System.Environment.NewLine} {value}";
|
||||
AdditionalLogInfos[key] = $"{ AdditionalLogInfos[key]} {Environment.NewLine} {value}";
|
||||
}
|
||||
else
|
||||
{
|
||||
AdditionalLogInfos.Add(key, value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,27 +1,70 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
|
||||
namespace Logic.ProductionToProductMapper.Cordonel
|
||||
{
|
||||
/// <summary>
|
||||
/// Container for look-up-table (LUT) information, file assignment and content
|
||||
/// </summary>
|
||||
public class CordonelMetrologyLut
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int FileId { get; set; }
|
||||
public string FileName { get; set; }
|
||||
/// <summary>
|
||||
/// Data base primary key.
|
||||
/// </summary>
|
||||
public Int32 Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// File identification number of real LUT.
|
||||
/// </summary>
|
||||
public Int32 FileId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// File name of LUT.
|
||||
/// </summary>
|
||||
public String FileName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Meter size code for LUT.
|
||||
/// </summary>
|
||||
public MeterSize MeterSize { get; set; }
|
||||
public string Region { get; set; }
|
||||
public int FileCrc { get; set; }
|
||||
public bool CurrentVerionForProd { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Region for LUT.
|
||||
/// </summary>
|
||||
public String Region { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CRC of LUT.
|
||||
/// </summary>
|
||||
public Int32 FileCrc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Marker of version for production, this is the actual selected version for this
|
||||
/// meter size and region.
|
||||
/// </summary>
|
||||
public Boolean CurrentVersionForProd { get; set; }
|
||||
|
||||
public int DataLength { get; set; }
|
||||
/// <summary>
|
||||
/// Data length of LUT.
|
||||
/// </summary>
|
||||
public Int32 DataLength { get; set; }
|
||||
|
||||
public string Version { get; set; }
|
||||
public byte[] FileContent { get; set; }
|
||||
/// <summary>
|
||||
/// Version of LUT.
|
||||
/// </summary>
|
||||
public String Version { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Binary file content of LUT.
|
||||
/// </summary>
|
||||
public Byte[] FileContent { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
/// <summary>
|
||||
/// Return the file name as string.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override String ToString()
|
||||
{
|
||||
return FileName;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Logic.ProductionToProductMapper.Cordonel
|
||||
{
|
||||
/// <summary>
|
||||
/// Enumeration of marriage status.
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum MarriagePossibleEnum
|
||||
{
|
||||
/// <summary>
|
||||
/// Unmarried.
|
||||
/// </summary>
|
||||
None = 1 << 0,
|
||||
|
||||
/// <summary>
|
||||
/// Marriage is possible.
|
||||
/// </summary>
|
||||
Possible = 1 << 1,
|
||||
NotPossibleDueAlredayMatch = 1 << 2,
|
||||
|
||||
/// <summary>
|
||||
/// Denied as it is already married.
|
||||
/// </summary>
|
||||
NotPossibleDueToAlreadyMarried = 1 << 2,
|
||||
|
||||
/// <summary>
|
||||
/// Denied as serial number is already in use.
|
||||
/// </summary>
|
||||
NotPossibleDueSerialNumberBlocked = 1 << 3,
|
||||
NotPossibleDuePcblocked = 1 << 4,
|
||||
|
||||
/// <summary>
|
||||
/// Denied as PCB is already in use.
|
||||
/// </summary>
|
||||
NotPossibleDuePcbLocked = 1 << 4,
|
||||
|
||||
/// <summary>
|
||||
/// Denied as PCB and order number mismatch.
|
||||
/// </summary>
|
||||
PcbNotMatchingOrder = 1 << 5,
|
||||
|
||||
/// <summary>
|
||||
/// Error during marriage.
|
||||
/// </summary>
|
||||
Error = 1 << 6,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,34 +1,57 @@
|
||||
// ReSharper disable InconsistentNaming
|
||||
namespace Logic.ProductionToProductMapper.Cordonel
|
||||
namespace Logic.ProductionToProductMapper.Cordonel
|
||||
{
|
||||
/// <summary>
|
||||
/// Enumeration of meter sizes named as flow tube inner diameter,
|
||||
/// DNx is for the metric system with the unit millimeters mm and
|
||||
/// USx is for the imperial system with the unit inches inc or ".
|
||||
///
|
||||
/// ATTENTION:
|
||||
/// These values are sorted and duplicated in the data base, be
|
||||
/// aware not to change the series!
|
||||
///
|
||||
///
|
||||
/// </summary>
|
||||
public enum MeterSize
|
||||
{
|
||||
DN40 = 0,
|
||||
/// <summary>
|
||||
/// Inner tube is 40 mm metric
|
||||
/// </summary>
|
||||
DN40 = 0,
|
||||
DN50 = 1,
|
||||
DN65 = 2,
|
||||
DN80 = 3,
|
||||
DN100 = 4,
|
||||
DN125 = 5,
|
||||
DN150 = 6,
|
||||
DN200 = 7,
|
||||
DN250 = 8,
|
||||
DN300 = 9,
|
||||
|
||||
/// <summary>
|
||||
/// Inner tube is 1 1/2" imperial
|
||||
/// </summary>
|
||||
US1_5 = 10,
|
||||
|
||||
/// <summary>
|
||||
/// Inner tube is 2" imperial
|
||||
/// </summary>
|
||||
US2 = 11,
|
||||
US3 = 12,
|
||||
US4 = 13,
|
||||
US6 = 14,
|
||||
US8 = 15,
|
||||
US10 = 16,
|
||||
US12 = 17,
|
||||
|
||||
/* The diameters of all other sizes are taken from the meter size below: */
|
||||
DN50, /* e.g. 40mm flowtube */
|
||||
DN65, /* 50mm flowtube etc. */
|
||||
DN80,
|
||||
DN100,
|
||||
DN125,
|
||||
DN150,
|
||||
DN200,
|
||||
DN250,
|
||||
DN300,
|
||||
/// <summary>
|
||||
/// Undefined maximum value
|
||||
/// </summary>
|
||||
DNMAX,
|
||||
|
||||
/* The following are all US meter sizes in inches */
|
||||
US1_5,
|
||||
US2,
|
||||
US3,
|
||||
US4,
|
||||
US6,
|
||||
US8,
|
||||
US10,
|
||||
US12,
|
||||
|
||||
DNMAX, /* Used for range checking */
|
||||
|
||||
NAN
|
||||
/// <summary>
|
||||
/// Not assigned as list delimiter
|
||||
/// </summary>
|
||||
NA
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
||||
|
||||
namespace Logic.ProductionToProductMapper.Cordonel
|
||||
{
|
||||
/// <summary>
|
||||
/// Picking check and process state.
|
||||
/// </summary>
|
||||
public class PickingCompareItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Ctor
|
||||
/// </summary>
|
||||
/// <param name="meterSize"></param>
|
||||
/// <param name="frequencyIndicator"></param>
|
||||
/// <param name="pressurePresent"></param>
|
||||
/// <param name="checkAppsIdVersion"></param>
|
||||
public PickingCompareItem(UInt32 meterSize, UInt32 frequencyIndicator, Boolean pressurePresent, Dictionary<UInt32, UInt32> checkAppsIdVersion)
|
||||
{
|
||||
MeterSize = meterSize;
|
||||
@@ -15,33 +24,73 @@ namespace Logic.ProductionToProductMapper.Cordonel
|
||||
CheckAppsIdVersion = checkAppsIdVersion;
|
||||
}
|
||||
|
||||
public UInt32 MeterSize { get; private set; }
|
||||
public UInt32 FrequencyIndicator { get; private set; }
|
||||
public Boolean PressurePresent { get; private set; }
|
||||
/// <summary>
|
||||
/// Meter size number.
|
||||
/// </summary>
|
||||
public UInt32 MeterSize { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Frequency
|
||||
/// </summary>
|
||||
public UInt32 FrequencyIndicator { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Pressure sensor attached.
|
||||
/// </summary>
|
||||
public Boolean PressurePresent { get; }
|
||||
|
||||
public Boolean PulseModule { get; private set; }
|
||||
/// <summary>
|
||||
/// Pulse module assembled.
|
||||
/// </summary>
|
||||
public Boolean PulseModule { get; set; }
|
||||
|
||||
public Dictionary<UInt32, UInt32> CheckAppsIdVersion { get; private set; }
|
||||
/// <summary>
|
||||
/// Applications installed.
|
||||
/// </summary>
|
||||
public Dictionary<UInt32, UInt32> CheckAppsIdVersion { get; }
|
||||
|
||||
|
||||
public int StrLutFileId { get; private set; }
|
||||
/// <summary>
|
||||
/// LUT file identification.
|
||||
/// </summary>
|
||||
public Int32 StrLutFileId { get; set; }
|
||||
|
||||
public UInt16 Version { get; private set; }
|
||||
public UInt16 FileCrc { get; private set; }
|
||||
|
||||
//order overview
|
||||
public UInt32 OrderCount { get; private set; }
|
||||
public UInt32 OrderAssignedCount { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// LUT version.
|
||||
/// </summary>
|
||||
public UInt16 LutVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// LUT file CRC.
|
||||
/// </summary>
|
||||
public UInt16 LutFileCrc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Order count of Cordonels.
|
||||
/// </summary>
|
||||
public UInt32 OrderCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Assigned Cordonels to order number.
|
||||
/// </summary>
|
||||
public UInt32 OrderAssignedCount { get; set; }
|
||||
}
|
||||
|
||||
public class OrderOverViewCordonelWithPicking
|
||||
{
|
||||
/// <summary>
|
||||
/// Overview of Cordonels on assembly line tests
|
||||
/// /// </summary>
|
||||
public OrderOverViewCordonel OrderOverViewCordonel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public PickingCompareItem PickingCompareItem { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// KITRON production data
|
||||
/// </summary>
|
||||
public DateTime KitronProductionDate { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Logic.ProductionToProductMapper.Cordonel
|
||||
{
|
||||
public class RegisterHisory
|
||||
{
|
||||
public RegisterHisory(String pcbId, Byte[] address, Byte[] value, DateTimeOffset date)
|
||||
{
|
||||
PcbId = pcbId;
|
||||
Address = address;
|
||||
Value = value;
|
||||
Date = date;
|
||||
}
|
||||
|
||||
public String PcbId { get; set; }
|
||||
public Byte[] Address { get; set; }
|
||||
public Byte[] Value { get; set; }
|
||||
public DateTimeOffset Date { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
|
||||
namespace Logic.ProductionToProductMapper.Cordonel
|
||||
{
|
||||
/// <summary>
|
||||
/// Register history monitor.
|
||||
/// </summary>
|
||||
public class RegisterHistory
|
||||
{
|
||||
/// <summary>
|
||||
/// Ctor
|
||||
/// </summary>
|
||||
/// <param name="pcbId"></param>
|
||||
/// <param name="address"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="date"></param>
|
||||
public RegisterHistory(String pcbId, Byte[] address, Byte[] value, DateTimeOffset date)
|
||||
{
|
||||
PcbId = pcbId;
|
||||
Address = address;
|
||||
Value = value;
|
||||
Date = date;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// PCB identification.
|
||||
/// </summary>
|
||||
public String PcbId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Register address.
|
||||
/// </summary>
|
||||
public Byte[] Address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Register value.
|
||||
/// </summary>
|
||||
public Byte[] Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Time and date of this register value.
|
||||
/// </summary>
|
||||
public DateTimeOffset Date { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -2,17 +2,58 @@
|
||||
|
||||
namespace Logic.ProductionToProductMapper.Cordonel
|
||||
{
|
||||
/// <summary>
|
||||
/// Container for skipping several checks in the production steps being able to
|
||||
/// have special editions, which do not follow the general rules.
|
||||
/// </summary>
|
||||
public class SkipProcess
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int OrderNumber { get; set; }
|
||||
public int PcbId { get; set; }
|
||||
public bool SkipRadioParameters { get; set; }
|
||||
public bool SkipFWCheck { get; set; }
|
||||
public bool SkipBatteyCheck { get; set; }
|
||||
public bool SkipLUT { get; set; }
|
||||
/// <summary>
|
||||
/// Data base primary key
|
||||
/// </summary>
|
||||
public Int32 Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Order number
|
||||
/// </summary>
|
||||
public Int32 OrderNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Unique identification number of PCB
|
||||
/// </summary>
|
||||
public Int32 PcbId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Skip radio parameter check
|
||||
/// </summary>
|
||||
public Boolean SkipRadioParameters { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Skip FW check. Normally the FW will be assigned to the latest released version
|
||||
/// and taken from the data base. Here special versions can be used for FW tests.
|
||||
/// </summary>
|
||||
public Boolean SkipFWCheck { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Skip the battery check, as the drained load may exceed the defined level. For
|
||||
/// special devices, e.g. customer samples, which do not need the life time of
|
||||
/// 20 years, this can be set.
|
||||
/// </summary>
|
||||
public Boolean SkipBatteyCheck { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Skip the look-up-table installation as this device may be used for development.
|
||||
/// </summary>
|
||||
public Boolean SkipLUT { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Date of assignment of these skipping-rules.
|
||||
/// </summary>
|
||||
public DateTime Date { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Author of assignment of these skipping-rules.
|
||||
/// </summary>
|
||||
public String Name { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace Logic.ProductionToProductMapper.Files.Fw
|
||||
{
|
||||
/// <summary>
|
||||
/// Clustered file container
|
||||
/// </summary>
|
||||
public class ClusteredFile
|
||||
{
|
||||
public Boolean IsSelected { get; set; }
|
||||
@@ -12,9 +15,13 @@ namespace Logic.ProductionToProductMapper.Files.Fw
|
||||
public Boolean FileIsForDeveloperOnly { get; set; }
|
||||
public Int32 FileCategoryID { get; set; }
|
||||
public Boolean FileIsDeleted { get; set; }
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public Int32? CordonelFwFile_id { get; set; }
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public Int32? CordonelFwFile_FileClusterStoreId { get; set; }
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public Int32? CordonelFwFile_Dn { get; set; }
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public Int32? CordonelFwFile_Type { get; set; }
|
||||
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
<Compile Include="Cordonel\MarriagePossibleEnum.cs" />
|
||||
<Compile Include="Cordonel\MeterSizeConverter.cs" />
|
||||
<Compile Include="Cordonel\PickingCompareItem.cs" />
|
||||
<Compile Include="Cordonel\RegisterHisory.cs" />
|
||||
<Compile Include="Cordonel\RegisterHistory.cs" />
|
||||
<Compile Include="Cordonel\SkipProcess.cs" />
|
||||
<Compile Include="Files\Fw\ClusteredFile.cs" />
|
||||
<Compile Include="Files\Fw\FilePart.cs" />
|
||||
|
||||
@@ -1,15 +1,36 @@
|
||||
namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
|
||||
using System;
|
||||
|
||||
namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
|
||||
{
|
||||
/// <summary>
|
||||
/// Order overview of assembly line tests to collect the states of the tested devices.
|
||||
/// </summary>
|
||||
public class OrderOverViewCordonel
|
||||
{
|
||||
|
||||
|
||||
public int OrderNumber { get; set; }
|
||||
public int Count { get; set; }
|
||||
public int AssignedPicking { get; set; }
|
||||
public int PressureTested { get; set; }
|
||||
public int HeliumTested { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Order number
|
||||
/// </summary>
|
||||
public Int32 OrderNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Number of devices assigned to this order number
|
||||
/// </summary>
|
||||
public Int32 Count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Number of assigned devices.
|
||||
/// </summary>
|
||||
public Int32 AssignedPicking { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///Number of pressure tested devices
|
||||
/// </summary>
|
||||
public Int32 PressureTested { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Number of helium tested devices
|
||||
/// </summary>
|
||||
public Int32 HeliumTested { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
sb.AppendLine($" , '{crc}' ");
|
||||
sb.AppendLine($" , '{Metersize}' ");
|
||||
sb.AppendLine($" , '{Region}' ");
|
||||
sb.AppendLine($" , 0 "); // [CurrentVerionForProd]
|
||||
sb.AppendLine($" , 0 "); // [CurrentVersionForProd]
|
||||
|
||||
sb.AppendLine($" select @@IDENTITY ");
|
||||
var retDT = dataacces.ExecuteQuery(sb.ToString());
|
||||
@@ -269,7 +269,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
sb.AppendLine($" ,[FileCrc] ");
|
||||
sb.AppendLine($" ,[MeterSize] ");
|
||||
sb.AppendLine($" ,[Region] ");
|
||||
sb.AppendLine($" ,[CurrentVerionForProd] ");
|
||||
sb.AppendLine($" ,[CurrentVersionForProd] ");
|
||||
sb.AppendLine($" ,files.[FileName] ");
|
||||
sb.AppendLine($" ,files.FileContent ");
|
||||
sb.AppendLine($" FROM [Auftrag].[dbo].[Cordonel_Lut] lut ");
|
||||
@@ -287,7 +287,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
}
|
||||
if (ForProd.HasValue)
|
||||
{
|
||||
sb.AppendLine($" and CurrentVerionForProd ={(ForProd.Value? "1" : "0") } ");
|
||||
sb.AppendLine($" and CurrentVersionForProd ={(ForProd.Value? "1" : "0") } ");
|
||||
}
|
||||
|
||||
var retDT = dataacces.ExecuteQuery(sb.ToString());
|
||||
|
||||
@@ -183,7 +183,7 @@ namespace Service.MeterProcessState.Controllers
|
||||
var dtCalibrationResultsLogInfo = dataacces.ExecuteQuery(sb.ToString());
|
||||
foreach (var item in dtCalibrationResultsLogInfo.Select())
|
||||
{
|
||||
ret.First(f => f.DbId == (int)item["CalibrationResultsID"])?.AddAditonlaLog((string)item["LogKey"], (string)item["LogText"]);
|
||||
ret.First(f => f.DbId == (int)item["CalibrationResultsID"])?.AddAdditionalLog((string)item["LogKey"], (string)item["LogText"]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -347,7 +347,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
|
||||
if (dr["AlreadyMarried"].ToString() == "1")
|
||||
{
|
||||
ret = ret | MarriagePossibleEnum.NotPossibleDueAlredayMatch;
|
||||
ret = ret | MarriagePossibleEnum.NotPossibleDueToAlreadyMarried;
|
||||
}
|
||||
|
||||
if (dr["SerialNumberBlocked"].ToString() == "1")
|
||||
@@ -356,7 +356,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
}
|
||||
if (dr["PcbBlocked"].ToString() == "1")
|
||||
{
|
||||
ret = ret | MarriagePossibleEnum.NotPossibleDuePcblocked;
|
||||
ret = ret | MarriagePossibleEnum.NotPossibleDuePcbLocked;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Service.MeterProcessState.Controllers
|
||||
sb.AppendLine(" and (@Adress is null or [Address] = @Adress ) ");
|
||||
sb.AppendLine(" order by [Address] desc, [date] desc ");
|
||||
|
||||
var ret = new List<RegisterHisory>();
|
||||
var ret = new List<RegisterHistory>();
|
||||
|
||||
return Request.CreateResponse(HttpStatusCode.OK, await Task.Run(() =>
|
||||
{
|
||||
@@ -82,7 +82,7 @@ namespace Service.MeterProcessState.Controllers
|
||||
{
|
||||
value = null;
|
||||
}
|
||||
ret.Add(new RegisterHisory((string)row["PcbId"], adressP, value, (DateTime)row["date"]));
|
||||
ret.Add(new RegisterHistory((string)row["PcbId"], adressP, value, (DateTime)row["date"]));
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
|
||||
+2
-2
@@ -303,8 +303,8 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
//
|
||||
// currentVerionForProdDataGridViewCheckBoxColumn
|
||||
//
|
||||
this.currentVerionForProdDataGridViewCheckBoxColumn.DataPropertyName = "CurrentVerionForProd";
|
||||
this.currentVerionForProdDataGridViewCheckBoxColumn.HeaderText = "CurrentVerionForProd";
|
||||
this.currentVerionForProdDataGridViewCheckBoxColumn.DataPropertyName = "CurrentVersionForProd";
|
||||
this.currentVerionForProdDataGridViewCheckBoxColumn.HeaderText = "CurrentVersionForProd";
|
||||
this.currentVerionForProdDataGridViewCheckBoxColumn.Name = "currentVerionForProdDataGridViewCheckBoxColumn";
|
||||
this.currentVerionForProdDataGridViewCheckBoxColumn.ReadOnly = true;
|
||||
//
|
||||
|
||||
@@ -729,7 +729,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
|
||||
foreach (var item in a)
|
||||
{
|
||||
if (!Prod || item.CurrentVerionForProd)
|
||||
if (!Prod || item.CurrentVersionForProd)
|
||||
{
|
||||
cbxDbLuts.Items.Add(item);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
//
|
||||
// registerHisoryBindingSource
|
||||
//
|
||||
this.registerHisoryBindingSource.DataSource = typeof(RegisterHisory);
|
||||
this.registerHisoryBindingSource.DataSource = typeof(RegisterHistory);
|
||||
|
||||
var configFilePath = "configuration.json";
|
||||
if (!new FileInfo(configFilePath).Exists)
|
||||
@@ -78,7 +78,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
//
|
||||
// registerHisoryBindingSource
|
||||
//
|
||||
this.registerHisoryBindingSource.DataSource = typeof(RegisterHisory);
|
||||
this.registerHisoryBindingSource.DataSource = typeof(RegisterHistory);
|
||||
pcbID = _pcbID;
|
||||
registerSelection = new Dictionary<String, Byte[]>();
|
||||
registerSelection.Add(_registerDefinition.GetIdent(), _registerDefinition.RegisterAddress);
|
||||
@@ -102,7 +102,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
}
|
||||
var url = ServiceUrls.RegisterWatchServiceUrl() + $"GetRegisterHistory?PcbID={txtPcbId.Text}&Address={BitConverter.ToString(adress)}";
|
||||
|
||||
var dt = JsonConvert.DeserializeObject<List<RegisterHisory>>(LocalWebRequest.GetRequest(url));
|
||||
var dt = JsonConvert.DeserializeObject<List<RegisterHistory>>(LocalWebRequest.GetRequest(url));
|
||||
|
||||
dgvHist.DataSource = dt;
|
||||
|
||||
|
||||
@@ -2090,13 +2090,13 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
|
||||
var url = ServiceUrls.RegisterWatchServiceUrl() + $"GetRegisterHistory?PcbID={_currentGenesis.PcbId}&Address=01-09";
|
||||
|
||||
var dt = JsonConvert.DeserializeObject<List<RegisterHisory>>(LocalWebRequest.GetRequest(url));
|
||||
var dt = JsonConvert.DeserializeObject<List<RegisterHistory>>(LocalWebRequest.GetRequest(url));
|
||||
|
||||
var lastCharge = dt.OrderByDescending(d => d.Date).First().Value;
|
||||
|
||||
url = ServiceUrls.RegisterWatchServiceUrl() + $"GetRegisterHistory?PcbID={_currentGenesis.PcbId}&Address=01-0A";
|
||||
|
||||
dt = JsonConvert.DeserializeObject<List<RegisterHisory>>(LocalWebRequest.GetRequest(url));
|
||||
dt = JsonConvert.DeserializeObject<List<RegisterHistory>>(LocalWebRequest.GetRequest(url));
|
||||
|
||||
var lastSeconds = dt.OrderByDescending(d => d.Date).First().Value;
|
||||
|
||||
|
||||
@@ -447,7 +447,7 @@ namespace XylemCommonUiLegacyGenCtl
|
||||
{
|
||||
if (item.Value.Enabled)
|
||||
{
|
||||
if (item.Value.Metersize != MeterSize.NAN && biggestMeterSize < item.Value.Metersize)
|
||||
if (item.Value.Metersize != MeterSize.NA && biggestMeterSize < item.Value.Metersize)
|
||||
{
|
||||
biggestMeterSize = item.Value.Metersize;
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace XylemCommonUiLegacyGenCtl
|
||||
public string CalibrationRun { get; set; }
|
||||
public int LastTestBechState { get; set; }
|
||||
|
||||
public MeterSize Metersize { get; set; } = MeterSize.NAN;
|
||||
public MeterSize Metersize { get; set; } = MeterSize.NA;
|
||||
public ctlEasyMeterRdy(int v)
|
||||
{
|
||||
SetSlot(v);
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace XylemCommonUiLegacyGenCtl
|
||||
public string CalibrationRun { get; set; }
|
||||
public int LastTestBechState { get; set; }
|
||||
|
||||
public MeterSize Metersize { get; set; } = MeterSize.NAN;
|
||||
public MeterSize Metersize { get; set; } = MeterSize.NA;
|
||||
public ctlMeterReady()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
@@ -1802,7 +1802,7 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
|
||||
}
|
||||
#endregion --------------------------------------- Tools ------------------------------------------------------
|
||||
|
||||
#region ------------------------------------------ Common Prozess Routines ------------------------------------
|
||||
#region ------------------------------------------ Common Process Routines ------------------------------------
|
||||
/// <summary>
|
||||
/// Common routine to convert objects to process states.
|
||||
/// Objects are sorted:
|
||||
@@ -2082,7 +2082,7 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
|
||||
var progress = (Int32)e.ActualProcessPercent;
|
||||
UiInvoker.ProgressBarInvoker(barActualProgressUpdate, progress > 100 ? 100 : progress);
|
||||
}
|
||||
#endregion --------------------------------------- Common Prozess Routines ------------------------------------
|
||||
#endregion --------------------------------------- Common Process Routines ------------------------------------
|
||||
|
||||
#region ------------------------------------------ Reboot -----------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user