Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fb74e2d785 |
@@ -17,7 +17,7 @@
|
|||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
<DefineConstants>TRACE;DEBUG;LANG_PL</DefineConstants>
|
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
<DefineConstants>TRACE;LANG_PL</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -181,18 +181,6 @@ namespace Results.Entities
|
|||||||
return WaterMeters.Count - PassedMetersCount();
|
return WaterMeters.Count - PassedMetersCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public virtual int PassedMetersCountE15()
|
|
||||||
{
|
|
||||||
int count = 0;
|
|
||||||
foreach (var mtr in WaterMeters) if (mtr.PassedFromTestsE15()) count++;
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
public virtual int FailedMetersCountE15()
|
|
||||||
{
|
|
||||||
return WaterMeters.Count - PassedMetersCountE15();
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual long ErrorFlags()
|
public virtual long ErrorFlags()
|
||||||
{
|
{
|
||||||
long result = 0;
|
long result = 0;
|
||||||
|
|||||||
@@ -190,12 +190,6 @@ namespace Results.Entities
|
|||||||
return ErrorFlagsFromTests() | ErrorFlags;
|
return ErrorFlagsFromTests() | ErrorFlags;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual long ErrorFlagsFromTestsAndWMByFlag(ErrorFlagMask errorFlagsQuestion)
|
|
||||||
{
|
|
||||||
long errorFlagsMask = (long)errorFlagsQuestion;
|
|
||||||
return ErrorFlagsFromTests() & errorFlagsMask;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Convert combined errorFlags of all tests to string
|
/// Convert combined errorFlags of all tests to string
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -277,24 +271,6 @@ namespace Results.Entities
|
|||||||
return passed;
|
return passed;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual bool PassedFromTestsE15()
|
|
||||||
{
|
|
||||||
//TODO BUMI this will just let us is E15
|
|
||||||
bool passed = (ErrorFlagsFromTestsAndWMByFlag(ErrorFlagMask.E15) == 0);
|
|
||||||
|
|
||||||
//TODO BUMI Check This may be not needed ?
|
|
||||||
foreach (var mtr in MeterTestRslts)
|
|
||||||
{
|
|
||||||
if (mtr.Evaluate() && (!mtr.TestDone))
|
|
||||||
{
|
|
||||||
passed = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return passed;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Three state test results and/or water meter result (Algeria PT25 requirement).
|
/// Three state test results and/or water meter result (Algeria PT25 requirement).
|
||||||
/// NearlyOK means error is within error limits not narrowed by uncertainty
|
/// NearlyOK means error is within error limits not narrowed by uncertainty
|
||||||
|
|||||||
@@ -349,8 +349,6 @@ namespace Results
|
|||||||
Pulses_main, /// 295 Compound main meter pulses (recalculated so that the gated ref. pulses for this meter are equal to the total ref. pulses)
|
Pulses_main, /// 295 Compound main 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)
|
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
|
|
||||||
|
|
||||||
Count,
|
Count,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-68
@@ -224,18 +224,15 @@ namespace Results.Output
|
|||||||
/// Calculate Y-coordinate taking into account cell merging
|
/// Calculate Y-coordinate taking into account cell merging
|
||||||
float mergedRowPos = rowPos[rowIx];
|
float mergedRowPos = rowPos[rowIx];
|
||||||
mergedCellsCount = 1;
|
mergedCellsCount = 1;
|
||||||
List<string> texts = new List<string>();
|
|
||||||
texts.Add(Cells[rowIx][colIx].Text);
|
|
||||||
for (int rowIx2 = rowIx - 1; rowIx2 >= 0 && Cells[rowIx2][colIx].BottomMerge; rowIx2--)
|
for (int rowIx2 = rowIx - 1; rowIx2 >= 0 && Cells[rowIx2][colIx].BottomMerge; rowIx2--)
|
||||||
{
|
{
|
||||||
mergedRowPos += rowPos[rowIx2];
|
mergedRowPos += rowPos[rowIx2];
|
||||||
mergedCellsCount++;
|
mergedCellsCount++;
|
||||||
texts.Add(Cells[rowIx2][colIx].Text);
|
|
||||||
}
|
}
|
||||||
mergedRowPos /= mergedCellsCount;
|
mergedRowPos /= mergedCellsCount;
|
||||||
|
|
||||||
/// Print the text at the calculated position
|
/// Print the text at the calculated position
|
||||||
Common.Printers.PrintersCommon.PrintAt(e, mergedCellsCount == 1 ? Cells[rowIx][colIx].Text : GetMergedCellStringAsNegativeOrPositive(texts),
|
Common.Printers.PrintersCommon.PrintAt(e, Cells[rowIx][colIx].Text,
|
||||||
Cells[rowIx][colIx].Font,
|
Cells[rowIx][colIx].Font,
|
||||||
left + mergedColPos,
|
left + mergedColPos,
|
||||||
top + mergedRowPos,
|
top + mergedRowPos,
|
||||||
@@ -312,70 +309,6 @@ namespace Results.Output
|
|||||||
return table;
|
return table;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetMergedCellStringAsNegativeOrPositive(List<string> texts)
|
|
||||||
{
|
|
||||||
if (texts.Count < 1)
|
|
||||||
{
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
bool firstIsHead = false;
|
|
||||||
bool hasNegativeAll = true;
|
|
||||||
bool hasPositiveAll = true;
|
|
||||||
bool hasMixed = false;
|
|
||||||
string lastRowText = null;
|
|
||||||
|
|
||||||
//check if is a header
|
|
||||||
|
|
||||||
foreach (string text in texts)
|
|
||||||
{
|
|
||||||
if (text != "-")
|
|
||||||
{
|
|
||||||
hasNegativeAll = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (text != "+")
|
|
||||||
{
|
|
||||||
hasPositiveAll = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!hasMixed)
|
|
||||||
{
|
|
||||||
if (lastRowText == null)
|
|
||||||
{
|
|
||||||
lastRowText = text;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (lastRowText != text)
|
|
||||||
{
|
|
||||||
hasMixed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
lastRowText = text;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (hasMixed)
|
|
||||||
{
|
|
||||||
//merge as negative
|
|
||||||
return "-";
|
|
||||||
}
|
|
||||||
else if (hasPositiveAll)
|
|
||||||
{
|
|
||||||
//merge as positive
|
|
||||||
return "+";
|
|
||||||
}
|
|
||||||
else if (hasNegativeAll)
|
|
||||||
{
|
|
||||||
//merge as negative
|
|
||||||
return "-";
|
|
||||||
}
|
|
||||||
|
|
||||||
return texts[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create a table where tests are in columns.
|
/// Create a table where tests are in columns.
|
||||||
/// Left column contains item (or row) captions.
|
/// Left column contains item (or row) captions.
|
||||||
|
|||||||
@@ -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;LANG_PL</DefineConstants>
|
<DefineConstants>TRACE;DEBUG</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;LANG_PL</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
|
|||||||
@@ -408,7 +408,6 @@ namespace Results
|
|||||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Lite_per_pulse_Read, "1 / PlsPerLtr_Read", Quantity.PulsePerLtr, ItemCategory.Other, (w,t,u,f,p) => FormatDbl(u, f, p, "V4", (w.WaterMeterData.PulsesPerLtr != 0) ? 1/w.WaterMeterData.PulsesPerLtr : 0)));
|
AllItems.Add(new WMeterRsltItemSpec(ItemID.Lite_per_pulse_Read, "1 / PlsPerLtr_Read", Quantity.PulsePerLtr, ItemCategory.Other, (w,t,u,f,p) => FormatDbl(u, f, p, "V4", (w.WaterMeterData.PulsesPerLtr != 0) ? 1/w.WaterMeterData.PulsesPerLtr : 0)));
|
||||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Passed_meters_count, Strings.Passed_meters_count, Quantity.Number, ItemCategory.Other, (w,t,u,f,p) => FormatInt(f, w.Batch.PassedMetersCount())));
|
AllItems.Add(new WMeterRsltItemSpec(ItemID.Passed_meters_count, Strings.Passed_meters_count, Quantity.Number, ItemCategory.Other, (w,t,u,f,p) => FormatInt(f, w.Batch.PassedMetersCount())));
|
||||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Failed_meters_count, Strings.Failed_meters_count, Quantity.Number, ItemCategory.Other, (w,t,u,f,p) => FormatInt(f, w.Batch.FailedMetersCount())));
|
AllItems.Add(new WMeterRsltItemSpec(ItemID.Failed_meters_count, Strings.Failed_meters_count, Quantity.Number, ItemCategory.Other, (w,t,u,f,p) => FormatInt(f, w.Batch.FailedMetersCount())));
|
||||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Failed_meters_countE15, Strings.Failed_meters_count + "E15", Quantity.Number, ItemCategory.Other, (w,t,u,f,p) => FormatInt(f, w.Batch.FailedMetersCountE15())));
|
|
||||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Passed_seals_count, "Seals count of passed meters", Quantity.Number, ItemCategory.Other, (w,t,u,f,p) => FormatInt(f, w.Batch.PassedMetersCount() * int.Parse(w.WaterMeterData.Text5))));
|
AllItems.Add(new WMeterRsltItemSpec(ItemID.Passed_seals_count, "Seals count of passed meters", Quantity.Number, ItemCategory.Other, (w,t,u,f,p) => FormatInt(f, w.Batch.PassedMetersCount() * int.Parse(w.WaterMeterData.Text5))));
|
||||||
|
|
||||||
/// Extra water meter data
|
/// Extra water meter data
|
||||||
|
|||||||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
|||||||
// Build Number
|
// Build Number
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
[assembly: AssemblyVersion("3.9.2143.1")]
|
[assembly: AssemblyVersion("3.9.2142.21")]
|
||||||
[assembly: AssemblyFileVersion("3.9.2143.1")]
|
[assembly: AssemblyFileVersion("3.9.2142.21")]
|
||||||
|
|||||||
@@ -29,14 +29,12 @@ namespace TBF.Rig.BuiltIn
|
|||||||
/// Relative time in [s] from the start of the operation
|
/// Relative time in [s] from the start of the operation
|
||||||
int timeShift; /// Set in SetValvesOp(cb, bool open, OutputPath outPath, DateTimeBox timeStamp)
|
int timeShift; /// Set in SetValvesOp(cb, bool open, OutputPath outPath, DateTimeBox timeStamp)
|
||||||
|
|
||||||
int waitOnCBDelay = 2; // additional wait for the correct ControlBoard response in [s]
|
/// <summary>
|
||||||
|
/// Processes coupled valves and creates switch points.
|
||||||
/// <summary>
|
/// </summary>
|
||||||
/// Processes coupled valves and creates switch points.
|
/// <param name="valvesOpen">A list of opening master valves</param>
|
||||||
/// </summary>
|
/// <param name="valvesClose">A list of closing master valves</param>
|
||||||
/// <param name="valvesOpen">A list of opening master valves</param>
|
/// <returns></returns>
|
||||||
/// <param name="valvesClose">A list of closing master valves</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
IList<SwitchPoint> AddSwitchPoints(IList<SwitchPoint> swPoints, IList<IValve> valvesOpen, IList<IValve> valvesClose, int time)
|
IList<SwitchPoint> AddSwitchPoints(IList<SwitchPoint> swPoints, IList<IValve> valvesOpen, IList<IValve> valvesClose, int time)
|
||||||
{
|
{
|
||||||
int ix0 = swPoints.Count;
|
int ix0 = swPoints.Count;
|
||||||
@@ -279,7 +277,7 @@ namespace TBF.Rig.BuiltIn
|
|||||||
{
|
{
|
||||||
if (nextIx >= switchPoints.Count)
|
if (nextIx >= switchPoints.Count)
|
||||||
{
|
{
|
||||||
return (StateMachine.Time >= swStartTime + maxDelayTime + waitOnCBDelay) ? Event.ValvesSet : Event.ValvesBusy;
|
return (StateMachine.Time >= swStartTime + maxDelayTime) ? Event.ValvesSet : Event.ValvesBusy;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StateMachine.Time >= swStartTime + switchPoints[nextIx].TimeSec)
|
if (StateMachine.Time >= swStartTime + switchPoints[nextIx].TimeSec)
|
||||||
|
|||||||
@@ -669,7 +669,10 @@ namespace TBF.Rig.DataEntry.StandartCameraPurchaseOrder
|
|||||||
{
|
{
|
||||||
foreach (PurchaseOrder pOrder in purchaseOrderListExample)
|
foreach (PurchaseOrder pOrder in purchaseOrderListExample)
|
||||||
{
|
{
|
||||||
orderComboBox.Items.Add(pOrder.Name);
|
if (pOrder != null && !String.IsNullOrEmpty(pOrder.Name))
|
||||||
|
{
|
||||||
|
orderComboBox.Items.Add(pOrder.Name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadPurchaseBox("");
|
LoadPurchaseBox("");
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
/// Copyright (c) 2017 Sensus Metering Systems
|
/// Copyright (c) 2017 Sensus Metering Systems
|
||||||
///
|
///
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using Common;
|
|
||||||
using log4net;
|
using log4net;
|
||||||
|
|
||||||
namespace TBF.Rig.Network.Adapter
|
namespace TBF.Rig.Network.Adapter
|
||||||
@@ -38,11 +37,7 @@ namespace TBF.Rig.Network.Adapter
|
|||||||
AdapterInfo netadapter = AdapterInfo.GetNetAdapter(netadapterCfg.Description);
|
AdapterInfo netadapter = AdapterInfo.GetNetAdapter(netadapterCfg.Description);
|
||||||
ipAddress = netadapter.IPAddress;
|
ipAddress = netadapter.IPAddress;
|
||||||
netMask = netadapter.NetMask;
|
netMask = netadapter.NetMask;
|
||||||
|
broadcastAddress = netadapter.GetBroadcastAddress();
|
||||||
if (this.Cfg.DebugLevel != DebugMode.Simulate)
|
|
||||||
{
|
|
||||||
broadcastAddress = netadapter.GetBroadcastAddress();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user