Compare commits

..
Author SHA1 Message Date
michal 4abe8509b8 Volume rollOver Logic upgrade
Update AssemblyVersion to 3.9.2208.2 and refine OptoTelegramRaw volume unwrap logic:

- Simplify and correct `VOL_LITERS_PER_TICK` and `VOL_RANGE` calculations.
- Fix volume unwrap logic in `UpdateFromSmart` for improved accuracy.
2026-02-27 14:49:03 +01:00
michal 5a254c9ebd Fix lock timeout, open serial COM timeout
Refactor iPerl communication and improve robustness:

- Enhance `OpenOptoSerialPort` with async `Open()` and timeout handling.
- Improve exception handling in `ReadOptoData`, logging timeouts and errors.
- Add null checks for `outPath` components (`FlowMeter`, `Scale`) in `SequenceBase`.
- Update `AssemblyVersion` and `AssemblyFileVersion` to 3.9.2208.1.
2026-02-26 13:53:37 +01:00
michal f67f9e50a0 Update AssemblyVersion and AssemblyFileVersion to 3.9.2207.1 2026-02-26 10:40:28 +01:00
michal 1d2b6e9b48 auto close dialog UNI, fix roll over time Iperl ASIC
Refactor iPerl communication system and add unit tests:

- Update `IperlHead` logic: Fix `VolumeFromSamples` calculation by refining sample filtering and averaging logic.
- Introduce `AutoClickOkAfterDelay` in `CycleBgEnForm` and `TestStartEndForm` for automated dialog interactions.
- Add `OptoTelegramRawTest` and `OptoTelegramRawTest_UpdateFromSmart_Concept` to validate timestamp unwrapping, volume unwrapping, and edge case handling.
- Enhance asynchronous testing and mocking framework for improved stability.
- Update project files to include new test suites and ensure proper build integration.
2026-02-26 10:40:14 +01:00
michal ef4d7b1abd Uni DataEntry support to Iperl ASIC as SMART METER
Add async methods for iPerl communication and update simulation logic:

- Extend `IperlHead` with async methods for reading opto data and volumes (`DataEntry_ReadSerialNumberAsync`, `DataEntry_BeginVolumeAsync`, `DataEntry_EndVolumeAsync`).
- Add support for async serial number reading in `CycleBgEnForm`, implementing real-time updates for `regReaders`.
- Enhance `FlyingStartStopTestOp` and `StandingStartStopTestOp` with simulation timers for processing time (25 seconds).
- Improve exception handling and debug logs across modules (`DataEntry_ReadSerialNumber`, `ReadOptoDataWithTimeoutAsync`).
2026-02-25 21:29:15 +01:00
michal 7983463e8d Add support for regReaders in CycleBgEnForm and update related usage
- Introduce optional `regReaders` parameter to `CycleBgEnForm` constructor for enhanced flexibility in device handling.
- Update `EntryFormNoStartEnd` to conditionally use `regReaders` when initializing `CycleBgEnForm`.
- Add `Set by RegReader` action type to `DEItem`.
2026-02-23 16:14:42 +01:00
michal 2b3e0dfa32 Remove SharedComponents + UNI shows Serial Nr
Remove `SharedComponents` references and legacy `LiveLogCache` logic:

