Compare commits
13
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5fa9fcaeff | ||
|
|
df5924663a | ||
|
|
1e1f8bf8e6 | ||
|
|
0d7fe67cd6 | ||
|
|
78bc9e264b | ||
|
|
a20b0761fd | ||
|
|
3b9e8d754d | ||
|
|
fed3281525 | ||
|
|
c1d966d86a | ||
|
|
b2d2f8c13b | ||
|
|
4e5e3d63e1 | ||
|
|
25602fb914 | ||
|
|
602d0d5308 |
@@ -7,5 +7,6 @@ namespace Common
|
||||
int RangeIx { get; set; }
|
||||
double Measurement { get; set; }
|
||||
double Correction { get; set; }
|
||||
double Uncertainty { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,6 +145,7 @@ namespace Common
|
||||
[Description("Aufgezählt")] Enumerated,
|
||||
[Description("Strom")] Current,
|
||||
[Description("Spannung")] Voltage,
|
||||
[Description("Unsicherheit")] Uncertainty,
|
||||
#elif LANG_PL
|
||||
[Description("Objętość")] Volume,
|
||||
[Description("Przepływ")] Flow,
|
||||
@@ -170,6 +171,7 @@ namespace Common
|
||||
[Description("Wyliczone")] Enumerated,
|
||||
[Description("Prąd")] Current,
|
||||
[Description("Napięcie")] Voltage,
|
||||
[Description("Niepewność")] Uncertainty,
|
||||
#elif LANG_CS
|
||||
[Description("Objem")] Volume,
|
||||
[Description("Průtok")] Flow,
|
||||
@@ -195,6 +197,7 @@ namespace Common
|
||||
[Description("Vyjmenované")] Enumerated,
|
||||
[Description("Proud")] Current,
|
||||
[Description("Napětí")] Voltage,
|
||||
[Description("Nejistota")] Uncertainty,
|
||||
#elif LANG_IT
|
||||
[Description("Volume")] Volume,
|
||||
[Description("Flusso")] Flow,
|
||||
@@ -220,6 +223,7 @@ namespace Common
|
||||
[Description("Enumerato")] Enumerated,
|
||||
[Description("Corrente")] Current,
|
||||
[Description("Voltaggio")] Voltage,
|
||||
[Description("Incertezza")] Uncertainty,
|
||||
#else
|
||||
[Description("Volume")] Volume,
|
||||
[Description("Flow")] Flow,
|
||||
@@ -245,6 +249,7 @@ namespace Common
|
||||
[Description("Enumerated")] Enumerated,
|
||||
[Description("Current")] Current,
|
||||
[Description("Voltage")] Voltage,
|
||||
[Description("Uncertainty")] Uncertainty,
|
||||
#endif
|
||||
Count,
|
||||
}
|
||||
|
||||
@@ -68,7 +68,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CalendarEvent\ICalendarEvent.cs" />
|
||||
<Compile Include="Data.cs" />
|
||||
<Compile Include="Entities\BenchPath.cs" />
|
||||
<Compile Include="Entities\CustomEvent.cs" />
|
||||
<Compile Include="Entities\Component.cs" />
|
||||
@@ -96,7 +95,6 @@
|
||||
<Compile Include="Entities\VirtualBenchStep.cs" />
|
||||
<Compile Include="CalendarEvent\Utils.cs" />
|
||||
<Compile Include="FluentCommon.cs" />
|
||||
<Compile Include="Formulas.cs" />
|
||||
<Compile Include="Mappings\BenchPathMap.cs" />
|
||||
<Compile Include="Mappings\ComponentMap.cs" />
|
||||
<Compile Include="Mappings\ComponentProcedureMap.cs" />
|
||||
|
||||
@@ -12,6 +12,8 @@ namespace Config.Entities
|
||||
public virtual int RangeIx { get; set; } /// 0..5
|
||||
public virtual double Measurement { get; set; }
|
||||
public virtual double Correction { get; set; }
|
||||
public virtual double Uncertainty { get; set; }
|
||||
public virtual double Readability { get; set; }
|
||||
|
||||
public MeasurementCorrection()
|
||||
{
|
||||
@@ -84,7 +86,7 @@ namespace Config.Entities
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0} {1} ({2})", Measurement, Correction, RangeIx);
|
||||
return string.Format("{0} {1} ({2}) {3} {4}", Measurement, Correction, RangeIx, Uncertainty, Readability);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,9 +18,8 @@ namespace Config.Entities
|
||||
public virtual Unit FlowUnit { get; set; } /// Not mapped to database, used in UI
|
||||
public virtual string Selector { get; set; }
|
||||
public virtual string RegValve { get; set; }
|
||||
public virtual int RegulMinStep { get; set; }
|
||||
public virtual string FlowMeter { get; set; }
|
||||
public virtual float PidCoef { get; set; } /// PID coefficient for the regulation path
|
||||
public virtual string FlowMeter { get; set; }
|
||||
public virtual float PidCoef { get; set; } /// PID coefficient for the regulation path
|
||||
public virtual string StartValve { get; set; }
|
||||
public virtual string Diverter { get; set; }
|
||||
public virtual string TempMtrDiv { get; set; }
|
||||
@@ -40,7 +39,6 @@ namespace Config.Entities
|
||||
{
|
||||
ValvesOpen = string.Empty;
|
||||
ValvesClose = string.Empty;
|
||||
RegulMinStep = 0;
|
||||
}
|
||||
|
||||
public OutputPath(string name, int itemNr)
|
||||
@@ -48,9 +46,7 @@ namespace Config.Entities
|
||||
{
|
||||
Name = name;
|
||||
ItemNr = itemNr;
|
||||
RegulMinStep = 0;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public virtual OutputPath Clone(string name, int itemNr)
|
||||
{
|
||||
@@ -62,8 +58,7 @@ namespace Config.Entities
|
||||
result.FlowUnit = FlowUnit;
|
||||
result.Selector = Selector;
|
||||
result.RegValve = RegValve;
|
||||
result.RegulMinStep = RegulMinStep;
|
||||
result.FlowMeter = FlowMeter;
|
||||
result.FlowMeter = FlowMeter;
|
||||
result.PidCoef = PidCoef;
|
||||
result.StartValve = StartValve;
|
||||
result.Diverter = Diverter;
|
||||
|
||||
@@ -14,6 +14,8 @@ namespace Config.Mappings
|
||||
Map(x => x.RangeIx);
|
||||
Map(x => x.Measurement);
|
||||
Map(x => x.Correction);
|
||||
Map(x => x.Uncertainty);
|
||||
Map(x => x.Readability);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,7 @@ namespace Config.Mappings
|
||||
Map(x => x.Qto);
|
||||
Map(x => x.Selector);
|
||||
Map(x => x.RegValve);
|
||||
Map(x => x.RegulMinStep);
|
||||
Map(x => x.FlowMeter);
|
||||
Map(x => x.FlowMeter);
|
||||
Map(x => x.PidCoef);
|
||||
Map(x => x.StartValve);
|
||||
Map(x => x.Diverter);
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<TargetFrameworkProfile />
|
||||
<LangVersion>4</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.4.0" newVersion="4.0.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.1.6.0" newVersion="4.1.6.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.0.2.0" newVersion="6.0.2.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
@@ -29,12 +29,8 @@ namespace Results.Entities
|
||||
public virtual long ErrorIndicators { get; set; } /// Not mapped to DB !!!, bit24=E25, bit25=E26, bit26=E27, bit27=E28 (error flags)
|
||||
public virtual long InfoIndicators { get; set; } /// Not mapped to DB !!!, bit24=E25, bit25=E26, bit26=E27, bit27=E28 (info flags)
|
||||
public virtual bool TestDone { get; set; } /// true = test was completed
|
||||
public virtual bool Passed { get; set; } /// true = test passed, water meter is OK
|
||||
public virtual bool Passed { get; set; } /// true = test passed, water meter is OK
|
||||
#if IPERL
|
||||
public virtual int CalibFactor { get; set; }
|
||||
public virtual int CalibFactorLNA { get; set; }
|
||||
public virtual int Q2CorrRL { get; set; }
|
||||
public virtual int Q2CorrLR { get; set; }
|
||||
public virtual string ExtraDataPath { get; set; } /// Relative path to a file with opto-data/raw-data
|
||||
public virtual float X1 { get; set; }
|
||||
public virtual float X2 { get; set; }
|
||||
@@ -170,10 +166,6 @@ namespace Results.Entities
|
||||
TestDone = src.TestDone;
|
||||
Passed = src.Passed;
|
||||
#if IPERL
|
||||
CalibFactor = src.CalibFactor;
|
||||
CalibFactorLNA = src.CalibFactorLNA;
|
||||
Q2CorrRL = src.Q2CorrRL;
|
||||
Q2CorrLR = src.Q2CorrLR;
|
||||
ExtraDataPath = src.ExtraDataPath;
|
||||
X1 = src.X1;
|
||||
X2 = src.X2;
|
||||
@@ -217,10 +209,6 @@ namespace Results.Entities
|
||||
writer.Write(TestDone);
|
||||
writer.Write(Passed);
|
||||
#if IPERL
|
||||
writer.Write(CalibFactor);
|
||||
writer.Write(CalibFactorLNA);
|
||||
writer.Write(Q2CorrRL);
|
||||
writer.Write(Q2CorrLR);
|
||||
writer.Write((ExtraDataPath != null) ? ExtraDataPath : string.Empty);
|
||||
writer.Write(X1);
|
||||
writer.Write(X2);
|
||||
@@ -261,10 +249,6 @@ namespace Results.Entities
|
||||
TestDone = reader.ReadBoolean();
|
||||
Passed = reader.ReadBoolean();
|
||||
#if IPERL
|
||||
CalibFactor = reader.ReadInt32();
|
||||
CalibFactorLNA = reader.ReadInt32();
|
||||
Q2CorrRL = reader.ReadInt32();
|
||||
Q2CorrLR = reader.ReadInt32();
|
||||
ExtraDataPath = reader.ReadString();
|
||||
X1 = reader.ReadSingle();
|
||||
X2 = reader.ReadSingle();
|
||||
|
||||
@@ -350,6 +350,14 @@ namespace Results
|
||||
Pulses_aux, /// 296 Compound aux meter pulses (recalculated so that the gated ref. pulses for this meter are equal to the total ref. pulses)
|
||||
|
||||
Failed_meters_countE15, /// 297
|
||||
|
||||
Uncertainty_DIV1, /// 298 Diverter DIV1 Uncertainty
|
||||
Uncertainty_DIV2, /// 299 Diverter DIV2 Uncertainty
|
||||
Uncertainty_DIV3, /// 300 Diverter DIV3 Uncertainty
|
||||
Uncertainty_DIV4, /// 301 Diverter DIV4 Uncertainty
|
||||
Uncertainty_DIV5, /// 302 Diverter DIV5 Uncertainty
|
||||
|
||||
Uncertainty_TEMP1, /// 303 Temp1 Uncertainty
|
||||
|
||||
Count,
|
||||
}
|
||||
|
||||
+70
-4
@@ -29,12 +29,30 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;IPERL</DefineConstants>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ClosedXML, Version=0.105.0.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ClosedXML.0.105.0-rc\lib\netstandard2.0\ClosedXML.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ClosedXML.Parser, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1d5f7376574c51ec, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ClosedXML.Parser.2.0.0-preview1\lib\netstandard2.0\ClosedXML.Parser.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DocumentFormat.OpenXml, Version=3.1.1.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\DocumentFormat.OpenXml.3.1.1\lib\net46\DocumentFormat.OpenXml.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DocumentFormat.OpenXml.Framework, Version=3.1.1.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\DocumentFormat.OpenXml.Framework.3.1.1\lib\net46\DocumentFormat.OpenXml.Framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EPPlus.Interfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=a694d7f3b0907a61, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EPPlus.Interfaces.8.0.0\lib\net462\EPPlus.Interfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ExcelNumberFormat, Version=1.1.0.0, Culture=neutral, PublicKeyToken=23c6f5d73be07eca, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ExcelNumberFormat.1.1.0\lib\net20\ExcelNumberFormat.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FluentNHibernate">
|
||||
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -47,15 +65,51 @@
|
||||
<Reference Include="log4net, Version=2.0.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\log4net.2.0.15\lib\net45\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Bcl.HashCode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.HashCode.1.1.1\lib\net461\Microsoft.Bcl.HashCode.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.IO.RecyclableMemoryStream, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.IO.RecyclableMemoryStream.3.0.1\lib\netstandard2.0\Microsoft.IO.RecyclableMemoryStream.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="mscorlib" />
|
||||
<Reference Include="MySql.Data">
|
||||
<HintPath>..\packages\MySql.Data.6.6.5\lib\net40\MySql.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate">
|
||||
<HintPath>..\packages\NHibernate.4.0.4.4000\lib\net40\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="RBush, Version=4.0.0.0, Culture=neutral, PublicKeyToken=c77e27b81f4d0187, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\RBush.Signed.4.0.0\lib\net47\RBush.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SixLabors.Fonts.1.0.0\lib\netstandard2.0\SixLabors.Fonts.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.6.1\lib\net462\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.Annotations, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ComponentModel.Annotations.5.0.0\lib\net461\System.ComponentModel.Annotations.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Memory, Version=4.0.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.6.2\lib\net462\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.6.1\lib\net462\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.1.1\lib\net462\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Security" />
|
||||
<Reference Include="System.Security.Cryptography.Xml, Version=8.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Security.Cryptography.Xml.8.0.2\lib\net462\System.Security.Cryptography.Xml.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Windows.Forms.DataVisualization" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
@@ -63,6 +117,7 @@
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="WindowsBase" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="BatchResults.cs" />
|
||||
@@ -180,6 +235,17 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Strings.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="RigUncertainty.cs" />
|
||||
<Compile Include="Uncertainty\Calculation\CalculationTable.cs" />
|
||||
<Compile Include="Uncertainty\Calculation\Math.cs" />
|
||||
<Compile Include="Uncertainty\CommonExcell.cs" />
|
||||
<Compile Include="Uncertainty\CommonTable\Table.cs" />
|
||||
<Compile Include="Uncertainty\DEItem.cs" />
|
||||
<Compile Include="Uncertainty\DEUtils.cs" />
|
||||
<Compile Include="Uncertainty\DocumentSheets.cs" />
|
||||
<Compile Include="Uncertainty\ProcessDataLine.cs" />
|
||||
<Compile Include="Uncertainty\ProcessDataMeterLine.cs" />
|
||||
<Compile Include="Uncertainty\CommonTable\Cell.cs" />
|
||||
<Compile Include="Utils.cs" />
|
||||
<Compile Include="WMeterRsltItemSpec.cs" />
|
||||
</ItemGroup>
|
||||
@@ -241,9 +307,7 @@
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\Strings.fr.resx" />
|
||||
<EmbeddedResource Include="Resources\Strings.it.resx" />
|
||||
<EmbeddedResource Include="Resources\Strings.pl.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\Strings.pl.resx" />
|
||||
<EmbeddedResource Include="Resources\Strings.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
|
||||
@@ -251,6 +315,8 @@
|
||||
<EmbeddedResource Include="Resources\Strings.ru.resx" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Resources\Headpic.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using ClosedXML.Excel;
|
||||
using log4net;
|
||||
using Results.Resources;
|
||||
using Results.Uncertainty;
|
||||
|
||||
namespace Results
|
||||
{
|
||||
/// <summary>
|
||||
/// Uncertaintity based on calculation
|
||||
/// </summary>
|
||||
public class RigUncertainty
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(RigUncertainty));
|
||||
//Based on |Excel calculation
|
||||
//1.step feed Excel
|
||||
//2.step get calculated data from excel
|
||||
|
||||
private string DocumentName { get; set; }
|
||||
private XLWorkbook Document;
|
||||
|
||||
private Boolean openedDocument;
|
||||
public Boolean IsOpenedDocument { get { return openedDocument; } }
|
||||
|
||||
|
||||
Dictionary<int, ProcessDataLine> processDataDict = new Dictionary<int, ProcessDataLine>();
|
||||
|
||||
public RigUncertainty()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public RigUncertainty(string DocumentName)
|
||||
{
|
||||
this.DocumentName = DocumentName;
|
||||
}
|
||||
|
||||
public void OpenDocument()
|
||||
{
|
||||
this.openedDocument = TryOpenDocument();
|
||||
}
|
||||
|
||||
|
||||
private Boolean TryOpenDocument()
|
||||
{
|
||||
try
|
||||
{
|
||||
Document = new XLWorkbook(DocumentName);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
log.Error("Can`t open excel document!",e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public void CloaseDocument()
|
||||
{
|
||||
this.openedDocument = !TryCloseDocument();
|
||||
}
|
||||
|
||||
private Boolean TryCloseDocument()
|
||||
{
|
||||
try
|
||||
{
|
||||
Document.Dispose(); // Closes the file and releases resources
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
log.Error("Can`t open excel document!",e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public IXLWorksheet GetWorksheet(DocumentSheets sheet)
|
||||
{
|
||||
string sheetName = EnumExtensions.GetDescription(sheet);
|
||||
try
|
||||
{
|
||||
var xlWorksheet = Document.Worksheet(sheetName);
|
||||
return xlWorksheet;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
log.Error($"Can`t get \"{sheetName}\" worksheet!", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public Boolean GetCalculatedDataFromExcel()
|
||||
{
|
||||
// Code to get calculated data from Excel
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void SetDataToExcel()
|
||||
{
|
||||
string sheetString = EnumExtensions.GetDescription(DocumentSheets.RADATA);
|
||||
IXLWorksheet worksheet = Document.Worksheet(sheetString);
|
||||
|
||||
|
||||
|
||||
// # store data to Excel workbook
|
||||
|
||||
// ## get data from DB
|
||||
int line = 3;
|
||||
ProcessDataLine pDataLine = new ProcessDataLine();
|
||||
|
||||
processDataDict.Add(line,pDataLine);
|
||||
|
||||
// ### line process data
|
||||
|
||||
|
||||
// ## Store to document
|
||||
foreach ( var processDataKey in processDataDict)
|
||||
{
|
||||
//get Process data line base by row
|
||||
ProcessDataLine processDataLine = processDataKey.Value;
|
||||
CommonExcell.InsertValueLineProcessData(this, processDataKey.Key, processDataLine);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void SaveResultDataToDatabase()
|
||||
{
|
||||
// Code to save data to database
|
||||
}
|
||||
|
||||
|
||||
public void SaveChangesToDocument()
|
||||
{
|
||||
if (Document != null && openedDocument)
|
||||
{
|
||||
Document.Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,239 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using ClosedXML.Excel;
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
|
||||
namespace Results.Uncertainty.Calculation
|
||||
{
|
||||
public class ColumnValue
|
||||
{
|
||||
private int iColumn;
|
||||
private double value;
|
||||
|
||||
public int IColumn => iColumn;
|
||||
|
||||
public double Value
|
||||
{
|
||||
get => value;
|
||||
set => this.value = value;
|
||||
}
|
||||
|
||||
public ColumnValue(int iColumn)
|
||||
{
|
||||
this.iColumn = iColumn;
|
||||
}
|
||||
|
||||
public ColumnValue(int iColumn, double value)
|
||||
{
|
||||
this.iColumn = iColumn;
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
|
||||
public class BatchProcessTable
|
||||
{
|
||||
|
||||
private Dictionary<int, ProcessDataLine> processTable;
|
||||
|
||||
public Dictionary<int, ProcessDataLine> ProcessTable
|
||||
{
|
||||
get => processTable;
|
||||
set => processTable = value;
|
||||
}
|
||||
|
||||
|
||||
public IList<ColumnValue> GetListMeterValue(int iMeter, int iMeterSubvalueIndex)
|
||||
{
|
||||
|
||||
IList<ColumnValue> xx = new List<ColumnValue>();
|
||||
|
||||
foreach (KeyValuePair<int, ProcessDataLine> dataLine in processTable)
|
||||
{
|
||||
XLCellValue cellValue = dataLine.Value.processDataMeterList[iMeter].val[iMeterSubvalueIndex];
|
||||
xx.Add(new ColumnValue((int)dataLine.Key ,cellValue.GetNumber()));
|
||||
}
|
||||
|
||||
return xx;
|
||||
}
|
||||
public Dictionary<int, IList<ColumnValue>> GetKBuoyancy()
|
||||
{
|
||||
Dictionary<int, IList<ColumnValue>> table = new Dictionary<int, IList<ColumnValue>>();
|
||||
IList<ColumnValue> bc = new List<ColumnValue>();
|
||||
IList<ColumnValue> bi = new List<ColumnValue>();
|
||||
IList<ColumnValue> bj = new List<ColumnValue>();
|
||||
IList<ColumnValue> bm = new List<ColumnValue>();
|
||||
foreach (KeyValuePair<int, ProcessDataLine> dataLine in processTable)
|
||||
{
|
||||
bc.Add(new ColumnValue((int)dataLine.Key ,dataLine.Value.Kbuoyancy));
|
||||
bi.Add(new ColumnValue((int)dataLine.Key ,dataLine.Value.Qctv));
|
||||
bj.Add(new ColumnValue((int)dataLine.Key ,dataLine.Value.VolRI));
|
||||
bm.Add(new ColumnValue((int)dataLine.Key ,dataLine.Value.ERelRef));
|
||||
}
|
||||
|
||||
table.Add(CommonExcell.ColumnToNumber("BC"),bc);
|
||||
table.Add(CommonExcell.ColumnToNumber("BI"),bi);
|
||||
table.Add(CommonExcell.ColumnToNumber("BJ"),bj);
|
||||
table.Add(CommonExcell.ColumnToNumber("BM"),bm);
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
public Dictionary<int, IList<ColumnValue>> ModifyKbuoyancy(IList<ColumnValue> corectedKbuoancy)
|
||||
{
|
||||
//Columns - 'BC'
|
||||
Dictionary<int,IList<ColumnValue>> kbuoyancyTable = GetKBuoyancy();
|
||||
if (kbuoyancyTable.ContainsKey(CommonExcell.ColumnToNumber("BC")) &&
|
||||
kbuoyancyTable.ContainsKey(CommonExcell.ColumnToNumber("BI")) &&
|
||||
kbuoyancyTable.ContainsKey(CommonExcell.ColumnToNumber("BJ")) &&
|
||||
kbuoyancyTable.ContainsKey(CommonExcell.ColumnToNumber("BM")))
|
||||
{
|
||||
IList<ColumnValue> listBC = kbuoyancyTable[CommonExcell.ColumnToNumber("BC")];
|
||||
IList<ColumnValue> listBI = kbuoyancyTable[CommonExcell.ColumnToNumber("BI")];
|
||||
IList<ColumnValue> listBJ = kbuoyancyTable[CommonExcell.ColumnToNumber("BJ")];
|
||||
IList<ColumnValue> listBM = kbuoyancyTable[CommonExcell.ColumnToNumber("BM")];
|
||||
|
||||
if (corectedKbuoancy.Count != listBC.Count)
|
||||
{
|
||||
throw new Exception("Incompatible count in table kbuoyancy!");
|
||||
}
|
||||
|
||||
for (int row = 0; row < listBC.Count; row++)
|
||||
{
|
||||
|
||||
double correctedKbuoyancyValue = corectedKbuoancy[row].Value;
|
||||
listBC[row].Value = correctedKbuoyancyValue;
|
||||
//BI=+BI4/BC4*BC13
|
||||
listBI[row].Value = listBI[row].Value / correctedKbuoyancyValue * listBJ[row].Value;
|
||||
//BM==+(BJ13-BI13)/BI13*100
|
||||
listBM[row].Value = (listBJ[row].Value - listBI[row].Value) / listBI[row].Value * 100;
|
||||
}
|
||||
return kbuoyancyTable;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public class CalculationTable
|
||||
{
|
||||
private BatchProcessTable batchProcessTable;
|
||||
private Dictionary<int, IList<ColumnValue>> table;
|
||||
private Dictionary<string, double> averages;
|
||||
|
||||
|
||||
public BatchProcessTable BatchProcessTable
|
||||
{
|
||||
get => batchProcessTable;
|
||||
set => batchProcessTable = value;
|
||||
}
|
||||
|
||||
public Dictionary<int, IList<ColumnValue>> Table
|
||||
{
|
||||
get => table;
|
||||
set => table = value;
|
||||
}
|
||||
|
||||
public Dictionary<string, double> Averages
|
||||
{
|
||||
get => averages;
|
||||
set => averages = value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public CalculationTable()
|
||||
{
|
||||
batchProcessTable = new BatchProcessTable();
|
||||
table = new Dictionary<int, IList<ColumnValue>>();
|
||||
averages = new Dictionary<string, double>();
|
||||
}
|
||||
|
||||
|
||||
////////
|
||||
///
|
||||
|
||||
public IList<ColumnValue> GetColumn(string column)
|
||||
{
|
||||
int iColumnName = CommonExcell.ColumnToNumber(column);
|
||||
if (table.ContainsKey(iColumnName))
|
||||
{
|
||||
return table[iColumnName];
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception($"Column {column} missing in table!");
|
||||
}
|
||||
}
|
||||
|
||||
double Average(string columnName, bool forceCalculation = false)
|
||||
{
|
||||
int iColumnName = CommonExcell.ColumnToNumber(columnName);
|
||||
if (!forceCalculation && averages.ContainsKey(columnName))
|
||||
{
|
||||
return averages[columnName];
|
||||
}
|
||||
|
||||
if (!table.ContainsKey(iColumnName))
|
||||
{
|
||||
double average = Average(table[iColumnName]);
|
||||
averages.Add(columnName, average);
|
||||
return average;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception($"Column {columnName} missing in table!");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static double Average(IList<ColumnValue> values)
|
||||
{
|
||||
int i = 0;
|
||||
double sum = 0;
|
||||
foreach (ColumnValue value in values)
|
||||
{
|
||||
sum += value.Value;
|
||||
i++;
|
||||
}
|
||||
|
||||
return sum / i;
|
||||
}
|
||||
|
||||
|
||||
static double SumOfSquares(IList<ColumnValue> values, double mean)
|
||||
{
|
||||
double sumOfSquares = 0;
|
||||
foreach (ColumnValue columnValue in values)
|
||||
{
|
||||
sumOfSquares += System.Math.Pow(columnValue.Value - mean, 2);
|
||||
}
|
||||
|
||||
return sumOfSquares;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calculates the sample standard deviation for a list of ColumnValue objects.
|
||||
/// </summary>
|
||||
/// <param name="values">An IList of ColumnValue objects.</param>
|
||||
/// <returns>The sample standard deviation. Returns 0 if there are fewer than 2 values.</returns>
|
||||
public static double StandardDeviation(IList<ColumnValue> values)
|
||||
{
|
||||
if (values == null || values.Count < 2)
|
||||
return 0.0;
|
||||
|
||||
// Compute the average of the values.
|
||||
double mean = CalculationTable.Average(values);
|
||||
|
||||
// Calculate the sum of squared differences from the mean.
|
||||
double sumOfSquares = CalculationTable.SumOfSquares(values, mean);
|
||||
|
||||
// For sample standard deviation, divide by (n - 1)
|
||||
return System.Math.Sqrt(sumOfSquares / (values.Count - 1));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Results.Uncertainty.Calculation
|
||||
{
|
||||
public static class Math
|
||||
{
|
||||
public static double Average(IList<Double> values)
|
||||
{
|
||||
int i = 0;
|
||||
double sum = 0;
|
||||
foreach (double value in values)
|
||||
{
|
||||
sum += value;
|
||||
i++;
|
||||
}
|
||||
|
||||
return sum / i;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,310 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using ClosedXML.Excel;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using log4net;
|
||||
using NHibernate;
|
||||
using Results.Resources;
|
||||
|
||||
namespace Results.Uncertainty
|
||||
{
|
||||
public class CommonExcell
|
||||
{
|
||||
const string formatD7 = "0.0000000";
|
||||
const string formatD6 = "0.000000";
|
||||
const string formatD4 = "0.0000";
|
||||
const string formatD3 = "0.000";
|
||||
const string formatD1 = "0.0";
|
||||
const string formatInt = "0";
|
||||
const string formatStr = "@";
|
||||
|
||||
private static Dictionary<int, int> bloks = null;
|
||||
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(CommonExcell));
|
||||
|
||||
private static IList<Component> cmpntEntities;
|
||||
|
||||
public static Dictionary<int, int> GetBolocs() {
|
||||
if (bloks == null)
|
||||
{
|
||||
bloks = new Dictionary<int, int>();
|
||||
bloks.Add(0, 4);
|
||||
bloks.Add(1, 24);
|
||||
bloks.Add(2, 44);
|
||||
bloks.Add(3, 64);
|
||||
bloks.Add(4, 84);
|
||||
bloks.Add(5, 104);
|
||||
bloks.Add(6, 124);
|
||||
bloks.Add(7, 144);
|
||||
}
|
||||
|
||||
return bloks;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Inserts a line of process data into a specified row of the Excel document.
|
||||
/// </summary>
|
||||
/// <param name="_rigUncertainty">An instance of the <see cref="RigUncertainty"/> class representing the rig uncertainty and its associated data.</param>
|
||||
/// <param name="iRowI">The row index in the Excel worksheet where the process data will be inserted.</param>
|
||||
/// <param name="processDataLine">An instance of the <see cref="ProcessDataLine"/> class containing the process data to be added to the row.</param>
|
||||
public static void InsertValueLineProcessData(RigUncertainty _rigUncertainty, int iRowI, ProcessDataLine processDataLine)
|
||||
{
|
||||
if (!_rigUncertainty.IsOpenedDocument)
|
||||
{
|
||||
throw new Exception("No Opened document!");
|
||||
}
|
||||
|
||||
|
||||
IXLWorksheet worksheet = _rigUncertainty.GetWorksheet(DocumentSheets.RADATA);
|
||||
|
||||
//Date time
|
||||
string column = "A";
|
||||
worksheet.Cell($"{column}{iRowI}").Value = processDataLine.DateTime;
|
||||
worksheet.Cell($"{column}{iRowI}").Style.DateFormat.Format = "M/d/yyyy h:mm";
|
||||
|
||||
//deffined values
|
||||
CellData(worksheet, "B", iRowI, processDataLine.Batch, formatInt); //Batch - B
|
||||
CellData(worksheet, "C", iRowI, processDataLine.TestName, formatStr); //Test Name - C
|
||||
CellData(worksheet, "D", iRowI, processDataLine.Reports, formatInt); //Reports
|
||||
CellData(worksheet, "E", iRowI, processDataLine.RepCyc, formatInt); //Rep cyc
|
||||
CellData(worksheet, "F", iRowI, processDataLine.TestMeth, formatStr); //Test Meth.
|
||||
CellData(worksheet, "G", iRowI, processDataLine.TargetVOL, formatInt); //Target VOL.
|
||||
CellData(worksheet, "H", iRowI, processDataLine.TargetQMin, formatD4); //Target Q -
|
||||
CellData(worksheet, "I", iRowI, processDataLine.TargetQPlus, formatD4); //Target Q +
|
||||
CellData(worksheet, "J", iRowI, processDataLine.ErrLimitMin, formatInt); //Err. LIMIT -
|
||||
CellData(worksheet, "K", iRowI, processDataLine.ErrLimitPlus, formatInt); //Err. LIMIT +
|
||||
CellData(worksheet, "L", iRowI, processDataLine.TargetTempFrom, formatInt); //Target temp from - L
|
||||
CellData(worksheet, "M", iRowI, processDataLine.TargetTempTo, formatInt); //Target temp to - M
|
||||
CellData(worksheet, "N", iRowI, processDataLine.TargetPressFrom, formatInt); //Target press from - N
|
||||
CellData(worksheet, "O", iRowI, processDataLine.TargetPressTo, formatInt); //Target press to - O
|
||||
CellData(worksheet, "P", iRowI, processDataLine.MIDNumberName, formatStr);
|
||||
CellData(worksheet, "Q", iRowI, processDataLine.MIDNumberValue, formatD4); //MID number - PQ
|
||||
CellData(worksheet, "R", iRowI, processDataLine.COR, formatStr); //COR - R
|
||||
|
||||
CellData(worksheet, "S", iRowI, processDataLine.TempAmbM, formatD1); //Temp.Amb M - S
|
||||
CellData(worksheet, "T", iRowI, processDataLine.PressAmbM, formatInt); //Press.Amb M - T
|
||||
CellData(worksheet, "U", iRowI, processDataLine.HumidAmbM, formatD1); //Humid.Amb M - U
|
||||
|
||||
CellData(worksheet, "V", iRowI, processDataLine.PressUpME, formatInt); //Press. UP ME - V
|
||||
CellData(worksheet, "W", iRowI, processDataLine.PressDwME, formatInt); //Press. DW ME - W
|
||||
CellData(worksheet, "X", iRowI, processDataLine.PressDeME, formatInt); //Press. DE ME - X
|
||||
CellData(worksheet, "Y", iRowI, processDataLine.PressUpST, formatInt); //Press. UP ST - Y
|
||||
CellData(worksheet, "Z", iRowI, processDataLine.PressDwST, formatInt); //Press. DW ST - Z
|
||||
CellData(worksheet, "AA", iRowI, processDataLine.PressDES, formatInt); //Press. DES - AA
|
||||
CellData(worksheet, "AB", iRowI, processDataLine.PressUpEN, formatInt); //Press UP EN - AB
|
||||
CellData(worksheet, "AC", iRowI, processDataLine.PressDwEN, formatInt); //Press DW EN
|
||||
CellData(worksheet, "AD", iRowI, processDataLine.PressDEE, formatInt); //Press. DEE
|
||||
|
||||
CellData(worksheet, "AE", iRowI, processDataLine.TempUpME, formatD4); //Temp. UP ME
|
||||
CellData(worksheet, "AF", iRowI, processDataLine.TempDwME, formatD4); //Temp. DW ME
|
||||
CellData(worksheet, "AG", iRowI, processDataLine.TempDiME, formatD4); //Temp. DI ME
|
||||
CellData(worksheet, "AH", iRowI, processDataLine.TempLoME, formatD4); //Temp. LO ME
|
||||
CellData(worksheet, "AI", iRowI, processDataLine.TempHiME, formatD4); //Temp. HI ME
|
||||
CellData(worksheet, "AJ", iRowI, processDataLine.TempUpST, formatD4); //Temp. UP ST
|
||||
CellData(worksheet, "AK", iRowI, processDataLine.TempDwST, formatD4); //Temp. DW ST
|
||||
CellData(worksheet, "AL", iRowI, processDataLine.TempDiST, formatD4); //Temp. DI ST
|
||||
CellData(worksheet, "AM", iRowI, processDataLine.TempLoST, formatD4); //Temp. LO ST
|
||||
CellData(worksheet, "AN", iRowI, processDataLine.TempHiST, formatD4); //Temp. HI ST
|
||||
CellData(worksheet, "AO", iRowI, processDataLine.TempUpEN, formatD4); //Temp. UP EN
|
||||
CellData(worksheet, "AP", iRowI, processDataLine.TempDwEN, formatD4); //Temp. DW EN
|
||||
CellData(worksheet, "AQ", iRowI, processDataLine.TempDiEN, formatD4); //Temp. DI EN
|
||||
CellData(worksheet, "AR", iRowI, processDataLine.TempLoEN, formatD4); //Temp. LO EN
|
||||
CellData(worksheet, "AS", iRowI, processDataLine.TempHiEN, formatD4); //Temp. HI EN
|
||||
|
||||
//Mass vakues
|
||||
CellData(worksheet, "AT", iRowI, processDataLine.MassStRaw, formatD3); //Mass ST raw()
|
||||
CellData(worksheet, "AU", iRowI, processDataLine.MassSt, formatD3); //Mass ST ()
|
||||
CellData(worksheet, "AV", iRowI, processDataLine.MassEnRaw, formatD3); //Mass EN raw()
|
||||
CellData(worksheet, "AW", iRowI, processDataLine.MassEn, formatD3); //Mass EN ()
|
||||
CellData(worksheet, "AX", iRowI, processDataLine.Mass, formatD3); //Mass
|
||||
|
||||
//calculated values
|
||||
CellData(worksheet, "AY", iRowI, processDataLine.RoWa, formatD7); //Ro Wa
|
||||
CellData(worksheet, "AZ", iRowI, processDataLine.TempLnME, formatD7); //Temp. LN ME
|
||||
CellData(worksheet, "BA", iRowI, processDataLine.RoWat, formatD7); //Ro Wat
|
||||
CellData(worksheet, "BB", iRowI, processDataLine.RoAir, formatD7); // Ro AIR
|
||||
CellData(worksheet, "BC", iRowI, processDataLine.Kbuoyancy, formatD7); // Kbuoyancy
|
||||
CellData(worksheet, "BD", iRowI, processDataLine.DensityOfSample, formatInt); //Density of sample
|
||||
CellData(worksheet, "BE", iRowI, processDataLine.TTempRO, formatInt); //TTemp. RO()
|
||||
|
||||
CellData(worksheet, "BF", iRowI, processDataLine.QMax, formatD7); //Q max ()
|
||||
CellData(worksheet, "BG", iRowI, processDataLine.QMin, formatD7); //Q min ()
|
||||
CellData(worksheet, "BH", iRowI, processDataLine.QMean, formatD7); //Q mean
|
||||
CellData(worksheet, "BI", iRowI, processDataLine.Qctv, formatD7); //Qctv
|
||||
CellData(worksheet, "BJ", iRowI, processDataLine.VolRI, formatD7); //Vol. RI
|
||||
CellData(worksheet, "BK", iRowI, processDataLine.DivCorrection, formatD3); //Div correction
|
||||
CellData(worksheet, "BL", iRowI, processDataLine.T, formatD3); //T(s)()
|
||||
CellData(worksheet, "BM", iRowI, processDataLine.ERelRef, formatD7); //E rel.ref. ()
|
||||
//CellData(worksheet, "BN", iRowI, , formatD7);
|
||||
CellData(worksheet, "BO", iRowI, processDataLine.KMind, formatInt); //K MID ()
|
||||
//CellData(worksheet, "BP", iRowI, , formatInt);//Const.MAS
|
||||
|
||||
//Additional values
|
||||
CellData(worksheet, "BQ", iRowI, processDataLine.DiverterStartTime, formatInt); //Diverter start time
|
||||
CellData(worksheet, "BR", iRowI, processDataLine.DiverterEndTime, formatInt); //Diverter end time
|
||||
CellData(worksheet, "BS", iRowI, processDataLine.DiverterStartValeveOpenTime, formatInt); // BS [ms] Start valve open time
|
||||
CellData(worksheet, "BT", iRowI, processDataLine.DiverterStartValeveCloseTime, formatInt); // BT [ms] Start valve close time
|
||||
CellData(worksheet, "BU", iRowI, processDataLine.TempUpMax, formatD7); //Temp. UP max
|
||||
CellData(worksheet, "BV", iRowI, processDataLine.TempDwMax, formatD7); // Temp DW max
|
||||
CellData(worksheet, "BW", iRowI, processDataLine.TempUpMin, formatD7); //Temp UP min
|
||||
CellData(worksheet, "BX", iRowI, processDataLine.TempDwMin, formatD7); //Temp DW min
|
||||
CellData(worksheet, "BY", iRowI, processDataLine.TempT10, formatD7); //10 - T1,2
|
||||
|
||||
CellData(worksheet, "BZ", iRowI, processDataLine.TempAmbEn, formatD1); //Temp Amb En
|
||||
CellData(worksheet, "CA", iRowI, processDataLine.PressAmbEn, formatInt); //Press Amb En
|
||||
CellData(worksheet, "CB", iRowI, processDataLine.HumAmbEn, formatD1); //Hum Amb En
|
||||
|
||||
//checking
|
||||
|
||||
CellData(worksheet, "CC", iRowI, processDataLine.RefPulses, formatInt); //Ref pulses()
|
||||
CellData(worksheet, "CD", iRowI, processDataLine.DiverterTestTimeCorrection, formatInt); // CD [ms] Diverter test time correction
|
||||
|
||||
int distance = CommonExcell.GetColumnDistance("CE", "CZ");
|
||||
string startBlockColumn = "CE";
|
||||
foreach (ProcessDataMeterLine dataMeter in processDataLine.processDataMeterList){
|
||||
MeterCellData(worksheet, startBlockColumn, iRowI, dataMeter, distance);
|
||||
startBlockColumn = CommonExcell.GetExcelColumnByDistance(startBlockColumn, distance);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Populates a range of cells in an Excel worksheet with meter process data starting from a specified column and row.
|
||||
/// </summary>
|
||||
/// <param name="worksheet">The Excel worksheet where data will be inserted.</param>
|
||||
/// <param name="column">The starting column in the worksheet for inserting the meter process data.</param>
|
||||
/// <param name="iRowI">The row index in the worksheet where the data will be inserted.</param>
|
||||
/// <param name="data">An instance of the <see cref="ProcessDataMeterLine"/> class containing the meter process data to insert.</param>
|
||||
/// <param name="distance">An optional parameter specifying the distance for additional columns to leave empty after data insertion. Defaults to 0.</param>
|
||||
/// <returns>The next available column string after the last column used during data insertion.</returns>
|
||||
private static string MeterCellData(IXLWorksheet worksheet, string column, int iRowI, ProcessDataMeterLine data, int distance = 0)
|
||||
{
|
||||
int iIndex = 0;
|
||||
CellData(worksheet, column, iRowI, data.val[iIndex] , formatStr);//Position - Ser.No. - CE - 0
|
||||
string nextColumn = NextColumn(column); CellData(worksheet,nextColumn, iRowI, data.val[++iIndex] , formatInt);//Vol.Mt.st - CF
|
||||
nextColumn = NextColumn(nextColumn); CellData(worksheet,nextColumn, iRowI, data.val[++iIndex] , formatInt);//Vol.Mt.en - CG
|
||||
nextColumn = NextColumn(nextColumn); CellData(worksheet,nextColumn, iRowI, data.val[++iIndex] , formatD7);//Vol.Mt. - CH
|
||||
nextColumn = NextColumn(nextColumn); CellData(worksheet,nextColumn, iRowI, data.val[++iIndex], formatD7);//Vol.rm - CI
|
||||
nextColumn = NextColumn(nextColumn); CellData(worksheet,nextColumn, iRowI, data.val[++iIndex] , formatD6); // E rel. - CJ
|
||||
nextColumn = NextColumn(nextColumn); CellData(worksheet,nextColumn, iRowI, data.val[++iIndex] , formatInt); // U - CK
|
||||
nextColumn = NextColumn(nextColumn); CellData(worksheet,nextColumn, iRowI, data.val[++iIndex] , formatInt); //Pulses() -
|
||||
nextColumn = NextColumn(nextColumn); CellData(worksheet,nextColumn, iRowI, data.val[++iIndex] , formatInt); //Ref pulses_ni()
|
||||
nextColumn = NextColumn(nextColumn); CellData(worksheet,nextColumn, iRowI, data.val[++iIndex] , formatD4); //T(s)()_ni
|
||||
nextColumn = NextColumn(nextColumn); CellData(worksheet,nextColumn, iRowI, data.val[++iIndex] , formatStr);//evaluation
|
||||
nextColumn = NextColumn(nextColumn); CellData(worksheet,nextColumn, iRowI, data.val[++iIndex] , formatD4);//Pulses/l - CP
|
||||
nextColumn = NextColumn(nextColumn); CellData(worksheet,nextColumn, iRowI, data.val[++iIndex] , formatInt);//imp/l
|
||||
nextColumn = NextColumn(nextColumn); CellData(worksheet,nextColumn, iRowI, data.val[++iIndex] , formatInt);//div
|
||||
nextColumn = NextColumn(nextColumn); CellData(worksheet,nextColumn, iRowI, data.val[++iIndex] , formatInt);//Vend
|
||||
nextColumn = NextColumn(nextColumn); CellData(worksheet,nextColumn, iRowI, data.val[++iIndex] , formatInt);//T end - 15
|
||||
|
||||
if (distance > 0)
|
||||
{
|
||||
string lastColumn = CommonExcell.GetExcelColumnByDistance(column, distance);
|
||||
int columnDistance = CommonExcell.GetColumnDistance(nextColumn, lastColumn);
|
||||
for (int i = 1; i < columnDistance; i++)
|
||||
{
|
||||
if ((iIndex + 1) < data.val.Length)
|
||||
{
|
||||
nextColumn = NextColumn(nextColumn);
|
||||
CellData(worksheet, nextColumn, iRowI, data.val[++iIndex], formatInt);
|
||||
}
|
||||
else
|
||||
{
|
||||
nextColumn = NextColumn(nextColumn); CellData(worksheet,nextColumn, iRowI, 0 , formatInt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nextColumn;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static void CellData(IXLWorksheet worksheet, string column, int iRowI, XLCellValue value, string format = null)
|
||||
{
|
||||
worksheet.Cell($"{column}{iRowI}").Value = value;
|
||||
if (format != null)
|
||||
{
|
||||
worksheet.Cell($"{column}{iRowI}").Style.NumberFormat.Format = format; // Ensure integer format
|
||||
}
|
||||
}
|
||||
|
||||
public static string NextColumn(string column)
|
||||
{
|
||||
if (string.IsNullOrEmpty(column))
|
||||
return "A";
|
||||
|
||||
char[] chars = column.ToUpper().ToCharArray();
|
||||
int i = chars.Length - 1;
|
||||
|
||||
while (i >= 0)
|
||||
{
|
||||
if (chars[i] != 'Z')
|
||||
{
|
||||
chars[i]++;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
chars[i] = 'A';
|
||||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
if (i < 0)
|
||||
return "A" + new string(chars);
|
||||
|
||||
return new string(chars);
|
||||
}
|
||||
|
||||
public static int GetColumnDistance(string col1, string col2)
|
||||
{
|
||||
return ColumnToNumber(col2) - ColumnToNumber(col1);
|
||||
}
|
||||
|
||||
public static int ColumnToNumber(string col)
|
||||
{
|
||||
int number = 0;
|
||||
foreach (char c in col.ToUpper())
|
||||
{
|
||||
number = number * 26 + (c - 'A' + 1);
|
||||
}
|
||||
return number;
|
||||
}
|
||||
|
||||
public static string GetExcelColumnByDistance(string startColumn, int distance)
|
||||
{
|
||||
int startNumber = ColumnToNumber(startColumn);
|
||||
int targetNumber = startNumber + distance;
|
||||
|
||||
return NumberToColumn(targetNumber);
|
||||
}
|
||||
|
||||
private static string NumberToColumn(int number)
|
||||
{
|
||||
string column = string.Empty;
|
||||
|
||||
while (number > 0)
|
||||
{
|
||||
number--;
|
||||
column = (char)('A' + (number % 26)) + column;
|
||||
number /= 26;
|
||||
}
|
||||
|
||||
return column;
|
||||
}
|
||||
|
||||
public static bool AreClose(double valA, double valB, double tolerance = 0.0001)
|
||||
{
|
||||
if ((valA + tolerance) > valB && (valA - tolerance) < valB)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using ClosedXML.Excel;
|
||||
|
||||
namespace Results.Uncertainty.CommonTable
|
||||
{
|
||||
public class Cell
|
||||
{
|
||||
public int IRow { get; }
|
||||
public int IColumn { get; }
|
||||
public XLCellValue Value { get; set; }
|
||||
|
||||
// The names (if any) of the row/column
|
||||
public string ColumnName { get; }
|
||||
public string RowName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Excel‐style address, e.g. “B3”.
|
||||
/// </summary>
|
||||
public string Address => $"{ToLetter(IColumn + 1)}{IRow + 1}";
|
||||
|
||||
public Cell(int col, int row, XLCellValue value,
|
||||
string colName = null, string rowName = null)
|
||||
{
|
||||
IColumn = col;
|
||||
IRow = row;
|
||||
Value = value;
|
||||
ColumnName = colName;
|
||||
RowName = rowName;
|
||||
}
|
||||
|
||||
// Convert 1-based column number into letters
|
||||
private static string ToLetter(int col)
|
||||
{
|
||||
var s = "";
|
||||
while (col > 0)
|
||||
{
|
||||
int m = (col - 1) % 26;
|
||||
s = (char)('A' + m) + s;
|
||||
col = (col - m - 1) / 26;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,232 @@
|
||||
using System.Collections.Generic;
|
||||
using ClosedXML.Excel;
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using ClosedXML.Excel;
|
||||
|
||||
namespace Results.Uncertainty.CommonTable
|
||||
{
|
||||
public class Table
|
||||
{
|
||||
private int iOffsetRows = 0;
|
||||
private int iOffsetColumns = 0;
|
||||
|
||||
public int IOffsetRows
|
||||
{
|
||||
get => iOffsetRows;
|
||||
set => iOffsetRows = value;
|
||||
}
|
||||
|
||||
public int IOffsetColumns
|
||||
{
|
||||
get => iOffsetColumns;
|
||||
set => iOffsetColumns = value;
|
||||
}
|
||||
|
||||
// The grid of cells
|
||||
public IList<IList<Cell>> Cells { get; private set; }
|
||||
= new List<IList<Cell>>();
|
||||
|
||||
// Optional names for columns and rows
|
||||
public IList<string> ColumnNames { get; private set; }
|
||||
= new List<string>();
|
||||
public IList<string> RowNames { get; private set; }
|
||||
= new List<string>();
|
||||
|
||||
public Table() { }
|
||||
|
||||
|
||||
|
||||
public void AddColumnExcel(string nameStart, string nameEnd)
|
||||
{
|
||||
int distance = CommonExcell.GetColumnDistance(nameStart, nameEnd);
|
||||
int iStart = CommonExcell.ColumnToNumber(nameStart);
|
||||
AddColumn(nameStart);
|
||||
for (int i = 0; i < distance; i++)
|
||||
{
|
||||
AddColumn(CommonExcell.GetExcelColumnByDistance(nameStart, i+1));
|
||||
}
|
||||
}
|
||||
|
||||
public void GenerateTable_RowsColumns_Excel(string nameStart, string nameEnd, int iRowsCount)
|
||||
{
|
||||
AddColumnExcel(nameStart, nameEnd);
|
||||
|
||||
for (int i = 0; i < iRowsCount; i++)
|
||||
{
|
||||
AddRow(i.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a new column (with optional name) and returns its index.
|
||||
/// </summary>
|
||||
public int AddColumn(string name = null)
|
||||
{
|
||||
int colIndex = ColumnNames.Count;
|
||||
ColumnNames.Add(name);
|
||||
|
||||
// Grow every existing row by one
|
||||
for (int r = 0; r < Cells.Count; r++)
|
||||
{
|
||||
Cells[r].Add(new Cell(colIndex, r, new XLCellValue(), name, RowNames[r]));
|
||||
}
|
||||
|
||||
return colIndex;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a new row (with optional name) and returns its index.
|
||||
/// </summary>
|
||||
public int AddRow(string name = null)
|
||||
{
|
||||
int rowIndex = Cells.Count;
|
||||
RowNames.Add(name);
|
||||
|
||||
var newRow = new List<Cell>(ColumnNames.Count);
|
||||
// Initialize with empty cells
|
||||
for (int c = 0; c < ColumnNames.Count; c++)
|
||||
{
|
||||
newRow.Add(new Cell(c, rowIndex, new XLCellValue(), ColumnNames[c], name));
|
||||
}
|
||||
|
||||
Cells.Add(newRow);
|
||||
return rowIndex;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ensures the given [row,col] exists, creating rows/columns as needed.
|
||||
/// </summary>
|
||||
private void EnsurePosition(int rowIndex, int colIndex)
|
||||
{
|
||||
while (Cells.Count <= rowIndex)
|
||||
AddRow();
|
||||
|
||||
var row = Cells[rowIndex];
|
||||
while (row.Count <= colIndex)
|
||||
AddColumn();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the value of the cell at [rowIndex, colIndex].
|
||||
/// </summary>
|
||||
public void AddCell(int rowIndex, int colIndex, XLCellValue value)
|
||||
{
|
||||
EnsurePosition(rowIndex, colIndex);
|
||||
Cells[rowIndex][colIndex].Value = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the value of the cell at [rowIndex, columnName].
|
||||
/// If the columnName doesn’t exist yet, it’s created.
|
||||
/// </summary>
|
||||
public void AddCell(int rowIndex, string columnName, XLCellValue value)
|
||||
{
|
||||
int colIndex = ColumnNames.IndexOf(columnName);
|
||||
if (colIndex < 0)
|
||||
colIndex = AddColumn(columnName);
|
||||
|
||||
AddCell(rowIndex, colIndex, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves a cell by numeric coordinates.
|
||||
/// </summary>
|
||||
public Cell GetCell(int rowIndex, int colIndex)
|
||||
=> Cells[rowIndex][colIndex];
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves a cell by rowIndex and columnName.
|
||||
/// </summary>
|
||||
public Cell GetCell(int rowIndex, string columnName)
|
||||
{
|
||||
int colIndex = ColumnNames.IndexOf(columnName);
|
||||
if (colIndex < 0)
|
||||
throw new ArgumentException($"Column '{columnName}' not found.");
|
||||
return GetCell(rowIndex, colIndex);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes the entire table into the given worksheet,
|
||||
/// optionally including the header row of column names.
|
||||
/// </summary>
|
||||
public void ToWorksheet(IXLWorksheet ws, bool includeHeaders = true)
|
||||
{
|
||||
int startRow = 1;
|
||||
if (includeHeaders)
|
||||
{
|
||||
for (int c = 0; c < ColumnNames.Count; c++)
|
||||
ws.Cell(1, c + 1).Value = ColumnNames[c] ?? string.Empty;
|
||||
startRow = 2;
|
||||
}
|
||||
|
||||
for (int r = 0; r < Cells.Count; r++)
|
||||
{
|
||||
for (int c = 0; c < Cells[r].Count; c++)
|
||||
{
|
||||
ws.Cell(r + startRow, c + 1).Value = Cells[r][c].Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes the entire table into the given worksheet,
|
||||
/// optionally including the header row of column names.
|
||||
/// </summary>
|
||||
public void ToWorksheetWithOffset(IXLWorksheet ws, int rowsOffset = 1, int columnsOffset = 0, bool includeHeaders = true)
|
||||
{
|
||||
|
||||
|
||||
int startRow = rowsOffset;
|
||||
if (includeHeaders)
|
||||
{
|
||||
for (int c = 0; c < ColumnNames.Count; c++)
|
||||
ws.Cell(1, c + 1).Value = ColumnNames[c] ?? string.Empty;
|
||||
startRow = 2;
|
||||
}
|
||||
|
||||
for (int r = 0; r < Cells.Count; r++)
|
||||
{
|
||||
for (int c = 0; c < Cells[r].Count; c++)
|
||||
{
|
||||
if(!(Cells[r][c].Value.IsBlank || Cells[r][c].Value.Type == XLDataType.Blank))
|
||||
{
|
||||
ws.Cell(r + startRow, c + 1 + columnsOffset).Value = Cells[r][c].Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns all cells in the given row (by zero‐based index).
|
||||
/// </summary>
|
||||
public IList<Cell> GetRow(int rowIndex)
|
||||
{
|
||||
if (rowIndex < 0 || rowIndex >= Cells.Count)
|
||||
throw new IndexOutOfRangeException($"Row {rowIndex} does not exist.");
|
||||
return Cells[rowIndex];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns all cells in the given column (by zero‐based index).
|
||||
/// </summary>
|
||||
public IList<Cell> GetColumn(int colIndex)
|
||||
{
|
||||
if (colIndex < 0 || colIndex >= ColumnNames.Count)
|
||||
throw new IndexOutOfRangeException($"Column {colIndex} does not exist.");
|
||||
var list = new List<Cell>();
|
||||
for (int r = 0; r < Cells.Count; r++)
|
||||
{
|
||||
// skip if that row hasn’t grown that far yet
|
||||
if (Cells[r].Count > colIndex)
|
||||
list.Add(Cells[r][colIndex]);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
///
|
||||
/// Copyright (c) 2023 Sensus Slovensko a.s.
|
||||
///
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Common;
|
||||
|
||||
namespace Results.Uncertainty
|
||||
{
|
||||
/// <summary>
|
||||
/// Action of a DataEntry field
|
||||
/// </summary>
|
||||
public enum Ac
|
||||
{
|
||||
[Description("Clear")] Clear, /// Clear when the form is open, save on OK
|
||||
[Description("Last from history")] HistoryLast,
|
||||
[Description("Load")] Load, /// Load from water meters when the form is open, save on OK
|
||||
[Description("Load (readonly)")] LoadReadOnly, /// Load from water meters when the form is open, prevent changes, do not save
|
||||
[Description("Set")] Set, /// Set to 'yes' when the form is open
|
||||
Count,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Content of a DataEntry field
|
||||
/// </summary>
|
||||
public enum Ct
|
||||
{
|
||||
[Description("None")] None,
|
||||
[Description("Serial nr.")] SerialNr,
|
||||
[Description("Serial nr. aux")] SerialNrAux,
|
||||
[Description("Radio address")] RadioAddress,
|
||||
[Description("Year of calibration")] YearOfCalibration,
|
||||
[Description("Start state")] StartState,
|
||||
[Description("Start state aux")] StartStateAux,
|
||||
[Description("End state")] EndState,
|
||||
[Description("End state aux")] EndStateAux,
|
||||
[Description("Archive path")] ArchivePath,
|
||||
[Description("WM Order")] WmOrder,
|
||||
[Description("Batch order")] BatchOrder,
|
||||
[Description("Batch and WM order")] BatchAndWmOrder,
|
||||
[Description("WM Remark")] WmRemark,
|
||||
[Description("Batch remark")] BatchRemark,
|
||||
[Description("Batch and WM remark")] BatchAndWmRemark,
|
||||
[Description("Print label")] PrintLabel,
|
||||
#if ORACLE_DB
|
||||
[Description("Prefix")] Prefix,
|
||||
[Description("Suffix")] Suffix,
|
||||
#endif
|
||||
Count
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Function of the multi purpose button
|
||||
/// </summary>
|
||||
public enum MultiPurposeBtnFunction
|
||||
{
|
||||
None,
|
||||
AutoSN,
|
||||
PrintLabelsOnOff,
|
||||
}
|
||||
|
||||
///
|
||||
/// Identifies image instance
|
||||
///
|
||||
public enum Tst
|
||||
{
|
||||
Start,
|
||||
End,
|
||||
Both,
|
||||
Collect,
|
||||
}
|
||||
|
||||
///
|
||||
/// Image rotation
|
||||
///
|
||||
public enum Rotation
|
||||
{
|
||||
R0,
|
||||
R90,
|
||||
R180,
|
||||
R270,
|
||||
Count
|
||||
}
|
||||
|
||||
public class DEItem
|
||||
{
|
||||
public readonly Ct Content;
|
||||
public readonly string Caption;
|
||||
public readonly Ac Action;
|
||||
public readonly int Width;
|
||||
|
||||
public DEItem(Ct content, string caption, Ac action, int width)
|
||||
{
|
||||
Content = content;
|
||||
Caption = caption;
|
||||
Action = action;
|
||||
Width = width;
|
||||
}
|
||||
|
||||
|
||||
static IList<DEItem> items = new List<DEItem>();
|
||||
///
|
||||
public static void ClearItems() { items.Clear(); }
|
||||
public static void AddItem(DEItem item) { items.Add(item); }
|
||||
public static void AddItem(Ct content, string caption, Ac action, int width)
|
||||
{
|
||||
items.Add(new DEItem(content, caption, action, width));
|
||||
}
|
||||
public static IList<DEItem> GetItems() { return items; }
|
||||
|
||||
|
||||
static IList<DEItem> columns = new List<DEItem>();
|
||||
///
|
||||
public static void ClearColumns() { columns.Clear(); }
|
||||
public static void AddColumn(DEItem column) { columns.Add(column); }
|
||||
public static void AddColumn(Ct content, string caption, Ac action, int width)
|
||||
{
|
||||
columns.Add(new DEItem(content, caption, action, width));
|
||||
}
|
||||
public static IList<DEItem> GetColumns() { return columns; }
|
||||
|
||||
|
||||
static IList<DEItem> summaryColumns = new List<DEItem>();
|
||||
///
|
||||
public static void ClearSummaryColumns() { summaryColumns.Clear(); }
|
||||
public static void AddSummaryColumn(DEItem column) { summaryColumns.Add(column); }
|
||||
public static void AddSummaryColumn(Ct content, string caption, Ac action, int width)
|
||||
{
|
||||
summaryColumns.Add(new DEItem(content, caption, action, width));
|
||||
}
|
||||
public static IList<DEItem> GetSummaryColumns() { return summaryColumns; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
///
|
||||
/// Copyright (c) 2018-2023 Sensus Slovensko a.s.
|
||||
///
|
||||
|
||||
using System.Windows.Forms;
|
||||
using Results.Entities;
|
||||
|
||||
namespace Results.Uncertainty
|
||||
{
|
||||
public class Strings
|
||||
{
|
||||
public static string yes = "yes";
|
||||
public static string no = "no";
|
||||
}
|
||||
|
||||
public class DEUtils
|
||||
{
|
||||
public static string GetContent(Ct content, WaterMeter wm)
|
||||
{
|
||||
if (wm == null) return string.Empty;
|
||||
|
||||
switch (content)
|
||||
{
|
||||
default:
|
||||
case Ct.None: return string.Empty;
|
||||
case Ct.SerialNr: return (!wm.Disabled && wm.SerialNr != null) ? wm.SerialNr : string.Empty;
|
||||
case Ct.SerialNrAux: return (!wm.Disabled && wm.SerialNrAux != null) ? wm.SerialNrAux : string.Empty;
|
||||
case Ct.RadioAddress: return (!wm.Disabled && wm.RadioAddress != null) ? wm.RadioAddress : string.Empty;
|
||||
case Ct.YearOfCalibration: return (!wm.Disabled) ? wm.YearOfProduction.ToString() : string.Empty;
|
||||
case Ct.StartState: return (!wm.Disabled && wm.GetStartState() != null) ? wm.GetStartState() : string.Empty;
|
||||
case Ct.StartStateAux: return string.Empty;
|
||||
case Ct.EndState: return (!wm.Disabled && wm.EndState != null) ? wm.EndState : string.Empty;
|
||||
case Ct.EndStateAux: return (!wm.Disabled && wm.GetEndStateAux() != null) ? wm.GetEndStateAux() : string.Empty;
|
||||
case Ct.ArchivePath: return (!wm.Disabled && wm.ArchivePath != null) ? wm.ArchivePath : string.Empty;
|
||||
|
||||
case Ct.WmOrder: return (!wm.Disabled && wm.PurchaseOrder != null) ? wm.PurchaseOrder : string.Empty;
|
||||
case Ct.BatchOrder: return (wm.Batch != null && wm.Batch.PurchaseOrder != null) ? wm.Batch.PurchaseOrder : string.Empty;
|
||||
case Ct.BatchAndWmOrder: return (wm.Batch != null && wm.Batch.PurchaseOrder != null) ? wm.Batch.PurchaseOrder : string.Empty;
|
||||
|
||||
case Ct.WmRemark: return (!wm.Disabled && wm.Remark != null) ? wm.Remark : string.Empty;
|
||||
case Ct.BatchRemark: return (wm.Batch != null && wm.Batch.Remark != null) ? wm.Batch.Remark : string.Empty;
|
||||
case Ct.BatchAndWmRemark: return (wm.Batch != null && wm.Batch.Remark != null) ? wm.Batch.Remark : string.Empty;
|
||||
case Ct.PrintLabel: return wm.PrintLabel ? Strings.yes : Strings.no;
|
||||
#if ORACLE_DB
|
||||
case Ct.Prefix: return (!wm.Disabled && wm.Prefix != null) ? wm.Prefix : string.Empty;
|
||||
case Ct.Suffix: return (!wm.Disabled && wm.Suffix != null) ? wm.Suffix : string.Empty;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
public static void PutContent(Ct content, WaterMeter wm, string value)
|
||||
{
|
||||
if (wm == null || wm.Disabled) return;
|
||||
|
||||
int year;
|
||||
|
||||
switch (content)
|
||||
{
|
||||
default:
|
||||
case Ct.None: return;
|
||||
case Ct.SerialNr: wm.SerialNr = value; return;
|
||||
case Ct.SerialNrAux: wm.SerialNrAux = value; return;
|
||||
case Ct.RadioAddress: wm.RadioAddress = value; return;
|
||||
case Ct.YearOfCalibration: if (int.TryParse(value, out year)) wm.YearOfProduction = year; return;
|
||||
case Ct.StartState: wm.SetStartState(value); return;
|
||||
case Ct.StartStateAux: return;
|
||||
case Ct.EndState: wm.EndState = value; return;
|
||||
case Ct.EndStateAux: wm.SetEndStateAux(value); return;
|
||||
case Ct.ArchivePath: wm.ArchivePath = value; return;
|
||||
|
||||
case Ct.WmOrder:
|
||||
wm.PurchaseOrder = value;
|
||||
return;
|
||||
|
||||
case Ct.BatchOrder:
|
||||
case Ct.BatchAndWmOrder:
|
||||
if (wm.Batch != null) wm.Batch.PurchaseOrder = value;
|
||||
return;
|
||||
|
||||
case Ct.WmRemark:
|
||||
wm.Remark = value;
|
||||
return;
|
||||
|
||||
case Ct.BatchRemark:
|
||||
case Ct.BatchAndWmRemark:
|
||||
if (wm.Batch != null) wm.Batch.Remark = value;
|
||||
return;
|
||||
|
||||
case Ct.PrintLabel:
|
||||
wm.PrintLabel = (value == Strings.yes);
|
||||
return;
|
||||
#if ORACLE_DB
|
||||
case Ct.Prefix: wm.Prefix = value; return;
|
||||
case Ct.Suffix: wm.Suffix = value; return;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load Purchase order combo box items from the LocalSettings PurchaseOrderHistory array
|
||||
/// </summary>
|
||||
/// <param name="comboBox">Puchase order ComboBox</param>
|
||||
public static void PrepareCombo(ComboBox comboBox, string[] history, bool emptyOnStart = false)
|
||||
{
|
||||
int historyLen = (history != null) ? history.Length : 0;
|
||||
|
||||
if (!emptyOnStart && (historyLen > 0))
|
||||
{
|
||||
comboBox.Text = history[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
comboBox.Text = string.Empty;
|
||||
}
|
||||
|
||||
for (int i = 0; i < historyLen; i++)
|
||||
{
|
||||
comboBox.Items.Add(history[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Results.Uncertainty
|
||||
{
|
||||
public enum DocumentSheets
|
||||
{
|
||||
[Description("RADATA")] RADATA,
|
||||
[Description("DATA")] DATA,
|
||||
[Description("IC")] IC,
|
||||
[Description("CERTIFICATE")] CERTIFICATE,
|
||||
[Description("L")] L,
|
||||
[Description("REF METER CC")] REF_METER_CC,
|
||||
[Description("Meter1ALL")] Meter1ALL,
|
||||
[Description("UNCTABLE")] UNCTABLE,
|
||||
[Description("CC")] CC,
|
||||
[Description("CALINPUTS")] CALIMPUTS,
|
||||
[Description("UNCTEST1")] UNCTEST1,
|
||||
[Description("UNCTEST2")] UNCTEST2,
|
||||
[Description("UNCTEST3")] UNCTEST3,
|
||||
[Description("UNCTEST4")] UNCTEST4,
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static class EnumExtensions
|
||||
{
|
||||
public static string GetDescription(this Enum value)
|
||||
{
|
||||
FieldInfo field = value.GetType().GetField(value.ToString());
|
||||
DescriptionAttribute attribute = field?.GetCustomAttribute<DescriptionAttribute>();
|
||||
|
||||
return attribute?.Description ?? value.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,325 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using Common;
|
||||
using Results.Entities;
|
||||
|
||||
namespace Results.Uncertainty
|
||||
{
|
||||
public class ProcessDataLine
|
||||
{
|
||||
public DateTime DateTime;
|
||||
public int Batch; //"B" //Batch - B
|
||||
public string TestName; //"C", "Q1 (1/5)", formatStr); //Test Name - C
|
||||
public int Reports; //"D", 5, formatInt); //Reports
|
||||
public int RepCyc; //"E", 1, formatInt); //Rep cyc
|
||||
public string TestMeth; //"F", "FlyingStartMassCollection", formatStr); //Test Meth.
|
||||
public int TargetVOL; //"G", 1, formatInt); //Target VOL.
|
||||
public double TargetQMin; //"H", 0.005, formatD4); //Target Q -
|
||||
public double TargetQPlus; //"I", 0.0055, formatD4); //Target Q +
|
||||
public int ErrLimitMin; //"J", -2, formatInt); //Err. LIMIT -
|
||||
public int ErrLimitPlus; //"K", -2, formatInt); //Err. LIMIT +
|
||||
public int TargetTempFrom; //"L", 15, formatInt); //Target temp from - L
|
||||
public int TargetTempTo; //"M", 25, formatInt); //Target temp to - M
|
||||
public int TargetPressFrom; //"N", 0, formatInt); //Target press from - N
|
||||
public int TargetPressTo; //"O", 16, formatInt); //Target press to - O
|
||||
public string MIDNumberName; //"P", "I4", formatStr);
|
||||
public double MIDNumberValue; //"Q", 998.1848d, formatD4); //MID number - PQ
|
||||
public string COR; //"R", "WT2", formatStr); //COR - R
|
||||
public double TempAmbM; //"S", 20.0, formatD1); //Temp.Amb M - S
|
||||
public int PressAmbM; //"T", 1010, formatInt); //Press.Amb M - T
|
||||
public double HumidAmbM; //"U", 52.7, formatD1); //Humid.Amb M - U
|
||||
public int PressUpME; //"V", 272, formatInt); //Press. UP ME - V
|
||||
public int PressDwME; //"W", 277, formatInt); //Press. DW ME - W
|
||||
public int PressDeME; //"X", 0, formatInt); //Press. DE ME - X
|
||||
public int PressUpST; //"Y", 272, formatInt); //Press. UP ST - Y
|
||||
public int PressDwST; //"Z", 277, formatInt); //Press. DW ST - Z
|
||||
public int PressDES; //"AA", 0, formatInt); //Press. DES - AA
|
||||
public int PressUpEN; //"AB", 271, formatInt); //Press UP EN - AB
|
||||
public int PressDwEN; //"AC", 276, formatInt); //Press DW EN
|
||||
public int PressDEE; //"AD", 0, formatInt); //Press. DEE
|
||||
public double TempUpME; //"AE", 17.27103, formatD4); //Temp. UP ME
|
||||
public double TempDwME; //"AF", 17.84066, formatD4); //Temp. DW ME
|
||||
public double TempDiME; //"AG", 18.25793, formatD4); //Temp. DI ME
|
||||
public double TempLoME; //"AH", 0, formatD4); //Temp. LO ME
|
||||
public double TempHiME; //"AI", 0, formatD4); //Temp. HI ME
|
||||
public double TempUpST; //"AJ", 17.18227, formatD4); //Temp. UP ST
|
||||
public double TempDwST; //"AK", 17.78378, formatD4); //Temp. DW ST
|
||||
public double TempDiST; //"AL", 18.1312, formatD4); //Temp. DI ST
|
||||
public double TempLoST; //"AM", 0, formatD4); //Temp. LO ST
|
||||
public double TempHiST; //"AN", 0, formatD4); //Temp. HI ST
|
||||
public double TempUpEN; //"AO", 17.3036, formatD4); //Temp. UP EN
|
||||
public double TempDwEN; //"AP", 17.88913, formatD4); //Temp. DW EN
|
||||
public double TempDiEN; //"AQ", 18.35797, formatD4); //Temp. DI EN
|
||||
public double TempLoEN; //"AR", 0, formatD4); //Temp. LO EN
|
||||
public double TempHiEN; //"AS", 0, formatD4); //Temp. HI EN
|
||||
|
||||
//Mass vakues
|
||||
public double MassStRaw; // "AT", iRowI, 18.104, formatD3); //Mass ST raw()
|
||||
public double MassSt; // "AU", iRowI, 18.104, formatD3); //Mass ST ()
|
||||
public double MassEnRaw; // "AV", iRowI, 19.087, formatD3); //Mass EN raw()
|
||||
public double MassEn; // "AW", iRowI, 19.087, formatD3); //Mass EN ()
|
||||
public double Mass; // "AX", iRowI, 0.983, formatD3); //Mass
|
||||
|
||||
//calculated values
|
||||
public double RoWa; // "AY", iRowI, 999.0094727, formatD7); //Ro Wa
|
||||
public double TempLnME; // "AZ", iRowI, 17.55585, formatD7); //Temp. LN ME
|
||||
public double RoWat; // "BA", iRowI, 999.2654076, formatD7); //Ro Wat
|
||||
public double RoAir; // "BB", iRowI, 0, formatD7); // Ro AIR
|
||||
public double Kbuoyancy; // "BC", iRowI, 1.00103, formatD7); // Kbuoyancy
|
||||
public int DensityOfSample; // "BD", iRowI, 998, formatInt); //Density of sample
|
||||
public int TTempRO; // "BE", iRowI, 23, formatInt); //TTemp. RO()
|
||||
|
||||
public double QMax; // "BF", iRowI, 0.00539688, formatD7); //Q max ()
|
||||
public double QMin; // "BG", iRowI, 0.005288206, formatD7); //Q min ()
|
||||
public double QMean; // "BH", iRowI, 0.005257821, formatD7); //Q mean
|
||||
public double Qctv; ///< "BI", iRowI, 23, formatD7); //Qctv
|
||||
public double VolRI; // "BJ", iRowI, 1.00006944444444, formatD7); //Vol. RI
|
||||
public double DivCorrection; // "BK", iRowI, 0, formatD3); //Div correction
|
||||
public double T; // "BL", iRowI, 674.242981, formatD3); //T(s)()
|
||||
|
||||
public double ERelRef; ///< "BM", iRowI, 1.557125667, formatD7); //E rel.ref. ()
|
||||
|
||||
//CellData(worksheet, "BN", iRowI, , formatD7);
|
||||
public int KMind; ///< "BO", iRowI, 14400, formatInt); //K MID ()
|
||||
//CellData(worksheet, "BP", iRowI, , formatInt);//Const.MAS
|
||||
|
||||
//Additional values
|
||||
public int DiverterStartTime; //"BQ", iRowI, 84, formatInt); //Diverter start time
|
||||
|
||||
public int DiverterEndTime; //"BR", iRowI, 86, formatInt); //Diverter end time
|
||||
|
||||
public int DiverterStartValeveOpenTime;//"BS", iRowI, 0, formatInt); // /// BS [ms] Start valve open time
|
||||
public int DiverterStartValeveCloseTime;//"BT", iRowI, 0, formatInt); // /// BT [ms] Start valve close time
|
||||
|
||||
public double TempUpMax; //"BU", iRowI, 17.40029, formatD7); //Temp. UP max
|
||||
public double TempDwMax; //"BV", iRowI, 17.91978, formatD7); // Temp DW max
|
||||
public double TempUpMin; //"BW", iRowI, 17.14815, formatD7); //Temp UP min
|
||||
public double TempDwMin; //"BX", iRowI, 17.74739, formatD7); //Temp DW min
|
||||
public double TempT10; //"BY", iRowI, 0, formatD7); //10 - T1,2
|
||||
|
||||
public double TempAmbEn; //"BZ", iRowI, 20.1, formatD1); //Temp Amb En
|
||||
public int PressAmbEn; //"CA", iRowI, 1010, formatInt); //Press Amb En
|
||||
public double HumAmbEn; //"CB", iRowI, 52.8, formatD1); //Hum Amb En
|
||||
|
||||
//checking
|
||||
|
||||
public int RefPulses; //"CC", iRowI, 14401, formatInt); //Ref pulses()
|
||||
public int DiverterTestTimeCorrection; //CellData(worksheet, "CD", iRowI, , formatInt); /// CD [ms] Diverter test time correction
|
||||
|
||||
public IList<ProcessDataMeterLine> processDataMeterList = new List<ProcessDataMeterLine>();
|
||||
|
||||
|
||||
|
||||
public void InitDefault()
|
||||
{
|
||||
DateTime = DateTime.Now;
|
||||
Batch = 914;
|
||||
TestName = "Q1 (1/5)";
|
||||
Reports = 5;
|
||||
RepCyc = 1;
|
||||
TestMeth = "FlyingStartMassCollection";
|
||||
TargetVOL = 1;
|
||||
TargetQMin = 0.005;
|
||||
TargetQPlus = 0.0055;
|
||||
ErrLimitMin = -2;
|
||||
ErrLimitPlus = -2;
|
||||
TargetTempFrom = 15;
|
||||
TargetTempTo = 25;
|
||||
TargetPressFrom = 0;
|
||||
TargetPressTo = 16;
|
||||
MIDNumberName = "I4";
|
||||
MIDNumberValue = 998.1848d;
|
||||
COR = "WT2";
|
||||
TempAmbM = 20.0;
|
||||
PressAmbM = 1010;
|
||||
HumidAmbM = 52.7;
|
||||
PressUpME = 272;
|
||||
PressDwME = 277;
|
||||
PressDeME = 0;
|
||||
PressUpST = 272;
|
||||
PressDwST = 277;
|
||||
PressDES = 0;
|
||||
PressUpEN = 271;
|
||||
PressDwEN = 276;
|
||||
PressDEE = 0;
|
||||
TempUpME = 17.27103;
|
||||
TempDwME = 17.84066;
|
||||
TempDiME = 18.25793;
|
||||
TempLoME = 0;
|
||||
TempHiME = 0;
|
||||
TempUpST = 17.18227;
|
||||
TempDwST = 17.78378;
|
||||
TempDiST = 18.1312;
|
||||
TempLoST = 0;
|
||||
TempHiST = 0;
|
||||
TempUpEN = 17.3036;
|
||||
TempDwEN = 17.88913;
|
||||
TempDiEN = 18.35797;
|
||||
TempLoEN = 0;
|
||||
TempHiEN = 0;
|
||||
MassStRaw = 18.104;
|
||||
MassSt = 18.104;
|
||||
MassEnRaw = 19.087;
|
||||
MassEn = 19.087;
|
||||
Mass = 0.983;
|
||||
RoWa = 999.0094727;
|
||||
TempLnME = 17.55585;
|
||||
RoWat = 999.2654076;
|
||||
RoAir = 0;
|
||||
Kbuoyancy = 1.00103;
|
||||
DensityOfSample = 998;
|
||||
TTempRO = 23;
|
||||
QMax = 0.00539688;
|
||||
QMin = 0.005288206;
|
||||
QMean = 0.005257821;
|
||||
Qctv = 23;
|
||||
VolRI = 1.00006944444444;
|
||||
DivCorrection = 0;
|
||||
T = 674.242981;
|
||||
ERelRef = 1.557125667;
|
||||
KMind = 14400;
|
||||
DiverterStartTime = 84;
|
||||
DiverterEndTime = 86;
|
||||
TempUpMax = 17.40029;
|
||||
TempDwMax = 17.91978;
|
||||
TempUpMin = 17.14815;
|
||||
TempDwMin = 17.74739;
|
||||
TempT10 = 0;
|
||||
TempAmbEn = 20.1;
|
||||
PressAmbEn = 1010;
|
||||
HumAmbEn = 52.8;
|
||||
RefPulses = 14401;
|
||||
DiverterTestTimeCorrection = 0;
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
|
||||
|
||||
ProcessDataMeterLine meterLine = new ProcessDataMeterLine();
|
||||
meterLine.InitDefault();
|
||||
meterLine.val[0] = $"XXXX{i}";
|
||||
processDataMeterList.Add(meterLine);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void Init(Results.Entities.TestRslt tstRslt)
|
||||
{
|
||||
|
||||
bool isPMaxTest = tstRslt.IsPMaxTest();
|
||||
bool isStartStop = tstRslt.IsStartStop();
|
||||
bool isDiverter = tstRslt.IsDiverter();
|
||||
bool isVolumeMethod = tstRslt.IsVolumeMethod();
|
||||
|
||||
DateTime =tstRslt.StartTime; /// A
|
||||
Batch = tstRslt.Batch.BatchNr; /// B
|
||||
/// Test information, target values, etc.
|
||||
TestName = tstRslt.Name(); /// C
|
||||
Reports = tstRslt.Repeats(); /// D
|
||||
RepCyc = tstRslt.RepetitionNr; /// E
|
||||
TestMeth = tstRslt.Method(); /// F
|
||||
TargetVOL = Convert.ToInt32(tstRslt.TargetVolume()); /// G
|
||||
TargetQMin = tstRslt.Qfrom(); /// H
|
||||
TargetQPlus = tstRslt.Qto(); /// I
|
||||
ErrLimitMin = Convert.ToInt32(tstRslt.ErrLimLo() + tstRslt.ErrLimMargin()); /// J
|
||||
ErrLimitPlus = Convert.ToInt32(tstRslt.ErrLimHi() - tstRslt.ErrLimMargin()); /// K
|
||||
TargetTempFrom = Convert.ToInt32(Double.Parse(string.Format("{0:F1}", tstRslt.TempLimLo()))); /// L
|
||||
TargetTempTo = Convert.ToInt32(Double.Parse(string.Format("{0:F1}", tstRslt.TempLimHi()))); /// M
|
||||
TargetPressFrom = 0; /// N
|
||||
TargetPressTo = 16; /// O
|
||||
MIDNumberName = tstRslt.RefFlowmeter(); /// P
|
||||
MIDNumberValue = Double.Parse(string.Format("{0:F4}", Formulas.DistilledWaterDensityFromTemp(tstRslt.AmbTempMean))); /// Q [kg/m3] hustota vody pri teplote okolia z priemernej teploty okolia bez korekcie na realnu hustotu vody
|
||||
COR = ((tstRslt.Components != null) ? tstRslt.Components.Scale : string.Empty); /// R
|
||||
|
||||
/// Ambient
|
||||
TempAmbM = Double.Parse(string.Format("{0:F1}", Units.ConvertTo(Unit.C, tstRslt.AmbTempStart))); /// S [°C]
|
||||
PressAmbM = Convert.ToInt32(Double.Parse(string.Format("{0:F0}", Units.ConvertTo(Unit.mbar, tstRslt.AmbPressStart)))); /// T [mbar]
|
||||
HumidAmbM = Double.Parse(string.Format("{0:F1}", Units.ConvertTo(Unit.RPct, tstRslt.AmbHumiStart))); /// U [R%]
|
||||
|
||||
/// Pressure
|
||||
PressUpME = Convert.ToInt32(Double.Parse(string.Format("{0:F0}", Units.ConvertTo(Unit.kPa, tstRslt.PressUpMean)))); /// V [kPa]
|
||||
PressDwME = Convert.ToInt32(Double.Parse(string.Format("{0:F0}", Units.ConvertTo(Unit.kPa, tstRslt.PressDownMean)))); /// W [kPa]
|
||||
PressDeME = Convert.ToInt32(Double.Parse(string.Format("{0:F1}", Units.ConvertTo(Unit.kPa, tstRslt.PressDeltaMean)))); /// X [kPa]
|
||||
PressUpST = Convert.ToInt32(Double.Parse(string.Format("{0:F0}", Units.ConvertTo(Unit.kPa, tstRslt.PressUpStart)))); /// Y [kPa]
|
||||
PressDwST = Convert.ToInt32(Double.Parse(string.Format("{0:F0}", Units.ConvertTo(Unit.kPa, tstRslt.PressDownStart)))); /// Z [kPa]
|
||||
PressDES = Convert.ToInt32(Double.Parse(string.Format("{0:F1}", Units.ConvertTo(Unit.kPa, tstRslt.PressDeltaStart)))); /// AA [kPa]
|
||||
PressUpEN = Convert.ToInt32(Double.Parse(string.Format("{0:F0}", Units.ConvertTo(Unit.kPa, tstRslt.PressUpEnd)))); /// AB [kPa]
|
||||
PressDwEN = Convert.ToInt32(Double.Parse(string.Format("{0:F0}", Units.ConvertTo(Unit.kPa, tstRslt.PressDownEnd)))); /// AC [kPa]
|
||||
PressDEE = Convert.ToInt32(Double.Parse(string.Format("{0:F1}", Units.ConvertTo(Unit.kPa, tstRslt.PressDeltaEnd)))); /// AD [kPa]
|
||||
|
||||
/// Temperature
|
||||
TempUpME = (Units.ConvertTo(Unit.C, tstRslt.TempUpMean)); /// AE [°C]
|
||||
TempDwME = (Units.ConvertTo(Unit.C, tstRslt.TempDownMean)); /// AF [°C]
|
||||
TempDiME = (Units.ConvertTo(Unit.C, tstRslt.TempDivMean)); /// AG [°C]
|
||||
TempLoME = (Units.ConvertTo(Unit.C, tstRslt.Custom1)); /// AH [°C] T hi mean
|
||||
TempHiME = (Units.ConvertTo(Unit.C, tstRslt.Custom6)); /// AI [°C] T lo mean
|
||||
TempUpST = (Units.ConvertTo(Unit.C, tstRslt.TempUpStart)); /// AJ [°C]
|
||||
TempDwST = (Units.ConvertTo(Unit.C, tstRslt.TempDownStart)); /// AK [°C]
|
||||
TempDiST = (Units.ConvertTo(Unit.C, tstRslt.TempDivStart)); /// AL [°C]
|
||||
TempLoST = (Units.ConvertTo(Unit.C, tstRslt.Custom2)); /// AM [°C] T hi start
|
||||
TempHiST = (Units.ConvertTo(Unit.C, tstRslt.Custom7)); /// AN [°C] T lo start
|
||||
TempUpEN = (Units.ConvertTo(Unit.C, tstRslt.TempUpEnd)); /// AO [°C]
|
||||
TempDwEN = (Units.ConvertTo(Unit.C, tstRslt.TempDownEnd)); /// AP [°C]
|
||||
TempDiEN = (Units.ConvertTo(Unit.C, tstRslt.TempDivEnd)); /// AQ [°C]
|
||||
TempLoEN = (Units.ConvertTo(Unit.C, tstRslt.Custom3)); /// AR [°C] T hi end
|
||||
TempHiEN = (Units.ConvertTo(Unit.C, tstRslt.Custom8)); /// AS [°C] T lo end
|
||||
|
||||
/// Mass
|
||||
MassStRaw = (tstRslt.MassStartRaw); /// AT [kg]
|
||||
MassSt = (tstRslt.MassStart); /// AU [kg]
|
||||
MassEnRaw = (tstRslt.MassEndRaw); /// AV [kg]
|
||||
MassEn = (tstRslt.MassEnd); /// AW [kg]
|
||||
Mass = (tstRslt.MassEnd - tstRslt.MassStart); /// AX [kg]
|
||||
|
||||
/// Density and buoyancy
|
||||
RoWa = (tstRslt.DensityDiv); /// AY [kg/m3]
|
||||
TempLnME = ((tstRslt.TempUpMean + tstRslt.TempDownMean) / 2); /// AZ [°C] Tline ... priemerna teplota v linii
|
||||
RoWat = (tstRslt.DensityLine); /// BA [kg/m3]
|
||||
RoAir = (tstRslt.MassOfEvapWater); /// BB [kg] mass of evaporated water
|
||||
Kbuoyancy = (tstRslt.Batch.Buoyancy); /// BC Buoyancy: Sheet1 - X9
|
||||
|
||||
DensityOfSample = Convert.ToInt32(tstRslt.Batch.SampleDensity); /// BD
|
||||
TTempRO = Convert.ToInt32(tstRslt.Batch.SampleTemp); /// BE
|
||||
QMax = (tstRslt.FlowMax); /// BF pipe expansion: teraz vynechat
|
||||
QMin = (tstRslt.FlowMin); /// BG [kg/h] Qm
|
||||
QMean = (tstRslt.Flow); /// BH [l/h] Qv
|
||||
Qctv = (tstRslt.VolumeCTV); /// BI [l] Vet .... komercne prava hodnota objemu - podla vahy
|
||||
VolRI = (tstRslt.VolumeMaster); /// BJ [l] Velm ... objem podla etalonu (Prolonged: objem do vahy podla impulzov hradlovanych klapkou)
|
||||
DivCorrection = (tstRslt.TestTimeCorrection); /// BK [s] test time correction (diverter correction)
|
||||
/// (ori.) BK [l] Vmass .. objem podla druheho etalonu / prietokomeru pred tratou (teraz vynechavame)
|
||||
T = (tstRslt.TestTime); /// BL [s]
|
||||
ERelRef = (isVolumeMethod ? Formulas.ErrorFromVolumes(tstRslt.ConstMasterCorr, tstRslt.ConstMasterRaw) : tstRslt.ErrorMaster);
|
||||
/// BM [%] Eelm .... chyba etalonu voci komercne pravej hodnote
|
||||
KMind = Convert.ToInt32((tstRslt.ConstMasterRaw != 0) ? (1 / tstRslt.ConstMasterRaw) : 0); /// BO [pls/l] Const.MID .. konstanta etalonu
|
||||
DiverterStartTime = Convert.ToInt32(Double.Parse(string.Format("{0:F0}", isDiverter ? 1000.0F * tstRslt.DiverterStart : 0))); /// BQ [ms] Diverter start time
|
||||
DiverterEndTime = Convert.ToInt32(Double.Parse(string.Format("{0:F0}", isDiverter ? 1000.0F * tstRslt.DiverterEnd : 0))); /// BR [ms] Diverter end time
|
||||
DiverterStartValeveOpenTime = Convert.ToInt32(Double.Parse(string.Format("{0:F0}", isStartStop ? 1000.0F * tstRslt.DiverterStart : 0))); /// BS [ms] Start valve open time
|
||||
DiverterStartValeveCloseTime = Convert.ToInt32(Double.Parse(string.Format("{0:F0}", isStartStop ? 1000.0F * tstRslt.DiverterEnd : 0))); /// BT [ms] Start valve close time
|
||||
|
||||
TempUpMax = (tstRslt.TempUpMax); /// BU [°C]
|
||||
TempDwMax = (tstRslt.TempDownMax); /// BV [°C]
|
||||
TempUpMin = (tstRslt.TempUpMin); /// BW [°C]
|
||||
TempDwMin = (tstRslt.TempDownMin); /// BX [°C]
|
||||
TempT10 = (isPMaxTest ? tstRslt.TestTime : 0); /// BY [s] Duration of the pressure test
|
||||
TempAmbEn = Double.Parse(string.Format("{0:F1}", Units.ConvertTo(Unit.C, tstRslt.AmbTempEnd))); /// BZ [°C]
|
||||
PressAmbEn = Convert.ToInt32(Double.Parse(string.Format("{0:F0}", Units.ConvertTo(Unit.mbar, tstRslt.AmbPressEnd)))); /// CA [mbar]
|
||||
HumAmbEn = Double.Parse(string.Format("{0:F1}", Units.ConvertTo(Unit.RPct, tstRslt.AmbHumiEnd))); /// CB [R%]
|
||||
RefPulses = Convert.ToInt32(tstRslt.PulsesMaster); /// CC Celkovy pocet et. pulzov skusky (Prolonged : do vahy)
|
||||
DiverterTestTimeCorrection = Convert.ToInt32(1000 * tstRslt.TestTimeCorrection); /// CD [ms] Diverter test time correction
|
||||
|
||||
BatchResults batchResults = BatchResults.FromBatch(tstRslt.Batch);
|
||||
for (int i = 0; i < batchResults.WMPositionsCount; i++)
|
||||
{
|
||||
if (batchResults.Batch.WaterMeters != null &&
|
||||
batchResults.Batch.WaterMeters.Count > i &&
|
||||
batchResults.Batch.WaterMeters[i] != null &&
|
||||
!batchResults.Batch.WaterMeters[i].Disabled)
|
||||
{
|
||||
|
||||
ProcessDataMeterLine meterLine = new ProcessDataMeterLine(tstRslt, batchResults, i);
|
||||
processDataMeterList.Add(meterLine);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,472 @@
|
||||
using System;
|
||||
using ClosedXML.Excel;
|
||||
using Common;
|
||||
using Results.Entities;
|
||||
|
||||
|
||||
namespace Results.Uncertainty
|
||||
{
|
||||
public class ProcessDataMeterLine
|
||||
{
|
||||
public XLCellValue[] val = new XLCellValue[21];
|
||||
|
||||
/*public string SerNo; // "Diehl202415687905" , formatStr);//Position - Ser.No. - CE
|
||||
public int VolMtSt; // 0 , formatInt);//Vol.Mt.st - CF
|
||||
public int VolMtEn; // 0 , formatInt);//Vol.Mt.en - CG
|
||||
public double VolMt; // 0.975333560911164 , formatD7);//Vol.Mt. - CH
|
||||
public double VolRm; // 0.980633088, formatD7);//Vol.rm - CI
|
||||
|
||||
public double ERel; // -0.540418981321314 , formatD6); // E rel. - CJ
|
||||
|
||||
public int
|
||||
IPerlCalibrationFactor; // , formatInt); // U - CK // CK iPerl calibration factor used during the test / ...
|
||||
|
||||
public int Pulses; // 154 , formatInt); //Pulses() - CL
|
||||
public int RefPulsesNi; // 14341 , formatInt); //Ref pulses_ni() - CM
|
||||
public double T; // 671.4207764 , formatD4); //T(s)()_ni -CN
|
||||
public string Evaluation; // "OK" , formatStr);//evaluation - CO
|
||||
public double PulsesL; // 157.8947 , formatD4);//Pulses/l - CP
|
||||
public int ImpL; // 4 , formatInt);//imp/l - CQ
|
||||
public int Div; // 0 , formatInt);//div - CR
|
||||
public int VEnd; // 0 , formatInt);//Vend
|
||||
public int TEnd; // 0 , formatInt);//T end
|
||||
|
||||
public string[] SmryItems = new string[5]; // - 0/// CU - 1/// CV - 2/// CW - 3/// CX - 4/// CY
|
||||
|
||||
*/
|
||||
public ProcessDataMeterLine(TestRslt tstRslt, BatchResults batchResults, int wmNr0)
|
||||
{
|
||||
var wm = batchResults.Batch.WaterMeters[wmNr0];
|
||||
var smryItems = DEItem.GetSummaryColumns();
|
||||
|
||||
{
|
||||
if (!wm.Compound() && !wm.HeatMeter())
|
||||
{
|
||||
/// If this is a single meter
|
||||
|
||||
Results.Entities.MeterTestRslt mtrRslt =
|
||||
batchResults.GetMeterTestRslt(tstRslt.Name(), wmNr0, CompoundMeterId.Single);
|
||||
|
||||
if (mtrRslt != null)
|
||||
{
|
||||
bool isCamera = (mtrRslt.RegReaderType == (int)RegisterReaderType.Camera);
|
||||
|
||||
val[0] = wm.SerialNr; /// CE WM Ser.No.
|
||||
val[1] = mtrRslt
|
||||
.VolumeStart; /// CF WM Vstart - pociatocny stav pri pevnom starte alebo zachyteny pri data streame
|
||||
val[2] = mtrRslt
|
||||
.VolumeEnd; /// CG WM Vend - konecny stav pri pevnom starte alebo zachyteny pri data streame
|
||||
val[3] = mtrRslt.VolumeMeter; /// CH WM Vmer - objem namerany vodomerom
|
||||
val[4] = mtrRslt.VolumeRef; /// CI WM Vref - objem namerany stanicou
|
||||
val[5] = mtrRslt.Error; /// CJ WM Emt - chyba vodomerom nameraneho objemu
|
||||
#if IPERL
|
||||
val[6] = wm.CalibFactor; /// CK iPerl calibration factor used during the test / ...
|
||||
#else
|
||||
val[6] = 0; /// CK nechat prazdne
|
||||
#endif
|
||||
val[7] = Convert.ToInt32(mtrRslt
|
||||
.PulsesMeter); /// CL WM Np met - pocet impulzov zo skusaneho meradla
|
||||
val[8] = Convert.ToInt32(mtrRslt
|
||||
.PulsesMaster); /// CM WM Np elm - pocet impulzov etalonu pocas merania pre prislusny vodomer
|
||||
val[9] = mtrRslt.TestTime; /// CN WM Tmet - cas merania (obmedzany pri synchro skuske)
|
||||
val[10] = mtrRslt.Passed
|
||||
? "OK"
|
||||
: "NOK"; /// CO WM Vysledok (t.j. ci je v hraniciach chyb) - OK/NOK
|
||||
#if IPERL
|
||||
val[11] =
|
||||
mtrRslt.WaterMeter.Q2CorrRL; /// CP iPerl Q2 correction factor used during the test / AN value - hodnota z analogoveho prevodnika
|
||||
#else
|
||||
val[11] = mtrRslt.PulsesPerLiter; /// CP Pulses per liter
|
||||
#endif
|
||||
val[12] = Convert.ToInt32(isCamera
|
||||
? mtrRslt.VolumeStart * mtrRslt.PulsesPerLiter /// CQ WM Phi_start (pri hodnotach z kamery)
|
||||
: wm.WMPosition); /// CQ WMPosition (normalne)
|
||||
val[13] = Convert.ToInt32(isCamera
|
||||
? mtrRslt.VolumeEnd * mtrRslt.PulsesPerLiter /// CR WM Phi_end (pri hodnotach z kamery)
|
||||
: 0); /// CR not used/spare (normalne)
|
||||
|
||||
//TODO - Time start is in table as VEnd ??? check it
|
||||
val[14] = Convert.ToInt32(mtrRslt.TimestampStart); /// CS WM Time_start - ' ' -
|
||||
val[15] = Convert.ToInt32(mtrRslt.TimestampEnd); /// CT WM Time_end - ' ' -
|
||||
|
||||
//sb.Append(";"); sb.Append(isCamera ? mtrRslt.PulsesPerLiter : 0); /// CU camera: WM Degree per liter
|
||||
val[16] = (smryItems.Count < 1 ? "0" : DEUtils.GetContent(smryItems[0].Content, wm)); /// CU
|
||||
val[17] = (smryItems.Count < 2 ? "0" : DEUtils.GetContent(smryItems[1].Content, wm)); /// CV
|
||||
val[18] = (smryItems.Count < 3 ? "0" : DEUtils.GetContent(smryItems[2].Content, wm)); /// CW
|
||||
val[19] = (smryItems.Count < 4 ? "0" : DEUtils.GetContent(smryItems[3].Content, wm)); /// CX
|
||||
val[20] = (smryItems.Count < 5 ? "0" : DEUtils.GetContent(smryItems[4].Content, wm)); /// CY
|
||||
}
|
||||
}
|
||||
else if (wm.Compound())
|
||||
{
|
||||
/// Else if this is a compound meter
|
||||
|
||||
for (byte b = (byte)CompoundMeterId.CompoundMain; b <= (byte)CompoundMeterId.Compound; b++)
|
||||
{
|
||||
var mtrRslt = batchResults.GetMeterTestRslt(tstRslt.Name(), wmNr0, (CompoundMeterId)b);
|
||||
|
||||
if (mtrRslt != null)
|
||||
{
|
||||
int iIndex = 0;
|
||||
switch ((CompoundMeterId)b)
|
||||
{
|
||||
case CompoundMeterId.CompoundMain:
|
||||
val[0] = wm.SerialNr; /// CE
|
||||
break;
|
||||
case CompoundMeterId.CompoundAux:
|
||||
val[0] = wm.SerialNrAux; /// CE
|
||||
break;
|
||||
case CompoundMeterId.Compound:
|
||||
val[0] = wm.SerialNr; /// CE
|
||||
break;
|
||||
}
|
||||
|
||||
val[++iIndex] =
|
||||
mtrRslt
|
||||
.VolumeStart; /// CF WM Vinit - pri pevnom starte pociatocny stav natukany alebo cez inteligentny system
|
||||
val[++iIndex] =
|
||||
mtrRslt
|
||||
.VolumeEnd; /// CG WM Vfin - pri pevnom starte konecny stav natukany alebo cez inteligentny system
|
||||
val[++iIndex] = mtrRslt.VolumeMeter; /// CH WM Vmer - objem namerany vodomerom
|
||||
val[++iIndex] = mtrRslt.VolumeRef; /// CI WM Vet - objem namerany stanicou
|
||||
val[++iIndex] = mtrRslt.Error; /// CJ WM Emt - chyba vodomerom nameraneho objemu
|
||||
val[++iIndex] = 0; /// CK WM U - neistota (zatial nechat prazdne)
|
||||
val[++iIndex] = mtrRslt.PulsesMeter; /// CL WM Np met - pocet impulzov zo skusaneho meradla
|
||||
val[++iIndex] =
|
||||
mtrRslt
|
||||
.PulsesMaster; /// CM WM Np elm - pocet impulzov etalonu pocas merania pre prislusny vodomer
|
||||
val[++iIndex] =
|
||||
mtrRslt.TestTime; /// CN WM Tmet - cas merania (obmedzany pri synchro skuske)
|
||||
val[++iIndex] =
|
||||
mtrRslt.Passed
|
||||
? "OK"
|
||||
: "NOK"; /// CO WM Vysledok (t.j. ci je v hraniciach chyb) - OK/NOK
|
||||
val[++iIndex] = " "; /// CP WM AN value - hodnota z analogoveho prevodnika (teraz nic)
|
||||
|
||||
bool isCamera = mtrRslt.IsCamera();
|
||||
val[++iIndex] = (isCamera
|
||||
? mtrRslt.VolumeStart *
|
||||
mtrRslt.PulsesPerLiter /// CQ WM Phi_start (pri hodnotach z kamery)
|
||||
: wm.WMPosition); /// CQ WMPosition (normalne)
|
||||
val[++iIndex] = (isCamera
|
||||
? mtrRslt.VolumeEnd * mtrRslt.PulsesPerLiter /// CR WM Phi_end (pri hodnotach z kamery)
|
||||
: 0); /// CR not used/spare (normalne)
|
||||
val[++iIndex] = (isCamera ? mtrRslt.TimestampStart : 0); /// CS WM Time_start - ' ' -
|
||||
val[++iIndex] = (isCamera ? mtrRslt.TimestampEnd : 0); /// CT WM Time_end - ' ' -
|
||||
val[++iIndex] = (isCamera ? mtrRslt.PulsesPerLiter : 0); /// CU WM Degree per liter
|
||||
|
||||
val[++iIndex] = "0"; /// CV Analog out 1 (max mA)
|
||||
val[++iIndex] = "0"; /// CW Analog out 2 (V)
|
||||
val[++iIndex] = "0"; /// CX Analog out 3 (min mA)
|
||||
val[++iIndex] = "0"; /// CY Analog out 4 (max Q)
|
||||
}
|
||||
}
|
||||
}
|
||||
else /// if (ProcessData.BatchRslts.WaterMeters[i].HeatMeter())
|
||||
{
|
||||
/// Else this is a heat meter
|
||||
|
||||
var volumeMtr =
|
||||
batchResults.GetMeterTestRslt(tstRslt.Name(), wmNr0, CompoundMeterId.HeatMeterVolume);
|
||||
var energyMtr =
|
||||
batchResults.GetMeterTestRslt(tstRslt.Name(), wmNr0, CompoundMeterId.HeatMeterEnergy);
|
||||
|
||||
if (volumeMtr != null)
|
||||
{
|
||||
int iIndex = 0;
|
||||
val[iIndex] = wm.SerialNr; /// WM Ser.No.
|
||||
val[iIndex] =
|
||||
volumeMtr
|
||||
.VolumeStart; /// WM Vstart - pociatocny stav pri pevnom starte alebo zachyteny pri data streame
|
||||
val[iIndex] =
|
||||
volumeMtr
|
||||
.VolumeEnd; /// WM Vend - konecny stav pri pevnom starte alebo zachyteny pri data streame
|
||||
val[iIndex] = volumeMtr.VolumeMeter; /// WM Vmer - objem namerany vodomerom
|
||||
val[iIndex] = volumeMtr.VolumeRef; /// WM Vref - objem namerany stanicou
|
||||
val[iIndex] = volumeMtr.Error; /// WM Emt - chyba vodomerom nameraneho objemu
|
||||
#if IPERL
|
||||
val[iIndex] = wm.CalibFactor; /// iPerl calibration factor used during the test / ...
|
||||
#else
|
||||
val[iIndex] = 0; /// nechat prazdne
|
||||
#endif
|
||||
val[iIndex] = volumeMtr.PulsesMeter; /// WM Np met - pocet impulzov zo skusaneho meradla
|
||||
val[iIndex] =
|
||||
volumeMtr
|
||||
.PulsesMaster; /// WM Np elm - pocet impulzov etalonu pocas merania pre prislusny vodomer
|
||||
val[iIndex] = volumeMtr.TestTime; /// WM Tmet - cas merania (obmedzany pri synchro skuske)
|
||||
val[iIndex] =
|
||||
volumeMtr.Passed ? "OK" : "NOK"; /// WM Vysledok (t.j. ci je v hraniciach chyb) - OK/NOK
|
||||
#if IPERL
|
||||
val[iIndex] =
|
||||
(volumeMtr.WaterMeter.Q2CorrRL); /// iPerl Q2 correction factor used during the test / AN value - hodnota z analogoveho prevodnika
|
||||
#else
|
||||
val[iIndex] = " "; /// nechat prazdne
|
||||
#endif
|
||||
val[iIndex] =
|
||||
(volumeMtr.VolumeStart); /// WM Volume_start - pri datastreamovych hodnotach (alebo kamera)
|
||||
val[iIndex] = (volumeMtr.TimestampStart); /// WM Time_start - ' ' -
|
||||
val[iIndex] = (volumeMtr.VolumeEnd); /// WM Volume_end - ' ' -
|
||||
val[iIndex] = (volumeMtr.TimestampEnd); /// WM Time_end - ' ' -
|
||||
}
|
||||
|
||||
if (energyMtr != null)
|
||||
{
|
||||
int iIndex = 0;
|
||||
val[iIndex] = (wm.SerialNr); /// WM Ser.No.
|
||||
val[iIndex] =
|
||||
(energyMtr
|
||||
.VolumeStart); /// WM Vstart - pociatocny stav pri pevnom starte alebo zachyteny pri data streame
|
||||
val[iIndex] =
|
||||
(energyMtr
|
||||
.VolumeEnd); /// WM Vend - konecny stav pri pevnom starte alebo zachyteny pri data streame
|
||||
val[iIndex] = (energyMtr.VolumeMeter); /// WM Vmer - objem namerany vodomerom
|
||||
val[iIndex] = (energyMtr.VolumeRef); /// WM Vref - objem namerany stanicou
|
||||
val[iIndex] = (energyMtr.Error); /// WM Emt - chyba vodomerom nameraneho objemu
|
||||
#if IPERL
|
||||
val[iIndex] = wm.CalibFactor; /// iPerl calibration factor used during the test / ...
|
||||
#else
|
||||
val[iIndex] = " "; /// nechat prazdne
|
||||
#endif
|
||||
val[iIndex] = (energyMtr.PulsesMeter); /// WM Np met - pocet impulzov zo skusaneho meradla
|
||||
val[iIndex] =
|
||||
(energyMtr
|
||||
.PulsesMaster); /// WM Np elm - pocet impulzov etalonu pocas merania pre prislusny vodomer
|
||||
val[iIndex] = (energyMtr.TestTime); /// WM Tmet - cas merania (obmedzany pri synchro skuske)
|
||||
val[iIndex] =
|
||||
(energyMtr.Passed ? "OK" : "NOK"); /// WM Vysledok (t.j. ci je v hraniciach chyb) - OK/NOK
|
||||
#if IPERL
|
||||
val[iIndex] =
|
||||
energyMtr.WaterMeter.Q2CorrRL; /// iPerl Q2 correction factor used during the test / AN value - hodnota z analogoveho prevodnika
|
||||
#else
|
||||
val[iIndex] = " "; /// nechat prazdne
|
||||
#endif
|
||||
val[iIndex] =
|
||||
energyMtr.VolumeStart; /// WM Volume_start - pri datastreamovych hodnotach (alebo kamera)
|
||||
val[iIndex] = energyMtr.TimestampStart; /// WM Time_start - ' ' -
|
||||
val[iIndex] = energyMtr.VolumeEnd; /// WM Volume_end - ' ' -
|
||||
val[iIndex] = energyMtr.TimestampEnd; /// WM Time_end - ' ' -
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// public void ProcessDataMeterLine2(TestRslt tstRslt, WaterMeter wm, BatchResults batchResults, int wmNr0)
|
||||
// {
|
||||
// var smryItems = DEItem.GetSummaryColumns();
|
||||
// {
|
||||
//
|
||||
//
|
||||
// if (!wm.Compound() && !wm.HeatMeter())
|
||||
// {
|
||||
// /// If this is a single meter
|
||||
//
|
||||
// Results.Entities.MeterTestRslt mtrRslt = batchResults.GetMeterTestRslt(tstRslt.Name(), wmNr0, CompoundMeterId.Single);
|
||||
//
|
||||
// if (mtrRslt != null)
|
||||
// {
|
||||
// bool isCamera = (mtrRslt.RegReaderType == (int)RegisterReaderType.Camera);
|
||||
//
|
||||
// SerNo = wm.SerialNr;/// CE WM Ser.No.
|
||||
// VolMtSt = mtrRslt.VolumeStart; /// CF WM Vstart - pociatocny stav pri pevnom starte alebo zachyteny pri data streame
|
||||
// VolMtEn = mtrRslt.VolumeEnd; /// CG WM Vend - konecny stav pri pevnom starte alebo zachyteny pri data streame
|
||||
// VolMt = mtrRslt.VolumeMeter; /// CH WM Vmer - objem namerany vodomerom
|
||||
// VolRm = mtrRslt.VolumeRef; /// CI WM Vref - objem namerany stanicou
|
||||
// ERel = mtrRslt.Error; /// CJ WM Emt - chyba vodomerom nameraneho objemu
|
||||
// #if IPERL
|
||||
// IPerlCalibrationFactor = wm.CalibFactor; /// CK iPerl calibration factor used during the test / ...
|
||||
// #else
|
||||
// IPerlCalibrationFactor = 0; /// CK nechat prazdne
|
||||
// #endif
|
||||
// Pulses = Convert.ToInt32(mtrRslt.PulsesMeter); /// CL WM Np met - pocet impulzov zo skusaneho meradla
|
||||
// RefPulsesNi = Convert.ToInt32(mtrRslt.PulsesMaster); /// CM WM Np elm - pocet impulzov etalonu pocas merania pre prislusny vodomer
|
||||
// T = mtrRslt.TestTime; /// CN WM Tmet - cas merania (obmedzany pri synchro skuske)
|
||||
// Evaluation = mtrRslt.Passed ? "OK" : "NOK"; /// CO WM Vysledok (t.j. ci je v hraniciach chyb) - OK/NOK
|
||||
// #if IPERL
|
||||
// PulsesL = mtrRslt.WaterMeter.Q2CorrRL; /// CP iPerl Q2 correction factor used during the test / AN value - hodnota z analogoveho prevodnika
|
||||
// #else
|
||||
// PulsesL = mtrRslt.PulsesPerLiter; /// CP Pulses per liter
|
||||
// #endif
|
||||
// ImpL = Convert.ToInt32(isCamera
|
||||
// ? mtrRslt.VolumeStart * mtrRslt.PulsesPerLiter /// CQ WM Phi_start (pri hodnotach z kamery)
|
||||
// : wm.WMPosition); /// CQ WMPosition (normalne)
|
||||
// Div = Convert.ToInt32(isCamera
|
||||
// ? mtrRslt.VolumeEnd * mtrRslt.PulsesPerLiter /// CR WM Phi_end (pri hodnotach z kamery)
|
||||
// : 0); /// CR not used/spare (normalne)
|
||||
//
|
||||
// //TODO - Time start is in table as VEnd ??? check it
|
||||
// VEnd = Convert.ToInt32(mtrRslt.TimestampStart); /// CS WM Time_start - ' ' -
|
||||
// TEnd = Convert.ToInt32(mtrRslt.TimestampEnd); /// CT WM Time_end - ' ' -
|
||||
//
|
||||
// //sb.Append(";"); sb.Append(isCamera ? mtrRslt.PulsesPerLiter : 0); /// CU camera: WM Degree per liter
|
||||
// SmryItems[0] = (smryItems.Count < 1 ? "0" : DEUtils.GetContent(smryItems[0].Content, wm)); /// CU
|
||||
// SmryItems[1] = (smryItems.Count < 2 ? "0" : DEUtils.GetContent(smryItems[1].Content, wm)); /// CV
|
||||
// SmryItems[2] = (smryItems.Count < 3 ? "0" : DEUtils.GetContent(smryItems[2].Content, wm)); /// CW
|
||||
// SmryItems[3] = (smryItems.Count < 4 ? "0" : DEUtils.GetContent(smryItems[3].Content, wm)); /// CX
|
||||
// SmryItems[4] = (smryItems.Count < 5 ? "0" : DEUtils.GetContent(smryItems[4].Content, wm)); /// CY
|
||||
// }
|
||||
// }
|
||||
// else if (wm.Compound())
|
||||
// {
|
||||
// /// Else if this is a compound meter
|
||||
//
|
||||
// for (byte b = (byte)CompoundMeterId.CompoundMain; b <= (byte)CompoundMeterId.Compound; b++)
|
||||
// {
|
||||
// var mtrRslt = batchResults.GetMeterTestRslt(tstRslt.Name(), wmNr0, (CompoundMeterId)b);
|
||||
//
|
||||
// if (mtrRslt != null)
|
||||
// {
|
||||
// switch ((CompoundMeterId)b)
|
||||
// {
|
||||
// case CompoundMeterId.CompoundMain:
|
||||
// SerNo = wm.SerialNr; /// CE
|
||||
// break;
|
||||
// case CompoundMeterId.CompoundAux:
|
||||
// SerNo = wm.SerialNrAux; /// CE
|
||||
// break;
|
||||
// case CompoundMeterId.Compound:
|
||||
// SerNo = wm.SerialNr; /// CE
|
||||
// break;
|
||||
// }
|
||||
// VolMtSt = mtrRslt.VolumeStart; /// CF WM Vinit - pri pevnom starte pociatocny stav natukany alebo cez inteligentny system
|
||||
// VolMtEn = mtrRslt.VolumeEnd; /// CG WM Vfin - pri pevnom starte konecny stav natukany alebo cez inteligentny system
|
||||
// VolMt = mtrRslt.VolumeMeter; /// CH WM Vmer - objem namerany vodomerom
|
||||
// VolRm = mtrRslt.VolumeRef; /// CI WM Vet - objem namerany stanicou
|
||||
// ERel = mtrRslt.Error; /// CJ WM Emt - chyba vodomerom nameraneho objemu
|
||||
// IPerlCalibrationFactor = 0; /// CK WM U - neistota (zatial nechat prazdne)
|
||||
// Pulses = mtrRslt.PulsesMeter; /// CL WM Np met - pocet impulzov zo skusaneho meradla
|
||||
// RefPulsesNi = mtrRslt.PulsesMaster; /// CM WM Np elm - pocet impulzov etalonu pocas merania pre prislusny vodomer
|
||||
// T = mtrRslt.TestTime; /// CN WM Tmet - cas merania (obmedzany pri synchro skuske)
|
||||
// Evaluation = mtrRslt.Passed ? "OK" : "NOK"; /// CO WM Vysledok (t.j. ci je v hraniciach chyb) - OK/NOK
|
||||
// PulsesL = 0;//" " /// CP WM AN value - hodnota z analogoveho prevodnika (teraz nic)
|
||||
//
|
||||
// bool isCamera = mtrRslt.IsCamera();
|
||||
// ImpL = (isCamera
|
||||
// ? mtrRslt.VolumeStart * mtrRslt.PulsesPerLiter /// CQ WM Phi_start (pri hodnotach z kamery)
|
||||
// : wm.WMPosition); /// CQ WMPosition (normalne)
|
||||
// Div = (isCamera
|
||||
// ? mtrRslt.VolumeEnd * mtrRslt.PulsesPerLiter /// CR WM Phi_end (pri hodnotach z kamery)
|
||||
// : 0); /// CR not used/spare (normalne)
|
||||
// VEnd = (isCamera ? mtrRslt.TimestampStart : 0); /// CS WM Time_start - ' ' -
|
||||
// TEnd = (isCamera ? mtrRslt.TimestampEnd : 0); /// CT WM Time_end - ' ' -
|
||||
// SmryItems[0] = (isCamera ? mtrRslt.PulsesPerLiter : 0); /// CU WM Degree per liter
|
||||
//
|
||||
// SmryItems[1] = "0"; /// CV Analog out 1 (max mA)
|
||||
// SmryItems[2] = "0"; /// CW Analog out 2 (V)
|
||||
// SmryItems[3] = "0"; /// CX Analog out 3 (min mA)
|
||||
// SmryItems[4] = "0"; /// CY Analog out 4 (max Q)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else /// if (ProcessData.BatchRslts.WaterMeters[i].HeatMeter())
|
||||
// {
|
||||
// /// Else this is a heat meter
|
||||
//
|
||||
// var volumeMtr = batchResults.GetMeterTestRslt(tstRslt.Name(), wmNr0, CompoundMeterId.HeatMeterVolume);
|
||||
// var energyMtr = batchResults.GetMeterTestRslt(tstRslt.Name(), wmNr0, CompoundMeterId.HeatMeterEnergy);
|
||||
//
|
||||
// if (volumeMtr != null)
|
||||
// {
|
||||
// SerNo = wm.SerialNr; /// WM Ser.No.
|
||||
// VolMtSt = volumeMtr.VolumeStart; /// WM Vstart - pociatocny stav pri pevnom starte alebo zachyteny pri data streame
|
||||
// VolMtEn = volumeMtr.VolumeEnd; /// WM Vend - konecny stav pri pevnom starte alebo zachyteny pri data streame
|
||||
// VolMt = volumeMtr.VolumeMeter; /// WM Vmer - objem namerany vodomerom
|
||||
// VolRm = volumeMtr.VolumeRef; /// WM Vref - objem namerany stanicou
|
||||
// ERel = volumeMtr.Error; /// WM Emt - chyba vodomerom nameraneho objemu
|
||||
// #if IPERL
|
||||
// IPerlCalibrationFactor = wm.CalibFactor; /// iPerl calibration factor used during the test / ...
|
||||
// #else
|
||||
// IPerlCalibrationFactor = 0; /// nechat prazdne
|
||||
// #endif
|
||||
// Pulses = volumeMtr.PulsesMeter; /// WM Np met - pocet impulzov zo skusaneho meradla
|
||||
// RefPulsesNi = volumeMtr.PulsesMaster; /// WM Np elm - pocet impulzov etalonu pocas merania pre prislusny vodomer
|
||||
// T = volumeMtr.TestTime; /// WM Tmet - cas merania (obmedzany pri synchro skuske)
|
||||
// Evaluation = volumeMtr.Passed ? "OK" : "NOK"); /// WM Vysledok (t.j. ci je v hraniciach chyb) - OK/NOK
|
||||
// #if IPERL
|
||||
// ImpL = (volumeMtr.WaterMeter.Q2CorrRL); /// iPerl Q2 correction factor used during the test / AN value - hodnota z analogoveho prevodnika
|
||||
// #else
|
||||
// ImpL = 0; //(" "); /// nechat prazdne
|
||||
// #endif
|
||||
// ImpL = (volumeMtr.VolumeStart); /// WM Volume_start - pri datastreamovych hodnotach (alebo kamera)
|
||||
// VEnd = (volumeMtr.TimestampStart); /// WM Time_start - ' ' -
|
||||
// VolMtEn = (volumeMtr.VolumeEnd); /// WM Volume_end - ' ' -
|
||||
// TEnd = (volumeMtr.TimestampEnd); /// WM Time_end - ' ' -
|
||||
// }
|
||||
//
|
||||
// if (energyMtr != null)
|
||||
// {
|
||||
// SerNo = (wm.SerialNr); /// WM Ser.No.
|
||||
// VolMtSt = (energyMtr.VolumeStart); /// WM Vstart - pociatocny stav pri pevnom starte alebo zachyteny pri data streame
|
||||
// VolMtEn = (energyMtr.VolumeEnd); /// WM Vend - konecny stav pri pevnom starte alebo zachyteny pri data streame
|
||||
// VolMt = (energyMtr.VolumeMeter); /// WM Vmer - objem namerany vodomerom
|
||||
// VolRm = (energyMtr.VolumeRef); /// WM Vref - objem namerany stanicou
|
||||
// ERel = (energyMtr.Error); /// WM Emt - chyba vodomerom nameraneho objemu
|
||||
// #if IPERL
|
||||
// IPerlCalibrationFactor = wm.CalibFactor; /// iPerl calibration factor used during the test / ...
|
||||
// #else
|
||||
// IPerlCalibrationFactor = 0;//(" "); /// nechat prazdne
|
||||
// #endif
|
||||
// Pulses = (energyMtr.PulsesMeter); /// WM Np met - pocet impulzov zo skusaneho meradla
|
||||
// RefPulsesNi = (energyMtr.PulsesMaster); /// WM Np elm - pocet impulzov etalonu pocas merania pre prislusny vodomer
|
||||
// T = (energyMtr.TestTime); /// WM Tmet - cas merania (obmedzany pri synchro skuske)
|
||||
// Evaluation = (energyMtr.Passed ? "OK" : "NOK"); /// WM Vysledok (t.j. ci je v hraniciach chyb) - OK/NOK
|
||||
// #if IPERL
|
||||
// sb.Append(";"); sb.Append(energyMtr.WaterMeter.Q2CorrRL); /// iPerl Q2 correction factor used during the test / AN value - hodnota z analogoveho prevodnika
|
||||
// #else
|
||||
// sb.Append(";"); sb.Append(" "); /// nechat prazdne
|
||||
// #endif
|
||||
// VolMtSt = (energyMtr.VolumeStart); /// WM Volume_start - pri datastreamovych hodnotach (alebo kamera)
|
||||
// VEnd = (energyMtr.TimestampStart); /// WM Time_start - ' ' -
|
||||
// VolMtEn = (energyMtr.VolumeEnd); /// WM Volume_end - ' ' -
|
||||
// TEnd = (energyMtr.TimestampEnd); /// WM Time_end - ' ' -
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
public ProcessDataMeterLine()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/* public void InitDefault()
|
||||
{
|
||||
SerNo = "Diehl202415687905"; // , formatStr);//Position - Ser.No. - CE
|
||||
VolMtSt = 0; // , formatInt);//Vol.Mt.st - CF
|
||||
VolMtEn = 0; // , formatInt);//Vol.Mt.en - CG
|
||||
VolMt = 0.975333560911164; // , formatD7);//Vol.Mt. - CH
|
||||
VolRm = 0.980633088; //, formatD7);//Vol.rm - CI
|
||||
ERel = -0.540418981321314; // , formatD6); // E rel. - CJ
|
||||
// , formatInt); // U - CK
|
||||
Pulses = 154; // , formatInt); //Pulses() -
|
||||
RefPulsesNi = 14341; // , formatInt); //Ref pulses_ni()
|
||||
T = 671.4207764; // , formatD4); //T(s)()_ni
|
||||
Evaluation = "OK"; // , formatStr);//evaluation
|
||||
PulsesL = 157.8947; // , formatD4);//Pulses/l - CP
|
||||
ImpL = 4; // , formatInt);//imp/l
|
||||
Div = 0; // , formatInt);//div
|
||||
VEnd = 0; // , formatInt);//Vend
|
||||
TEnd = 0; // , formatInt);//T end
|
||||
}*/
|
||||
|
||||
public void InitDefault()
|
||||
{
|
||||
val[0] = "Diehl202415687905"; // , formatStr);//Position - Ser.No. - CE
|
||||
val[1] = 0; // , formatInt);//Vol.Mt.st - CF
|
||||
val[2] = 0; // , formatInt);//Vol.Mt.en - CG
|
||||
val[3] = 0.975333560911164; // , formatD7);//Vol.Mt. - CH
|
||||
val[4] = 0.980633088; //, formatD7);//Vol.rm - CI
|
||||
val[5] = -0.540418981321314; // , formatD6); // E rel. - CJ
|
||||
// , formatInt); // U - CK
|
||||
val[6] = 154; // , formatInt); //Pulses() -
|
||||
val[7] = 14341; // , formatInt); //Ref pulses_ni()
|
||||
val[8] = 671.4207764; // , formatD4); //T(s)()_ni
|
||||
val[9] = "OK"; // , formatStr);//evaluation
|
||||
val[10] = 157.8947; // , formatD4);//Pulses/l - CP
|
||||
val[11] = 4; // , formatInt);//imp/l
|
||||
val[12] = 0; // , formatInt);//div
|
||||
val[13] = 0; // , formatInt);//Vend
|
||||
val[14] = 0; // , formatInt);//T end
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -577,6 +577,16 @@ namespace Results
|
||||
{
|
||||
return FormatInt(f, w.Batch.Counter10);
|
||||
}));
|
||||
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Uncertainty_DIV1, "Uncertainty DIV1", Quantity.Uncertainty, ItemCategory.BenchData, (w,t,u,f,p) => string.IsNullOrEmpty(f) ? "0.1" : string.Format(f, 5)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Uncertainty_DIV2, "Uncertainty DIV2", Quantity.Uncertainty, ItemCategory.BenchData, (w,t,u,f,p) => string.IsNullOrEmpty(f) ? "0.2" : string.Format(f, 5)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Uncertainty_DIV3, "Uncertainty DIV3", Quantity.Uncertainty, ItemCategory.BenchData, (w,t,u,f,p) => string.IsNullOrEmpty(f) ? "0.3" : string.Format(f, 5)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Uncertainty_DIV4, "Uncertainty DIV4", Quantity.Uncertainty, ItemCategory.BenchData, (w,t,u,f,p) => string.IsNullOrEmpty(f) ? "0.4" : string.Format(f, 5)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Uncertainty_DIV5, "Uncertainty DIV5", Quantity.Uncertainty, ItemCategory.BenchData, (w,t,u,f,p) => string.IsNullOrEmpty(f) ? "0.5" : string.Format(f, 5)));
|
||||
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Uncertainty_TEMP1, "Uncertainty TEMP1", Quantity.Uncertainty, ItemCategory.BenchData, (w,t,u,f,p) => string.IsNullOrEmpty(f) ? "0.5" : string.Format(f, 5)));
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// To be updated by Output.FileWriter or Output.Printer
|
||||
|
||||
@@ -1,4 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="ClosedXML" version="0.105.0-rc" targetFramework="net472" />
|
||||
<package id="ClosedXML.Parser" version="2.0.0-preview1" targetFramework="net472" />
|
||||
<package id="SixLabors.Fonts" version="1.0.0" targetFramework="net472" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="6.1.1" targetFramework="net472" />
|
||||
<package id="DocumentFormat.OpenXml" version="3.1.1" targetFramework="net472" />
|
||||
<package id="DocumentFormat.OpenXml.Framework" version="3.1.1" targetFramework="net472" />
|
||||
<package id="EPPlus.Interfaces" version="8.0.0" targetFramework="net472" />
|
||||
<package id="ExcelNumberFormat" version="1.1.0" targetFramework="net472" />
|
||||
<package id="Microsoft.Bcl.HashCode" version="1.1.1" targetFramework="net472" />
|
||||
<package id="Microsoft.IO.RecyclableMemoryStream" version="3.0.1" targetFramework="net472" />
|
||||
<package id="RBush.Signed" version="4.0.0" targetFramework="net472" />
|
||||
<package id="System.Buffers" version="4.6.1" targetFramework="net472" />
|
||||
<package id="System.ComponentModel.Annotations" version="5.0.0" targetFramework="net472" />
|
||||
<package id="System.Memory" version="4.6.2" targetFramework="net472" />
|
||||
<package id="System.Numerics.Vectors" version="4.6.1" targetFramework="net472" />
|
||||
<package id="System.Security.Cryptography.Xml" version="8.0.2" targetFramework="net472" />
|
||||
<package id="log4net" version="2.0.15" targetFramework="net472" />
|
||||
</packages>
|
||||
@@ -378,40 +378,6 @@ namespace SchematicDrawing
|
||||
Properties.Resources.Valve_XL_closed,
|
||||
Properties.Resources.Valve_XL_vacuum,
|
||||
Properties.Resources.Valve_XL_open_dry);
|
||||
/// ValveSw
|
||||
Shapes[DrShIx(Shape.ValveSw, Sz.S)] = new DrawingShape(Shape.ValveSw, Sz.S, 2, 2,
|
||||
new Node[] { new Node(0, 1, Orient.L), new Node(2, 1, Orient.R) },
|
||||
new Edge[] { new Edge(0, 1, 20, RouteCouple.OpenWhen1), new Edge(1, 0, 20, RouteCouple.OpenWhen1) },
|
||||
0, 0, 20, 20,
|
||||
Properties.Resources.ValveSw_S_open,
|
||||
Properties.Resources.ValveSw_S_closed,
|
||||
Properties.Resources.ValveSw_S_vacuum,
|
||||
Properties.Resources.ValveSw_S_open_dry);
|
||||
Shapes[DrShIx(Shape.ValveSw, Sz.M)] = new DrawingShape(Shape.ValveSw, Sz.M, 3, 4,
|
||||
new Node[] { new Node(0, 2, Orient.L), new Node(3, 2, Orient.R) },
|
||||
new Edge[] { new Edge(0, 1, 30, RouteCouple.OpenWhen1), new Edge(1, 0, 30, RouteCouple.OpenWhen1) },
|
||||
0, 5, 30, 30,
|
||||
Properties.Resources.ValveSw_M_open,
|
||||
Properties.Resources.ValveSw_M_closed,
|
||||
Properties.Resources.ValveSw_M_vacuum,
|
||||
Properties.Resources.ValveSw_M_open_dry);
|
||||
Shapes[DrShIx(Shape.ValveSw, Sz.L)] = new DrawingShape(Shape.ValveSw, Sz.L, 4, 4,
|
||||
new Node[] { new Node(0, 2, Orient.L), new Node(4, 2, Orient.R) },
|
||||
new Edge[] { new Edge(0, 1, 40, RouteCouple.OpenWhen1), new Edge(1, 0, 40, RouteCouple.OpenWhen1) },
|
||||
0, 0, 40, 40,
|
||||
Properties.Resources.ValveSw_L_open,
|
||||
Properties.Resources.ValveSw_L_closed,
|
||||
Properties.Resources.ValveSw_L_vacuum,
|
||||
Properties.Resources.ValveSw_L_open_dry);
|
||||
Shapes[DrShIx(Shape.ValveSw, Sz.XL)] = new DrawingShape(Shape.ValveSw, Sz.XL, 5, 6,
|
||||
new Node[] { new Node(0, 3, Orient.L), new Node(5, 3, Orient.R) },
|
||||
new Edge[] { new Edge(0, 1, 50, RouteCouple.OpenWhen1), new Edge(1, 0, 50, RouteCouple.OpenWhen1) },
|
||||
0, 5, 50, 50,
|
||||
Properties.Resources.ValveSw_XL_open,
|
||||
Properties.Resources.ValveSw_XL_closed,
|
||||
Properties.Resources.ValveSw_XL_vacuum,
|
||||
Properties.Resources.ValveSw_XL_open_dry);
|
||||
|
||||
/// Diverter
|
||||
Shapes[DrShIx(Shape.Div, Sz.S)] = new DrawingShape(Shape.Div, Sz.S, 2, 2,
|
||||
new Node[] { new Node(2, 0, Orient.Up), new Node(1, 2, Orient.Dn), new Node(3, 2, Orient.Dn) },
|
||||
@@ -557,18 +523,12 @@ namespace SchematicDrawing
|
||||
Shapes[DrShIx(Shape.Scale, Sz.L)] = new DrawingShape(Shape.Scale, Sz.L, 12, 11, new Node[] { new Node(6, 11, Orient.Dn) }, null, 0, 0, 120, 110, Properties.Resources.Scale_L);
|
||||
Shapes[DrShIx(Shape.Scale, Sz.XL)] = new DrawingShape(Shape.Scale, Sz.XL, 16, 13, new Node[] { new Node(8, 13, Orient.Dn) }, null, 0, 0, 160, 130, Properties.Resources.Scale_XL);
|
||||
|
||||
/// Tank uni
|
||||
/// Tank
|
||||
Shapes[DrShIx(Shape.Tank, Sz.S)] = new DrawingShape(Shape.Tank, Sz.S, 10, 8, new Node[] { new Node(0, 6, Orient.L) }, null, 0, 0, 100, 80, Properties.Resources.Tank_S);
|
||||
Shapes[DrShIx(Shape.Tank, Sz.M)] = new DrawingShape(Shape.Tank, Sz.M, 12, 9, new Node[] { new Node(0, 7, Orient.L) }, null, 0, 0, 120, 90, Properties.Resources.Tank_M);
|
||||
Shapes[DrShIx(Shape.Tank, Sz.L)] = new DrawingShape(Shape.Tank, Sz.L, 15, 11, new Node[] { new Node(0, 9, Orient.L) }, null, 0, 0, 150, 110, Properties.Resources.Tank_L);
|
||||
Shapes[DrShIx(Shape.Tank, Sz.XL)] = new DrawingShape(Shape.Tank, Sz.XL, 20, 13, new Node[] { new Node(0, 11, Orient.L) }, null, 0, 0, 200, 130, Properties.Resources.Tank_XL);
|
||||
|
||||
/// Tank hot
|
||||
Shapes[DrShIx(Shape.TankHot, Sz.S)] = new DrawingShape(Shape.TankHot, Sz.S, 10, 8, new Node[] { new Node(0, 6, Orient.L) }, null, 0, 0, 100, 80, Properties.Resources.Tank_S_hot);
|
||||
Shapes[DrShIx(Shape.TankHot, Sz.M)] = new DrawingShape(Shape.TankHot, Sz.M, 12, 9, new Node[] { new Node(0, 7, Orient.L) }, null, 0, 0, 120, 90, Properties.Resources.Tank_M_hot);
|
||||
Shapes[DrShIx(Shape.TankHot, Sz.L)] = new DrawingShape(Shape.TankHot, Sz.L, 15, 11, new Node[] { new Node(0, 9, Orient.L) }, null, 0, 0, 150, 110, Properties.Resources.Tank_L_hot);
|
||||
Shapes[DrShIx(Shape.TankHot, Sz.XL)] = new DrawingShape(Shape.TankHot, Sz.XL, 20, 13, new Node[] { new Node(0, 11, Orient.L) }, null, 0, 0, 200, 130, Properties.Resources.Tank_XL_hot);
|
||||
|
||||
/// Junction
|
||||
Shapes[DrShIx(Shape.Junction, Sz.None)] = new DrawingShape(Shape.Junction, Sz.None, 0, 0, new Node[] { new Node(0, 0, Orient.R) });
|
||||
Shapes[DrShIx(Shape.Junction, Sz.S)] = new DrawingShape(Shape.Junction, Sz.S, 2, 2,
|
||||
|
||||
@@ -45,13 +45,11 @@ namespace SchematicDrawing
|
||||
Scale,
|
||||
Sink,
|
||||
Tank,
|
||||
TankHot,
|
||||
Tee,
|
||||
TempM,
|
||||
UniCB,
|
||||
Vacuum,
|
||||
Valve,
|
||||
ValveSw,
|
||||
WaterM,
|
||||
ElectricM,
|
||||
|
||||
|
||||
+1
-201
@@ -19,7 +19,7 @@ namespace SchematicDrawing.Properties {
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
@@ -730,16 +730,6 @@ namespace SchematicDrawing.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Tank_L_hot {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Tank_L_hot", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -750,16 +740,6 @@ namespace SchematicDrawing.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Tank_M_hot {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Tank_M_hot", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -770,16 +750,6 @@ namespace SchematicDrawing.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Tank_S_hot {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Tank_S_hot", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -790,16 +760,6 @@ namespace SchematicDrawing.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Tank_XL_hot {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Tank_XL_hot", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -1010,166 +970,6 @@ namespace SchematicDrawing.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_L_closed {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_L_closed", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_L_open {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_L_open", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_L_open_dry {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_L_open_dry", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_L_vacuum {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_L_vacuum", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_M_closed {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_M_closed", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_M_open {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_M_open", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_M_open_dry {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_M_open_dry", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_M_vacuum {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_M_vacuum", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_S_closed {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_S_closed", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_S_open {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_S_open", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_S_open_dry {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_S_open_dry", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_S_vacuum {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_S_vacuum", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_XL_closed {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_XL_closed", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_XL_open {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_XL_open", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_XL_open_dry {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_XL_open_dry", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_XL_vacuum {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_XL_vacuum", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
||||
@@ -319,18 +319,6 @@
|
||||
<data name="Tank_XL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Tank-XL.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Tank_L_hot" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Tank-L-hot.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Tank_M_hot" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Tank-M-hot.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Tank_S_hot" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Tank-S-hot.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Tank_XL_hot" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Tank-XL-hot.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Vacuum_L_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Vacuum-L-dry.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@@ -385,66 +373,7 @@
|
||||
<data name="Valve_XL_vacuum" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Valve-XL-vacuum.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<data name="ValveSw_L_closed" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-L-closed.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_L_open" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-L-open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_L_open_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-L-open-dry.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_L_vacuum" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-L-vacuum.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_M_closed" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-M-closed.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_M_open" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-M-open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_M_open_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-M-open-dry.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_M_vacuum" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-M-vacuum.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_S_closed" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-S-closed.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_S_open" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-S-open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_S_open_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-S-open-dry.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_S_vacuum" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-S-vacuum.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_XL_closed" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-XL-closed.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_XL_open" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-XL-open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_XL_open_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-XL-open-dry.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_XL_vacuum" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-XL-vacuum.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<data name="WaterM_L" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<data name="WaterM_L" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\WaterM-L.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="EmergencyStop_XL_off" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
|
||||
@@ -118,10 +118,6 @@
|
||||
<Content Include="Pictures\Div-XL-tank-wet.png" />
|
||||
<Content Include="Pictures\EmergencyStop-XL-off.png" />
|
||||
<Content Include="Pictures\EmergencyStop-XL-on.png" />
|
||||
<Content Include="Pictures\Tank-L-hot.png" />
|
||||
<Content Include="Pictures\Tank-M-hot.png" />
|
||||
<Content Include="Pictures\Tank-S-hot.png" />
|
||||
<Content Include="Pictures\Tank-XL-hot.png" />
|
||||
<Content Include="Pictures\UniCB-M-error.png" />
|
||||
<Content Include="Pictures\UniCB-M-off.png" />
|
||||
<Content Include="Pictures\UniCB-M-on.png" />
|
||||
|
||||
@@ -365,7 +365,7 @@ namespace SchematicDrawing
|
||||
{
|
||||
GNode gnode = new GNode(item, nid);
|
||||
item.GNodes.Add(gnode);
|
||||
graph.AddNode(gnode, dshape.Shape == Shape.Tank || dshape.Shape == Shape.TankHot, dshape.Shape == Shape.Scale);
|
||||
graph.AddNode(gnode, dshape.Shape == Shape.Tank, dshape.Shape == Shape.Scale);
|
||||
}
|
||||
|
||||
foreach (var edge in dshape.Edges)
|
||||
@@ -864,7 +864,7 @@ namespace SchematicDrawing
|
||||
/// Draw the component image
|
||||
Rectangle rect = dsh.GetRotatedFlippedImageRectangle(item);
|
||||
|
||||
if (item is IRouteBasedDrawingItem && routeBit == false /// closed
|
||||
if (item is IRouteBasedDrawingItem && routeBit == false /// closed
|
||||
&& item.GNodes.Count > 0 && item.GNodes[0].Dist < Const.Vacuum /// wet
|
||||
&& dsh.HasClosedWet) /// has appropriate image
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DefineConstants>TRACE;LANG_PL</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -5,18 +5,16 @@ VisualStudioVersion = 17.8.34330.188
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TBF", "TBF\TBF.csproj", "{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{7EBEEA14-91C4-48D7-AF0A-7A4BC3FF9A28} = {7EBEEA14-91C4-48D7-AF0A-7A4BC3FF9A28}
|
||||
{C8939821-BA5C-4988-A3D0-BF53B74865C7} = {C8939821-BA5C-4988-A3D0-BF53B74865C7}
|
||||
{211B5E3F-9996-48A7-ABDE-C878DD2D71C2} = {211B5E3F-9996-48A7-ABDE-C878DD2D71C2}
|
||||
{0C0A1F4D-1363-4544-A7C5-196C76D26CCA} = {0C0A1F4D-1363-4544-A7C5-196C76D26CCA}
|
||||
{0F79CA69-9DBC-41F3-A6FC-5A2937365343} = {0F79CA69-9DBC-41F3-A6FC-5A2937365343}
|
||||
{211B5E3F-9996-48A7-ABDE-C878DD2D71C2} = {211B5E3F-9996-48A7-ABDE-C878DD2D71C2}
|
||||
{32817BF9-E380-4467-9C7F-936F4B122BC7} = {32817BF9-E380-4467-9C7F-936F4B122BC7}
|
||||
{439D0878-C76E-452B-B17D-209A89E91D36} = {439D0878-C76E-452B-B17D-209A89E91D36}
|
||||
{46E3B0E1-209F-4550-B0DD-D7E2C039B3CE} = {46E3B0E1-209F-4550-B0DD-D7E2C039B3CE}
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4} = {743DF7DB-C7B6-42EB-986D-0F485E5588E4}
|
||||
{7EBEEA14-91C4-48D7-AF0A-7A4BC3FF9A28} = {7EBEEA14-91C4-48D7-AF0A-7A4BC3FF9A28}
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3} = {8F942729-F454-4C99-BA6C-746962065AE3}
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB} = {9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}
|
||||
{C8939821-BA5C-4988-A3D0-BF53B74865C7} = {C8939821-BA5C-4988-A3D0-BF53B74865C7}
|
||||
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2} = {FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4} = {743DF7DB-C7B6-42EB-986D-0F485E5588E4}
|
||||
{46E3B0E1-209F-4550-B0DD-D7E2C039B3CE} = {46E3B0E1-209F-4550-B0DD-D7E2C039B3CE}
|
||||
{32817BF9-E380-4467-9C7F-936F4B122BC7} = {32817BF9-E380-4467-9C7F-936F4B122BC7}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Results", "Results\Results.csproj", "{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}"
|
||||
@@ -28,8 +26,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Config", "Config\Config.csp
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResultsBrowser", "ResultsBrowser\ResultsBrowser.csproj", "{07BA543A-54CA-4A59-9AD9-DDE7038E1BF9}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48} = {8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB} = {9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48} = {8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeviceTest", "DeviceTest\DeviceTest.csproj", "{6D3384DC-4638-4A92-91A8-F39D900377C6}"
|
||||
@@ -106,19 +104,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LabelPrinting", "LabelPrint
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TBFTests", "TBFTests\TBFTests.csproj", "{77EB589F-C670-4489-AAD6-2A3C02061FD1}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppDiagnostic", "AppDiagnostic\AppDiagnostic.csproj", "{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3} = {8F942729-F454-4C99-BA6C-746962065AE3}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharedComponents", "SharedComponents\SharedComponents.csproj", "{8F942729-F454-4C99-BA6C-746962065AE3}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sensus.iPerl.RfidCom", "..\iPerlHead\Sensus.iPerl.RfidCom\Sensus.iPerl.RfidCom.csproj", "{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sensus.iPerl.TestConsole", "..\iPerlHead\Sensus.iPerl.TestConsole\Sensus.iPerl.TestConsole.csproj", "{5025ED8B-A94F-4E58-8BE0-68481B061609}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NfcS5_DLL", "..\NfcS5_DLL\NfcS5_DLL.csproj", "{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -142,15 +127,15 @@ Global
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Release|x86.ActiveCfg = Release|x86
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Release|x86.Build.0 = Release|x86
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
@@ -479,66 +464,6 @@ Global
|
||||
{77EB589F-C670-4489-AAD6-2A3C02061FD1}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{77EB589F-C670-4489-AAD6-2A3C02061FD1}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{77EB589F-C670-4489-AAD6-2A3C02061FD1}.Release|x86.Build.0 = Release|Any CPU
|
||||
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Release|x86.Build.0 = Release|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Release|x86.Build.0 = Release|Any CPU
|
||||
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Release|x86.Build.0 = Release|Any CPU
|
||||
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Debug|x86.Build.0 = Debug|x86
|
||||
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Release|x86.ActiveCfg = Release|x86
|
||||
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Release|x86.Build.0 = Release|x86
|
||||
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -1,7 +1,25 @@
|
||||
<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/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAssert_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fd08b5425b14a4a129bfa8e447a81395e12190_003Fae_003F94d308d8_003FAssert_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AControl_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fbb93580b829e4f7d9c8d742286f27f7d5b8648_003F2d_003F54df0719_003FControl_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AICollection_00601_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F4290c01eea7748b3aa477ca831e6a387531830_003F80_003Fe38b444d_003FICollection_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ALoader_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F8210282bc4024c02ab1c8fa84c45a21e32a600_003F0d_003F48a17bd3_003FLoader_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ATabControl_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fbb93580b829e4f7d9c8d742286f27f7d5b8648_003F0e_003F5c4249c2_003FTabControl_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ATestMethodInfo_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F4472e9d6a19b4c92bcc9a80bd60ca17d26da8_003Fad_003F4c8a6929_003FTestMethodInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ATestMethodInfo_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F4472e9d6a19b4c92bcc9a80bd60ca17d26da8_003F98_003F3ffb6d31_003FTestMethodInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F9c2967a135e648bdb993c5397a44991b573620_003Fd7_003F14d417af_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AUserControl_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fbb93580b829e4f7d9c8d742286f27f7d5b8648_003Fa3_003F8eb63727_003FUserControl_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AXLRangeBase_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Fb48983f97d522ed19b681bf6f133c9baafae03ce9d864ed711a5aa8752bf_003FXLRangeBase_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AXLWorksheet_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F95dc236c6854d515fec2d9794746c52171e52b19e7f2ca0fcc6a6636bb4ed18_003FXLWorksheet_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AXmlSerializer_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F9e4992465ee24dc8915fd9be20badb7d281d48_003F5e_003F4df5856e_003FXmlSerializer_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/Environment/AssemblyExplorer/XmlDocument/@EntryValue"><AssemblyExplorer>
|
||||
<Assembly Path="C:\Users\micha\git\tbf\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll" />
|
||||
</AssemblyExplorer></s:String>
|
||||
<s:String x:Key="/Default/Environment/Hierarchy/Build/BuildTool/CustomBuildToolPath/@EntryValue">C:\Program Files\JetBrains\JetBrains Rider 2024.1.6\tools\MSBuild\Current\Bin\amd64\MSBuild.exe</s:String>
|
||||
<s:Int64 x:Key="/Default/Environment/Hierarchy/Build/BuildTool/MsbuildVersion/@EntryValue">1114112</s:Int64>
|
||||
<s:Boolean x:Key="/Default/Environment/UnitTesting/CreateUnitTestDialog/ShowAdvancedOptions/@EntryValue">True</s:Boolean>
|
||||
<s:String x:Key="/Default/Environment/UnitTesting/CreateUnitTestDialog/TestProjectMapping/=743DF7DB_002DC7B6_002D42EB_002D986D_002D0F485E5588E4/@EntryIndexedValue">77EB589F-C670-4489-AAD6-2A3C02061FD1</s:String>
|
||||
<s:String x:Key="/Default/Environment/UnitTesting/CreateUnitTestDialog/TestProjectMapping/=8648FD92_002DCDA1_002D4C3A_002DB5F9_002DFE547CE1FA48/@EntryIndexedValue">77EB589F-C670-4489-AAD6-2A3C02061FD1</s:String>
|
||||
<s:String x:Key="/Default/Environment/UnitTesting/CreateUnitTestDialog/TestProjectMapping/=9D0DCC88_002DDC81_002D47EB_002D9FDD_002D4C3907871BFB/@EntryIndexedValue">77EB589F-C670-4489-AAD6-2A3C02061FD1</s:String>
|
||||
<s:String x:Key="/Default/Environment/UnitTesting/CreateUnitTestDialog/TestTemplateMapping/=MSTest/@EntryIndexedValue">d6790ab7-33c2-4425-b2c9-51480cd1a852</s:String>
|
||||
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=311ca613_002Da634_002D4e0f_002Db9fb_002D4b7af9b7abb2/@EntryIndexedValue"><SessionState ContinuousTestingMode="0" Name="GetCorrection" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session">
|
||||
<TestAncestor>
|
||||
@@ -9,12 +27,25 @@
|
||||
<TestId>MSTest::77EB589F-C670-4489-AAD6-2A3C02061FD1::.NETFramework,Version=v4.7.2::TBFTests.Rig.Modbus.Meret.AdjustableScale.AdjustableMeterTest.GetCorrection</TestId>
|
||||
<TestId>MSTest::77EB589F-C670-4489-AAD6-2A3C02061FD1::.NETFramework,Version=v4.7.2::TBFTests.Rig.Network.Camera.KeyenceIV3G120.CameraTest.RtpListener</TestId>
|
||||
<TestId>MSTest::77EB589F-C670-4489-AAD6-2A3C02061FD1::.NETFramework,Version=v4.7.2::TBFTests.Rig.Network.Camera.KeyenceIV3G120.CameraTest.Initialize</TestId>
|
||||
<TestId>MSTest::77EB589F-C670-4489-AAD6-2A3C02061FD1::.NETFramework,Version=v4.7.2::TBFTests.RigUncertaintyTest.OpenDocument_SuccessfullyOpensDocument_RaisesNoExceptions</TestId>
|
||||
<TestId>MSTest::77EB589F-C670-4489-AAD6-2A3C02061FD1::.NETFramework,Version=v4.7.2::TBFTests.Uncertainty.Calculation.MathTest.AritmeticMeanTest</TestId>
|
||||
<TestId>MSTest::77EB589F-C670-4489-AAD6-2A3C02061FD1::.NETFramework,Version=v4.7.2::TBFTests.Uncertainty.Calculation.BatchProcessTableTest</TestId>
|
||||
<TestId>MSTest::77EB589F-C670-4489-AAD6-2A3C02061FD1::.NETFramework,Version=v4.7.2::TBFTests.Uncertainty.Calculation.CalculationTableTest</TestId>
|
||||
<TestId>MSTest::77EB589F-C670-4489-AAD6-2A3C02061FD1::.NETFramework,Version=v4.7.2::TBFTests.Uncertainty.CommonTable.TableTest.CrateTableTest</TestId>
|
||||
</TestAncestor>
|
||||
</SessionState></s:String>
|
||||
|
||||
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=fee81c72_002D0b13_002D439c_002D8921_002D12878bb8cd86/@EntryIndexedValue"><SessionState ContinuousTestingMode="0" IsActive="True" Name="Initialize" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session">
|
||||
<TestAncestor>
|
||||
<TestId>MSTest::77EB589F-C670-4489-AAD6-2A3C02061FD1::.NETFramework,Version=v4.7.2::TBFTests.Rig.Network.Camera.KeyenceIV3G120.CameraTest.Initialize</TestId>
|
||||
<TestId>MSTest::77EB589F-C670-4489-AAD6-2A3C02061FD1::.NETFramework,Version=v4.7.2::TBFTests.RigUncertaintyTest.OpenDocument_SuccessfullyOpensDocument_RaisesNoExceptions</TestId>
|
||||
<TestId>MSTest::77EB589F-C670-4489-AAD6-2A3C02061FD1::.NETFramework,Version=v4.7.2::TBFTests.RigUncertaintyTest.OpenDocument_Sheets</TestId>
|
||||
<TestId>MSTest::77EB589F-C670-4489-AAD6-2A3C02061FD1::.NETFramework,Version=v4.7.2::TBFTests.RigUncertaintyTest.OpenDocument_Sheets_InsertValues</TestId>
|
||||
<TestId>MSTest::77EB589F-C670-4489-AAD6-2A3C02061FD1::.NETFramework,Version=v4.7.2::TBFTests.RigUncertaintyTest.ExcelColumnsTools</TestId>
|
||||
<TestId>MSTest::77EB589F-C670-4489-AAD6-2A3C02061FD1::.NETFramework,Version=v4.7.2::TBFTests.RigUncertaintyTest</TestId>
|
||||
<TestId>MSTest::77EB589F-C670-4489-AAD6-2A3C02061FD1::.NETFramework,Version=v4.7.2::TBFTests.Uncertainty.Calculation.MathTest</TestId>
|
||||
<TestId>MSTest::77EB589F-C670-4489-AAD6-2A3C02061FD1::.NETFramework,Version=v4.7.2::TBFTests.Uncertainty.CommonTable.TableTest.CrateTableTest</TestId>
|
||||
<TestId>MSTest::77EB589F-C670-4489-AAD6-2A3C02061FD1::.NETFramework,Version=v4.7.2::TBFTests.Uncertainty.CommonTable.TableTest.CrateTableOnPositionTest</TestId>
|
||||
</TestAncestor>
|
||||
</SessionState></s:String>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Config_002FResources_002FStrings/@EntryIndexedValue">False</s:Boolean>
|
||||
@@ -24,18 +55,21 @@
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Miscellaneous_0020Files_002FWyqupug/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FResources_002FStrings/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FDataEntry_002FStandartCameraPurchaseOrder_002FCycleBeginningForm/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FDataEntry_002FStandartCameraPurchaseOrder_002FCycleEndForm/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FDataEntry_002FStandartCameraPurchaseOrder_002FCycleEndForm/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FDataEntry_002FStandartCameraPurchaseOrder_002FTestStartEndForm/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FNetwork_002FAdapterFTP_002FNetadapterCfgCtrl/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FNetwork_002FCamera_002FKeyenceIV3G120_002FCameraCfgCtrl/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FNetwork_002FCamera_002FRoiForFixedStartKeyence_002FRoiCfgCtrl/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FNetwork_002FAdapterFTP_002FNetadapterCfgCtrl/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FNetwork_002FCamera_002FKeyenceIV3G120_002FCameraCfgCtrl/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FNetwork_002FCamera_002FRoiForFixedStartKeyence_002FRoiCfgCtrl/@EntryIndexedValue">False</s:Boolean>
|
||||
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FNetwork_002FRestAPI_002FRestApiCfgCtrl/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FNetwork_002FRestAPI_002FRestApiCfgCtrl/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FOutput_002FPrinters_002FGroupPrinting_002FSingle_002FPrinterCfgCtrl/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FOutput_002FPrinters_002FGroupPrinting_002FSingle_002FPrinterTestBenchComponentSelectorDlg/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FOutput_002FPrinters_002FGroupPrinting_002FSingle_002FPrinterTestBenchComponentSelectorDlg/@EntryIndexedValue">False</s:Boolean>
|
||||
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FRegisterReaders_002FFrequencyMeterFromUniCB_002FRRCfgCtrl/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FUI_002FBench_002FComponents_002FComponentsManagerDlg/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FUI_002FBench_002FMetrology_002FMetrologyDlgAdjustableScaleTab/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FUI_002FBench_002FMetrology_002FCalibCertificateExtendedCtrl/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FUI_002FBench_002FMetrology_002FMetrologyDlgAdjustableScaleTab/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FUI_002FBench_002FMetrology_002FMetrologyDlgPressMeterTab/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FUI_002FBench_002FMetrology_002FMetrologyDlgTempMeterTab/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FUI_002FResultsMI_002FPreviousResultsDlgUncertainty/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/Initialized/@EntryValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||
@@ -76,7 +76,7 @@ namespace TBF.Boxes
|
||||
}
|
||||
else
|
||||
{
|
||||
return string.Format(Format, Val * Factor);
|
||||
return string.Format(string.Format("{{0:{0}}}", Format), Val * Factor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# Information about new inserted functionality
|
||||
|
||||
|
||||
## Version
|
||||
|
||||
Document start on version `3.9.2144.1`
|
||||
|
||||
### v3.9.2144 Uncertainty
|
||||
#### Database update
|
||||
```
|
||||
use wrc2swindon298;
|
||||
alter table measurementcorrection add Uncertainty float null;
|
||||
alter table measurementcorrection add Readability float null;
|
||||
```
|
||||
Generated
+9
-27
@@ -401,24 +401,6 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Application diagnostic.
|
||||
/// </summary>
|
||||
internal static string AppDiagnostic {
|
||||
get {
|
||||
return ResourceManager.GetString("AppDiagnostic", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Application diagnostic.
|
||||
/// </summary>
|
||||
internal static string Application_Diagnostic {
|
||||
get {
|
||||
return ResourceManager.GetString("Application_Diagnostic", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Approval.
|
||||
/// </summary>
|
||||
@@ -4640,6 +4622,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Readability.
|
||||
/// </summary>
|
||||
internal static string Readability {
|
||||
get {
|
||||
return ResourceManager.GetString("Readability", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Reading from the production tracing DB failed.
|
||||
/// </summary>
|
||||
@@ -4793,15 +4784,6 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Reg. min step.
|
||||
/// </summary>
|
||||
internal static string RegulMinStep {
|
||||
get {
|
||||
return ResourceManager.GetString("RegulMinStep", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Relative Q from.
|
||||
/// </summary>
|
||||
|
||||
@@ -197,12 +197,6 @@
|
||||
</data>
|
||||
<data name="Reg_valve" xml:space="preserve">
|
||||
<value>Reg. valve</value>
|
||||
</data>
|
||||
<data name="RegulMinStep" xml:space="preserve">
|
||||
<value>Reg. min step</value>
|
||||
</data>
|
||||
<data name="Application_Diagnostic" xml:space="preserve">
|
||||
<value>Application diagnostic</value>
|
||||
</data>
|
||||
<data name="Balance" xml:space="preserve">
|
||||
<value>Scale</value>
|
||||
@@ -2056,6 +2050,9 @@
|
||||
<data name="Uncertainty" xml:space="preserve">
|
||||
<value>Uncertainty</value>
|
||||
</data>
|
||||
<data name="Readability" xml:space="preserve">
|
||||
<value>Readability</value>
|
||||
</data>
|
||||
<data name="No_info_available" xml:space="preserve">
|
||||
<value>No info available</value>
|
||||
</data>
|
||||
@@ -2448,9 +2445,6 @@
|
||||
</data>
|
||||
<data name="Upgrade_DB" xml:space="preserve">
|
||||
<value>Upgrade database</value>
|
||||
</data>
|
||||
<data name="AppDiagnostic" xml:space="preserve">
|
||||
<value>Application diagnostic</value>
|
||||
</data>
|
||||
<data name="About" xml:space="preserve">
|
||||
<value>About</value>
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Common;
|
||||
using log4net;
|
||||
using Dirichlet.Numerics;
|
||||
using TBF.Boxes;
|
||||
using TBF.Rig.ControlBoard;
|
||||
using TBF.Rig.GenericDevices;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace TBF.Rig.BuiltIn
|
||||
{
|
||||
@@ -195,84 +195,76 @@ namespace TBF.Rig.BuiltIn
|
||||
/// <remarks>Only Elde.Valve valves are used, other valves on the lists are ignored</remarks>
|
||||
public SetValvesOp(IControlBoard cb, bool open, OutputPath outPath, DateTimeBox timeStamp, FloatBox switchTime)
|
||||
{
|
||||
try
|
||||
this.cb = cb;
|
||||
if (this.cb == null) throw new ArgumentNullException("ctrlBoard");
|
||||
|
||||
this.timeStamp = timeStamp;
|
||||
this.switchTime = switchTime;
|
||||
this.startStopValveBitNr = outPath.StartValve1 is Valve.Valve ? (outPath.StartValve1 as Valve.Valve).BitPosition : 0;
|
||||
|
||||
IList<IValve> none = new List<IValve>(); /// An empty list of valves
|
||||
switchPointsRaw = new List<SwitchPoint>();
|
||||
|
||||
if (open)
|
||||
{
|
||||
this.cb = cb;
|
||||
if (this.cb == null) throw new ArgumentNullException("ctrlBoard");
|
||||
|
||||
this.timeStamp = timeStamp;
|
||||
this.switchTime = switchTime;
|
||||
this.startStopValveBitNr = outPath.StartValve1 is Valve.Valve ? (outPath.StartValve1 as Valve.Valve).BitPosition : 0;
|
||||
|
||||
IList<IValve> none = new List<IValve>(); /// An empty list of valves
|
||||
switchPointsRaw = new List<SwitchPoint>();
|
||||
|
||||
if (open)
|
||||
{
|
||||
if (outPath.InvertSV1)
|
||||
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve1), 0); /// close SV1
|
||||
else
|
||||
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve1), none, 0); /// open SV1
|
||||
|
||||
if (outPath.StartValve2 != null)
|
||||
{
|
||||
if (outPath.InvertSV2)
|
||||
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve2), -outPath.LagSV2); /// close SV2 after lag
|
||||
else
|
||||
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve2), none, -outPath.LagSV2); /// open SV2 after lag
|
||||
}
|
||||
|
||||
if (outPath.StartValve3 != null)
|
||||
{
|
||||
if (outPath.InvertSV3)
|
||||
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve3), -outPath.LagSV3); /// close SV3 after lag
|
||||
else
|
||||
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve3), none, -outPath.LagSV3); /// open SV3 after lag
|
||||
}
|
||||
}
|
||||
if (outPath.InvertSV1)
|
||||
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve1), 0); /// close SV1
|
||||
else
|
||||
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve1), none, 0); /// open SV1
|
||||
|
||||
if (outPath.StartValve2 != null)
|
||||
{
|
||||
if (outPath.InvertSV1)
|
||||
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve1), none, 0); /// open SV1
|
||||
if (outPath.InvertSV2)
|
||||
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve2), -outPath.LagSV2); /// close SV2 after lag
|
||||
else
|
||||
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve1), 0); /// close SV1
|
||||
|
||||
if (outPath.StartValve2 != null)
|
||||
{
|
||||
if (outPath.InvertSV2)
|
||||
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve2), none, outPath.LagSV2); /// open SV2 after lag
|
||||
else
|
||||
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve2), outPath.LagSV2); /// close SV2 after lag
|
||||
}
|
||||
|
||||
if (outPath.StartValve3 != null)
|
||||
{
|
||||
if (outPath.InvertSV3)
|
||||
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve3), none, outPath.LagSV3); /// open SV3 after lag
|
||||
else
|
||||
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve3), outPath.LagSV3); /// close SV3 after lag
|
||||
}
|
||||
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve2), none, -outPath.LagSV2); /// open SV2 after lag
|
||||
}
|
||||
|
||||
switchPoints = SortAndMergeSwitchPoints(switchPointsRaw);
|
||||
timeShift = -switchPoints[0].TimeSec;
|
||||
MakeMasks(switchPoints, timeShift);
|
||||
if (outPath.StartValve3 != null)
|
||||
{
|
||||
if (outPath.InvertSV3)
|
||||
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve3), -outPath.LagSV3); /// close SV3 after lag
|
||||
else
|
||||
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve3), none, -outPath.LagSV3); /// open SV3 after lag
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
else
|
||||
{
|
||||
MessageBox.Show(
|
||||
$"Chyba počas zastavenia regulácie prietoku, v ramci SetValvesOp():\n{ex.Message}\n\nStack trace:\n{ex.StackTrace}",
|
||||
"Chyba",
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Error
|
||||
);
|
||||
throw;
|
||||
if (outPath.InvertSV1)
|
||||
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve1), none, 0); /// open SV1
|
||||
else
|
||||
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve1), 0); /// close SV1
|
||||
|
||||
if (outPath.StartValve2 != null)
|
||||
{
|
||||
if (outPath.InvertSV2)
|
||||
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve2), none, outPath.LagSV2); /// open SV2 after lag
|
||||
else
|
||||
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve2), outPath.LagSV2); /// close SV2 after lag
|
||||
}
|
||||
|
||||
if (outPath.StartValve3 != null)
|
||||
{
|
||||
if (outPath.InvertSV3)
|
||||
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve3), none, outPath.LagSV3); /// open SV3 after lag
|
||||
else
|
||||
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve3), outPath.LagSV3); /// close SV3 after lag
|
||||
}
|
||||
}
|
||||
|
||||
switchPoints = SortAndMergeSwitchPoints(switchPointsRaw);
|
||||
timeShift = -switchPoints[0].TimeSec;
|
||||
MakeMasks(switchPoints, timeShift);
|
||||
}
|
||||
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
if (cb.DebugLevel == DebugMode.Simulate)
|
||||
{
|
||||
return ;
|
||||
}
|
||||
|
||||
UInt128 changed = cb.SetValves(switchPoints[0].MasksOpen, switchPoints[0].MasksClose, StateMachine.LogicalFnValves);
|
||||
|
||||
if (timeStamp != null && switchPoints[0].TimeSec == timeShift)
|
||||
@@ -291,7 +283,12 @@ namespace TBF.Rig.BuiltIn
|
||||
/// </returns>
|
||||
public Event Run()
|
||||
{
|
||||
if (nextIx >= switchPoints.Count)
|
||||
if (cb.DebugLevel == DebugMode.Simulate)
|
||||
{
|
||||
return Event.ValvesSet;
|
||||
}
|
||||
|
||||
if (nextIx >= switchPoints.Count)
|
||||
{
|
||||
return (StateMachine.Time >= swStartTime + maxDelayTime + waitOnCBDelay) ? Event.ValvesSet : Event.ValvesBusy;
|
||||
}
|
||||
@@ -320,6 +317,11 @@ namespace TBF.Rig.BuiltIn
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Stop()
|
||||
{
|
||||
if (cb.DebugLevel == DebugMode.Simulate)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (switchTime != null && startStopValveBitNr >= 16 && startStopValveBitNr <= 23 && cb is ControlBoard.Uni.UniCB)
|
||||
{
|
||||
switchTime.Val = (cb as ControlBoard.Uni.UniCB).Data.ValveSwitchTime[startStopValveBitNr - 16];
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace TBF.Rig.ControlBoard
|
||||
/// <returns>Operation</returns>
|
||||
IOperation QueryMeasurementEndOp();
|
||||
|
||||
void StopFlowControl(bool isFromUI, int regVId, int regulationMinStep = 0);
|
||||
void StopFlowControl(bool isFromUI, int regVId);
|
||||
|
||||
void StopAll(bool isFromUI);
|
||||
}
|
||||
|
||||
@@ -492,7 +492,7 @@ namespace TBF.Rig.ControlBoard.Papouch
|
||||
return null;
|
||||
}
|
||||
|
||||
public void StopFlowControl(bool isFromUI, int rvId, int regulationMinStep = 0)
|
||||
public void StopFlowControl(bool isFromUI, int rvId)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -55,9 +55,6 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
public int StabTime { get; set; } /// SetFlow
|
||||
public int InitDacVal { get; set; } /// SetFlow
|
||||
public int DivThreshold { get; set; } /// StartTest argument
|
||||
public int RegulationMinStep { get;
|
||||
set;
|
||||
}
|
||||
|
||||
|
||||
public Action()
|
||||
@@ -81,7 +78,6 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
RVMovePar1 = 0;
|
||||
RVMovePar2 = 0;
|
||||
InitDacVal = 0;
|
||||
RegulationMinStep = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -127,7 +123,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
}
|
||||
|
||||
///----------------------------------------------------------------------------------------------
|
||||
public static Action MeasureFlow(bool isFromUI, int flowMeterId, int regulationMinStep = 0)
|
||||
public static Action MeasureFlow(bool isFromUI, int flowMeterId)
|
||||
{
|
||||
return new Action
|
||||
{
|
||||
@@ -167,7 +163,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
|
||||
///----------------------------------------------------------------------------------------------
|
||||
public static Action SetFlow(bool isFromUI, int regValveId, double freqLo, double freqHi,
|
||||
int pid, int stabTime_ms, int regulationMinStep = 0)
|
||||
int pid, int stabTime_ms)
|
||||
{
|
||||
int rvMovePar1 = Convert.ToInt32(Math.Round(13.1072 * freqLo));
|
||||
int rvMovePar2 = Convert.ToInt32(Math.Round(13.1072 * freqHi));
|
||||
@@ -182,7 +178,6 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
RegVMode = RegValveMode.TargetFrequency,
|
||||
RVMovePar1 = rvMovePar1,
|
||||
RVMovePar2 = rvMovePar2,
|
||||
//RegulationMinStep = regulationMinStep,
|
||||
PID = pid,
|
||||
TolerRV = (regValveId == TBF.Rig.Uni.RegValveAnalog.RegValve.RVAnalogIdx)
|
||||
? Convert.ToInt32(Math.Round(13.1072 * 0.015 * freqLo)) : 0,
|
||||
@@ -212,7 +207,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
///----------------------------------------------------------------------------------------------
|
||||
public static Action StartTest(bool isFromUI, int flowMId, int divId, int divThreshold,
|
||||
bool isSyncMethod, bool isDivUsed, bool isDelayedStart, bool isStartStop,
|
||||
bool isProlonged, int totalPulsesCount, int massPulsesCount = 0, int regulationMinStep = 0)
|
||||
bool isProlonged, int totalPulsesCount, int massPulsesCount = 0)
|
||||
{
|
||||
return new Action
|
||||
{
|
||||
@@ -230,7 +225,6 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
TotalPulsesCount = totalPulsesCount,
|
||||
MassPulsesCount = (massPulsesCount <= 0) ? totalPulsesCount : massPulsesCount,
|
||||
StartStop = Command.Start,
|
||||
//RegulationMinStep = regulationMinStep,
|
||||
};
|
||||
}
|
||||
void SetStartTestArgs(Action action)
|
||||
@@ -278,7 +272,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
}
|
||||
|
||||
///----------------------------------------------------------------------------------------------
|
||||
public static Action RegVlvIncrMove(bool isFromUI, int regValveId, double timeSec, int regulationMinStep = 0)
|
||||
public static Action RegVlvIncrMove(bool isFromUI, int regValveId, double timeSec)
|
||||
{
|
||||
int rvMovePar = Math.Abs(Convert.ToInt32(Math.Round(timeSec / 0.050))); /// Step is 50 ms
|
||||
|
||||
@@ -291,7 +285,6 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
RegVMode = (timeSec >= 0) ? RegValveMode.PulseWidth : (RegValveMode.PulseWidth | RegValveMode.NegPulseWidth),
|
||||
RVMovePar1 = rvMovePar,
|
||||
RVMovePar2 = rvMovePar,
|
||||
//RegulationMinStep = regulationMinStep,
|
||||
};
|
||||
}
|
||||
void SetRegVlvIncrMoveArgs(Action action)
|
||||
@@ -300,7 +293,6 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
RegVMode = action.RegVMode;
|
||||
RVMovePar1 = action.RVMovePar1;
|
||||
RVMovePar2 = action.RVMovePar2;
|
||||
//RegulationMinStep = action.RegulationMinStep;
|
||||
}
|
||||
/// Check whether new action arguments are compatible with alredy collected arguments (true = yes)
|
||||
bool CheckSharedRegVlvIncrMoveArgs(Action newAction)
|
||||
@@ -310,7 +302,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
}
|
||||
|
||||
///----------------------------------------------------------------------------------------------
|
||||
public static Action RegVlvMoveToPos(bool isFromUI, int regValveId, int adcValLo, int adcValHi = -1, int regulationMinStep = 0)
|
||||
public static Action RegVlvMoveToPos(bool isFromUI, int regValveId, int adcValLo, int adcValHi = -1)
|
||||
{
|
||||
int rvMovePar1, rvMovePar2;
|
||||
|
||||
@@ -326,7 +318,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
rvMovePar1 = Math.Max(adcValLo - 5, 0);
|
||||
rvMovePar2 = Math.Min(adcValLo + 5, 1023);
|
||||
}
|
||||
|
||||
|
||||
return new Action
|
||||
{
|
||||
ActionId = ActionID.RegVlvMoveToPos,
|
||||
@@ -336,7 +328,6 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
RegVMode = RegValveMode.TargetPosition,
|
||||
RVMovePar1 = rvMovePar1,
|
||||
RVMovePar2 = rvMovePar2,
|
||||
//RegulationMinStep = regulationMinStep,
|
||||
};
|
||||
}
|
||||
void SetRegVlvMoveToPosArgs(Action action)
|
||||
@@ -345,7 +336,6 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
RegVMode = action.RegVMode;
|
||||
RVMovePar1 = action.RVMovePar1;
|
||||
RVMovePar2 = action.RVMovePar2;
|
||||
//RegulationMinStep = action.RegulationMinStep;
|
||||
}
|
||||
/// Check whether new action arguments are compatible with alredy collected arguments (true = yes)
|
||||
bool CheckSharedRegVlvMoveToPosArgs(Action newAction)
|
||||
@@ -355,7 +345,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
}
|
||||
|
||||
///----------------------------------------------------------------------------------------------
|
||||
public static Action RegVlvStop(bool isFromUI, int regValveId, int RegulationMinStep = 0)
|
||||
public static Action RegVlvStop(bool isFromUI, int regValveId)
|
||||
{
|
||||
return new Action
|
||||
{
|
||||
@@ -366,7 +356,6 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
RegVMode = RegValveMode.Stop,
|
||||
RVMovePar1 = 0,
|
||||
RVMovePar2 = 0,
|
||||
//RegulationMinStep = RegulationMinStep
|
||||
};
|
||||
}
|
||||
void SetRegVlvStopArgs(Action action)
|
||||
@@ -375,7 +364,6 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
RegVMode = action.RegVMode;
|
||||
RVMovePar1 = action.RVMovePar1;
|
||||
RVMovePar2 = action.RVMovePar2;
|
||||
//RegulationMinStep = action.RegulationMinStep;
|
||||
}
|
||||
/// Check whether new action arguments are compatible with alredy collected arguments (true = yes)
|
||||
bool CheckSharedRegVlvStopArgs(Action newAction)
|
||||
@@ -616,8 +604,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
combinedAction.TolerRV,
|
||||
combinedAction.StabTime,
|
||||
combinedAction.InitDacVal,
|
||||
combinedAction.DivThreshold,
|
||||
combinedAction.RegulationMinStep);
|
||||
combinedAction.DivThreshold);
|
||||
|
||||
return combinedAction;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,6 @@ using System;
|
||||
using System.Diagnostics;
|
||||
using log4net;
|
||||
using Dirichlet.Numerics;
|
||||
using Common;
|
||||
using System.Web.Routing;
|
||||
|
||||
namespace TBF.Rig.ControlBoard.Uni
|
||||
{
|
||||
@@ -90,7 +88,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
message[30] = (byte)(action.RVMovePar2 & 0xFF);
|
||||
message[31] = (byte)((action.RVMovePar2 >> 8) & 0xFF);
|
||||
message[32] = GetRVStopParam(action);
|
||||
|
||||
|
||||
/// DA1
|
||||
message[33] = (byte)(arguments.InitDacVal & 0xFF);
|
||||
message[34] = (byte)((arguments.InitDacVal >> 8) & 0xFF);
|
||||
@@ -100,21 +98,8 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
message[37] = (byte)Math.Max(0, Math.Min(255, arguments.StabTime)); /// StabRV
|
||||
message[38] = (byte)((arguments.DivThreshold >> 2) & 0xFF);
|
||||
|
||||
//---
|
||||
message[39] = (byte)((action.RegulationMinStep << 4) & 0xFF); // ak 0 = koli kompatibilite, 1-6 = hodnoty prislusne pre spodnu saturaciu vypinacej periody casu
|
||||
message[40] = (byte)((action.RegulationMinStep << 4) & 0xFF);
|
||||
//---
|
||||
/*int x = 0;
|
||||
if (action.RegVId == 1 || action.RegVId == 2) x = 3;
|
||||
else if (action.RegVId == 3 || action.RegVId == 4) x = 5;
|
||||
else if (action.RegVId == 5 || action.RegVId == 5) x = 3;
|
||||
message[39] = (byte)((x << 4) & 0xFF);
|
||||
message[40] = (byte)((x << 4) & 0xFF);*/
|
||||
/*//---
|
||||
message[39] = 0x50; // ak 0 = koli kompatibilite, 1-6 = hodnoty prislusne pre spodnu saturaciu vypinacej periody casu
|
||||
message[40] = 0x50;
|
||||
//---*/
|
||||
|
||||
message[39] = 0;
|
||||
message[40] = 0;
|
||||
Debug.Assert(40 == PayloadLen + 2);
|
||||
|
||||
/// Checksum (2 bytes)
|
||||
@@ -123,8 +108,6 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
message[PayloadLen + 3] = (byte)(checksum & 0xFF);
|
||||
message[PayloadLen + 4] = (byte)((checksum >> 8) & 0xFF);
|
||||
|
||||
log.Info("");
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
@@ -168,16 +151,11 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
return (byte)0x20;
|
||||
}
|
||||
|
||||
else if ((a.ActionId & ActionID.SetFlow) != 0 && a.RegVId == TBF.Rig.Uni.RegValveAnalog.RegValve.RVAnalogIdx)
|
||||
if ((a.ActionId & ActionID.SetFlow) != 0 && a.RegVId == TBF.Rig.Uni.RegValveAnalog.RegValve.RVAnalogIdx)
|
||||
{
|
||||
return (byte)0x42;
|
||||
}
|
||||
|
||||
/*else
|
||||
{
|
||||
return (a.RegulationMinStep >= 0 || a.RegulationMinStep <= 6)?(byte)(a.RegulationMinStep << 4):(byte)(7<<4);
|
||||
}*/
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
/// Copyright (c) 2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.Rig.GenericDevices;
|
||||
|
||||
@@ -19,8 +16,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
/// Set by the constructor
|
||||
///
|
||||
readonly UniCB uniCB;
|
||||
readonly object flowMeter;
|
||||
readonly TBF.Rig.Uni.FlowMetersInParallel.FlowMeter flowMeterInParallel;
|
||||
readonly TBF.Rig.Uni.FlowMeter.FlowMeter flowMeter;
|
||||
readonly TBF.Rig.Uni.Diverter.Diverter diverter;
|
||||
readonly int pulsesCount; /// Number of reference pulses for a complete test
|
||||
readonly bool withDiverter; /// Test with diverter (and scale)
|
||||
@@ -54,119 +50,36 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
public StandingStartStopTestOp(UniCB cb, OutputPath devices, int pulsesCount, bool withDiverter)
|
||||
{
|
||||
this.uniCB = cb;
|
||||
try
|
||||
{
|
||||
flowMeter = devices.FlowMeter as TBF.Rig.Uni.FlowMeter.FlowMeter;
|
||||
if(flowMeter == null) flowMeter = devices.FlowMeter as TBF.Rig.Uni.FlowMetersInParallel.FlowMeter;
|
||||
|
||||
if (flowMeter == null) throw new ArgumentNullException("Invalid flow meter");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string deviceInfo = GetAllDevicesInfo(devices);
|
||||
string flowMeterStatus = devices.FlowMeter == null
|
||||
? "devices.FlowMeter je NULL"
|
||||
: $"devices.FlowMeter je typu: {devices.FlowMeter.GetType().FullName}";
|
||||
|
||||
MessageBox.Show(
|
||||
$"Chyba počas zastavenia regulácie prietoku, v ramci StandingStartStopTestOp() pre flowMeter:\n" +
|
||||
$"{ex.Message}\n\n" +
|
||||
$"Diagnostika:\n{flowMeterStatus}\n\n" +
|
||||
$"{deviceInfo}\n\n" +
|
||||
$"Stack trace:\n{ex.StackTrace}",
|
||||
"Chyba",
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Error
|
||||
);
|
||||
|
||||
throw;
|
||||
}
|
||||
flowMeter = devices.FlowMeter as TBF.Rig.Uni.FlowMeter.FlowMeter;
|
||||
if (flowMeter == null) throw new ArgumentNullException("Invalid flow meter");
|
||||
|
||||
this.pulsesCount = pulsesCount;
|
||||
this.withDiverter = withDiverter;
|
||||
|
||||
if (withDiverter)
|
||||
{
|
||||
try
|
||||
{
|
||||
diverter = devices.Diverter as TBF.Rig.Uni.Diverter.Diverter;
|
||||
if (diverter == null) throw new ArgumentNullException("Invalid diverter");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string deviceInfo = GetAllDevicesInfo(devices);
|
||||
|
||||
MessageBox.Show(
|
||||
$"Chyba počas zastavenia regulácie prietoku, v ramci StandingStartStopTestOp() pre diverter:\n" +
|
||||
$"{ex.Message}\n\n{deviceInfo}\n\nStack trace:\n{ex.StackTrace}",
|
||||
"Chyba",
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Error
|
||||
);
|
||||
|
||||
throw;
|
||||
}
|
||||
diverter = devices.Diverter as TBF.Rig.Uni.Diverter.Diverter;
|
||||
if (diverter == null) throw new ArgumentNullException("Invalid diverter");
|
||||
}
|
||||
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
string GetAllDevicesInfo(object obj)
|
||||
{
|
||||
if (obj == null) return "devices objekt je null.";
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendLine("Zoznam zariadení v devices:");
|
||||
|
||||
var props = obj.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance);
|
||||
foreach (var prop in props)
|
||||
{
|
||||
try
|
||||
{
|
||||
object value = prop.GetValue(obj);
|
||||
string valueStr = value != null ? value.ToString() : "null";
|
||||
sb.AppendLine($"{prop.Name}: {valueStr}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
sb.AppendLine($"{prop.Name}: [Chyba pri načítaní - {ex.Message}]");
|
||||
}
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// Start this operation
|
||||
/// </summary>
|
||||
public void Start()
|
||||
public void Start()
|
||||
{
|
||||
if (flowMeter is TBF.Rig.Uni.FlowMeter.FlowMeter)
|
||||
{
|
||||
log.InfoFormat("Start() Et#={0} pulses={1} withDiverter={2}", ((TBF.Rig.Uni.FlowMeter.FlowMeter)flowMeter).Idx1, pulsesCount, withDiverter);
|
||||
log.InfoFormat("Start() Et#={0} pulses={1} withDiverter={2}", flowMeter.Idx1, pulsesCount, withDiverter);
|
||||
|
||||
/// Start the test (and the flow measurement)
|
||||
if (withDiverter) { uniCB.DivResolution = diverter.Resolution; }
|
||||
uniCB.SetActivity(Activity.StandingStartStopTest);
|
||||
uniCB.StartTest(false, ((TBF.Rig.Uni.FlowMeter.FlowMeter)flowMeter).Idx1, (withDiverter ? diverter.DiverterNr : 0), 0,
|
||||
false, withDiverter, false, true, false, pulsesCount);
|
||||
/// Start the test (and the flow measurement)
|
||||
if (withDiverter) { uniCB.DivResolution = diverter.Resolution; }
|
||||
uniCB.SetActivity(Activity.StandingStartStopTest);
|
||||
uniCB.StartTest(false, flowMeter.Idx1, (withDiverter ? diverter.DiverterNr : 0), 0,
|
||||
false, withDiverter, false, true, false, pulsesCount);
|
||||
|
||||
opState = OpState.StartingTest;
|
||||
}
|
||||
else if (flowMeter is TBF.Rig.Uni.FlowMetersInParallel.FlowMeter)
|
||||
{
|
||||
log.InfoFormat("Start() Et#={0} pulses={1} withDiverter={2}", ((TBF.Rig.Uni.FlowMetersInParallel.FlowMeter)flowMeter).Idx1, pulsesCount, withDiverter);
|
||||
|
||||
/// Start the test (and the flow measurement)
|
||||
if (withDiverter) { uniCB.DivResolution = diverter.Resolution; }
|
||||
uniCB.SetActivity(Activity.StandingStartStopTest);
|
||||
uniCB.StartTest(false, ((TBF.Rig.Uni.FlowMetersInParallel.FlowMeter)flowMeter).Idx1, (withDiverter ? diverter.DiverterNr : 0), 0,
|
||||
false, withDiverter, false, true, false, pulsesCount);
|
||||
|
||||
opState = OpState.StartingTest;
|
||||
}
|
||||
|
||||
|
||||
opState = OpState.StartingTest;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -17,8 +17,6 @@ using TBF.Boxes;
|
||||
using TBF.Rig.GenericDevices;
|
||||
using TBF.Rig.Sequences;
|
||||
using TBF.UiBridge;
|
||||
using AppDiagnostic;
|
||||
using SharedComponents;
|
||||
|
||||
namespace TBF.Rig.ControlBoard.Uni
|
||||
{
|
||||
@@ -549,7 +547,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
|
||||
if (!outputsInitialized || (outputLatch & routeMask) != (route & routeMask)) /// || (StateMachine.Time - lastStateMachineTime) >= 15)
|
||||
{
|
||||
var actionsToModify = actionQueue.Where(x => (x.ActionId == ActionID.ChangeRoute));
|
||||
var actionsToModify = actionQueue.Where(x => (x.ActionId == ActionID.ChangeRoute));
|
||||
bool oneModified = false;
|
||||
foreach (var a in actionsToModify)
|
||||
{
|
||||
@@ -575,11 +573,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
|
||||
|
||||
var combinedAction = Action.FetchNonConflictingActions(actionQueue); /// Default action is RequestDataOnly
|
||||
|
||||
combinedAction.RegulationMinStep = devices.RegulMinStep;
|
||||
|
||||
byte[] outData = OutputMessage.GetMessage(combinedAction, config, (ulong)valvesToInvert);
|
||||
|
||||
if (outData != null && outData.Length > 0)
|
||||
{
|
||||
if ((combinedAction.ActionId & ActionID.ChangeRoute) != 0)
|
||||
@@ -601,7 +595,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
{
|
||||
serialPort.Write(outData, 0, outData.Length);
|
||||
lastSentTime = DateTime.Now;
|
||||
}
|
||||
}
|
||||
|
||||
log.Debug(" " + OutputMessage.Caption());
|
||||
log.Debug(Telegram.LogTelegram(string.Format("Sent {0}: ", lastSentTime.ToString("HH:mm:ss")), outData));
|
||||
@@ -621,7 +615,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region IControlBoard interface
|
||||
|
||||
@@ -787,13 +781,12 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
|
||||
#endregion
|
||||
|
||||
public void MeasureFlow(bool isFromUI, int flowMeterId, int regulationMinStep = 0)
|
||||
public void MeasureFlow(bool isFromUI, int flowMeterId)
|
||||
{
|
||||
if (IsUIBlocked && isFromUI) return;
|
||||
|
||||
actionQueue.Enqueue(Action.MeasureFlow(isFromUI, flowMeterId, regulationMinStep));
|
||||
actionQueue.Enqueue(Action.MeasureFlow(isFromUI, flowMeterId));
|
||||
log.InfoFormat("Enqueue( MeasureFlow(fm={0}) )", flowMeterId);
|
||||
|
||||
foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
|
||||
}
|
||||
|
||||
@@ -801,13 +794,12 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
/// To be used with a regulation valve controlled by incremental pulses.
|
||||
/// Stability time is fixed: 200 ms
|
||||
/// </summary>
|
||||
public void SetFlow(bool isFromUI, int regVId, double freqLo, double freqHi, int regulationMinStep = 0)
|
||||
public void SetFlow(bool isFromUI, int regVId, double freqLo, double freqHi)
|
||||
{
|
||||
if (IsUIBlocked && isFromUI) return;
|
||||
|
||||
actionQueue.Enqueue(Action.SetFlow(isFromUI, regVId, freqLo, freqHi, Convert.ToInt32(Math.Round(Devices.PidCoef)), 200, regulationMinStep));
|
||||
actionQueue.Enqueue(Action.SetFlow(isFromUI, regVId, freqLo, freqHi, Convert.ToInt32(Math.Round(Devices.PidCoef)), 200));
|
||||
log.InfoFormat("Enqueue( SetFlow(rv={0}, fLo={1}, fHi={2}, pid={3}) )", regVId, freqLo, freqHi, Convert.ToInt32(Math.Round(Devices.PidCoef)));
|
||||
|
||||
foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
|
||||
}
|
||||
|
||||
@@ -822,23 +814,22 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
totalPulsesCount, massPulsesCount));
|
||||
log.InfoFormat("Enqueue( StartTest(fm={0}, div={1}, Sync={2}, withDiv={3}, s/s={4}, prolonged={5} pulsesCount={6} massPulsesCount={7}) )",
|
||||
flowMId, divId, isSyncMethod, isDivUsed, isStartStop, isProlonged, totalPulsesCount, massPulsesCount);
|
||||
|
||||
foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
|
||||
}
|
||||
|
||||
public void StopFlowControl(bool isFromUI, int regVId, int regulationMinStep = 0)
|
||||
public void StopFlowControl(bool isFromUI, int regVId)
|
||||
{
|
||||
if (IsUIBlocked && isFromUI) return;
|
||||
|
||||
if (regVId < TBF.Rig.Uni.RegValveAnalog.RegValve.RVAnalogIdx)
|
||||
{
|
||||
actionQueue.Enqueue(Action.RegVlvStop(isFromUI, regVId, regulationMinStep));
|
||||
actionQueue.Enqueue(Action.RegVlvStop(isFromUI, regVId));
|
||||
log.InfoFormat("Enqueue( RegVlvStop(rv={0}) )", regVId);
|
||||
}
|
||||
else if (regVId == TBF.Rig.Uni.RegValveAnalog.RegValve.RVAnalogIdx)
|
||||
{
|
||||
int dacVal = Data.StavDA[0];
|
||||
actionQueue.Enqueue(Action.RegVlvMoveToPos(isFromUI, regVId, dacVal, regulationMinStep));
|
||||
actionQueue.Enqueue(Action.RegVlvMoveToPos(isFromUI, regVId, dacVal));
|
||||
log.InfoFormat("Enqueue( RegVlvMoveToPos(rv={0}, positionLo={1}) )", regVId, dacVal);
|
||||
}
|
||||
foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
|
||||
@@ -850,7 +841,6 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
|
||||
actionQueue.Enqueue(Action.Stop(isFromUI));
|
||||
log.InfoFormat("Enqueue( Stop() )");
|
||||
|
||||
foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
|
||||
}
|
||||
|
||||
@@ -859,11 +849,11 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
/// </summary>
|
||||
/// <param name="rvId">Reg. valve ID</param>
|
||||
/// <param name="time">Time in seconds, positive value opens the reg. valve</param>
|
||||
public void RegVlvIncrMove(bool isFromUI, int regVId, double time, int regulationMinStep = 0)
|
||||
public void RegVlvIncrMove(bool isFromUI, int regVId, double time)
|
||||
{
|
||||
if (IsUIBlocked && isFromUI || regVId >= TBF.Rig.Uni.RegValveAnalog.RegValve.RVAnalogIdx) return;
|
||||
|
||||
var newAction = Action.RegVlvIncrMove(isFromUI, regVId, time, regulationMinStep);
|
||||
var newAction = Action.RegVlvIncrMove(isFromUI, regVId, time);
|
||||
|
||||
var actionsToModify = actionQueue.Where(x => (x.ActionId == ActionID.RegVlvIncrMove && x.RegVId == newAction.RegVId));
|
||||
bool oneModified = false;
|
||||
@@ -880,7 +870,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
oneModified = true;
|
||||
log.InfoFormat("RegVlvIncrMove(UI={0}, RV={1}, time={2}) ... an action in the queue modified", isFromUI, regVId, time);
|
||||
}
|
||||
|
||||
|
||||
if (!oneModified)
|
||||
{
|
||||
actionQueue.Enqueue(newAction);
|
||||
@@ -895,13 +885,12 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
/// </summary>
|
||||
/// <param name="rvId">Reg. valve ID</param>
|
||||
/// <param name="position">Reg. valve position (0 .. 1.0)</param>
|
||||
public void RegVlvMoveToPos(bool isFromUI, int regVId, int adcValLo, int adcValHi = -1, int regulationMinStep = 0)
|
||||
public void RegVlvMoveToPos(bool isFromUI, int regVId, int adcValLo, int adcValHi = -1)
|
||||
{
|
||||
if (IsUIBlocked && isFromUI || regVId > TBF.Rig.Uni.RegValveAnalog.RegValve.RVAnalogIdx) return;
|
||||
|
||||
actionQueue.Enqueue(Action.RegVlvMoveToPos(isFromUI, regVId, adcValLo, adcValHi, regulationMinStep));
|
||||
actionQueue.Enqueue(Action.RegVlvMoveToPos(isFromUI, regVId, adcValLo, adcValHi));
|
||||
log.InfoFormat("Enqueue( RegVlvMoveToPos(rv={0}, positionLo={1}, positionHi={2}) )", regVId, adcValLo, adcValHi);
|
||||
|
||||
foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
|
||||
}
|
||||
|
||||
@@ -918,7 +907,6 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
actionQueue.Enqueue(Action.Stop(isFromUI));
|
||||
}
|
||||
log.InfoFormat("Enqueue( SwitchDiverter(div#={0}, toTank={1}) )", divNr1, toTank);
|
||||
|
||||
foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
|
||||
}
|
||||
|
||||
@@ -928,7 +916,6 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
|
||||
actionQueue.Enqueue(Action.DelayStartOrStop(isFromUI));
|
||||
log.InfoFormat("Enqueue( DelayStartOrStop() )");
|
||||
|
||||
foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
|
||||
}
|
||||
|
||||
@@ -943,7 +930,6 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
DivTransitionData.DiverterAssociationValidUntil = StateMachine.Time + 5;
|
||||
actionQueue.Enqueue(Action.GetDiverterTransitionData(isFromUI));
|
||||
log.InfoFormat("Enqueue( GetDiverterTransitionData(div#={0}, toTank={1}) )", diverter.DiverterNr, toTank);
|
||||
|
||||
foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
|
||||
}
|
||||
|
||||
@@ -953,7 +939,6 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
|
||||
actionQueue.Enqueue(Action.GetScopeAnalyzerData(isFromUI));
|
||||
log.InfoFormat("Enqueue( GetScopeAnalyzerData() )");
|
||||
|
||||
foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
|
||||
}
|
||||
|
||||
@@ -963,7 +948,6 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
|
||||
actionQueue.Enqueue(Action.ResetScopeAnalyzer(isFromUI));
|
||||
log.InfoFormat("Enqueue( ResetScopeAnalyzer() )");
|
||||
|
||||
foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
|
||||
}
|
||||
|
||||
@@ -973,7 +957,6 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
|
||||
actionQueue.Enqueue(Action.GetSwitchCounterData(isFromUI));
|
||||
log.InfoFormat("Enqueue( GetSwitchCounterData() )");
|
||||
|
||||
foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
|
||||
}
|
||||
|
||||
|
||||
@@ -30,9 +30,11 @@ namespace TBF.Rig.DataContainer.Buoyancy
|
||||
public string CertPath { get; set; }
|
||||
public DateTime CalibDate { get; set; }
|
||||
public DateTime CalibValidDate { get; set; }
|
||||
public string MeterSerialNo { get; set; }
|
||||
public string MeterType { get; set; }
|
||||
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
ComponentCfg() {}
|
||||
|
||||
public ComponentCfg(string name, IComponentFactory factory)
|
||||
|
||||
@@ -31,9 +31,11 @@ namespace TBF.Rig.DataContainer.Density
|
||||
public string CertPath { get; set; }
|
||||
public DateTime CalibDate { get; set; }
|
||||
public DateTime CalibValidDate { get; set; }
|
||||
public string MeterSerialNo { get; set; }
|
||||
public string MeterType { get; set; }
|
||||
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
ComponentCfg() {}
|
||||
|
||||
public ComponentCfg(string name, IComponentFactory factory)
|
||||
|
||||
@@ -24,6 +24,8 @@ namespace TBF.Rig.DataContainer.Evaporation
|
||||
public string CertPath { get; set; }
|
||||
public DateTime CalibDate { get; set; }
|
||||
public DateTime CalibValidDate { get; set; }
|
||||
public string MeterSerialNo { get; set; }
|
||||
public string MeterType { get; set; }
|
||||
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
|
||||
@@ -56,9 +56,11 @@ namespace TBF.Rig.DataContainer.iPerlBenchInfo
|
||||
public string CertPath { get; set; }
|
||||
public DateTime CalibDate { get; set; }
|
||||
public DateTime CalibValidDate { get; set; }
|
||||
public string MeterSerialNo { get; set; }
|
||||
public string MeterType { get; set; }
|
||||
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
ComponentCfg() {}
|
||||
|
||||
public ComponentCfg(string name, IComponentFactory factory)
|
||||
|
||||
+21
-23
@@ -33,9 +33,10 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CycleBeginningForm));
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.orderGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.orderComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.pictureBox = new System.Windows.Forms.PictureBox();
|
||||
this.orderComboBox = new TBF.UI.Shared.SuggestComboBox();
|
||||
this.labelOrder = new System.Windows.Forms.Label();
|
||||
this.orderGroupBox.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
@@ -47,53 +48,50 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// orderGroupBox
|
||||
//
|
||||
this.orderGroupBox.Controls.Add(this.orderComboBox);
|
||||
resources.ApplyResources(this.orderGroupBox, "orderGroupBox");
|
||||
this.orderGroupBox.ForeColor = System.Drawing.Color.Black;
|
||||
this.orderGroupBox.Name = "orderGroupBox";
|
||||
this.orderGroupBox.TabStop = false;
|
||||
//
|
||||
// orderComboBox
|
||||
//
|
||||
this.orderComboBox.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.orderComboBox, "orderComboBox");
|
||||
this.orderComboBox.Name = "orderComboBox";
|
||||
//
|
||||
// pictureBox
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox, "pictureBox");
|
||||
this.pictureBox.Name = "pictureBox";
|
||||
this.pictureBox.TabStop = false;
|
||||
//
|
||||
// orderComboBox
|
||||
//
|
||||
this.orderComboBox.DropDownHeight = 530;
|
||||
this.orderComboBox.FilterRule = null;
|
||||
resources.ApplyResources(this.orderComboBox, "orderComboBox");
|
||||
this.orderComboBox.FormattingEnabled = true;
|
||||
this.orderComboBox.Name = "orderComboBox";
|
||||
this.orderComboBox.PropertySelector = null;
|
||||
this.orderComboBox.SuggestBoxHeight = 192;
|
||||
this.orderComboBox.SuggestListOrderRule = null;
|
||||
//
|
||||
// labelOrder
|
||||
//
|
||||
resources.ApplyResources(this.labelOrder, "labelOrder");
|
||||
this.labelOrder.Name = "labelOrder";
|
||||
//
|
||||
// CycleBeginningForm
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.DarkGray;
|
||||
this.Controls.Add(this.labelOrder);
|
||||
this.Controls.Add(this.orderComboBox);
|
||||
this.Controls.Add(this.pictureBox);
|
||||
this.Controls.Add(this.orderGroupBox);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.ForeColor = System.Drawing.Color.Black;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "CycleBeginningForm";
|
||||
this.TopMost = true;
|
||||
this.Load += new System.EventHandler(this.CycleBeginningForm_Load);
|
||||
this.orderGroupBox.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.GroupBox orderGroupBox;
|
||||
private System.Windows.Forms.ComboBox orderComboBox;
|
||||
private System.Windows.Forms.PictureBox pictureBox;
|
||||
private UI.Shared.SuggestComboBox orderComboBox;
|
||||
private System.Windows.Forms.Label labelOrder;
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ using TBF.Rig.Sequences;
|
||||
using TBF.Rig.Output.DB.SensusOracle;
|
||||
using TBF.Resources;
|
||||
using System.Drawing;
|
||||
using NHibernate;
|
||||
|
||||
namespace TBF.Rig.DataEntry.iPerl
|
||||
{
|
||||
@@ -23,7 +24,8 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
readonly EntryFormCfg cfg;
|
||||
|
||||
/// Loaded from database beforethe form is open
|
||||
IList<OrderDetails> listOfOrders;
|
||||
IList<IOrderInfo> listOfOrders;
|
||||
string preselectedOrder;
|
||||
|
||||
/// To be retrieved after the form is closed
|
||||
public string PurchaseOrder;
|
||||
@@ -40,6 +42,7 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
{
|
||||
InitializeComponent();
|
||||
ControlBox = false;
|
||||
preselectedOrder = null;
|
||||
|
||||
completed = false;
|
||||
StartForceCloseHandler();
|
||||
@@ -50,11 +53,12 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of text boxes for serial numbers</param>
|
||||
public CycleBeginningForm(int waterMetersCount, EntryFormCfg cfg)
|
||||
public CycleBeginningForm(int waterMetersCount, EntryFormCfg cfg, string preselectedOrder = null)
|
||||
: this()
|
||||
{
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.cfg = cfg;
|
||||
this.preselectedOrder = preselectedOrder;
|
||||
SNText = null;
|
||||
Disabled = null;
|
||||
}
|
||||
@@ -63,12 +67,49 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
private void CycleBeginningForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
Text = Strings.Data;
|
||||
labelOrder.Text = Strings.Purchase_order;
|
||||
orderGroupBox.Text = Strings.Purchase_order;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
|
||||
listOfOrders = ((cfg.Orders == Orders.FromOracle || cfg.Orders == Orders.CombinedAndFromOracle) && ProcessData.OracleDB != null)
|
||||
? ProcessData.OracleDB.ReadOrders()
|
||||
: new List<OrderDetails>();
|
||||
listOfOrders = new List<IOrderInfo>();
|
||||
|
||||
if ((cfg.Orders == Orders.FromOracle || cfg.Orders == Orders.CombinedAndFromOracle)
|
||||
&& ProcessData.OracleDB != null)
|
||||
{
|
||||
foreach (var o in ProcessData.OracleDB.ReadOrders())
|
||||
{
|
||||
listOfOrders.Add(o);
|
||||
}
|
||||
}
|
||||
|
||||
if ((cfg.Orders == Orders.FromTracingDB || cfg.Orders == Orders.CombinedAndFromTracingDB)
|
||||
&& ProcessData.TracingDB != null
|
||||
&& ProcessData.TracingDB.DebugLevel == DebugMode.Normal)
|
||||
{
|
||||
foreach (var o in ProcessData.TracingDB.ReadOrders())
|
||||
{
|
||||
listOfOrders.Add(o);
|
||||
}
|
||||
}
|
||||
|
||||
string insertFirst = null;
|
||||
if (!string.IsNullOrEmpty(preselectedOrder))
|
||||
{
|
||||
insertFirst = preselectedOrder;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Program.LocalSettings.PurchaseOrderHistoryCount > 0)
|
||||
{
|
||||
foreach (var o in listOfOrders)
|
||||
{
|
||||
if (o.POName == Program.LocalSettings.PurchaseOrderHistory[0])
|
||||
{
|
||||
insertFirst = o.POName;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch (cfg.Orders)
|
||||
{
|
||||
@@ -76,25 +117,71 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
PrepareOrderCombo(orderComboBox);
|
||||
break;
|
||||
|
||||
case Orders.CombinedAndFromOracle:
|
||||
case Orders.FromOracle:
|
||||
case Orders.FromTracingDB:
|
||||
if (insertFirst != null)
|
||||
{
|
||||
orderComboBox.Items.Add(insertFirst);
|
||||
orderComboBox.Text = insertFirst;
|
||||
}
|
||||
|
||||
foreach (var o in listOfOrders)
|
||||
{
|
||||
orderComboBox.Items.Add(o.POName + " - " + o.SNPrefix);
|
||||
}
|
||||
if (Program.LocalSettings.PurchaseOrderHistoryCount > 0)
|
||||
orderComboBox.SelectedIndex = orderComboBox.FindString(Program.LocalSettings.PurchaseOrderHistory[0]);
|
||||
if (o.POName != insertFirst)
|
||||
orderComboBox.Items.Add(o.POName);
|
||||
break;
|
||||
|
||||
case Orders.CombinedAndFromOracle:
|
||||
case Orders.CombinedAndFromTracingDB:
|
||||
if (insertFirst != null)
|
||||
{
|
||||
orderComboBox.Items.Add(insertFirst);
|
||||
orderComboBox.Text = insertFirst;
|
||||
}
|
||||
orderComboBox.Items.Add("BBAAMMXX");
|
||||
orderComboBox.Items.Add("BBAAOMXX");
|
||||
orderComboBox.Items.Add("BBAAQMXX");
|
||||
orderComboBox.Items.Add("BBAATMFR");
|
||||
orderComboBox.Items.Add("BBAATMXX");
|
||||
orderComboBox.Items.Add("CCAAMMXX");
|
||||
orderComboBox.Items.Add("CCAAOMXX");
|
||||
orderComboBox.Items.Add("CCAAQMXX");
|
||||
orderComboBox.Items.Add("CCAATMFR");
|
||||
orderComboBox.Items.Add("CCAATMXX");
|
||||
orderComboBox.Items.Add("DDAAMMXX");
|
||||
orderComboBox.Items.Add("DDAAOMXX");
|
||||
orderComboBox.Items.Add("DDAAQMXX");
|
||||
orderComboBox.Items.Add("DDAATMXX");
|
||||
orderComboBox.Items.Add("DEAAMMXX");
|
||||
orderComboBox.Items.Add("DEAAOMXX");
|
||||
orderComboBox.Items.Add("DEAAQMXX");
|
||||
orderComboBox.Items.Add("DEAATMXX");
|
||||
orderComboBox.Items.Add("EEAAMMXX");
|
||||
orderComboBox.Items.Add("EEAAOMXX");
|
||||
orderComboBox.Items.Add("EEAAQMXX");
|
||||
orderComboBox.Items.Add("EEAATMFR");
|
||||
orderComboBox.Items.Add("EEAATMXX");
|
||||
orderComboBox.Items.Add("FFAAMMXX");
|
||||
orderComboBox.Items.Add("FFAAOMXX");
|
||||
orderComboBox.Items.Add("FFAAQMXX");
|
||||
orderComboBox.Items.Add("FFAATMFR");
|
||||
orderComboBox.Items.Add("FFAATMXX");
|
||||
orderComboBox.Items.Add("GFAAMMXX");
|
||||
orderComboBox.Items.Add("GFAAOMXX");
|
||||
orderComboBox.Items.Add("GFAAQMXX");
|
||||
orderComboBox.Items.Add("GFAATMXX");
|
||||
|
||||
foreach (var o in listOfOrders)
|
||||
if (o.POName != insertFirst)
|
||||
orderComboBox.Items.Add(o.POName);
|
||||
break;
|
||||
}
|
||||
|
||||
///
|
||||
/// Draw an appropriate test bench picture
|
||||
///
|
||||
Side side = (ProcessData.BenchInfo is DataContainer.iPerlBenchInfo.Component)
|
||||
? (ProcessData.BenchInfo as DataContainer.iPerlBenchInfo.Component).Side
|
||||
: Side.Left;
|
||||
Side side = (TBF.Rig.Sequences.ProcessData.BenchInfo is DataContainer.iPerlBenchInfo.Component)
|
||||
? (TBF.Rig.Sequences.ProcessData.BenchInfo as DataContainer.iPerlBenchInfo.Component).Side
|
||||
: Side.Left;
|
||||
if ((cfg.Direction == Direction.Reversed_LR) && (side == Side.Left))
|
||||
{
|
||||
/// direction L->R (reversed), left side
|
||||
@@ -115,9 +202,7 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
/// direction R->L (forward), left side
|
||||
pictureBox.Image = Image.FromFile(string.Format("{0}\\Pictures\\forward_dir_left.jpg", Program.ExecutableDir, true));
|
||||
}
|
||||
pictureBox.SendToBack();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load Purchase order combo box items from the LocalSettings PurchaseOrderHistory array
|
||||
@@ -138,20 +223,45 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
PurchaseOrder = orderComboBox.Text.Split(' ')[0].Trim();
|
||||
|
||||
if (PurchaseOrder.Length > 10 ||
|
||||
(cfg.Orders != Orders.Arbitrary && orderComboBox.FindString(PurchaseOrder) < 0))
|
||||
if (orderComboBox.Text.Length > 8 ||
|
||||
(cfg.Orders != Orders.Arbitrary && !orderComboBox.Items.Contains(orderComboBox.Text)))
|
||||
{
|
||||
MessageBox.Show(Strings.Invalid_order_number, Strings.Error, MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Exclamation);
|
||||
return;
|
||||
}
|
||||
|
||||
ProcessData.OrderDetails = (listOfOrders == null) ? null : listOfOrders.FirstOrDefault<OrderDetails>(x => x.POName == orderComboBox.Text);
|
||||
IOrderInfo oInfo = (listOfOrders == null) ? null : listOfOrders.FirstOrDefault<IOrderInfo>(x => x.POName == orderComboBox.Text);
|
||||
///
|
||||
if (oInfo is Output.DB.SensusOracle.OrderDetails)
|
||||
{
|
||||
ProcessData.OrderInfo = oInfo;
|
||||
}
|
||||
else if (oInfo is SharedDatabase.Entities.OrderInfo && ProcessData.TracingDB != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var session = ProcessData.TracingDB.SessionFactory.OpenSession())
|
||||
{
|
||||
var list = session.QueryOver<SharedDatabase.Entities.OrderInfo>()
|
||||
.Where(x => (x.POName == Program.MainWnd.SelectedProcedure.OrderInfo.POName))
|
||||
.List();
|
||||
ProcessData.OrderInfo = (list.Count == 1) ? list[0] : null;
|
||||
string workflow = (list.Count == 1) ? list[0].Workflow : null;
|
||||
ProcessData.WorkflowSummary = SharedDatabase.WorkflowSummary.ReadFromDB(workflow, "test", session);
|
||||
session.Close();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.ErrorFormat("Unable to load an order, workflow or workstep: {0}", ex);
|
||||
ProcessData.OrderInfo = null;
|
||||
ProcessData.WorkflowSummary = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Program.LocalSettings.UpdateHistory(PurchaseOrder, ref Program.LocalSettings.PurchaseOrderHistory);
|
||||
PurchaseOrder = orderComboBox.Text;
|
||||
Program.LocalSettings.UpdateHistory(orderComboBox.Text, ref Program.LocalSettings.PurchaseOrderHistory);
|
||||
|
||||
completed = true;
|
||||
Close();
|
||||
@@ -175,6 +285,6 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
Close();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,14 +122,10 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="okButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>836, 32</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="okButton.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>4, 4, 4, 4</value>
|
||||
<value>627, 26</value>
|
||||
</data>
|
||||
<data name="okButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>149, 78</value>
|
||||
<value>112, 63</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="okButton.TabIndex" type="System.Int32, mscorlib">
|
||||
@@ -148,16 +144,61 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>okButton.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="orderComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>90, 32</value>
|
||||
</data>
|
||||
<data name="orderComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>432, 31</value>
|
||||
</data>
|
||||
<data name="orderComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>orderComboBox.Name" xml:space="preserve">
|
||||
<value>orderComboBox</value>
|
||||
</data>
|
||||
<data name=">>orderComboBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>orderComboBox.Parent" xml:space="preserve">
|
||||
<value>orderGroupBox</value>
|
||||
</data>
|
||||
<data name=">>orderComboBox.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="orderGroupBox.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="orderGroupBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>28, 12</value>
|
||||
</data>
|
||||
<data name="orderGroupBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>565, 82</value>
|
||||
</data>
|
||||
<data name="orderGroupBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="orderGroupBox.Text" xml:space="preserve">
|
||||
<value>Order</value>
|
||||
</data>
|
||||
<data name=">>orderGroupBox.Name" xml:space="preserve">
|
||||
<value>orderGroupBox</value>
|
||||
</data>
|
||||
<data name=">>orderGroupBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>orderGroupBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>orderGroupBox.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="pictureBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>37, 145</value>
|
||||
</data>
|
||||
<data name="pictureBox.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>4, 4, 4, 4</value>
|
||||
<value>28, 118</value>
|
||||
</data>
|
||||
<data name="pictureBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>948, 612</value>
|
||||
<value>711, 497</value>
|
||||
</data>
|
||||
<data name="pictureBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>8</value>
|
||||
@@ -172,79 +213,19 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>pictureBox.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="orderComboBox.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="orderComboBox.IntegralHeight" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="orderComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>37, 73</value>
|
||||
</data>
|
||||
<data name="orderComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>777, 37</value>
|
||||
</data>
|
||||
<data name="orderComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name=">>orderComboBox.Name" xml:space="preserve">
|
||||
<value>orderComboBox</value>
|
||||
</data>
|
||||
<data name=">>orderComboBox.Type" xml:space="preserve">
|
||||
<value>TBF.UI.Shared.SuggestComboBox, TBF, Version=2.33.2152.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>orderComboBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>orderComboBox.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="labelOrder.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="labelOrder.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="labelOrder.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>32, 32</value>
|
||||
</data>
|
||||
<data name="labelOrder.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>83, 29</value>
|
||||
</data>
|
||||
<data name="labelOrder.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="labelOrder.Text" xml:space="preserve">
|
||||
<value>label1</value>
|
||||
</data>
|
||||
<data name=">>labelOrder.Name" xml:space="preserve">
|
||||
<value>labelOrder</value>
|
||||
</data>
|
||||
<data name=">>labelOrder.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>labelOrder.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>labelOrder.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>8, 16</value>
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name="$this.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1025, 786</value>
|
||||
</data>
|
||||
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>4, 4, 4, 4</value>
|
||||
<value>769, 639</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Batch data</value>
|
||||
|
||||
@@ -7,6 +7,7 @@ using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.Rig;
|
||||
using TBF.Rig.GenericDevices;
|
||||
using TBF.Rig.Sequences;
|
||||
|
||||
namespace TBF.Rig.DataEntry.iPerl
|
||||
{
|
||||
@@ -84,7 +85,7 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
this.waterMeters = TBF.Rig.Sequences.ProcessData.BatchRslts.Batch.WaterMeters;
|
||||
this.waterMeters = ProcessData.BatchRslts.Batch.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -97,6 +98,10 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>null (not implemented)</returns>
|
||||
public IOperation ShowAdvancedTestStartFormOp(IRegReader[] regReaders, IList<Results.Entities.WaterMeter> waterMeters, bool isCondOp) { return null; }
|
||||
public IOperation ShowTestCollectFormOp(IRegReader[] regReaders, double volumeRef, double errLimLo, double errLimHi) { return null; }
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestEndFormOp(IRegReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
||||
{
|
||||
@@ -113,7 +118,8 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
///
|
||||
void OpenBeginningDlg(EntryForm myRef)
|
||||
{
|
||||
myRef.modelessDlg = new CycleBeginningForm(TBF.Data.WMsCount, myRef.entryFormCfg);
|
||||
myRef.modelessDlg = new CycleBeginningForm(TBF.Data.WMsCount, myRef.entryFormCfg,
|
||||
ProcessData.SelectedProcedure.OrderInfo != null ? ProcessData.SelectedProcedure.OrderInfo.POName : string.Empty);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
@@ -136,7 +142,16 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
switch (currentOp)
|
||||
{
|
||||
case CurrentOp.ShowFormAtCycleBeginning:
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
|
||||
if (ProcessData.SelectedProcedure.OrderInfo == null || entryFormCfg.Direction != Direction.S640)
|
||||
{
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Only in case of 640 meters and an order information entered during the procedure selection
|
||||
/// this DataEntry form at the beginning of the cycle is skipped
|
||||
modelessDlg = null;
|
||||
}
|
||||
break;
|
||||
case CurrentOp.EnterTestStartStates:
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestStartStatesDlg), this);
|
||||
@@ -151,7 +166,17 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
/// <returns>Event.ResultsPrinted</returns>
|
||||
public Event Run()
|
||||
{
|
||||
if ((modelessDlg is IHasCompleted) && !(modelessDlg as IHasCompleted).Completed)
|
||||
if (ProcessData.SelectedProcedure.OrderInfo != null && entryFormCfg.Direction == Direction.S640)
|
||||
{
|
||||
for (int i = 0; i < waterMeters.Count; i++)
|
||||
{
|
||||
if (waterMeters[i] != null)
|
||||
waterMeters[i].PurchaseOrder = ProcessData.SelectedProcedure.OrderInfo.POName;
|
||||
}
|
||||
return Event.ModelessFormClosed;
|
||||
}
|
||||
|
||||
if ((modelessDlg is IHasCompleted) && !(modelessDlg as IHasCompleted).Completed)
|
||||
{
|
||||
return Event.ModelessFormIsOpen;
|
||||
}
|
||||
@@ -214,26 +239,5 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
}
|
||||
currentOp = CurrentOp.None;
|
||||
}
|
||||
|
||||
public IOperation ShowAdvancedTestStartFormOp(IRegReader[] regReaders, IList<Results.Entities.WaterMeter> waterMeters, bool isCondOp = false)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestStartStates;
|
||||
this.regReaders = regReaders;
|
||||
this.waterMeters = waterMeters;
|
||||
// Handle isCondOp if necessary
|
||||
return this;
|
||||
}
|
||||
|
||||
public IOperation ShowTestCollectFormOp(IRegReader[] regReaders, double volumeRef, double errLimLo, double errLimHi)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestEndStates;
|
||||
this.regReaders = regReaders;
|
||||
this.refVolume = volumeRef;
|
||||
this.errLimLo = errLimLo;
|
||||
this.errLimHi = errLimHi;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,17 +32,23 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
public enum Orders
|
||||
{
|
||||
#if LANG_SK
|
||||
[Description("Ľubovolné")] Arbitrary,
|
||||
[Description("Aktívne z Oracle")] FromOracle,
|
||||
[Description("Združené a aktívne z Oracle")] CombinedAndFromOracle,
|
||||
#elif LANG_DE
|
||||
[Description("Arbitrary")] Arbitrary,
|
||||
[Description("Active from Oracle")] FromOracle,
|
||||
[Description("Combined and active from Oracle")] CombinedAndFromOracle,
|
||||
[Description("Ľubovolné")] Arbitrary,
|
||||
[Description("Z Oracle databázy")] FromOracle,
|
||||
[Description("Zo sledovacej databázy")] FromTracingDB,
|
||||
[Description("Združené a z Oracle")] CombinedAndFromOracle,
|
||||
[Description("Združené a zo sledovacej databázy")] CombinedAndFromTracingDB,
|
||||
#elif LANG_CZ
|
||||
[Description("Libovolné")] Arbitrary,
|
||||
[Description("Z Oracle databáze")] FromOracle,
|
||||
[Description("Ze sledovací databáze")] FromTracingDB,
|
||||
[Description("Sdružené a z Oracle")] CombinedAndFromOracle,
|
||||
[Description("Sdružené a ze sledovací databáze")] CombinedAndFromTracingDB,
|
||||
#else
|
||||
[Description("Arbitrary")] Arbitrary,
|
||||
[Description("Active from Oracle")] FromOracle,
|
||||
[Description("Combined and active from Oracle")] CombinedAndFromOracle,
|
||||
[Description("Arbitrary")] Arbitrary,
|
||||
[Description("From Oracle")] FromOracle,
|
||||
[Description("From Tracing DB")] FromTracingDB,
|
||||
[Description("Combined and from Oracle")] CombinedAndFromOracle,
|
||||
[Description("Combined and from Tracing DB")] CombinedAndFromTracingDB,
|
||||
#endif
|
||||
Count,
|
||||
}
|
||||
@@ -93,22 +99,15 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
|
||||
public ICollection<string> ParamValues(int i)
|
||||
{
|
||||
var list = new List<string>();
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
return new string[]
|
||||
{
|
||||
Direction.Forward_RL.ToDescription(),
|
||||
Direction.Reversed_LR.ToDescription(),
|
||||
Direction.S640.ToDescription(),
|
||||
};
|
||||
for (Direction d = 0; d < Direction.Count; d++) list.Add(d.ToDescription());
|
||||
return list;
|
||||
case 1:
|
||||
return new string[]
|
||||
{
|
||||
Orders.Arbitrary.ToDescription(),
|
||||
Orders.FromOracle.ToDescription(),
|
||||
Orders.CombinedAndFromOracle.ToDescription(),
|
||||
};
|
||||
for (Orders o = 0; o < Orders.Count; o++) list.Add(o.ToDescription());
|
||||
return list;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
{
|
||||
public class Factory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return "DataEntry-iPerl"; } }
|
||||
public string ClassName { get { return GetType().Namespace.Substring(8); } }
|
||||
public override string ToString() { return ClassName; }
|
||||
|
||||
public IComponent DummyComponent() { return new EntryForm(); }
|
||||
|
||||
@@ -22,8 +22,7 @@ namespace TBF.Rig.Dummy.RegValve
|
||||
public bool IsCoax { get { return false; } }
|
||||
|
||||
public double Position { get { return 50.0; } }
|
||||
///
|
||||
public int RegulationMinStep { get { return 0; } }
|
||||
|
||||
|
||||
IDictionary<double, double> dict;
|
||||
public IDictionary<double, double> Dict { get { return dict; } }
|
||||
|
||||
@@ -15,5 +15,8 @@ namespace TBF.Rig.GenericDevices
|
||||
string CertPath { get; set; } /// Path to a calibration certificate PDF document
|
||||
DateTime CalibDate { get; set; } /// Date of calibration
|
||||
DateTime CalibValidDate { get; set; } /// Calibration is valid until (date)
|
||||
///
|
||||
string MeterSerialNo { get; set; } /// Serial number of the meter
|
||||
string MeterType { get; set; } /// Type of the meter
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,9 @@ namespace TBF.Rig.GenericDevices
|
||||
string GetCertPath(int rangeIx1); /// Get path to a calibration certificate PDF document
|
||||
DateTime GetCalibDate(int rangeIx1); /// Get the date of calibration
|
||||
DateTime GetCalibValidDate(int rangeIx1); /// Get calibration valid until (date)
|
||||
///
|
||||
string GetMeterSerialNo(int rangeIx1); /// Get serial number of the meter
|
||||
string GetMeterType(int rangeIx1); /// Get type of the meter
|
||||
|
||||
void SetCalibCertificate(int rangeIx1, string certificate); /// Set calibration certificate number
|
||||
void SetCertPath(int rangeIx1, string certPath); /// Set path to a calibration certificate PDF document
|
||||
|
||||
@@ -41,6 +41,8 @@ namespace TBF.Rig.Hart.Nivotrack
|
||||
public string CertPath { get; set; }
|
||||
public DateTime CalibDate { get; set; }
|
||||
public DateTime CalibValidDate { get; set; }
|
||||
public string MeterSerialNo { get; set; }
|
||||
public string MeterType { get; set; }
|
||||
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
|
||||
@@ -40,6 +40,8 @@ namespace TBF.Rig.Keithley.TempMeter
|
||||
public string CertPath { get; set; }
|
||||
public DateTime CalibDate { get; set; }
|
||||
public DateTime CalibValidDate { get; set; }
|
||||
public string MeterSerialNo { get; set; }
|
||||
public string MeterType { get; set; }
|
||||
|
||||
/// Schematic drawing info
|
||||
public Shape Shape { get; set; }
|
||||
|
||||
@@ -56,6 +56,8 @@ namespace TBF.Rig.MettlerToledo.Standard
|
||||
public string CertPath { get; set; }
|
||||
public DateTime CalibDate { get; set; }
|
||||
public DateTime CalibValidDate { get; set; }
|
||||
public string MeterSerialNo { get; set; }
|
||||
public string MeterType { get; set; }
|
||||
|
||||
/// Schematic drawing info
|
||||
public Shape Shape { get; set; }
|
||||
|
||||
@@ -43,6 +43,8 @@ namespace TBF.Rig.Modbus.Meret.AdjustableScale
|
||||
public string CertPath { get; set; }
|
||||
public DateTime CalibDate { get; set; }
|
||||
public DateTime CalibValidDate { get; set; }
|
||||
public string MeterSerialNo { get; set; }
|
||||
public string MeterType { get; set; }
|
||||
|
||||
/// Schematic drawing info
|
||||
public Shape Shape { get; set; }
|
||||
|
||||
@@ -39,6 +39,8 @@ namespace TBF.Rig.Modbus.PressureMeter.Meret
|
||||
public string CertPath { get; set; }
|
||||
public DateTime CalibDate { get; set; }
|
||||
public DateTime CalibValidDate { get; set; }
|
||||
public string MeterSerialNo { get; set; }
|
||||
public string MeterType { get; set; }
|
||||
|
||||
/// Schematic drawing info
|
||||
public Shape Shape { get; set; }
|
||||
|
||||
@@ -47,6 +47,8 @@ namespace TBF.Rig.Modbus.TempMeter.Groch
|
||||
public string CertPath { get; set; }
|
||||
public DateTime CalibDate { get; set; }
|
||||
public DateTime CalibValidDate { get; set; }
|
||||
public string MeterSerialNo { get; set; }
|
||||
public string MeterType { get; set; }
|
||||
|
||||
/// Schematic drawing info
|
||||
public SchematicDrawing.Shape Shape { get; set; }
|
||||
|
||||
@@ -35,6 +35,8 @@ namespace TBF.Rig.Modbus.TempMeter.Meret
|
||||
public string CertPath { get; set; }
|
||||
public DateTime CalibDate { get; set; }
|
||||
public DateTime CalibValidDate { get; set; }
|
||||
public string MeterSerialNo { get; set; }
|
||||
public string MeterType { get; set; }
|
||||
|
||||
/// Schematic drawing info
|
||||
public Shape Shape { get; set; }
|
||||
|
||||
@@ -15,8 +15,7 @@ namespace TBF.Rig
|
||||
public string Selector;
|
||||
public IFlowMeter FlowMeter;
|
||||
public IRegValve RegValve;
|
||||
public int RegulMinStep;
|
||||
public float PidCoef;
|
||||
public float PidCoef;
|
||||
public IDiverter Diverter;
|
||||
public ITempMeter TempMtrDiv;
|
||||
public IScaleOrTank Scale;
|
||||
@@ -40,7 +39,7 @@ namespace TBF.Rig
|
||||
RegVPositions = new List<RegValvePosition>();
|
||||
ValvesOpen = new List<IValve>();
|
||||
ValvesClose = new List<IValve>();
|
||||
}
|
||||
}
|
||||
|
||||
/// Constructor from data entity
|
||||
public OutputPath(Config.Entities.OutputPath entity, IList<Rig.Generic.IComponent> components)
|
||||
@@ -51,8 +50,7 @@ namespace TBF.Rig
|
||||
Selector = entity.Selector;
|
||||
FlowMeter = TbfComponents.FindComponent(entity.FlowMeter, components) as IFlowMeter;
|
||||
RegValve = TbfComponents.FindComponent(entity.RegValve, components) as IRegValve;
|
||||
RegulMinStep = entity.RegulMinStep;
|
||||
PidCoef = entity.PidCoef;
|
||||
PidCoef = entity.PidCoef;
|
||||
Diverter = TbfComponents.FindComponent(entity.Diverter, components) as IDiverter;
|
||||
TempMtrDiv = TbfComponents.FindComponent(entity.TempMtrDiv, components) as ITempMeter;
|
||||
Scale = TbfComponents.FindComponent(entity.Scale, components) as IScaleOrTank;
|
||||
|
||||
@@ -68,6 +68,8 @@ namespace TBF.Rig.Scales.MettlerToledo
|
||||
public string CertPath { get; set; }
|
||||
public DateTime CalibDate { get; set; }
|
||||
public DateTime CalibValidDate { get; set; }
|
||||
public string MeterSerialNo { get; set; }
|
||||
public string MeterType { get; set; }
|
||||
|
||||
/// Schematic drawing info
|
||||
public Shape Shape { get; set; }
|
||||
|
||||
@@ -18,8 +18,6 @@ using TBF.Rig.Network.RestAPI;
|
||||
using TBF.Rig.Network.RestAPI.facade;
|
||||
using TBF.Rig.Output.Printers.GroupPrinting.Single;
|
||||
using TBF.UiBridge;
|
||||
using SharedComponents;
|
||||
using System.Text;
|
||||
|
||||
namespace TBF.Rig.Sequences
|
||||
{
|
||||
@@ -35,7 +33,6 @@ namespace TBF.Rig.Sequences
|
||||
|
||||
int simultWithPurgingCount;
|
||||
Generic.IComponentCfg simultWithPurgingCfg;
|
||||
Generic.IComponent simultWithPurging;
|
||||
Generic.IProcedureParams simultWithPurgingProcParams;
|
||||
IList<Config.Entities.Test> simultWithPurgingTests;
|
||||
IList<Generic.ITestParams> simultWithPurgingTestParams;
|
||||
@@ -47,10 +44,10 @@ namespace TBF.Rig.Sequences
|
||||
IList<Generic.ITestParams> simultWithEvacuationTestParams;
|
||||
|
||||
System.Windows.Forms.Form modelessDlg;
|
||||
///
|
||||
delegate void CommunicationFormDlgt(MainSeq myRef, Generic.IComponentCfg cfg, Generic.IProcedureParams procParams, IList<Test> tests, IList<Generic.ITestParams> multiTestParams);
|
||||
///
|
||||
delegate void CommunicationFormDlgt(MainSeq myRef, Generic.IComponent testMethod, Generic.IComponentCfg cfg, Generic.IProcedureParams procParams, IList<Test> tests, IList<Generic.ITestParams> multiTestParams);
|
||||
///
|
||||
void OpenIPerlCommForm(MainSeq myRef, Generic.IComponent testMethod, Generic.IComponentCfg cfg, Generic.IProcedureParams procParams, IList<Test> tests, IList<Generic.ITestParams> multiTestParams)
|
||||
void OpenIPerlCommForm(MainSeq myRef, Generic.IComponentCfg cfg, Generic.IProcedureParams procParams, IList<Test> tests, IList<Generic.ITestParams> multiTestParams)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -63,13 +60,9 @@ namespace TBF.Rig.Sequences
|
||||
IList<TestMethods.iPerlCommunication.iPerlCommunicationParams> iPerlCommParams = new List<TestMethods.iPerlCommunication.iPerlCommunicationParams>();
|
||||
foreach (var tp in multiTestParams) iPerlCommParams.Add(tp as TestMethods.iPerlCommunication.iPerlCommunicationParams);
|
||||
|
||||
/*myRef.modelessDlg = new TestMethods.iPerlCommunication.iPerlCommunicationForm(iPerlCfg, tests, iPerlCommParams);
|
||||
myRef.modelessDlg.Show();*/
|
||||
|
||||
myRef.modelessDlg = new TestMethods.iPerlCommunication.iPerlCommunicationForm(
|
||||
testMethod as TBF.Rig.TestMethods.iPerlCommunication.TestMethod, tests, iPerlCommParams);
|
||||
myRef.modelessDlg.Show();
|
||||
}
|
||||
myRef.modelessDlg = new TestMethods.iPerlCommunication.iPerlCommunicationForm(iPerlCfg, tests, iPerlCommParams);
|
||||
myRef.modelessDlg.Show();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
log.FatalFormat("---------------( MainSeq : OpenIperlCommForm crashed !!! )---------------");
|
||||
@@ -83,7 +76,7 @@ namespace TBF.Rig.Sequences
|
||||
}
|
||||
}
|
||||
///
|
||||
void OpenS640CommForm(MainSeq myRef, Generic.IComponent testMethod, Generic.IComponentCfg cfg, Generic.IProcedureParams procParams, IList<Test> tests, IList<Generic.ITestParams> multiTestParams)
|
||||
void OpenS640CommForm(MainSeq myRef, Generic.IComponentCfg cfg, Generic.IProcedureParams procParams, IList<Test> tests, IList<Generic.ITestParams> multiTestParams)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1501,45 +1494,13 @@ namespace TBF.Rig.Sequences
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
/*catch (Exception exc)
|
||||
catch (Exception exc)
|
||||
{
|
||||
string msg = string.Format("Unable to update Batch.RsltsSent in local MySQL DB, BatchNr = {0}",
|
||||
ProcessData.BatchRslts.Batch.BatchNr);
|
||||
Bridge.OnError(this, msg);
|
||||
log.FatalFormat("{0}: {1}", msg, exc.Message);
|
||||
goto error;
|
||||
}*/
|
||||
catch (Exception exc)
|
||||
{
|
||||
var batch = ProcessData.BatchRslts.Batch;
|
||||
|
||||
// ⚠️ Skladanie detailného logu do jedného reťazca
|
||||
var logBuilder = new StringBuilder();
|
||||
logBuilder.AppendLine("----------------- Unable to update Batch.RsltsSent in local MySQL DB, BatchNr = {0} ------------------");
|
||||
logBuilder.AppendLine("❌ Chyba pri UPDATE `batch` SET `RsltsSent` = '1'");
|
||||
logBuilder.AppendLine($"BatchNr = {batch.BatchNr}");
|
||||
logBuilder.AppendLine($"SQL príkaz: UPDATE `batch` SET `RsltsSent` = '1' WHERE `batch`.`BatchNr` = {batch.BatchNr};");
|
||||
logBuilder.AppendLine();
|
||||
logBuilder.AppendLine("💥 Výnimka:");
|
||||
logBuilder.AppendLine($" - Message: {exc.Message}");
|
||||
logBuilder.AppendLine($" - StackTrace: {exc.StackTrace}");
|
||||
logBuilder.AppendLine($" - InnerException: {(exc.InnerException != null ? exc.InnerException.Message : "null")}");
|
||||
logBuilder.AppendLine();
|
||||
logBuilder.AppendLine("📦 Batch obsah:");
|
||||
|
||||
// 💡 Dynamický výpis vlastností objektu Batch
|
||||
var props = batch.GetType().GetProperties();
|
||||
foreach (var prop in props)
|
||||
{
|
||||
object value = prop.GetValue(batch, null);
|
||||
logBuilder.AppendLine($" - {prop.Name}: {value}");
|
||||
}
|
||||
|
||||
// ✍️ Uloženie do vlastného logu
|
||||
LiveLogCache.Instance.AddLog(logBuilder.ToString());
|
||||
|
||||
Bridge.OnError(this, "Chyba pri aktualizácii výsledkov v MySQL.");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ namespace TBF.Rig.Sequences
|
||||
public static IErrorFlags ErrorFlagsComp;
|
||||
public static IStatisticsMonitoring StatisticsMonitoringComp;
|
||||
public static Output.DB.SensusOracle.Database OracleDB;
|
||||
public static Output.DB.SensusOracle.OrderDetails OrderDetails;
|
||||
public static Output.DB.ProductionTracing.Tracing TracingDB;
|
||||
|
||||
///
|
||||
@@ -529,22 +528,18 @@ namespace TBF.Rig.Sequences
|
||||
StateMachine.ControlBoardMain.TestTime.ToString("F3"),/// test time in s
|
||||
StateMachine.ControlBoardMain.RefPulses, /// reference flow meter pulses count
|
||||
outPath.FlowMeter != null ? Formulas.VolumeFromPulses(StateMachine.ControlBoardMain.RefPulses, 1 / outPath.FlowMeter.LtrPerPulse).ToString("F3") : "0.000", /// volume in l
|
||||
benchPath.TempMtrUp != null ? benchPath.TempMtrUp.ReadTemperature() : 0, /// temp. at the beginning of line in degree C
|
||||
benchPath.TempMtrUp != null ? benchPath.TempMtrUp.ReadTemperature() : 0, /// temp. at the beginning of line in degree C
|
||||
benchPath.TempMtrDown != null ? benchPath.TempMtrDown.ReadTemperature() : 0, /// temp. at the end of line in degree C
|
||||
outPath.TempMtrDiv != null ? outPath.TempMtrDiv.ReadTemperature() : 0, /// temp. at the diverter in degree C
|
||||
//---new2
|
||||
PressUp.ToString(), /// water pressure at the beginning of test line in bar (= 100 kPa)
|
||||
PressDown.ToString(), /// water pressure at the end of test line in bar (= 100 kPa)
|
||||
PressDelta.ToString(),
|
||||
//---endnew2
|
||||
outPath.TempMtrDiv != null ? outPath.TempMtrDiv.ReadTemperature() : 0, /// temp. at the diverter in degree C
|
||||
PressUp, /// water pressure at the beginning of test line in bar (= 100 kPa)
|
||||
PressDown, /// water pressure at the end of test line in bar (= 100 kPa)
|
||||
PressDelta,
|
||||
(outPath.Scale is IScale) ? (outPath.Scale as IScale).Mass : 0, /// collected water mass in kg
|
||||
"VolMM",
|
||||
//---new2
|
||||
AmbTemp.ToString(), /// ambient temperature in degree C
|
||||
AmbHumi.ToString(), /// ambient humidity in R%
|
||||
AmbPress.ToString(), /// ambient pressure in mbar (= 1 hPa)
|
||||
//---endnew2
|
||||
outPath.RegValve.Position.ToString("F1")); /// regulation valve position in % (0=closed / 100=open)
|
||||
AmbTemp, /// ambient temperature in degree C
|
||||
AmbHumi, /// ambient humidity in R%
|
||||
AmbPress, /// ambient pressure in mbar (= 1 hPa)
|
||||
outPath.RegValve?.Position.ToString("F1")); /// regulation valve position in % (0=closed / 100=open)
|
||||
}
|
||||
|
||||
public void LogProcessDataHeaderHeatMeters(ILog logger, string sectionName)
|
||||
@@ -566,25 +561,19 @@ namespace TBF.Rig.Sequences
|
||||
benchPath.TempMtrUp != null ? benchPath.TempMtrUp.ReadTemperature() : 0, /// temp. at the beginning of line in degree C
|
||||
benchPath.TempMtrDown != null ? benchPath.TempMtrDown.ReadTemperature() : 0, /// temp. at the end of test in degree C
|
||||
outPath.TempMtrDiv != null ? outPath.TempMtrDiv.ReadTemperature() : 0, /// temp. at the diverter in degree C
|
||||
//---new2
|
||||
PressUp.ToString(),
|
||||
PressDown.ToString(),
|
||||
PressDelta.ToString(),
|
||||
//---endnew2
|
||||
PressUp,
|
||||
PressDown,
|
||||
PressDelta,
|
||||
(outPath.Scale is IScale) ? (outPath.Scale as IScale).Mass : 0, /// collected water mass in kg
|
||||
"VolMM",
|
||||
//---new2
|
||||
AmbTemp.ToString(),
|
||||
AmbHumi.ToString(),
|
||||
AmbPress.ToString(),
|
||||
//---endnew2
|
||||
AmbTemp,
|
||||
AmbHumi,
|
||||
AmbPress,
|
||||
outPath.RegValve.Position.ToString("F1"),
|
||||
//---new2
|
||||
TempRefHi1.ToString(),
|
||||
TempRefHi2.ToString(),
|
||||
TempRefLo1.ToString(),
|
||||
TempRefLo2.ToString());
|
||||
//---endnew2
|
||||
TempRefHi1,
|
||||
TempRefHi2,
|
||||
TempRefLo1,
|
||||
TempRefLo2);
|
||||
}
|
||||
|
||||
///
|
||||
|
||||
@@ -1505,23 +1505,25 @@ namespace TBF.Rig.Sequences
|
||||
tstRslt.DensityLine = Formulas.RealDensity();
|
||||
tstRslt.DensityDiv = Formulas.RealDensity();
|
||||
|
||||
double flowMeterLtrPerPulse = outPath.FlowMeter?.LtrPerPulse ?? 1;
|
||||
|
||||
tstRslt.MethodClass = TbfComponents.FindComponent(test.Method).ClassName;
|
||||
tstRslt.StartTime = DateTime.Now;
|
||||
tstRslt.EndTime = DateTime.Now + new TimeSpan(0, 0, 1);
|
||||
tstRslt.FlowSetTime = 10;
|
||||
tstRslt.TestTime = tstRslt.TargetTime();
|
||||
tstRslt.PulsesMaster = (outPath.FlowMeter.LtrPerPulse > 1E-6) ? (1.0075 * tstRslt.TargetVolume() / outPath.FlowMeter.LtrPerPulse) : 1;
|
||||
tstRslt.PulsesMaster = (flowMeterLtrPerPulse > 1E-6) ? (1.0075 * tstRslt.TargetVolume() / flowMeterLtrPerPulse) : 1;
|
||||
tstRslt.MassStartRaw = 0;
|
||||
tstRslt.MassStart = MeasurementCorrection.CorrectedValue(tstRslt.MassStartRaw, outPath.Scale.Corrections);
|
||||
tstRslt.MassEndRaw = tstRslt.TargetVolume() * Formulas.RealDensity() / 1000.0f;
|
||||
tstRslt.MassEnd = MeasurementCorrection.CorrectedValue(tstRslt.MassEndRaw, outPath.Scale.Corrections);
|
||||
tstRslt.Flow = 3.6 * outPath.FlowMeter.LtrPerPulse * tstRslt.PulsesMaster / tstRslt.TestTime;
|
||||
tstRslt.Flow = 3.6 * flowMeterLtrPerPulse * tstRslt.PulsesMaster / tstRslt.TestTime;
|
||||
tstRslt.MassOfEvapWater = 0;
|
||||
tstRslt.VolumeCTV = 1000 * tstRslt.Batch.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.DensityLine; /// [l] commercially true volume
|
||||
tstRslt.VolumeMaster = outPath.FlowMeter.LtrPerPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
|
||||
tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient
|
||||
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.Flow, tstRslt.TempDownMean); /// Corrected master pulses per liter
|
||||
tstRslt.ConstMaster = (tstRslt.VolumeMaster == 0) ? tstRslt.ConstMasterCorr : (outPath.FlowMeter.LtrPerPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster);
|
||||
tstRslt.VolumeMaster = flowMeterLtrPerPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
|
||||
tstRslt.ConstMasterRaw = flowMeterLtrPerPulse; /// Uncorrected master flowmeter coefficient
|
||||
tstRslt.ConstMasterCorr = outPath.FlowMeter?.LtrPerPulseCorrected(tstRslt.Flow, tstRslt.TempDownMean) ?? 1; /// Corrected master pulses per liter
|
||||
tstRslt.ConstMaster = (tstRslt.VolumeMaster == 0) ? tstRslt.ConstMasterCorr : (flowMeterLtrPerPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster);
|
||||
|
||||
tstRslt.ErrorMaster = Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV);
|
||||
|
||||
|
||||
@@ -133,7 +133,6 @@ namespace TBF.Rig
|
||||
new RegisterReaders.KPackE.Radio.Factory(), /// Radio for KPackE register readers
|
||||
new Uni.RegValve.Factory(),
|
||||
new Uni.RegValveAnalog.Factory(),
|
||||
new Uni.RegValveLowRegulTimeSaturation.Factory(),
|
||||
new Scales.MettlerToledo.Factory(),
|
||||
new TestMethods.Adjustment.Factory(),
|
||||
new TestMethods.ChangeFlowDirection.Factory(),
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace TBF.Rig.TestMethods.Endurance
|
||||
|
||||
/// Auxiliary public lists used also by user controls in tab pages
|
||||
public IList<Rig.Generic.IComponent> TbfComponents;
|
||||
public IList<Rig.BuiltIn.Valve.Valve> Valves = new List<Rig.BuiltIn.Valve.Valve>();
|
||||
public IList<IValve> Valves;
|
||||
|
||||
|
||||
ITabWithListViewEx seqStepsCtrl;
|
||||
@@ -39,9 +39,8 @@ namespace TBF.Rig.TestMethods.Endurance
|
||||
EnduranceCycle = new List<CycleStep>();
|
||||
}
|
||||
|
||||
public CycleDlg(IList<CycleStep> cycle, IList<Rig.BuiltIn.Valve.Valve> valves)
|
||||
public CycleDlg(IList<CycleStep> cycle)
|
||||
{
|
||||
this.Valves = valves;
|
||||
/// Detect display setting: 100% = 96dpi, 125% = 120dpi, 150% = 144dpi.
|
||||
Dpi = (int)this.CreateGraphics().DpiX;
|
||||
|
||||
@@ -65,9 +64,25 @@ namespace TBF.Rig.TestMethods.Endurance
|
||||
seqStepsCtrl = new CycleStepsCtrl() as ITabWithListViewEx;
|
||||
|
||||
/// Prepare a list of valves for the endurance test
|
||||
/// ... list is set by user
|
||||
|
||||
EnduranceCycle = (cycle != null) ? cycle : new List<CycleStep>(); /// TODO: Load from component parameters
|
||||
/// Load the list of components from the database
|
||||
NHibernate.ISession session = TBF.DB.CreateSession(DBKind.Config);
|
||||
var cmptnEntities = session.QueryOver<Config.Entities.Component>().OrderBy(x => x.ItemNr).Asc .List();
|
||||
TbfComponents = TBF.Rig.TbfComponents.LoadComponentsFromDB(cmptnEntities);
|
||||
Valves = new List<IValve>();
|
||||
for (int bitNr = 0; bitNr < 8; bitNr++)
|
||||
{
|
||||
foreach (var vlv in TbfComponents)
|
||||
{
|
||||
if (vlv is TBF.Rig.BuiltIn.Valve.Valve && (vlv as TBF.Rig.BuiltIn.Valve.Valve).BitPosition == bitNr)
|
||||
{
|
||||
Valves.Add(vlv as IValve);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EnduranceCycle = (cycle != null) ? cycle : new List<CycleStep>(); /// TODO: Load from component parameters
|
||||
|
||||
/// Create a tab with sequence steps for each sequence ordered by ItemNr.
|
||||
AddCycleStepsTab(EnduranceCycle);
|
||||
|
||||
@@ -2,28 +2,17 @@
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.VisualStyles;
|
||||
using TBF.Resources;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Rig.GenericDevices;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
|
||||
using System.Linq;
|
||||
using TBF.Rig.Sequences;
|
||||
|
||||
using NHibernate;
|
||||
using log4net;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.Rig.TestMethods.Endurance
|
||||
{
|
||||
public partial class TestMethodCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
IList<Rig.BuiltIn.Valve.Valve> valvesFromDB = new List<Rig.BuiltIn.Valve.Valve>();
|
||||
|
||||
public bool ShowMore { get { return false; } }
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
string cycle;
|
||||
|
||||
@@ -41,9 +30,7 @@ namespace TBF.Rig.TestMethods.Endurance
|
||||
public TestMethodCfgCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
valvesFromDB = LoadValvesFromDB();
|
||||
CreateValveRows(valvesFromDB.Count, valvesFromDB); // toľko riadkov, koľko ventilov
|
||||
}
|
||||
}
|
||||
|
||||
private void EntryFormCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
@@ -89,109 +76,11 @@ namespace TBF.Rig.TestMethods.Endurance
|
||||
|
||||
private void enduranceCycleButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
CycleDlg dlg = new CycleDlg(CycleStep.StringToCycle(cycle), GetSelectedValves());
|
||||
CycleDlg dlg = new CycleDlg(CycleStep.StringToCycle(cycle));
|
||||
if (dlg.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
cycle = CycleStep.CycleToString(dlg.EnduranceCycle);
|
||||
}
|
||||
}
|
||||
private void CreateValveRows(int numberOfRows, IList<Rig.BuiltIn.Valve.Valve> valves)
|
||||
{
|
||||
tableLayoutPanel1.RowCount = numberOfRows;
|
||||
tableLayoutPanel1.ColumnCount = 2;
|
||||
|
||||
tableLayoutPanel1.Controls.Clear();
|
||||
tableLayoutPanel1.ColumnStyles.Clear();
|
||||
tableLayoutPanel1.RowStyles.Clear();
|
||||
|
||||
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.AutoSize));
|
||||
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100));
|
||||
|
||||
for (int i = 0; i < numberOfRows; i++)
|
||||
{
|
||||
tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.AutoSize));
|
||||
|
||||
var label = new Label
|
||||
{
|
||||
Text = $"Valve {i + 1}",
|
||||
Anchor = AnchorStyles.Left,
|
||||
AutoSize = true,
|
||||
Margin = new Padding(5)
|
||||
};
|
||||
|
||||
var comboBox = new ComboBox
|
||||
{
|
||||
DropDownStyle = ComboBoxStyle.DropDownList,
|
||||
Anchor = AnchorStyles.Left | AnchorStyles.Right,
|
||||
Dock = DockStyle.Fill,
|
||||
Margin = new Padding(5),
|
||||
Name = $"comboValve{i + 1}",
|
||||
DisplayMember = "Name" // zobrazenie názvu ventilu
|
||||
};
|
||||
|
||||
comboBox.Items.Add("None");
|
||||
|
||||
foreach (var valve in valves)
|
||||
{
|
||||
comboBox.Items.Add(valve.Name/* + " (bit nr = " + valve.BitPosition + ")"*/);
|
||||
}
|
||||
|
||||
comboBox.SelectedIndex = 0;
|
||||
|
||||
tableLayoutPanel1.Controls.Add(label, 0, i);
|
||||
tableLayoutPanel1.Controls.Add(comboBox, 1, i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private IList<Rig.BuiltIn.Valve.Valve> LoadValvesFromDB()
|
||||
{
|
||||
/// Load the list of components from the database
|
||||
IList<Rig.BuiltIn.Valve.Valve> valves = new List<Rig.BuiltIn.Valve.Valve>();
|
||||
|
||||
using (NHibernate.ISession session = TBF.DB.CreateSession(DBKind.Config))
|
||||
{
|
||||
IList<IComponent> TbfComponents = Rig.TbfComponents.LoadComponentsFromDB(session);
|
||||
valves = getAllValves(TbfComponents);
|
||||
|
||||
}
|
||||
/// Find all master valvesFromDB
|
||||
return valves;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Process the list of components and return all valvesFromDB (masters and coupled)
|
||||
/// </summary>
|
||||
public static IList<Rig.BuiltIn.Valve.Valve> getAllValves(IList<Generic.IComponent> cmpnts)
|
||||
{
|
||||
IList<Rig.BuiltIn.Valve.Valve> result = new List<Rig.BuiltIn.Valve.Valve>();
|
||||
foreach (var cmpnt in cmpnts) if (cmpnt is Rig.BuiltIn.Valve.Valve) result.Add(cmpnt as Rig.BuiltIn.Valve.Valve);
|
||||
return result;
|
||||
}
|
||||
|
||||
private List<Rig.BuiltIn.Valve.Valve> GetSelectedValves()
|
||||
{
|
||||
var selectedValves = new List<Rig.BuiltIn.Valve.Valve>();
|
||||
|
||||
foreach (Control control in tableLayoutPanel1.Controls)
|
||||
{
|
||||
if (control is ComboBox comboBox)
|
||||
{
|
||||
var selectedName = comboBox.SelectedItem?.ToString();
|
||||
|
||||
if (!string.IsNullOrEmpty(selectedName) && selectedName != "None")
|
||||
{
|
||||
// Nájdeme ventil podľa mena v zozname všetkých
|
||||
var valve = valvesFromDB.FirstOrDefault(v => v.Name == selectedName);
|
||||
if (valve != null)
|
||||
{
|
||||
selectedValves.Add(valve);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return selectedValves;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+57
-81
@@ -31,85 +31,62 @@ namespace TBF.Rig.TestMethods.Endurance
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.enduranceCycleButton = new System.Windows.Forms.Button();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(137, 57);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.nameTextBox.TabIndex = 5;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(27, 60);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 4;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(134, 33);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.classNameLabel.TabIndex = 3;
|
||||
this.classNameLabel.Text = "ComonentName";
|
||||
//
|
||||
// enduranceCycleButton
|
||||
//
|
||||
this.enduranceCycleButton.Enabled = false;
|
||||
this.enduranceCycleButton.Location = new System.Drawing.Point(137, 83);
|
||||
this.enduranceCycleButton.Name = "enduranceCycleButton";
|
||||
this.enduranceCycleButton.Size = new System.Drawing.Size(130, 31);
|
||||
this.enduranceCycleButton.TabIndex = 6;
|
||||
this.enduranceCycleButton.Text = "Endurance cycle";
|
||||
this.enduranceCycleButton.UseVisualStyleBackColor = true;
|
||||
this.enduranceCycleButton.Click += new System.EventHandler(this.enduranceCycleButton_Click);
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.AutoSize = true;
|
||||
this.tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.tableLayoutPanel1.ColumnCount = 2;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 37.5F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 62.5F));
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(30, 120);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 8;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(0, 120);
|
||||
this.tableLayoutPanel1.TabIndex = 8;
|
||||
//
|
||||
// TestMethodCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.Controls.Add(this.enduranceCycleButton);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Name = "TestMethodCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 502);
|
||||
this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
this.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.enduranceCycleButton = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(137, 57);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.nameTextBox.TabIndex = 5;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(27, 60);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 4;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(134, 33);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.classNameLabel.TabIndex = 3;
|
||||
this.classNameLabel.Text = "ComonentName";
|
||||
//
|
||||
// enduranceCycleButton
|
||||
//
|
||||
this.enduranceCycleButton.Enabled = false;
|
||||
this.enduranceCycleButton.Location = new System.Drawing.Point(137, 83);
|
||||
this.enduranceCycleButton.Name = "enduranceCycleButton";
|
||||
this.enduranceCycleButton.Size = new System.Drawing.Size(130, 31);
|
||||
this.enduranceCycleButton.TabIndex = 6;
|
||||
this.enduranceCycleButton.Text = "Endurance cycle";
|
||||
this.enduranceCycleButton.UseVisualStyleBackColor = true;
|
||||
this.enduranceCycleButton.Click += new System.EventHandler(this.enduranceCycleButton_Click);
|
||||
//
|
||||
// TestMethodCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.enduranceCycleButton);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Name = "TestMethodCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 200);
|
||||
this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
@@ -119,6 +96,5 @@ namespace TBF.Rig.TestMethods.Endurance
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
private System.Windows.Forms.Button enduranceCycleButton;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollection
|
||||
///
|
||||
State.Create(string.Format("{0}({1}) : Starting pump {2}", test.Method, test.Name, (inPath.Pump != null) ? inPath.Pump.Name : "?"))
|
||||
.AddOperation(checkUiOp)
|
||||
// .AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60))
|
||||
// .AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60))
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(heatMetersPromptOp)
|
||||
.AddOperation(inPath.Pump != null ? cBrd.SetValvesOp(inPath.Pump, null) : null)
|
||||
|
||||
@@ -123,6 +123,11 @@ namespace TBF.Rig.TestMethods.LeakTest
|
||||
Bridge.OnActivity(this, Strings.Setting_the_water_pressure);
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Progress.FlowSetting));
|
||||
//------------------------------------------------
|
||||
|
||||
//TODO BUMI - check this possition for sstart logging - when finish remove this comment
|
||||
//--- log start process in this section
|
||||
LogProcessDataTestInfo(processDataLogger, test.Procedure.Name, test.Name);
|
||||
|
||||
|
||||
float pumpPower = test.PumpPower;
|
||||
int startTime = StateMachine.Time;
|
||||
@@ -214,10 +219,14 @@ namespace TBF.Rig.TestMethods.LeakTest
|
||||
Bridge.OnActivity(this, Strings.Test_in_progress);
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Progress.Test));
|
||||
//------------------------------------------------
|
||||
|
||||
LogProcessDataHeader(processDataLogger, "Maximum water pressure set");
|
||||
|
||||
State.Create(string.Format("{0}({1}) : Maximum water pressure set", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(new Operations.TimerOp(testParams.DurationPMax))
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
@@ -246,10 +255,14 @@ namespace TBF.Rig.TestMethods.LeakTest
|
||||
//-----------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Measuring_the_weight);
|
||||
//-----------------------------------------------------
|
||||
|
||||
LogProcessDataHeader(processDataLogger, "Measuring the start mass");
|
||||
|
||||
State.Create(string.Format("{0}({1}) : Measuring the start mass", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(scale.ReadStableMassOp(ref StartMass, test.TimeFlow2Mass, test.MassMethod, test.MassRepeats, test.MassSpread))
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
@@ -275,10 +288,14 @@ namespace TBF.Rig.TestMethods.LeakTest
|
||||
///------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Test_in_progress);
|
||||
///------------------------------------------------
|
||||
|
||||
LogProcessDataHeader(processDataLogger, "Starting the test");
|
||||
|
||||
State.Create(string.Format("{0}({1}) : Starting the test", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(new Operations.TimerOp(testParams.DurationLeak))
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
@@ -305,10 +322,14 @@ namespace TBF.Rig.TestMethods.LeakTest
|
||||
//-----------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Measuring_the_weight);
|
||||
//-----------------------------------------------------
|
||||
|
||||
LogProcessDataHeader(processDataLogger, " Measuring the end mass");
|
||||
|
||||
State.Create(string.Format("{0}({1}) : Measuring the end mass", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(scale.ReadStableMassOp(ref EndMass, test.TimeStop2Mass, test.MassMethod, test.MassRepeats, test.MassSpread))
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
|
||||
@@ -11,7 +11,6 @@ using TBF.Rig;
|
||||
using TBF.Boxes;
|
||||
using TBF.Resources;
|
||||
using TBF.UiBridge;
|
||||
//using AppDiagnostic;
|
||||
|
||||
namespace TBF.Rig.TestMethods.PMaxTest
|
||||
{
|
||||
@@ -111,7 +110,7 @@ namespace TBF.Rig.TestMethods.PMaxTest
|
||||
Bridge.OnActivity(this, Strings.Setting_the_water_pressure);
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Progress.FlowSetting));
|
||||
//------------------------------------------------
|
||||
|
||||
|
||||
float pumpPower = test.PumpPower;
|
||||
while (true)
|
||||
{
|
||||
@@ -175,29 +174,27 @@ namespace TBF.Rig.TestMethods.PMaxTest
|
||||
|
||||
int startTime = StateMachine.Time;
|
||||
int endTime = startTime + testParams.DurationPMax;
|
||||
|
||||
//TODO BUMI - check this possition for sstart logging - when finish remove this comment
|
||||
//--- log start process in this section
|
||||
LogProcessDataTestInfo(processDataLogger, test.Procedure.Name, test.Name);
|
||||
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Test_in_progress);
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Progress.Test));
|
||||
//------------------------------------------------
|
||||
|
||||
/*//---new1
|
||||
LogProcessDataTestInfo(processDataLogger, test.Procedure.Name, test.Name);
|
||||
|
||||
if (heatMetersPath == null) LogProcessDataHeader(processDataLogger, "Start mass");
|
||||
else LogProcessDataHeaderHeatMeters(processDataLogger, "Start mass");
|
||||
//---endNew1*/
|
||||
|
||||
//DiagApi.addLog();
|
||||
|
||||
|
||||
//TODO BUMI - check if is ok possition to start logging - at last remove comment
|
||||
//--- log start process in this section
|
||||
LogProcessDataHeader(processDataLogger, "Starting the test");
|
||||
|
||||
|
||||
State.Create(string.Format("{0}({1}) : Starting the test", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(new Operations.TimerOp(testParams.DurationPMax))
|
||||
//---new1
|
||||
.AddOperation(processDataLoggingOp)
|
||||
//---endNew1
|
||||
.EnterState();
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
|
||||
@@ -213,7 +210,8 @@ namespace TBF.Rig.TestMethods.PMaxTest
|
||||
Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Test_in_progress, remainingTime));
|
||||
}
|
||||
while (e.Contains(Event.TimerBusy));
|
||||
|
||||
|
||||
|
||||
///
|
||||
/// PMaxTest completed
|
||||
///
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2022 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2015-2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.IO.Ports;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.GenericDevices;
|
||||
using TBF.Rig;
|
||||
using TBF.Rig.Sequences;
|
||||
using TBF.UiBridge;
|
||||
|
||||
namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
{
|
||||
public class TestMethod : ComponentBase, ISimultTestMethod, ISequenceCondition, ISessionDataMngmnt
|
||||
public class TestMethod : ComponentBase, GenericDevices.ISimultTestMethod
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(TestMethod));
|
||||
protected static readonly ILog rfidDataLogger = LogManager.GetLogger("RfidData");
|
||||
@@ -21,6 +22,12 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
|
||||
public bool CanTest(MetersKind meters) { return meters == MetersKind.Single; }
|
||||
public bool DoTransitions() { return false; }
|
||||
public bool CheckDeviceCaps(Test test, OutputPath devices, out string message)
|
||||
{
|
||||
message = string.Format("{0}: CheckDeviceCaps() is not implemented yet", Name);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public bool SimultWithPrevious { get { return testMethodCfg.TestParams.SimultWithPrevious; } }
|
||||
public bool SimultWithNext { get { return testMethodCfg.TestParams.SimultWithNext; } }
|
||||
@@ -61,32 +68,14 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
|
||||
|
||||
readonly TestMethodCfg testMethodCfg;
|
||||
|
||||
public bool[] IperlCommMilestone;
|
||||
IList<IOperation> sequenceConditionOps;
|
||||
|
||||
public TestMethod()
|
||||
{
|
||||
CreateMilestonesAndConditions();
|
||||
}
|
||||
public TestMethod() { }
|
||||
|
||||
public TestMethod(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
CreateMilestonesAndConditions();
|
||||
}
|
||||
|
||||
void CreateMilestonesAndConditions()
|
||||
{
|
||||
IperlCommMilestone = new bool[(int)ConditionID.Count];
|
||||
|
||||
sequenceConditionOps = new List<IOperation>();
|
||||
for (ConditionID id = ConditionID.A; id < ConditionID.Count; id++)
|
||||
{
|
||||
sequenceConditionOps.Add(new SequenceConditionOp(this, id));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// IDevice interface - only Initialize() is used
|
||||
public override void Initialize()
|
||||
@@ -108,60 +97,16 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
{
|
||||
if (DebugLevel == DebugMode.Normal)
|
||||
{
|
||||
return (new iPerlCommunicationSeq()).Execute(test, repetNr, this, testMethodCfg.TestParams);
|
||||
return (new iPerlCommunicationSeq()).Execute(test, repetNr, testMethodCfg, testMethodCfg.TestParams);
|
||||
}
|
||||
else
|
||||
{
|
||||
/// DebugLevel == DebugMode.Simulate
|
||||
(new iPerlCommunicationSeq()).MakeSimulatedTrivial(test, repetNr, test.Part);
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Progress.Completed));
|
||||
Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name, ProcessData.BatchRslts.GetTestRslt(Common.Utils.GetTestName(test.Name, 1, 1), 0)));
|
||||
Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name, ProcessData.BatchRslts.GetTestRslt(Results.Utils.GetTestName(test.Name, 1, 1), 0)));
|
||||
return new List<Event> { Event.Done };
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int ConditionsCount { get { return (int)ConditionID.Count; } }
|
||||
|
||||
public string ConditionName(int i)
|
||||
{
|
||||
return (i >= 0 && i < (int)ConditionID.Count) ? ConditionOp(i).ToString() : string.Empty;
|
||||
}
|
||||
|
||||
public IOperation ConditionOp(int i)
|
||||
{
|
||||
return (i >= 0 && i < (int)ConditionID.Count) ? sequenceConditionOps[i] : null;
|
||||
}
|
||||
|
||||
|
||||
public void StartSession()
|
||||
{
|
||||
/// Clear milestones
|
||||
if (IperlCommMilestone != null)
|
||||
{
|
||||
for (int i = 0; i < IperlCommMilestone.Length; i++)
|
||||
{
|
||||
IperlCommMilestone[i] = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SaveMark(object o)
|
||||
{
|
||||
/// No marks
|
||||
}
|
||||
|
||||
public void EndSession()
|
||||
{
|
||||
/// Nothing at the end of session
|
||||
}
|
||||
|
||||
public bool CheckDeviceCaps(Test test, OutputPath devices, out string message)
|
||||
{
|
||||
// Implement the method to satisfy the ITestMethod interface.
|
||||
// For now, provide a basic implementation.
|
||||
message = "Device capabilities check not implemented.";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
/// Copyright (c) 2015-2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using System.IO.Ports;
|
||||
using System.Threading;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
@@ -24,20 +22,9 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
public int CommTimeout; /// Communication timeout in ms (500 .. 5000)
|
||||
public int DelayBetweenRetries; /// Delay between communication retries in ms (0 .. 5000)
|
||||
public int MaxCommRetries; /// Max. number of retries (1 .. 10)
|
||||
public int WaitTimeAfterFailure; /// Wait time after communication failure in ms
|
||||
public int PassThroughWaitTime; /// Pass Through wait time for radio parameters in ms
|
||||
public int NrThreads; /// Numbwr of parallel threads (1, 2 or 4)
|
||||
public int IperlCheckErrorsToStop;
|
||||
|
||||
///
|
||||
/// NFC S4.5 Combihead params
|
||||
///
|
||||
public int MciTimeoutMs;
|
||||
public int BaudRate;
|
||||
public int DataBits;
|
||||
public Parity ParityBit;
|
||||
public StopBits StopBits;
|
||||
|
||||
public int DfltQ2c_15_rl;
|
||||
public int DfltQ2c_15_lr;
|
||||
public int DfltQ2c_20_rl;
|
||||
@@ -72,17 +59,10 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
ParentName = string.Empty;
|
||||
CommTimeout = 1800; /// ms
|
||||
MaxCommRetries = 4;
|
||||
WaitTimeAfterFailure = 2200;
|
||||
PassThroughWaitTime = 1500;
|
||||
NrThreads = 2; /// 1, 2 or 4 threads
|
||||
NrThreads = 2; /// 1, 2 or 4 threads
|
||||
IperlCheckErrorsToStop = 10;
|
||||
MciTimeoutMs = 4000; // ms, NFC interface
|
||||
BaudRate = 57600; // NFC Interface
|
||||
DataBits = 8; // NFC Interface
|
||||
ParityBit = Parity.None; // NFC Interface
|
||||
StopBits = StopBits.Two; // NFC Interface
|
||||
|
||||
TestParams = CreateTestParamsProvider() as iPerlCommunicationParams;
|
||||
TestParams = CreateTestParamsProvider() as iPerlCommunicationParams;
|
||||
}
|
||||
|
||||
public TestMethodCfg(IComponentFactory factory)
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
public class TestMethodFactory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return GetType().Namespace.Substring(8); } }
|
||||
public override string ToString() { return ClassName; }
|
||||
|
||||
public IComponent DummyComponent() { return new TestMethod(); }
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+144
-144
@@ -178,6 +178,54 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
this.pictureBox3 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox2 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.checkBoxImage1 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage2 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage3 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage4 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage5 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage6 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage7 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage8 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage9 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage10 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage11 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage12 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage13 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage14 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage15 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage16 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage17 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage18 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage19 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage20 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage21 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage22 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage23 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage24 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage25 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage26 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage27 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage28 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage29 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage30 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage31 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage32 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage33 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage34 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage35 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage36 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage37 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage38 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage39 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage40 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage41 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage42 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage43 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage44 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage45 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage46 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage47 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage48 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.saveButton = new System.Windows.Forms.Button();
|
||||
this.samplePictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.samplePictureBox2 = new System.Windows.Forms.PictureBox();
|
||||
@@ -185,54 +233,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
this.sampleLabel1 = new System.Windows.Forms.Label();
|
||||
this.sampleLabel2 = new System.Windows.Forms.Label();
|
||||
this.sampleLabel3 = new System.Windows.Forms.Label();
|
||||
this.checkBoxImage48 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage47 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage46 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage45 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage44 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage43 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage42 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage41 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage40 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage39 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage38 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage37 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage36 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage35 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage34 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage33 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage32 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage31 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage30 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage29 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage28 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage27 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage26 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage25 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage24 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage23 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage22 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage21 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage20 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage19 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage18 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage17 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage16 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage15 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage14 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage13 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage12 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage11 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage10 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage9 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage8 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage7 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage6 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage5 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage4 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage3 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage2 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage1 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox48)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox47)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox46)).BeginInit();
|
||||
@@ -281,57 +281,57 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage5)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage6)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage7)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage8)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage9)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage10)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage11)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage12)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage13)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage14)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage15)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage16)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage17)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage18)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage19)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage20)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage21)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage22)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage23)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage24)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage25)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage26)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage27)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage28)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage29)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage30)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage31)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage32)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage33)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage34)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage35)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage36)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage37)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage38)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage39)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage40)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage41)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage42)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage43)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage44)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage45)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage46)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage47)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage48)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.samplePictureBox1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.samplePictureBox2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.samplePictureBox3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage48)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage47)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage46)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage45)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage44)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage43)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage42)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage41)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage40)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage39)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage38)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage37)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage36)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage35)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage34)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage33)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage32)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage31)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage30)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage29)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage28)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage27)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage26)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage25)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage24)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage23)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage22)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage21)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage20)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage19)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage18)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage17)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage16)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage15)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage14)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage13)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage12)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage11)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage10)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage9)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage8)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage7)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage6)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage5)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// wmTextBox2
|
||||
@@ -2639,57 +2639,57 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage5)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage6)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage7)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage8)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage9)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage10)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage11)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage12)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage13)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage14)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage15)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage16)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage17)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage18)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage19)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage20)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage21)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage22)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage23)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage24)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage25)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage26)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage27)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage28)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage29)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage30)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage31)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage32)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage33)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage34)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage35)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage36)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage37)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage38)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage39)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage40)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage41)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage42)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage43)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage44)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage45)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage46)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage47)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage48)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.samplePictureBox1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.samplePictureBox2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.samplePictureBox3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage48)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage47)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage46)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage45)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage44)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage43)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage42)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage41)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage40)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage39)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage38)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage37)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage36)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage35)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage34)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage33)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage32)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage31)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage30)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage29)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage28)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage27)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage26)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage25)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage24)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage23)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage22)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage21)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage20)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage19)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage18)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage17)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage16)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage15)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage14)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage13)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage12)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage11)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage10)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage9)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage8)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage7)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage6)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage5)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -65,8 +65,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionLRStr);
|
||||
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionIncl05Str);
|
||||
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionAltIncl05Str);
|
||||
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionPlusIncl05Str);
|
||||
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionPlusAltIncl05Str);
|
||||
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionGreeceIncl05Str);
|
||||
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionRLIncl05Str);
|
||||
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionLRIncl05Str);
|
||||
@@ -88,16 +86,9 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
retVal.Add(iPerlCommunicationForm.Write2HzCorrectionStr);
|
||||
retVal.Add(iPerlCommunicationForm.DewaReworkRLStr);
|
||||
retVal.Add(iPerlCommunicationForm.DewaReworkLRStr);
|
||||
retVal.Add(iPerlCommunicationForm.StartTestingSealedMetersStr);
|
||||
retVal.Add(iPerlCommunicationForm.EndTestingSealedMetersStr);
|
||||
retVal.Add(string.Format("{0} if enabled", iPerlCommunicationForm.ReadConfigurationStr));
|
||||
retVal.Add(string.Format("{0} 80", iPerlCommunicationForm.SetTestModeStr));
|
||||
retVal.Add("iPerl_check prevWorkStep direction q2factors");
|
||||
for (ConditionID id = ConditionID.A; id < ConditionID.Count; id++)
|
||||
{
|
||||
retVal.Add(string.Format(SequenceConditionOp.ConditionNameFmt, id));
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2023 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2015-2022 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -11,9 +11,6 @@ using RestClient;
|
||||
using TBF.Rig.Sequences;
|
||||
using TBF.Resources;
|
||||
using TBF.UiBridge;
|
||||
using Results;
|
||||
using Results.Entities;
|
||||
using TBF.Rig.TestMethods.iPerlCommunication.iPerlHead;
|
||||
|
||||
namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
{
|
||||
@@ -25,16 +22,15 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
public const string StrictQ2ErrorCheckStr = "Strict Q2 error check ";
|
||||
public const string Q2correctionCheckCmd = "Q2 correction check ";
|
||||
public const string IperlCheckCmd = "iPERL_check ";
|
||||
public const string SimulateCmd = "simulate ";
|
||||
|
||||
|
||||
System.Windows.Forms.Form modelessDlg;
|
||||
System.Windows.Forms.Form modelessDlg;
|
||||
///
|
||||
delegate void iPerlCommFormDlgt(iPerlCommunicationSeq myRef, TestMethod method, Test test, iPerlCommunicationParams testParams);
|
||||
delegate void iPerlCommFormDlgt(iPerlCommunicationSeq myRef, TestMethodCfg cfg, Test test, iPerlCommunicationParams testParams);
|
||||
///
|
||||
void OpenIPerlCommForm(iPerlCommunicationSeq myRef, TestMethod method, Test test, iPerlCommunicationParams testParams)
|
||||
void OpenIPerlCommForm(iPerlCommunicationSeq myRef, TestMethodCfg cfg, Test test, iPerlCommunicationParams testParams)
|
||||
{
|
||||
myRef.modelessDlg = new iPerlCommunicationForm(method, test, testParams);
|
||||
myRef.modelessDlg = new iPerlCommunicationForm(cfg, test, testParams);
|
||||
myRef.modelessDlg.Show();
|
||||
}
|
||||
|
||||
@@ -56,10 +52,8 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
/// Event.OpArgumentError . Target flow is out of range
|
||||
/// Event.Error . . . . . . Unspecified error
|
||||
/// </returns>
|
||||
public IList<Event> Execute(Test test, int repetitionNr, TestMethod method, iPerlCommunicationParams testParams)
|
||||
public IList<Event> Execute(Test test, int repetitionNr, TestMethodCfg cfg, iPerlCommunicationParams testParams)
|
||||
{
|
||||
TestMethodCfg cfg = method.Cfg as TestMethodCfg;
|
||||
|
||||
IList<Event> e; /// Events from currently running operations
|
||||
checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state
|
||||
modelessDlg = null;
|
||||
@@ -75,16 +69,17 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
|
||||
/// Get 'wmType' from IperlHead procedure parameters
|
||||
int wmType = 0;
|
||||
#if IPERL
|
||||
/*foreach (var wm in ProcessData.BatchRslts.Batch.WaterMeters)
|
||||
if (IperlHeads != null)
|
||||
{
|
||||
if (wm != null && !wm.Disabled && wm.WMTypeId() > 0)
|
||||
foreach (var ih in IperlHeads)
|
||||
{
|
||||
wmType = wm.WMTypeId();
|
||||
break;
|
||||
if (ih.WMType_ID > 0)
|
||||
{
|
||||
wmType = ih.WMType_ID;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
#endif
|
||||
}
|
||||
|
||||
if (cfg.UseWebService)
|
||||
{
|
||||
@@ -126,10 +121,9 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Progress.JustStarted));
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Progress.FlowSetting));
|
||||
|
||||
string[] args = testParams.Activity.Substring(cmd.Length).Split(new char[] { ' ' });
|
||||
string fromTestName = (args.Length >= 1) ? args[0] : string.Empty;
|
||||
bool isPlus = (args.Length >= 2) ? args[1].ToLower().Contains("plus") : false;
|
||||
MakeQ2CorrectedFrom(test.Name, fromTestName, isPlus);
|
||||
string fromTestName = testParams.Activity.Substring(cmd.Length);
|
||||
|
||||
MakeQ2CorrectedFrom(test.Name, fromTestName);
|
||||
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Progress.Completed));
|
||||
Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name, ProcessData.BatchRslts.GetTestRslt(test.Name, 0)));
|
||||
@@ -180,9 +174,9 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
|
||||
string[] args = testParams.Activity.Substring(cmd.Length).Split(new char[] { ' ' });
|
||||
|
||||
//int maxTestIndex = (ProcessData.BenchInfo is TBF.Rig.DataContainer.BenchInfo.Component)
|
||||
// ? (ProcessData.BenchInfo as TBF.Rig.DataContainer.BenchInfo.Component).MaxTestIndex
|
||||
// : int.MaxValue;
|
||||
int maxTestIndex = (ProcessData.BenchInfo is DataContainer.iPerlBenchInfo.Component)
|
||||
? (ProcessData.BenchInfo as DataContainer.iPerlBenchInfo.Component).MaxTestIndex
|
||||
: int.MaxValue;
|
||||
|
||||
Results.Entities.TestRslt tstRslt = ProcessData.BatchRslts.GetTestRslt(test.Name, 0);
|
||||
|
||||
@@ -291,7 +285,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
|
||||
return new List<Event> { Event.Done };
|
||||
}
|
||||
else if (testParams.Activity.ToLower().Contains(cmd = SimulateCmd))
|
||||
else if (testParams.Activity.ToLower().Contains(cmd = "simulate "))
|
||||
{
|
||||
TestProgressEventArgs.SetEstimatedTimes(new int[] { 0, 0, 0, 30, 0, 30, 0, 0 });
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Progress.JustStarted));
|
||||
@@ -304,49 +298,9 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
else if (testParams.Activity.Substring(cmd.Length).ToLower() == "compound nok") MakeSimulatedCompound(test, 1, 0, 4.7f, 0.9f);
|
||||
else if (testParams.Activity.Substring(cmd.Length).ToLower() == "compound rise") MakeSimulatedCompound(test, 1, 0, 0.7f, 0.0f);
|
||||
else if (testParams.Activity.Substring(cmd.Length).ToLower() == "compound fall") MakeSimulatedCompound(test, 1, 0, 0.7f, 0.9f);
|
||||
else if (testParams.Activity.Substring(cmd.Length).ToLower() == "iperls")
|
||||
{
|
||||
string[] pcbNrs = new string[] { "831232435539", "831232435562", "831232435587",
|
||||
"831232432141", "831232432497", "831232763641" };
|
||||
|
||||
TestRslt tstRslt = BatchRslts.GetTestRslt(test.Name, test.Part);
|
||||
if (tstRslt != null)
|
||||
{
|
||||
Results.Utils.GetCounterStates(tstRslt, Program.LocalSettings.Counters);
|
||||
|
||||
/// Auxiliary results ... not required
|
||||
|
||||
/// Main results
|
||||
tstRslt.MethodClass = TbfComponents.FindComponent(test.Method).ClassName;
|
||||
tstRslt.TestDone = true;
|
||||
tstRslt.StartTime = tstRslt.Batch.StartTime;
|
||||
tstRslt.EndTime = DateTime.Now;
|
||||
tstRslt.FlowSetTime = 0;
|
||||
tstRslt.MassOfEvapWater = 0;
|
||||
tstRslt.TestTime = 1;
|
||||
|
||||
for (int i = 0; i < BatchRslts.Batch.WaterMeters.Count; i++)
|
||||
{
|
||||
MeterTestRslt meterRslt =
|
||||
BatchRslts.GetMeterTestRslt(test.Name, i, CompoundMeterId.Single);
|
||||
|
||||
if (meterRslt != null)
|
||||
{
|
||||
meterRslt.WaterMeter.SerialNr = pcbNrs[i % pcbNrs.Length];
|
||||
meterRslt.Passed = true;
|
||||
meterRslt.TestDone = true;
|
||||
}
|
||||
//if (iperlHeads[i] != null)
|
||||
//{
|
||||
// iperlHeads[i].CommFailed = iperlHeads[i].Disabled = false;
|
||||
// iperlHeads[i].SerialNr = pcbNrs[i % pcbNrs.Length];
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Progress.Completed));
|
||||
Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name, ProcessData.BatchRslts.GetTestRslt(Common.Utils.GetTestName(test.Name, 1, 1), 0)));
|
||||
Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name, ProcessData.BatchRslts.GetTestRslt(Results.Utils.GetTestName(test.Name, 1, 1), 0)));
|
||||
allResults.Info(TestResult2CsvLine(test.Name, 0)); /// Append the results to the CSV-file
|
||||
|
||||
//------------------------------------------------
|
||||
@@ -354,8 +308,8 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
//------------------------------------------------
|
||||
|
||||
State.Create(string.Format("iPerlCommunicationSeq : {0}", testParams.Activity))
|
||||
.AddOperation(checkUiOp)
|
||||
.EnterState();
|
||||
.AddOperation(checkUiOp)
|
||||
.EnterState();
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
|
||||
if (TestAndLogUiCmdStop(test, e))
|
||||
@@ -368,7 +322,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
///
|
||||
/// Show the modeless dialog with error indication
|
||||
///
|
||||
Program.MainWnd.Invoke(new iPerlCommFormDlgt(OpenIPerlCommForm), new object[] { this, method, test, testParams });
|
||||
Program.MainWnd.Invoke(new iPerlCommFormDlgt(OpenIPerlCommForm), new object[] { this, cfg, test, testParams });
|
||||
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.iPerl_Communication_in_progress);
|
||||
@@ -378,9 +332,10 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
bool completed = false;
|
||||
|
||||
State.Create("iPerlCommunicationSeq : Wait until the entry form is closed")
|
||||
.AddOperation(checkUiOp)
|
||||
.EnterState();
|
||||
do {
|
||||
.AddOperation(checkUiOp)
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
stopPressed = TestAndLogUiCmdStop(test, e);
|
||||
completed = (modelessDlg is GenericDevices.IHasCompleted)
|
||||
@@ -520,7 +475,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
/// <param name="testName">This test name</param>
|
||||
/// <param name="oriTestRslt">Name of Q2 test done before Q2 correction (Q2adj)</param>
|
||||
/// <remarks>Assuming this test does not have multiple parts (part = 0)</remarks>
|
||||
void MakeQ2CorrectedFrom(string testName, string oriTestName, bool isPlus = false)
|
||||
void MakeQ2CorrectedFrom(string testName, string oriTestName)
|
||||
{
|
||||
Results.Entities.TestRslt oriTestRslt = ProcessData.BatchRslts.GetTestRslt(oriTestName, 0);
|
||||
Results.Entities.TestRslt tstRslt = ProcessData.BatchRslts.GetTestRslt(testName, 0);
|
||||
@@ -596,8 +551,8 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
tstRslt.MassEndRaw = oriTestRslt.MassEndRaw;
|
||||
tstRslt.MassEnd = oriTestRslt.MassEnd;
|
||||
tstRslt.MassOfEvapWater = oriTestRslt.MassOfEvapWater;
|
||||
//tstRslt.FlowMass = oriTestRslt.FlowMass;
|
||||
//tstRslt.FlowVolume = oriTestRslt.FlowVolume;
|
||||
tstRslt.Qdetected = oriTestRslt.Qdetected;
|
||||
tstRslt.Flow = oriTestRslt.Flow;
|
||||
tstRslt.VolumeCTV = oriTestRslt.VolumeCTV;
|
||||
tstRslt.VolumeMaster = oriTestRslt.VolumeMaster;
|
||||
tstRslt.ErrorMaster = oriTestRslt.ErrorMaster;
|
||||
@@ -617,19 +572,15 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
|
||||
for (int i = 0; i < ProcessData.BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
// Fix for CS7036: Added the missing 'meterId' argument to the GetMeterTestRslt method call.
|
||||
var q3mtr = ProcessData.BatchRslts.GetMeterTestRslt("Q3", i, CompoundMeterId.SingleOrCompound);
|
||||
double q3error = (q3mtr != null) ? q3mtr.Error : 0;
|
||||
|
||||
Results.Entities.MeterTestRslt oriMeterRslt = ProcessData.BatchRslts.GetMeterTestRslt(oriTestName, i, CompoundMeterId.SingleOrCompound);
|
||||
Results.Entities.MeterTestRslt meterRslt = ProcessData.BatchRslts.GetMeterTestRslt(testName, i, CompoundMeterId.SingleOrCompound);
|
||||
Results.Entities.MeterTestRslt oriMeterRslt = ProcessData.BatchRslts.GetMeterTestRslt(oriTestName, i, CompoundMeterId.Single);
|
||||
Results.Entities.MeterTestRslt meterRslt = ProcessData.BatchRslts.GetMeterTestRslt(testName, i, CompoundMeterId.Single);
|
||||
|
||||
/// Reference to iPerl water meter or null:
|
||||
TestMethods.iPerlCommunication.iPerlHead.IperlHead iPerl = ((sensPath != null) && (sensPath.RegisterReaders != null) && (i < sensPath.RegisterReaders.Length))
|
||||
? (sensPath.RegisterReaders[i] as TestMethods.iPerlCommunication.iPerlHead.IperlHead)
|
||||
: null;
|
||||
|
||||
if (iPerl != null && meterRslt != null && oriMeterRslt != null)
|
||||
if (meterRslt != null && oriMeterRslt != null)
|
||||
{
|
||||
#if ORACLE_DB
|
||||
meterRslt.ErrorBC = oriMeterRslt.Error;
|
||||
@@ -640,27 +591,33 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
meterRslt.VolumeRef = oriMeterRslt.VolumeRef;
|
||||
meterRslt.TestTime = oriMeterRslt.TestTime;
|
||||
|
||||
if (q3error * oriMeterRslt.Error < 0)
|
||||
if (iPerl == null || ((iPerl.Q2CorrRL == 0) && (iPerl.Q2CorrLR == 0)))
|
||||
{
|
||||
/// iPerl with Q2 correction => generate an artificial error equal to +1/10 of the original one (relative to Q2 target error)
|
||||
meterRslt.Error = 0.1 * oriMeterRslt.Error;
|
||||
/// Either no iPerl head or no Q2 correction
|
||||
meterRslt.Error = oriMeterRslt.Error;
|
||||
meterRslt.VolumeMeter = oriMeterRslt.VolumeMeter;
|
||||
meterRslt.VolumeStart = oriMeterRslt.VolumeStart;
|
||||
meterRslt.VolumeEnd = oriMeterRslt.VolumeEnd;
|
||||
meterRslt.Passed = (meterRslt.Error >= tstRslt.ErrLimLo() + tstRslt.ErrLimMargin()
|
||||
&& meterRslt.Error <= tstRslt.ErrLimHi() - tstRslt.ErrLimMargin());
|
||||
meterRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
/// iPerl with Q2 correction => generate an artificial error equal to -1/10 of the original one (relative to Q2 target error)
|
||||
meterRslt.Error = - 0.1 * oriMeterRslt.Error;
|
||||
double targetError = iPerl.CalibTargetQ2;
|
||||
meterRslt.Error = targetError - 0.1 * (oriMeterRslt.Error - targetError);
|
||||
meterRslt.VolumeMeter = oriMeterRslt.VolumeRef * (100.0 + meterRslt.Error) / 100.0;
|
||||
meterRslt.VolumeStart = oriMeterRslt.VolumeStart;
|
||||
double signature = (oriMeterRslt.VolumeEnd > oriMeterRslt.VolumeStart) ? (+1) : (-1);
|
||||
meterRslt.VolumeEnd = meterRslt.VolumeStart + signature * meterRslt.VolumeMeter;
|
||||
meterRslt.Passed = (meterRslt.Error >= tstRslt.ErrLimLo() + tstRslt.ErrLimMargin()
|
||||
&& meterRslt.Error <= tstRslt.ErrLimHi() - tstRslt.ErrLimMargin());
|
||||
meterRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
|
||||
meterRslt.VolumeMeter = meterRslt.VolumeRef * (100.0 + meterRslt.Error) / 100.0;
|
||||
double signature = (oriMeterRslt.VolumeEnd > oriMeterRslt.VolumeStart) ? (+1) : (-1);
|
||||
meterRslt.VolumeStart = oriMeterRslt.VolumeStart;
|
||||
meterRslt.VolumeEnd = meterRslt.VolumeStart + signature * meterRslt.VolumeMeter;
|
||||
|
||||
meterRslt.Passed = (meterRslt.Error >= tstRslt.ErrLimLo() + tstRslt.ErrLimMargin()
|
||||
&& meterRslt.Error <= tstRslt.ErrLimHi() - tstRslt.ErrLimMargin());
|
||||
meterRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -746,8 +703,8 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
tstRslt.MassEndRaw = oriTestRslt.MassEndRaw;
|
||||
tstRslt.MassEnd = oriTestRslt.MassEnd;
|
||||
tstRslt.MassOfEvapWater = oriTestRslt.MassOfEvapWater;
|
||||
//tstRslt.FlowMass = oriTestRslt.FlowMass;
|
||||
//tstRslt.FlowVolume = oriTestRslt.FlowVolume;
|
||||
tstRslt.Qdetected = oriTestRslt.Qdetected;
|
||||
tstRslt.Flow = oriTestRslt.Flow;
|
||||
tstRslt.VolumeCTV = oriTestRslt.VolumeCTV;
|
||||
tstRslt.VolumeMaster = oriTestRslt.VolumeMaster;
|
||||
tstRslt.ErrorMaster = oriTestRslt.ErrorMaster;
|
||||
@@ -795,7 +752,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
meterRslt.VolumeStart = oriMeterRslt.VolumeStart;
|
||||
meterRslt.VolumeEnd = oriMeterRslt.VolumeEnd;
|
||||
#if ORACLE_DB
|
||||
if ((ProcessData.BatchRslts.Batch.WaterMeters[i].Pruefindex % 100) == 1)
|
||||
if (ProcessData.BatchRslts.Batch.WaterMeters[i].Pruefindex == 1)
|
||||
{
|
||||
meterRslt.Passed = (oriMeterRslt.Error >= tstRslt.ErrLimLo() + tstRslt.ErrLimMargin()
|
||||
&& oriMeterRslt.Error <= tstRslt.ErrLimHi() - tstRslt.ErrLimMargin());
|
||||
@@ -898,8 +855,8 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
tstRslt.MassEndRaw = testRsltQ2ac.MassEndRaw;
|
||||
tstRslt.MassEnd = testRsltQ2ac.MassEnd;
|
||||
tstRslt.MassOfEvapWater = testRsltQ2ac.MassOfEvapWater;
|
||||
//tstRslt.FlowMass = testRsltQ2ac.FlowMass;
|
||||
//tstRslt.FlowVolume = testRsltQ2ac.FlowVolume;
|
||||
tstRslt.Qdetected = testRsltQ2ac.Qdetected;
|
||||
tstRslt.Flow = testRsltQ2ac.Flow;
|
||||
tstRslt.VolumeCTV = testRsltQ2ac.VolumeCTV;
|
||||
tstRslt.VolumeMaster = testRsltQ2ac.VolumeMaster;
|
||||
tstRslt.ErrorMaster = testRsltQ2ac.ErrorMaster;
|
||||
@@ -937,8 +894,14 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
meterRslt.TestDone = meterRsltQ2ac.TestDone;
|
||||
tstRslt.TestDone = true;
|
||||
|
||||
if (((meterRsltQ2bc.Error < -0.51) && (meterRsltQ2ac.Error < meterRsltQ2bc.Error)) ||
|
||||
((meterRsltQ2bc.Error > +0.51) && (meterRsltQ2ac.Error > meterRsltQ2bc.Error)))
|
||||
double targetError = 0;
|
||||
if ((sensPath != null) && (sensPath.RegisterReaders != null) && (sensPath.RegisterReaders.Length > i) && (sensPath.RegisterReaders[i] is iPerlHead.IperlHead))
|
||||
{
|
||||
targetError = (sensPath.RegisterReaders[i] as iPerlHead.IperlHead).CalibTargetQ2;
|
||||
}
|
||||
|
||||
if ((((meterRsltQ2bc.Error - targetError) < -0.51) && (meterRsltQ2ac.Error < meterRsltQ2bc.Error)) ||
|
||||
(((meterRsltQ2bc.Error - targetError) > +0.51) && (meterRsltQ2ac.Error > meterRsltQ2bc.Error)))
|
||||
{
|
||||
meterRslt.Passed = false; /// Q2 correction check failed
|
||||
}
|
||||
|
||||
@@ -2,22 +2,19 @@
|
||||
/// Copyright (c) 2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using TBF.Rig.TestMethods.iPerlCommunication.iPerlHead;
|
||||
using static Sensus.iPerl.NfcHandler.MCI_Protocol;
|
||||
|
||||
namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
{
|
||||
public class iPerlDataWrite
|
||||
{
|
||||
public MessageID MessageID;
|
||||
public StructName StructName;
|
||||
public int Offset;
|
||||
public byte[] Data;
|
||||
public string Description;
|
||||
|
||||
public iPerlDataWrite(MessageID mesageID, StructName structName, int offset, byte[] data, string description)
|
||||
public iPerlDataWrite(MessageID mesageID, int offset, byte[] data, string description)
|
||||
{
|
||||
MessageID = mesageID;
|
||||
StructName = structName;
|
||||
Offset = offset;
|
||||
Data = data;
|
||||
Description = description;
|
||||
|
||||
@@ -17,9 +17,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
RL,
|
||||
LR,
|
||||
Standard_incl_05,
|
||||
Standard_plus_incl_05,
|
||||
Dewa_incl_05,
|
||||
Dewa_plus_incl_05,
|
||||
Greece_incl_05,
|
||||
RL_incl_05,
|
||||
LR_incl_05,
|
||||
|
||||
@@ -104,10 +104,4 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
Flush = 0,
|
||||
ProcessAndSave,
|
||||
}
|
||||
|
||||
public enum CommunicationInterface
|
||||
{
|
||||
RFID,
|
||||
NFC
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
public class Factory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return "RegisterReader for iPerl"; } }
|
||||
public override string ToString() { return ClassName; }
|
||||
|
||||
public IComponent DummyComponent() { return new IperlHead(); }
|
||||
|
||||
|
||||
@@ -2,28 +2,25 @@
|
||||
/// Copyright (c) 2015-2022 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Ports;
|
||||
using System.Linq;
|
||||
using log4net;
|
||||
using Common;
|
||||
using Common.Iperl;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Rig.GenericDevices;
|
||||
using Sensus.iPerl.NfcHandler;
|
||||
using NHibernate;
|
||||
using Renci.SshNet;
|
||||
using System.Linq;
|
||||
using System.Xml;
|
||||
using System.Xml.Linq; // This line is correct and does not need to be changed.
|
||||
using System.Windows;
|
||||
using TBF.Rig.Output;
|
||||
using TBF.Rig.Sequences;
|
||||
|
||||
namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
{
|
||||
/// <summary>
|
||||
/// This component = instance of this class is a placeholder for a combined main watermeter
|
||||
/// </summary>
|
||||
public class IperlHead : ComponentBase, IDevice,IRegReaderDatastream, ISessionDataMngmnt, IOperation
|
||||
public class IperlHead : ComponentBase, IDevice, IRegReaderDatastream, ISessionDataMngmnt, IOperation
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(IperlHead));
|
||||
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
|
||||
@@ -43,11 +40,9 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
readonly IperlHeadCfg iperlHeadCfg;
|
||||
|
||||
public int RfidComPortNr { get { return iperlHeadCfg.RfidComPortNr; } }
|
||||
public int OptoComPortNr { get { return iperlHeadCfg.OptoComPortNr; } }
|
||||
public int MuxBoardNrOrGroup14 { get { return iperlHeadCfg.MuxBoardNr; } }
|
||||
public int Group { get { return iperlHeadCfg.Group; } }
|
||||
public iPerlHead.MeterType MeterType { get { return iperlHeadCfg.MeterType; } }
|
||||
public CommunicationInterface CommInterface { get { return iperlHeadCfg.CommunicationInterface; } }
|
||||
|
||||
public int Position
|
||||
{
|
||||
@@ -63,9 +58,11 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
public double LtrsPerPulse { get { return 1 / PulsesPerLtr; } }
|
||||
|
||||
public double CalibTarget { get { return iperlHeadCfg.ProcParams.CalibTarget; } }
|
||||
public double CalibTargetQ2 { get { return iperlHeadCfg.ProcParams.CalibTargetQ2; } }
|
||||
public ushort FactorLimitLo { get { return (ushort)iperlHeadCfg.ProcParams.FactorLimitLo; } }
|
||||
public ushort FactorLimitHi { get { return (ushort)iperlHeadCfg.ProcParams.FactorLimitHi; } }
|
||||
public Counting InitFlowDir { get { return (iperlHeadCfg != null && iperlHeadCfg.ProcParams != null) ? iperlHeadCfg.ProcParams.Counting : Counting.Arbitrary; } }
|
||||
public int WMType_ID { get { return iperlHeadCfg.ProcParams.WMType_ID; } } /// Required by Oracle DB
|
||||
|
||||
|
||||
/// Properties set by the Begin and the End form
|
||||
@@ -73,17 +70,10 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ConfigStruct != null)
|
||||
return ConfigStruct.GetPcbNrString();
|
||||
else if (simulatedPcbNr != null)
|
||||
return simulatedPcbNr;
|
||||
else
|
||||
return string.Empty;
|
||||
}
|
||||
set
|
||||
{
|
||||
simulatedPcbNr = value;
|
||||
if (ConfigStruct != null) return ConfigStruct.GetPcbNrString();
|
||||
else return string.Empty;
|
||||
}
|
||||
set { }
|
||||
}
|
||||
|
||||
public bool Disabled;
|
||||
@@ -113,8 +103,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
public CalibrationStruct CalibrationStruct; /// CalibrationStruct of WM obtained or updated by iPerlCommunication
|
||||
public CalibrationStructV4 CalibrationStructV4; /// CalibrationStruct of WM obtained or updated by iPerlCommunication
|
||||
|
||||
public Byte OrigTestModeConfig; /// Written to by StartTestingSealedMeter(), read from by EndTestingSealedMeter()
|
||||
|
||||
public ushort OrigCalibFactor;
|
||||
public ushort CalibFactor
|
||||
{
|
||||
@@ -164,8 +152,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
public double WMVolume { get { return wmVolume; } }
|
||||
public double WMTestTime { get { return wmTestTime; } }
|
||||
|
||||
string simulatedPcbNr = null;
|
||||
|
||||
int wmPulses;
|
||||
int wmRefPulses;
|
||||
double beginWMState;
|
||||
@@ -227,11 +213,11 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
/// <param name="nominalFlow">Nominal flow in m3/h</param>
|
||||
/// <param name="currentFactor">0 or the current Q2 correction factor when updating the factor</param>
|
||||
/// <returns>Calculated Q2 correction factor</returns>
|
||||
public double CalculateQ2CorrectionFactor(Results.Entities.MeterTestRslt currentQ2Result, int currentFactor, double nominalFlow, double errorTarget = 0)
|
||||
public double CalculateQ2CorrectionFactor(Results.Entities.MeterTestRslt q2adjResult, double calibTarget, double nominalFlow, int currentFactor = 0)
|
||||
{
|
||||
double nominalTestFlowLph = Units.ConvertTo(Unit.lph, nominalFlow);
|
||||
double volumeRefShiftedToTarget = currentQ2Result.VolumeRef * (1.0 + errorTarget / 100.0);
|
||||
double q2adjErrorShiftedToTarget = Config.Formulas.ErrorFromVolumes(currentQ2Result.VolumeMeter, volumeRefShiftedToTarget);
|
||||
double nominalTestFlowLph = Units.ConvertTo(Common.Unit.lph, nominalFlow);
|
||||
double volumeRefShiftedToTarget = q2adjResult.VolumeRef * (1.0 + calibTarget / 100.0);
|
||||
double q2adjErrorShiftedToTarget = Formulas.ErrorFromVolumes(q2adjResult.VolumeMeter, volumeRefShiftedToTarget);
|
||||
|
||||
double A = 16.0 / ScalingFactor(); /// Raw units per ml: DN15=16, DN20=8, DN25=4, DN32=2, DN40=1
|
||||
const double B = 8.0; /// Raw units per minute, 8
|
||||
@@ -240,16 +226,14 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
double F = D / (nominalTestFlowLph * 10.0); /// Error corrected with 8 Raw Units per minute [%]
|
||||
double G = F / B; /// Error corrected with 1 Raw Unit per minute [%]
|
||||
|
||||
/// Do not change the factor for an invalid measurement (q2adjResult.VolumeMeter == 0)
|
||||
double q2CorrectionFactor = (Math.Abs(currentQ2Result.VolumeMeter) <= float.Epsilon) ? Convert.ToDouble(currentFactor) :
|
||||
Convert.ToDouble(currentFactor) - (q2adjErrorShiftedToTarget / G) * (volumeRefShiftedToTarget / currentQ2Result.VolumeMeter);
|
||||
double q2CorrectionFactor = Convert.ToDouble(currentFactor)
|
||||
- (q2adjErrorShiftedToTarget / G) * (volumeRefShiftedToTarget / q2adjResult.VolumeMeter);
|
||||
|
||||
log.WarnFormat("CalculateQ2CorrectionFactor() : Pos={0}, PCB#={1}, Error={2}%, Target={3}%, Current factor={4} New factor={5}",
|
||||
log.WarnFormat("CalculateQ2CorrectionFactor() : Pos={0}, PCB#={1}, Error={2}%, CalTarget={3}%, Q2CorrFactor={4}",
|
||||
Name,
|
||||
SerialNr,
|
||||
currentQ2Result.Error.ToString("F2"),
|
||||
errorTarget.ToString("F3"),
|
||||
currentFactor.ToString("F1"),
|
||||
q2adjResult.Error.ToString("F2"),
|
||||
calibTarget.ToString("F1"),
|
||||
q2CorrectionFactor.ToString("F1"));
|
||||
|
||||
return q2CorrectionFactor;
|
||||
@@ -299,11 +283,12 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
/// </summary>
|
||||
/// <param name="test">Currently executed test</param>
|
||||
/// <param name="repetitionNr">Currently executed repetition number</param>
|
||||
public void TestIsGoingToStartSoon(Test _test, int _repetitionNr)
|
||||
public void TestIsGoingToStartSoon(Test test, int repetitionNr)
|
||||
{
|
||||
/// Store/update values to be used as a part of the opto-data log file name
|
||||
this.test = _test;
|
||||
this.repetitionNr = _repetitionNr;
|
||||
testName = test.Name;
|
||||
testRepeats = test.Repeats;
|
||||
this.repetitionNr = repetitionNr;
|
||||
|
||||
if (IsDataStreamProcessing())
|
||||
{
|
||||
@@ -339,7 +324,8 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
}
|
||||
}
|
||||
///
|
||||
Test test;
|
||||
string testName;
|
||||
int testRepeats;
|
||||
int repetitionNr;
|
||||
|
||||
|
||||
@@ -434,26 +420,20 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
synchronized = false;
|
||||
synchronized2 = false;
|
||||
partOfTelegram = string.Empty;
|
||||
optoSerialPort = null;
|
||||
|
||||
if (DebugLevel == DebugMode.Normal)
|
||||
{
|
||||
/// Open serial port: 9600 Bd, 8 data bits, 1 stop bit, no parity
|
||||
/// Check whether head is connected, working
|
||||
try
|
||||
{
|
||||
OpenOptoSerialPort($"COM{iperlHeadCfg.OptoComPortNr}", 9600, Parity.None, 8, StopBits.One, Handshake.None);
|
||||
CloseOptoSerialPort();
|
||||
log.FatalFormat($"{Name} initialized: {this}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new Exception(ex.Message);
|
||||
}
|
||||
string portName = string.Format("COM{0}", iperlHeadCfg.OptoComPortNr);
|
||||
optoSerialPort = new SerialPort(portName, 9600, Parity.None, 8, StopBits.One);
|
||||
optoSerialPort.Handshake = Handshake.None;
|
||||
optoSerialPort.Open();
|
||||
log.FatalFormat("{0} initialized: {1}", Name, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
log.FatalFormat($"{Name} simulated: {this}");
|
||||
optoSerialPort = null;
|
||||
log.FatalFormat("{0} simulated: {1}", Name, this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -471,8 +451,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
CalibrationStruct = null;
|
||||
CalibrationStructV4 = null;
|
||||
|
||||
OrigTestModeConfig = 0;
|
||||
|
||||
LastTestResult = null;
|
||||
LastTestResult2 = null;
|
||||
|
||||
@@ -482,8 +460,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
Q2CorrRL = 0;
|
||||
Q2CorrLR = 0;
|
||||
|
||||
simulatedPcbNr = null;
|
||||
|
||||
dataStreamState = DataStreamState.Flush;
|
||||
|
||||
currentFlowDir = InitFlowDir;
|
||||
@@ -559,9 +535,10 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
{
|
||||
try
|
||||
{
|
||||
if (optoSerialPort != null)
|
||||
if (DebugLevel == DebugMode.Normal && optoSerialPort != null)
|
||||
{
|
||||
CloseOptoSerialPort();
|
||||
optoSerialPort.Close();
|
||||
optoSerialPort = null;
|
||||
}
|
||||
}
|
||||
catch
|
||||
@@ -575,7 +552,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
/// Events: Event.ReadRegisterDone, Event.Error
|
||||
/// </summary>
|
||||
/// <returns>ReadWaterMeter instance reference casted to IOperaton</returns>
|
||||
public IOperation ReadRegisterOp()
|
||||
public IOperation ReadDatastreamOp()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
@@ -679,26 +656,20 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
//
|
||||
// log.DebugFormat("Feature vector calculation end, save opto-file start: {0:HH:mm:ss.fff}", DateTime.Now);
|
||||
|
||||
#if ORACLE_DB
|
||||
if (test.RawDataId + (test.Repeats - repetitionNr) * test.RawDataIdRepetMulti != 0)
|
||||
string relativeDirectory = Path.Combine(StateMachine.CycleStartTimeStamp.ToString("yy"),
|
||||
StateMachine.CycleStartTimeStamp.ToString("MM"),
|
||||
StateMachine.CycleStartTimeStamp.ToString("dd"));
|
||||
string directory = Path.Combine(OptoDataDirectory, relativeDirectory);
|
||||
string fileName = DetermineExtraDataFileName();
|
||||
if (!string.IsNullOrEmpty(fileName))
|
||||
{
|
||||
string relativeDirectory = Path.Combine(StateMachine.CycleStartTimeStamp.ToString("yy"),
|
||||
StateMachine.CycleStartTimeStamp.ToString("MM"),
|
||||
StateMachine.CycleStartTimeStamp.ToString("dd"));
|
||||
string fileName = DetermineExtraDataFileName();
|
||||
if (SaveOptoDataToFile(Path.Combine(OptoDataDirectory, relativeDirectory), fileName))
|
||||
if (SaveOptoDataToFile(directory, fileName))
|
||||
{
|
||||
extraDataPath = Path.Combine(relativeDirectory, fileName);
|
||||
}
|
||||
}
|
||||
|
||||
log.WarnFormat("IperlHead.Stop() startIx={0} endIx={1} len={2} raw data file = {3}",
|
||||
startIx, endIx, optoData.Length, fileName);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
log.WarnFormat("IperlHead.Stop() startIx={0} endIx={1} len={2} no raw data file", startIx, endIx, optoData.Length);
|
||||
}
|
||||
log.WarnFormat("IperlHeadd.Stop() startIx={0} endIx={1} optoData.Len={2} filename={3}", startIx, endIx, optoData.Length, !string.IsNullOrEmpty(fileName) ? fileName : "<null>");
|
||||
|
||||
if (TestStartTelegramIx == 0 || optoDataCount < 100)
|
||||
{
|
||||
@@ -765,27 +736,36 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
string DetermineExtraDataFileName()
|
||||
{
|
||||
///
|
||||
/// Get required pieces of information
|
||||
/// Select or create appropriate test infos
|
||||
///
|
||||
Results.Output.SensusTestInfo[] testInfos = Sequences.ProcessData.CompleteTestInfos;
|
||||
///
|
||||
if ((ProcessData.OracleDB != null && ProcessData.OracleDB.DesigMode == Output.DB.SensusOracle.DesigMode.Based_on_procedure) ||
|
||||
(testInfos == null && StateMachine.Procedure != null))
|
||||
{
|
||||
testInfos = Results.Output.SensusTestInfo.CreateFromProcedure(StateMachine.Procedure);
|
||||
}
|
||||
|
||||
///
|
||||
/// Select or create appropriate 'qBezeichnung'
|
||||
///
|
||||
string fullTestName = Results.Utils.GetTestName(testName, testRepeats, repetitionNr);
|
||||
var ti = testInfos.FirstOrDefault(x => x.PruefungsNrOpto != 0 && x.TestName == fullTestName);
|
||||
string qBezeichnung = (ti == null) ? fullTestName /// No appropriate TestInfo found => set default opto data file name
|
||||
: string.IsNullOrEmpty(ti.QBezeichnungOpto) ? ti.PruefungsNrOpto.ToString("D2")
|
||||
: ti.QBezeichnungOpto;
|
||||
///
|
||||
/// Get other required pieces of information
|
||||
///
|
||||
string pcbNr = (ConfigStruct != null) ? ConfigStruct.GetPcbNrString() : "UnknownPcbNr";
|
||||
string wmPosition = Name.Substring(5); /// WMPosition is extracted from a component name in form 'iPerl#'
|
||||
if (wmPosition.Length == 1) wmPosition = "0" + wmPosition;
|
||||
string cycleStartTime = StateMachine.CycleStartTimeStamp.ToString("HH_mm_ss");
|
||||
#if ORACLE_DB
|
||||
string[] designations = string.IsNullOrEmpty(test.RawDataDesignation) ? new string[0] : test.RawDataDesignation.Split(new char[] { '~' });
|
||||
int testId = test.RawDataId + (test.Repeats - repetitionNr) * test.RawDataIdRepetMulti;
|
||||
string designation = string.IsNullOrEmpty(test.RawDataDesignation)
|
||||
? testId.ToString(testId > 0 ? "D2" : "D1") /// Name is generated from Id
|
||||
: (designations.Length > repetitionNr - 1) ? designations[repetitionNr - 1] /// Name is from 'RawDataDesignation' parameter
|
||||
: string.Format("{0}-{1}", designations[0], repetitionNr); /// Name is form test name and repetition nr.
|
||||
#else
|
||||
int testId = 0;
|
||||
string designation = (test.Repeats == 1) ? test.Name : string.Format("{0}-{1}", test.Name, repetitionNr);
|
||||
#endif
|
||||
|
||||
///
|
||||
/// Return the file name
|
||||
///
|
||||
return string.Format("{0}_{1}_{2}_{3}.txt", pcbNr, wmPosition, designation, cycleStartTime);
|
||||
///
|
||||
return string.Format("{0}_{1}_{2}_{3}.txt", pcbNr, wmPosition, qBezeichnung, cycleStartTime);
|
||||
}
|
||||
|
||||
|
||||
@@ -795,7 +775,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
bool SaveOptoDataToFile(string directory, string fileName)
|
||||
{
|
||||
string fullFileName = Path.Combine(directory, fileName);
|
||||
log.WarnFormat("Saving {0} raw data to {1}", Name, fullFileName);
|
||||
log.WarnFormat("Saving {0} opto data to {1}", Name, fullFileName);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -860,42 +840,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
wmTestTime = timestampSec - timestampSec0;
|
||||
}
|
||||
|
||||
private void OpenOptoSerialPort(string comPort, int baudRate, Parity parity, int dataBits, StopBits stopBit, Handshake handshake)
|
||||
{
|
||||
if (DebugLevel == DebugMode.FailureDuringOperation) DebugLevel = DebugMode.Normal;
|
||||
if (DebugLevel == DebugMode.Normal)
|
||||
{
|
||||
/// Open serial port: 9600 Bd, 8 data bits, 1 stop bit, no parity
|
||||
try
|
||||
{
|
||||
CloseOptoSerialPort();
|
||||
optoSerialPort = new SerialPort(comPort, baudRate, parity, dataBits, stopBit);
|
||||
optoSerialPort.Handshake = handshake;
|
||||
optoSerialPort.Open();
|
||||
log.FatalFormat($"{Name} OptoPort opened: {this}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.FatalFormat($"{Name} OptoPort - error opening port: {this}" + Environment.NewLine + ex.Message);
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
optoSerialPort = null;
|
||||
log.FatalFormat($"{Name} OproPort simulated: {this}");
|
||||
}
|
||||
}
|
||||
|
||||
private void CloseOptoSerialPort()
|
||||
{
|
||||
if (optoSerialPort != null)
|
||||
{
|
||||
optoSerialPort.Close();
|
||||
optoSerialPort = null;
|
||||
log.FatalFormat($"{Name} OptoPort closed: {this}");
|
||||
}
|
||||
}
|
||||
|
||||
DataStreamState dataStreamState;
|
||||
|
||||
@@ -904,13 +848,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
/// </summary>
|
||||
public void StartDataStreamProcessing()
|
||||
{
|
||||
try
|
||||
{
|
||||
OpenOptoSerialPort($"COM{iperlHeadCfg.OptoComPortNr}", 9600, Parity.None, 8, StopBits.One, Handshake.None);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
/// Reset opto-data, etc.
|
||||
optoDataCount = 0;
|
||||
timeFromStart = 0;
|
||||
@@ -941,21 +878,20 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
/// <summary>
|
||||
/// Stop processing and saving datastream data
|
||||
/// </summary>
|
||||
public void StopDataStreamProcessing()
|
||||
void StopDataStreamProcessing()
|
||||
{
|
||||
dataStreamState = DataStreamState.Flush;
|
||||
CloseOptoSerialPort();
|
||||
}
|
||||
|
||||
///
|
||||
/// Variables storing the context of serial port data parsing (ReadOptoSerialPort(...))
|
||||
///
|
||||
bool synchronized;
|
||||
///
|
||||
/// Variables storing the context of serial port data parsing (ReadOptoSerialPort(...))
|
||||
///
|
||||
bool synchronized;
|
||||
bool synchronized2;
|
||||
string partOfTelegram;
|
||||
|
||||
/// <summary>
|
||||
/// Reads opto-datastream via serial port. Invoked from RunDeviceBefore()
|
||||
/// Reads opto-datastream via serual port. Invoked from RunDeviceBefore()
|
||||
///
|
||||
/// Telegram description:
|
||||
/// AAAAAA[tab]BBBB[tab]CCCC[tab]DDDDDD[tab]EEEE[tab]FFFFFFFF[tab]GG[cr][lf] (42 bytes)
|
||||
@@ -967,7 +903,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
/// <param name="optoState">OptoState.Read or OptoState.Flush</param>
|
||||
void ReadOptoData(DataStreamState optoState)
|
||||
{
|
||||
if (optoSerialPort is null) return;
|
||||
lock (this)
|
||||
{
|
||||
int nrBytes = optoSerialPort.BytesToRead;
|
||||
@@ -1014,7 +949,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
{
|
||||
/// CR+LF was found && (pos >= OptoTelegramRaw.Length - 2) && the telegram is OK
|
||||
flowDirectionDetection.WriteToFifo(volumeRawExtLast, timestampExtLast);
|
||||
OptoTelegramReceived(optoDataCount, synchronized2, volumeRawExtLast, timestampExtLast);
|
||||
OptoTelegramRreceived(optoDataCount, synchronized2, volumeRawExtLast, timestampExtLast);
|
||||
synchronized2 = synchronized;
|
||||
allRcvd = allRcvd.Substring(pos + 2);
|
||||
}
|
||||
@@ -1063,25 +998,8 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
}
|
||||
}
|
||||
|
||||
public string ReadOptoData()
|
||||
{
|
||||
if (optoSerialPort is null) return "";
|
||||
string received = ".";
|
||||
lock (this)
|
||||
{
|
||||
int nrBytes = optoSerialPort.BytesToRead;
|
||||
if (nrBytes > 0)
|
||||
{
|
||||
char[] buffer = new char[nrBytes];
|
||||
optoSerialPort.Read(buffer, 0, nrBytes);
|
||||
received = new string(buffer);
|
||||
}
|
||||
}
|
||||
return received;
|
||||
}
|
||||
|
||||
|
||||
void OptoTelegramReceived(int currentIx, bool async, Int64 volumeRawExt, Int64 timestampRawExt)
|
||||
void OptoTelegramRreceived(int currentIx, bool async, Int64 volumeRawExt, Int64 timestampRawExt)
|
||||
{
|
||||
currentTelegramIx = currentIx;
|
||||
|
||||
@@ -1111,7 +1029,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// Called from the state machine when a test is selected and UI needs to be updated.
|
||||
/// </summary>
|
||||
public void OnOptoReceived(object sender, OptoReceivedEventArgs args)
|
||||
@@ -1409,72 +1326,5 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
if (reader.ReadBoolean()) (LastTestResult = new Results.Entities.MeterTestRslt()).ReadBinary(reader, null);
|
||||
if (reader.ReadBoolean()) (LastTestResult2 = new Results.Entities.MeterTestRslt()).ReadBinary(reader, null);
|
||||
}
|
||||
|
||||
internal void ResetNfcInterface(bool? nfc_on = null)
|
||||
{
|
||||
if (iperlHeadCfg.HeadCommunicationComPortNr == 0) return;
|
||||
|
||||
SERIAL_Driver _SERIAL_Driver_Head_Config = new SERIAL_Driver();
|
||||
_SERIAL_Driver_Head_Config.OpenConnection($"COM{iperlHeadCfg.HeadCommunicationComPortNr}", 9600, 8, Parity.None, StopBits.One);
|
||||
|
||||
NFCHeadConfig _NFCHead_Config = new NFCHeadConfig(_SERIAL_Driver_Head_Config);
|
||||
if (nfc_on == null || nfc_on == false) _NFCHead_Config.NFCHeadConfig_SetInterface(false); // set RFID interface
|
||||
if (nfc_on == null || nfc_on == true ) _NFCHead_Config.NFCHeadConfig_SetInterface(true); // set NFC interface
|
||||
_SERIAL_Driver_Head_Config.Close();
|
||||
_SERIAL_Driver_Head_Config.Dispose();
|
||||
}
|
||||
|
||||
internal void SetNfcInterface()
|
||||
{
|
||||
ResetNfcInterface(true);
|
||||
}
|
||||
|
||||
internal void SetRfidInterface()
|
||||
{
|
||||
ResetNfcInterface(false);
|
||||
}
|
||||
|
||||
internal void SetCommunicationInterface(CommunicationInterface commInterface)
|
||||
{
|
||||
//using (ISession session = TBF.DB.ConfigDBSessionFactory.OpenSession())
|
||||
// Replace the problematic line with the following code to fix the error:
|
||||
using (ISession session = TBF.DB.SessionFactories[(int)DBKind.Config].OpenSession())
|
||||
using (ITransaction tx = session.BeginTransaction())
|
||||
{
|
||||
try
|
||||
{
|
||||
var cmpntEntities = session.QueryOver<Component>()
|
||||
.OrderBy(x => x.ItemNr).Asc
|
||||
.List<Component>();
|
||||
var cmpnt = cmpntEntities.Where(x => x.Name == Name).First();
|
||||
if (cmpnt != null)
|
||||
{
|
||||
XDocument doc = XDocument.Parse(cmpnt.Parameters);
|
||||
if (doc != null)
|
||||
{
|
||||
XElement element = doc.Root.Element("CommunicationInterface");
|
||||
if (element != null)
|
||||
{
|
||||
element.Value = commInterface.ToString();
|
||||
cmpnt.Parameters = doc.ToString();
|
||||
session.SaveOrUpdate(cmpnt);
|
||||
tx.Commit();
|
||||
log.FatalFormat($"Set CommunicationInterface {Name} to {commInterface.ToString()}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (tx != null) tx.Rollback();
|
||||
log.FatalFormat($"Set CommunicationInterface {Name} error: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public IOperation ReadDatastreamOp()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,12 +21,10 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
public bool UseTcpIP;
|
||||
public string OptoIPAddress;
|
||||
public ushort OptoTcpipPortNr;
|
||||
public int HeadCommunicationComPortNr;
|
||||
public int OptoComPortNr;
|
||||
public int RfidComPortNr; /// 0 = use MuxBoardNr
|
||||
public int MuxBoardNr; /// 0 = use RfidComPort(Nr), otherwise mux. board nr. 1 .. 4
|
||||
public int Group; /// Number written to QuidoRS to connct the watermeter to RfidComPort, 1 .. 10
|
||||
public CommunicationInterface CommunicationInterface; /// Communication Interface: RFID or NFC
|
||||
|
||||
/// <summary> Procedure parameters </summary>
|
||||
[XmlIgnore]
|
||||
@@ -47,8 +45,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
RfidComPortNr = 0; /// = use mux. board
|
||||
MuxBoardNr = 1;
|
||||
ProcParams = CreateProcParamsProvider() as ProcParams;
|
||||
CommunicationInterface = CommunicationInterface.RFID;
|
||||
HeadCommunicationComPortNr = 0;
|
||||
}
|
||||
|
||||
public IperlHeadCfg(IComponentFactory factory)
|
||||
@@ -59,7 +55,12 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return $"{Name} Group1 (mux#)={MuxBoardNr}, Group2={Group}, Opto=Com{OptoComPortNr}, {CommunicationInterface}=Com{RfidComPortNr}";
|
||||
return string.Format("{0} Group1 (mux#)={1}, Group2={2}, Opto=Com{3}, RFID=Com{4}",
|
||||
Name,
|
||||
MuxBoardNr,
|
||||
Group,
|
||||
OptoComPortNr,
|
||||
RfidComPortNr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,14 +3,16 @@
|
||||
///
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Windows.Forms;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
{
|
||||
public partial class IperlHeadCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
public partial class IperlHeadCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
@@ -49,14 +51,11 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
radioButton2.Checked = !config.UseTcpIP;
|
||||
ipAddressTextBox.Text = (config.OptoIPAddress != null) ? config.OptoIPAddress : "0.0.0.0";
|
||||
tcpipPortTextBox.Text = config.OptoTcpipPortNr.ToString();
|
||||
headPortNrTextBox.Text = config.HeadCommunicationComPortNr.ToString();
|
||||
optoSerialPortTextBox.Text = config.OptoComPortNr.ToString();
|
||||
rfidPortNrTextBox.Text = config.RfidComPortNr.ToString();
|
||||
muxBoardNrTextBox.Text = config.MuxBoardNr.ToString();
|
||||
groupTextBox.Text = config.Group.ToString();
|
||||
comboBoxCommunicationInterface.SelectedItem = config.CommunicationInterface.ToString();
|
||||
tabPage2.Controls.Add(new IperlHeadTestCtrl(config));
|
||||
}
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
@@ -67,10 +66,8 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
tcpipPortTextBox.Enabled = true;
|
||||
optoSerialPortTextBox.Enabled = true;
|
||||
rfidPortNrTextBox.Enabled = true;
|
||||
headPortNrTextBox.Enabled = true;
|
||||
muxBoardNrTextBox.Enabled = true;
|
||||
groupTextBox.Enabled = true;
|
||||
comboBoxCommunicationInterface.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
@@ -109,12 +106,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
message += Environment.NewLine + "'RFID serial port nr.' is not valid";
|
||||
}
|
||||
|
||||
if (!int.TryParse(headPortNrTextBox.Text, out dummy) || dummy < 0 || dummy > 999)
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "'Head communication serial port nr.' is not valid";
|
||||
}
|
||||
|
||||
if (!int.TryParse(muxBoardNrTextBox.Text, out dummy) || dummy < 1 || dummy > 4)
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
@@ -153,10 +144,8 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
config.RfidComPortNr = int.Parse(rfidPortNrTextBox.Text);
|
||||
config.MuxBoardNr = int.Parse(muxBoardNrTextBox.Text);
|
||||
config.Group = int.Parse(groupTextBox.Text);
|
||||
config.CommunicationInterface = (CommunicationInterface)comboBoxCommunicationInterface.SelectedIndex;
|
||||
config.HeadCommunicationComPortNr = int.Parse(headPortNrTextBox.Text);
|
||||
|
||||
return flags;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+174
-307
@@ -31,150 +31,149 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.tabControl1 = new System.Windows.Forms.TabControl();
|
||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.comboBoxCommunicationInterface = new System.Windows.Forms.ComboBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.optoSerialPortTextBox = new System.Windows.Forms.TextBox();
|
||||
this.optoSerialPortLabel = new System.Windows.Forms.Label();
|
||||
this.muxBoardNrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.muxBoardNrLabel = new System.Windows.Forms.Label();
|
||||
this.groupTextBox = new System.Windows.Forms.TextBox();
|
||||
this.groupLabel = new System.Windows.Forms.Label();
|
||||
this.rfidPortNrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.rfidSerialPortNrLabel = new System.Windows.Forms.Label();
|
||||
this.radioButton1 = new System.Windows.Forms.RadioButton();
|
||||
this.radioButton2 = new System.Windows.Forms.RadioButton();
|
||||
this.optoDataGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.tcpipPortLabel = new System.Windows.Forms.Label();
|
||||
this.tcpipPortTextBox = new System.Windows.Forms.TextBox();
|
||||
this.ipAddressLabel = new System.Windows.Forms.Label();
|
||||
this.ipAddressTextBox = new System.Windows.Forms.TextBox();
|
||||
this.radioButton1 = new System.Windows.Forms.RadioButton();
|
||||
this.radioButton2 = new System.Windows.Forms.RadioButton();
|
||||
this.optoSerialPortLabel = new System.Windows.Forms.Label();
|
||||
this.optoSerialPortTextBox = new System.Windows.Forms.TextBox();
|
||||
this.groupTextBox = new System.Windows.Forms.TextBox();
|
||||
this.groupLabel = new System.Windows.Forms.Label();
|
||||
this.muxBoardNrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.muxBoardNrLabel = new System.Windows.Forms.Label();
|
||||
this.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.headPortNrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.tabControl1.SuspendLayout();
|
||||
this.tabPage1.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.optoDataGroupBox.SuspendLayout();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tabControl1
|
||||
// nameTextBox
|
||||
//
|
||||
this.tabControl1.Controls.Add(this.tabPage1);
|
||||
this.tabControl1.Controls.Add(this.tabPage2);
|
||||
this.tabControl1.Location = new System.Drawing.Point(3, 3);
|
||||
this.tabControl1.Name = "tabControl1";
|
||||
this.tabControl1.SelectedIndex = 0;
|
||||
this.tabControl1.Size = new System.Drawing.Size(611, 432);
|
||||
this.tabControl1.TabIndex = 0;
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(135, 40);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(121, 20);
|
||||
this.nameTextBox.TabIndex = 2;
|
||||
//
|
||||
// tabPage1
|
||||
// nameLabel
|
||||
//
|
||||
this.tabPage1.Controls.Add(this.groupBox2);
|
||||
this.tabPage1.Controls.Add(this.label4);
|
||||
this.tabPage1.Controls.Add(this.label3);
|
||||
this.tabPage1.Controls.Add(this.groupBox1);
|
||||
this.tabPage1.Controls.Add(this.optoDataGroupBox);
|
||||
this.tabPage1.Controls.Add(this.groupTextBox);
|
||||
this.tabPage1.Controls.Add(this.groupLabel);
|
||||
this.tabPage1.Controls.Add(this.muxBoardNrTextBox);
|
||||
this.tabPage1.Controls.Add(this.muxBoardNrLabel);
|
||||
this.tabPage1.Controls.Add(this.nameTextBox);
|
||||
this.tabPage1.Controls.Add(this.nameLabel);
|
||||
this.tabPage1.Controls.Add(this.classNameLabel);
|
||||
this.tabPage1.Location = new System.Drawing.Point(4, 25);
|
||||
this.tabPage1.Name = "tabPage1";
|
||||
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage1.Size = new System.Drawing.Size(603, 403);
|
||||
this.tabPage1.TabIndex = 0;
|
||||
this.tabPage1.Text = "Config";
|
||||
this.tabPage1.UseVisualStyleBackColor = true;
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(25, 43);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 1;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// label4
|
||||
// classNameLabel
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(208, 101);
|
||||
this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(40, 16);
|
||||
this.label4.TabIndex = 25;
|
||||
this.label4.Text = "1 .. 10";
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(132, 16);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(60, 13);
|
||||
this.classNameLabel.TabIndex = 0;
|
||||
this.classNameLabel.Text = "ClassName";
|
||||
//
|
||||
// label3
|
||||
// optoSerialPortTextBox
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(208, 72);
|
||||
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(33, 16);
|
||||
this.label3.TabIndex = 24;
|
||||
this.label3.Text = "1 .. 4";
|
||||
this.optoSerialPortTextBox.Enabled = false;
|
||||
this.optoSerialPortTextBox.Location = new System.Drawing.Point(329, 42);
|
||||
this.optoSerialPortTextBox.Name = "optoSerialPortTextBox";
|
||||
this.optoSerialPortTextBox.Size = new System.Drawing.Size(34, 20);
|
||||
this.optoSerialPortTextBox.TabIndex = 7;
|
||||
//
|
||||
// groupBox1
|
||||
// optoSerialPortLabel
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.comboBoxCommunicationInterface);
|
||||
this.groupBox1.Controls.Add(this.label1);
|
||||
this.groupBox1.Controls.Add(this.rfidPortNrTextBox);
|
||||
this.groupBox1.Controls.Add(this.rfidSerialPortNrLabel);
|
||||
this.groupBox1.Location = new System.Drawing.Point(10, 259);
|
||||
this.groupBox1.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Padding = new System.Windows.Forms.Padding(4);
|
||||
this.groupBox1.Size = new System.Drawing.Size(552, 68);
|
||||
this.groupBox1.TabIndex = 23;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "RFID / NFC communication (in case mux. board is not used)";
|
||||
this.optoSerialPortLabel.AutoSize = true;
|
||||
this.optoSerialPortLabel.Location = new System.Drawing.Point(241, 45);
|
||||
this.optoSerialPortLabel.Name = "optoSerialPortLabel";
|
||||
this.optoSerialPortLabel.Size = new System.Drawing.Size(72, 13);
|
||||
this.optoSerialPortLabel.TabIndex = 6;
|
||||
this.optoSerialPortLabel.Text = "Serial port nr.:";
|
||||
//
|
||||
// comboBoxCommunicationInterface
|
||||
// muxBoardNrTextBox
|
||||
//
|
||||
this.comboBoxCommunicationInterface.Enabled = false;
|
||||
this.comboBoxCommunicationInterface.FormattingEnabled = true;
|
||||
this.comboBoxCommunicationInterface.Items.AddRange(new object[] {
|
||||
"RFID",
|
||||
"NFC"});
|
||||
this.comboBoxCommunicationInterface.Location = new System.Drawing.Point(201, 27);
|
||||
this.comboBoxCommunicationInterface.Name = "comboBoxCommunicationInterface";
|
||||
this.comboBoxCommunicationInterface.Size = new System.Drawing.Size(71, 24);
|
||||
this.comboBoxCommunicationInterface.TabIndex = 9;
|
||||
this.muxBoardNrTextBox.Enabled = false;
|
||||
this.muxBoardNrTextBox.Location = new System.Drawing.Point(135, 63);
|
||||
this.muxBoardNrTextBox.Name = "muxBoardNrTextBox";
|
||||
this.muxBoardNrTextBox.Size = new System.Drawing.Size(34, 20);
|
||||
this.muxBoardNrTextBox.TabIndex = 9;
|
||||
//
|
||||
// label1
|
||||
// muxBoardNrLabel
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(41, 30);
|
||||
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(153, 16);
|
||||
this.label1.TabIndex = 8;
|
||||
this.label1.Text = "Communication Interface";
|
||||
this.muxBoardNrLabel.AutoSize = true;
|
||||
this.muxBoardNrLabel.Location = new System.Drawing.Point(25, 66);
|
||||
this.muxBoardNrLabel.Name = "muxBoardNrLabel";
|
||||
this.muxBoardNrLabel.Size = new System.Drawing.Size(106, 13);
|
||||
this.muxBoardNrLabel.TabIndex = 8;
|
||||
this.muxBoardNrLabel.Text = "Group 1 (mux. board)";
|
||||
//
|
||||
// groupTextBox
|
||||
//
|
||||
this.groupTextBox.Enabled = false;
|
||||
this.groupTextBox.Location = new System.Drawing.Point(135, 86);
|
||||
this.groupTextBox.Name = "groupTextBox";
|
||||
this.groupTextBox.Size = new System.Drawing.Size(34, 20);
|
||||
this.groupTextBox.TabIndex = 11;
|
||||
//
|
||||
// groupLabel
|
||||
//
|
||||
this.groupLabel.AutoSize = true;
|
||||
this.groupLabel.Location = new System.Drawing.Point(25, 89);
|
||||
this.groupLabel.Name = "groupLabel";
|
||||
this.groupLabel.Size = new System.Drawing.Size(45, 13);
|
||||
this.groupLabel.TabIndex = 10;
|
||||
this.groupLabel.Text = "Group 2";
|
||||
//
|
||||
// rfidPortNrTextBox
|
||||
//
|
||||
this.rfidPortNrTextBox.Enabled = false;
|
||||
this.rfidPortNrTextBox.Location = new System.Drawing.Point(439, 26);
|
||||
this.rfidPortNrTextBox.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.rfidPortNrTextBox.Location = new System.Drawing.Point(329, 21);
|
||||
this.rfidPortNrTextBox.Name = "rfidPortNrTextBox";
|
||||
this.rfidPortNrTextBox.Size = new System.Drawing.Size(44, 22);
|
||||
this.rfidPortNrTextBox.Size = new System.Drawing.Size(34, 20);
|
||||
this.rfidPortNrTextBox.TabIndex = 7;
|
||||
//
|
||||
// rfidSerialPortNrLabel
|
||||
//
|
||||
this.rfidSerialPortNrLabel.AutoSize = true;
|
||||
this.rfidSerialPortNrLabel.Location = new System.Drawing.Point(321, 30);
|
||||
this.rfidSerialPortNrLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.rfidSerialPortNrLabel.Location = new System.Drawing.Point(241, 24);
|
||||
this.rfidSerialPortNrLabel.Name = "rfidSerialPortNrLabel";
|
||||
this.rfidSerialPortNrLabel.Size = new System.Drawing.Size(88, 16);
|
||||
this.rfidSerialPortNrLabel.Size = new System.Drawing.Size(72, 13);
|
||||
this.rfidSerialPortNrLabel.TabIndex = 6;
|
||||
this.rfidSerialPortNrLabel.Text = "Serial port nr.:";
|
||||
//
|
||||
// radioButton1
|
||||
//
|
||||
this.radioButton1.AutoSize = true;
|
||||
this.radioButton1.Enabled = false;
|
||||
this.radioButton1.Location = new System.Drawing.Point(22, 19);
|
||||
this.radioButton1.Name = "radioButton1";
|
||||
this.radioButton1.Size = new System.Drawing.Size(83, 17);
|
||||
this.radioButton1.TabIndex = 0;
|
||||
this.radioButton1.TabStop = true;
|
||||
this.radioButton1.Text = "Use TCP/IP";
|
||||
this.radioButton1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radioButton2
|
||||
//
|
||||
this.radioButton2.AutoSize = true;
|
||||
this.radioButton2.Enabled = false;
|
||||
this.radioButton2.Location = new System.Drawing.Point(234, 19);
|
||||
this.radioButton2.Name = "radioButton2";
|
||||
this.radioButton2.Size = new System.Drawing.Size(92, 17);
|
||||
this.radioButton2.TabIndex = 1;
|
||||
this.radioButton2.TabStop = true;
|
||||
this.radioButton2.Text = "Use serial port";
|
||||
this.radioButton2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// optoDataGroupBox
|
||||
//
|
||||
this.optoDataGroupBox.Controls.Add(this.tcpipPortLabel);
|
||||
@@ -185,257 +184,125 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
this.optoDataGroupBox.Controls.Add(this.radioButton2);
|
||||
this.optoDataGroupBox.Controls.Add(this.optoSerialPortLabel);
|
||||
this.optoDataGroupBox.Controls.Add(this.optoSerialPortTextBox);
|
||||
this.optoDataGroupBox.Location = new System.Drawing.Point(10, 131);
|
||||
this.optoDataGroupBox.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.optoDataGroupBox.Location = new System.Drawing.Point(28, 114);
|
||||
this.optoDataGroupBox.Name = "optoDataGroupBox";
|
||||
this.optoDataGroupBox.Padding = new System.Windows.Forms.Padding(4);
|
||||
this.optoDataGroupBox.Size = new System.Drawing.Size(552, 119);
|
||||
this.optoDataGroupBox.TabIndex = 18;
|
||||
this.optoDataGroupBox.Size = new System.Drawing.Size(414, 97);
|
||||
this.optoDataGroupBox.TabIndex = 5;
|
||||
this.optoDataGroupBox.TabStop = false;
|
||||
this.optoDataGroupBox.Text = "Opto-data";
|
||||
//
|
||||
// tcpipPortLabel
|
||||
//
|
||||
this.tcpipPortLabel.AutoSize = true;
|
||||
this.tcpipPortLabel.Location = new System.Drawing.Point(41, 87);
|
||||
this.tcpipPortLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.tcpipPortLabel.Location = new System.Drawing.Point(31, 71);
|
||||
this.tcpipPortLabel.Name = "tcpipPortLabel";
|
||||
this.tcpipPortLabel.Size = new System.Drawing.Size(54, 16);
|
||||
this.tcpipPortLabel.Size = new System.Drawing.Size(47, 13);
|
||||
this.tcpipPortLabel.TabIndex = 4;
|
||||
this.tcpipPortLabel.Text = "Port nr..:";
|
||||
//
|
||||
// tcpipPortTextBox
|
||||
//
|
||||
this.tcpipPortTextBox.Enabled = false;
|
||||
this.tcpipPortTextBox.Location = new System.Drawing.Point(143, 84);
|
||||
this.tcpipPortTextBox.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.tcpipPortTextBox.Location = new System.Drawing.Point(107, 68);
|
||||
this.tcpipPortTextBox.Name = "tcpipPortTextBox";
|
||||
this.tcpipPortTextBox.Size = new System.Drawing.Size(51, 22);
|
||||
this.tcpipPortTextBox.Size = new System.Drawing.Size(39, 20);
|
||||
this.tcpipPortTextBox.TabIndex = 5;
|
||||
//
|
||||
// ipAddressLabel
|
||||
//
|
||||
this.ipAddressLabel.AutoSize = true;
|
||||
this.ipAddressLabel.Location = new System.Drawing.Point(41, 59);
|
||||
this.ipAddressLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.ipAddressLabel.Location = new System.Drawing.Point(31, 48);
|
||||
this.ipAddressLabel.Name = "ipAddressLabel";
|
||||
this.ipAddressLabel.Size = new System.Drawing.Size(78, 16);
|
||||
this.ipAddressLabel.Size = new System.Drawing.Size(63, 13);
|
||||
this.ipAddressLabel.TabIndex = 2;
|
||||
this.ipAddressLabel.Text = "IP address.:";
|
||||
//
|
||||
// ipAddressTextBox
|
||||
//
|
||||
this.ipAddressTextBox.Enabled = false;
|
||||
this.ipAddressTextBox.Location = new System.Drawing.Point(143, 55);
|
||||
this.ipAddressTextBox.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.ipAddressTextBox.Location = new System.Drawing.Point(107, 45);
|
||||
this.ipAddressTextBox.Name = "ipAddressTextBox";
|
||||
this.ipAddressTextBox.Size = new System.Drawing.Size(129, 22);
|
||||
this.ipAddressTextBox.Size = new System.Drawing.Size(98, 20);
|
||||
this.ipAddressTextBox.TabIndex = 3;
|
||||
//
|
||||
// radioButton1
|
||||
// groupBox1
|
||||
//
|
||||
this.radioButton1.AutoSize = true;
|
||||
this.radioButton1.Checked = true;
|
||||
this.radioButton1.Enabled = false;
|
||||
this.radioButton1.Location = new System.Drawing.Point(29, 23);
|
||||
this.radioButton1.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.radioButton1.Name = "radioButton1";
|
||||
this.radioButton1.Size = new System.Drawing.Size(99, 20);
|
||||
this.radioButton1.TabIndex = 0;
|
||||
this.radioButton1.TabStop = true;
|
||||
this.radioButton1.Text = "Use TCP/IP";
|
||||
this.radioButton1.UseVisualStyleBackColor = true;
|
||||
this.groupBox1.Controls.Add(this.rfidPortNrTextBox);
|
||||
this.groupBox1.Controls.Add(this.rfidSerialPortNrLabel);
|
||||
this.groupBox1.Location = new System.Drawing.Point(28, 218);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(414, 55);
|
||||
this.groupBox1.TabIndex = 12;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "RFID communication (in case mux. board is not used)";
|
||||
//
|
||||
// radioButton2
|
||||
// label3
|
||||
//
|
||||
this.radioButton2.AutoSize = true;
|
||||
this.radioButton2.Enabled = false;
|
||||
this.radioButton2.Location = new System.Drawing.Point(312, 23);
|
||||
this.radioButton2.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.radioButton2.Name = "radioButton2";
|
||||
this.radioButton2.Size = new System.Drawing.Size(115, 20);
|
||||
this.radioButton2.TabIndex = 1;
|
||||
this.radioButton2.Text = "Use serial port";
|
||||
this.radioButton2.UseVisualStyleBackColor = true;
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(176, 66);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(31, 13);
|
||||
this.label3.TabIndex = 13;
|
||||
this.label3.Text = "1 .. 4";
|
||||
//
|
||||
// optoSerialPortLabel
|
||||
// label4
|
||||
//
|
||||
this.optoSerialPortLabel.AutoSize = true;
|
||||
this.optoSerialPortLabel.Location = new System.Drawing.Point(321, 55);
|
||||
this.optoSerialPortLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.optoSerialPortLabel.Name = "optoSerialPortLabel";
|
||||
this.optoSerialPortLabel.Size = new System.Drawing.Size(88, 16);
|
||||
this.optoSerialPortLabel.TabIndex = 6;
|
||||
this.optoSerialPortLabel.Text = "Serial port nr.:";
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(176, 89);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(37, 13);
|
||||
this.label4.TabIndex = 14;
|
||||
this.label4.Text = "1 .. 10";
|
||||
//
|
||||
// optoSerialPortTextBox
|
||||
// WaterMeterCfgCtrl
|
||||
//
|
||||
this.optoSerialPortTextBox.Enabled = false;
|
||||
this.optoSerialPortTextBox.Location = new System.Drawing.Point(439, 52);
|
||||
this.optoSerialPortTextBox.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.optoSerialPortTextBox.Name = "optoSerialPortTextBox";
|
||||
this.optoSerialPortTextBox.Size = new System.Drawing.Size(44, 22);
|
||||
this.optoSerialPortTextBox.TabIndex = 7;
|
||||
//
|
||||
// groupTextBox
|
||||
//
|
||||
this.groupTextBox.Enabled = false;
|
||||
this.groupTextBox.Location = new System.Drawing.Point(153, 97);
|
||||
this.groupTextBox.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.groupTextBox.Name = "groupTextBox";
|
||||
this.groupTextBox.Size = new System.Drawing.Size(44, 22);
|
||||
this.groupTextBox.TabIndex = 22;
|
||||
//
|
||||
// groupLabel
|
||||
//
|
||||
this.groupLabel.AutoSize = true;
|
||||
this.groupLabel.Location = new System.Drawing.Point(6, 101);
|
||||
this.groupLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.groupLabel.Name = "groupLabel";
|
||||
this.groupLabel.Size = new System.Drawing.Size(54, 16);
|
||||
this.groupLabel.TabIndex = 21;
|
||||
this.groupLabel.Text = "Group 2";
|
||||
//
|
||||
// muxBoardNrTextBox
|
||||
//
|
||||
this.muxBoardNrTextBox.Enabled = false;
|
||||
this.muxBoardNrTextBox.Location = new System.Drawing.Point(153, 69);
|
||||
this.muxBoardNrTextBox.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.muxBoardNrTextBox.Name = "muxBoardNrTextBox";
|
||||
this.muxBoardNrTextBox.Size = new System.Drawing.Size(44, 22);
|
||||
this.muxBoardNrTextBox.TabIndex = 20;
|
||||
//
|
||||
// muxBoardNrLabel
|
||||
//
|
||||
this.muxBoardNrLabel.AutoSize = true;
|
||||
this.muxBoardNrLabel.Location = new System.Drawing.Point(6, 72);
|
||||
this.muxBoardNrLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.muxBoardNrLabel.Name = "muxBoardNrLabel";
|
||||
this.muxBoardNrLabel.Size = new System.Drawing.Size(131, 16);
|
||||
this.muxBoardNrLabel.TabIndex = 19;
|
||||
this.muxBoardNrLabel.Text = "Group 1 (mux. board)";
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(153, 40);
|
||||
this.nameTextBox.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(160, 22);
|
||||
this.nameTextBox.TabIndex = 17;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(6, 44);
|
||||
this.nameLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(44, 16);
|
||||
this.nameLabel.TabIndex = 16;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(149, 11);
|
||||
this.classNameLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(78, 16);
|
||||
this.classNameLabel.TabIndex = 15;
|
||||
this.classNameLabel.Text = "ClassName";
|
||||
//
|
||||
// tabPage2
|
||||
//
|
||||
this.tabPage2.Location = new System.Drawing.Point(4, 25);
|
||||
this.tabPage2.Name = "tabPage2";
|
||||
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage2.Size = new System.Drawing.Size(603, 403);
|
||||
this.tabPage2.TabIndex = 1;
|
||||
this.tabPage2.Text = "Test";
|
||||
this.tabPage2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
this.groupBox2.Controls.Add(this.headPortNrTextBox);
|
||||
this.groupBox2.Controls.Add(this.label2);
|
||||
this.groupBox2.Location = new System.Drawing.Point(10, 335);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(552, 50);
|
||||
this.groupBox2.TabIndex = 26;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "Head Communication";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(321, 18);
|
||||
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(88, 16);
|
||||
this.label2.TabIndex = 7;
|
||||
this.label2.Text = "Serial port nr.:";
|
||||
//
|
||||
// headPortNrTextBox
|
||||
//
|
||||
this.headPortNrTextBox.Enabled = false;
|
||||
this.headPortNrTextBox.Location = new System.Drawing.Point(439, 15);
|
||||
this.headPortNrTextBox.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.headPortNrTextBox.Name = "headPortNrTextBox";
|
||||
this.headPortNrTextBox.Size = new System.Drawing.Size(44, 22);
|
||||
this.headPortNrTextBox.TabIndex = 8;
|
||||
//
|
||||
// IperlHeadCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.tabControl1);
|
||||
this.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.Name = "IperlHeadCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(617, 438);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Controls.Add(this.optoDataGroupBox);
|
||||
this.Controls.Add(this.groupTextBox);
|
||||
this.Controls.Add(this.groupLabel);
|
||||
this.Controls.Add(this.muxBoardNrTextBox);
|
||||
this.Controls.Add(this.muxBoardNrLabel);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Name = "WaterMeterCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(500, 300);
|
||||
this.Load += new System.EventHandler(this.WaterMeterCfgCtrl_Load);
|
||||
this.tabControl1.ResumeLayout(false);
|
||||
this.tabPage1.ResumeLayout(false);
|
||||
this.tabPage1.PerformLayout();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.optoDataGroupBox.ResumeLayout(false);
|
||||
this.optoDataGroupBox.PerformLayout();
|
||||
this.groupBox2.ResumeLayout(false);
|
||||
this.groupBox2.PerformLayout();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TabControl tabControl1;
|
||||
private System.Windows.Forms.TabPage tabPage1;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.ComboBox comboBoxCommunicationInterface;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox nameTextBox;
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
private System.Windows.Forms.TextBox optoSerialPortTextBox;
|
||||
private System.Windows.Forms.Label optoSerialPortLabel;
|
||||
private System.Windows.Forms.TextBox muxBoardNrTextBox;
|
||||
private System.Windows.Forms.Label muxBoardNrLabel;
|
||||
private System.Windows.Forms.TextBox groupTextBox;
|
||||
private System.Windows.Forms.Label groupLabel;
|
||||
private System.Windows.Forms.TextBox rfidPortNrTextBox;
|
||||
private System.Windows.Forms.Label rfidSerialPortNrLabel;
|
||||
private System.Windows.Forms.RadioButton radioButton1;
|
||||
private System.Windows.Forms.RadioButton radioButton2;
|
||||
private System.Windows.Forms.GroupBox optoDataGroupBox;
|
||||
private System.Windows.Forms.Label tcpipPortLabel;
|
||||
private System.Windows.Forms.TextBox tcpipPortTextBox;
|
||||
private System.Windows.Forms.Label ipAddressLabel;
|
||||
private System.Windows.Forms.TextBox ipAddressTextBox;
|
||||
private System.Windows.Forms.RadioButton radioButton1;
|
||||
private System.Windows.Forms.RadioButton radioButton2;
|
||||
private System.Windows.Forms.Label optoSerialPortLabel;
|
||||
private System.Windows.Forms.TextBox optoSerialPortTextBox;
|
||||
private System.Windows.Forms.TextBox groupTextBox;
|
||||
private System.Windows.Forms.Label groupLabel;
|
||||
private System.Windows.Forms.TextBox muxBoardNrTextBox;
|
||||
private System.Windows.Forms.Label muxBoardNrLabel;
|
||||
private System.Windows.Forms.TextBox nameTextBox;
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
private System.Windows.Forms.TabPage tabPage2;
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
private System.Windows.Forms.TextBox headPortNrTextBox;
|
||||
private System.Windows.Forms.Label label2;
|
||||
}
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label4;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2023 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2015-2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.IO;
|
||||
@@ -16,30 +16,35 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(ProcParams) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public int WMType_ID;
|
||||
public MeterType MeterType;
|
||||
public MeterType MeterType;
|
||||
public float CalibTarget; /// Target error after calibration in [%]
|
||||
public float CalibTargetQ2; /// Target error at Q2 after Q2 correction in [%]
|
||||
public int FactorLimitLo; /// Lower limit for the calibration factor
|
||||
public int FactorLimitHi; /// Upper limit for the calibration factor
|
||||
public Counting Counting; /// Initial iPerl counting (Artbitrary, Positive or Negative)
|
||||
public int WMType_ID; /// Required for Oracle DB: ID_WZTyp in table VT_PRUEFPUNKT_SOLL_SD
|
||||
|
||||
|
||||
public override void InitializeAll()
|
||||
{
|
||||
MeterType = MeterType.AutoDetect;
|
||||
CalibTarget = 0;
|
||||
CalibTargetQ2 = 0;
|
||||
FactorLimitLo = 1000;
|
||||
FactorLimitHi = 8000;
|
||||
Counting = Counting.Arbitrary;
|
||||
WMType_ID = 2; /// Value for iPerl DN15
|
||||
}
|
||||
|
||||
string[] paramNames = new string[]
|
||||
{
|
||||
"iPerl type",
|
||||
"Calib. target [%]",
|
||||
"Calib. target at Q2 [%]",
|
||||
"Calib. factor Lo",
|
||||
"Calib. factor Hi",
|
||||
"Counting",
|
||||
"WM type ID",
|
||||
};
|
||||
public override string ParamName(int i) { return paramNames[i]; }
|
||||
public override int ParamsCount() { return paramNames.Length; }
|
||||
@@ -67,9 +72,11 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
{
|
||||
case 0: return MeterType.ToString();
|
||||
case 1: return CalibTarget.ToString();
|
||||
case 2: return FactorLimitLo.ToString();
|
||||
case 3: return FactorLimitHi.ToString();
|
||||
case 4: return Counting.ToString();
|
||||
case 2: return CalibTargetQ2.ToString();
|
||||
case 3: return FactorLimitLo.ToString();
|
||||
case 4: return FactorLimitHi.ToString();
|
||||
case 5: return Counting.ToString();
|
||||
case 6: return WMType_ID.ToString();
|
||||
default: return string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -85,14 +92,16 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
}
|
||||
break;
|
||||
case 1: CalibTarget = Utils.ParseSFloat(strValue); return CfgUpdateFlags.None;
|
||||
case 2: FactorLimitLo = int.Parse(strValue); return CfgUpdateFlags.None;
|
||||
case 3: FactorLimitHi = int.Parse(strValue); return CfgUpdateFlags.None;
|
||||
case 4:
|
||||
case 2: CalibTargetQ2 = Utils.ParseSFloat(strValue); return CfgUpdateFlags.None;
|
||||
case 3: FactorLimitLo = int.Parse(strValue); return CfgUpdateFlags.None;
|
||||
case 4: FactorLimitHi = int.Parse(strValue); return CfgUpdateFlags.None;
|
||||
case 5:
|
||||
for (Counting c = 0; c < Counting.Count; c++)
|
||||
{
|
||||
if (c.ToString().Equals(strValue)) { Counting = c; return CfgUpdateFlags.None; }
|
||||
}
|
||||
break;
|
||||
case 6: WMType_ID = int.Parse(strValue); return CfgUpdateFlags.None;
|
||||
default: return CfgUpdateFlags.None;
|
||||
}
|
||||
|
||||
@@ -112,14 +121,18 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
for (MeterType mt = 0; mt < MeterType.Count; mt++) if (mt.ToString().Equals(strValue)) return true;
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
if (Utils.TryParseSFloat(strValue, out fDummy) && fDummy >= -10.0f && fDummy <= 10.0f) return true;
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
if (int.TryParse(strValue, out iDummy) && iDummy >= 1000 && iDummy <= 8000) return true;
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
for (Counting c = 0; c < Counting.Count; c++) if (c.ToString().Equals(strValue)) return true;
|
||||
break;
|
||||
case 6: /// WMType_ID
|
||||
if (int.TryParse(strValue, out iDummy)) return true;
|
||||
break;
|
||||
default:
|
||||
message = "Invalid index";
|
||||
@@ -134,9 +147,11 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
{
|
||||
prms.MeterType = this.MeterType;
|
||||
prms.CalibTarget = this.CalibTarget;
|
||||
prms.CalibTargetQ2 = this.CalibTargetQ2;
|
||||
prms.FactorLimitLo = this.FactorLimitLo;
|
||||
prms.FactorLimitHi = this.FactorLimitHi;
|
||||
prms.Counting = this.Counting;
|
||||
prms.WMType_ID = this.WMType_ID;
|
||||
}
|
||||
|
||||
public IParamsProvider Clone()
|
||||
|
||||
@@ -42,6 +42,8 @@ namespace TBF.Rig.Uni.Diverter
|
||||
public string CertPath { get; set; }
|
||||
public DateTime CalibDate { get; set; }
|
||||
public DateTime CalibValidDate { get; set; }
|
||||
public string MeterSerialNo { get; set; }
|
||||
public string MeterType { get; set; }
|
||||
|
||||
/// Schematic drawing info
|
||||
public Shape Shape { get; set; }
|
||||
|
||||
@@ -10,7 +10,6 @@ using SchematicDrawing;
|
||||
using TBF.Rig.ControlBoard.Uni;
|
||||
using TBF.Boxes;
|
||||
using TBF.Resources;
|
||||
using AppDiagnostic;
|
||||
|
||||
namespace TBF.Rig.Uni.FlowMeter
|
||||
{
|
||||
|
||||
@@ -91,6 +91,19 @@ namespace TBF.Rig.Uni.FlowMeter
|
||||
public DateTime CalibValidDate3;
|
||||
public DateTime CalibValidDate4;
|
||||
public DateTime CalibValidDate5;
|
||||
|
||||
public string CalibType;
|
||||
public string CalibType1;
|
||||
public string CalibType2;
|
||||
public string CalibType3;
|
||||
public string CalibType4;
|
||||
public string CalibType5;
|
||||
public string CalibSerialNo;
|
||||
public string CalibSerialNo1;
|
||||
public string CalibSerialNo2;
|
||||
public string CalibSerialNo3;
|
||||
public string CalibSerialNo4;
|
||||
public string CalibSerialNo5;
|
||||
|
||||
/// Schematic drawing info
|
||||
public Shape Shape { get; set; }
|
||||
@@ -201,6 +214,34 @@ namespace TBF.Rig.Uni.FlowMeter
|
||||
}
|
||||
}
|
||||
|
||||
public string GetMeterType(int rangeIx1)
|
||||
{
|
||||
switch (rangeIx1)
|
||||
{
|
||||
default:
|
||||
case 0: return CalibType;
|
||||
case 1: return CalibType1;
|
||||
case 2: return CalibType2;
|
||||
case 3: return CalibType3;
|
||||
case 4: return CalibType4;
|
||||
case 5: return CalibType5;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetMeterType(int rangeIx1, string type)
|
||||
{
|
||||
switch (rangeIx1)
|
||||
{
|
||||
default:
|
||||
case 0: CalibType = type; return;
|
||||
case 1: CalibType1 = type; return;
|
||||
case 2: CalibType2 = type; return;
|
||||
case 3: CalibType3 = type; return;
|
||||
case 4: CalibType4 = type; return;
|
||||
case 5: CalibType5 = type; return;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetCalibCertificate(int rangeIx1, string certificate)
|
||||
{
|
||||
switch (rangeIx1)
|
||||
@@ -285,6 +326,34 @@ namespace TBF.Rig.Uni.FlowMeter
|
||||
}
|
||||
}
|
||||
|
||||
public string GetMeterSerialNo(int rangeIx1)
|
||||
{
|
||||
switch (rangeIx1)
|
||||
{
|
||||
default:
|
||||
case 0: return CalibSerialNo;
|
||||
case 1: return CalibSerialNo1;
|
||||
case 2: return CalibSerialNo2;
|
||||
case 3: return CalibSerialNo3;
|
||||
case 4: return CalibSerialNo4;
|
||||
case 5: return CalibSerialNo5;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetMeterSerialNo(int rangeIx1, string type)
|
||||
{
|
||||
switch (rangeIx1)
|
||||
{
|
||||
default:
|
||||
case 0: CalibSerialNo = type; return;
|
||||
case 1: CalibSerialNo1 = type; return;
|
||||
case 2: CalibSerialNo2 = type; return;
|
||||
case 3: CalibSerialNo3 = type; return;
|
||||
case 4: CalibSerialNo4 = type; return;
|
||||
case 5: CalibSerialNo5 = type; return;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetCalibValidDate(int rangeIx1, DateTime calibValidDate)
|
||||
{
|
||||
switch (rangeIx1)
|
||||
@@ -415,7 +484,7 @@ namespace TBF.Rig.Uni.FlowMeter
|
||||
case 0:
|
||||
return new string[] { "1", "2", "3", "4", "5", "6", "7" };
|
||||
case 4:
|
||||
return new string[] { "m3/h", "l/h", "gal/m" };
|
||||
return new string[] { "m3/h", "l/h" };
|
||||
case 5:
|
||||
return new string[] { "°C", "°F", "K" };
|
||||
case 6:
|
||||
@@ -488,8 +557,7 @@ namespace TBF.Rig.Uni.FlowMeter
|
||||
case 1: NominalFlow = TBF.Utils.ParseUDouble(str); return CfgUpdateFlags.RestartRqrd;
|
||||
case 2: NominalFreq = TBF.Utils.ParseUDouble(str); return CfgUpdateFlags.RestartRqrd;
|
||||
case 3: MsrdFormat = str; return CfgUpdateFlags.RestartRqrd;
|
||||
//case 4: MsrdUnit = (str == "l/h") ? Unit.lph : Unit.m3ph; return CfgUpdateFlags.RestartRqrd;
|
||||
case 4: MsrdUnit = ParseFlowUnit(str); return CfgUpdateFlags.RestartRqrd;
|
||||
case 4: MsrdUnit = (str == "l/h") ? Unit.lph : Unit.m3ph; return CfgUpdateFlags.RestartRqrd;
|
||||
case 5: TempUnit.ToDescription(); return CfgUpdateFlags.RestartRqrd;
|
||||
case 6: PressureUnit.ToDescription(); return CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
@@ -639,15 +707,5 @@ namespace TBF.Rig.Uni.FlowMeter
|
||||
{
|
||||
return true; /// =OK, do nothing
|
||||
}
|
||||
public static Unit ParseFlowUnit(string str)
|
||||
{
|
||||
switch (str)
|
||||
{
|
||||
case "l/h": return Unit.lph;
|
||||
case "gal/m": return Unit.USgalpm;
|
||||
case "m3/h":
|
||||
default: return Unit.m3ph;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace TBF.Rig.Uni.FlowMetersInParallel
|
||||
fmtrs.Add("---");
|
||||
return fmtrs;
|
||||
case 5:
|
||||
return new string[] { "m3/h", "l/h", "gal/m" };
|
||||
return new string[] { "m3/h", "l/h" };
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
@@ -148,8 +148,7 @@ namespace TBF.Rig.Uni.FlowMetersInParallel
|
||||
case 2: Flowmeter3 = (str != "---") ? str : string.Empty; return CfgUpdateFlags.RestartRqrd;
|
||||
case 3: InactiveFlowmtr = (str != "---") ? str : string.Empty; return CfgUpdateFlags.RestartRqrd;
|
||||
case 4: MsrdFormat = str; return CfgUpdateFlags.RestartRqrd;
|
||||
//case 5: MsrdUnit = (str == "l/h") ? Unit.lph : Unit.m3ph; return CfgUpdateFlags.RestartRqrd;
|
||||
case 5: MsrdUnit = ParseFlowUnit(str); return CfgUpdateFlags.RestartRqrd;
|
||||
case 5: MsrdUnit = (str == "l/h") ? Unit.lph : Unit.m3ph; return CfgUpdateFlags.RestartRqrd;
|
||||
default:
|
||||
return CfgUpdateFlags.None;
|
||||
}
|
||||
@@ -200,15 +199,5 @@ namespace TBF.Rig.Uni.FlowMetersInParallel
|
||||
{
|
||||
return true; /// =OK, do nothing
|
||||
}
|
||||
public static Unit ParseFlowUnit(string str)
|
||||
{
|
||||
switch (str)
|
||||
{
|
||||
case "l/h": return Unit.lph;
|
||||
case "gal/m": return Unit.USgalpm;
|
||||
case "m3/h":
|
||||
default: return Unit.m3ph;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
///
|
||||
/// Copyright (c) 2021 Sensus Metering Systems
|
||||
/// Copyright (c) 2021-2023 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using TBF.Rig.ControlBoard.Uni;
|
||||
using TBF.Rig.GenericDevices;
|
||||
|
||||
namespace TBF.Rig.Uni.RegValve
|
||||
@@ -13,12 +14,12 @@ namespace TBF.Rig.Uni.RegValve
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(ChangeRegValvePositionOp));
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("ChangeRegValvePositionOp({0},{1}s)", regulValve.Name, timePulseSec.ToString("F2"));
|
||||
return string.Format("ChangeRegValvePositionOp({0},{1}s)", regV.Name, timePulseSec.ToString("F2"));
|
||||
}
|
||||
|
||||
/// Set by the constructor
|
||||
readonly TBF.Rig.ControlBoard.Uni.UniCB controlBoard;
|
||||
readonly RegValve regulValve;
|
||||
readonly UniCB uniCB;
|
||||
readonly RegValve regV;
|
||||
readonly int regulValveNr;
|
||||
readonly double timePulseSec;
|
||||
|
||||
@@ -32,14 +33,14 @@ namespace TBF.Rig.Uni.RegValve
|
||||
/// <param name="posHiPct">Upper limit of the position to be achieved</param>
|
||||
/// <param name="timeout">Timeout in sec. for setting the flow</param>
|
||||
/// <remarks>Only Elde.Valve flow are used, other flow on the lists are ignored</remarks>
|
||||
public ChangeRegValvePositionOp(TBF.Rig.ControlBoard.IControlBoard cb, RegValve rv, double timePulseSec)
|
||||
public ChangeRegValvePositionOp(UniCB uniCB, RegValve regV, double timePulseSec)
|
||||
{
|
||||
controlBoard = cb as TBF.Rig.ControlBoard.Uni.UniCB;
|
||||
if (controlBoard == null) throw new ArgumentNullException("ctrlBoard");
|
||||
this.uniCB = uniCB;
|
||||
if (this.uniCB == null) throw new ArgumentNullException("ctrlBoard");
|
||||
|
||||
regulValve = rv as RegValve;
|
||||
if (regulValve == null) throw new ArgumentNullException("regValve is null or not Elde");
|
||||
regulValveNr = this.regulValve.Idx1;
|
||||
this.regV = regV as RegValve;
|
||||
if (this.regV == null) throw new ArgumentNullException("regValve is null or not Uni");
|
||||
regulValveNr = this.regV.Idx1;
|
||||
|
||||
this.timePulseSec = timePulseSec;
|
||||
|
||||
@@ -49,13 +50,7 @@ namespace TBF.Rig.Uni.RegValve
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
//double positionPct = controlBoard.RValvePosition(regulValveNr);
|
||||
//log.WarnFormat("RV#={0}, actPos={1}%", regulValveNr, positionPct.ToString("F1"));
|
||||
|
||||
//controlBoard.ValveMove(regulValveNr,
|
||||
// TBF.Rig.ControlBoard.Legacy.RegulValveMode.PulseWidth,
|
||||
// new double[2] { timePulseSec, timePulseSec },
|
||||
// regulValve.StableTime);
|
||||
uniCB.RegVlvIncrMove(false, regulValveNr, timePulseSec);
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
@@ -64,9 +59,6 @@ namespace TBF.Rig.Uni.RegValve
|
||||
/// </returns>
|
||||
public Event Run()
|
||||
{
|
||||
//float positionPct = controlBoard.RValvePosition(regulValveNr);
|
||||
//log.WarnFormat("RV#={0}, actPos={1}%", regulValveNr, positionPct.ToString("F1"));
|
||||
|
||||
return Event.PositionReached;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2021 Sensus Metering Systems
|
||||
/// Copyright (c) 2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user