Initial values: CalibDate = Constants.MinDate, CalibValidDate = Constants.MaxDate, MaxDate = new DateTime(2039, 12, 31);

This commit is contained in:
Milan Hanajik 2021-08-18 08:52:34 +02:00
parent 5905d0850b
commit 848f9dff9d
17 changed files with 204 additions and 303 deletions

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2018-2020 Sensus Slovensko a.s.
/// Copyright (c) 2018-2021 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@ -38,24 +38,9 @@ namespace TBF.BenchControl.DataContainers.BenchInfo.iPerl
public int MaxTestIndex; /// (MaxPruefindex % 100) value when to reject water meters completely if they are NOK
/// Calibration info serialized parameters displayed in Metrology tab page
string calibCertificateNr;
DateTime calibDate;
DateTime calibValidDate;
public string CalibCertificateNr
{
get { return calibCertificateNr; }
set { calibCertificateNr = value; }
}
public DateTime CalibDate
{
get { return calibDate; }
set { calibDate = value; }
}
public DateTime CalibValidDate
{
get { return calibValidDate; }
set { calibValidDate = value; }
}
public string CalibCertificateNr { get; set; }
public DateTime CalibDate { get; set; }
public DateTime CalibValidDate { get; set; }
/// Private parameterless constructor invoked by all other (public) constructors
@ -76,20 +61,21 @@ namespace TBF.BenchControl.DataContainers.BenchInfo.iPerl
{
TestBenchName = "1";
TestBenchId = 1;
Address1 = string.Empty;
Address2 = string.Empty;
Address3 = string.Empty;
Address4 = string.Empty;
Address5 = string.Empty;
ApprovalId = string.Empty;
ApprovalDate = string.Empty;
ApprovedBy = string.Empty;
RemoteDBUse = RemoteDBUse.LocalDBOnly;
Side = Side.Left;
MaxTestIndex = 4;
CalibCertificateNr = string.Empty;
CalibDate = TBF.UI.Constants.MinDate;
CalibValidDate = TBF.UI.Constants.MaxDate;
}
string[] paramNames = new string[]

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2019-2020 Sensus Slovensko a.s.
/// Copyright (c) 2019-2021 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@ -25,24 +25,9 @@ namespace TBF.BenchControl.DataContainers.Buoyancy
public double Buoyancy;
/// Calibration info serialized parameters displayed in Metrology tab page
string calibCertificateNr;
DateTime calibDate;
DateTime calibValidDate;
public string CalibCertificateNr
{
get { return calibCertificateNr; }
set { calibCertificateNr = value; }
}
public DateTime CalibDate
{
get { return calibDate; }
set { calibDate = value; }
}
public DateTime CalibValidDate
{
get { return calibValidDate; }
set { calibValidDate = value; }
}
public string CalibCertificateNr { get; set; }
public DateTime CalibDate { get; set; }
public DateTime CalibValidDate { get; set; }
/// Private parameterless constructor invoked by all other (public) constructors
@ -62,6 +47,10 @@ namespace TBF.BenchControl.DataContainers.Buoyancy
public void InitializeAll()
{
Buoyancy = 1.00103;
CalibCertificateNr = string.Empty;
CalibDate = TBF.UI.Constants.MinDate;
CalibValidDate = TBF.UI.Constants.MaxDate;
}
string[] paramNames = new string[]

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2019-2020 Sensus Slovensko a.s.
/// Copyright (c) 2019-2021 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@ -26,24 +26,9 @@ namespace TBF.BenchControl.DataContainers.Density
public double AtTemperature;
/// Calibration info serialized parameters displayed in Metrology tab page
string calibCertificateNr;
DateTime calibDate;
DateTime calibValidDate;
public string CalibCertificateNr
{
get { return calibCertificateNr; }
set { calibCertificateNr = value; }
}
public DateTime CalibDate
{
get { return calibDate; }
set { calibDate = value; }
}
public DateTime CalibValidDate
{
get { return calibValidDate; }
set { calibValidDate = value; }
}
public string CalibCertificateNr { get; set; }
public DateTime CalibDate { get; set; }
public DateTime CalibValidDate { get; set; }
/// Private parameterless constructor invoked by all other (public) constructors
@ -64,6 +49,10 @@ namespace TBF.BenchControl.DataContainers.Density
{
RealDensity = 998.2008; /// kg/m3
AtTemperature = 20.0; /// °C
CalibCertificateNr = string.Empty;
CalibDate = TBF.UI.Constants.MinDate;
CalibValidDate = TBF.UI.Constants.MaxDate;
}
string[] paramNames = new string[]

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2020 Sensus Slovensko a.s.
/// Copyright (c) 2020-2021 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@ -20,24 +20,9 @@ namespace TBF.BenchControl.DataContainers.Evaporation
public IComponentCfgCtrl GetControl() { return new EvaporationCfgCtrl(); }
/// Calibration info serialized parameters displayed in Metrology tab page
string calibCertificateNr;
DateTime calibDate;
DateTime calibValidDate;
public string CalibCertificateNr
{
get { return calibCertificateNr; }
set { calibCertificateNr = value; }
}
public DateTime CalibDate
{
get { return calibDate; }
set { calibDate = value; }
}
public DateTime CalibValidDate
{
get { return calibValidDate; }
set { calibValidDate = value; }
}
public string CalibCertificateNr { get; set; }
public DateTime CalibDate { get; set; }
public DateTime CalibValidDate { get; set; }
/// Private parameterless constructor invoked by all other (public) constructors
@ -49,7 +34,18 @@ namespace TBF.BenchControl.DataContainers.Evaporation
Name = name;
Factory = factory;
ParentName = string.Empty;
InitializeAll();
}
public string ComponentName { get { return Name; } }
public void InitializeAll()
{
CalibCertificateNr = string.Empty;
CalibDate = TBF.UI.Constants.MinDate;
CalibValidDate = TBF.UI.Constants.MaxDate;
}
public string ToString(int i)
{
return Name;

View File

@ -30,45 +30,31 @@ namespace TBF.BenchControl.Elde.Diverter
public int DfltSwithTimeEndMs; /// Default diverter transition time 'end' or 'to sink' in ms
/// Calibration info serialized parameters displayed in Metrology tab page
string calibCertificateNr;
DateTime calibDate;
DateTime calibValidDate;
public string CalibCertificateNr
{
get { return calibCertificateNr; }
set { calibCertificateNr = value; }
}
public DateTime CalibDate
{
get { return calibDate; }
set { calibDate = value; }
}
public DateTime CalibValidDate
{
get { return calibValidDate; }
set { calibValidDate = value; }
}
public string CalibCertificateNr { get; set; }
public DateTime CalibDate { get; set; }
public DateTime CalibValidDate { get; set; }
/// Private parameterless constructor invoked by all other (public) constructors
DiverterCfg()
{
Name = "Div";
ParentName = "CB";
BitPosition = 0;
AdcNr = 5; /// Div1: AdcNr=5 , Div2: AdcNr=6
AdcValueToSink = 100;
AdcValueToTank = 500;
StartingLevel = 50;
ThresholdLo = 10;
ThresholdHi = 90;
calibCertificateNr = string.Empty;
}
DiverterCfg() { }
public DiverterCfg(IComponentFactory factory)
: this()
{
this.Factory = factory;
Factory = factory;
Name = "Div";
ParentName = "CB";
BitPosition = 0;
AdcNr = 5; /// Div1: AdcNr=5 , Div2: AdcNr=6
AdcValueToSink = 100;
AdcValueToTank = 500;
StartingLevel = 50;
ThresholdLo = 10;
ThresholdHi = 90;
CalibCertificateNr = string.Empty;
CalibDate = TBF.UI.Constants.MinDate;
CalibValidDate = TBF.UI.Constants.MaxDate;
}
public string ToString(int i)

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2013-2018 Sensus Slovensko a.s.
/// Copyright (c) 2013-2021 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@ -224,18 +224,40 @@ namespace TBF.BenchControl.Elde.FlowMeter
/// Private parameterless constructor invoked by all other (public) constructors
FlowMeterCfg()
{
Name = "FlowMeter";
FlowMeterCfg() { }
public FlowMeterCfg(string name, IComponentFactory factory)
: this()
{
Factory = factory;
Name = name;
Initialize();
}
void Initialize()
{
ParentName = "CB";
Idx1 = 1;
NominalFlow = 1;
}
public FlowMeterCfg(IComponentFactory factory)
: this()
{
this.Factory = factory;
CalibCertificateNr = string.Empty;
CalibCertificate1 = string.Empty;
CalibCertificate2 = string.Empty;
CalibCertificate3 = string.Empty;
CalibCertificate4 = string.Empty;
CalibCertificate5 = string.Empty;
CalibDate = TBF.UI.Constants.MinDate;
CalibDate1 = TBF.UI.Constants.MinDate;
CalibDate2 = TBF.UI.Constants.MinDate;
CalibDate3 = TBF.UI.Constants.MinDate;
CalibDate4 = TBF.UI.Constants.MinDate;
CalibDate5 = TBF.UI.Constants.MinDate;
CalibValidDate = TBF.UI.Constants.MaxDate;
CalibValidDate1 = TBF.UI.Constants.MaxDate;
CalibValidDate2 = TBF.UI.Constants.MaxDate;
CalibValidDate3 = TBF.UI.Constants.MaxDate;
CalibValidDate4 = TBF.UI.Constants.MaxDate;
CalibValidDate5 = TBF.UI.Constants.MaxDate;
}
public string ToString(int i)

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2013-2016 Sensus Metering Systems
/// Copyright (c) 2013-2021 Sensus Metering Systems
///
using System.Collections.Generic;
using TBF.BenchControl.Generic;
@ -14,7 +14,7 @@ namespace TBF.BenchControl.Elde.FlowMeter
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new FlowMeter(cfg, components); }
public IComponentCfg DefaultConfig() { return new FlowMeterCfg(this); }
public IComponentCfg DefaultConfig() { return new FlowMeterCfg("I", this); }
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
{

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
/// Copyright (c) 2013-2021 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@ -25,39 +25,27 @@ namespace TBF.BenchControl.Elde.PressureMeter
public byte RS485Address; /// 0..255
/// Calibration info serialized parameters displayed in Metrology tab page
string calibCertificateNr;
DateTime calibDate;
DateTime calibValidDate;
public string CalibCertificateNr
{
get { return calibCertificateNr; }
set { calibCertificateNr = value; }
}
public DateTime CalibDate
{
get { return calibDate; }
set { calibDate = value; }
}
public DateTime CalibValidDate
{
get { return calibValidDate; }
set { calibValidDate = value; }
}
public string CalibCertificateNr { get; set; }
public DateTime CalibDate { get; set; }
public DateTime CalibValidDate { get; set; }
/// Private parameterless constructor invoked by all other (public) constructors
PressureMeterCfg()
{
PressureMeterCfg() { }
public PressureMeterCfg(IComponentFactory factory)
: this()
{
Factory = factory;
Name = "Pr";
ParentName = "CB";
Idx0 = 0;
Protocol = MeretProtocol.Modbus;
RS485Address = 99;
}
public PressureMeterCfg(IComponentFactory factory)
: this()
{
this.Factory = factory;
CalibCertificateNr = string.Empty;
CalibDate = TBF.UI.Constants.MinDate;
CalibValidDate = TBF.UI.Constants.MaxDate;
}
public string ToString(int i)

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2015-2016 Sensus Metering Systems
/// Copyright (c) 2015-2021 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
@ -28,43 +28,31 @@ namespace TBF.BenchControl.Elde.PressureMeterInternal
public float A5;
/// Calibration info serialized parameters displayed in Metrology tab page
string calibCertificateNr;
DateTime calibDate;
DateTime calibValidDate;
public string CalibCertificateNr
{
get { return calibCertificateNr; }
set { calibCertificateNr = value; }
}
public DateTime CalibDate
{
get { return calibDate; }
set { calibDate = value; }
}
public DateTime CalibValidDate
{
get { return calibValidDate; }
set { calibValidDate = value; }
}
public string CalibCertificateNr { get; set; }
public DateTime CalibDate { get; set; }
public DateTime CalibValidDate { get; set; }
/// Private parameterless constructor invoked by all other (public) constructors
PressureMeterCfg()
{
Name = "Pr";
ParentName = "CB";
Idx0 = 0;
CoefsIdx0 = 0;
A1 = 0;
A2 = 0;
A3 = 0;
A4 = 0;
A5 = 0;
}
PressureMeterCfg() { }
public PressureMeterCfg(IComponentFactory factory)
: this()
{
this.Factory = factory;
Factory = factory;
Name = "Pr";
ParentName = "CB";
Idx0 = 0;
CoefsIdx0 = 0;
A1 = 0;
A2 = 0;
A3 = 0;
A4 = 0;
A5 = 0;
CalibCertificateNr = string.Empty;
CalibDate = TBF.UI.Constants.MinDate;
CalibValidDate = TBF.UI.Constants.MaxDate;
}
public string ToString(int i)

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
/// Copyright (c) 2013-2021 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@ -28,28 +28,18 @@ namespace TBF.BenchControl.Elde.TempMeter
public double DefaultTemperature;
/// Calibration info serialized parameters displayed in Metrology tab page
string calibCertificateNr;
DateTime calibDate;
DateTime calibValidDate;
public string CalibCertificateNr
{
get { return calibCertificateNr; }
set { calibCertificateNr = value; }
}
public DateTime CalibDate
{
get { return calibDate; }
set { calibDate = value; }
}
public DateTime CalibValidDate
{
get { return calibValidDate; }
set { calibValidDate = value; }
}
public string CalibCertificateNr { get; set; }
public DateTime CalibDate { get; set; }
public DateTime CalibValidDate { get; set; }
/// Private parameterless constructor invoked by all other (public) constructors
TempMeterCfg()
{
TempMeterCfg() { }
public TempMeterCfg(IComponentFactory factory)
: this()
{
Factory = factory;
Name = "T";
ParentName = "CB";
Idx0 = 0;
@ -58,13 +48,11 @@ namespace TBF.BenchControl.Elde.TempMeter
A3 = 0;
A4 = 0;
A5 = 0;
DefaultTemperature = 20.0;
}
DefaultTemperature = 20.0;
public TempMeterCfg(IComponentFactory factory)
: this()
{
this.Factory = factory;
CalibCertificateNr = string.Empty;
CalibDate = TBF.UI.Constants.MinDate;
CalibValidDate = TBF.UI.Constants.MaxDate;
}
public string ToString(int i)

View File

@ -1,6 +1,5 @@
///
/// Copyright (c) 2015-2016 Sensus Metering Systems
/// Author: Milan Hanajik
/// Copyright (c) 2015-2021 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@ -29,44 +28,31 @@ namespace TBF.BenchControl.Elde.TempMeterInternal
public float A5;
/// Calibration info serialized parameters displayed in Metrology tab page
string calibCertificateNr;
DateTime calibDate;
DateTime calibValidDate;
public string CalibCertificateNr
{
get { return calibCertificateNr; }
set { calibCertificateNr = value; }
}
public DateTime CalibDate
{
get { return calibDate; }
set { calibDate = value; }
}
public DateTime CalibValidDate
{
get { return calibValidDate; }
set { calibValidDate = value; }
}
public string CalibCertificateNr { get; set; }
public DateTime CalibDate { get; set; }
public DateTime CalibValidDate { get; set; }
/// Private parameterless constructor invoked by all other (public) constructors
TempMeterCfg()
{
Name = "T";
ParentName = "CB";
Idx0 = 0;
CoefsIdx0 = 2;
A1 = 0;
A2 = 0;
A3 = 0;
A4 = 0;
A5 = 0;
}
TempMeterCfg() { }
public TempMeterCfg(IComponentFactory factory)
: this()
{
this.Factory = factory;
Factory = factory;
Name = "T";
ParentName = "CB";
Idx0 = 0;
CoefsIdx0 = 2;
A1 = 0;
A2 = 0;
A3 = 0;
A4 = 0;
A5 = 0;
CalibCertificateNr = string.Empty;
CalibDate = TBF.UI.Constants.MinDate;
CalibValidDate = TBF.UI.Constants.MaxDate;
}
public string ToString(int i)

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2018 Sensus Slovensko a.s.
/// Copyright (c) 2018-2021 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@ -42,32 +42,13 @@ namespace TBF.BenchControl.Elde.TempMeterMeret
public int MeretIdx0; /// Meter pressure meters count .. (Meter pressure meters count + Meter temperature meters count - 1)
/// Calibration info serialized parameters displayed in Metrology tab page
string calibCertificateNr;
DateTime calibDate;
DateTime calibValidDate;
public string CalibCertificateNr
{
get { return calibCertificateNr; }
set { calibCertificateNr = value; }
}
public DateTime CalibDate
{
get { return calibDate; }
set { calibDate = value; }
}
public DateTime CalibValidDate
{
get { return calibValidDate; }
set { calibValidDate = value; }
}
public string CalibCertificateNr { get; set; }
public DateTime CalibDate { get; set; }
public DateTime CalibValidDate { get; set; }
/// Private parameterless constructor invoked by all other (public) constructors
TempMeterCfg()
{
Name = "T";
ParentName = "CB";
}
TempMeterCfg() { }
public TempMeterCfg(IComponentFactory factory)
: this()
@ -85,6 +66,10 @@ namespace TBF.BenchControl.Elde.TempMeterMeret
TempIdx0 = 8;
ModbusAddress = 1;
MeretIdx0 = 4;
CalibCertificateNr = string.Empty;
CalibDate = TBF.UI.Constants.MinDate;
CalibValidDate = TBF.UI.Constants.MaxDate;
}

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2018 Sensus Slovensko a.s.
/// Copyright (c) 2018-2021 Sensus Slovensko a.s.
///
using System;
using System.IO;
@ -35,26 +35,10 @@ namespace TBF.BenchControl.Hart.Nivotrack
public int Par1;
public int Par2;
/// Calibration info serialized parameters displayed in Metrology tab page
string calibCertificateNr;
DateTime calibDate;
DateTime calibValidDate;
public string CalibCertificateNr
{
get { return calibCertificateNr; }
set { calibCertificateNr = value; }
}
public DateTime CalibDate
{
get { return calibDate; }
set { calibDate = value; }
}
public DateTime CalibValidDate
{
get { return calibValidDate; }
set { calibValidDate = value; }
}
public string CalibCertificateNr { get; set; }
public DateTime CalibDate { get; set; }
public DateTime CalibValidDate { get; set; }
/// Private parameterless constructor invoked by all other (public) constructors
@ -76,6 +60,10 @@ namespace TBF.BenchControl.Hart.Nivotrack
Address = 3;
Par1 = 9600;
Par2 = 8;
CalibCertificateNr = string.Empty;
CalibDate = TBF.UI.Constants.MinDate;
CalibValidDate = TBF.UI.Constants.MaxDate;
}
string[] paramNames = new string[]
{

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2016 Sensus Metering Systems
/// Copyright (c) 2016-2021 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
@ -9,7 +9,7 @@ using TBF.BenchControl.Generic;
namespace TBF.BenchControl.Keithley.TempMeter
{
public class TempMeterCfg : ComponentCfgBase, IChildComponentCfg
public class TempMeterCfg : ComponentCfgBase, IChildComponentCfg, GenericDevices.ICalibInfoCfg
{
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TempMeterCfg) })[0];
public override XmlSerializer GetSerializer() { return Serializer; }
@ -36,14 +36,12 @@ namespace TBF.BenchControl.Keithley.TempMeter
public double B;
/// Calibration info serialized parameters displayed in Metrology tab page
public string CalibCertificateNr;
public DateTime CalibDate;
public DateTime CalibValidDate;
public string CalibCertificateNr { get; set; }
public DateTime CalibDate { get; set; }
public DateTime CalibValidDate { get; set; }
/// Private parameterless constructor invoked by all other (public) constructors
TempMeterCfg()
{
}
TempMeterCfg() { }
public TempMeterCfg(string name, IComponentFactory factory)
: this()
@ -56,6 +54,10 @@ namespace TBF.BenchControl.Keithley.TempMeter
R0 = 100.0;
A = 3.9083E-3;
B = -5.775E-7;
CalibCertificateNr = string.Empty;
CalibDate = TBF.UI.Constants.MinDate;
CalibValidDate = TBF.UI.Constants.MaxDate;
}
public string ToString(int i)

View File

@ -58,10 +58,19 @@ namespace TBF.BenchControl.MettlerToledo.Standard
/// Private parameterless constructor invoked by all other (public) constructors
BalanceCfg()
{
BalanceCfg() { }
public BalanceCfg(IComponentFactory factory)
: this()
{
Factory = factory;
Name = "WT1";
ParentName = string.Empty;
InitializeAll();
}
void InitializeAll()
{
ComPortNr = 3;
BaudRate = 2400;
Parity = System.IO.Ports.Parity.Even;
@ -72,17 +81,15 @@ namespace TBF.BenchControl.MettlerToledo.Standard
Empty = 20.0f;
EmptyUp = 2.0f;
Format = "F3";
DrainValve = "VB1";
DrainTimeSec = 180;
DrainValve = "VB1";
DrainTimeSec = 180;
BuoyancyTemp = 20.0f;
BuoyancyPress = 1.0f;
BuoyancyHumi = 40.0f;
}
public BalanceCfg(IComponentFactory factory)
: this()
{
this.Factory = factory;
CalibCertificateNr = string.Empty;
CalibDate = TBF.UI.Constants.MinDate;
CalibValidDate = TBF.UI.Constants.MaxDate;
}
public string ToString(int i)

View File

@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.26.1719.0")]
[assembly: AssemblyFileVersion("2.26.1719.0")]
[assembly: AssemblyVersion("2.26.1722.0")]
[assembly: AssemblyFileVersion("2.26.1722.0")]

View File

@ -8,5 +8,6 @@ namespace TBF.UI
public const string DateFormat = "dd.MM.yyyy";
public const string DateTimeFormat = "dd.MM.yyyy HH:mm";
public static readonly DateTime MinDate = new DateTime(2016, 1, 1);
public static readonly DateTime MaxDate = new DateTime(2039, 12, 31);
}
}