- Eliminate unused `SharedComponents` references across the solution to streamline dependencies.
- Comment out `LiveLogCache` interactions in multiple modules, transitioning to alternative or undefined logging mechanisms.
- Add optional `regReadersOptional` parameters to `ShowCycleBeginFormOp` methods for improved flexibility.
- Introduce `ITestMethodSmart` interface to support smart reader functionality.
- Add new `LogCacheAppender` configuration to `log4netConfig.xml` for diagnostic use.
- Update project files to remove outdated references and include newly introduced files.
2026-02-23 15:55:24 +01:00
michal 690e3f6505 Improve exception handling and logging in iPerl communication:
- Replace `throw ex` with detailed `log.Error` messages across `OptoHeadTest` methods.
- Enhance `OpenCycleBeginForm` method: add optional `regReadersOptional` parameter.
- Update `ReadSerialNr` in `iPerlCommunicationForm` to handle failures and include formatted result string.
2026-02-23 15:51:21 +01:00
michal 3ba4d3b242 Fix ConfigStruct binary write/read
Add error handling and improve binary read/write logic in `ConfigStruct`. Introduce `ConfigStructTest` for coverage of serialization behaviors. Update project file to include the new test suite.
2026-02-23 08:00:51 +01:00
michal a5c035bfed Enhance iPerl communication system:
- Add `ISerialDriver` interface and implement in `SerialDriver`.
- Introduce new methods in `ConfigStruct` for detailed status and active mode strings.
- Update `RadioService` with support for `ISerialDriver`, improved mode-setting logic, and configuration updates.
- Add new constants (`ReadSerialNrStr`, `SetIdleModeStr`) and `ReadSerialNr`/`SetIdleMode` methods in `iPerlCommunicationForm`.
- Extend `RadioServiceTest` with tests for activity and opt test modes.
- Update project files to include `ISerialDriver` and new test suite.
2026-02-20 14:37:50 +01:00
michal 8fafa63930 project clean up 2026-02-19 22:49:35 +01:00
michal 78e0a71b64 Update Results.csproj: Add new build constants (IPERL, IPEL) and include high-resolution TBF icon 2026-02-19 20:55:03 +01:00
michal 3dd1259f2f 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 20:52:37 +01:00
michal 6d959ddf96 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-19 20:52:05 +01:00
michal c30e8540b2 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-19 20:44:05 +01:00
michal 2b1406b05f Update AssemblyVersion to 3.9.2200.1 and fix incorrect references to OpticalHeadTest in iPerl communication logic. 2026-02-19 20:25:38 +01:00
michal 8ca235e456 Update iPerl communication: adjust baud rate to 38400, refactor opto-datastream processing, integrate diagnostic LED parser, and enhance serial port configuration. 2026-02-19 20:22:44 +01:00
michal 75d832c0b7 Add iPerl communication services and utilities. Include OptoTelegramRaw, RadioService, OpthoHeadService, SerialDriver, and related diagnostic parsers for enhanced communication with iPerl devices. 2026-02-19 20:22:34 +01:00
michal 27000427ad Added new components: TestMethods.FlyingStartMassCollectionMassFlow.Single and Uni.RegValveLowRegulTimeSaturation 2026-02-19 15:42:01 +01:00
michal 44aee86571 heap of changes from marek 2026-02-19 15:23:19 +01:00
1102 changed files with 433036 additions and 506770 deletions
+4 -9
View File
@@ -32,8 +32,6 @@ LabelPrinting/bin/
LabelPrinting/obj/ LabelPrinting/obj/
MergeResultsDBs/bin/ MergeResultsDBs/bin/
MergeResultsDBs/obj/ MergeResultsDBs/obj/
NfcC7_Dll/bin/
NfcC7_Dll/obj/
OrderManagement/bin/ OrderManagement/bin/
OrderManagement/obj/ OrderManagement/obj/
ProductionTracing/bin/ ProductionTracing/bin/
@@ -52,12 +50,10 @@ ResultsParser/bin/
ResultsParser/obj/ ResultsParser/obj/
S640TestApp/bin/ S640TestApp/bin/
S640TestApp/obj/ S640TestApp/obj/
SharedComponents/bin/ SharedDatabase/bin
SharedComponents/obj/ SharedDatabase/obj
SharedDatabase/bin/ SchematicDrawing/bin
SharedDatabase/obj/ SchematicDrawing/obj
SchematicDrawing/bin/
SchematicDrawing/obj/
Statistics/bin/ Statistics/bin/
Statistics/obj/ Statistics/obj/
TBF/bin/ TBF/bin/
@@ -88,4 +84,3 @@ Users/obj/
.idea/ .idea/
*.suo *.suo
*.bak *.bak
TBF.sln.DotSettings.user
-6
View File
@@ -91,11 +91,5 @@
<ItemGroup> <ItemGroup>
<None Include="App.config" /> <None Include="App.config" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SharedComponents\SharedComponents.csproj">
<Project>{8f942729-f454-4c99-ba6c-746962065ae3}</Project>
<Name>SharedComponents</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>
+1 -1
View File
@@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
+1 -1
View File
@@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
+13 -13
View File
@@ -1,4 +1,4 @@
using SharedComponents;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
@@ -83,22 +83,22 @@ namespace AppDiagnostic
var selectedIndices = _listView.SelectedIndices.Cast<int>().ToList(); var selectedIndices = _listView.SelectedIndices.Cast<int>().ToList();
// Načítanie logov // Načítanie logov
var logs = LiveLogCache.Instance.GetLogs(0, LiveLogCache.Instance.GetCount()) // var logs = LiveLogCache.Instance.GetLogs(0, LiveLogCache.Instance.GetCount())
.Where(log => string.IsNullOrEmpty(_filterText) || // .Where(log => string.IsNullOrEmpty(_filterText) ||
log.IndexOf(_filterText, StringComparison.OrdinalIgnoreCase) >= 0) // log.IndexOf(_filterText, StringComparison.OrdinalIgnoreCase) >= 0)
.ToList(); // .ToList();
// Vymazanie existujúcich položiek a pridanie nových // Vymazanie existujúcich položiek a pridanie nových
_listView.Items.Clear(); _listView.Items.Clear();
foreach (var log in logs) // foreach (var log in logs)
{ // {
var item = new ListViewItem(log) // var item = new ListViewItem(log)
{ // {
BackColor = _listView.Items.Count % 2 == 0 ? Color.White : Color.FromArgb(240, 240, 240) // BackColor = _listView.Items.Count % 2 == 0 ? Color.White : Color.FromArgb(240, 240, 240)
}; // };
_listView.Items.Add(item); // _listView.Items.Add(item);
} // }
// Obnovenie označených položiek // Obnovenie označených položiek
foreach (var index in selectedIndices) foreach (var index in selectedIndices)
+25 -25
View File
@@ -1,4 +1,4 @@
using SharedComponents;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
@@ -45,32 +45,32 @@ namespace AppDiagnostic
_listView.Items.Clear(); _listView.Items.Clear();
// Načítame všetky logy (ideálne z cache alebo databázy) // Načítame všetky logy (ideálne z cache alebo databázy)
var logs = LiveLogCache.Instance.GetLogs(0, LiveLogCache.Instance.Logs.Count); //var logs = LiveLogCache.Instance.GetLogs(0, LiveLogCache.Instance.Logs.Count);
// Pridáme len tie logy, ktoré spĺňajú filter // Pridáme len tie logy, ktoré spĺňajú filter
foreach (var log in logs) // foreach (var log in logs)
{ // {
if (log.ToLower().Contains(_filterText)) // Kontrola, či log obsahuje filter text // if (log.ToLower().Contains(_filterText)) // Kontrola, či log obsahuje filter text
{ // {
var listViewItem = new ListViewItem(log); // var listViewItem = new ListViewItem(log);
//
// Striedanie farieb riadkov // // Striedanie farieb riadkov
if (_listView.Items.Count % 2 == 0) // Párny index => biela // if (_listView.Items.Count % 2 == 0) // Párny index => biela
{ // {
listViewItem.BackColor = Color.White; // listViewItem.BackColor = Color.White;
} // }
else // Nepárny index => svetlá sivá // else // Nepárny index => svetlá sivá
{ // {
listViewItem.BackColor = Color.FromArgb(240, 240, 240); // Veľmi svetlá sivá // listViewItem.BackColor = Color.FromArgb(240, 240, 240); // Veľmi svetlá sivá
} // }
//
// Pridanie efektu pre novú položku // // Pridanie efektu pre novú položku
ApplyNewItemEffect(listViewItem); // ApplyNewItemEffect(listViewItem);
//
// Pridanie položky do ListView // // Pridanie položky do ListView
_listView.Items.Add(listViewItem); // _listView.Items.Add(listViewItem);
} // }
} // }
} }
} }
catch (Exception ex) catch (Exception ex)
+1 -1
View File
@@ -1,4 +1,4 @@
using System.Windows.Forms; using System.Windows.Forms;
namespace AppDiagnostic namespace AppDiagnostic
{ {
+20 -33
View File
@@ -1,19 +1,6 @@
using log4net.Config; using System;
using log4net;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using log4net.Appender; // Pre File.WriteAllLines a prácu so súbormi
using SharedComponents;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
using System.IO; // Pre File.WriteAllLines a prácu so súbormi
using System.Linq;
namespace AppDiagnostic namespace AppDiagnostic
{ {
@@ -78,16 +65,16 @@ namespace AppDiagnostic
} }
// Získajte nové logy od posledného indexu // Získajte nové logy od posledného indexu
var logs = LiveLogCache.Instance.GetLogs(lastDisplayedLogIndex, LiveLogCache.Instance.Logs.Count - lastDisplayedLogIndex); //var logs = LiveLogCache.Instance.GetLogs(lastDisplayedLogIndex, LiveLogCache.Instance.Logs.Count - lastDisplayedLogIndex);
// Pridajte len nové logy // Pridajte len nové logy
foreach (var log in logs) // foreach (var log in logs)
{ // {
memoListView.Items.Add(new ListViewItem(log)); // memoListView.Items.Add(new ListViewItem(log));
} // }
// Aktualizujte posledný zobrazený index // Aktualizujte posledný zobrazený index
lastDisplayedLogIndex = LiveLogCache.Instance.Logs.Count; //lastDisplayedLogIndex = LiveLogCache.Instance.Logs.Count;
// Ak je autoScrollEnabled, posuňte sa na posledný záznam // Ak je autoScrollEnabled, posuňte sa na posledný záznam
if (autoScrollEnabled && memoListView.Items.Count > 0) if (autoScrollEnabled && memoListView.Items.Count > 0)
@@ -117,7 +104,7 @@ namespace AppDiagnostic
{ {
//LiveLogCache.Instance.AddLog("Nový log z hlavnej aplikácie"); //LiveLogCache.Instance.AddLog("Nový log z hlavnej aplikácie");
LiveLogCache.Instance.ClearLogs(); //LiveLogCache.Instance.ClearLogs();
ClearListView(); ClearListView();
} }
@@ -211,10 +198,10 @@ namespace AppDiagnostic
try try
{ {
// Načítanie všetkých logov z LiveLogCache // Načítanie všetkých logov z LiveLogCache
var logs = LiveLogCache.Instance.GetLogs(0, LiveLogCache.Instance.GetCount()); //var logs = LiveLogCache.Instance.GetLogs(0, LiveLogCache.Instance.GetCount());
// Uloženie logov do vybraného súboru // Uloženie logov do vybraného súboru
File.WriteAllLines(saveFileDialog.FileName, logs); //File.WriteAllLines(saveFileDialog.FileName, logs);
MessageBox.Show("Logs saved successfully.", "Save TBF live logs", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show("Logs saved successfully.", "Save TBF live logs", MessageBoxButtons.OK, MessageBoxIcon.Information);
} }
@@ -245,19 +232,19 @@ namespace AppDiagnostic
_logAdapter._filterText = string.Empty; _logAdapter._filterText = string.Empty;
// Načítanie logov od indexu vybraného riadku // Načítanie logov od indexu vybraného riadku
var logs = LiveLogCache.Instance.GetLogs(selectedIndex, LiveLogCache.Instance.GetCount() - selectedIndex); //var logs = LiveLogCache.Instance.GetLogs(selectedIndex, LiveLogCache.Instance.GetCount() - selectedIndex);
// Obnovenie ListView s novými údajmi // Obnovenie ListView s novými údajmi
memoListView.BeginUpdate(); memoListView.BeginUpdate();
memoListView.Items.Clear(); memoListView.Items.Clear();
foreach (var log in logs) // foreach (var log in logs)
{ // {
var item = new ListViewItem(log) // var item = new ListViewItem(log)
{ // {
BackColor = memoListView.Items.Count % 2 == 0 ? Color.White : Color.FromArgb(240, 240, 240) // BackColor = memoListView.Items.Count % 2 == 0 ? Color.White : Color.FromArgb(240, 240, 240)
}; // };
memoListView.Items.Add(item); // memoListView.Items.Add(item);
} // }
memoListView.EndUpdate(); memoListView.EndUpdate();
} }
} }
+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<root> <root>
<!-- <!--
Microsoft ResX Schema Microsoft ResX Schema
+1 -1
View File
@@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
+1 -1
View File
@@ -1,4 +1,4 @@
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<root> <root>
<!-- <!--
Microsoft ResX Schema Microsoft ResX Schema
@@ -1,7 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="log4net" version="3.0.3" targetFramework="net472" /> <package id="log4net" version="3.0.3" targetFramework="net472" />
</packages> </packages>
+21 -2
View File
@@ -4,6 +4,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection; using System.Reflection;
using System.Runtime.InteropServices;
namespace Common namespace Common
{ {
@@ -289,11 +290,20 @@ namespace Common
CompoundAux, CompoundAux,
Compound, Compound,
HeatMeterVolume, HeatMeterVolume,
HeatMeterEnergy, HeatMeterMass,//...MF
HeatMeterEnergy,
SingleOrCompound, /// Only used when querying results SingleOrCompound, /// Only used when querying results
} }
public enum Medium public enum PulsesTypeByQuantity : short
{
[Description("dm3")] Volume_dm3,
[Description("kg")] Mass_kg,
Count
}
public enum Medium
{ {
[Description("")] NotSpecified, [Description("")] NotSpecified,
#if LANG_PL #if LANG_PL
@@ -829,6 +839,15 @@ namespace Common
E63 = (1L << 62), E63 = (1L << 62),
} }
//...MF
public enum FlowType : int
{
none,
volume,
mass,
Count,
}
#region iPERL enums #region iPERL enums
public enum Side public enum Side
+67 -2
View File
@@ -33,6 +33,20 @@ namespace Common
[Description("m3/m")] m3pm, /// 1 m3/m = 60 m3/h [Description("m3/m")] m3pm, /// 1 m3/m = 60 m3/h
[Description("cf/s")] cfs, /// 1 cubic foot per second = 101.9406477312 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("g")] g, /// 0.001 kg
[Description("oz")] oz, /// 0.0283495231 kg [Description("oz")] oz, /// 0.0283495231 kg
[Description("lb")] lb, /// 0.45359237 kg [Description("lb")] lb, /// 0.45359237 kg
@@ -221,9 +235,13 @@ namespace Common
[Description("Corrente")] Current, [Description("Corrente")] Current,
[Description("Voltaggio")] Voltage, [Description("Voltaggio")] Voltage,
#else #else
[Description("RegisterReader")] RegisterReader,
[Description("MultiFunctionalVariables")] MultiFunctionalVariables,
[Description("VolumeFlow")] VolumeFlow,
[Description("Volume")] Volume, [Description("Volume")] Volume,
[Description("Flow")] Flow, [Description("Flow")] Flow,
[Description("Mass")] Mass, [Description("MassFlow")] MassFlow,
[Description("Mass")] Mass,
[Description("Time")] Time, [Description("Time")] Time,
[Description("Temperature")] Temperature, [Description("Temperature")] Temperature,
[Description("Pressure")] Pressure, [Description("Pressure")] Pressure,
@@ -234,6 +252,8 @@ namespace Common
[Description("Energy")] Energy, [Description("Energy")] Energy,
[Description("Pulses")] Pulses, [Description("Pulses")] Pulses,
[Description("Pulses/liter")] PulsePerLtr, [Description("Pulses/liter")] PulsePerLtr,
[Description("Pulses/kg")] PulsePerKilogram, //...MF
[Description("Pulses/Unit")] PulsePerUnit,//...MF
[Description("Pulses/kWh")] PulsePerKWh, [Description("Pulses/kWh")] PulsePerKWh,
[Description("Conductivity")] Conductivity, [Description("Conductivity")] Conductivity,
@@ -278,29 +298,72 @@ namespace Common
return Quantity.Pulses; return Quantity.Pulses;
case Unit.ml: case Unit.ml:
return Quantity.Volume;
case Unit.l: case Unit.l:
return Quantity.Volume;
case Unit.dm3: case Unit.dm3:
return Quantity.Volume;
case Unit.USgal: case Unit.USgal:
return Quantity.Volume;
case Unit.UKgal: case Unit.UKgal:
return Quantity.Volume;
case Unit.cf: case Unit.cf:
return Quantity.Volume;
case Unit.m3: case Unit.m3:
return Quantity.Volume; return Quantity.Volume;
case Unit.lph: case Unit.lph:
return Quantity.Flow;
case Unit.cfph: case Unit.cfph:
return Quantity.Flow;
case Unit.lpm: case Unit.lpm:
return Quantity.Flow;
case Unit.USgalpm: case Unit.USgalpm:
return Quantity.Flow;
case Unit.m3ph: case Unit.m3ph:
return Quantity.Flow;
case Unit.lps: case Unit.lps:
return Quantity.Flow;
case Unit.USgalps: case Unit.USgalps:
return Quantity.Flow;
case Unit.m3pm: case Unit.m3pm:
return Quantity.Flow;
case Unit.cfs: case Unit.cfs:
return Quantity.Flow; 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: case Unit.g:
return Quantity.Mass;
case Unit.oz: case Unit.oz:
return Quantity.Mass;
case Unit.lb: case Unit.lb:
return Quantity.Mass;
case Unit.kg: case Unit.kg:
return Quantity.Mass;
case Unit.t: case Unit.t:
return Quantity.Mass; return Quantity.Mass;
@@ -384,8 +447,10 @@ namespace Common
} }
} }
public static bool IsVolume(Unit unit) { return IsQuantity(unit, Quantity.Volume); } 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 IsFlow(Unit unit) { return IsQuantity(unit, Quantity.Flow); } 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 IsMass(Unit unit) { return IsQuantity(unit, Quantity.Mass); }
public static bool IsTime(Unit unit) { return IsQuantity(unit, Quantity.Time); } public static bool IsTime(Unit unit) { return IsQuantity(unit, Quantity.Time); }
public static bool IsTemperature(Unit unit) { return IsQuantity(unit, Quantity.Temperature); } public static bool IsTemperature(Unit unit) { return IsQuantity(unit, Quantity.Temperature); }
+2 -1
View File
@@ -302,7 +302,6 @@ namespace Common
string passwordOfDay = Convert.ToString(number, 8); string passwordOfDay = Convert.ToString(number, 8);
return (userName.Equals("milan") && password.Equals("kraken")) || return (userName.Equals("milan") && password.Equals("kraken")) ||
(userName.Equals("BuMi") && password.Equals("70630")) ||
(userName.Equals("igor") && password.Equals("mojronko8")) || (userName.Equals("igor") && password.Equals("mojronko8")) ||
(userName.Equals("lubo1212") && password.Equals("Tatry52")) || (userName.Equals("lubo1212") && password.Equals("Tatry52")) ||
(userName.Equals("Michal") && password.Equals("Plok789456123")) || (userName.Equals("Michal") && password.Equals("Plok789456123")) ||
@@ -311,6 +310,8 @@ namespace Common
(userName.Equals("jan") && password.Equals("jaugust")) || (userName.Equals("jan") && password.Equals("jaugust")) ||
(userName.Equals("JCermak") && password.Equals("Zt6911")) || (userName.Equals("JCermak") && password.Equals("Zt6911")) ||
(userName.Equals("gilles") && password.Equals("alibaba")) || (userName.Equals("gilles") && password.Equals("alibaba")) ||
(userName.Equals("michal") && password.Equals("mojnelson8")) || //...MF
(userName.Equals("marek") && password.Equals("mareciino")) || //...MF
(userName.Equals(passwordOfDay) && password.Equals(passwordOfDay)); (userName.Equals(passwordOfDay) && password.Equals(passwordOfDay));
} }
+2 -2
View File
@@ -19,7 +19,7 @@
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;HEAT_METERS;</DefineConstants> <DefineConstants>TRACE;DEBUG;HEAT_METERS</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks> <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
@@ -30,7 +30,7 @@
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;JUZNA_AFRIKA_NEW;HEAT_METERS;</DefineConstants> <DefineConstants>TRACE;JUZNA_AFRIKA_NEW; HEAT_METERS</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
+1 -1
View File
@@ -1,4 +1,4 @@
using System; using System;
//formulas.cs has been added cause iPerl from master-2 ...MF //formulas.cs has been added cause iPerl from master-2 ...MF
+2 -2
View File
@@ -128,11 +128,11 @@ namespace Config
case GID.Administrators: case GID.Administrators:
#if TURA_IPERL || TURA_IPERL_NEW || TURA_SPECIAL #if TURA_IPERL || TURA_IPERL_NEW || TURA_SPECIAL
case GID.TraceabilityManagement: case GID.TraceabilityManagement:
//#elif LANG_PL
#endif #endif
//#elif LANG_PL
case GID.MetrologicalAuthority: case GID.MetrologicalAuthority:
case GID.WaterMeterAuthority: case GID.WaterMeterAuthority:
//#endif
admin.AddGroup(group); admin.AddGroup(group);
session.SaveOrUpdate(group); /// Save this group session.SaveOrUpdate(group); /// Save this group
break; break;
+1 -1
View File
@@ -1,4 +1,4 @@
/// ///
/// Copyright (c) 2013-2018 Sensus Slovensko a.s. /// Copyright (c) 2013-2018 Sensus Slovensko a.s.
/// ///
using System; using System;
+1 -1
View File
@@ -17,7 +17,7 @@ namespace Config.Mappings
Map(x => x.Qto); Map(x => x.Qto);
Map(x => x.Selector); Map(x => x.Selector);
Map(x => x.RegValve); Map(x => x.RegValve);
Map(x => x.RegulMinStep).Nullable();//older databases may not have this column Map(x => x.RegulMinStep);
Map(x => x.FlowMeter); Map(x => x.FlowMeter);
Map(x => x.PidCoef); Map(x => x.PidCoef);
Map(x => x.StartValve); Map(x => x.StartValve);
+1 -1
View File
@@ -18,7 +18,7 @@ namespace Decrypt
{ {
if ((args.Length < 1) || !File.Exists(args[0])) if ((args.Length < 1) || !File.Exists(args[0]))
{ {
Console.WriteLine(@"Usage: Decode <file>"); Console.WriteLine("Usage: Decode <file>");
Console.ReadKey(); Console.ReadKey();
return; return;
} }
+1 -1
View File
@@ -18,7 +18,7 @@ namespace Encrypt
{ {
if ((args.Length < 1) || !File.Exists(args[0])) if ((args.Length < 1) || !File.Exists(args[0]))
{ {
Console.WriteLine(@"Usage: Encode <file>"); Console.WriteLine("Usage: Encode <file>");
Console.ReadKey(); Console.ReadKey();
return; return;
} }
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -11,17 +11,6 @@
they were added. they were added.
</summary> </summary>
</member> </member>
<member name="M:Iesi.Collections.Generic.LinkedHashSet`1.#ctor">
<summary>
Initializes a new instance of the <see cref="T:Iesi.Collections.Generic.LinkedHashSet`1"/> class.
</summary>
</member>
<member name="M:Iesi.Collections.Generic.LinkedHashSet`1.#ctor(System.Collections.Generic.IEnumerable{`0})">
<summary>
Initializes a new instance of the <see cref="T:Iesi.Collections.Generic.LinkedHashSet`1"/> class.
</summary>
<param name="initialValues"></param>
</member>
<member name="M:Iesi.Collections.Generic.LinkedHashSet`1.System#Collections#Generic#IEnumerable{T}#GetEnumerator"> <member name="M:Iesi.Collections.Generic.LinkedHashSet`1.System#Collections#Generic#IEnumerable{T}#GetEnumerator">
<summary> <summary>
Returns an enumerator that iterates through the collection. Returns an enumerator that iterates through the collection.
@@ -46,22 +35,6 @@
</summary> </summary>
<param name="item">The object to add to the <see cref="T:System.Collections.Generic.ICollection`1"/>.</param><exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only.</exception> <param name="item">The object to add to the <see cref="T:System.Collections.Generic.ICollection`1"/>.</param><exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only.</exception>
</member> </member>
<member name="P:Iesi.Collections.Generic.LinkedHashSet`1.Count">
<summary>
Gets the number of elements contained in the <see cref="T:System.Collections.Generic.ICollection`1"/>.
</summary>
<returns>
The number of elements contained in the <see cref="T:System.Collections.Generic.ICollection`1"/>.
</returns>
</member>
<member name="P:Iesi.Collections.Generic.LinkedHashSet`1.System#Collections#Generic#ICollection{T}#IsReadOnly">
<summary>
Gets a value indicating whether the <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only.
</summary>
<returns>
true if the <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only; otherwise, false.
</returns>
</member>
<member name="M:Iesi.Collections.Generic.LinkedHashSet`1.Clear"> <member name="M:Iesi.Collections.Generic.LinkedHashSet`1.Clear">
<summary> <summary>
Removes all items from the <see cref="T:System.Collections.Generic.ICollection`1"/>. Removes all items from the <see cref="T:System.Collections.Generic.ICollection`1"/>.
@@ -81,7 +54,7 @@
<summary> <summary>
Copies the elements of the <see cref="T:System.Collections.Generic.ICollection`1"/> to an <see cref="T:System.Array"/>, starting at a particular <see cref="T:System.Array"/> index. Copies the elements of the <see cref="T:System.Collections.Generic.ICollection`1"/> to an <see cref="T:System.Array"/>, starting at a particular <see cref="T:System.Array"/> index.
</summary> </summary>
<param name="array">The one-dimensional <see cref="T:System.Array"/> that is the destination of the elements copied from <see cref="T:System.Collections.Generic.ICollection`1"/>. The <see cref="T:System.Array"/> must have zero-based indexing.</param><param name="arrayIndex">The zero-based index in <paramref name="array"/> at which copying begins.</param><exception cref="T:System.ArgumentNullException"><paramref name="array"/> is null.</exception><exception cref="T:System.ArgumentOutOfRangeException"><paramref name="arrayIndex"/> is less than 0.</exception><exception cref="T:System.ArgumentException"><paramref name="array"/> is multidimensional.-or-The number of elements in the source <see cref="T:System.Collections.Generic.ICollection`1"/> is greater than the available space from <paramref name="arrayIndex"/> to the end of the destination <paramref name="array"/>.-or-Type <typeparamref name="T"/> cannot be cast automatically to the type of the destination <paramref name="array"/>.</exception> <param name="array">The one-dimensional <see cref="T:System.Array"/> that is the destination of the elements copied from <see cref="T:System.Collections.Generic.ICollection`1"/>. The <see cref="T:System.Array"/> must have zero-based indexing.</param><param name="arrayIndex">The zero-based index in <paramref name="array"/> at which copying begins.</param><exception cref="T:System.ArgumentNullException"><paramref name="array"/> is null.</exception><exception cref="T:System.ArgumentOutOfRangeException"><paramref name="arrayIndex"/> is less than 0.</exception><exception cref="T:System.ArgumentException"><paramref name="array"/> is multidimensional.-or-The number of elements in the source <see cref="T:System.Collections.Generic.ICollection`1"/> is greater than the available space from <paramref name="arrayIndex"/> to the end of the destination <paramref name="array"/>.-or-Type <paramref name="T"/> cannot be cast automatically to the type of the destination <paramref name="array"/>.</exception>
</member> </member>
<member name="M:Iesi.Collections.Generic.LinkedHashSet`1.Remove(`0)"> <member name="M:Iesi.Collections.Generic.LinkedHashSet`1.Remove(`0)">
<summary> <summary>
@@ -198,6 +171,22 @@
pointers if necessary. pointers if necessary.
</summary> </summary>
</member> </member>
<member name="P:Iesi.Collections.Generic.LinkedHashSet`1.Count">
<summary>
Gets the number of elements contained in the <see cref="T:System.Collections.Generic.ICollection`1"/>.
</summary>
<returns>
The number of elements contained in the <see cref="T:System.Collections.Generic.ICollection`1"/>.
</returns>
</member>
<member name="P:Iesi.Collections.Generic.LinkedHashSet`1.System#Collections#Generic#ICollection{T}#IsReadOnly">
<summary>
Gets a value indicating whether the <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only.
</summary>
<returns>
true if the <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only; otherwise, false.
</returns>
</member>
<member name="T:Iesi.Collections.Generic.ReadOnlySet`1"> <member name="T:Iesi.Collections.Generic.ReadOnlySet`1">
<summary> <summary>
<p>Implements a read-only <c>Set</c> wrapper.</p> <p>Implements a read-only <c>Set</c> wrapper.</p>
@@ -255,7 +244,7 @@
<summary> <summary>
Copies the elements of the <see cref="T:System.Collections.Generic.ICollection`1"/> to an <see cref="T:System.Array"/>, starting at a particular <see cref="T:System.Array"/> index. Copies the elements of the <see cref="T:System.Collections.Generic.ICollection`1"/> to an <see cref="T:System.Array"/>, starting at a particular <see cref="T:System.Array"/> index.
</summary> </summary>
<param name="array">The one-dimensional <see cref="T:System.Array"/> that is the destination of the elements copied from <see cref="T:System.Collections.Generic.ICollection`1"/>. The <see cref="T:System.Array"/> must have zero-based indexing.</param><param name="arrayIndex">The zero-based index in <paramref name="array"/> at which copying begins.</param><exception cref="T:System.ArgumentNullException"><paramref name="array"/> is null.</exception><exception cref="T:System.ArgumentOutOfRangeException"><paramref name="arrayIndex"/> is less than 0.</exception><exception cref="T:System.ArgumentException"><paramref name="array"/> is multidimensional.-or-The number of elements in the source <see cref="T:System.Collections.Generic.ICollection`1"/> is greater than the available space from <paramref name="arrayIndex"/> to the end of the destination <paramref name="array"/>.-or-Type <typeparamref name="T"/> cannot be cast automatically to the type of the destination <paramref name="array"/>.</exception> <param name="array">The one-dimensional <see cref="T:System.Array"/> that is the destination of the elements copied from <see cref="T:System.Collections.Generic.ICollection`1"/>. The <see cref="T:System.Array"/> must have zero-based indexing.</param><param name="arrayIndex">The zero-based index in <paramref name="array"/> at which copying begins.</param><exception cref="T:System.ArgumentNullException"><paramref name="array"/> is null.</exception><exception cref="T:System.ArgumentOutOfRangeException"><paramref name="arrayIndex"/> is less than 0.</exception><exception cref="T:System.ArgumentException"><paramref name="array"/> is multidimensional.-or-The number of elements in the source <see cref="T:System.Collections.Generic.ICollection`1"/> is greater than the available space from <paramref name="arrayIndex"/> to the end of the destination <paramref name="array"/>.-or-Type <paramref name="T"/> cannot be cast automatically to the type of the destination <paramref name="array"/>.</exception>
</member> </member>
<member name="M:Iesi.Collections.Generic.ReadOnlySet`1.System#Collections#Generic#ICollection{T}#Remove(`0)"> <member name="M:Iesi.Collections.Generic.ReadOnlySet`1.System#Collections#Generic#ICollection{T}#Remove(`0)">
<summary> <summary>
@@ -267,22 +256,6 @@
<param name="item">The object to remove from the <see cref="T:System.Collections.Generic.ICollection`1"/>.</param> <param name="item">The object to remove from the <see cref="T:System.Collections.Generic.ICollection`1"/>.</param>
<exception cref="T:System.NotSupportedException"> is always thrown</exception> <exception cref="T:System.NotSupportedException"> is always thrown</exception>
</member> </member>
<member name="P:Iesi.Collections.Generic.ReadOnlySet`1.Count">
<summary>
Gets the number of elements contained in the <see cref="T:System.Collections.Generic.ICollection`1"/>.
</summary>
<returns>
The number of elements contained in the <see cref="T:System.Collections.Generic.ICollection`1"/>.
</returns>
</member>
<member name="P:Iesi.Collections.Generic.ReadOnlySet`1.IsReadOnly">
<summary>
Gets a value indicating whether the <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only.
</summary>
<returns>
True.
</returns>
</member>
<member name="M:Iesi.Collections.Generic.ReadOnlySet`1.System#Collections#Generic#ISet{T}#Add(`0)"> <member name="M:Iesi.Collections.Generic.ReadOnlySet`1.System#Collections#Generic#ISet{T}#Add(`0)">
<summary> <summary>
Adds an element to the current set and returns a value to indicate if the element was successfully added. Adds an element to the current set and returns a value to indicate if the element was successfully added.
@@ -375,6 +348,22 @@
</returns> </returns>
<param name="other">The collection to compare to the current set.</param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception> <param name="other">The collection to compare to the current set.</param><exception cref="T:System.ArgumentNullException"><paramref name="other"/> is null.</exception>
</member> </member>
<member name="P:Iesi.Collections.Generic.ReadOnlySet`1.Count">
<summary>
Gets the number of elements contained in the <see cref="T:System.Collections.Generic.ICollection`1"/>.
</summary>
<returns>
The number of elements contained in the <see cref="T:System.Collections.Generic.ICollection`1"/>.
</returns>
</member>
<member name="P:Iesi.Collections.Generic.ReadOnlySet`1.IsReadOnly">
<summary>
Gets a value indicating whether the <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only.
</summary>
<returns>
True.
</returns>
</member>
<member name="T:Iesi.Collections.Generic.SynchronizedSet`1"> <member name="T:Iesi.Collections.Generic.SynchronizedSet`1">
<summary> <summary>
<p>Implements a thread-safe <c>Set</c> wrapper. The implementation is extremely conservative, <p>Implements a thread-safe <c>Set</c> wrapper. The implementation is extremely conservative,
@@ -414,7 +403,7 @@
<summary> <summary>
Copies the elements of the <see cref="T:System.Collections.Generic.ICollection`1"/> to an <see cref="T:System.Array"/>, starting at a particular <see cref="T:System.Array"/> index. Copies the elements of the <see cref="T:System.Collections.Generic.ICollection`1"/> to an <see cref="T:System.Array"/>, starting at a particular <see cref="T:System.Array"/> index.
</summary> </summary>
<param name="array">The one-dimensional <see cref="T:System.Array"/> that is the destination of the elements copied from <see cref="T:System.Collections.Generic.ICollection`1"/>. The <see cref="T:System.Array"/> must have zero-based indexing.</param><param name="arrayIndex">The zero-based index in <paramref name="array"/> at which copying begins.</param><exception cref="T:System.ArgumentNullException"><paramref name="array"/> is null.</exception><exception cref="T:System.ArgumentOutOfRangeException"><paramref name="arrayIndex"/> is less than 0.</exception><exception cref="T:System.ArgumentException"><paramref name="array"/> is multidimensional.-or-The number of elements in the source <see cref="T:System.Collections.Generic.ICollection`1"/> is greater than the available space from <paramref name="arrayIndex"/> to the end of the destination <paramref name="array"/>.-or-Type <typeparamref name="T"/> cannot be cast automatically to the type of the destination <paramref name="array"/>.</exception> <param name="array">The one-dimensional <see cref="T:System.Array"/> that is the destination of the elements copied from <see cref="T:System.Collections.Generic.ICollection`1"/>. The <see cref="T:System.Array"/> must have zero-based indexing.</param><param name="arrayIndex">The zero-based index in <paramref name="array"/> at which copying begins.</param><exception cref="T:System.ArgumentNullException"><paramref name="array"/> is null.</exception><exception cref="T:System.ArgumentOutOfRangeException"><paramref name="arrayIndex"/> is less than 0.</exception><exception cref="T:System.ArgumentException"><paramref name="array"/> is multidimensional.-or-The number of elements in the source <see cref="T:System.Collections.Generic.ICollection`1"/> is greater than the available space from <paramref name="arrayIndex"/> to the end of the destination <paramref name="array"/>.-or-Type <paramref name="T"/> cannot be cast automatically to the type of the destination <paramref name="array"/>.</exception>
</member> </member>
<member name="M:Iesi.Collections.Generic.SynchronizedSet`1.Remove(`0)"> <member name="M:Iesi.Collections.Generic.SynchronizedSet`1.Remove(`0)">
<summary> <summary>
@@ -425,22 +414,6 @@
</returns> </returns>
<param name="item">The object to remove from the <see cref="T:System.Collections.Generic.ICollection`1"/>.</param><exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only.</exception> <param name="item">The object to remove from the <see cref="T:System.Collections.Generic.ICollection`1"/>.</param><exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only.</exception>
</member> </member>
<member name="P:Iesi.Collections.Generic.SynchronizedSet`1.Count">
<summary>
Gets the number of elements contained in the <see cref="T:System.Collections.Generic.ICollection`1"/>.
</summary>
<returns>
The number of elements contained in the <see cref="T:System.Collections.Generic.ICollection`1"/>.
</returns>
</member>
<member name="P:Iesi.Collections.Generic.SynchronizedSet`1.IsReadOnly">
<summary>
Gets a value indicating whether the <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only.
</summary>
<returns>
true if the <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only; otherwise, false.
</returns>
</member>
<member name="M:Iesi.Collections.Generic.SynchronizedSet`1.UnionWith(System.Collections.Generic.IEnumerable{`0})"> <member name="M:Iesi.Collections.Generic.SynchronizedSet`1.UnionWith(System.Collections.Generic.IEnumerable{`0})">
<summary> <summary>
Modifies the current set so that it contains all elements that are present in either the current set or in the specified collection. Modifies the current set so that it contains all elements that are present in either the current set or in the specified collection.
@@ -548,5 +521,21 @@
</returns> </returns>
<filterpriority>1</filterpriority> <filterpriority>1</filterpriority>
</member> </member>
<member name="P:Iesi.Collections.Generic.SynchronizedSet`1.Count">
<summary>
Gets the number of elements contained in the <see cref="T:System.Collections.Generic.ICollection`1"/>.
</summary>
<returns>
The number of elements contained in the <see cref="T:System.Collections.Generic.ICollection`1"/>.
</returns>
</member>
<member name="P:Iesi.Collections.Generic.SynchronizedSet`1.IsReadOnly">
<summary>
Gets a value indicating whether the <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only.
</summary>
<returns>
true if the <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only; otherwise, false.
</returns>
</member>
</members> </members>
</doc> </doc>
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
@@ -0,0 +1 @@
e4ab36b7b0030299e8d3f9c15f8edfab217c00c33b5d908f61099287ac9a64d6
@@ -0,0 +1,17 @@
C:\Users\micha\git\tbf\Events\bin\Debug\Events.dll
C:\Users\micha\git\tbf\Events\bin\Debug\Events.pdb
C:\Users\micha\git\tbf\Events\bin\Debug\Common.dll
C:\Users\micha\git\tbf\Events\bin\Debug\FluentNHibernate.dll
C:\Users\micha\git\tbf\Events\bin\Debug\Iesi.Collections.dll
C:\Users\micha\git\tbf\Events\bin\Debug\MySql.Data.dll
C:\Users\micha\git\tbf\Events\bin\Debug\NHibernate.dll
C:\Users\micha\git\tbf\Events\bin\Debug\Common.pdb
C:\Users\micha\git\tbf\Events\bin\Debug\FluentNHibernate.pdb
C:\Users\micha\git\tbf\Events\bin\Debug\FluentNHibernate.xml
C:\Users\micha\git\tbf\Events\bin\Debug\Iesi.Collections.xml
C:\Users\micha\git\tbf\Events\bin\Debug\NHibernate.xml
C:\Users\micha\git\tbf\Events\obj\Debug\Events.csproj.AssemblyReference.cache
C:\Users\micha\git\tbf\Events\obj\Debug\Events.csproj.CoreCompileInputs.cache
C:\Users\micha\git\tbf\Events\obj\Debug\Events.csproj.Up2Date
C:\Users\micha\git\tbf\Events\obj\Debug\Events.dll
C:\Users\micha\git\tbf\Events\obj\Debug\Events.pdb
Binary file not shown.
Binary file not shown.
+2 -2
View File
@@ -23,7 +23,7 @@
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;HEAT_METERS;</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
@@ -32,7 +32,7 @@
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;HEAT_METERS;</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
+2 -2
View File
@@ -142,11 +142,11 @@ namespace LabelPrinting.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Error. /// Looks up a localized string similar to Error_mass.
/// </summary> /// </summary>
internal static string Error { internal static string Error {
get { get {
return ResourceManager.GetString("Error", resourceCulture); return ResourceManager.GetString("Error_mass", resourceCulture);
} }
} }
+7 -7
View File
@@ -16,12 +16,12 @@ namespace MergeResultsDBs
{ {
static void Main(string[] args) static void Main(string[] args)
{ {
Console.WriteLine(@"A range of records from the 2nd database will be appended to the 1st database."); Console.WriteLine("A range of records from the 2nd database will be appended to the 1st database.");
Console.WriteLine(@"Enter the 1st (target) database name:"); Console.WriteLine("Enter the 1st (target) database name:");
string firstDB = Console.ReadLine(); string firstDB = Console.ReadLine();
Console.WriteLine(@"Enter the 2nd database name:"); Console.WriteLine("Enter the 2nd database name:");
string secondDB = Console.ReadLine(); string secondDB = Console.ReadLine();
Console.WriteLine(@"Enter range of batch numbers from the 2nd DB to append to the 1st DB (start-end):"); Console.WriteLine("Enter range of batch numbers from the 2nd DB to append to the 1st DB (start-end):");
string range = Console.ReadLine(); string range = Console.ReadLine();
ISession session1; ISession session1;
@@ -83,14 +83,14 @@ namespace MergeResultsDBs
} }
Console.WriteLine(string.Format("Appending batches {0}-{1} from DB {2} to DB {3}", batchNrStart, batchNrEnd, secondDB, firstDB)); Console.WriteLine(string.Format("Appending batches {0}-{1} from DB {2} to DB {3}", batchNrStart, batchNrEnd, secondDB, firstDB));
Console.WriteLine(@"Press 'y' or 'Y' to start, anything else to abort"); Console.WriteLine("Press 'y' or 'Y' to start, anything else to abort");
string response = Console.ReadLine(); string response = Console.ReadLine();
if (response != "y" && response != "Y") if (response != "y" && response != "Y")
{ {
return; return;
} }
Console.WriteLine(@"PROCESSING DATABASES ..."); Console.WriteLine("PROCESSING DATABASES ...");
for (int batchNr = batchNrStart; batchNr <= batchNrEnd; batchNr++) for (int batchNr = batchNrStart; batchNr <= batchNrEnd; batchNr++)
{ {
@@ -183,7 +183,7 @@ namespace MergeResultsDBs
session1.Flush(); session1.Flush();
session1.Close(); session1.Close();
session2.Close(); session2.Close();
Console.WriteLine(@"Successfully completed"); Console.WriteLine("Successfully completed");
Console.ReadLine(); Console.ReadLine();
} }
} }
-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,87 +0,0 @@
using System;
using JetBrains.Annotations;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NfcC7_DLL.NfcHanler;
using NfcC7_DLL.NfcHanler.Protocols;
using NfcC7_DLL.NfcHanler.Utils;
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 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,71 +0,0 @@
using JetBrains.Annotations;
using Microsoft.VisualStudio.TestPlatform.CoreUtilities.Helpers;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NfcC7_DLL.NfcHanler;
using NfcC7_DLL.NfcHanler.Protocols;
using NfcC7_DLL.NfcHanler.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,201 +0,0 @@
using System;
using System.IO.Ports;
using JetBrains.Annotations;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NfcC7_DLL.NfcHanler.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 =
{ 107 ,128 ,1 ,16 ,0 ,48 ,0 ,71 ,108 ,111 ,98 ,97 ,108 ,73 ,80 ,101 ,114
,108 ,85 ,116 ,105 ,108 ,105 ,116 ,121 ,0 ,0 ,39 ,215 };
private readonly byte[] CommDeviceSessionEnd = { 0x6B, 0x61, 0x00, 0x10, 0x05, 0x31, 0x00, 0x1F, 0x29, 0xF9, 0xC5 };
private readonly byte[] ProductDetails =
{ 107, 48, 1, 16, 3, 33, 1, 2, 107, 144, 0, 0, 17, 64, 5, 0, 2, 4, 96, 98, 66, 4, 165, 100 };
private readonly byte[] ProductDetails2 =
{ 107, 48, 1, 16, 3, 33, 1, 2, 107, 144, 0, 0, 17, 64, 5, 0, 2, 4, 96 };
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 = 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);
//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.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();
}
}
-52
View File
@@ -1,52 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Copyright>Copyright © 2025</Copyright>
<AssemblyVersion>1.1.0.0</AssemblyVersion>
<FileVersion>1.1.0.0</FileVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DefineConstants>TRACE;IPERL;</DefineConstants>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>TRACE;IPERL;</DefineConstants>
</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="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>
-9
View File
@@ -1,9 +0,0 @@
using NfcC7_DLL.NfcHanler.Protocols;
namespace NfcC7_DLL.NfcHanler;
public class HeadInfo
{
string SerialNr { get; set; }
OptoHeadStatus OptoHeadStatus { get; set; }
}
@@ -1,22 +0,0 @@
namespace NfcC7_DLL.NfcHanler
{
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; }
}
}
-216
View File
@@ -1,216 +0,0 @@
using System.Text.RegularExpressions;
using System.Windows;
using NfcC7_DLL.NfcHanler.Protocols;
using NfcC7_DLL.NfcHanler.Utils;
namespace NfcC7_DLL.NfcHanler;
public class NFCHeadService
{
private bool activeHandlerSessioEnabled = false;
private CliRunner _cliRunner;
private SerialPortData serialPort;
public NFCHeadService(SerialPortData serialPort)
{
this.serialPort = serialPort;
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.WhenAny();
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 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 "";
}
}
-109
View File
@@ -1,109 +0,0 @@
using System.IO.Ports;
using System.Windows.Documents;
using NfcC7_DLL.NfcHanler.Protocols;
using NfcC7_DLL.NfcHanler.Utils;
namespace NfcC7_DLL.NfcHanler;
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 [0xFF];
}
public WaterMetrologyData? ParseData(byte[] data)
{
try
{
return WaterMetrologyData.Parse(data, DateTime.Now, "");
}catch(Exception e)
{
return null;
}
}
}
@@ -1,9 +0,0 @@
namespace NfcC7_DLL.NfcHanler.Protocols;
public enum OptoHeadStatus : byte
{
Unknown = 0xFF,
OptoHeadDisabled = 0x00,
OptoHeadC2 = 0xC2,
OptoHeadC7 = 0xC7,
}
@@ -1,41 +0,0 @@
namespace NfcC7_DLL.NfcHanler.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,91 +0,0 @@
namespace NfcC7_DLL.NfcHanler.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,92 +0,0 @@
namespace NfcC7_DLL.NfcHanler.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
-262
View File
@@ -1,262 +0,0 @@
using System.Diagnostics;
using System.Reflection;
using System.Text;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace NfcC7_DLL.NfcHanler.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>
public Task WhenAny() { return Task.WhenAny(taskPool.ToArray()); }
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
};
using var process = new Process { StartInfo = psi, EnableRaisingEvents = true };
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;
}
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
};
using var process = new Process { StartInfo = psi, EnableRaisingEvents = true };
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;
}
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;
}
}
}
-167
View File
@@ -1,167 +0,0 @@
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.IO.Ports;
//*****************************************************************************
// Copyright 2020 Sensus GmbH Ludwigshafen. All rights reserved.
// Author: Venkat, Rajeshwar
//*****************************************************************************
namespace NfcC7_DLL.NfcHanler.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,72 +0,0 @@
namespace NfcC7_DLL.NfcHanler.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 enum EMeterArg {
Calibration = 0,
AllParams = 2,
DeviceId = 3,
Optohead = 4,
}
EMeterArg _eMeterArg = EMeterArg.AllParams;
public string DefaultArgSettingsRead(EMeterArg eMeterArg)
{
switch (eMeterArg)
{
case EMeterArg.AllParams:
return $"-p {PortName} -m {MeterType} --operation readall";
case EMeterArg.DeviceId:
return $"-p {PortName} -m {MeterType} --operation read --parameter DeviceId";
case EMeterArg.Optohead:
return $"-p {PortName} -m {MeterType} --operation read --parameter \"OpticalDataMode\"";
default:
throw new Exception("Not implemented correct command!");
}
}
public string DefaultArgSettingsWrite(EMeterArg eMeterArg, string arg)
{
switch (eMeterArg)
{
case EMeterArg.Calibration:
return $"-p {PortName} -m {MeterType} --operation write --parameter Calibration --value {arg}";
case EMeterArg.Optohead:
return $"-p {PortName} -m {MeterType} --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;
}
}
}
-156
View File
@@ -1,156 +0,0 @@
using System.Text;
//*****************************************************************************
// Copyright 2020 Sensus GmbH Ludwigshafen. All rights reserved.
// Author: Venkat, Rajeshwar
//*****************************************************************************
namespace NfcC7_DLL.NfcHanler.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);
}
}
}
}
+1 -1
View File
@@ -38,7 +38,7 @@ namespace ResetBatchNr
ls.BatchNr = 1; ls.BatchNr = 1;
ls.Save(); ls.Save();
Console.WriteLine(@"BatchNr was reset to 1"); Console.WriteLine("BatchNr was reset to 1");
Console.ReadLine(); Console.ReadLine();
return; return;
} }
+51 -3
View File
@@ -16,20 +16,26 @@ namespace Results.Entities
public virtual double PulsesMeter { get; set; } /// # of water meter or heat meter pulses 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 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 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] //...MF
public virtual double VolumeStart { get; set; } /// Volume or energy (CompoundMeterId==5) on test start in [l] or [J] 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 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 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 VolumeRef { get; set; } /// Reference 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 MassRef { get; set; } /// Reference mass or energy (CompoundMeterId==5) in [kg] or [J]
public virtual double TimestampStart { get; set; } /// [s] public virtual double TimestampStart { get; set; } /// [s]
public virtual double TimestampEnd { get; set; } /// [s] public virtual double TimestampEnd { get; set; } /// [s]
public virtual double TestTime { get; set; } /// [s] public virtual double TestTime { get; set; } /// [s]
/// Main result /// Main result
public virtual double Error { get; set; } /// [%] public virtual double Error { get; set; } /// [%]
public virtual double ErrorMass { get; set; } /// [%] //...MF
public virtual long ErrorIndicators { get; set; } /// Not mapped to DB !!!, bit24=E25, bit25=E26, bit26=E27, bit27=E28 (error flags) 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 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 TestDone { get; set; } /// true = test was completed
public virtual bool Passed { get; set; } /// true = test passed, water meter is OK public virtual bool Passed { get; set; } /// true = test passed, water meter is OK
public virtual bool PassedMass { get; set; } /// true = test passed, water meter is OK //...MF
public virtual string QuantityUnits { get; set; } /// dm3, kg, etc. - this value defined the quantity of meter, its decisive for distinction of pulse types
#if IPERL #if IPERL
public virtual int CalibFactor { get; set; } public virtual int CalibFactor { get; set; }
public virtual int CalibFactorLNA { get; set; } public virtual int CalibFactorLNA { get; set; }
@@ -124,6 +130,36 @@ namespace Results.Entities
} }
} }
//...MF
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);
}
}
//...MF
public virtual string GetQuantityFromUnits()
{
if (QuantityUnits == "kg")
{
return "Mass";
}
else if (QuantityUnits == "dm3")
{
return "Volume";
}
return "Volume";
}
public MeterTestRslt() public MeterTestRslt()
{ {
TestDone = false; TestDone = false;
@@ -157,6 +193,7 @@ namespace Results.Entities
PulsesMeter = src.PulsesMeter; PulsesMeter = src.PulsesMeter;
PulsesMaster = src.PulsesMaster; PulsesMaster = src.PulsesMaster;
PulsesPerLiter = src.PulsesPerLiter; PulsesPerLiter = src.PulsesPerLiter;
PulsesPerKilogram = src.PulsesPerKilogram;
VolumeStart = src.VolumeStart; VolumeStart = src.VolumeStart;
VolumeEnd = src.VolumeEnd; VolumeEnd = src.VolumeEnd;
VolumeMeter = src.VolumeMeter; VolumeMeter = src.VolumeMeter;
@@ -165,10 +202,13 @@ namespace Results.Entities
TimestampEnd = src.TimestampEnd; TimestampEnd = src.TimestampEnd;
TestTime = src.TestTime; TestTime = src.TestTime;
Error = src.Error; Error = src.Error;
ErrorMass = src.ErrorMass;
ErrorIndicators = src.ErrorIndicators; ErrorIndicators = src.ErrorIndicators;
InfoIndicators = src.InfoIndicators; InfoIndicators = src.InfoIndicators;
TestDone = src.TestDone; TestDone = src.TestDone;
Passed = src.Passed; Passed = src.Passed;
PassedMass = src.PassedMass;
QuantityUnits = src.QuantityUnits;
#if IPERL #if IPERL
CalibFactor = src.CalibFactor; CalibFactor = src.CalibFactor;
CalibFactorLNA = src.CalibFactorLNA; CalibFactorLNA = src.CalibFactorLNA;
@@ -204,6 +244,7 @@ namespace Results.Entities
writer.Write(PulsesMeter); writer.Write(PulsesMeter);
writer.Write(PulsesMaster); writer.Write(PulsesMaster);
writer.Write(PulsesPerLiter); writer.Write(PulsesPerLiter);
writer.Write(PulsesPerKilogram);
writer.Write(VolumeStart); writer.Write(VolumeStart);
writer.Write(VolumeEnd); writer.Write(VolumeEnd);
writer.Write(VolumeMeter); writer.Write(VolumeMeter);
@@ -212,10 +253,13 @@ namespace Results.Entities
writer.Write(TimestampEnd); writer.Write(TimestampEnd);
writer.Write(TestTime); writer.Write(TestTime);
writer.Write(Error); writer.Write(Error);
writer.Write(ErrorMass);
writer.Write(ErrorIndicators); writer.Write(ErrorIndicators);
writer.Write(InfoIndicators); writer.Write(InfoIndicators);
writer.Write(TestDone); writer.Write(TestDone);
writer.Write(Passed); writer.Write(Passed);
writer.Write(PassedMass);
writer.Write((QuantityUnits != null) ? QuantityUnits : string.Empty);
#if IPERL #if IPERL
writer.Write(CalibFactor); writer.Write(CalibFactor);
writer.Write(CalibFactorLNA); writer.Write(CalibFactorLNA);
@@ -248,6 +292,7 @@ namespace Results.Entities
PulsesMeter = reader.ReadDouble(); PulsesMeter = reader.ReadDouble();
PulsesMaster = reader.ReadDouble(); PulsesMaster = reader.ReadDouble();
PulsesPerLiter = reader.ReadDouble(); PulsesPerLiter = reader.ReadDouble();
PulsesPerKilogram = reader.ReadDouble();
VolumeStart = reader.ReadDouble(); VolumeStart = reader.ReadDouble();
VolumeEnd = reader.ReadDouble(); VolumeEnd = reader.ReadDouble();
VolumeMeter = reader.ReadDouble(); VolumeMeter = reader.ReadDouble();
@@ -256,10 +301,13 @@ namespace Results.Entities
TimestampEnd = reader.ReadDouble(); TimestampEnd = reader.ReadDouble();
TestTime = reader.ReadDouble(); TestTime = reader.ReadDouble();
Error = reader.ReadDouble(); Error = reader.ReadDouble();
ErrorMass = reader.ReadDouble();
ErrorIndicators = reader.ReadInt64(); ErrorIndicators = reader.ReadInt64();
InfoIndicators = reader.ReadInt64(); InfoIndicators = reader.ReadInt64();
TestDone = reader.ReadBoolean(); TestDone = reader.ReadBoolean();
Passed = reader.ReadBoolean(); Passed = reader.ReadBoolean();
PassedMass = reader.ReadBoolean();
QuantityUnits = reader.ReadString();
#if IPERL #if IPERL
CalibFactor = reader.ReadInt32(); CalibFactor = reader.ReadInt32();
CalibFactorLNA = reader.ReadInt32(); CalibFactorLNA = reader.ReadInt32();
+61 -22
View File
@@ -36,6 +36,8 @@ 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 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. 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. /// 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 MassStartRaw { get; set; } /// [kg]
public virtual double MassStart { get; set; } /// [kg] public virtual double MassStart { get; set; } /// [kg]
public virtual double MassEndRaw { get; set; } /// [kg] public virtual double MassEndRaw { get; set; } /// [kg]
@@ -49,7 +51,10 @@ namespace Results.Entities
public virtual double VolumeCTV { get; set; } /// [l] Volume 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 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 ErrorMaster { get; set; } /// [%] Error of the master flow meter
public virtual double MassFlow { get; set; } /// [t/h] calculated from conventional true value ...MF
public virtual double MassCTV { get; set; } /// [kg] Volume conventional true value ...MF
public virtual double MassMaster { get; set; } /// [kg] Volume from the master flow meter ...MF
public virtual double MassErrorMaster { get; set; } /// [%] Error of the master flow meter ...MF
public virtual float DiverterStart { get; set; } /// [s] Diverter switch time or a start/stop valve open time when the test starts 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) public virtual float DivStart10 { get; set; } /// [s] Diverter switch time when test starts at level 10 (e.g. 10%) (not mapped to DB)
public virtual float DivStart50 { get; set; } /// [s] Diverter switch time when test starts at level 50 (e.g. 50%) (not mapped to DB) public virtual float DivStart50 { get; set; } /// [s] Diverter switch time when test starts at level 50 (e.g. 50%) (not mapped to DB)
@@ -293,7 +298,8 @@ namespace Results.Entities
ConstMasterRaw = src.ConstMasterRaw; ConstMasterRaw = src.ConstMasterRaw;
ConstMasterCorr = src.ConstMasterCorr; ConstMasterCorr = src.ConstMasterCorr;
ConstMaster = src.ConstMaster; ConstMaster = src.ConstMaster;
MassStartRaw = src.MassStartRaw; MassConstMaster = src.MassConstMaster;
MassStartRaw = src.MassStartRaw;
MassStart = src.MassStart; MassStart = src.MassStart;
MassEndRaw = src.MassEndRaw; MassEndRaw = src.MassEndRaw;
MassEnd = src.MassEnd; MassEnd = src.MassEnd;
@@ -301,12 +307,16 @@ namespace Results.Entities
DensityLine = src.DensityLine; DensityLine = src.DensityLine;
DensityDiv = src.DensityDiv; DensityDiv = src.DensityDiv;
MassOfEvapWater = src.MassOfEvapWater; MassOfEvapWater = src.MassOfEvapWater;
Qdetected = src.Qdetected; Qdetected = src.Qdetected;
Flow = src.Flow; Flow = src.Flow;
VolumeCTV = src.VolumeCTV; VolumeCTV = src.VolumeCTV;
VolumeMaster = src.VolumeMaster; VolumeMaster = src.VolumeMaster;
ErrorMaster = src.ErrorMaster; ErrorMaster = src.ErrorMaster;
MassFlow = src.MassFlow;
MassCTV = src.MassCTV;
MassMaster = src.MassMaster;
MassErrorMaster = src.MassErrorMaster;
DiverterStart = src.DiverterStart; DiverterStart = src.DiverterStart;
DivStart10 = src.DivStart10; DivStart10 = src.DivStart10;
DivStart50 = src.DivStart50; DivStart50 = src.DivStart50;
@@ -439,24 +449,43 @@ namespace Results.Entities
public virtual string ToString(int i) public virtual string ToString(int i)
{ {
return string.Format("TestRslt: Part={0} RepetitionNr={1} TestDone={2} Remark={3} StartTime={4} EndTime={5} FlowSetTime={6} TestTime={7} PulsesMaster={8} ConstMaster={9} MassStartRaw={10} MassStart={11} MassEndRaw={12} MassEnd={13} DensityIn={14} DensityOut={15} DensityDiv={16} MassOfEvapWaater={17} FlowMass={18} FlowVolume={19} VolumeCTV={20} VolumeMaster={21} ErrorMaster={22} DiverterStart={85} DiverterEnd={86} ErrorFlags={23} InfoFlags={24} AmbTempMean={25} AmbTempStart={26} AmbTempEnd={27} AmbTempMin={28} AmbTempMax={29} AmbPressMean={30} AmbPressStart={31} AmbPressEnd={32} AmbPressMin={33} AmbPressMax={34} AmbHumiMean={35} AmbHumiStart={36} AmbHumiEnd={37} AmbHumiMin={38} AmbHumiMax={39} PressUpMean={40} PressUpStart={41} PressUpEnd={42} PressUpMin={43} PressUpMax={44} PressDownMean={45} PressDownStart={46} PressDownEnd={47} PressDownMin={48} PressDownMax={49} PressDeltaMean={50} PressDeltaStart={51} PressDeltaEnd={52} PressDeltaMin={53} PressDeltaMax={54} TempUpMean={55} TempUpStart={56} TempUpEnd={57} TempUpMin={58} TempUpMax={59} TempDownMean={60} TempDownStart={61} TempDownEnd={62} TempDownMin={63} TempDownMax={64} TempDivMean={65} TempDivStart={66} TempDivEnd={67} TempDivMin={68} TempDivMax={69} FlowMean={70} FlowStart={71} FlowEnd={72} FlowMin={73} FlowMax={74} Custom1={75} Custom2={76} Custom3={77} Custom4={78} Custom5={79} Custom6={80} Custom7={81} Custom8={82} Custom9={83} Custom10={84} TestMeasured={85} TestCollected={86}", return string.Format(
Part, RepetitionNr, TestDone, Remark, StartTime, EndTime, FlowSetTime, TestTime, "TestRslt: Part={0} RepetitionNr={1} TestDone={2} Remark={3} StartTime={4} EndTime={5} FlowSetTime={6} TestTime={7} " +
PulsesMaster, ConstMaster, MassStartRaw, MassStart, MassEndRaw, MassEnd, "PulsesMaster={8} ConstMaster={9} MassConstMaster={9} MassStartRaw={10} MassStart={11} MassEndRaw={12} MassEnd={13} " +
DensityIn, DensityLine, DensityDiv, MassOfEvapWater, Qdetected, Flow, "DensityIn={14} DensityOut={15} DensityDiv={16} MassOfEvapWater={17} FlowMass={18} Flow={19} " +
VolumeCTV, VolumeMaster, ErrorMaster, ErrorFlags, InfoFlags, "VolumeCTV={20} VolumeMaster={21} ErrorMaster={22} MassFlow={23} MassCTV={24} MassMaster={25} MassErrorMaster={26} " +
AmbTempMean, AmbTempStart, AmbTempEnd, AmbTempMin, AmbTempMax, "ErrorFlags={27} InfoFlags={28} " +
AmbPressMean, AmbPressStart, AmbPressEnd, AmbPressMin, AmbPressMax, "AmbTempMean={29} AmbTempStart={30} AmbTempEnd={31} AmbTempMin={32} AmbTempMax={33} " +
AmbHumiMean, AmbHumiStart, AmbHumiEnd, AmbHumiMin, AmbHumiMax, "AmbPressMean={34} AmbPressStart={35} AmbPressEnd={36} AmbPressMin={37} AmbPressMax={38} " +
PressUpMean, PressUpStart, PressUpEnd, PressUpMin, PressUpMax, "AmbHumiMean={39} AmbHumiStart={40} AmbHumiEnd={41} AmbHumiMin={42} AmbHumiMax={43} " +
PressDownMean, PressDownStart, PressDownEnd, PressDownMin, PressDownMax, "PressUpMean={44} PressUpStart={45} PressUpEnd={46} PressUpMin={47} PressUpMax={48} " +
PressDeltaMean, PressDeltaStart, PressDeltaEnd, PressDeltaMin, PressDeltaMax, "PressDownMean={49} PressDownStart={50} PressDownEnd={51} PressDownMin={52} PressDownMax={53} " +
TempUpMean, TempUpStart, TempUpEnd, TempUpMin, TempUpMax, "PressDeltaMean={54} PressDeltaStart={55} PressDeltaEnd={56} PressDeltaMin={57} PressDeltaMax={58} " +
TempDownMean, TempDownStart, TempDownEnd, TempDownMin, TempDownMax, "TempUpMean={59} TempUpStart={60} TempUpEnd={61} TempUpMin={62} TempUpMax={63} " +
TempDivMean, TempDivStart, TempDivEnd, TempDivMin, TempDivMax, "TempDownMean={64} TempDownStart={65} TempDownEnd={66} TempDownMin={67} TempDownMax={68} " +
FlowMean, FlowStart, FlowEnd, FlowMin, FlowMax, "TempDivMean={69} TempDivStart={70} TempDivEnd={71} TempDivMin={72} TempDivMax={73} " +
Custom1, Custom2, Custom3, Custom4, Custom5, Custom6, Custom7, Custom8, Custom9, Custom10, "FlowMean={74} FlowStart={75} FlowEnd={76} FlowMin={77} FlowMax={78} " +
DiverterStart, DiverterEnd, TestMeasured, TestCollected); "Custom1={79} Custom2={80} Custom3={81} Custom4={82} Custom5={83} Custom6={84} Custom7={85} Custom8={86} Custom9={87} Custom10={88} " +
} "DiverterStart={89} DiverterEnd={90} TestMeasured={91} TestCollected={92}",
Part, RepetitionNr, TestDone, Remark, StartTime, EndTime, FlowSetTime, TestTime,
PulsesMaster, ConstMaster, MassConstMaster, MassStartRaw, MassStart, MassEndRaw, MassEnd,
DensityIn, DensityLine, DensityDiv, MassOfEvapWater, Qdetected, Flow,
VolumeCTV, VolumeMaster, ErrorMaster, MassFlow,
MassCTV, MassMaster, MassErrorMaster, ErrorFlags, InfoFlags,
AmbTempMean, AmbTempStart, AmbTempEnd, AmbTempMin, AmbTempMax,
AmbPressMean, AmbPressStart, AmbPressEnd, AmbPressMin, AmbPressMax,
AmbHumiMean, AmbHumiStart, AmbHumiEnd, AmbHumiMin, AmbHumiMax,
PressUpMean, PressUpStart, PressUpEnd, PressUpMin, PressUpMax,
PressDownMean, PressDownStart, PressDownEnd, PressDownMin, PressDownMax,
PressDeltaMean, PressDeltaStart, PressDeltaEnd, PressDeltaMin, PressDeltaMax,
TempUpMean, TempUpStart, TempUpEnd, TempUpMin, TempUpMax,
TempDownMean, TempDownStart, TempDownEnd, TempDownMin, TempDownMax,
TempDivMean, TempDivStart, TempDivEnd, TempDivMin, TempDivMax,
FlowMean, FlowStart, FlowEnd, FlowMin, FlowMax,
Custom1, Custom2, Custom3, Custom4, Custom5, Custom6, Custom7, Custom8, Custom9, Custom10,
DiverterStart, DiverterEnd, TestMeasured, TestCollected
);
}
public virtual void WriteBinary(BinaryWriter writer, IList<TestData> savedTestDatas) public virtual void WriteBinary(BinaryWriter writer, IList<TestData> savedTestDatas)
@@ -503,6 +532,7 @@ namespace Results.Entities
writer.Write(ConstMasterRaw); writer.Write(ConstMasterRaw);
writer.Write(ConstMasterCorr); writer.Write(ConstMasterCorr);
writer.Write(ConstMaster); writer.Write(ConstMaster);
writer.Write(MassConstMaster);
writer.Write(MassStartRaw); writer.Write(MassStartRaw);
writer.Write(MassStart); writer.Write(MassStart);
writer.Write(MassEndRaw); writer.Write(MassEndRaw);
@@ -516,6 +546,10 @@ namespace Results.Entities
writer.Write(VolumeCTV); writer.Write(VolumeCTV);
writer.Write(VolumeMaster); writer.Write(VolumeMaster);
writer.Write(ErrorMaster); writer.Write(ErrorMaster);
writer.Write(MassFlow);
writer.Write(MassCTV);
writer.Write(MassMaster);
writer.Write(MassErrorMaster);
writer.Write(DiverterStart); writer.Write(DiverterStart);
writer.Write(DivStart10); writer.Write(DivStart10);
writer.Write(DivStart50); writer.Write(DivStart50);
@@ -646,6 +680,7 @@ namespace Results.Entities
ConstMasterRaw = reader.ReadDouble(); ConstMasterRaw = reader.ReadDouble();
ConstMasterCorr = reader.ReadDouble(); ConstMasterCorr = reader.ReadDouble();
ConstMaster = reader.ReadDouble(); ConstMaster = reader.ReadDouble();
MassConstMaster = reader.ReadDouble();
MassStartRaw = reader.ReadDouble(); MassStartRaw = reader.ReadDouble();
MassStart = reader.ReadDouble(); MassStart = reader.ReadDouble();
MassEndRaw = reader.ReadDouble(); MassEndRaw = reader.ReadDouble();
@@ -659,6 +694,10 @@ namespace Results.Entities
VolumeCTV = reader.ReadDouble(); VolumeCTV = reader.ReadDouble();
VolumeMaster = reader.ReadDouble(); VolumeMaster = reader.ReadDouble();
ErrorMaster = reader.ReadDouble(); ErrorMaster = reader.ReadDouble();
MassFlow = reader.ReadDouble();
MassCTV = reader.ReadDouble();
MassMaster = reader.ReadDouble();
MassErrorMaster = reader.ReadDouble();
DiverterStart = reader.ReadSingle(); DiverterStart = reader.ReadSingle();
DivStart10 = reader.ReadSingle(); DivStart10 = reader.ReadSingle();
DivStart50 = reader.ReadSingle(); DivStart50 = reader.ReadSingle();
+6 -1
View File
@@ -33,7 +33,8 @@ namespace Results.Entities
public virtual string ApprovalInfo { get; set; } public virtual string ApprovalInfo { get; set; }
public virtual string Certificate { get; set; } public virtual string Certificate { get; set; }
public virtual double PulsesPerLtr { get; set; } public virtual double PulsesPerLtr { get; set; }
public virtual double PulsesPerKilogram { get; set; }
/// Concerns compound water meters /// Concerns compound water meters
public virtual string ProducerAux { get; set; } public virtual string ProducerAux { get; set; }
public virtual double Q3_Qn_Aux { get; set; } /// [m3/h] public virtual double Q3_Qn_Aux { get; set; } /// [m3/h]
@@ -85,6 +86,7 @@ namespace Results.Entities
ApprovalInfo = oriWMData.ApprovalInfo; ApprovalInfo = oriWMData.ApprovalInfo;
Certificate = oriWMData.Certificate; Certificate = oriWMData.Certificate;
PulsesPerLtr = oriWMData.PulsesPerLtr; PulsesPerLtr = oriWMData.PulsesPerLtr;
PulsesPerKilogram = oriWMData.PulsesPerKilogram;
ProducerAux = oriWMData.ProducerAux; ProducerAux = oriWMData.ProducerAux;
Q3_Qn_Aux = oriWMData.Q3_Qn_Aux; Q3_Qn_Aux = oriWMData.Q3_Qn_Aux;
MetrologicalClassAux = oriWMData.MetrologicalClassAux; MetrologicalClassAux = oriWMData.MetrologicalClassAux;
@@ -129,6 +131,7 @@ namespace Results.Entities
if (ApprovalInfo != wmd.ApprovalInfo) return false; if (ApprovalInfo != wmd.ApprovalInfo) return false;
if (Certificate != wmd.Certificate) return false; if (Certificate != wmd.Certificate) return false;
if (PulsesPerLtr != wmd.PulsesPerLtr) return false; if (PulsesPerLtr != wmd.PulsesPerLtr) return false;
if (PulsesPerKilogram != wmd.PulsesPerKilogram) return false;
if (ProducerAux != wmd.ProducerAux) return false; if (ProducerAux != wmd.ProducerAux) return false;
if (Q3_Qn_Aux != wmd.Q3_Qn_Aux) return false; if (Q3_Qn_Aux != wmd.Q3_Qn_Aux) return false;
if (MetrologicalClassAux != wmd.MetrologicalClassAux) return false; if (MetrologicalClassAux != wmd.MetrologicalClassAux) return false;
@@ -188,6 +191,7 @@ namespace Results.Entities
writer.Write((ApprovalInfo != null) ? ApprovalInfo : string.Empty); writer.Write((ApprovalInfo != null) ? ApprovalInfo : string.Empty);
writer.Write((Certificate != null) ? Certificate : string.Empty); writer.Write((Certificate != null) ? Certificate : string.Empty);
writer.Write(PulsesPerLtr); writer.Write(PulsesPerLtr);
writer.Write(PulsesPerKilogram);
writer.Write((ProducerAux != null) ? ProducerAux : string.Empty); writer.Write((ProducerAux != null) ? ProducerAux : string.Empty);
writer.Write(Q3_Qn_Aux); writer.Write(Q3_Qn_Aux);
writer.Write((MetrologicalClassAux != null) ? MetrologicalClassAux : string.Empty); writer.Write((MetrologicalClassAux != null) ? MetrologicalClassAux : string.Empty);
@@ -227,6 +231,7 @@ namespace Results.Entities
ApprovalInfo = reader.ReadString(); ApprovalInfo = reader.ReadString();
Certificate = reader.ReadString(); Certificate = reader.ReadString();
PulsesPerLtr = reader.ReadDouble(); PulsesPerLtr = reader.ReadDouble();
PulsesPerKilogram = reader.ReadDouble();
ProducerAux = reader.ReadString(); ProducerAux = reader.ReadString();
Q3_Qn_Aux = reader.ReadDouble(); Q3_Qn_Aux = reader.ReadDouble();
MetrologicalClassAux = reader.ReadString(); MetrologicalClassAux = reader.ReadString();
+19 -1
View File
@@ -37,7 +37,9 @@ namespace Results
Ambient_pressure, /// 27 Ambient_pressure, /// 27
Ambient_humidity, /// 28 Ambient_humidity, /// 28
Volume, /// 29 Volume, /// 29
Quantity, /// 29
Reference_volume, /// 30 Reference_volume, /// 30
Reference_quantity, /// 30
Error, /// 31 Error, /// 31
Passed, /// 32 Passed, /// 32
Watermeter_type, /// 33 Watermeter_type, /// 33
@@ -69,6 +71,7 @@ namespace Results
End_state, /// 59 End_state, /// 59
Pulses, /// 60 Pulses, /// 60
Pulse__liter, /// 61 Water meter constant (pulses per liter) specific for one test Pulse__liter, /// 61 Water meter constant (pulses per liter) specific for one test
Pulse__kilogram, /// 61 Water meter constant (pulses per liter) specific for one test //...MF
Reference_pulses_ni, /// 62 Reference pulses gated for specific meter (synchro method) Reference_pulses_ni, /// 62 Reference pulses gated for specific meter (synchro method)
Reference_energy, /// 63 Reference_energy, /// 63
Bench_ID, /// 64 Test bench ID (int) obtained from a component implementing IBenchInfo Bench_ID, /// 64 Test bench ID (int) obtained from a component implementing IBenchInfo
@@ -81,6 +84,7 @@ namespace Results
Batch_start_time, /// 71 Batch_start_time, /// 71
Batch_end_time, /// 72 Batch_end_time, /// 72
Lite_per_pulse_Read, /// 73 Lite_per_pulse_Read, /// 73
Unit_per_pulse_Read, /// 73
Result_code, /// 74 Result_code, /// 74
Remark, /// 75 Remark, /// 75
T_Hi_mean, /// 76 T_Hi_mean, /// 76
@@ -98,9 +102,11 @@ namespace Results
Volume_main, /// 88 Volume_main, /// 88
Volume_aux, /// 89 Volume_aux, /// 89
Start_volume, /// 90 Start_volume, /// 90
Start_quantity, /// 90
Start_volume_main, /// 91 Start_volume_main, /// 91
Start_volume_aux, /// 92 Start_volume_aux, /// 92
End_volume, /// 93 End_volume, /// 93
End_quantity, /// 93
End_volume_main, /// 94 End_volume_main, /// 94
End_volume_aux, /// 95 End_volume_aux, /// 95
Error_main, /// 96 Error_main, /// 96
@@ -350,7 +356,19 @@ 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) 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 Failed_meters_countE15, /// 297
RR_Quantity, /// 0
RR_Units, /// 0
MassFlow, /// 15 Calculated flow (use ConstMasterRaw/ConstMaster to calculate uncorrected flow of the reference flow meter) ...MF
Error_mass, /// 31 ...MF
Passed_mass, /// 32 ...MF
Meter_mass, /// 29 ...MF
Reference_mass, /// 30 ...MF
TestPassed_mass, /// 125 ...MF
//Pulses_per_kilogram, /// 49 Water meter constant (water meter data, not used in calculations) //...MF
Pulses_per_unit, /// 49 Water meter constant (water meter data, not used in calculations) //...MF
MassCTV, /// 229 ...MF
Count, Count,
} }
} }
+8 -2
View File
@@ -16,16 +16,22 @@ namespace Results.Mappings
Map(x => x.PulsesMeter); Map(x => x.PulsesMeter);
Map(x => x.PulsesMaster); Map(x => x.PulsesMaster);
Map(x => x.PulsesPerLiter); Map(x => x.PulsesPerLiter);
Map(x => x.VolumeStart); Map(x => x.PulsesPerKilogram);
Map(x => x.VolumeStart);
Map(x => x.VolumeEnd); Map(x => x.VolumeEnd);
Map(x => x.VolumeMeter); Map(x => x.VolumeMeter);
Map(x => x.VolumeRef); Map(x => x.VolumeRef);
Map(x => x.TimestampStart); Map(x => x.MassMeter);
Map(x => x.MassRef);
Map(x => x.TimestampStart);
Map(x => x.TimestampEnd); Map(x => x.TimestampEnd);
Map(x => x.TestTime); Map(x => x.TestTime);
Map(x => x.Error); Map(x => x.Error);
Map(x => x.ErrorMass);
Map(x => x.TestDone); Map(x => x.TestDone);
Map(x => x.Passed); Map(x => x.Passed);
Map(x => x.PassedMass);
Map(x => x.QuantityUnits);
#if IPERL #if IPERL
Map(x => x.ExtraDataPath); Map(x => x.ExtraDataPath);
Map(x => x.X1); Map(x => x.X1);
+6 -1
View File
@@ -32,7 +32,8 @@ namespace Results.Mappings
Map(x => x.ConstMasterRaw); Map(x => x.ConstMasterRaw);
Map(x => x.ConstMasterCorr); Map(x => x.ConstMasterCorr);
Map(x => x.ConstMaster); Map(x => x.ConstMaster);
Map(x => x.MassStartRaw); Map(x => x.MassConstMaster);
Map(x => x.MassStartRaw);
Map(x => x.MassStart); Map(x => x.MassStart);
Map(x => x.MassEndRaw); Map(x => x.MassEndRaw);
Map(x => x.MassEnd); Map(x => x.MassEnd);
@@ -45,6 +46,10 @@ namespace Results.Mappings
Map(x => x.VolumeCTV); Map(x => x.VolumeCTV);
Map(x => x.VolumeMaster); Map(x => x.VolumeMaster);
Map(x => x.ErrorMaster); 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.DiverterStart);
Map(x => x.DiverterEnd); Map(x => x.DiverterEnd);
Map(x => x.ErrorFlags); Map(x => x.ErrorFlags);
+1
View File
@@ -36,6 +36,7 @@ namespace Results.Mappings
Map(x => x.Certificate); Map(x => x.Certificate);
Map(x => x.PulsesPerLtr); Map(x => x.PulsesPerLtr);
Map(x => x.PulsesPerKilogram);
Map(x => x.ProducerAux); Map(x => x.ProducerAux);
Map(x => x.Q3_Qn_Aux); Map(x => x.Q3_Qn_Aux);
+72
View File
@@ -294,6 +294,15 @@ 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> /// <summary>
/// Looks up a localized string similar to End state. /// Looks up a localized string similar to End state.
/// </summary> /// </summary>
@@ -888,6 +897,15 @@ namespace Results.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Pulses/kg.
/// </summary>
internal static string PulsesKilogram {
get {
return ResourceManager.GetString("PulsesKilogram", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Pulses/l. /// Looks up a localized string similar to Pulses/l.
/// </summary> /// </summary>
@@ -897,6 +915,15 @@ 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> /// <summary>
/// Looks up a localized string similar to Q fall. /// Looks up a localized string similar to Q fall.
/// </summary> /// </summary>
@@ -1131,6 +1158,15 @@ 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> /// <summary>
/// Looks up a localized string similar to Start volume. /// Looks up a localized string similar to Start volume.
/// </summary> /// </summary>
@@ -1338,6 +1374,15 @@ namespace Results.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Relative error of a meter.
/// </summary>
internal static string Tooltip_E_rel_mass {
get {
return ResourceManager.GetString("Tooltip_E_rel_mass", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Relative error of the master meter. /// Looks up a localized string similar to Relative error of the master meter.
/// </summary> /// </summary>
@@ -1950,6 +1995,15 @@ namespace Results.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Mass measured by the tested meter.
/// </summary>
internal static string Tooltip_Vol_Mt_mass {
get {
return ResourceManager.GetString("Tooltip_Vol_Mt_mass", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Reference volume for tested meter. /// Looks up a localized string similar to Reference volume for tested meter.
/// </summary> /// </summary>
@@ -1959,6 +2013,15 @@ namespace Results.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Reference mass for tested meter.
/// </summary>
internal static string Tooltip_Vol_rm_mass {
get {
return ResourceManager.GetString("Tooltip_Vol_rm_mass", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Uncertainty. /// Looks up a localized string similar to Uncertainty.
/// </summary> /// </summary>
@@ -2103,6 +2166,15 @@ 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> /// <summary>
/// Looks up a localized string similar to Temp.. /// Looks up a localized string similar to Temp..
/// </summary> /// </summary>
+69 -45
View File
@@ -123,9 +123,18 @@
<data name="Alignment" xml:space="preserve"> <data name="Alignment" xml:space="preserve">
<value>Zarovnání</value> <value>Zarovnání</value>
</data> </data>
<data name="Approval" xml:space="preserve">
<value>Schválení</value>
</data>
<data name="Available_results" xml:space="preserve"> <data name="Available_results" xml:space="preserve">
<value>Dostupné výsledky</value> <value>Dostupné výsledky</value>
</data> </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"> <data name="CancelBtnText" xml:space="preserve">
<value>Zrušit</value> <value>Zrušit</value>
</data> </data>
@@ -135,9 +144,21 @@
<data name="Configuration" xml:space="preserve"> <data name="Configuration" xml:space="preserve">
<value>Konfigurace</value> <value>Konfigurace</value>
</data> </data>
<data name="Density" xml:space="preserve">
<value>Hustota</value>
</data>
<data name="DownBtnText" xml:space="preserve"> <data name="DownBtnText" xml:space="preserve">
<value>Dolů</value> <value>Dolů</value>
</data> </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"> <data name="Format" xml:space="preserve">
<value>Formát</value> <value>Formát</value>
</data> </data>
@@ -150,8 +171,8 @@
<data name="Precision" xml:space="preserve"> <data name="Precision" xml:space="preserve">
<value>Přesnost</value> <value>Přesnost</value>
</data> </data>
<data name="Remark" xml:space="preserve"> <data name="Procedure" xml:space="preserve">
<value>Poznámka</value> <value>Procedura</value>
</data> </data>
<data name="Remove" xml:space="preserve"> <data name="Remove" xml:space="preserve">
<value>&lt; Odebrat</value> <value>&lt; Odebrat</value>
@@ -162,15 +183,15 @@
<data name="Result" xml:space="preserve"> <data name="Result" xml:space="preserve">
<value>Výsledek</value> <value>Výsledek</value>
</data> </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"> <data name="Selected_results" xml:space="preserve">
<value>Vybrané výsledky</value> <value>Vybrané výsledky</value>
</data> </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"> <data name="Test_ID" xml:space="preserve">
<value>Test</value> <value>Test</value>
</data> </data>
@@ -180,9 +201,21 @@
<data name="UpBtnText" xml:space="preserve"> <data name="UpBtnText" xml:space="preserve">
<value>Nahoru</value> <value>Nahoru</value>
</data> </data>
<data name="User" xml:space="preserve">
<value>Uživatel</value>
</data>
<data name="Width" xml:space="preserve"> <data name="Width" xml:space="preserve">
<value>Šířka</value> <value>Šířka</value>
</data> </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"> <data name="Mounting" xml:space="preserve">
<value>Montáž</value> <value>Montáž</value>
</data> </data>
@@ -195,54 +228,27 @@
<data name="Quantity" xml:space="preserve"> <data name="Quantity" xml:space="preserve">
<value>Veličina</value> <value>Veličina</value>
</data> </data>
<data name="sn" xml:space="preserve">
<value>sériové číslo</value>
</data>
<data name="Water_Meter" xml:space="preserve"> <data name="Water_Meter" xml:space="preserve">
<value>Vodoměr</value> <value>Vodoměr</value>
</data> </data>
<data name="Batch_nr" xml:space="preserve">
<value>Číslo dávky</value>
</data>
<data name="from" xml:space="preserve"> <data name="from" xml:space="preserve">
<value>od</value> <value>od</value>
</data> </data>
<data name="to" xml:space="preserve"> <data name="to" xml:space="preserve">
<value>do</value> <value>do</value>
</data> </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"> <data name="Density_correction" xml:space="preserve">
<value>Korekce hustoty</value> <value>Korekce hustoty</value>
</data> </data>
<data name="End" xml:space="preserve"> <data name="User_description" xml:space="preserve">
<value>Konec</value> <value>Popis uživatele</value>
</data> </data>
<data name="Procedure" xml:space="preserve"> <data name="Unit" xml:space="preserve">
<value>Procedura</value> <value>Jednotka</value>
</data> </data>
<data name="Procedure_description" xml:space="preserve"> <data name="Procedure_description" xml:space="preserve">
<value>Popis procedury</value> <value>Popis procedury</value>
</data> </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"> <data name="Bench_ID" xml:space="preserve">
<value>ID stanice</value> <value>ID stanice</value>
</data> </data>
@@ -315,9 +321,6 @@
<data name="Serial_number_is_missing" xml:space="preserve"> <data name="Serial_number_is_missing" xml:space="preserve">
<value>Chybí sériové číslo</value> <value>Chybí sériové číslo</value>
</data> </data>
<data name="Error" xml:space="preserve">
<value>Chyba</value>
</data>
<data name="Lower_limit" xml:space="preserve"> <data name="Lower_limit" xml:space="preserve">
<value>Dolní hranice</value> <value>Dolní hranice</value>
</data> </data>
@@ -330,9 +333,6 @@
<data name="Relative_error" xml:space="preserve"> <data name="Relative_error" xml:space="preserve">
<value>Relativní chyba</value> <value>Relativní chyba</value>
</data> </data>
<data name="Flow" xml:space="preserve">
<value>Průtok</value>
</data>
<data name="This_position_is_disabled" xml:space="preserve"> <data name="This_position_is_disabled" xml:space="preserve">
<value>Taro pozice je vypnuta</value> <value>Taro pozice je vypnuta</value>
</data> </data>
@@ -351,4 +351,28 @@
<data name="Merge" xml:space="preserve"> <data name="Merge" xml:space="preserve">
<value>Spojit</value> <value>Spojit</value>
</data> </data>
<data name="PulsesKilogram" xml:space="preserve">
<value />
</data>
<data name="Tooltip_E_rel_mass" xml:space="preserve">
<value />
</data>
<data name="Tooltip_Vol_Mt_mass" xml:space="preserve">
<value />
</data>
<data name="Tooltip_Vol_rm_mass" xml:space="preserve">
<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> </root>
+75 -51
View File
@@ -210,6 +210,9 @@
<data name="Procedure" xml:space="preserve"> <data name="Procedure" xml:space="preserve">
<value>Prüfvorlage</value> <value>Prüfvorlage</value>
</data> </data>
<data name="Producer" xml:space="preserve">
<value>Hersteller</value>
</data>
<data name="Protocol" xml:space="preserve"> <data name="Protocol" xml:space="preserve">
<value>Protokoll</value> <value>Protokoll</value>
</data> </data>
@@ -360,57 +363,6 @@
<data name="Mounting" xml:space="preserve"> <data name="Mounting" xml:space="preserve">
<value>Montage</value> <value>Montage</value>
</data> </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"> <data name="Energy" xml:space="preserve">
<value>Energie</value> <value>Energie</value>
</data> </data>
@@ -429,6 +381,21 @@
<data name="P_delta_start" xml:space="preserve"> <data name="P_delta_start" xml:space="preserve">
<value>Druckdifferenz Beginn Prüfung</value> <value>Druckdifferenz Beginn Prüfung</value>
</data> </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"> <data name="End_volume" xml:space="preserve">
<value>Ende Volumen</value> <value>Ende Volumen</value>
</data> </data>
@@ -459,6 +426,15 @@
<data name="Start_mass" xml:space="preserve"> <data name="Start_mass" xml:space="preserve">
<value>Start Prüfung</value> <value>Start Prüfung</value>
</data> </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"> <data name="VName_Flow" xml:space="preserve">
<value>Q</value> <value>Q</value>
</data> </data>
@@ -474,6 +450,9 @@
<data name="VName_Humi" xml:space="preserve"> <data name="VName_Humi" xml:space="preserve">
<value>Hu</value> <value>Hu</value>
</data> </data>
<data name="VName_Mass" xml:space="preserve">
<value>Masse</value>
</data>
<data name="VName_TstTime" xml:space="preserve"> <data name="VName_TstTime" xml:space="preserve">
<value>Tau</value> <value>Tau</value>
</data> </data>
@@ -582,6 +561,12 @@
<data name="Tooltip_T_up_st" xml:space="preserve"> <data name="Tooltip_T_up_st" xml:space="preserve">
<value>Temperatur Prüstreckeneingang am Prüfungsbeginn (4 Messungen nach Beginn)</value> <value>Temperatur Prüstreckeneingang am Prüfungsbeginn (4 Messungen nach Beginn)</value>
</data> </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"> <data name="Tooltip_E_rel" xml:space="preserve">
<value>Relative Messabweichung eines WZ</value> <value>Relative Messabweichung eines WZ</value>
</data> </data>
@@ -606,6 +591,18 @@
<data name="VName_Error" xml:space="preserve"> <data name="VName_Error" xml:space="preserve">
<value>E</value> <value>E</value>
</data> </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"> <data name="Tooltip_Hu_Amb_M" xml:space="preserve">
<value>Umgebungs-Luftfeuchtigkeit während der Prüfung</value> <value>Umgebungs-Luftfeuchtigkeit während der Prüfung</value>
</data> </data>
@@ -627,6 +624,9 @@
<data name="Yes" xml:space="preserve"> <data name="Yes" xml:space="preserve">
<value>Ja</value> <value>Ja</value>
</data> </data>
<data name="Density_correction" xml:space="preserve">
<value>Dichtekorrektur</value>
</data>
<data name="Error_flags" xml:space="preserve"> <data name="Error_flags" xml:space="preserve">
<value>Fehlerflags</value> <value>Fehlerflags</value>
</data> </data>
@@ -825,4 +825,28 @@
<data name="Selected_items" xml:space="preserve"> <data name="Selected_items" xml:space="preserve">
<value>Ausgewählte Objekte</value> <value>Ausgewählte Objekte</value>
</data> </data>
<data name="PulsesKilogram" xml:space="preserve">
<value>Impulse/kg</value>
</data>
<data name="Tooltip_E_rel_mass" xml:space="preserve">
<value />
</data>
<data name="Tooltip_Vol_Mt_mass" xml:space="preserve">
<value />
</data>
<data name="Tooltip_Vol_rm_mass" xml:space="preserve">
<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> </root>
+24
View File
@@ -804,4 +804,28 @@
<data name="Serial_number_is_missing" xml:space="preserve"> <data name="Serial_number_is_missing" xml:space="preserve">
<value>Numérotation en série</value> <value>Numérotation en série</value>
</data> </data>
<data name="PulsesKilogram" xml:space="preserve">
<value>Impulsion/kilogram</value>
</data>
<data name="Tooltip_E_rel_mass" xml:space="preserve">
<value />
</data>
<data name="Tooltip_Vol_Mt_mass" xml:space="preserve">
<value />
</data>
<data name="Tooltip_Vol_rm_mass" xml:space="preserve">
<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> </root>
+25 -1
View File
@@ -220,7 +220,7 @@
<value>impulsi </value> <value>impulsi </value>
</data> </data>
<data name="PulsesLiter" xml:space="preserve"> <data name="PulsesLiter" xml:space="preserve">
<value>impulsi /l</value> <value>impulsi/l</value>
</data> </data>
<data name="P_amb" xml:space="preserve"> <data name="P_amb" xml:space="preserve">
<value>P ambiente</value> <value>P ambiente</value>
@@ -537,4 +537,28 @@
<data name="Yes" xml:space="preserve"> <data name="Yes" xml:space="preserve">
<value>Sì</value> <value>Sì</value>
</data> </data>
<data name="PulsesKilogram" xml:space="preserve">
<value>impulsi/kg</value>
</data>
<data name="Tooltip_E_rel_mass" xml:space="preserve">
<value />
</data>
<data name="Tooltip_Vol_Mt_mass" xml:space="preserve">
<value />
</data>
<data name="Tooltip_Vol_rm_mass" xml:space="preserve">
<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> </root>
+24
View File
@@ -441,4 +441,28 @@
<data name="Unit" xml:space="preserve"> <data name="Unit" xml:space="preserve">
<value>Jednostka</value> <value>Jednostka</value>
</data> </data>
<data name="PulsesKilogram" xml:space="preserve">
<value>imp./kilogram</value>
</data>
<data name="Tooltip_E_rel_mass" xml:space="preserve">
<value />
</data>
<data name="Tooltip_Vol_Mt_mass" xml:space="preserve">
<value />
</data>
<data name="Tooltip_Vol_rm_mass" xml:space="preserve">
<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> </root>
+24
View File
@@ -852,4 +852,28 @@
<data name="Merge" xml:space="preserve"> <data name="Merge" xml:space="preserve">
<value>Merge</value> <value>Merge</value>
</data> </data>
<data name="PulsesKilogram" xml:space="preserve">
<value>Pulses/kg</value>
</data>
<data name="Tooltip_E_rel_mass" xml:space="preserve">
<value>Relative error of a meter</value>
</data>
<data name="Tooltip_Vol_Mt_mass" xml:space="preserve">
<value>Mass measured by the tested meter</value>
</data>
<data name="Tooltip_Vol_rm_mass" xml:space="preserve">
<value>Reference mass for tested meter</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> </root>
+29 -5
View File
@@ -420,22 +420,46 @@
<data name="Volume_main" xml:space="preserve"> <data name="Volume_main" xml:space="preserve">
<value>Объем главн.</value> <value>Объем главн.</value>
</data> </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"> <data name="aux" xml:space="preserve">
<value>доп.</value> <value>доп.</value>
</data> </data>
<data name="main" xml:space="preserve"> <data name="main" xml:space="preserve">
<value>главн.</value> <value>главн.</value>
</data> </data>
<data name="VName_Vol" xml:space="preserve">
<value>Объем</value>
</data>
<data name="No" xml:space="preserve"> <data name="No" xml:space="preserve">
<value>Нет</value> <value>Нет</value>
</data> </data>
<data name="Yes" xml:space="preserve"> <data name="Yes" xml:space="preserve">
<value>Да</value> <value>Да</value>
</data> </data>
<data name="Water_Meter" xml:space="preserve"> <data name="PulsesKilogram" xml:space="preserve">
<value>Счетчик воды</value> <value />
</data>
<data name="Tooltip_E_rel_mass" xml:space="preserve">
<value />
</data>
<data name="Tooltip_Vol_Mt_mass" xml:space="preserve">
<value />
</data>
<data name="Tooltip_Vol_rm_mass" xml:space="preserve">
<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> </data>
</root> </root>
+5 -3
View File
@@ -19,7 +19,7 @@
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;IPERL;HEAT_METERS;</DefineConstants> <DefineConstants>TRACE;DEBUG;HEAT_METERS;IPERL</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
@@ -29,7 +29,7 @@
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;IPERL;HEAT_METERS;</DefineConstants> <DefineConstants>TRACE;IPERL; HEAT_METERS;IPEL</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
@@ -239,7 +239,9 @@
<EmbeddedResource Include="Resources\Strings.de.resx"> <EmbeddedResource Include="Resources\Strings.de.resx">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Resources\Strings.fr.resx" /> <EmbeddedResource Include="Resources\Strings.fr.resx">
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Resources\Strings.it.resx" /> <EmbeddedResource Include="Resources\Strings.it.resx" />
<EmbeddedResource Include="Resources\Strings.pl.resx"> <EmbeddedResource Include="Resources\Strings.pl.resx">
<SubType>Designer</SubType> <SubType>Designer</SubType>
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -101,7 +101,7 @@
this.Controls.Add(this.exitButton); this.Controls.Add(this.exitButton);
this.Name = "NoBenchOrDatabaseDlg"; this.Name = "NoBenchOrDatabaseDlg";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Error"; this.Text = "Error_mass";
this.Load += new System.EventHandler(this.NoDatabaseMsgDlg_Load); this.Load += new System.EventHandler(this.NoDatabaseMsgDlg_Load);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
+6 -6
View File
@@ -187,16 +187,16 @@ namespace ResultsBrowser.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Error. /// Looks up a localized string similar to Error_mass.
/// </summary> /// </summary>
internal static string Error { internal static string Error {
get { get {
return ResourceManager.GetString("Error", resourceCulture); return ResourceManager.GetString("Error_mass", resourceCulture);
} }
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Error displaying results. /// Looks up a localized string similar to Error_mass displaying results.
/// </summary> /// </summary>
internal static string Error_displaying_results { internal static string Error_displaying_results {
get { get {
@@ -205,7 +205,7 @@ namespace ResultsBrowser.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Error exporting results. /// Looks up a localized string similar to Error_mass exporting results.
/// </summary> /// </summary>
internal static string Error_exporting_results { internal static string Error_exporting_results {
get { get {
@@ -214,7 +214,7 @@ namespace ResultsBrowser.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Error saving file. /// Looks up a localized string similar to Error_mass saving file.
/// </summary> /// </summary>
internal static string Error_saving_file { internal static string Error_saving_file {
get { get {
@@ -223,7 +223,7 @@ namespace ResultsBrowser.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Error serializing filters. /// Looks up a localized string similar to Error_mass serializing filters.
/// </summary> /// </summary>
internal static string Error_serializing_filters { internal static string Error_serializing_filters {
get { get {
+1 -1
View File
@@ -21,7 +21,7 @@
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;MANAGED;ORACLE_DB;TURA_IPERL</DefineConstants> <DefineConstants>TRACE;DEBUG;MANAGED;ORACLE_DB;TURA_IPERL;HEAT_METERS</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks> <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+1 -42
View File
@@ -12,7 +12,6 @@ namespace SchematicDrawing
public readonly Sz Sz; /// see enum SchematicDrawing.Sz public readonly Sz Sz; /// see enum SchematicDrawing.Sz
public readonly int SzX; /// Size X in SchematicDrawing.Const.Step pixels public readonly int SzX; /// Size X in SchematicDrawing.Const.Step pixels
public readonly int SzY; /// Size Y in SchematicDrawing.Const.Step pixels public readonly int SzY; /// Size Y in SchematicDrawing.Const.Step pixels
public readonly int OffsX; /// Offset of left/top coordinate of the bitmap when rendering public readonly int OffsX; /// Offset of left/top coordinate of the bitmap when rendering
public readonly int OffsY; /// Offset of left/top coordinate of the bitmap when rendering public readonly int OffsY; /// Offset of left/top coordinate of the bitmap when rendering
public readonly int Wid; /// Width of the bitmap when rendering, original bitmap is resized to this size public readonly int Wid; /// Width of the bitmap when rendering, original bitmap is resized to this size
@@ -378,40 +377,6 @@ namespace SchematicDrawing
Properties.Resources.Valve_XL_closed, Properties.Resources.Valve_XL_closed,
Properties.Resources.Valve_XL_vacuum, Properties.Resources.Valve_XL_vacuum,
Properties.Resources.Valve_XL_open_dry); Properties.Resources.Valve_XL_open_dry);
/// ValveSw
Shapes[DrShIx(Shape.ValveSw, Sz.S)] = new DrawingShape(Shape.ValveSw, Sz.S, 2, 2,
new Node[] { new Node(0, 1, Orient.L), new Node(2, 1, Orient.R) },
new Edge[] { new Edge(0, 1, 20, RouteCouple.OpenWhen1), new Edge(1, 0, 20, RouteCouple.OpenWhen1) },
0, 0, 20, 20,
Properties.Resources.ValveSw_S_open,
Properties.Resources.ValveSw_S_closed,
Properties.Resources.ValveSw_S_vacuum,
Properties.Resources.ValveSw_S_open_dry);
Shapes[DrShIx(Shape.ValveSw, Sz.M)] = new DrawingShape(Shape.ValveSw, Sz.M, 3, 4,
new Node[] { new Node(0, 2, Orient.L), new Node(3, 2, Orient.R) },
new Edge[] { new Edge(0, 1, 30, RouteCouple.OpenWhen1), new Edge(1, 0, 30, RouteCouple.OpenWhen1) },
0, 5, 30, 30,
Properties.Resources.ValveSw_M_open,
Properties.Resources.ValveSw_M_closed,
Properties.Resources.ValveSw_M_vacuum,
Properties.Resources.ValveSw_M_open_dry);
Shapes[DrShIx(Shape.ValveSw, Sz.L)] = new DrawingShape(Shape.ValveSw, Sz.L, 4, 4,
new Node[] { new Node(0, 2, Orient.L), new Node(4, 2, Orient.R) },
new Edge[] { new Edge(0, 1, 40, RouteCouple.OpenWhen1), new Edge(1, 0, 40, RouteCouple.OpenWhen1) },
0, 0, 40, 40,
Properties.Resources.ValveSw_L_open,
Properties.Resources.ValveSw_L_closed,
Properties.Resources.ValveSw_L_vacuum,
Properties.Resources.ValveSw_L_open_dry);
Shapes[DrShIx(Shape.ValveSw, Sz.XL)] = new DrawingShape(Shape.ValveSw, Sz.XL, 5, 6,
new Node[] { new Node(0, 3, Orient.L), new Node(5, 3, Orient.R) },
new Edge[] { new Edge(0, 1, 50, RouteCouple.OpenWhen1), new Edge(1, 0, 50, RouteCouple.OpenWhen1) },
0, 5, 50, 50,
Properties.Resources.ValveSw_XL_open,
Properties.Resources.ValveSw_XL_closed,
Properties.Resources.ValveSw_XL_vacuum,
Properties.Resources.ValveSw_XL_open_dry);
/// Diverter /// Diverter
Shapes[DrShIx(Shape.Div, Sz.S)] = new DrawingShape(Shape.Div, Sz.S, 2, 2, Shapes[DrShIx(Shape.Div, Sz.S)] = new DrawingShape(Shape.Div, Sz.S, 2, 2,
new Node[] { new Node(2, 0, Orient.Up), new Node(1, 2, Orient.Dn), new Node(3, 2, Orient.Dn) }, new Node[] { new Node(2, 0, Orient.Up), new Node(1, 2, Orient.Dn), new Node(3, 2, Orient.Dn) },
@@ -557,18 +522,12 @@ namespace SchematicDrawing
Shapes[DrShIx(Shape.Scale, Sz.L)] = new DrawingShape(Shape.Scale, Sz.L, 12, 11, new Node[] { new Node(6, 11, Orient.Dn) }, null, 0, 0, 120, 110, Properties.Resources.Scale_L); Shapes[DrShIx(Shape.Scale, Sz.L)] = new DrawingShape(Shape.Scale, Sz.L, 12, 11, new Node[] { new Node(6, 11, Orient.Dn) }, null, 0, 0, 120, 110, Properties.Resources.Scale_L);
Shapes[DrShIx(Shape.Scale, Sz.XL)] = new DrawingShape(Shape.Scale, Sz.XL, 16, 13, new Node[] { new Node(8, 13, Orient.Dn) }, null, 0, 0, 160, 130, Properties.Resources.Scale_XL); Shapes[DrShIx(Shape.Scale, Sz.XL)] = new DrawingShape(Shape.Scale, Sz.XL, 16, 13, new Node[] { new Node(8, 13, Orient.Dn) }, null, 0, 0, 160, 130, Properties.Resources.Scale_XL);
/// Tank uni /// Tank
Shapes[DrShIx(Shape.Tank, Sz.S)] = new DrawingShape(Shape.Tank, Sz.S, 10, 8, new Node[] { new Node(0, 6, Orient.L) }, null, 0, 0, 100, 80, Properties.Resources.Tank_S); Shapes[DrShIx(Shape.Tank, Sz.S)] = new DrawingShape(Shape.Tank, Sz.S, 10, 8, new Node[] { new Node(0, 6, Orient.L) }, null, 0, 0, 100, 80, Properties.Resources.Tank_S);
Shapes[DrShIx(Shape.Tank, Sz.M)] = new DrawingShape(Shape.Tank, Sz.M, 12, 9, new Node[] { new Node(0, 7, Orient.L) }, null, 0, 0, 120, 90, Properties.Resources.Tank_M); Shapes[DrShIx(Shape.Tank, Sz.M)] = new DrawingShape(Shape.Tank, Sz.M, 12, 9, new Node[] { new Node(0, 7, Orient.L) }, null, 0, 0, 120, 90, Properties.Resources.Tank_M);
Shapes[DrShIx(Shape.Tank, Sz.L)] = new DrawingShape(Shape.Tank, Sz.L, 15, 11, new Node[] { new Node(0, 9, Orient.L) }, null, 0, 0, 150, 110, Properties.Resources.Tank_L); Shapes[DrShIx(Shape.Tank, Sz.L)] = new DrawingShape(Shape.Tank, Sz.L, 15, 11, new Node[] { new Node(0, 9, Orient.L) }, null, 0, 0, 150, 110, Properties.Resources.Tank_L);
Shapes[DrShIx(Shape.Tank, Sz.XL)] = new DrawingShape(Shape.Tank, Sz.XL, 20, 13, new Node[] { new Node(0, 11, Orient.L) }, null, 0, 0, 200, 130, Properties.Resources.Tank_XL); Shapes[DrShIx(Shape.Tank, Sz.XL)] = new DrawingShape(Shape.Tank, Sz.XL, 20, 13, new Node[] { new Node(0, 11, Orient.L) }, null, 0, 0, 200, 130, Properties.Resources.Tank_XL);
/// Tank hot
Shapes[DrShIx(Shape.TankHot, Sz.S)] = new DrawingShape(Shape.TankHot, Sz.S, 10, 8, new Node[] { new Node(0, 6, Orient.L) }, null, 0, 0, 100, 80, Properties.Resources.Tank_S_hot);
Shapes[DrShIx(Shape.TankHot, Sz.M)] = new DrawingShape(Shape.TankHot, Sz.M, 12, 9, new Node[] { new Node(0, 7, Orient.L) }, null, 0, 0, 120, 90, Properties.Resources.Tank_M_hot);
Shapes[DrShIx(Shape.TankHot, Sz.L)] = new DrawingShape(Shape.TankHot, Sz.L, 15, 11, new Node[] { new Node(0, 9, Orient.L) }, null, 0, 0, 150, 110, Properties.Resources.Tank_L_hot);
Shapes[DrShIx(Shape.TankHot, Sz.XL)] = new DrawingShape(Shape.TankHot, Sz.XL, 20, 13, new Node[] { new Node(0, 11, Orient.L) }, null, 0, 0, 200, 130, Properties.Resources.Tank_XL_hot);
/// Junction /// Junction
Shapes[DrShIx(Shape.Junction, Sz.None)] = new DrawingShape(Shape.Junction, Sz.None, 0, 0, new Node[] { new Node(0, 0, Orient.R) }); Shapes[DrShIx(Shape.Junction, Sz.None)] = new DrawingShape(Shape.Junction, Sz.None, 0, 0, new Node[] { new Node(0, 0, Orient.R) });
Shapes[DrShIx(Shape.Junction, Sz.S)] = new DrawingShape(Shape.Junction, Sz.S, 2, 2, Shapes[DrShIx(Shape.Junction, Sz.S)] = new DrawingShape(Shape.Junction, Sz.S, 2, 2,
-2
View File
@@ -45,13 +45,11 @@ namespace SchematicDrawing
Scale, Scale,
Sink, Sink,
Tank, Tank,
TankHot,
Tee, Tee,
TempM, TempM,
UniCB, UniCB,
Vacuum, Vacuum,
Valve, Valve,
ValveSw,
WaterM, WaterM,
ElectricM, ElectricM,
Binary file not shown.

Before

Width:  |  Height:  |  Size: 842 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 768 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 746 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 894 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1018 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 667 B

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