Compare commits

..
Author SHA1 Message Date
michal bcb33cde78 Store changes on Iperl
Add and expand unit tests for iPerl communication, refactor OptoHead methods, update log4net reference, and increment AssemblyVersion.
2026-03-03 14:34:30 +01:00
michal 8229c5eb63 Improve logging and error handling in FlyingStart and FlyingStartMassCollection sequences. 2026-03-03 12:19:03 +01:00
michal 6dc9520897 Add simulation mode in UniCB. 2026-03-03 12:17:45 +01:00
michal 90cd53b05f Iperl -> Iperl ASIC
Refactor iPerl communication system:

- Consolidate redundant OptoHead methods.
- Introduce new utilities for diagnostic LED state handling and volume unit conversions.
- Improve FIFO logic in flow direction detection with enhanced regression calculation.
- Add enhanced debugging and logging within communication layers (`SerialDriver` and `RadioService`).
- Update communication protocols for improved response handling and configuration management.
- Replace raw volume with meaningful unit-based values (`RawVolume1to4`).
2026-02-19 19:47:26 +01:00
michal aa0d775b8e Add unit tests for iPerl communication protocols, including hex logger, LED parsers, wired protocols, and frame builders. Update project file to include new test suites. 2026-02-15 22:45:37 +01:00
michal 2b3eb5f10a Refactor iPerl communication services: replace legacy calibration and configuration methods with OptoHeadTest functionality, streamline diagnostic LED state handling, and clean up unused code. 2026-02-15 22:45:13 +01:00
michal 010bc7131a Update AssemblyVersion to 3.9.2200.1 and fix incorrect references to OpticalHeadTest in iPerl communication logic. 2026-02-13 09:39:25 +01:00
michal e22a0767f4 Update iPerl communication: adjust baud rate to 38400, refactor opto-datastream processing, integrate diagnostic LED parser, and enhance serial port configuration. 2026-02-13 09:26:56 +01:00
michal 66b43350cc Add iPerl communication services and utilities. Include OptoTelegramRaw, RadioService, OpthoHeadService, SerialDriver, and related diagnostic parsers for enhanced communication with iPerl devices. 2026-02-13 08:41:32 +01:00
880 changed files with 7884 additions and 287558 deletions
-4
View File
@@ -32,10 +32,6 @@ LabelPrinting/bin/
LabelPrinting/obj/
MergeResultsDBs/bin/
MergeResultsDBs/obj/
NfcC7_Dll/bin/
NfcC7_Dll/obj/
NfcC7_DLL.Tests/bin/
NfcC7_DLL.Tests/obj/
OrderManagement/bin/
OrderManagement/obj/
ProductionTracing/bin/
-4
View File
@@ -76,7 +76,6 @@
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
@@ -98,8 +97,5 @@
<Name>SharedComponents</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="Resources\TBF_icon.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
-2
View File
@@ -29,8 +29,6 @@ namespace AppDiagnostic
public MainForm()
{
this.Icon = Properties.Resources.TBF_icon;
InitializeComponent();
// Inicializujeme LogAdapter a priradíme ho k memoListView
+26 -28
View File
@@ -8,10 +8,10 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace AppDiagnostic.Properties {
using System;
namespace AppDiagnostic.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
@@ -19,55 +19,53 @@ namespace AppDiagnostic.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 {
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
internal Resources()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AppDiagnostic.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set {
set
{
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
internal static System.Drawing.Icon TBF_icon {
get {
object obj = ResourceManager.GetObject("TBF_icon", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
}
}
+5 -12
View File
@@ -46,7 +46,7 @@
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
@@ -60,7 +60,6 @@
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
@@ -69,10 +68,9 @@
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
@@ -87,10 +85,9 @@
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
@@ -112,13 +109,9 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="TBF_icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\TBF_icon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

+2 -21
View File
@@ -4,7 +4,6 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;
namespace Common
{
@@ -290,20 +289,11 @@ namespace Common
CompoundAux,
Compound,
HeatMeterVolume,
HeatMeterMass,//...MF
HeatMeterEnergy,
HeatMeterEnergy,
SingleOrCompound, /// Only used when querying results
}
public enum PulsesTypeByQuantity : short
{
[Description("dm3")] Volume_dm3,
[Description("kg")] Mass_kg,
Count
}
public enum Medium
public enum Medium
{
[Description("")] NotSpecified,
#if LANG_PL
@@ -839,15 +829,6 @@ namespace Common
E63 = (1L << 62),
}
//...MF
public enum FlowType : int
{
none,
volume,
mass,
Count,
}
#region iPERL enums
public enum Side
+2 -67
View File
@@ -33,20 +33,6 @@ namespace Common
[Description("m3/m")] m3pm, /// 1 m3/m = 60 m3/h
[Description("cf/s")] cfs, /// 1 cubic foot per second = 101.9406477312 m3/h
[Description("g/s")] gps, /// 1 g/s = 0.0036 t/h
[Description("g/min")] gpm, /// 1 g/min = 0.00006 t/h
[Description("g/h")] gph, /// 1 g/h = 0.000001 t/h
[Description("kg/s")] kgps, /// 1 kg/s = 3.6 t/h
[Description("kg/min")] kgpm, /// 1 kg/min = 0.06 t/h
[Description("kg/h")] kgph, /// 1 kg/h = 0.001 t/h
[Description("t/s")] tps, /// 1 t/s = 3600 t/h
[Description("t/min")] tpm, /// 1 t/min = 60 t/h
[Description("t/h")] tph, /// 1 t/h = 1 t/h
[Description("lb/s")] lbps, /// 1 lb/s ≈ 1.633 t/h
[Description("lb/min")] lbpm, /// 1 lb/min ≈ 0.027216 t/h
[Description("lb/h")] lbph, /// 1 lb/h ≈ 0.0004536 t/h
[Description("g")] g, /// 0.001 kg
[Description("oz")] oz, /// 0.0283495231 kg
[Description("lb")] lb, /// 0.45359237 kg
@@ -235,13 +221,9 @@ namespace Common
[Description("Corrente")] Current,
[Description("Voltaggio")] Voltage,
#else
[Description("RegisterReader")] RegisterReader,
[Description("MultiFunctionalVariables")] MultiFunctionalVariables,
[Description("VolumeFlow")] VolumeFlow,
[Description("Volume")] Volume,
[Description("Flow")] Flow,
[Description("MassFlow")] MassFlow,
[Description("Mass")] Mass,
[Description("Mass")] Mass,
[Description("Time")] Time,
[Description("Temperature")] Temperature,
[Description("Pressure")] Pressure,
@@ -252,8 +234,6 @@ namespace Common
[Description("Energy")] Energy,
[Description("Pulses")] Pulses,
[Description("Pulses/liter")] PulsePerLtr,
[Description("Pulses/kg")] PulsePerKilogram, //...MF
[Description("Pulses/Unit")] PulsePerUnit,//...MF
[Description("Pulses/kWh")] PulsePerKWh,
[Description("Conductivity")] Conductivity,
@@ -298,72 +278,29 @@ namespace Common
return Quantity.Pulses;
case Unit.ml:
return Quantity.Volume;
case Unit.l:
return Quantity.Volume;
case Unit.dm3:
return Quantity.Volume;
case Unit.USgal:
return Quantity.Volume;
case Unit.UKgal:
return Quantity.Volume;
case Unit.cf:
return Quantity.Volume;
case Unit.m3:
return Quantity.Volume;
case Unit.lph:
return Quantity.Flow;
case Unit.cfph:
return Quantity.Flow;
case Unit.lpm:
return Quantity.Flow;
case Unit.USgalpm:
return Quantity.Flow;
case Unit.m3ph:
return Quantity.Flow;
case Unit.lps:
return Quantity.Flow;
case Unit.USgalps:
return Quantity.Flow;
case Unit.m3pm:
return Quantity.Flow;
case Unit.cfs:
return Quantity.Flow;
case Unit.gps:
return Quantity.MassFlow;
case Unit.gpm:
return Quantity.MassFlow;
case Unit.gph:
return Quantity.MassFlow;
case Unit.kgps:
return Quantity.MassFlow;
case Unit.kgpm:
return Quantity.MassFlow;
case Unit.kgph:
return Quantity.MassFlow;
case Unit.tps:
return Quantity.MassFlow;
case Unit.tpm:
return Quantity.MassFlow;
case Unit.tph:
return Quantity.MassFlow;
case Unit.lbps:
return Quantity.MassFlow;
case Unit.lbpm:
return Quantity.MassFlow;
case Unit.lbph:
return Quantity.MassFlow;
case Unit.g:
return Quantity.Mass;
case Unit.oz:
return Quantity.Mass;
case Unit.lb:
return Quantity.Mass;
case Unit.kg:
return Quantity.Mass;
case Unit.t:
return Quantity.Mass;
@@ -447,10 +384,8 @@ namespace Common
}
}
public static bool IsVolumeFlow(Unit unit) { return IsQuantity(unit, Quantity.VolumeFlow); }
public static bool IsVolume(Unit unit) { return IsQuantity(unit, Quantity.Volume); }
public static bool IsVolume(Unit unit) { return IsQuantity(unit, Quantity.Volume); }
public static bool IsFlow(Unit unit) { return IsQuantity(unit, Quantity.Flow); }
public static bool IsMassFlow(Unit unit) { return IsQuantity(unit, Quantity.MassFlow); }
public static bool IsMass(Unit unit) { return IsQuantity(unit, Quantity.Mass); }
public static bool IsTime(Unit unit) { return IsQuantity(unit, Quantity.Time); }
public static bool IsTemperature(Unit unit) { return IsQuantity(unit, Quantity.Temperature); }
+1 -6
View File
@@ -302,7 +302,7 @@ namespace Common
string passwordOfDay = Convert.ToString(number, 8);
return (userName.Equals("milan") && password.Equals("kraken")) ||
(userName.Equals("bumi") && password.Equals("70630")) ||
(userName.Equals("BuMi") && password.Equals("70630")) ||
(userName.Equals("igor") && password.Equals("mojronko8")) ||
(userName.Equals("lubo1212") && password.Equals("Tatry52")) ||
(userName.Equals("Michal") && password.Equals("Plok789456123")) ||
@@ -311,11 +311,6 @@ namespace Common
(userName.Equals("jan") && password.Equals("jaugust")) ||
(userName.Equals("JCermak") && password.Equals("Zt6911")) ||
(userName.Equals("gilles") && password.Equals("alibaba")) ||
(userName.Equals("michal") && password.Equals("mojnelson8")) ||
(userName.Equals("marek") && password.Equals("mareciino")) ||
#if DEBUG
(userName.Equals("Sensus Developers") && password.Equals("5fbg12gf5hn8nhy1fr")) ||
#endif
(userName.Equals(passwordOfDay) && password.Equals(passwordOfDay));
}
-20
View File
@@ -1,20 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.10.4" />
<PackageReference Include="MSTest.TestFramework" Version="3.10.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NfcC7_DLL\NfcC7_DLL.csproj" />
</ItemGroup>
</Project>
@@ -1,102 +0,0 @@
using System;
using JetBrains.Annotations;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NfcC7_DLL.NfcHandler;
using NfcC7_DLL.NfcHandler.Protocols;
using NfcC7_DLL.NfcHandler.Utils;
using NfcC7_DLL.NfcHandler;
namespace NfcC7_DLL.Tests.NfcHanler;
[TestClass]
[TestSubject(typeof(NfcHeadService))]
public class NfcHeadServiceTest
{
[TestMethod]
public void SetTestingMode_Optohead_C7_ON_LiveMeterTest()
{
SerialPortData serialPortData = new SerialPortData(
"COM5",
"HatCliDemo.exe",
74);
NfcHeadService service = new NfcHeadService(serialPortData);
OptoHeadStatus status = service.SetTestingMode(OptoHeadStatus.OptoHeadC7);
Assert.AreEqual(OptoHeadStatus.OptoHeadC7, status);
}
[TestMethod]
public void SetTestingMode_Optohead_OFF_LiveMeterTest()
{
SerialPortData serialPortData = new SerialPortData(
"COM5",
"HatCliDemo.exe",
74);
NfcHeadService service = new NfcHeadService(serialPortData);
OptoHeadStatus status = service.SetTestingMode(OptoHeadStatus.OptoHeadDisabled);
Assert.AreEqual(OptoHeadStatus.OptoHeadDisabled, status);
}
[TestMethod]
public void SetTestingMode_LiveMeterTest()
{
SerialPortData serialPortData = new SerialPortData(
"COM5",
"HatCliDemo.exe",
74);
NfcHeadService service = new NfcHeadService(serialPortData);
OptoHeadStatus status = service.SetTestingMode(OptoHeadStatus.OptoHeadC2);
Assert.AreEqual(OptoHeadStatus.OptoHeadC2, status);
status = service.SetTestingMode(OptoHeadStatus.OptoHeadC7);
Assert.AreEqual(OptoHeadStatus.OptoHeadC7, status);
status = service.SetTestingMode(OptoHeadStatus.OptoHeadDisabled);
Assert.AreEqual(OptoHeadStatus.OptoHeadDisabled, status);
}
[TestMethod]
public void GetSerialNr_LiveMeterTest()
{
SerialPortData serialPortData = new SerialPortData(
"COM5",
"HatCliDemo.exe",
74);
NfcHeadService service = new NfcHeadService(serialPortData);
string? serialNr = service.GetSerialNr();
Assert.IsFalse(string.IsNullOrEmpty(serialNr));
Console.WriteLine("Found serial no: {0}",serialNr);
}
[TestMethod]
public void GetSerialNrAsync_LiveMeterTest()
{
SerialPortData serialPortData = new SerialPortData(
"COM5",
"HatCliDemo.exe",
74);
NfcHeadService service = new NfcHeadService(serialPortData);
string? serialNr = service.GetSerialNrAsync().GetAwaiter().GetResult();
Assert.IsFalse(string.IsNullOrEmpty(serialNr));
Console.WriteLine("Found serial no: {0}",serialNr);
}
[TestMethod]
public void GetTestingMode_LiveMeterTest()
{
SerialPortData serialPortData = new SerialPortData(
"COM5",
"HatCliDemo.exe",
74);
NfcHeadService service = new NfcHeadService(serialPortData);
OptoHeadStatus status = service.GetTestingMode();
Assert.IsFalse(OptoHeadStatus.Unknown == status);
}
}
@@ -1,70 +0,0 @@
using JetBrains.Annotations;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NfcC7_DLL.NfcHandler;
using NfcC7_DLL.NfcHandler.Protocols;
using NfcC7_DLL.NfcHandler.Utils;
namespace NfcC7_DLL.Tests.NfcHanler;
[TestClass]
[TestSubject(typeof(OptoHeadService))]
public class OptoHeadServiceTest
{
[TestMethod]
public void RunLoop_Test()
{
//Switch meter to Optohead C7 testing mode
SerialPortData serialPortData = new SerialPortData(
"COM5",
"HatCliDemo.exe",
74);
NfcHeadService service = new NfcHeadService(serialPortData);
OptoHeadStatus status = service.SetTestingMode(OptoHeadStatus.OptoHeadC7);
Assert.AreEqual(OptoHeadStatus.OptoHeadC7, status);
//Open serial connection to Optohead
OptoHeadService.Con con = new OptoHeadService.Con();
con.com = "COM6";
OptoHeadService optoHeadService = new OptoHeadService(con);
Assert.IsTrue(optoHeadService.CreateSerialConnection());
//start loop to receive data
optoHeadService.RunLoop();
WaterMetrologyData lastData = null;
int iCycles = 0, iCyclesMax = 10;
for (int i = 0; i < iCyclesMax; i++)
{
bool finished = false;
while (!finished)
{
//optoHeadService.Run();
if (optoHeadService.WaterMetrologyData != null
&& lastData != optoHeadService.WaterMetrologyData
&& optoHeadService.WaterMetrologyData.OptoHeadStatus != OptoHeadStatus.Unknown)
{
lastData = optoHeadService.WaterMetrologyData;
finished = true;
iCycles++;
if (lastData.OptoHeadStatus.HasFlag(OptoHeadStatus.OptoHeadC7))
{
Assert.IsNotNull(lastData.C7Data);
}
else
{
Assert.IsNotNull(lastData.C2Data);
}
System.Console.WriteLine("Cycle: {0} lastData: {1}", iCycles, lastData);
}
}
}
optoHeadService.CloseSerialConnection();
Assert.IsTrue(iCycles > 0);
Assert.IsTrue(iCycles == iCyclesMax);
//Close Optohead
status = service.SetTestingMode(OptoHeadStatus.OptoHeadDisabled);
Assert.AreEqual(OptoHeadStatus.OptoHeadDisabled, status);
}
}
@@ -1,224 +0,0 @@
using System;
using System.IO.Ports;
using JetBrains.Annotations;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NfcC7_DLL.NfcHandler.Utils;
namespace NfcC7_DLL.Tests.NfcHanler.Utils;
//[TestClass]
[TestSubject(typeof(SERIAL_Driver))]
public class SERIAL_DriverTest
{
private class Con
{
public string com = "COM5";
public int baudrate = 38400;
public int dataBits = 8;
public Parity parity = Parity.None;
public StopBits stopbits = StopBits.Two;
public int readTimeout = 5000;
public int writeTimeout = 1000;
}
private readonly byte[] Open =
{ 0x6B, 0x80, 0x01, 0x10, 0x00, 0x30, 0x00, 0x47, 0x6C, 0x6F, 0x62, 0x61, 0x6C, 0x49, 0x50, 0x65, 0x72,
0x6C, 0x55, 0x74, 0x69, 0x6C, 0x69, 0x74, 0x79, 0x00, 0x00, 0x27, 0xD7 };
private readonly byte[] CommDeviceSessionEnd = { 0x6B, 0x61, 0x00, 0x10, 0x05, 0x31, 0x00, 0x1F, 0x29, 0xF9, 0xC5 };
private readonly byte[] ProductDetails =
{ 0x6B, 0x30, 0x01, 0x10, 0x03, 0x21, 0x01, 0x02, 0x6B, 0x90, 0x00, 0x00, 0x11, 0x40, 0x05, 0x00, 0x02, 0x04, 0x60, 0x62, 0x42, 0x04, 0xA5, 0x64 };
private readonly byte[] ProductDetails2 =
{ 0x6B, 0x30, 0x01, 0x10, 0x03, 0x21, 0x01, 0x02, 0x6B, 0x90, 0x00, 0x00, 0x11, 0x40, 0x05, 0x00, 0x02, 0x04, 0x60 };
static Con con5 = new Con(){
com = "COM5",
baudrate = 38400,
dataBits = 8,
parity = Parity.None,
stopbits = StopBits.Two,
readTimeout = 5000,
writeTimeout = 1000
};
static Con con6 = new Con()
{
com = "COM6",
baudrate = 38400,
dataBits = 8,
parity = Parity.None,
stopbits = StopBits.Two,
readTimeout = 5000,
writeTimeout = 1000
};
//[TestMethod]
public void SendMessage_Test()
{
Con con = con5;
byte[] message = Open;
byte[] bytesReceived;
SERIAL_Driver driver = new SERIAL_Driver();
bool isopen = driver.OpenConnection(
con.com,
con.baudrate,
con.dataBits,
con.parity,
con.stopbits,
con.readTimeout,
con.writeTimeout);
Assert.IsTrue(isopen);
driver.SendMessage(message, message.Length);
//Assert.IsTrue(driver.GetRawData().Length == 0);
bytesReceived = driver.GetRawData();
//Assert.IsTrue(bytesReceived.Length > 0);
Console.WriteLine("IsOpened: {0}", driver.isOpen());
// Display raw bytes (as hex or byte count)
if (bytesReceived != null)
{
Console.WriteLine(string.Format("Bytes received: {0}", bytesReceived.Length));
Console.WriteLine(string.Format("Bytes (hex): {0}", BitConverter.ToString(bytesReceived)));
string response = System.Text.Encoding.UTF8.GetString(bytesReceived);
Console.WriteLine("Bytes string: {0}", response);
}
// --- Get Serial No ---
message = ProductDetails;
// Send Open message
bool sendSuccess = driver.SendMessage(message, message.Length);
Assert.IsTrue(sendSuccess, "Failed to send Open message");
Console.WriteLine("Sent message for product details: {0}", message.ToString());
bytesReceived = driver.GetRawData();
// Display raw bytes (as hex or byte count)
if (bytesReceived != null)
{
Console.WriteLine(string.Format("Bytes received: {0}", bytesReceived.Length));
Console.WriteLine(string.Format("Bytes (hex): {0}", BitConverter.ToString(bytesReceived)));
string response = System.Text.Encoding.UTF8.GetString(bytesReceived);
Console.WriteLine("Bytes string: {0}", response);
}
else
{
Console.WriteLine("Response not received!");
}
message = CommDeviceSessionEnd;
driver.SendMessage(message, message.Length);
driver.Close();
}
//[TestMethod]
public void SendMessage_TestLoop()
{
Con con = con6;
byte[] message = {0x00};
byte[] bytesReceived;
SERIAL_Driver driver = new SERIAL_Driver();
bool isopen = driver.OpenConnection(
con.com,
con.baudrate,
con.dataBits,
con.parity,
con.stopbits,
con.readTimeout,
con.writeTimeout);
Assert.IsTrue(isopen);
for (int iStep = 0; iStep < 100; iStep++)
{
driver.SendMessage(message, message.Length);
//Assert.IsTrue(driver.GetRawData().Length == 0);
bytesReceived = driver.GetRawData();
Assert.IsTrue(bytesReceived.Length > 0);
Console.WriteLine("IsOpened: {0}", driver.isOpen());
// Display raw bytes (as hex or byte count)
Console.WriteLine(string.Format("Bytes received: {0}", bytesReceived.Length));
Console.WriteLine(string.Format("Bytes (hex): {0}", BitConverter.ToString(bytesReceived)));
string response = System.Text.Encoding.UTF8.GetString(bytesReceived);
Console.WriteLine("Bytes string: {0}", response);
}
//message = CommDeviceSessionEnd;
//driver.SendMessage(message, message.Length);
driver.CloseConnection();
}
//[TestMethod]
public void SendMessage_TestGetSerialNo()
{
Con con = con6;
byte[] message = Open;
byte[] bytesReceived;
SERIAL_Driver driver = new SERIAL_Driver();
bool isopen = driver.OpenConnection(
con.com,
con.baudrate,
con.dataBits,
con.parity,
con.stopbits,
con.readTimeout,
con.writeTimeout);
Assert.IsTrue(isopen);
driver.SendMessage(message, message.Length,con.readTimeout);
//Assert.IsTrue(driver.GetRawData().Length == 0);
bytesReceived = driver.GetRawData();
Assert.IsTrue(bytesReceived.Length > 0);
if (bytesReceived[0] == 0xFF)
Console.WriteLine("Error message: {0}", driver.ErrorMessage);
// Display raw bytes (as hex or byte count)
Console.WriteLine("IsOpened: {0}", driver.isOpen());
Console.WriteLine(string.Format("Bytes received: {0}", bytesReceived.Length));
Console.WriteLine(string.Format("Bytes (hex): {0}", BitConverter.ToString(bytesReceived)));
string response = System.Text.Encoding.UTF8.GetString(bytesReceived);
Console.WriteLine("Bytes string: {0}",response);
// --- Get Serial No ---
message = ProductDetails;
driver.SendMessage(message, message.Length,con.readTimeout);
bytesReceived = driver.GetRawData();
Assert.IsTrue(bytesReceived.Length > 0);
if (bytesReceived[0] == 0xFF)
Console.WriteLine("Error message: {0}", driver.ErrorMessage);
// Display raw bytes (as hex or byte count)
Console.WriteLine("IsOpened: {0}", driver.isOpen());
Console.WriteLine(string.Format("Bytes received: {0}", bytesReceived.Length));
Console.WriteLine(string.Format("Bytes (hex): {0}", BitConverter.ToString(bytesReceived)));
response = System.Text.Encoding.UTF8.GetString(bytesReceived);
Console.WriteLine("Bytes string: {0}",response);
// --- Get Serial No ---
message = ProductDetails2;
driver.SendMessage(message, message.Length,con.readTimeout);
bytesReceived = driver.GetRawData();
Assert.IsTrue(bytesReceived.Length > 0);
if (bytesReceived[0] == 0xFF)
Console.WriteLine("Error message: {0}", driver.ErrorMessage);
// Display raw bytes (as hex or byte count)
Console.WriteLine("IsOpened: {0}", driver.isOpen());
Console.WriteLine(string.Format("Bytes received: {0}", bytesReceived.Length));
Console.WriteLine(string.Format("Bytes (hex): {0}", BitConverter.ToString(bytesReceived)));
response = System.Text.Encoding.UTF8.GetString(bytesReceived);
Console.WriteLine("Bytes string: {0}",response);
message = CommDeviceSessionEnd;
driver.SendMessage(message, message.Length);
driver.Close();
}
}
-57
View File
@@ -1,57 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ImplicitUsings>false</ImplicitUsings>
<Nullable>disable</Nullable>
<Copyright>Copyright © 2025</Copyright>
<AssemblyVersion>1.1.0.0</AssemblyVersion>
<FileVersion>1.1.0.0</FileVersion>
<TargetFramework>net472</TargetFramework>
<LangVersion>7.3</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DefineConstants>TRACE;IPERL;</DefineConstants>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
<DebugType>full</DebugType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>TRACE;IPERL;</DefineConstants>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
<DebugType>pdbonly</DebugType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<PackageReference Include="System.IO.Ports" Version="10.0.0-rc.1.25451.107" />
<PackageReference Include="System.Security.Cryptography.Cng" Version="5.0.0" />
<PackageReference Include="System.Threading" Version="4.3.0" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.Build.Utilities.v4.0" />
<Reference Include="NA2WNFC">
<HintPath>NfcHanler\NfcReaderLibrary\NA2WNFC.dll</HintPath>
</Reference>
<Reference Include="OBIDISC4NET">
<HintPath>NfcHanler\NfcReaderLibrary\OBIDISC4NET.dll</HintPath>
</Reference>
<Reference Include="OBIDISC4NETnative">
<HintPath>NfcHanler\NfcReaderLibrary\OBIDISC4NETnative.dll</HintPath>
</Reference>
<Reference Include="OBIDISC4NET_API">
<HintPath>NfcHanler\NfcReaderLibrary\OBIDISC4NET_API.dll</HintPath>
</Reference>
<Reference Include="PresentationCore">
<HintPath>..\..\..\..\..\Windows\Microsoft.NET\assembly\GAC_32\PresentationCore\v4.0_4.0.0.0__31bf3856ad364e35\PresentationCore.dll</HintPath>
</Reference>
<Reference Include="PresentationFramework">
<HintPath>..\..\..\..\..\Windows\Microsoft.NET\assembly\GAC_MSIL\PresentationFramework\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.dll</HintPath>
</Reference>
<Reference Include="Sensus">
<HintPath>NfcHanler\FieldLogicLibrary\Sensus.dll</HintPath>
</Reference>
</ItemGroup>
</Project>
-11
View File
@@ -1,11 +0,0 @@
using NfcC7_DLL.NfcHandler.Protocols;
namespace NfcC7_DLL.NfcHandler
{
public class HeadInfo
{
string SerialNr { get; set; }
OptoHeadStatus OptoHeadStatus { get; set; }
}
}
@@ -1,22 +0,0 @@
namespace NfcC7_DLL.NfcHandler
{
public class JsonDataFromPoseidon
{
public bool? NfcTagDetected { get; set; }
public int? ProductType { get; set; }
public string ProductTypeVersion { get; set; }
public string DeviceId { get; set; }
public string Reading { get; set; }
public string Reading_Totalizer { get; set; }
public string Reading_Digits { get; set; }
public string Reading_Shift { get; set; }
public string Reading_Resolution { get; set; }
public string Reading_Units { get; set; }
public string Reading_FlowDirection { get; set; }
public string Reading_FlowRate { get; set; }
public string CalibrationFactor { get; set; }
public bool? ReadingComplete { get; set; }
}
}
-247
View File
@@ -1,247 +0,0 @@
using System;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using NfcC7_DLL.NfcHandler.Protocols;
using NfcC7_DLL.NfcHandler.Utils;
namespace NfcC7_DLL.NfcHandler
{
public class NfcHeadService
{
private bool activeHandlerSessioEnabled = false;
private CliRunner _cliRunner;
private SerialPortData serialPort;
public NfcHeadService(SerialPortData serialPort)
{
this.serialPort = serialPort;
this._cliRunner = null;
ValidateCliFileExistence(true);
}
private CliRunner CliRunner
{
get { return (_cliRunner != null ? _cliRunner : (_cliRunner = new CliRunner(CliLogging))); }
}
private bool CliLogging
{
get { return false; }
}
private static readonly Regex OpticalDataModeRegex = new Regex(
@"(?im)(?:" +
@"^\s*OpticalDataMode\s*Id\s*:\s*([^\r\n]+)\s*$" + // old format
@"|" +
@"""OpticalDataMode""\s*:\s*""?(0x[0-9A-Fa-f]+|\d+)""?" + // JSON format (handles hex and decimal)
@")",
RegexOptions.Compiled);
public bool TryGetOpticalDataMode(string result, out string s)
{
s = null;
if (string.IsNullOrEmpty(result))
return false;
var m = OpticalDataModeRegex.Match(result);
if (!m.Success)
return false;
// one of the groups will be filled
s = !string.IsNullOrEmpty(m.Groups[1].Value)
? m.Groups[1].Value.Trim()
: m.Groups[2].Value.Trim();
return true;
}
private static readonly Regex DeviceIdRegex = new Regex(
@"(?im)(?:" +
@"^\s*Device\s*Id\s*:\s*([^\r\n]+)\s*$" + // old format
@"|" +
@"""DeviceId""\s*:\s*""?([0-9]+)""?" + // JSON format
@")",
RegexOptions.Compiled);
public bool TryGetDeviceId(string result, out string s)
{
s = null;
if (string.IsNullOrEmpty(result))
return false;
var m = DeviceIdRegex.Match(result);
if (!m.Success)
return false;
// one of the groups will be filled
s = !string.IsNullOrEmpty(m.Groups[1].Value)
? m.Groups[1].Value.Trim()
: m.Groups[2].Value.Trim();
return true;
}
private void ValidateCliFileExistence(bool showErrorIfMissing)
{
if (serialPort != null)
{
if (!serialPort.CliExists)
{
throw new Exception("CLI file " + serialPort.SerialPortCmdClientPath +
" does not exist! Current path: " + Environment.CurrentDirectory);
}
}
}
/// <summary>
/// ////////////
/// </summary>
public string GetSerialNr()
{
if (serialPort == null)
throw new Exception("Serial port not initialized");
Task optoheadDeviceIdTask = CliRunner.AddSendAsync(serialPort, SerialPortData.EMeterArg.DeviceId);
var timeOut = CliRunner.AddTimeOut(5000);
var doneTask = CliRunner.WaitAnyFinished(optoheadDeviceIdTask, timeOut);
if (timeOut == doneTask)
{
throw new Exception("Timeout");
}
else
{
if (optoheadDeviceIdTask is Task<string>)
{
string serialNr;
if (optoheadDeviceIdTask.Status == TaskStatus.Faulted)
throw new Exception("Error TaskStatus.Faulted");
string result = (optoheadDeviceIdTask as Task<string>).Result;
if (TryGetDeviceId(result, out serialNr))
{
return serialNr;
}
}
}
return null;
}
public async Task<string> GetSerialNrAsync()
{
if (serialPort == null)
throw new Exception("Serial port not initialized");
var cts = new CancellationTokenSource(); // we own the token
var sendTask = CliRunner.AddSendAsync(serialPort, SerialPortData.EMeterArg.DeviceId, cts.Token);
string output;
try
{
output = await CliRunner.WithTimeout(sendTask, TimeSpan.FromSeconds(15), cts);
}
catch (TimeoutException)
{
throw new Exception("Timeout");
}
if (TryGetDeviceId(output, out var serialNr))
return serialNr;
throw new Exception("Failed to parse DeviceId from output.");
}
public OptoHeadStatus SetTestingMode(OptoHeadStatus status)
{
if (serialPort == null)
throw new Exception("Serial port not initialized");
Task optoheadMode =
CliRunner.AddSendAsync(serialPort, SerialPortData.EMeterArg.Optohead, $"0x{((byte)status):X2}");
var timeOut = CliRunner.AddTimeOut(5000);
var doneTask = CliRunner.WhenAny();
if (timeOut == doneTask)
{
throw new Exception("Timeout");
}
else
{
if (optoheadMode is Task<string>)
{
string strOpticalDataMode;
if (optoheadMode.Status == TaskStatus.Faulted)
throw new Exception("Error TaskStatus.Faulted");
string result = (optoheadMode as Task<string>).Result;
if (TryGetOpticalDataMode(result, out strOpticalDataMode))
{
byte value;
if (strOpticalDataMode.StartsWith("0x", StringComparison.OrdinalIgnoreCase))
value = Convert.ToByte(strOpticalDataMode, 16); // interpret as hex
else
value = Convert.ToByte(strOpticalDataMode); // interpret as decimal
OptoHeadStatus optoheadStatus = (OptoHeadStatus)value;
return optoheadStatus;
}
}
}
return OptoHeadStatus.Unknown;
}
public OptoHeadStatus GetTestingMode()
{
if (serialPort == null)
throw new Exception("Serial port not initialized");
Task optoheadMode = CliRunner.AddSendAsync(serialPort, SerialPortData.EMeterArg.Optohead);
var timeOut = CliRunner.AddTimeOut(5000);
var doneTask = CliRunner.WhenAny();
if (timeOut == doneTask)
{
throw new Exception("Timeout");
}
else
{
if (optoheadMode is Task<string>)
{
string strOpticalDataMode;
if (optoheadMode.Status == TaskStatus.Faulted)
throw new Exception("Error TaskStatus.Faulted");
string result = (optoheadMode as Task<string>).Result;
if (TryGetOpticalDataMode(result, out strOpticalDataMode))
{
byte value;
if (strOpticalDataMode.StartsWith("0x", StringComparison.OrdinalIgnoreCase))
value = Convert.ToByte(strOpticalDataMode, 16); // interpret as hex
else
value = Convert.ToByte(strOpticalDataMode); // interpret as decimal
OptoHeadStatus optoheadStatus = (OptoHeadStatus)value;
return optoheadStatus;
}
}
}
return OptoHeadStatus.Unknown;
}
private void SendCommand()
{
}
private string RawDataAnswer()
{
return "";
}
}
}
-111
View File
@@ -1,111 +0,0 @@
using System;
using System.IO.Ports;
using System.Threading.Tasks;
using NfcC7_DLL.NfcHandler.Protocols;
using NfcC7_DLL.NfcHandler.Utils;
namespace NfcC7_DLL.NfcHandler
{
public class OptoHeadService
{
public class Con
{
public string com = "COM5";
public int baudrate = 38400;
public int dataBits = 8;
public Parity parity = Parity.None;
public StopBits stopbits = StopBits.Two;
public int readTimeout = 5000;
public int writeTimeout = 1000;
}
private Con Connection { get; set; }
private SERIAL_Driver driver;
/// <summary>
/// Filed After Run() is called.
/// </summary>
public WaterMetrologyData WaterMetrologyData { get; private set; }
public OptoHeadService(Con con)
{
Connection = con;
driver = new SERIAL_Driver();
}
public bool CreateSerialConnection()
{
bool isopen = false;
Con con = Connection;
byte[] message = {0x00};
byte[] bytesReceived;
if (!driver.isOpen())
{
isopen = driver.OpenConnection(
con.com,
con.baudrate,
con.dataBits,
con.parity,
con.stopbits,
con.readTimeout,
con.writeTimeout);
}
return isopen;
}
public void CloseSerialConnection()
{
dissableRunLoop = true;
driver.Close();
}
public void RunLoop()
{
Task.Run(() => Run());
}
private bool dissableRunLoop = false;
/// <summary>
/// Run the service. Catch one communication to WaterMetrologyData field.
/// </summary>
public void Run()
{
while (!dissableRunLoop)
{
WaterMetrologyData = ParseData(RunReading());
}
}
byte[] RunReading()
{
if (driver.isOpen())
{
driver.SendMessage(new byte[] {0x00}, 1);
return driver.GetRawData();
}
else
{
dissableRunLoop = true;
}
return new byte[] {0xFF};
}
public WaterMetrologyData ParseData(byte[] data)
{
try
{
return WaterMetrologyData.Parse(data, DateTime.Now, "");
}catch(Exception e)
{
return null;
}
}
}
}
@@ -1,10 +0,0 @@
namespace NfcC7_DLL.NfcHandler.Protocols
{
public enum OptoHeadStatus : byte
{
Unknown = 0xFF,
OptoHeadDisabled = 0x00,
OptoHeadC2 = 0xC2,
OptoHeadC7 = 0xC7,
}
}
@@ -1,44 +0,0 @@
using System;
namespace NfcC7_DLL.NfcHandler.Protocols
{
public class WaterMetrologyData
{
private OptoHeadStatus _optoHeadStatus;
private WaterMetrologyDataC7 c7Data;
private WaterMetrologyDataC2 c2Data;
public WaterMetrologyDataC7 C7Data { get => c7Data; }
public WaterMetrologyDataC2 C2Data { get => c2Data; }
public OptoHeadStatus OptoHeadStatus { get => _optoHeadStatus; }
public static WaterMetrologyData Parse(byte[] data, DateTime dt, string dutinfo)
{
if (data.Length < 24)
{
throw new ArgumentException("Invalid data length for WaterMetrologyData C2.");
}
WaterMetrologyData waterMetrologyData = new WaterMetrologyData();
waterMetrologyData._optoHeadStatus = OptoHeadStatus.Unknown;
// Probably C2
if(data.Length > 24 && data.Length < 48)
{
waterMetrologyData.c2Data = WaterMetrologyDataC2.Parse(data, dt, dutinfo);
waterMetrologyData._optoHeadStatus = OptoHeadStatus.OptoHeadC2;
}
// Probably C7
else if(data.Length >= 48)
{
waterMetrologyData.c7Data = WaterMetrologyDataC7.Parse(data, dt, dutinfo);
waterMetrologyData._optoHeadStatus = OptoHeadStatus.OptoHeadC7;
}
return waterMetrologyData;
}
public override string ToString()
{
return $"Status: {_optoHeadStatus}, C7Data: {c7Data}, C2Data: {c2Data}";
}
}
}
@@ -1,94 +0,0 @@
using System;
namespace NfcC7_DLL.NfcHandler.Protocols
{
public class WaterMetrologyDataC2
{
public string DutInfo { get; set; }
public DateTime Dt { get; set; }
public int AdcSample { get; set; }
public short LastField { get; set; }
public short FlowRate { get; set; }
public uint Accumulator { get; set; }
public ushort FlipPeriod { get; set; }
public ushort VinfStart { get; set; }
public ushort VinfEnd { get; set; }
public short ElectrodeDelta { get; set; }
public ushort Impedance { get; set; }
public byte FieldDriveTime { get; set; }
public bool IsInLowFlow { get; set; }
public bool IsInEmptyPipe { get; set; }
public bool FastHPFC { get; set; }
public bool FieldPolarity { get; set; }
public bool ImpedancePolarity { get; set; }
public double CalcFlowmLps
{
get { return FlowRate / 4.0; } // FlowRate is in 1/4 mL/s
}
public double CalcFlowGPM
{
get { return CalcFlowmLps * 0.015850323141489; } // mL/s to gal/min conversion
}
public double CalcAccGal
{
get { return (Accumulator / 4.0) * 0.000264172; } // Accumulator is in 1/4 mL, convert to gallons
}
public static WaterMetrologyDataC2 Parse(string base64Data, DateTime dt, string dutinfo)
{
byte[] data = Convert.FromBase64String(base64Data);
return Parse(data, dt, dutinfo);
}
public static WaterMetrologyDataC2 Parse(byte[] data, DateTime dt, string dutinfo)
{
if (data.Length < 24)
{
throw new ArgumentException("Invalid data length for WaterMetrologyData C2.");
}
WaterMetrologyDataC2 result = new WaterMetrologyDataC2();
result.DutInfo = dutinfo;
result.Dt = dt;
result.AdcSample = BitConverter.ToInt32(data, 0);
result.LastField = BitConverter.ToInt16(data, 4);
result.FlowRate = BitConverter.ToInt16(data, 6);
result.Accumulator = BitConverter.ToUInt32(data, 8);
result.FlipPeriod = BitConverter.ToUInt16(data, 12);
result.VinfStart = BitConverter.ToUInt16(data, 14);
result.VinfEnd = BitConverter.ToUInt16(data, 16);
result.ElectrodeDelta = BitConverter.ToInt16(data, 18);
result.Impedance = BitConverter.ToUInt16(data, 20);
result.FieldDriveTime = data[22];
byte flags = data[23];
result.IsInLowFlow = (flags & 0x01) != 0;
result.IsInEmptyPipe = (flags & 0x02) != 0;
result.FastHPFC = (flags & 0x04) != 0; // Fast High Pass Filter Constant in bit 2
result.FieldPolarity = (flags & 0x08) != 0; // Field Polarity in bit 3
result.ImpedancePolarity = (flags & 0x10) != 0; // Impedance Polarity in bit 4
return result;
}
//public override string ToString()
//{
// return $"ADC Sample: {AdcSample}, Last Field: {LastField}, Flow Rate: {FlowRate}, Accumulator: {Accumulator}, " +
// $"Flip Period Ticks: {FlipPeriodTicks}, Vinf Start: {VinfStart}, Vinf End: {VinfEnd}, Electrode Delta: {ElectrodeDelta}, " +
// $"Impedance: {Impedance}, Field Drive Time: {FieldDriveTime}, Is Low Flow: {IsInLowFlow}, Is Empty Pipe: {IsInEmptyPipe}, " +
// $"Fast High Pass Filter: {FastHighPassFilterConstant}, Field Polarity: {FieldPolarity}, Impedance Polarity: {ImpedancePolarity}";
//}
public override string ToString()
{
return $"DutInfo: {DutInfo}, Dt: {Dt}, ADC Sample: {AdcSample}, Last Field: {LastField}, Flow Rate: {FlowRate}, Accumulator: {Accumulator}, " +
$"Flip Period: {FlipPeriod}, Vinf Start: {VinfStart}, Vinf End: {VinfEnd}, Electrode Delta: {ElectrodeDelta}, " +
$"Impedance: {Impedance}, Field Drive Time: {FieldDriveTime}, Is Low Flow: {IsInLowFlow}, Is Empty Pipe: {IsInEmptyPipe}, " +
$"Fast HPFC: {FastHPFC}, Field Polarity: {FieldPolarity}, Impedance Polarity: {ImpedancePolarity}, " +
$"Calc Flow mL/s: {CalcFlowmLps:F2}, Calc Flow GPM: {CalcFlowGPM:F2}, Calc Acc Gal: {CalcAccGal:F2}";
}
}
}
@@ -1,94 +0,0 @@
using System;
namespace NfcC7_DLL.NfcHandler.Protocols
{
public class WaterMetrologyDataC7 : WaterMetrologyDataC2
{
// New fields for C7
public int LastFieldmilliGauss { get; set; }
public int ImpedanceI { get; set; } // In-phase impedance
public int ImpedanceQ { get; set; } // Out-of-phase impedance
public int NoiseMetric { get; set; }
public short LearningLockout { get; set; }
public short ReverseBuffer { get; set; }
public int ConditionedAdc { get; set; }
public uint Totalalizer { get; set; }
//public bool IsInLowFlow { get; set; }
//public bool IsInEmptyPipe { get; set; }
//public bool FastHPFC { get; set; }
//public bool FieldPolarity { get; set; }
//public bool ImpedancePolarity { get; set; }
public bool MagTamperState { get; set; }
public bool IsLearningActive { get; set; }
public bool AdcShiftsUpdated { get; set; }
public static WaterMetrologyDataC7 Parse(string base64Data, DateTime dt, string dutinfo)
{
byte[] data = Convert.FromBase64String(base64Data);
return Parse(data, dt, dutinfo);
}
public static WaterMetrologyDataC7 Parse(byte[] data, DateTime dt, string dutinfo)
{
// You may want to check for the minimum length required for C7
if (data.Length < 48) /* minimum required length for C7 */
{
throw new ArgumentException("Invalid data length for WaterMetrologyData C7.");
}
var result = new WaterMetrologyDataC7();
// Parse base C2 fields
var c2 = WaterMetrologyDataC2.Parse(data, dt, dutinfo);
//Copy base fields
result.DutInfo = c2.DutInfo;
result.Dt = c2.Dt;
result.AdcSample = c2.AdcSample;
result.LastField = c2.LastField;
result.FlowRate = c2.FlowRate;
result.Accumulator = c2.Accumulator;
result.FlipPeriod = c2.FlipPeriod;
result.VinfStart = c2.VinfStart;
result.VinfEnd = c2.VinfEnd;
result.ElectrodeDelta = c2.ElectrodeDelta;
result.Impedance = c2.Impedance;
result.FieldDriveTime = c2.FieldDriveTime;
result.IsInLowFlow = c2.IsInLowFlow;
result.IsInEmptyPipe = c2.IsInEmptyPipe;
result.FieldPolarity = c2.FieldPolarity;
result.ImpedancePolarity = c2.ImpedancePolarity;
// Parse new C7 fields (replace ENUM_OptPack0xC7.FIELD_MILLI_GAUSS etc. with actual offsets)
byte flags = data[23];
result.MagTamperState = (flags & 0x60) != 0; // bits 5 and 6 represent MagTamperState
result.IsLearningActive = (flags & 0x80) != 0; // bit 7 represents IsLearningActive
byte flagTwo = data[24];
result.AdcShiftsUpdated = (flagTwo & 0x01) != 0; // bit 0 represents AdcShiftsUpdated
result.LastFieldmilliGauss = BitConverter.ToInt32(data, 25);
result.ImpedanceI = BitConverter.ToInt32(data, 29); // in phase
result.ImpedanceQ = BitConverter.ToInt32(data, 33); // out of phase
result.NoiseMetric = BitConverter.ToInt32(data, 37); //
result.LearningLockout = BitConverter.ToInt16(data, 41);
result.ReverseBuffer = BitConverter.ToInt16(data, 43);
result.ConditionedAdc = BitConverter.ToInt32(data, 45);
result.Totalalizer = BitConverter.ToUInt32(data, 49);
return result;
}
public override string ToString()
{
return $"C7: LastFieldmilliGauss={LastFieldmilliGauss}, ImpedanceI={ImpedanceI}, ImpedanceQ={ImpedanceQ}, NoiseMetric={NoiseMetric}, LearningLockout={LearningLockout}, ReverseBuffer={ReverseBuffer}, ConditionedAdc={ConditionedAdc}, Totalalizer={Totalalizer}, MagTamperState={MagTamperState}, IsLearningActive={IsLearningActive}, AdcShiftsUpdated={AdcShiftsUpdated}" + base.ToString();
}
}
}
-1
View File
@@ -1 +0,0 @@
# Protocol Description
-341
View File
@@ -1,341 +0,0 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace NfcC7_DLL.NfcHandler.Utils
{
public class CliRunner
{
//static readonly Logger log = LogManager.GetLogger(typeof(CliRunner));
//private readonly ILog log;
private List<Task> taskPool = new List<Task>();
private long startTime;
public List<Task> TaskPool { get { return taskPool; } }
public void AddTask(Task task) { taskPool.Add(task); }
public void WaitAll() { Task.WaitAll(taskPool.ToArray()); }
/// <summary>
/// continue with WhenAny() to commpare results if time out is reached
/// </summary>
/// <param name="timeout"></param>
/// <returns></returns>
public Task AddTimeOut(int timeout)
{
Task timeOut = Task.Delay(timeout);
taskPool.Add(timeOut);
return timeOut;
}
/// <summary>
/// mainly used for time out additional task to compare results
/// </summary>
/// <returns></returns>
[Obsolete("Use async/await instead - WaitAnyFinished()")]
public async Task<Task> WhenAny() { return await Task.WhenAny(taskPool.ToArray()); }
public Task WaitAnyFinished(Task task, Task timeOut)
{
Task.WhenAny(task, timeOut);
while (true)
{
if (task.IsCompleted) break;
if (task.IsFaulted) break;
if (task.IsCanceled) break;
if(timeOut.IsCompleted) break;
if(timeOut.IsFaulted) break;
if(timeOut.IsCanceled) break;
Thread.Sleep(100);
}
var waitAny = Task.WaitAny(task, timeOut);
return waitAny == 0 ? task : timeOut;
}
public static async Task<T> WithTimeout<T>(Task<T> task, TimeSpan timeout, CancellationTokenSource externalCts = null)
{
var localCts = externalCts == null ? externalCts : new CancellationTokenSource();
var timeoutCts = new CancellationTokenSource(timeout);
var linked = CancellationTokenSource.CreateLinkedTokenSource(localCts.Token, timeoutCts.Token);
var completion = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously);
// Observe the task
_ = task.ContinueWith(_ => completion.TrySetResult(true), TaskScheduler.Default);
// Observe the timeout
_ = Task.Delay(Timeout.InfiniteTimeSpan, timeoutCts.Token)
.ContinueWith(_ => completion.TrySetResult(true), TaskScheduler.Default);
await completion.Task.ConfigureAwait(false);
if (timeoutCts.IsCancellationRequested == false && task.IsCompleted) // task finished first
return await task.ConfigureAwait(false);
// timeout won → cancel & throw TimeoutException
localCts.Cancel(); // triggers your SendAsync to kill process
throw new TimeoutException();
}
public Task<string> AddSendAsync(SerialPortData data, SerialPortData.EMeterArg eMeterArg, CancellationToken ct = default)
{
var task = SendAsync(data.SerialPortCmdClientPath, data.DefaultArgSettingsRead(eMeterArg), ct);
taskPool.Add(task); // List<Task> is okay because Task<string> : Task
return task;
}
public Task WaitAnyFinished()
{
int xTask = Task.WaitAny(taskPool.ToArray());
return taskPool[xTask];
}
public void Clear() { taskPool.Clear(); }
public void CancelAll() { Task.WhenAll(taskPool).ContinueWith(t => { }); }
public void StartAll()
{
taskPool.ForEach(t => t.Start());
}
public bool AreTasksDone()
{
return taskPool.All(task => task.IsCompleted);
}
public long StartTime
{
get => startTime;
}
public bool TimeOutReceived(long timeout)
{
return (DateTime.Now.Ticks - startTime) > timeout;
}
public CliRunner(bool isCliLogging)
{
startTime = DateTime.Now.Ticks;
if (isCliLogging)
{
try
{
/*log = new ScopedLoggerFactory().CreateLogger<CliRunner>(
@"C:\TBF\Logs\CliRunner.txt",
10, // maxFileSizeMB
7, // maxBackups
log4net.Core.Level.Debug,
true, // zipRolledFiles
true, // singleZipPerDay
TimeSpan.FromMinutes(2) // zipScanInterval
);*/
}
catch (Exception ex)
{
// Fallback to console or handle gracefully
Console.WriteLine($"Failed to initialize logger: {ex.Message}");
}
}
}
/// <summary>
///
/// </summary>
/// <param name="fileName"></param>
/// <param name="args"></param>
/// <typeparam name="T"></typeparam>
public Task AddSendAsync(SerialPortData data, SerialPortData.EMeterArg eMeterArg)
{
var task = SendAsync(data.SerialPortCmdClientPath, data.DefaultArgSettingsRead(eMeterArg));
taskPool.Add(task);
return task;
}
public Task AddSendAsync(SerialPortData data, SerialPortData.EMeterArg eMeterArg, string arg)
{
var task = SendAsync(data.SerialPortCmdClientPath, data.DefaultArgSettingsWrite(eMeterArg, arg));
taskPool.Add(task);
return task;
}
public void AddSendAsync(string fileName, string args)
{
var task = SendAsync(fileName, args);
taskPool.Add(task);
}
public async Task<string> SendAsync(string fileName, string args, CancellationToken ct = default)
{
var psi = new ProcessStartInfo
{
FileName = fileName,
Arguments = args,
RedirectStandardOutput = true,
RedirectStandardError = true,
UseShellExecute = false,
CreateNoWindow = true
};
var process = new Process { StartInfo = psi, EnableRaisingEvents = true };
try
{
process.Start();
Task<string> stdOutTask = process.StandardOutput.ReadToEndAsync();
Task<string> stdErrTask = process.StandardError.ReadToEndAsync();
try
{
await Task.WhenAll(stdOutTask, stdErrTask, process.WaitForExitAsync(ct));
}
catch (OperationCanceledException)
{
if (!process.HasExited)
{
process.Kill();
}
throw;
}
string allOutput = (stdOutTask.Result ?? "") + (stdErrTask.Result ?? "");
//log?.Debug(allOutput);
return allOutput;
}
finally
{
process?.Dispose();
}
}
public Task<T> AddRunAndCaptureJsonAsync<T>(SerialPortData data, SerialPortData.EMeterArg eMeterArg) where T : new()
{
var task = RunAndCaptureJsonAsync<T>(data.SerialPortCmdClientPath, data.DefaultArgSettingsRead(eMeterArg));
taskPool.Add(task);
return task;
}
public async Task<T> RunAndCaptureJsonAsync<T>(string fileName, string args, CancellationToken ct = default) where T : new()
{
var psi = new ProcessStartInfo
{
FileName = fileName,
Arguments = args,
RedirectStandardOutput = true,
RedirectStandardError = true,
UseShellExecute = false,
CreateNoWindow = true
};
var process = new Process { StartInfo = psi, EnableRaisingEvents = true };
try
{
process.Start();
var stdoutTask = process.StandardOutput.ReadToEndAsync();
var stderrTask = process.StandardError.ReadToEndAsync();
await Task.WhenAll(stdoutTask, stderrTask, process.WaitForExitAsync(ct));
string allOutput = (stdoutTask.Result ?? "") + (stderrTask.Result ?? "");
//log?.Debug(allOutput);
string json = ExtractJson(allOutput);
if (TryJsonStringDeserialize(json, out T result)) return result;
return default;
}
finally
{
process?.Dispose();
}
}
public bool TryJsonStringDeserialize<T>(string json, out T runAndCaptureJsonAsync) where T : new()
{
if (json != null)
{
try
{
runAndCaptureJsonAsync = JsonConvert.DeserializeObject<T>(json);
return true;
}
catch (Exception ex)
{
// log.Debug(ex.Message);
runAndCaptureJsonAsync = TryConvert<T>(json);
return true;
}
}
runAndCaptureJsonAsync = default;
return false;
}
private static T TryConvert<T>(string json) where T : new()
{
T obj = new T();
try
{
JObject jObject = JObject.Parse(json);
foreach (PropertyInfo prop in typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance))
{
if (!prop.CanWrite) continue;
JToken token;
if (jObject.TryGetValue(prop.Name, StringComparison.OrdinalIgnoreCase, out token))
{
try
{
object value = token.ToObject(prop.PropertyType);
prop.SetValue(obj, value);
}
catch
{
// leave default if conversion fails
}
}
// else → keep default value
}
}
catch (Exception ex)
{
Console.WriteLine($"TryConvert failed: {ex.Message}");
}
return obj;
}
public string ExtractJson(string text)
{
int start = text.IndexOf('{');
int end = text.LastIndexOf('}');
if (start >= 0 && end > start)
{
return text.Substring(start, end - start + 1);
}
return null;
}
}
}
@@ -1,39 +0,0 @@
using System;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
namespace NfcC7_DLL.NfcHandler.Utils
{
public static class ProcessExtensions
{
public static Task<object> WaitForExitAsync(this Process process, CancellationToken cancellationToken = default)
{
if (process == null) throw new ArgumentNullException(nameof(process));
if (process.HasExited) return Task.FromResult<object>(null);
var tcs = new TaskCompletionSource<object>(TaskCreationOptions.RunContinuationsAsynchronously);
EventHandler handler = null;
handler = (s, e) =>
{
try { tcs.TrySetResult(null); }
finally { process.Exited -= handler; }
};
process.EnableRaisingEvents = true;
process.Exited += handler;
if (cancellationToken.CanBeCanceled)
{
cancellationToken.Register(() =>
{
tcs.TrySetCanceled(cancellationToken);
process.Exited -= handler;
});
}
return tcs.Task;
}
}
}
-171
View File
@@ -1,171 +0,0 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.IO.Ports;
using System.Linq;
using System.Threading;
//*****************************************************************************
// Copyright 2020 Sensus GmbH Ludwigshafen. All rights reserved.
// Author: Venkat, Rajeshwar
//*****************************************************************************
namespace NfcC7_DLL.NfcHandler.Utils
{
public class SERIAL_Driver
{
public string ErrorMessage { get; private set; }
public Collection<byte> SerialPortReadBuffer = new Collection<byte>();
private SerialPort _serialPort;
private List<byte[]> _binMessages = new List<byte[]>();
private bool _isReading;
private Parity Parity { get; set; }
private StopBits StopBits { get; set; }
public SERIAL_Driver()
{
_serialPort = new SerialPort();
}
public bool OpenConnection(string comPort, int baudrate, int dataBits, Parity parity, StopBits stopbits, int readTimeout=1000, int writeTimeout = 1000)
{
lock (this)
{
if ((_serialPort != null) && (_serialPort.IsOpen))
{
_serialPort.DataReceived -= DataReceivedHandler;
_serialPort.Close();
_serialPort.Dispose();
_serialPort = null;
}
try
{
ErrorMessage = "";
//_serialPort = new SerialPort(comPort, 57600, Parity.None, 8, StopBits.Two);
_serialPort = new SerialPort(comPort, baudrate, parity, dataBits, stopbits);
_serialPort.ReadTimeout = readTimeout;
_serialPort.WriteTimeout = writeTimeout;
_serialPort.DataReceived += new SerialDataReceivedEventHandler(DataReceivedHandler);
_serialPort.Open();
}
catch (Exception ex)
{
ErrorMessage = String.Format("COM error: Open failed {0}.{1}", comPort, ex.Message);
return false;
}
if (!_serialPort.IsOpen)
{
ErrorMessage = String.Format("COM error: Can't Open {0}.", comPort);
return false;
}
}//End Lock
return true;
}
public bool SendMessage(byte[] sendDataBytes, int length, int readTimeout = 1000, int writeTimeout=1000)
{
if (!isOpen()) return false;
if (sendDataBytes.Length == 0) return true; // nothing to send - no error
try
{
PrepareReading(); //clear read buffer etc.
_serialPort.WriteTimeout = writeTimeout;
_serialPort.ReadTimeout = readTimeout;
_serialPort.Write(sendDataBytes, 0, length);
_isReading = true;
Thread.Sleep(100);
var stopWatch = Stopwatch.StartNew(); //start stop watch for data recevie timeout
while (_isReading) //wait until reading finishes or timeout occur
{
if (stopWatch.ElapsedMilliseconds > readTimeout)
{
stopWatch.Stop();
ErrorMessage = "COM error: Receive timeout";
return false;
}
}
}
catch (Exception ex)
{
ErrorMessage = String.Format("COM error: Transmit timeout {0}.{1}", _serialPort.PortName, ex.Message);
return false; // Exception in send function
}
return true;
}
private void PrepareReading()
{
_serialPort.DiscardInBuffer();
if(_binMessages != null) _binMessages.Clear();
_isReading = true;
}
public byte[] GetRawData()
{
try
{
if (_binMessages.Count > 0)
return _binMessages[0].ToArray();
else
{
return null;
}
}
catch(Exception)
{
byte[] err = { 0xFF };
return err;
}
}
private void DataReceivedHandler(object sender, SerialDataReceivedEventArgs e)
{
if (!_serialPort.IsOpen) return;
lock (this)
{
Thread.Sleep(100);
if (!_serialPort.IsOpen) return;
SerialPortReadBuffer = new Collection<byte>();
while (_serialPort.BytesToRead > 0)
{
SerialPortReadBuffer.Add((byte)_serialPort.ReadByte());
}
_binMessages.Add(SerialPortReadBuffer.ToArray());
_isReading = false;
}
}
public void CloseConnection()
{
if ((_serialPort != null) && (_serialPort.IsOpen))
{
_serialPort.DataReceived -= DataReceivedHandler;
_serialPort.Close();
_serialPort.Dispose();
_serialPort = null;
}
}
public void Close()
{
if (isOpen())
{
_serialPort.Close();
}
}
public void Dispose()
{
if (_serialPort != null)
{
_serialPort.Dispose();
}
}
public bool isOpen()
{
if(_serialPort != null)
return _serialPort.IsOpen;
return false;
}
}
}
@@ -1,88 +0,0 @@
using System;
using System.IO;
namespace NfcC7_DLL.NfcHandler.Utils
{
public class SerialPortData
{
private Boolean? _cliExists;
public bool CliExists { get {
if (_cliExists == null || !_cliExists.HasValue)
{
_cliExists = File.Exists(SerialPortCmdClientPath);
}
return _cliExists.Value;
} }
public string SerialPortCmdClientPath {
get {
#if DEBUG
return Path.Combine("C:\\","TBF","Cli", CmdClientName);
#else
return Path.Combine("..","Cli", CmdClientName);
#endif
}
}
public string CmdClientName { get; set; } = "HalCli.exe";
public string PortName { get; set; }
public int MeterType { get; set; }
public string MeterTypeStr { get; set; }
public enum EMeterArg {
Calibration = 0,
AllParams = 2,
DeviceId = 3,
Optohead = 4,
}
EMeterArg _eMeterArg = EMeterArg.AllParams;
public string DefaultArgSettingsRead(EMeterArg eMeterArg)
{
string meterTypeInsert = !string.IsNullOrEmpty(MeterTypeStr) ? MeterTypeStr : MeterType.ToString();
switch (eMeterArg)
{
case EMeterArg.AllParams:
return $"-p {PortName} -m {meterTypeInsert} --operation readall";
case EMeterArg.DeviceId:
return $"-p {PortName} -m {meterTypeInsert} --operation read --parameter DeviceId";
case EMeterArg.Optohead:
return $"-p {PortName} -m {meterTypeInsert} --operation read --parameter \"OpticalDataMode\"";
default:
throw new Exception("Not implemented correct command!");
}
}
public string DefaultArgSettingsWrite(EMeterArg eMeterArg, string arg)
{
string meterTypeInsert = !string.IsNullOrEmpty(MeterTypeStr) ? MeterTypeStr : MeterType.ToString();
switch (eMeterArg)
{
case EMeterArg.Calibration:
return $"-p {PortName} -m {meterTypeInsert} --operation write --parameter Calibration --value {arg}";
case EMeterArg.Optohead:
return $"-p {PortName} -m {meterTypeInsert} --operation write --parameter \"OpticalDataMode\" --value {arg}";
default:
throw new Exception("Not implemented correct command!");
}
}
public SerialPortData(
string portName,
string cmdClientName,
int meterType)
{
PortName = portName;
CmdClientName = cmdClientName;
MeterType = meterType;
}
public SerialPortData(
string portName,
string cmdClientName,
string meterType)
{
PortName = portName;
CmdClientName = cmdClientName;
MeterTypeStr = meterType;
}
}
}
-158
View File
@@ -1,158 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
//*****************************************************************************
// Copyright 2020 Sensus GmbH Ludwigshafen. All rights reserved.
// Author: Venkat, Rajeshwar
//*****************************************************************************
namespace NfcC7_DLL.NfcHandler.Utils
{
public static class Tools
{
public static bool ByteArrayCompare(byte[] a1, byte[] a2)
{
// thanks to https://stackoverflow.com/questions/43289/comparing-two-byte-arrays-in-net
if (a1.Length != a2.Length)
return false;
for (int i = 0; i < a1.Length; i++)
if (a1[i] != a2[i])
return false;
return true;
}
public static string SwapHex(string sHex)
{
string sResult = "";
int iPos = sHex.Length - 2;
while (iPos >= 0)
{
sResult += sHex.Substring(iPos, 2);
sHex = sHex.Remove(iPos, 2);
iPos = sHex.Length - 2;
}
return sResult;
}
public static string DecimalToHexString(string value, int size = 1)
{
try
{
long Lval = long.Parse(value);
if (size == 1) return Lval.ToString("X2");
if (size == 2) return Lval.ToString("X4");
if (size == 4) return Lval.ToString("X8");
}
catch (Exception)
{
if (size == 1) return "00";
if (size == 2) return "0000";
if (size == 4) return "00000000";
}
return "00";
}
public static string ByteToHexString(byte data)
{
List<byte> val = new List<byte>();
val.Add(data);
byte[] arr = val.ToArray();
return BytesToHex(arr);
}
public static string BytesToHex(byte[] data)
{
StringBuilder sb = new StringBuilder();
foreach (byte b in data)
sb.Append(b.ToString("X2"));
return sb.ToString();
}
public static byte[] HexStringToByteArray(String hexString)
{
int numberChars = hexString.Length;
byte[] bytes = new byte[numberChars / 2];
for (int i = 0; i < numberChars; i += 2)
{
bytes[i / 2] = Convert.ToByte(hexString.Substring(i, 2), 16);
}
return bytes;
}
public enum InitialCrcValue
{
Zeros,
NonZero1 = 0xffff,
NonZero2 = 0x1D0F
}
public class Crc16Ccitt
{
private const ushort poly = 0x1021;
ushort[] table = new ushort[256];
ushort initialValue = 0;
public ushort ComputeChecksum(byte[] bytes)
{
ushort crc = this.initialValue;
for (int i = 0; i < bytes.Length; ++i)
{
crc = (ushort)((crc << 8) ^ table[((crc >> 8) ^ (0xff & bytes[i]))]);
}
return crc;
}
public byte[] ComputeChecksumBytes(byte[] bytes)
{
ushort crc = ComputeChecksum(bytes);
return BitConverter.GetBytes(crc);
}
public Crc16Ccitt(InitialCrcValue initialValue)
{
this.initialValue = (ushort) initialValue;
ushort temp, a;
for (int i = 0; i < table.Length; ++i)
{
temp = 0;
a = (ushort) (i << 8);
for (int j = 0; j < 8; ++j)
{
if (((temp ^ a) & 0x8000) != 0)
{
temp = (ushort) ((temp << 1) ^ poly);
}
else
{
temp <<= 1;
}
a <<= 1;
}
table[i] = temp;
}
}
public byte[] calcCRCfromMessage(byte[] message)
{
// CRC calculation goes from MessageID to Password
// For Read this means MsgID (1) + Offset (2) + PayloadLength (1) + Password (2) = 6
// for write the length of the payload comes on top.
// STX(1), length(1), CRC(2) and ETX(1) are excluded, in total 5 bytes.
//
// the method works both for sending messages (where the CRC and ETX are not in message)
// and for receiving messages (where the CRC and ETX are included at the end)
byte[] crc_msg = new byte[message[1]]; // message length is 2nd byte
Array.Copy(message, 2, crc_msg, 0, crc_msg.Length);
return ComputeChecksumBytes(crc_msg);
}
public string commentCRC(byte[] crc_meter, byte[] crc_computed)
{
bool crc_do_match = Tools.ByteArrayCompare(crc_meter, crc_computed);
string crcComment = crc_do_match ? "ok." : "CRC DOESN'T MATCH!!";
return "CRC Meter: " + Tools.BytesToHex(crc_meter) + (crc_do_match ? " == " : " != ")
+ "CRC Computed: " + Tools.BytesToHex(crc_computed) + ". " + crcComment;
}
public bool crc_do_match(byte[] a, byte[] b)
{
return ByteArrayCompare(a, b);
}
}
}
}
+4 -37
View File
@@ -16,26 +16,20 @@ namespace Results.Entities
public virtual double PulsesMeter { get; set; } /// # of water meter or heat meter pulses
public virtual double PulsesMaster { get; set; } /// # of reference flowmeter pulses (gated by this water meter pulses)
public virtual double PulsesPerLiter { get; set; } /// [l ^ -1], in case of heat meters (CompoundMeterId==5) pulses per kWh in [kWh ^ -1]
public virtual double PulsesPerKilogram { get; set; } /// [kg ^ -1]
public virtual double VolumeStart { get; set; } /// Volume or energy (CompoundMeterId==5) on test start in [l] or [J]
public virtual double VolumeEnd { get; set; } /// Volume or energy (CompoundMeterId==5) on test end in [l] or [J]
public virtual double VolumeMeter { get; set; } /// Measured volume or energy (CompoundMeterId==5) in [l] or [J]
public virtual double MassMeter { get; set; } /// Measured mass or energy (CompoundMeterId==5) in [kg] or [J]
public virtual double VolumeRef { get; set; } /// Reference volume or energy (CompoundMeterId==5) in [l] or [J]
public virtual double MassRef { get; set; } /// Reference mass or energy (CompoundMeterId==5) in [kg] or [J]
public virtual double VolumeMeter { get; set; } /// Measured volume or energy (CompoundMeterId==5) in [l] or [J]
public virtual double VolumeRef { get; set; } /// Reference volume or energy (CompoundMeterId==5) in [l] or [J]
public virtual double TimestampStart { get; set; } /// [s]
public virtual double TimestampEnd { get; set; } /// [s]
public virtual double TestTime { get; set; } /// [s]
/// Main result
public virtual double Error { get; set; } /// [%] for volume register reader
public virtual double ErrorMass { get; set; } /// [%] for mass register reader
public virtual double Error { get; set; } /// [%]
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 for Volume RegisterReader
public virtual bool PassedMass { get; set; } /// true = test passed, water meter is OK for Mass RegisterReader
public virtual string QuantityUnits { get; set; } /// dm3, kg, etc. - this value defined the quantity of meter, its decisive for distinction of pulse types
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; }
@@ -129,33 +123,6 @@ namespace Results.Entities
return Passed ? yesNo[0] : ((yesNo.Length >= 2) ? yesNo[1] : Results.Resources.Strings.No);
}
}
public virtual string PassedMassColorStr(string yesNoFormatOrEmpty)
{
if (string.IsNullOrEmpty(yesNoFormatOrEmpty))
{
return Utils.PassedColorStr(PassedMass, Evaluate());
}
else
{
string[] yesNo = yesNoFormatOrEmpty.Split(new char[] { '~' });
return PassedMass ? yesNo[0] : ((yesNo.Length >= 2) ? yesNo[1] : Results.Resources.Strings.No);
}
}
public virtual string GetQuantityFromUnits()
{
if (QuantityUnits == "kg")
{
return "Mass";
}
else if (QuantityUnits == "dm3")
{
return "Volume";
}
return "Volume";
}
public MeterTestRslt()
{
+1 -7
View File
@@ -36,8 +36,6 @@ namespace Results.Entities
public virtual double ConstMasterCorr { get; set; } /// [l/pls] Liters per pulse of the master flow meter corrected by a correction table.
public virtual double ConstMaster { get; set; } /// [l/pls] Liters per pulse of the master flow meter calculated from a mass measurement.
/// When mass measurement is not available, corrected by a correction table.
public virtual double MassConstMaster { get; set; } /// [kg/pls] kilograms per pulse of the master flow meter calculated from a mass measurement.
/// When mass measurement is not available, corrected by a correction table.
public virtual double MassStartRaw { get; set; } /// [kg]
public virtual double MassStart { get; set; } /// [kg]
public virtual double MassEndRaw { get; set; } /// [kg]
@@ -50,11 +48,7 @@ namespace Results.Entities
public virtual double Flow { get; set; } /// [m3/h] calculated from conventional true value
public virtual double VolumeCTV { get; set; } /// [l] Volume conventional true value
public virtual double VolumeMaster { get; set; } /// [l] Volume from the master flow meter
public virtual double ErrorMaster { get; set; } /// [%] Error of the master flow meter
public virtual double MassFlow { get; set; } /// [t/h] calculated from conventional true value
public virtual double MassCTV { get; set; } /// [kg] Volume conventional true value
public virtual double MassMaster { get; set; } /// [kg] Volume from the master flow meter
public virtual double MassErrorMaster { get; set; } /// [%] Error of the master flow meter
public virtual double ErrorMaster { get; set; } /// [%] Error of the master flow meter
public virtual float DiverterStart { get; set; } /// [s] Diverter switch time or a start/stop valve open time when the test starts
public virtual float DivStart10 { get; set; } /// [s] Diverter switch time when test starts at level 10 (e.g. 10%) (not mapped to DB)
+1 -6
View File
@@ -33,8 +33,7 @@ namespace Results.Entities
public virtual string ApprovalInfo { get; set; }
public virtual string Certificate { get; set; }
public virtual double PulsesPerLtr { get; set; }
public virtual double PulsesPerKilogram { get; set; }
/// Concerns compound water meters
public virtual string ProducerAux { get; set; }
public virtual double Q3_Qn_Aux { get; set; } /// [m3/h]
@@ -86,7 +85,6 @@ namespace Results.Entities
ApprovalInfo = oriWMData.ApprovalInfo;
Certificate = oriWMData.Certificate;
PulsesPerLtr = oriWMData.PulsesPerLtr;
PulsesPerKilogram = oriWMData.PulsesPerKilogram;
ProducerAux = oriWMData.ProducerAux;
Q3_Qn_Aux = oriWMData.Q3_Qn_Aux;
MetrologicalClassAux = oriWMData.MetrologicalClassAux;
@@ -131,7 +129,6 @@ namespace Results.Entities
if (ApprovalInfo != wmd.ApprovalInfo) return false;
if (Certificate != wmd.Certificate) return false;
if (PulsesPerLtr != wmd.PulsesPerLtr) return false;
if (PulsesPerKilogram != wmd.PulsesPerKilogram) return false;
if (ProducerAux != wmd.ProducerAux) return false;
if (Q3_Qn_Aux != wmd.Q3_Qn_Aux) return false;
if (MetrologicalClassAux != wmd.MetrologicalClassAux) return false;
@@ -191,7 +188,6 @@ namespace Results.Entities
writer.Write((ApprovalInfo != null) ? ApprovalInfo : string.Empty);
writer.Write((Certificate != null) ? Certificate : string.Empty);
writer.Write(PulsesPerLtr);
writer.Write(PulsesPerKilogram);
writer.Write((ProducerAux != null) ? ProducerAux : string.Empty);
writer.Write(Q3_Qn_Aux);
writer.Write((MetrologicalClassAux != null) ? MetrologicalClassAux : string.Empty);
@@ -231,7 +227,6 @@ namespace Results.Entities
ApprovalInfo = reader.ReadString();
Certificate = reader.ReadString();
PulsesPerLtr = reader.ReadDouble();
PulsesPerKilogram = reader.ReadDouble();
ProducerAux = reader.ReadString();
Q3_Qn_Aux = reader.ReadDouble();
MetrologicalClassAux = reader.ReadString();
-2
View File
@@ -49,8 +49,6 @@ namespace Results.Forms
{
InitializeComponent();
this.Icon = Properties.Resources.TBF_icon;
firstEnabledControl = null;
lastSizeChange = DateTime.Now;
nrGroups = 1;
+1 -4
View File
@@ -24,10 +24,7 @@ namespace Results.Forms
public ManualEntryConfigDlg()
{
InitializeComponent();
this.Icon = Properties.Resources.TBF_icon;
manualEntryConfigCtrl.Unlocked = true;
manualEntryConfigCtrl.Unlocked = true;
}
-2
View File
@@ -25,8 +25,6 @@ namespace Results.Forms
{
InitializeComponent();
this.Icon = Properties.Resources.TBF_icon;
Localize();
ShowAllResults(wm);
+1 -4
View File
@@ -35,10 +35,7 @@ namespace Results.Forms
public ResultsConfigDlg()
{
InitializeComponent();
this.Icon = Properties.Resources.TBF_icon;
resultsConfigCtrl.Unlocked = true;
resultsConfigCtrl.Unlocked = true;
}
+1 -11
View File
@@ -350,17 +350,7 @@ 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
Quantity, /// 298
Reference_quantity, /// 299
Start_quantity, /// 300
End_quantity, /// 301
RR_Quantity, /// 302
RR_Units, /// 303
MassCTV, /// 304
Unit_per_pulse_Read, /// 305
Pulses_per_unit, /// 306
Count,
}
}
+2 -8
View File
@@ -16,22 +16,16 @@ namespace Results.Mappings
Map(x => x.PulsesMeter);
Map(x => x.PulsesMaster);
Map(x => x.PulsesPerLiter);
Map(x => x.PulsesPerKilogram);
Map(x => x.VolumeStart);
Map(x => x.VolumeStart);
Map(x => x.VolumeEnd);
Map(x => x.VolumeMeter);
Map(x => x.VolumeRef);
Map(x => x.MassMeter);
Map(x => x.MassRef);
Map(x => x.TimestampStart);
Map(x => x.TimestampStart);
Map(x => x.TimestampEnd);
Map(x => x.TestTime);
Map(x => x.Error);
Map(x => x.ErrorMass);
Map(x => x.TestDone);
Map(x => x.Passed);
Map(x => x.PassedMass);
Map(x => x.QuantityUnits);
#if IPERL
Map(x => x.ExtraDataPath);
Map(x => x.X1);
-4
View File
@@ -45,10 +45,6 @@ namespace Results.Mappings
Map(x => x.VolumeCTV);
Map(x => x.VolumeMaster);
Map(x => x.ErrorMaster);
Map(x => x.MassFlow).Column("MassFlow");
Map(x => x.MassCTV);
Map(x => x.MassMaster);
Map(x => x.MassErrorMaster);
Map(x => x.DiverterStart);
Map(x => x.DiverterEnd);
Map(x => x.ErrorFlags);
+1 -11
View File
@@ -19,7 +19,7 @@ namespace Results.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 {
@@ -69,15 +69,5 @@ namespace Results.Properties {
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
internal static System.Drawing.Icon TBF_icon {
get {
object obj = ResourceManager.GetObject("TBF_icon", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
}
}
-3
View File
@@ -121,7 +121,4 @@
<data name="Headpic" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Headpic.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="TBF_icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\TBF_icon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
-36
View File
@@ -294,15 +294,6 @@ namespace Results.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to End quantity.
/// </summary>
internal static string End_quantity {
get {
return ResourceManager.GetString("End_quantity", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to End state.
/// </summary>
@@ -906,15 +897,6 @@ namespace Results.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Pulses/Unit.
/// </summary>
internal static string PulsesUnit {
get {
return ResourceManager.GetString("PulsesUnit", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Q fall.
/// </summary>
@@ -1149,15 +1131,6 @@ namespace Results.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Start quantity.
/// </summary>
internal static string Start_quantity {
get {
return ResourceManager.GetString("Start_quantity", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Start volume.
/// </summary>
@@ -2130,15 +2103,6 @@ namespace Results.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Quant..
/// </summary>
internal static string VName_Quantity {
get {
return ResourceManager.GetString("VName_Quantity", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Temp..
/// </summary>
+47 -59
View File
@@ -123,18 +123,9 @@
<data name="Alignment" xml:space="preserve">
<value>Zarovnání</value>
</data>
<data name="Approval" xml:space="preserve">
<value>Schválení</value>
</data>
<data name="Available_results" xml:space="preserve">
<value>Dostupné výsledky</value>
</data>
<data name="Batch_nr" xml:space="preserve">
<value>Číslo dávky</value>
</data>
<data name="Bench" xml:space="preserve">
<value>Stanice</value>
</data>
<data name="CancelBtnText" xml:space="preserve">
<value>Zrušit</value>
</data>
@@ -144,21 +135,9 @@
<data name="Configuration" xml:space="preserve">
<value>Konfigurace</value>
</data>
<data name="Density" xml:space="preserve">
<value>Hustota</value>
</data>
<data name="DownBtnText" xml:space="preserve">
<value>Dolů</value>
</data>
<data name="End" xml:space="preserve">
<value>Konec</value>
</data>
<data name="Error" xml:space="preserve">
<value>Chyba</value>
</data>
<data name="Flow" xml:space="preserve">
<value>Průtok</value>
</data>
<data name="Format" xml:space="preserve">
<value>Formát</value>
</data>
@@ -171,8 +150,8 @@
<data name="Precision" xml:space="preserve">
<value>Přesnost</value>
</data>
<data name="Procedure" xml:space="preserve">
<value>Procedura</value>
<data name="Remark" xml:space="preserve">
<value>Poznámka</value>
</data>
<data name="Remove" xml:space="preserve">
<value>&lt; Odebrat</value>
@@ -183,15 +162,15 @@
<data name="Result" xml:space="preserve">
<value>Výsledek</value>
</data>
<data name="Results" xml:space="preserve">
<value>Výsledky</value>
</data>
<data name="Result_code" xml:space="preserve">
<value>Kód výsledku</value>
</data>
<data name="Selected_results" xml:space="preserve">
<value>Vybrané výsledky</value>
</data>
<data name="sn" xml:space="preserve">
<value>sériové číslo</value>
</data>
<data name="Start" xml:space="preserve">
<value>Začátek</value>
</data>
<data name="Test_ID" xml:space="preserve">
<value>Test</value>
</data>
@@ -201,21 +180,9 @@
<data name="UpBtnText" xml:space="preserve">
<value>Nahoru</value>
</data>
<data name="User" xml:space="preserve">
<value>Uživatel</value>
</data>
<data name="Width" xml:space="preserve">
<value>Šířka</value>
</data>
<data name="Results" xml:space="preserve">
<value>Výsledky</value>
</data>
<data name="Remark" xml:space="preserve">
<value>Poznámka</value>
</data>
<data name="Result_code" xml:space="preserve">
<value>Kód výsledku</value>
</data>
<data name="Mounting" xml:space="preserve">
<value>Montáž</value>
</data>
@@ -228,27 +195,54 @@
<data name="Quantity" xml:space="preserve">
<value>Veličina</value>
</data>
<data name="sn" xml:space="preserve">
<value>sériové číslo</value>
</data>
<data name="Water_Meter" xml:space="preserve">
<value>Vodoměr</value>
</data>
<data name="Batch_nr" xml:space="preserve">
<value>Číslo dávky</value>
</data>
<data name="from" xml:space="preserve">
<value>od</value>
</data>
<data name="to" xml:space="preserve">
<value>do</value>
</data>
<data name="Density_correction" xml:space="preserve">
<value>Korekce hustoty</value>
</data>
<data name="User_description" xml:space="preserve">
<value>Popis uživatele</value>
</data>
<data name="Unit" xml:space="preserve">
<value>Jednotka</value>
</data>
<data name="Approval" xml:space="preserve">
<value>Schválení</value>
</data>
<data name="Bench" xml:space="preserve">
<value>Stanice</value>
</data>
<data name="Density" xml:space="preserve">
<value>Hustota</value>
</data>
<data name="Density_correction" xml:space="preserve">
<value>Korekce hustoty</value>
</data>
<data name="End" xml:space="preserve">
<value>Konec</value>
</data>
<data name="Procedure" xml:space="preserve">
<value>Procedura</value>
</data>
<data name="Procedure_description" xml:space="preserve">
<value>Popis procedury</value>
</data>
<data name="Start" xml:space="preserve">
<value>Začátek</value>
</data>
<data name="User" xml:space="preserve">
<value>Uživatel</value>
</data>
<data name="User_description" xml:space="preserve">
<value>Popis uživatele</value>
</data>
<data name="Bench_ID" xml:space="preserve">
<value>ID stanice</value>
</data>
@@ -321,6 +315,9 @@
<data name="Serial_number_is_missing" xml:space="preserve">
<value>Chybí sériové číslo</value>
</data>
<data name="Error" xml:space="preserve">
<value>Chyba</value>
</data>
<data name="Lower_limit" xml:space="preserve">
<value>Dolní hranice</value>
</data>
@@ -333,6 +330,9 @@
<data name="Relative_error" xml:space="preserve">
<value>Relativní chyba</value>
</data>
<data name="Flow" xml:space="preserve">
<value>Průtok</value>
</data>
<data name="This_position_is_disabled" xml:space="preserve">
<value>Taro pozice je vypnuta</value>
</data>
@@ -351,16 +351,4 @@
<data name="Merge" xml:space="preserve">
<value>Spojit</value>
</data>
<data name="PulsesUnit" xml:space="preserve">
<value />
</data>
<data name="VName_Quantity" xml:space="preserve">
<value />
</data>
<data name="Start_quantity" xml:space="preserve">
<value />
</data>
<data name="End_quantity" xml:space="preserve">
<value />
</data>
</root>
+51 -63
View File
@@ -210,9 +210,6 @@
<data name="Procedure" xml:space="preserve">
<value>Prüfvorlage</value>
</data>
<data name="Producer" xml:space="preserve">
<value>Hersteller</value>
</data>
<data name="Protocol" xml:space="preserve">
<value>Protokoll</value>
</data>
@@ -363,6 +360,57 @@
<data name="Mounting" xml:space="preserve">
<value>Montage</value>
</data>
<data name="Producer" xml:space="preserve">
<value>Hersteller</value>
</data>
<data name="Meter_type" xml:space="preserve">
<value>WZ-Typ</value>
</data>
<data name="Compound" xml:space="preserve">
<value>Verbundzähler</value>
</data>
<data name="Heat_meter" xml:space="preserve">
<value>Wärmezähler</value>
</data>
<data name="Single" xml:space="preserve">
<value>Einzel</value>
</data>
<data name="Category" xml:space="preserve">
<value>Kategorie</value>
</data>
<data name="Quantity" xml:space="preserve">
<value>Größe</value>
</data>
<data name="Page" xml:space="preserve">
<value>Seite</value>
</data>
<data name="Water_Meter" xml:space="preserve">
<value>Wasserzähler</value>
</data>
<data name="aux" xml:space="preserve">
<value>Nebenzähler</value>
</data>
<data name="main" xml:space="preserve">
<value>Hauptzähler</value>
</data>
<data name="fall" xml:space="preserve">
<value>fall</value>
</data>
<data name="from" xml:space="preserve">
<value>von</value>
</data>
<data name="rise" xml:space="preserve">
<value>steig</value>
</data>
<data name="to" xml:space="preserve">
<value>bis</value>
</data>
<data name="VName_Mass" xml:space="preserve">
<value>Masse</value>
</data>
<data name="Density_correction" xml:space="preserve">
<value>Dichtekorrektur</value>
</data>
<data name="Energy" xml:space="preserve">
<value>Energie</value>
</data>
@@ -381,21 +429,6 @@
<data name="P_delta_start" xml:space="preserve">
<value>Druckdifferenz Beginn Prüfung</value>
</data>
<data name="Meter_type" xml:space="preserve">
<value>WZ-Typ</value>
</data>
<data name="Compound" xml:space="preserve">
<value>Verbundzähler</value>
</data>
<data name="Heat_meter" xml:space="preserve">
<value>Wärmezähler</value>
</data>
<data name="Single" xml:space="preserve">
<value>Einzel</value>
</data>
<data name="Page" xml:space="preserve">
<value>Seite</value>
</data>
<data name="End_volume" xml:space="preserve">
<value>Ende Volumen</value>
</data>
@@ -426,15 +459,6 @@
<data name="Start_mass" xml:space="preserve">
<value>Start Prüfung</value>
</data>
<data name="Category" xml:space="preserve">
<value>Kategorie</value>
</data>
<data name="Quantity" xml:space="preserve">
<value>Größe</value>
</data>
<data name="Water_Meter" xml:space="preserve">
<value>Wasserzähler</value>
</data>
<data name="VName_Flow" xml:space="preserve">
<value>Q</value>
</data>
@@ -450,9 +474,6 @@
<data name="VName_Humi" xml:space="preserve">
<value>Hu</value>
</data>
<data name="VName_Mass" xml:space="preserve">
<value>Masse</value>
</data>
<data name="VName_TstTime" xml:space="preserve">
<value>Tau</value>
</data>
@@ -561,12 +582,6 @@
<data name="Tooltip_T_up_st" xml:space="preserve">
<value>Temperatur Prüstreckeneingang am Prüfungsbeginn (4 Messungen nach Beginn)</value>
</data>
<data name="aux" xml:space="preserve">
<value>Nebenzähler</value>
</data>
<data name="main" xml:space="preserve">
<value>Hauptzähler</value>
</data>
<data name="Tooltip_E_rel" xml:space="preserve">
<value>Relative Messabweichung eines WZ</value>
</data>
@@ -591,18 +606,6 @@
<data name="VName_Error" xml:space="preserve">
<value>E</value>
</data>
<data name="fall" xml:space="preserve">
<value>fall</value>
</data>
<data name="from" xml:space="preserve">
<value>von</value>
</data>
<data name="rise" xml:space="preserve">
<value>steig</value>
</data>
<data name="to" xml:space="preserve">
<value>bis</value>
</data>
<data name="Tooltip_Hu_Amb_M" xml:space="preserve">
<value>Umgebungs-Luftfeuchtigkeit während der Prüfung</value>
</data>
@@ -624,9 +627,6 @@
<data name="Yes" xml:space="preserve">
<value>Ja</value>
</data>
<data name="Density_correction" xml:space="preserve">
<value>Dichtekorrektur</value>
</data>
<data name="Error_flags" xml:space="preserve">
<value>Fehlerflags</value>
</data>
@@ -825,16 +825,4 @@
<data name="Selected_items" xml:space="preserve">
<value>Ausgewählte Objekte</value>
</data>
<data name="PulsesUnit" xml:space="preserve">
<value />
</data>
<data name="VName_Quantity" xml:space="preserve">
<value />
</data>
<data name="Start_quantity" xml:space="preserve">
<value />
</data>
<data name="End_quantity" xml:space="preserve">
<value />
</data>
</root>
-12
View File
@@ -804,16 +804,4 @@
<data name="Serial_number_is_missing" xml:space="preserve">
<value>Numérotation en série</value>
</data>
<data name="PulsesUnit" xml:space="preserve">
<value />
</data>
<data name="VName_Quantity" xml:space="preserve">
<value />
</data>
<data name="Start_quantity" xml:space="preserve">
<value />
</data>
<data name="End_quantity" xml:space="preserve">
<value />
</data>
</root>
-12
View File
@@ -537,16 +537,4 @@
<data name="Yes" xml:space="preserve">
<value>Sì</value>
</data>
<data name="PulsesUnit" xml:space="preserve">
<value />
</data>
<data name="VName_Quantity" xml:space="preserve">
<value />
</data>
<data name="Start_quantity" xml:space="preserve">
<value />
</data>
<data name="End_quantity" xml:space="preserve">
<value />
</data>
</root>
-12
View File
@@ -441,16 +441,4 @@
<data name="Unit" xml:space="preserve">
<value>Jednostka</value>
</data>
<data name="PulsesUnit" xml:space="preserve">
<value />
</data>
<data name="VName_Quantity" xml:space="preserve">
<value />
</data>
<data name="Start_quantity" xml:space="preserve">
<value />
</data>
<data name="End_quantity" xml:space="preserve">
<value />
</data>
</root>
-12
View File
@@ -852,16 +852,4 @@
<data name="Merge" xml:space="preserve">
<value>Merge</value>
</data>
<data name="PulsesUnit" xml:space="preserve">
<value>Pulses/Unit</value>
</data>
<data name="VName_Quantity" xml:space="preserve">
<value>Quant.</value>
</data>
<data name="Start_quantity" xml:space="preserve">
<value>Start quantity</value>
</data>
<data name="End_quantity" xml:space="preserve">
<value>End quantity</value>
</data>
</root>
+5 -17
View File
@@ -420,34 +420,22 @@
<data name="Volume_main" xml:space="preserve">
<value>Объем главн.</value>
</data>
<data name="Water_Meter" xml:space="preserve">
<value>Счетчик воды</value>
</data>
<data name="VName_Vol" xml:space="preserve">
<value>Объем</value>
</data>
<data name="aux" xml:space="preserve">
<value>доп.</value>
</data>
<data name="main" xml:space="preserve">
<value>главн.</value>
</data>
<data name="VName_Vol" xml:space="preserve">
<value>Объем</value>
</data>
<data name="No" xml:space="preserve">
<value>Нет</value>
</data>
<data name="Yes" xml:space="preserve">
<value>Да</value>
</data>
<data name="PulsesUnit" xml:space="preserve">
<value />
</data>
<data name="VName_Quantity" xml:space="preserve">
<value />
</data>
<data name="Start_quantity" xml:space="preserve">
<value />
</data>
<data name="End_quantity" xml:space="preserve">
<value />
<data name="Water_Meter" xml:space="preserve">
<value>Счетчик воды</value>
</data>
</root>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

-1
View File
@@ -256,7 +256,6 @@
<ItemGroup>
<Content Include="Entities\PurchaseEntities\createPurchaseTables.sql" />
<Content Include="Entities\PurchaseEntities\ImportPurchaseOrderTestData.sql" />
<None Include="Resources\TBF_icon.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+13 -21
View File
@@ -131,12 +131,6 @@ namespace Results
AllItems.Add(new WMeterRsltItemSpec(ItemID.String, "String", "", Quantity.String, ItemCategory.Other, (w,t,u,f,p) => f));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Separator, "Separator", "", Quantity.String, ItemCategory.Other, (w,t,u,f,p) => string.Empty));
///
/// Register reader
///
AllItems.Add(new WMeterRsltItemSpec(ItemID.RR_Quantity, "RR Quantity", "", Quantity.RegisterReader, ItemCategory.Other, (w,t,u,f,p) => (w.GetMeterTestRslt(t) != null) ? FormatStr(f, w.GetMeterTestRslt(t).GetQuantityFromUnits()) : string.Empty));
AllItems.Add(new WMeterRsltItemSpec(ItemID.RR_Units, "RR Units", "", Quantity.RegisterReader, ItemCategory.Other, (w,t,u,f,p) => (w.GetMeterTestRslt(t) != null) ? FormatStr(f, w.GetMeterTestRslt(t).QuantityUnits) : string.Empty));
/// Common
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_name, Strings.Test + "()", Quantity.String, ItemCategory.TestData, (w,t,u,f,p) => FormatStr(f, (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Name())));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Procedure_name, Strings.Procedure, Quantity.String, ItemCategory.Other, (w,t,u,f,p) => FormatStr(f, w.ProcedureName())));
@@ -161,22 +155,21 @@ namespace Results
///
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_volume, Strings.Test_vol + "()", Quantity.Volume, ItemCategory.TestData, (w,t,u,f,p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V2", w.GetTestRslt(t).TargetVolume())));
AllItems.Add(new WMeterRsltItemSpec(ItemID.VolumeCTV, string.Format("{0} CTV ()", Strings.VName_Vol), Quantity.Volume, ItemCategory.TestResult, (w,t,u,f,p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetTestRslt(t).VolumeCTV)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Quantity, string.Format("{0} Mt. ()", Strings.VName_Quantity), Strings.Tooltip_Vol_Mt, Quantity.MultiFunctionalVariables, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume) != null) ? FormatDbl(u, f, p, "V4", (w.GetMeterTestRslt(t).GetQuantityFromUnits() == "Mass" ? w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume).MassMeter : w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume).VolumeMeter)) : ((w.GetMeterTestRslt(t) != null) ? FormatDbl(u, f, p, "V4", (w.GetMeterTestRslt(t).GetQuantityFromUnits() == "Mass" ? w.GetMeterTestRslt(t).MassMeter : w.GetMeterTestRslt(t).VolumeMeter)) : string.Empty)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_quantity,string.Format("{0} rm ()", Strings.VName_Quantity), Strings.Tooltip_Vol_rm, Quantity.MultiFunctionalVariables, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume) != null) ? FormatDbl(u, f, p, "V4", (w.GetMeterTestRslt(t).GetQuantityFromUnits() == "Mass" ? w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume).MassRef : w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume).VolumeRef)) : ((w.GetMeterTestRslt(t) != null) ? FormatDbl(u, f, p, "V4", (w.GetMeterTestRslt(t).GetQuantityFromUnits() == "Mass" ? w.GetMeterTestRslt(t).MassRef : w.GetMeterTestRslt(t).VolumeRef)) : string.Empty)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume, string.Format("{0} Mt. ()", Strings.VName_Vol), Strings.Tooltip_Vol_Mt, Quantity.Volume, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume).VolumeMeter) : ((w.GetMeterTestRslt(t) != null) ? FormatDbl(u,f,p, "V4", w.GetMeterTestRslt(t).VolumeMeter) : string.Empty)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_volume, string.Format("{0} rm ()", Strings.VName_Vol), Strings.Tooltip_Vol_rm, Quantity.Volume, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume).VolumeRef) : ((w.GetMeterTestRslt(t) != null) ? FormatDbl(u,f,p, "V4", w.GetMeterTestRslt(t).VolumeRef) : string.Empty)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume_main, string.Format("{0} {1} ()", Strings.VName_Vol, Strings.main), Quantity.Volume, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain).VolumeMeter) : string.Empty));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume_aux, string.Format("{0} {1} ()", Strings.VName_Vol, Strings.aux), Quantity.Volume, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux).VolumeMeter) : string.Empty));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_quantity, Strings.Start_quantity + "()", Quantity.MultiFunctionalVariables, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume).VolumeStart) : ((w.GetMeterTestRslt(t) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeStart) : string.Empty)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume, Strings.Start_volume + "()", Quantity.Volume, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume).VolumeStart) : ((w.GetMeterTestRslt(t) != null) ? FormatDbl(u,f,p, "V4", w.GetMeterTestRslt(t).VolumeStart) : string.Empty)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume_main, Strings.Start_volume_main + "()", Quantity.Volume, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain).VolumeStart) : string.Empty));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume_aux, Strings.Start_volume_aux + "()", Quantity.Volume, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux).VolumeStart) : string.Empty));
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_quantity, Strings.End_quantity + "()", Quantity.MultiFunctionalVariables, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume).VolumeEnd) : ((w.GetMeterTestRslt(t) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeEnd) : string.Empty)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume, Strings.End_volume + "()", Quantity.Volume, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume).VolumeEnd) : ((w.GetMeterTestRslt(t) != null) ? FormatDbl(u,f,p, "V4", w.GetMeterTestRslt(t).VolumeEnd) : string.Empty)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume_main, Strings.End_volume_main + "()", Quantity.Volume, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain).VolumeEnd) : string.Empty));
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume_aux, Strings.End_volume_aux + "()", Quantity.Volume, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux).VolumeEnd) : string.Empty));
///
/// Mass
///
AllItems.Add(new WMeterRsltItemSpec(ItemID.MassCTV, string.Format("{0} CTV ()", Strings.VName_Mass), Quantity.Mass, ItemCategory.TestResult, (w,t,u,f,p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u,f,p, "V4", w.GetTestRslt(t).MassCTV)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Mass_start_raw, string.Format("{0} ST raw ()", Strings.VName_Mass), Quantity.Mass, ItemCategory.TestResult, (w,t,u,f,p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u,f,p, "V4", w.GetTestRslt(t).MassStartRaw)));
///
/// Mass
///
AllItems.Add(new WMeterRsltItemSpec(ItemID.Mass_start_raw, string.Format("{0} ST raw ()", Strings.VName_Mass), Quantity.Mass, ItemCategory.TestResult, (w,t,u,f,p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u,f,p, "V4", w.GetTestRslt(t).MassStartRaw)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Mass_start, string.Format("{0} ST ()", Strings.VName_Mass), Quantity.Mass, ItemCategory.TestResult, (w,t,u,f,p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u,f,p, "V4", w.GetTestRslt(t).MassStart)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Mass_end_raw, string.Format("{0} EN raw ()", Strings.VName_Mass), Quantity.Mass, ItemCategory.TestResult, (w,t,u,f,p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u,f,p, "V4", w.GetTestRslt(t).MassEndRaw)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Mass_end, string.Format("{0} EN ()", Strings.VName_Mass), Quantity.Mass, ItemCategory.TestResult, (w,t,u,f,p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u,f,p, "V4", w.GetTestRslt(t).MassEnd)));
@@ -381,11 +374,10 @@ namespace Results
AllItems.Add(new WMeterRsltItemSpec(ItemID.Camera_angle_start, "Start angle ()", "Start angle measured by a camera",Quantity.Pulses, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t) == null) ? string.Empty : FormatDbl(u,f,p, "F0", w.GetMeterTestRslt(t).IsCamera() ? w.GetMeterTestRslt(t).VolumeStart * w.GetMeterTestRslt(t).PulsesPerLiter : 0)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Camera_angle_end, "End angle ()", "End angle measured by a camera", Quantity.Pulses, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t) == null) ? string.Empty : FormatDbl(u,f,p, "F0", w.GetMeterTestRslt(t).IsCamera() ? w.GetMeterTestRslt(t).VolumeEnd * w.GetMeterTestRslt(t).PulsesPerLiter : 0)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Pulses_per_unit, Strings.PulsesUnit, Quantity.PulsePerUnit, ItemCategory.MeterData, (w,t,u,f,p) => FormatDbl(u, f, p, "V4", w.WaterMeterData.PulsesPerLtr)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Pls_per_ltr_aux, Strings.PulsesUnit + " aux", Quantity.PulsePerUnit, ItemCategory.MeterData, (w,t,u,f,p) => FormatDbl(u, f, p, "V4", w.WaterMeterData.PulsesPerLtrAux)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Pulse__liter, Strings.PulsesUnit + "()", Quantity.PulsePerUnit, ItemCategory.TestResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t) == null) ? string.Empty : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).IsCamera() ? 0 : w.GetMeterTestRslt(t).PulsesPerLiter)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Degree__liter, "Degree per unit ()", Quantity.PulsePerUnit, ItemCategory.TestResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t) == null) ? string.Empty : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).IsCamera() ? w.GetMeterTestRslt(t).PulsesPerLiter : 0)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Pulses_per_liter, Strings.PulsesLiter, Quantity.PulsePerLtr, ItemCategory.MeterData, (w,t,u,f,p) => FormatDbl(u, f, p, "V4", w.WaterMeterData.PulsesPerLtr)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Pls_per_ltr_aux, Strings.PulsesLiter + " aux", Quantity.PulsePerLtr, ItemCategory.MeterData, (w, t, u, f, p) => FormatDbl(u, f, p, "V4", w.WaterMeterData.PulsesPerLtrAux)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Pulse__liter, Strings.PulsesLiter + "()", Quantity.PulsePerLtr, ItemCategory.TestResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t) == null) ? string.Empty : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).IsCamera() ? 0 : w.GetMeterTestRslt(t).PulsesPerLiter)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Degree__liter, "Degree per liter ()", Quantity.PulsePerLtr, ItemCategory.TestResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t) == null) ? string.Empty : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).IsCamera() ? w.GetMeterTestRslt(t).PulsesPerLiter : 0)));
/// Water meters results (combined)
AllItems.Add(new WMeterRsltItemSpec(ItemID.Pulses_main, Strings.Pulses + " " + Strings.main + "()", Quantity.Pulses, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) == null) ? string.Empty : FormatDbl(u, f, p, "F0", w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain).IsPulses() ? w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain).PulsesMeter : 0)));
@@ -413,7 +405,7 @@ namespace Results
AllItems.Add(new WMeterRsltItemSpec(ItemID.Watermeters, Strings.WMs, Quantity.String, ItemCategory.Other, (w,t,u,f,p) => FormatStr(f, w.Batch.WatermetersStr)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Batch_start_time, Strings.Start, Quantity.DateTime, ItemCategory.Other, (w,t,u,f,p) => string.IsNullOrEmpty(f) ? w.Batch.StartTime.ToString() : string.Format(f, w.Batch.StartTime)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Batch_end_time, Strings.End, Quantity.DateTime, ItemCategory.Other, (w,t,u,f,p) => string.IsNullOrEmpty(f) ? w.Batch.EndTime.ToString() : string.Format(f, w.Batch.EndTime)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Unit_per_pulse_Read, "1 / PlsPerUnit_Read", Quantity.PulsePerUnit,ItemCategory.Other, (w,t,u,f,p) => FormatDbl(u, f, p, "V4", (w.WaterMeterData.PulsesPerLtr != 0) ? 1 / w.WaterMeterData.PulsesPerLtr : 0)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Lite_per_pulse_Read, "1 / PlsPerLtr_Read", Quantity.PulsePerLtr, ItemCategory.Other, (w,t,u,f,p) => FormatDbl(u, f, p, "V4", (w.WaterMeterData.PulsesPerLtr != 0) ? 1/w.WaterMeterData.PulsesPerLtr : 0)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Passed_meters_count, Strings.Passed_meters_count, Quantity.Number, ItemCategory.Other, (w,t,u,f,p) => FormatInt(f, w.Batch.PassedMetersCount())));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Failed_meters_count, Strings.Failed_meters_count, Quantity.Number, ItemCategory.Other, (w,t,u,f,p) => FormatInt(f, w.Batch.FailedMetersCount())));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Failed_meters_countE15, Strings.Failed_meters_count + "E15", Quantity.Number, ItemCategory.Other, (w,t,u,f,p) => FormatInt(f, w.Batch.FailedMetersCountE15())));
@@ -13,6 +13,5 @@ namespace SchematicDrawing
Common.Unit MsrdUnit { get; }
double MsrdValLimLo { get; }
double MsrdValLimHi { get; }
bool IsOffline { get; set; }
}
}
+1 -5
View File
@@ -672,11 +672,7 @@ namespace SchematicDrawing
SizeF size = e.Graphics.MeasureString(strVal, measuredValueFont);
Rectangle rect = new Rectangle(itm.X + itm.MsrdX, itm.Y + itm.MsrdY, (int)Math.Round(size.Width) + 4, (int)Math.Round(size.Height) + 2);
ItemElementRectangles.Add(new ItemElementRect(item, Element.MeasuredVal, rect));
if ((item as IDrawingItemWithMeasuredVal).IsOffline)
{
e.Graphics.FillRectangle(measuredValueErrorBackColor, rect);
}
else if (measuredValues[msrdValIx] >= itm.MsrdValLimLo && measuredValues[msrdValIx] <= itm.MsrdValLimHi)
if (measuredValues[msrdValIx] >= itm.MsrdValLimLo && measuredValues[msrdValIx] <= itm.MsrdValLimHi)
{
e.Graphics.FillRectangle(measuredValueBackColor, rect);
}
@@ -0,0 +1,5 @@
is_global = true
build_property.RootNamespace = SharedComponents
build_property.ProjectDir = C:\Users\micha\git\tbf\SharedComponents\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
@@ -1,16 +1,15 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\MFRNIAK\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\micha\.nuget\packages\</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.14.0</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\MFRNIAK\.nuget\packages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
<SourceRoot Include="C:\Users\micha\.nuget\packages\" />
</ItemGroup>
</Project>
-2
View File
@@ -44,8 +44,6 @@ namespace SharedDatabase.Forms
{
InitializeComponent();
this.Icon = Properties.Resources.TBF_icon;
loginStatePictureBox1.Image = Properties.Resources.questionMark;
loginStatePictureBox2.Image = Properties.Resources.questionMark;
authorizedUser1 = null;
-3
View File
@@ -31,9 +31,6 @@ namespace SharedDatabase.Forms
public EditSelectedUser()
{
InitializeComponent();
this.Icon = Properties.Resources.TBF_icon;
this.toolTip1.SetToolTip(this.txtName, string.Format(Strings.max_0_alphanum_chars, 20));
oriGroupMember = new bool[(displayedGroups != null) ? displayedGroups.Count : 0];
okBtn.Enabled = false;
-2
View File
@@ -45,8 +45,6 @@ namespace SharedDatabase.Forms
{
InitializeComponent();
this.Icon = Properties.Resources.TBF_icon;
oriBackColor = BackColor;
}
@@ -22,8 +22,6 @@ namespace SharedDatabase.Forms
public PasswordChangeDlg()
{
InitializeComponent();
this.Icon = Properties.Resources.TBF_icon;
}
/// <summary>
@@ -32,9 +30,6 @@ namespace SharedDatabase.Forms
public PasswordChangeDlg(string predefinedUser)
{
InitializeComponent();
this.Icon = Properties.Resources.TBF_icon;
userNameTextBox.Text = predefinedUser;
}
-2
View File
@@ -46,8 +46,6 @@ namespace SharedDatabase.Forms
{
InitializeComponent();
this.Icon = Properties.Resources.TBF_icon;
oriBackColor = BackColor;
}
-2
View File
@@ -46,8 +46,6 @@ namespace SharedDatabase.Forms
{
InitializeComponent();
this.Icon = Properties.Resources.TBF_icon;
loginStatePictureBox1.Image = Properties.Resources.questionMark;
loginStatePictureBox2.Image = Properties.Resources.questionMark;
loginStatePictureBox3.Image = Properties.Resources.questionMark;
@@ -35,9 +35,6 @@ namespace SharedDatabase.Forms
public UserManagementDlg(NHibernate.ISession session, bool showLocalExtensions)
{
InitializeComponent();
this.Icon = Properties.Resources.TBF_icon;
this.session = session;
this.showExtensions = showLocalExtensions;
if (showLocalExtensions) copyFromRemoteButton.Visible = true;
+1 -11
View File
@@ -19,7 +19,7 @@ namespace SharedDatabase.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 {
@@ -89,15 +89,5 @@ namespace SharedDatabase.Properties {
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
internal static System.Drawing.Icon TBF_icon {
get {
object obj = ResourceManager.GetObject("TBF_icon", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
}
}
-3
View File
@@ -127,7 +127,4 @@
<data name="rejected" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Pictures\rejected.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="TBF_icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\TBF_icon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

-3
View File
@@ -221,9 +221,6 @@
<None Include="Pictures\questionMark.bmp" />
<None Include="Pictures\rejected.bmp" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\TBF_icon.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
-28
View File
@@ -119,10 +119,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sensus.iPerl.TestConsole",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NfcS5_DLL", "..\NfcS5_DLL\NfcS5_DLL.csproj", "{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NfcC7_DLL", "NfcC7_DLL\NfcC7_DLL.csproj", "{53E75979-B530-4805-8FC9-B314F14A62BE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NfcC7_DLL.Tests", "NfcC7_DLL.Tests\NfcC7_DLL.Tests.csproj", "{715605C5-568B-48D6-9C09-2DC5F2E81F66}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -543,30 +539,6 @@ Global
{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
{53E75979-B530-4805-8FC9-B314F14A62BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{53E75979-B530-4805-8FC9-B314F14A62BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{53E75979-B530-4805-8FC9-B314F14A62BE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{53E75979-B530-4805-8FC9-B314F14A62BE}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{53E75979-B530-4805-8FC9-B314F14A62BE}.Debug|x86.ActiveCfg = Debug|Any CPU
{53E75979-B530-4805-8FC9-B314F14A62BE}.Debug|x86.Build.0 = Debug|Any CPU
{53E75979-B530-4805-8FC9-B314F14A62BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{53E75979-B530-4805-8FC9-B314F14A62BE}.Release|Any CPU.Build.0 = Release|Any CPU
{53E75979-B530-4805-8FC9-B314F14A62BE}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{53E75979-B530-4805-8FC9-B314F14A62BE}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{53E75979-B530-4805-8FC9-B314F14A62BE}.Release|x86.ActiveCfg = Release|Any CPU
{53E75979-B530-4805-8FC9-B314F14A62BE}.Release|x86.Build.0 = Release|Any CPU
{715605C5-568B-48D6-9C09-2DC5F2E81F66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{715605C5-568B-48D6-9C09-2DC5F2E81F66}.Debug|Any CPU.Build.0 = Debug|Any CPU
{715605C5-568B-48D6-9C09-2DC5F2E81F66}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{715605C5-568B-48D6-9C09-2DC5F2E81F66}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{715605C5-568B-48D6-9C09-2DC5F2E81F66}.Debug|x86.ActiveCfg = Debug|Any CPU
{715605C5-568B-48D6-9C09-2DC5F2E81F66}.Debug|x86.Build.0 = Debug|Any CPU
{715605C5-568B-48D6-9C09-2DC5F2E81F66}.Release|Any CPU.ActiveCfg = Release|Any CPU
{715605C5-568B-48D6-9C09-2DC5F2E81F66}.Release|Any CPU.Build.0 = Release|Any CPU
{715605C5-568B-48D6-9C09-2DC5F2E81F66}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{715605C5-568B-48D6-9C09-2DC5F2E81F66}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{715605C5-568B-48D6-9C09-2DC5F2E81F66}.Release|x86.ActiveCfg = Release|Any CPU
{715605C5-568B-48D6-9C09-2DC5F2E81F66}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
-44
View File
@@ -1,44 +0,0 @@
///
/// Copyright (c) 2017 Sensus Metering Systems
///
using System.Drawing;
using System.Windows.Forms;
namespace TBF.Boxes
{
public class CheckBoxImage : PictureBox
{
private bool cbChecked;
private readonly Image checkedImg;
private readonly Image uncheckedImg;
public CheckBoxImage()
: this(new Bitmap(TBF.Properties.Resources.SwitchOn), new Bitmap(TBF.Properties.Resources.SwitchOff), true)
{
SizeMode = PictureBoxSizeMode.StretchImage;
}
public CheckBoxImage(Image checkedImg, Image uncheckedImg, bool initState)
: base()
{
this.checkedImg = checkedImg;
this.uncheckedImg = uncheckedImg;
Click += (sender, e) => { Checked = !Checked; };
Checked = initState;
}
public bool Checked
{
get { return cbChecked; }
set
{
if (Enabled)
{
Image = value ? checkedImg : uncheckedImg;
cbChecked = value;
}
}
}
}
}
+3 -6
View File
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Sensus")]
[assembly: AssemblyProduct("TestBenchFramework")]
[assembly: AssemblyCopyright("Copyright © 2013 - 2025 Sensus Slovensko, a.s.")]
[assembly: AssemblyCopyright("Copyright © 2013 - 2023 Sensus Slovensko, a.s.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -19,9 +19,6 @@ using System.Runtime.InteropServices;
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
//Visibility to TBFTests internal classes
[assembly: InternalsVisibleTo("TBFTests")]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("2c13538e-15ee-48b2-af0f-2c95afb67186")]
@@ -32,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("3.9.3058.1")]
[assembly: AssemblyFileVersion("3.9.3058.1")]
[assembly: AssemblyVersion("3.9.2201.1")]
[assembly: AssemblyFileVersion("3.9.2201.1")]
+1 -11
View File
@@ -19,7 +19,7 @@ namespace TBF.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 {
@@ -150,16 +150,6 @@ namespace TBF.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
internal static System.Drawing.Icon TBF_icon {
get {
object obj = ResourceManager.GetObject("TBF_icon", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
-3
View File
@@ -208,7 +208,4 @@
<data name="TControl_XL_idle" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Rig\Modbus\TempControl\Pictures\TControl-XL-idle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="TBF_icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\TBF_icon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
+1 -1
View File
@@ -19,8 +19,8 @@
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
<applicationRequestMinimum>
<PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="site" />
<defaultAssemblyRequest permissionSetReference="Custom" />
<PermissionSet class="System.Security.PermissionSet" version="1" ID="Custom" SameSite="site" Unrestricted="true" />
</applicationRequestMinimum>
</security>
</trustInfo>
-5
View File
@@ -1,5 +0,0 @@
## Version History
| Version | Source of change | Target Environment | Title | Description |
|------------|----------------------|--------------------------------------------------------------|-----------------------------------------------------|------------------------------------|
| 3.9.2149.0 | Michal databse error | HeatMeters, Heat meter sensors, Procedure Dilog, Tab Process | Excanged columns value 'Sensor' and 'Heat meter sensor' | Fix in code ProcedureDlg, row 1851 |
-36
View File
@@ -4415,15 +4415,6 @@ namespace TBF.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Pulses per kilogram.
/// </summary>
internal static string PulsesPerKilogram {
get {
return ResourceManager.GetString("PulsesPerKilogram", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Pulses per kWh.
/// </summary>
@@ -4442,15 +4433,6 @@ namespace TBF.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Pulses per unit.
/// </summary>
internal static string PulsesPerUnit {
get {
return ResourceManager.GetString("PulsesPerUnit", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Pump.
/// </summary>
@@ -6269,15 +6251,6 @@ namespace TBF.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Test in calculation.
/// </summary>
internal static string Test_in_calculation {
get {
return ResourceManager.GetString("Test_in_calculation", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Test in progress.
/// </summary>
@@ -6713,15 +6686,6 @@ namespace TBF.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Units.
/// </summary>
internal static string Units {
get {
return ResourceManager.GetString("Units", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Unlock.
/// </summary>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-9
View File
@@ -126,13 +126,4 @@
<data name="ShowDialog" xml:space="preserve">
<value>Mostrar diálogo</value>
</data>
<data name="PulsesPerUnit" xml:space="preserve">
<value />
</data>
<data name="PulsesPerKilogram" xml:space="preserve">
<value />
</data>
<data name="Units" xml:space="preserve">
<value />
</data>
</root>
+32 -38
View File
@@ -117,6 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Activity" xml:space="preserve">
<value>Activité</value>
</data>
<data name="Confirmation" xml:space="preserve">
<value>Confirmation</value>
</data>
@@ -396,6 +399,9 @@
<data name="Tol_red_pct_chdr" xml:space="preserve">
<value>Toler rouge. [%]</value>
</data>
<data name="Test_time_s_chdr" xml:space="preserve">
<value>Temps test [s]</value>
</data>
<data name="Error_while_creating_DB_Reason" xml:space="preserve">
<value>Erreur lors de la création de la base de données. Raison:</value>
</data>
@@ -519,6 +525,9 @@
<data name="RelativeQto" xml:space="preserve">
<value>Q relatif à</value>
</data>
<data name="TargetQ" xml:space="preserve">
<value>Q cible [m3/h]</value>
</data>
<data name="Compound_meters" xml:space="preserve">
<value>Mètres composés</value>
</data>
@@ -609,9 +618,6 @@
<data name="Switching_flow_detection" xml:space="preserve">
<value>Détection flux commutation</value>
</data>
<data name="Activity" xml:space="preserve">
<value>Activité</value>
</data>
<data name="Progress" xml:space="preserve">
<value>Progrès</value>
</data>
@@ -882,7 +888,7 @@
<data name="Qrise" xml:space="preserve">
<value>Q hausse</value>
</data>
<data name="Serial_number" xml:space="preserve">
<data name="Serial_Number" xml:space="preserve">
<value>Numéro série</value>
</data>
<data name="State" xml:space="preserve">
@@ -933,9 +939,6 @@
<data name="Purchase_order" xml:space="preserve">
<value>Commande</value>
</data>
<data name="Project_number" xml:space="preserve">
<value>Numéro de projet</value>
</data>
<data name="Ambient_humidity" xml:space="preserve">
<value>Humidité ambiante</value>
</data>
@@ -1242,6 +1245,9 @@
<data name="Target_ref_pulses_" xml:space="preserve">
<value>Cible ref impulsions:</value>
</data>
<data name="Target_volume_l_" xml:space="preserve">
<value>Volume cible [l]:</value>
</data>
<data name="Save_column_widths" xml:space="preserve">
<value>Enregistrer largeurs colonne</value>
</data>
@@ -1380,6 +1386,9 @@
<data name="Last_changed_by" xml:space="preserve">
<value>Dernier changement dby</value>
</data>
<data name="Meter_types_tested" xml:space="preserve">
<value>Types compteurs testés</value>
</data>
<data name="Notes" xml:space="preserve">
<value>Remarques</value>
</data>
@@ -1662,9 +1671,6 @@
<data name="Protected_procedure" xml:space="preserve">
<value>Procédure protégée</value>
</data>
<data name="Empty" xml:space="preserve">
<value>Vidanger</value>
</data>
<data name="Session" xml:space="preserve">
<value>Session</value>
</data>
@@ -1707,6 +1713,9 @@
<data name="RFID_communication_failed" xml:space="preserve">
<value>Échec communication RFID</value>
</data>
<data name="Opto_head_was_disabled_by_the_user" xml:space="preserve">
<value>tête désactivée par utilisateur</value>
</data>
<data name="failed_0_1_exclamation" xml:space="preserve">
<value>{0}' exclamation échoué ({1}) !!!</value>
</data>
@@ -1794,6 +1803,9 @@
<data name="Refresh" xml:space="preserve">
<value>Rafraîchir</value>
</data>
<data name="current" xml:space="preserve">
<value>actuel</value>
</data>
<data name="Flow" xml:space="preserve">
<value>Couler</value>
</data>
@@ -1893,7 +1905,7 @@
<data name="Import" xml:space="preserve">
<value>Importation</value>
</data>
<data name="Repetition" xml:space="preserve">
<data name="repetition" xml:space="preserve">
<value>répétition</value>
</data>
<data name="Result" xml:space="preserve">
@@ -1977,9 +1989,6 @@
<data name="End_session" xml:space="preserve">
<value>Terminer le cycle</value>
</data>
<data name="Fill" xml:space="preserve">
<value>Inonder</value>
</data>
<data name="Pipeline" xml:space="preserve">
<value>Pipeline</value>
</data>
@@ -1992,40 +2001,25 @@
<data name="Q_tg" xml:space="preserve">
<value>Q obj.</value>
</data>
<data name="Empty" xml:space="preserve">
<value>Vidanger</value>
</data>
<data name="Empty_the_tank" xml:space="preserve">
<value>Vidanger réservoir</value>
</data>
<data name="Fill" xml:space="preserve">
<value>Inonder</value>
</data>
<data name="Current" xml:space="preserve">
<value>Curren</value>
</data>
<data name="Voltage" xml:space="preserve">
<value>Tension</value>
</data>
<data name="Project_number" xml:space="preserve">
<value>Numéro de projet</value>
</data>
<data name="ShowDialog" xml:space="preserve">
<value>Afficher la boîte de dialogue</value>
</data>
<data name="Meter_types_tested" xml:space="preserve">
<value>Types compteurs testés</value>
</data>
<data name="TargetQ" xml:space="preserve">
<value>Q cible [m3/h]</value>
</data>
<data name="Target_volume_l_" xml:space="preserve">
<value>Volume cible [l]:</value>
</data>
<data name="Opto_head_was_disabled_by_the_user" xml:space="preserve">
<value>tête désactivée par utilisateur</value>
</data>
<data name="Test_time_s_chdr" xml:space="preserve">
<value>Temps test [s]</value>
</data>
<data name="PulsesPerUnit" xml:space="preserve">
<value />
</data>
<data name="PulsesPerKilogram" xml:space="preserve">
<value />
</data>
<data name="Units" xml:space="preserve">
<value />
</data>
</root>
+58 -67
View File
@@ -117,6 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Activity" xml:space="preserve">
<value>Attività</value>
</data>
<data name="Confirmation" xml:space="preserve">
<value>conferma</value>
</data>
@@ -249,6 +252,9 @@
<data name="Nr" xml:space="preserve">
<value>numero</value>
</data>
<data name="Mass" xml:space="preserve">
<value>massa</value>
</data>
<data name="AddBtnText" xml:space="preserve">
<value>Aggiunta</value>
</data>
@@ -270,6 +276,12 @@
<data name="OkBtnText" xml:space="preserve">
<value>Ok</value>
</data>
<data name="Flow" xml:space="preserve">
<value>flusso</value>
</data>
<data name="Pressure" xml:space="preserve">
<value>pressione</value>
</data>
<data name="Invalid_username_or_password" xml:space="preserve">
<value>Username o password non validi</value>
</data>
@@ -387,6 +399,12 @@
<data name="Output_chdr" xml:space="preserve">
<value>Uscite</value>
</data>
<data name="Q_from_lph" xml:space="preserve">
<value>Qda [l/h]</value>
</data>
<data name="Q_to_lph" xml:space="preserve">
<value>Q a [l/h]</value>
</data>
<data name="Red_type_chdr" xml:space="preserve">
<value>tipo rosso</value>
</data>
@@ -396,6 +414,9 @@
<data name="Tol_red_pct_chdr" xml:space="preserve">
<value>tolleranza rossa [%]</value>
</data>
<data name="Test_time_s_chdr" xml:space="preserve">
<value>test time [s]</value>
</data>
<data name="Error_while_creating_DB_Reason" xml:space="preserve">
<value>errore durante la creazione del data base. ragioni:</value>
</data>
@@ -519,6 +540,9 @@
<data name="RelativeQto" xml:space="preserve">
<value>Q relativo a</value>
</data>
<data name="TargetQ" xml:space="preserve">
<value>target Q [m3/h]</value>
</data>
<data name="Compound_meters" xml:space="preserve">
<value>metri composti</value>
</data>
@@ -609,9 +633,6 @@
<data name="Switching_flow_detection" xml:space="preserve">
<value>rilevamento del flusso di commutazione</value>
</data>
<data name="Activity" xml:space="preserve">
<value>Attività</value>
</data>
<data name="Progress" xml:space="preserve">
<value>progressi</value>
</data>
@@ -882,7 +903,7 @@
<data name="Qrise" xml:space="preserve">
<value>Qalta</value>
</data>
<data name="Serial_number" xml:space="preserve">
<data name="Serial_Number" xml:space="preserve">
<value>Numero Seriale</value>
</data>
<data name="State" xml:space="preserve">
@@ -933,9 +954,6 @@
<data name="Purchase_order" xml:space="preserve">
<value>ordine acquisto</value>
</data>
<data name="Project_number" xml:space="preserve">
<value>Numero del progetto</value>
</data>
<data name="Ambient_humidity" xml:space="preserve">
<value>Umidità dell'ambiente</value>
</data>
@@ -963,6 +981,9 @@
<data name="Start" xml:space="preserve">
<value>Inizio</value>
</data>
<data name="AtTemperature_C" xml:space="preserve">
<value>@temperatura [°C]</value>
</data>
<data name="Density" xml:space="preserve">
<value>densità</value>
</data>
@@ -1104,15 +1125,15 @@
<data name="ID" xml:space="preserve">
<value>ID </value>
</data>
<data name="Focus" xml:space="preserve">
<value>messa a fuoco</value>
</data>
<data name="Grab" xml:space="preserve">
<value>afferrare</value>
</data>
<data name="Live" xml:space="preserve">
<value>dal vivo</value>
</data>
<data name="Camera" xml:space="preserve">
<value>Fotocamera</value>
</data>
<data name="Closing_the_tank" xml:space="preserve">
<value>chiusura del serbatoio</value>
</data>
@@ -1191,15 +1212,15 @@
<data name="Compound_meter_0" xml:space="preserve">
<value>misuratore composto {0}</value>
</data>
<data name="Error_" xml:space="preserve">
<value>Errore:</value>
</data>
<data name="Estimated_time_s_" xml:space="preserve">
<value>tempo stimato [s]:</value>
</data>
<data name="Mass_diff_kg_" xml:space="preserve">
<value>mass diff [kg]:</value>
</data>
<data name="Mass" xml:space="preserve">
<value>massa</value>
</data>
<data name="Meter" xml:space="preserve">
<value>metri</value>
</data>
@@ -1239,6 +1260,9 @@
<data name="Target_ref_pulses_" xml:space="preserve">
<value>Target ref. count:</value>
</data>
<data name="Target_volume_l_" xml:space="preserve">
<value>target volume [l]:</value>
</data>
<data name="Save_column_widths" xml:space="preserve">
<value>salva larghezza colonne</value>
</data>
@@ -1290,9 +1314,6 @@
<data name="Print_watermeter_results" xml:space="preserve">
<value>stampare i risultati dei contatori</value>
</data>
<data name="Save_again" xml:space="preserve">
<value>inviato</value>
</data>
<data name="Sent" xml:space="preserve">
<value>inviato</value>
</data>
@@ -1377,6 +1398,9 @@
<data name="Last_changed_by" xml:space="preserve">
<value>ultimo cambiato da </value>
</data>
<data name="Meter_types_tested" xml:space="preserve">
<value>tipi di contatori testati</value>
</data>
<data name="Notes" xml:space="preserve">
<value>note</value>
</data>
@@ -1548,6 +1572,9 @@
<data name="User_code" xml:space="preserve">
<value>codice utente</value>
</data>
<data name="Save_again" xml:space="preserve">
<value>inviato</value>
</data>
<data name="Failed_to_initialize_device_0_1_2" xml:space="preserve">
<value>Errore dispositivo '{0}':{1}{2}</value>
</data>
@@ -1659,8 +1686,8 @@
<data name="Protected_procedure" xml:space="preserve">
<value>Procedura protetta</value>
</data>
<data name="Empty" xml:space="preserve">
<value>Svuotare</value>
<data name="Drain" xml:space="preserve">
<value>Drenare</value>
</data>
<data name="Session" xml:space="preserve">
<value>Sessione</value>
@@ -1713,17 +1740,14 @@
<data name="Correction" xml:space="preserve">
<value>correzione</value>
</data>
<data name="Start_the_test_bench" xml:space="preserve">
<value>Avvio del banco prova</value>
<data name="Camera" xml:space="preserve">
<value>Fotocamera</value>
</data>
<data name="Finish_the_session_please" xml:space="preserve">
<value>Finire la misurazione perfavore</value>
</data>
<data name="Flow" xml:space="preserve">
<value>flusso</value>
</data>
<data name="Pressure" xml:space="preserve">
<value>pressione</value>
<data name="Start_the_test_bench" xml:space="preserve">
<value>Avvio del banco prova</value>
</data>
<data name="Flow_adjustment_failed" xml:space="preserve">
<value>Errore impostazione del flusso</value>
@@ -1737,6 +1761,12 @@
<data name="Abort_session" xml:space="preserve">
<value>Interrompere</value>
</data>
<data name="Empty" xml:space="preserve">
<value>Svuotare</value>
</data>
<data name="Empty_the_tank" xml:space="preserve">
<value>Svuotare il serbatoio</value>
</data>
<data name="End_session" xml:space="preserve">
<value>Finire il ciclo</value>
</data>
@@ -1749,55 +1779,16 @@
<data name="Start_cycle" xml:space="preserve">
<value>Avviare il ciclo</value>
</data>
<data name="Empty_the_tank" xml:space="preserve">
<value>Svuotare il serbatoio</value>
</data>
<data name="Current" xml:space="preserve">
<value>Corrente</value>
</data>
<data name="Voltage" xml:space="preserve">
<value>Voltaggio</value>
</data>
<data name="Project_number" xml:space="preserve">
<value>Numero del progetto</value>
</data>
<data name="ShowDialog" xml:space="preserve">
<value>Mostra dialogo</value>
</data>
<data name="Meter_types_tested" xml:space="preserve">
<value>tipi di contatori testati</value>
</data>
<data name="Q_from_lph" xml:space="preserve">
<value>Qda [l/h]</value>
</data>
<data name="Q_to_lph" xml:space="preserve">
<value>Q a [l/h]</value>
</data>
<data name="TargetQ" xml:space="preserve">
<value>target Q [m3/h]</value>
</data>
<data name="Target_volume_l_" xml:space="preserve">
<value>target volume [l]:</value>
</data>
<data name="Test_time_s_chdr" xml:space="preserve">
<value>test time [s]</value>
</data>
<data name="AtTemperature_C" xml:space="preserve">
<value>@temperatura [°C]</value>
</data>
<data name="Focus" xml:space="preserve">
<value>messa a fuoco</value>
</data>
<data name="Error_" xml:space="preserve">
<value>Errore:</value>
</data>
<data name="Drain" xml:space="preserve">
<value>Drenare</value>
</data>
<data name="PulsesPerUnit" xml:space="preserve">
<value />
</data>
<data name="PulsesPerKilogram" xml:space="preserve">
<value />
</data>
<data name="Units" xml:space="preserve">
<value />
</data>
</root>
File diff suppressed because it is too large Load Diff
+4 -15
View File
@@ -198,10 +198,10 @@
<data name="Reg_valve" xml:space="preserve">
<value>Reg. valve</value>
</data>
<data name="RegulMinStep" xml:space="preserve">
<data name="RegulMinStep" xml:space="preserve">
<value>Reg. min step</value>
</data>
<data name="Application_Diagnostic" xml:space="preserve">
<data name="Application_Diagnostic" xml:space="preserve">
<value>Application diagnostic</value>
</data>
<data name="Balance" xml:space="preserve">
@@ -2449,7 +2449,7 @@
<data name="Upgrade_DB" xml:space="preserve">
<value>Upgrade database</value>
</data>
<data name="AppDiagnostic" xml:space="preserve">
<data name="AppDiagnostic" xml:space="preserve">
<value>Application diagnostic</value>
</data>
<data name="About" xml:space="preserve">
@@ -2473,16 +2473,5 @@
<data name="SaveCommunication" xml:space="preserve">
<value>Save Communication</value>
</data>
<data name="PulsesPerUnit" xml:space="preserve">
<value>Pulses per unit</value>
</data>
<data name="PulsesPerKilogram" xml:space="preserve">
<value>Pulses per kilogram</value>
</data>
<data name="Units" xml:space="preserve">
<value>Units</value>
</data>
<data name="Test_in_calculation" xml:space="preserve">
<value>Test in calculation</value>
</data>
</root>
File diff suppressed because it is too large Load Diff
+76 -85
View File
@@ -117,6 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Activity" xml:space="preserve">
<value>Активность</value>
</data>
<data name="Confirmation" xml:space="preserve">
<value>Подтверждение</value>
</data>
@@ -180,12 +183,6 @@
<data name="P_out" xml:space="preserve">
<value>P вниз</value>
</data>
<data name="Q_from" xml:space="preserve">
<value>Q от</value>
</data>
<data name="Q_to" xml:space="preserve">
<value>Q до</value>
</data>
<data name="Reference" xml:space="preserve">
<value>Ссылка</value>
</data>
@@ -243,6 +240,9 @@
<data name="Nr" xml:space="preserve">
<value>№</value>
</data>
<data name="Mass" xml:space="preserve">
<value>Масса</value>
</data>
<data name="AddBtnText" xml:space="preserve">
<value>Добавить</value>
</data>
@@ -264,6 +264,12 @@
<data name="OkBtnText" xml:space="preserve">
<value>OK</value>
</data>
<data name="Flow" xml:space="preserve">
<value>Расход</value>
</data>
<data name="Pressure" xml:space="preserve">
<value>Давление</value>
</data>
<data name="Username" xml:space="preserve">
<value>Имя пользователя</value>
</data>
@@ -378,6 +384,12 @@
<data name="Output_chdr" xml:space="preserve">
<value>Выход</value>
</data>
<data name="Q_from_lph" xml:space="preserve">
<value>Q от [л/ч]</value>
</data>
<data name="Q_to_lph" xml:space="preserve">
<value>Q до [л/ч]</value>
</data>
<data name="Red_type_chdr" xml:space="preserve">
<value>Тип сокращ.</value>
</data>
@@ -387,6 +399,9 @@
<data name="Tol_red_pct_chdr" xml:space="preserve">
<value>Toler. red. [%]</value>
</data>
<data name="Test_time_s_chdr" xml:space="preserve">
<value>Время теста [с]</value>
</data>
<data name="Error_while_creating_DB_Reason" xml:space="preserve">
<value>Ошибка при создании базы данных. Причина:</value>
</data>
@@ -510,6 +525,9 @@
<data name="RelativeQto" xml:space="preserve">
<value>Относительный Q до</value>
</data>
<data name="TargetQ" xml:space="preserve">
<value>Заданный Q [м3/ч]</value>
</data>
<data name="Compound_meters" xml:space="preserve">
<value>Комбинированные счетчики</value>
</data>
@@ -600,9 +618,6 @@
<data name="Switching_flow_detection" xml:space="preserve">
<value>Переключение потока</value>
</data>
<data name="Activity" xml:space="preserve">
<value>Активность</value>
</data>
<data name="Progress" xml:space="preserve">
<value>Прогресс</value>
</data>
@@ -873,7 +888,7 @@
<data name="Qrise" xml:space="preserve">
<value>Qпониж</value>
</data>
<data name="Serial_number" xml:space="preserve">
<data name="Serial_Number" xml:space="preserve">
<value>Серийный номер</value>
</data>
<data name="State" xml:space="preserve">
@@ -924,9 +939,6 @@
<data name="Purchase_order" xml:space="preserve">
<value>Заказ</value>
</data>
<data name="Project_number" xml:space="preserve">
<value>Номер проекта</value>
</data>
<data name="Ambient_humidity" xml:space="preserve">
<value>Относительная влажность окружающей среды</value>
</data>
@@ -954,6 +966,9 @@
<data name="Start" xml:space="preserve">
<value>Старт</value>
</data>
<data name="AtTemperature_C" xml:space="preserve">
<value>температура [°C]</value>
</data>
<data name="Density" xml:space="preserve">
<value>Плотность</value>
</data>
@@ -981,6 +996,12 @@
<data name="Qt" xml:space="preserve">
<value>Qt</value>
</data>
<data name="cold" xml:space="preserve">
<value>холодный</value>
</data>
<data name="hot" xml:space="preserve">
<value>горячий</value>
</data>
<data name="Water" xml:space="preserve">
<value>Вода</value>
</data>
@@ -1089,6 +1110,9 @@
<data name="ID" xml:space="preserve">
<value>ID</value>
</data>
<data name="Focus" xml:space="preserve">
<value>Сфокусировать</value>
</data>
<data name="Grab" xml:space="preserve">
<value>Захватить</value>
</data>
@@ -1179,9 +1203,6 @@
<data name="Mass_diff_kg_" xml:space="preserve">
<value>Mass diff. [kg]:</value>
</data>
<data name="Mass" xml:space="preserve">
<value>Масса</value>
</data>
<data name="Meter" xml:space="preserve">
<value>Счетчик</value>
</data>
@@ -1221,6 +1242,9 @@
<data name="Target_ref_pulses_" xml:space="preserve">
<value>Target ref. count:</value>
</data>
<data name="Target_volume_l_" xml:space="preserve">
<value>Заданный объем [л]:</value>
</data>
<data name="Save_column_widths" xml:space="preserve">
<value>Сохранить ширину столбцов</value>
</data>
@@ -1272,6 +1296,9 @@
<data name="Print_watermeter_results" xml:space="preserve">
<value>Печатать результатов водосчетчиков</value>
</data>
<data name="Again" xml:space="preserve">
<value>Снова</value>
</data>
<data name="Sent" xml:space="preserve">
<value>Отправлено</value>
</data>
@@ -1356,6 +1383,9 @@
<data name="Last_changed_by" xml:space="preserve">
<value>Изменено</value>
</data>
<data name="Meter_types_tested" xml:space="preserve">
<value>Типы испытываемых счетчиков</value>
</data>
<data name="Notes" xml:space="preserve">
<value>Заметки</value>
</data>
@@ -1527,57 +1557,6 @@
<data name="User_code" xml:space="preserve">
<value>Код пользователя</value>
</data>
<data name="Resetting_scales" xml:space="preserve">
<value>Сброс весов</value>
</data>
<data name="Correction" xml:space="preserve">
<value>Коррекция</value>
</data>
<data name="Flow" xml:space="preserve">
<value>Расход</value>
</data>
<data name="Pressure" xml:space="preserve">
<value>Давление</value>
</data>
<data name="Result" xml:space="preserve">
<value>Результат</value>
</data>
<data name="Evaporation" xml:space="preserve">
<value>испарение</value>
</data>
<data name="String1" xml:space="preserve">
<value>Строка 1</value>
</data>
<data name="Current" xml:space="preserve">
<value>Current</value>
</data>
<data name="Voltage" xml:space="preserve">
<value>Voltage</value>
</data>
<data name="cold" xml:space="preserve">
<value>холодный</value>
</data>
<data name="hot" xml:space="preserve">
<value>горячий</value>
</data>
<data name="Test_method2" xml:space="preserve">
<value>Метод испытаний 2</value>
</data>
<data name="Meter_types_tested" xml:space="preserve">
<value>Типы испытываемых счетчиков</value>
</data>
<data name="Short_dercription" xml:space="preserve">
<value>Краткое описание</value>
</data>
<data name="Q_from_lph" xml:space="preserve">
<value>Q от [л/ч]</value>
</data>
<data name="Q_to_lph" xml:space="preserve">
<value>Q до [л/ч]</value>
</data>
<data name="TargetQ" xml:space="preserve">
<value>Заданный Q [м3/ч]</value>
</data>
<data name="P_in_end" xml:space="preserve">
<value>P вверх конец</value>
</data>
@@ -1590,31 +1569,43 @@
<data name="P_out_start" xml:space="preserve">
<value>P вниз начало</value>
</data>
<data name="Target_volume_l_" xml:space="preserve">
<value>Заданный объем [л]:</value>
<data name="Q_from" xml:space="preserve">
<value>Q от</value>
</data>
<data name="Test_time_s_chdr" xml:space="preserve">
<value>Время теста [с]</value>
</data>
<data name="AtTemperature_C" xml:space="preserve">
<value>температура [°C]</value>
</data>
<data name="Focus" xml:space="preserve">
<value>Сфокусировать</value>
<data name="Q_to" xml:space="preserve">
<value>Q до</value>
</data>
<data name="ROI_Detection_in_ProgressROI_Detection_in_Progress" xml:space="preserve">
<value>Продолжается распознавание</value>
</data>
<data name="Again" xml:space="preserve">
<value>Снова</value>
<data name="String1" xml:space="preserve">
<value>Строка 1</value>
</data>
<data name="PulsesPerUnit" xml:space="preserve">
<value />
<data name="Test_method2" xml:space="preserve">
<value>Метод испытаний 2</value>
</data>
<data name="PulsesPerKilogram" xml:space="preserve">
<value />
<data name="Short_dercription" xml:space="preserve">
<value>Краткое описание</value>
</data>
<data name="Units" xml:space="preserve">
<value />
<data name="Correction" xml:space="preserve">
<value>Коррекция</value>
</data>
<data name="Resetting_scales" xml:space="preserve">
<value>Сброс весов</value>
</data>
<data name="Result" xml:space="preserve">
<value>Результат</value>
</data>
<data name="Evaporation" xml:space="preserve">
<value>испарение</value>
</data>
<data name="Current" xml:space="preserve">
<value>Current</value>
</data>
<data name="Voltage" xml:space="preserve">
<value>Voltage</value>
</data>
<data name="Project_number" xml:space="preserve">
<value>Номер проекта</value>
</data>
</root>
+29 -41
View File
@@ -117,51 +117,33 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Error" xml:space="preserve">
<value>Chyba</value>
</data>
<data name="Sensor" xml:space="preserve">
<value>Senzor</value>
<data name="Activity" xml:space="preserve">
<value>Činnosť</value>
</data>
<data name="CancelBtnText" xml:space="preserve">
<value>Zrušiť</value>
</data>
<data name="OkBtnText" xml:space="preserve">
<value>Áno</value>
</data>
<data name="Exit" xml:space="preserve">
<value>Ukončiť</value>
<data name="Compound" xml:space="preserve">
<value>Združený</value>
</data>
<data name="Compound_meters" xml:space="preserve">
<value>Združené vodomery</value>
</data>
<data name="Activity" xml:space="preserve">
<value>Činnosť</value>
</data>
<data name="Compound" xml:space="preserve">
<value>Združený</value>
</data>
<data name="Serial_number" xml:space="preserve">
<value>Sériové číslo</value>
</data>
<data name="Project_number" xml:space="preserve">
<value>Číslo projektu</value>
<data name="Error" xml:space="preserve">
<value>Chyba</value>
</data>
<data name="Language" xml:space="preserve">
<value>Jazyk</value>
</data>
<data name="Paths" xml:space="preserve">
<value>Cesty</value>
</data>
<data name="Meter" xml:space="preserve">
<value>Merač</value>
</data>
<data name="RFID_communication_failed" xml:space="preserve">
<value>Zlyhala RFID komunikácia</value>
<data name="OkBtnText" xml:space="preserve">
<value>Áno</value>
</data>
<data name="Head_was_disabled_by_the_user" xml:space="preserve">
<value>Hlavica bola vypnutá používateľom</value>
</data>
<data name="RFID_communication_failed" xml:space="preserve">
<value>Zlyhala RFID komunikácia</value>
</data>
<data name="Level" xml:space="preserve">
<value>Hladina</value>
</data>
@@ -174,9 +156,15 @@
<data name="Side" xml:space="preserve">
<value>Strana</value>
</data>
<data name="Meter" xml:space="preserve">
<value>Merač</value>
</data>
<data name="Result" xml:space="preserve">
<value>Výsledok</value>
</data>
<data name="Sensor" xml:space="preserve">
<value>Senzor</value>
</data>
<data name="Mute_alarm" xml:space="preserve">
<value>Stlmiť sirénu</value>
</data>
@@ -229,6 +217,9 @@
<data name="Production_order_and_serial_numbers" xml:space="preserve">
<value>Výrobná zákazka a sériové čísla</value>
</data>
<data name="Serial_number" xml:space="preserve">
<value>Sériové číslo</value>
</data>
<data name="Serial_numbers" xml:space="preserve">
<value>Sériové čísla</value>
</data>
@@ -244,22 +235,19 @@
<data name="Do_you_really_want_to_delete_all_codes_Q" xml:space="preserve">
<value>Naozaj chcete vymazať všetky kódy ?</value>
</data>
<data name="Exit" xml:space="preserve">
<value>Ukončiť</value>
</data>
<data name="Paths" xml:space="preserve">
<value>Cesty</value>
</data>
<data name="Project_number" xml:space="preserve">
<value>Číslo projektu</value>
</data>
<data name="ShowDialog" xml:space="preserve">
<value>Zobraz dialóg</value>
</data>
<data name="SaveCommunication" xml:space="preserve">
<value>Ulož komunikáciu</value>
</data>
<data name="PulsesPerUnit" xml:space="preserve">
<value />
</data>
<data name="PulsesPerKilogram" xml:space="preserve">
<value />
</data>
<data name="Units" xml:space="preserve">
<value />
</data>
<data name="Test_in_calculation" xml:space="preserve">
<value>Prebieha výpočet</value>
</data>
</root>
File diff suppressed because it is too large Load Diff
Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

+5 -8
View File
@@ -73,11 +73,8 @@ namespace TBF.Rig.Ambient.Comet
[XmlIgnore]
public IList<GNode> GNodes { get; set; }
[XmlIgnore]
public bool IsOffline { get; set; }
/// Private parameterless constructor invoked by all other (public) constructors
AmbientCfg()
/// Private parameterless constructor invoked by all other (public) constructors
AmbientCfg()
{
GNodes = new List<GNode>();
Format = string.Empty;
@@ -131,15 +128,15 @@ namespace TBF.Rig.Ambient.Comet
"Stop bits", /// 4
"Handshake", /// 5
"Set DTR to one", /// 6
"Units of temperature", /// 7
"Unit of temperature", /// 7
"Temperature limit Lo", /// 8
"Temperature limit Hi", /// 9
"Default temperature", /// 10
"Units of pressure", /// 11
"Unit of pressure", /// 11
"Pressure limit Lo", /// 12
"Pressure limit Hi", /// 13
"Default pressure", /// 14
"Units of rel. humidity", /// 15
"Unit of rel. humidity", /// 15
"Rel. humidity limit Lo", /// 16
"Rel. humidity limit Hi", /// 17
"Default retl. humidity", /// 18
-3
View File
@@ -72,9 +72,6 @@ namespace TBF.Rig.Ambient.Greco
[XmlIgnore]
public IList<GNode> GNodes { get; set; }
[XmlIgnore]
public bool IsOffline { get; set; }
/// Private parameterless constructor invoked by all other (public) constructors
AmbientCfg()
{
-4
View File
@@ -67,13 +67,11 @@ namespace TBF.Rig.BuiltIn.PumpTandem
if (pump1 is BuiltIn.Pump.Pump) { mask1 = (pump1 as BuiltIn.Pump.Pump).Mask; }
else if (pump1 is Danfoss.VLT2800.Pump) { mask1 = (pump1 as Danfoss.VLT2800.Pump).Mask; }
else if (pump1 is Modbus.PumpFM.DanfossVLT.Pump) { mask1 = (pump1 as Modbus.PumpFM.DanfossVLT.Pump).Mask; }
else if (pump1 is Modbus.PumpFM.Grundfoss.Pump) { mask1 = (pump1 as Modbus.PumpFM.Grundfoss.Pump).Mask; }
else { mask1 = 0; }
if (pump2 is BuiltIn.Pump.Pump) { mask2 = (pump2 as BuiltIn.Pump.Pump).Mask; }
else if (pump2 is Danfoss.VLT2800.Pump) { mask2 = (pump2 as Danfoss.VLT2800.Pump).Mask; }
else if (pump2 is Modbus.PumpFM.DanfossVLT.Pump) { mask2 = (pump2 as Modbus.PumpFM.DanfossVLT.Pump).Mask; }
else if (pump2 is Modbus.PumpFM.Grundfoss.Pump) { mask2 = (pump2 as Modbus.PumpFM.Grundfoss.Pump).Mask; }
else { mask2 = 0; }
log.FatalFormat("{0} initialized: {1}", Name, this);
@@ -111,7 +109,6 @@ namespace TBF.Rig.BuiltIn.PumpTandem
public void TurnOff()
{
log.DebugFormat("{0}.TurnOff()", Name);
if ((pumpFm1 != null) && (pumpFm2 != null))
{
pumpFm1.TurnOff();
@@ -121,7 +118,6 @@ namespace TBF.Rig.BuiltIn.PumpTandem
{
// TODO
}
log.DebugFormat("DONE {0}.TurnOff()", Name);
}
@@ -44,7 +44,6 @@ namespace TBF.Rig.BuiltIn.PumpTandem
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is BuiltIn.Pump.PumpFactory ||
TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Danfoss.VLT2800.PumpFactory ||
TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Modbus.PumpFM.DanfossVLT.Factory ||
TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Modbus.PumpFM.Grundfoss.Factory ||
TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is BuiltIn.PumpTandem.PumpFactory)
{
pump1ComboBox.Items.Add(cmpnt.Name);
+2 -4
View File
@@ -120,8 +120,7 @@ namespace TBF.Rig.BuiltIn
if (valve is PumpTandem.Pump) point.MasksOpen |= (valve as PumpTandem.Pump).Mask;
if (valve is Danfoss.VLT2800.Pump) point.MasksOpen |= (valve as Danfoss.VLT2800.Pump).Mask;
if (valve is Modbus.PumpFM.DanfossVLT.Pump) point.MasksOpen |= (valve as Modbus.PumpFM.DanfossVLT.Pump).Mask;
if (valve is Modbus.PumpFM.Grundfoss.Pump) point.MasksOpen |= (valve as Modbus.PumpFM.Grundfoss.Pump).Mask;
}
}
point.MasksClose = 0;
foreach (var valve in point.VClose)
{
@@ -130,8 +129,7 @@ namespace TBF.Rig.BuiltIn
if (valve is PumpTandem.Pump) point.MasksClose |= (valve as PumpTandem.Pump).Mask;
if (valve is Danfoss.VLT2800.Pump) point.MasksClose |= (valve as Danfoss.VLT2800.Pump).Mask;
if (valve is Modbus.PumpFM.DanfossVLT.Pump) point.MasksClose |= (valve as Modbus.PumpFM.DanfossVLT.Pump).Mask;
if (valve is Modbus.PumpFM.Grundfoss.Pump) point.MasksClose |= (valve as Modbus.PumpFM.Grundfoss.Pump).Mask;
}
}
point.TimeSec += timeShift;
}
}
-2
View File
@@ -35,7 +35,6 @@ namespace TBF.Rig.BuiltIn
if (vlv is Pump.Pump && ((vlv as Pump.Pump).Mask & changed) == 0) continue;
if (vlv is Danfoss.VLT2800.Pump && ((vlv as Danfoss.VLT2800.Pump).Mask & changed) == 0) continue;
if (vlv is Modbus.PumpFM.DanfossVLT.Pump && ((vlv as Modbus.PumpFM.DanfossVLT.Pump).Mask & changed) == 0) continue;
if (vlv is Modbus.PumpFM.Grundfoss.Pump && ((vlv as Modbus.PumpFM.Grundfoss.Pump).Mask & changed) == 0) continue;
if ((vlv != null) && (vlv.Delay > max)) max = vlv.Delay;
}
@@ -46,7 +45,6 @@ namespace TBF.Rig.BuiltIn
if (vlv is Pump.Pump && ((vlv as Pump.Pump).Mask & changed) == 0) continue;
if (vlv is Danfoss.VLT2800.Pump && ((vlv as Danfoss.VLT2800.Pump).Mask & changed) == 0) continue;
if (vlv is Modbus.PumpFM.DanfossVLT.Pump && ((vlv as Modbus.PumpFM.DanfossVLT.Pump).Mask & changed) == 0) continue;
if (vlv is Modbus.PumpFM.Grundfoss.Pump && ((vlv as Modbus.PumpFM.Grundfoss.Pump).Mask & changed) == 0) continue;
if ((vlv != null) && (vlv.Delay > max)) max = vlv.Delay;
}
@@ -2,7 +2,6 @@
/// Copyright (c) 2021-2023 Sensus Slovensko a.s.
///
using System;
using Common;
using log4net;
using TBF.Rig.Sequences;
@@ -12,10 +11,6 @@ namespace TBF.Rig.ControlBoard.Uni
{
private static readonly ILog log = LogManager.GetLogger(typeof(FlyingStartStopTestOp));
public override string ToString() { return string.Format("FlyingStartStopTestOp()"); }
private DateTime startTimeForSimulation;
private bool simulationTimerStarted = false;
/// Arguments of the constructor
readonly UniCB uniCB;
@@ -128,28 +123,6 @@ namespace TBF.Rig.ControlBoard.Uni
{
log.DebugFormat("Op.Run() opState={0}", opState);
//Simulation of processing time 25 seconds
if (uniCB.DebugLevel == DebugMode.Simulate)
{
if (opState == OpState.StartingTest)
{
startTimeForSimulation = DateTime.Now;
simulationTimerStarted = false;
}
if (opState == OpState.TestInProgress)
{
if (!simulationTimerStarted)
{
startTimeForSimulation = DateTime.Now;
simulationTimerStarted = true;
}
else if (DateTime.Now - startTimeForSimulation > TimeSpan.FromSeconds(25))
{
return Event.TestCompleted;
}
}
}
switch (opState)
{
case OpState.StartingTest:
@@ -175,8 +148,8 @@ namespace TBF.Rig.ControlBoard.Uni
double reqFlowLo = (0.7 * qFrom) + (0.3 * reqFlowAve); /// Move the lower limit 15% of the range up
double reqFlowHi = (0.7 * qTo) + (0.3 * reqFlowAve); /// Move the upper limit 15% of the range down
///
uniCB.SetFlow(false, regV.Idx1, flowMeter.NominalFreq * reqFlowLo / flowMeter.NominalFlow,
flowMeter.NominalFreq * reqFlowHi / flowMeter.NominalFlow);
uniCB.SetFlow(false, regV.Idx1, 2000.0 * reqFlowLo / flowMeter.NominalFlow,
2000.0 * reqFlowHi / flowMeter.NominalFlow);
if (readDivTransition)
{
/// Schedule reading diverter transition data
@@ -5,7 +5,6 @@ using System;
using System.Reflection;
using System.Text;
using System.Windows.Forms;
using Common;
using log4net;
using TBF.Rig.GenericDevices;
@@ -25,9 +24,6 @@ namespace TBF.Rig.ControlBoard.Uni
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)
private DateTime startTimeForSimulation;
private bool simulationTimerStarted = false;
///
/// Internal state of this operation
@@ -187,28 +183,6 @@ namespace TBF.Rig.ControlBoard.Uni
{
log.DebugFormat("Run() opState={0}", opState);
//Simulation of processing time 25 seconds
if (uniCB.DebugLevel == DebugMode.Simulate)
{
if (opState == OpState.StartingTest)
{
startTimeForSimulation = DateTime.Now;
simulationTimerStarted = false;
}
if (opState == OpState.TestInProgress)
{
if (!simulationTimerStarted)
{
startTimeForSimulation = DateTime.Now;
simulationTimerStarted = true;
}
else if (DateTime.Now - startTimeForSimulation > TimeSpan.FromSeconds(25))
{
return Event.TestCompleted;
}
}
}
switch (opState)
{
case OpState.StartingTest:
+16 -65
View File
@@ -8,6 +8,7 @@ using System.IO;
using System.IO.Ports;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using log4net;
using Common;
using Config.Entities;
@@ -526,6 +527,17 @@ namespace TBF.Rig.ControlBoard.Uni
Bridge.OnStateMachineTick(this, new StateMachineTickEventArgs(route, ProcessData.MsrmntAvailableFlags, ProcessData.MeasuredValues,
ProcessData.AltStrings, ProcessData.Setpoints, ProcessData.CustomBitmaps));
/// Make simulation to finish - count
if (cbCfg.DebugLevel == DebugMode.Simulate)
{
_ = Task.Run(async () =>
{
await Task.Delay(5000);
Data.State |= (ulong)StatusP.TestCompleted;
log.Debug("Simulation StatusP.TestCompleted in background.");
});
}
/// Make sure the serial port is open
if (cbCfg.DebugLevel == DebugMode.Normal && (serialPort == null || !serialPort.IsOpen))
{
@@ -803,60 +815,12 @@ namespace TBF.Rig.ControlBoard.Uni
/// </summary>
public void SetFlow(bool isFromUI, int regVId, double freqLo, double freqHi, int regulationMinStep = 0)
{
LiveLogDiag.Log1("----------------------------------------");
LiveLogDiag.Log1(
"SetFlow() >> ENTER isFromUI={0} regVId={1} freqLo={2} freqHi={3} regulationMinStep={4} IsUIBlocked={5}",
isFromUI, regVId, freqLo, freqHi, regulationMinStep, IsUIBlocked);
if (IsUIBlocked && isFromUI) return;
if (IsUIBlocked && isFromUI)
{
LiveLogDiag.Log1(
"SetFlow() >> EXIT (UI BLOCKED) isFromUI={0}",
isFromUI);
return;
}
actionQueue.Enqueue(Action.SetFlow(isFromUI, regVId, freqLo, freqHi, Convert.ToInt32(Math.Round(Devices.PidCoef)), 200, regulationMinStep));
log.InfoFormat("Enqueue( SetFlow(rv={0}, fLo={1}, fHi={2}, pid={3}) )", regVId, freqLo, freqHi, Convert.ToInt32(Math.Round(Devices.PidCoef)));
int pid = Convert.ToInt32(Math.Round(Devices.PidCoef));
int fixedParam = 200;
LiveLogDiag.Log1(
"SetFlow() >> PREPARE pid={0} fixedParam={1} regulationMinStep={2}",
pid, fixedParam, regulationMinStep);
var action = Action.SetFlow(
isFromUI,
regVId,
freqLo,
freqHi,
pid,
fixedParam,
regulationMinStep);
LiveLogDiag.Log1(
"SetFlow() >> ACTION CREATED: rv={0} fLo={1} fHi={2} pid={3} p6={4} minStep={5}",
regVId, freqLo, freqHi, pid, fixedParam, regulationMinStep);
actionQueue.Enqueue(action);
LiveLogDiag.Log1(
"SetFlow() >> ENQUEUED actionQueue.Count={0}",
actionQueue.Count);
log.InfoFormat(
"Enqueue( SetFlow(rv={0}, fLo={1}, fHi={2}, pid={3}) )",
regVId, freqLo, freqHi, pid);
int i = 0;
foreach (var a in actionQueue)
{
LiveLogDiag.Log1(
"SetFlow() >> QUEUE[{0}] = {1}",
i++, a);
log.DebugFormat(" {0}", a);
}
LiveLogDiag.Log1("SetFlow() >> EXIT");
LiveLogDiag.Log1("----------------------------------------");
foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
}
public void StartTest(bool isFromUI, int flowMId, int divId, int divThreshold,
@@ -1029,18 +993,5 @@ namespace TBF.Rig.ControlBoard.Uni
{
/// TODO
}
/// <summary>
/// Logging
/// For activation use compilation condition: LIVELOGDIAG_FlowMeter_cs
/// </summary>
static class LiveLogDiag
{
[Conditional("LIVELOGDIAG_UniCB_cs")]
public static void Log1(string format, params object[] args)
{
LiveLogCache.Instance.AddLog("UniCB.cs LOG>> " + string.Format(format, args));
}
}
}
}
-3
View File
@@ -66,9 +66,6 @@ namespace TBF.Rig.ControlBoard.Uni
[XmlIgnore]
public IList<GEdge> EdgesToSet { get; set; }
[XmlIgnore]
public bool IsOffline { get; set; }
/// Private parameterless constructor invoked by all other (public) constructors
UniCBCfg()
{
-2
View File
@@ -332,8 +332,6 @@ namespace TBF.Rig.Danfoss.VLT2800
Telegram.UpdateTelegramChecksum(msg);
}
SendData(msg);
log.DebugFormat("DONE {0}.TurnOff()", Name);
}
@@ -57,9 +57,6 @@ namespace TBF.Rig.DataEntry.Combined
public CycleBeginningForm(int compoundWaterMetersCount, bool remarksEnabled)
{
InitializeComponent();
this.Icon = Properties.Resources.TBF_icon;
ControlBox = false;
TextBoxesCount = 3;

Some files were not shown because too many files have changed in this diff Show More