Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
efd0515295 |
@@ -302,7 +302,6 @@ namespace Common
|
||||
string passwordOfDay = Convert.ToString(number, 8);
|
||||
|
||||
return (userName.Equals("milan") && password.Equals("kraken")) ||
|
||||
(userName.Equals("michal") && password.Equals("70630")) ||
|
||||
(userName.Equals("igor") && password.Equals("mojronko8")) ||
|
||||
(userName.Equals("lubo1212") && password.Equals("Tatry52")) ||
|
||||
(userName.Equals("Michal") && password.Equals("Plok789456123")) ||
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CalendarEvent\ICalendarEvent.cs" />
|
||||
<Compile Include="Data.cs" />
|
||||
<Compile Include="Entities\BenchPath.cs" />
|
||||
<Compile Include="Entities\CustomEvent.cs" />
|
||||
<Compile Include="Entities\Component.cs" />
|
||||
@@ -95,6 +96,7 @@
|
||||
<Compile Include="Entities\VirtualBenchStep.cs" />
|
||||
<Compile Include="CalendarEvent\Utils.cs" />
|
||||
<Compile Include="FluentCommon.cs" />
|
||||
<Compile Include="Formulas.cs" />
|
||||
<Compile Include="Mappings\BenchPathMap.cs" />
|
||||
<Compile Include="Mappings\ComponentMap.cs" />
|
||||
<Compile Include="Mappings\ComponentProcedureMap.cs" />
|
||||
|
||||
@@ -18,8 +18,9 @@ namespace Config.Entities
|
||||
public virtual Unit FlowUnit { get; set; } /// Not mapped to database, used in UI
|
||||
public virtual string Selector { get; set; }
|
||||
public virtual string RegValve { get; set; }
|
||||
public virtual string FlowMeter { get; set; }
|
||||
public virtual float PidCoef { get; set; } /// PID coefficient for the regulation path
|
||||
public virtual int RegulMinStep { get; set; }
|
||||
public virtual string FlowMeter { get; set; }
|
||||
public virtual float PidCoef { get; set; } /// PID coefficient for the regulation path
|
||||
public virtual string StartValve { get; set; }
|
||||
public virtual string Diverter { get; set; }
|
||||
public virtual string TempMtrDiv { get; set; }
|
||||
@@ -39,6 +40,7 @@ namespace Config.Entities
|
||||
{
|
||||
ValvesOpen = string.Empty;
|
||||
ValvesClose = string.Empty;
|
||||
RegulMinStep = 0;
|
||||
}
|
||||
|
||||
public OutputPath(string name, int itemNr)
|
||||
@@ -46,7 +48,9 @@ namespace Config.Entities
|
||||
{
|
||||
Name = name;
|
||||
ItemNr = itemNr;
|
||||
}
|
||||
RegulMinStep = 0;
|
||||
|
||||
}
|
||||
|
||||
public virtual OutputPath Clone(string name, int itemNr)
|
||||
{
|
||||
@@ -58,7 +62,8 @@ namespace Config.Entities
|
||||
result.FlowUnit = FlowUnit;
|
||||
result.Selector = Selector;
|
||||
result.RegValve = RegValve;
|
||||
result.FlowMeter = FlowMeter;
|
||||
result.RegulMinStep = RegulMinStep;
|
||||
result.FlowMeter = FlowMeter;
|
||||
result.PidCoef = PidCoef;
|
||||
result.StartValve = StartValve;
|
||||
result.Diverter = Diverter;
|
||||
|
||||
@@ -17,7 +17,8 @@ namespace Config.Mappings
|
||||
Map(x => x.Qto);
|
||||
Map(x => x.Selector);
|
||||
Map(x => x.RegValve);
|
||||
Map(x => x.FlowMeter);
|
||||
Map(x => x.RegulMinStep);
|
||||
Map(x => x.FlowMeter);
|
||||
Map(x => x.PidCoef);
|
||||
Map(x => x.StartValve);
|
||||
Map(x => x.Diverter);
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ namespace Decrypt
|
||||
{
|
||||
if ((args.Length < 1) || !File.Exists(args[0]))
|
||||
{
|
||||
Console.WriteLine(@"Usage: Decode <file>");
|
||||
Console.WriteLine("Usage: Decode <file>");
|
||||
Console.ReadKey();
|
||||
return;
|
||||
}
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ namespace Encrypt
|
||||
{
|
||||
if ((args.Length < 1) || !File.Exists(args[0]))
|
||||
{
|
||||
Console.WriteLine(@"Usage: Encode <file>");
|
||||
Console.WriteLine("Usage: Encode <file>");
|
||||
Console.ReadKey();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -16,12 +16,12 @@ namespace MergeResultsDBs
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
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("A range of records from the 2nd database will be appended to the 1st database.");
|
||||
Console.WriteLine("Enter the 1st (target) database name:");
|
||||
string firstDB = Console.ReadLine();
|
||||
Console.WriteLine(@"Enter the 2nd database name:");
|
||||
Console.WriteLine("Enter the 2nd database name:");
|
||||
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();
|
||||
|
||||
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(@"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();
|
||||
if (response != "y" && response != "Y")
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Console.WriteLine(@"PROCESSING DATABASES ...");
|
||||
Console.WriteLine("PROCESSING DATABASES ...");
|
||||
|
||||
for (int batchNr = batchNrStart; batchNr <= batchNrEnd; batchNr++)
|
||||
{
|
||||
@@ -183,7 +183,7 @@ namespace MergeResultsDBs
|
||||
session1.Flush();
|
||||
session1.Close();
|
||||
session2.Close();
|
||||
Console.WriteLine(@"Successfully completed");
|
||||
Console.WriteLine("Successfully completed");
|
||||
Console.ReadLine();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace ResetBatchNr
|
||||
ls.BatchNr = 1;
|
||||
ls.Save();
|
||||
|
||||
Console.WriteLine(@"BatchNr was reset to 1");
|
||||
Console.WriteLine("BatchNr was reset to 1");
|
||||
Console.ReadLine();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -29,8 +29,12 @@ namespace Results.Entities
|
||||
public virtual long ErrorIndicators { get; set; } /// Not mapped to DB !!!, bit24=E25, bit25=E26, bit26=E27, bit27=E28 (error flags)
|
||||
public virtual long InfoIndicators { get; set; } /// Not mapped to DB !!!, bit24=E25, bit25=E26, bit26=E27, bit27=E28 (info flags)
|
||||
public virtual bool TestDone { get; set; } /// true = test was completed
|
||||
public virtual bool Passed { get; set; } /// true = test passed, water meter is OK
|
||||
public virtual bool Passed { get; set; } /// true = test passed, water meter is OK
|
||||
#if IPERL
|
||||
public virtual int CalibFactor { get; set; }
|
||||
public virtual int CalibFactorLNA { get; set; }
|
||||
public virtual int Q2CorrRL { get; set; }
|
||||
public virtual int Q2CorrLR { get; set; }
|
||||
public virtual string ExtraDataPath { get; set; } /// Relative path to a file with opto-data/raw-data
|
||||
public virtual float X1 { get; set; }
|
||||
public virtual float X2 { get; set; }
|
||||
@@ -166,6 +170,10 @@ namespace Results.Entities
|
||||
TestDone = src.TestDone;
|
||||
Passed = src.Passed;
|
||||
#if IPERL
|
||||
CalibFactor = src.CalibFactor;
|
||||
CalibFactorLNA = src.CalibFactorLNA;
|
||||
Q2CorrRL = src.Q2CorrRL;
|
||||
Q2CorrLR = src.Q2CorrLR;
|
||||
ExtraDataPath = src.ExtraDataPath;
|
||||
X1 = src.X1;
|
||||
X2 = src.X2;
|
||||
@@ -209,6 +217,10 @@ namespace Results.Entities
|
||||
writer.Write(TestDone);
|
||||
writer.Write(Passed);
|
||||
#if IPERL
|
||||
writer.Write(CalibFactor);
|
||||
writer.Write(CalibFactorLNA);
|
||||
writer.Write(Q2CorrRL);
|
||||
writer.Write(Q2CorrLR);
|
||||
writer.Write((ExtraDataPath != null) ? ExtraDataPath : string.Empty);
|
||||
writer.Write(X1);
|
||||
writer.Write(X2);
|
||||
@@ -249,6 +261,10 @@ namespace Results.Entities
|
||||
TestDone = reader.ReadBoolean();
|
||||
Passed = reader.ReadBoolean();
|
||||
#if IPERL
|
||||
CalibFactor = reader.ReadInt32();
|
||||
CalibFactorLNA = reader.ReadInt32();
|
||||
Q2CorrRL = reader.ReadInt32();
|
||||
Q2CorrLR = reader.ReadInt32();
|
||||
ExtraDataPath = reader.ReadString();
|
||||
X1 = reader.ReadSingle();
|
||||
X2 = reader.ReadSingle();
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DefineConstants>TRACE;IPERL</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
@@ -241,7 +241,9 @@
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\Strings.fr.resx" />
|
||||
<EmbeddedResource Include="Resources\Strings.it.resx" />
|
||||
<EmbeddedResource Include="Resources\Strings.pl.resx" />
|
||||
<EmbeddedResource Include="Resources\Strings.pl.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\Strings.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
|
||||
|
||||
@@ -378,6 +378,40 @@ namespace SchematicDrawing
|
||||
Properties.Resources.Valve_XL_closed,
|
||||
Properties.Resources.Valve_XL_vacuum,
|
||||
Properties.Resources.Valve_XL_open_dry);
|
||||
/// ValveSw
|
||||
Shapes[DrShIx(Shape.ValveSw, Sz.S)] = new DrawingShape(Shape.ValveSw, Sz.S, 2, 2,
|
||||
new Node[] { new Node(0, 1, Orient.L), new Node(2, 1, Orient.R) },
|
||||
new Edge[] { new Edge(0, 1, 20, RouteCouple.OpenWhen1), new Edge(1, 0, 20, RouteCouple.OpenWhen1) },
|
||||
0, 0, 20, 20,
|
||||
Properties.Resources.ValveSw_S_open,
|
||||
Properties.Resources.ValveSw_S_closed,
|
||||
Properties.Resources.ValveSw_S_vacuum,
|
||||
Properties.Resources.ValveSw_S_open_dry);
|
||||
Shapes[DrShIx(Shape.ValveSw, Sz.M)] = new DrawingShape(Shape.ValveSw, Sz.M, 3, 4,
|
||||
new Node[] { new Node(0, 2, Orient.L), new Node(3, 2, Orient.R) },
|
||||
new Edge[] { new Edge(0, 1, 30, RouteCouple.OpenWhen1), new Edge(1, 0, 30, RouteCouple.OpenWhen1) },
|
||||
0, 5, 30, 30,
|
||||
Properties.Resources.ValveSw_M_open,
|
||||
Properties.Resources.ValveSw_M_closed,
|
||||
Properties.Resources.ValveSw_M_vacuum,
|
||||
Properties.Resources.ValveSw_M_open_dry);
|
||||
Shapes[DrShIx(Shape.ValveSw, Sz.L)] = new DrawingShape(Shape.ValveSw, Sz.L, 4, 4,
|
||||
new Node[] { new Node(0, 2, Orient.L), new Node(4, 2, Orient.R) },
|
||||
new Edge[] { new Edge(0, 1, 40, RouteCouple.OpenWhen1), new Edge(1, 0, 40, RouteCouple.OpenWhen1) },
|
||||
0, 0, 40, 40,
|
||||
Properties.Resources.ValveSw_L_open,
|
||||
Properties.Resources.ValveSw_L_closed,
|
||||
Properties.Resources.ValveSw_L_vacuum,
|
||||
Properties.Resources.ValveSw_L_open_dry);
|
||||
Shapes[DrShIx(Shape.ValveSw, Sz.XL)] = new DrawingShape(Shape.ValveSw, Sz.XL, 5, 6,
|
||||
new Node[] { new Node(0, 3, Orient.L), new Node(5, 3, Orient.R) },
|
||||
new Edge[] { new Edge(0, 1, 50, RouteCouple.OpenWhen1), new Edge(1, 0, 50, RouteCouple.OpenWhen1) },
|
||||
0, 5, 50, 50,
|
||||
Properties.Resources.ValveSw_XL_open,
|
||||
Properties.Resources.ValveSw_XL_closed,
|
||||
Properties.Resources.ValveSw_XL_vacuum,
|
||||
Properties.Resources.ValveSw_XL_open_dry);
|
||||
|
||||
/// Diverter
|
||||
Shapes[DrShIx(Shape.Div, Sz.S)] = new DrawingShape(Shape.Div, Sz.S, 2, 2,
|
||||
new Node[] { new Node(2, 0, Orient.Up), new Node(1, 2, Orient.Dn), new Node(3, 2, Orient.Dn) },
|
||||
@@ -523,12 +557,18 @@ namespace SchematicDrawing
|
||||
Shapes[DrShIx(Shape.Scale, Sz.L)] = new DrawingShape(Shape.Scale, Sz.L, 12, 11, new Node[] { new Node(6, 11, Orient.Dn) }, null, 0, 0, 120, 110, Properties.Resources.Scale_L);
|
||||
Shapes[DrShIx(Shape.Scale, Sz.XL)] = new DrawingShape(Shape.Scale, Sz.XL, 16, 13, new Node[] { new Node(8, 13, Orient.Dn) }, null, 0, 0, 160, 130, Properties.Resources.Scale_XL);
|
||||
|
||||
/// Tank
|
||||
/// Tank uni
|
||||
Shapes[DrShIx(Shape.Tank, Sz.S)] = new DrawingShape(Shape.Tank, Sz.S, 10, 8, new Node[] { new Node(0, 6, Orient.L) }, null, 0, 0, 100, 80, Properties.Resources.Tank_S);
|
||||
Shapes[DrShIx(Shape.Tank, Sz.M)] = new DrawingShape(Shape.Tank, Sz.M, 12, 9, new Node[] { new Node(0, 7, Orient.L) }, null, 0, 0, 120, 90, Properties.Resources.Tank_M);
|
||||
Shapes[DrShIx(Shape.Tank, Sz.L)] = new DrawingShape(Shape.Tank, Sz.L, 15, 11, new Node[] { new Node(0, 9, Orient.L) }, null, 0, 0, 150, 110, Properties.Resources.Tank_L);
|
||||
Shapes[DrShIx(Shape.Tank, Sz.XL)] = new DrawingShape(Shape.Tank, Sz.XL, 20, 13, new Node[] { new Node(0, 11, Orient.L) }, null, 0, 0, 200, 130, Properties.Resources.Tank_XL);
|
||||
|
||||
/// Tank hot
|
||||
Shapes[DrShIx(Shape.TankHot, Sz.S)] = new DrawingShape(Shape.TankHot, Sz.S, 10, 8, new Node[] { new Node(0, 6, Orient.L) }, null, 0, 0, 100, 80, Properties.Resources.Tank_S_hot);
|
||||
Shapes[DrShIx(Shape.TankHot, Sz.M)] = new DrawingShape(Shape.TankHot, Sz.M, 12, 9, new Node[] { new Node(0, 7, Orient.L) }, null, 0, 0, 120, 90, Properties.Resources.Tank_M_hot);
|
||||
Shapes[DrShIx(Shape.TankHot, Sz.L)] = new DrawingShape(Shape.TankHot, Sz.L, 15, 11, new Node[] { new Node(0, 9, Orient.L) }, null, 0, 0, 150, 110, Properties.Resources.Tank_L_hot);
|
||||
Shapes[DrShIx(Shape.TankHot, Sz.XL)] = new DrawingShape(Shape.TankHot, Sz.XL, 20, 13, new Node[] { new Node(0, 11, Orient.L) }, null, 0, 0, 200, 130, Properties.Resources.Tank_XL_hot);
|
||||
|
||||
/// Junction
|
||||
Shapes[DrShIx(Shape.Junction, Sz.None)] = new DrawingShape(Shape.Junction, Sz.None, 0, 0, new Node[] { new Node(0, 0, Orient.R) });
|
||||
Shapes[DrShIx(Shape.Junction, Sz.S)] = new DrawingShape(Shape.Junction, Sz.S, 2, 2,
|
||||
|
||||
@@ -45,11 +45,13 @@ namespace SchematicDrawing
|
||||
Scale,
|
||||
Sink,
|
||||
Tank,
|
||||
TankHot,
|
||||
Tee,
|
||||
TempM,
|
||||
UniCB,
|
||||
Vacuum,
|
||||
Valve,
|
||||
ValveSw,
|
||||
WaterM,
|
||||
ElectricM,
|
||||
|
||||
|
||||
+201
-1
@@ -19,7 +19,7 @@ namespace SchematicDrawing.Properties {
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
@@ -730,6 +730,16 @@ namespace SchematicDrawing.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Tank_L_hot {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Tank_L_hot", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -740,6 +750,16 @@ namespace SchematicDrawing.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Tank_M_hot {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Tank_M_hot", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -750,6 +770,16 @@ namespace SchematicDrawing.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Tank_S_hot {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Tank_S_hot", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -760,6 +790,16 @@ namespace SchematicDrawing.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Tank_XL_hot {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Tank_XL_hot", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -970,6 +1010,166 @@ namespace SchematicDrawing.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_L_closed {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_L_closed", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_L_open {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_L_open", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_L_open_dry {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_L_open_dry", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_L_vacuum {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_L_vacuum", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_M_closed {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_M_closed", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_M_open {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_M_open", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_M_open_dry {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_M_open_dry", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_M_vacuum {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_M_vacuum", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_S_closed {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_S_closed", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_S_open {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_S_open", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_S_open_dry {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_S_open_dry", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_S_vacuum {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_S_vacuum", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_XL_closed {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_XL_closed", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_XL_open {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_XL_open", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_XL_open_dry {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_XL_open_dry", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ValveSw_XL_vacuum {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ValveSw_XL_vacuum", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
||||
@@ -319,6 +319,18 @@
|
||||
<data name="Tank_XL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Tank-XL.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Tank_L_hot" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Tank-L-hot.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Tank_M_hot" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Tank-M-hot.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Tank_S_hot" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Tank-S-hot.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Tank_XL_hot" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Tank-XL-hot.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Vacuum_L_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Vacuum-L-dry.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@@ -373,7 +385,66 @@
|
||||
<data name="Valve_XL_vacuum" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\Valve-XL-vacuum.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="WaterM_L" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<data name="ValveSw_L_closed" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-L-closed.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_L_open" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-L-open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_L_open_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-L-open-dry.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_L_vacuum" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-L-vacuum.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_M_closed" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-M-closed.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_M_open" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-M-open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_M_open_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-M-open-dry.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_M_vacuum" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-M-vacuum.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_S_closed" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-S-closed.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_S_open" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-S-open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_S_open_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-S-open-dry.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_S_vacuum" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-S-vacuum.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_XL_closed" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-XL-closed.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_XL_open" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-XL-open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_XL_open_dry" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-XL-open-dry.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ValveSw_XL_vacuum" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\ValveSw-XL-vacuum.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<data name="WaterM_L" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Pictures\WaterM-L.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="EmergencyStop_XL_off" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
|
||||
@@ -118,6 +118,10 @@
|
||||
<Content Include="Pictures\Div-XL-tank-wet.png" />
|
||||
<Content Include="Pictures\EmergencyStop-XL-off.png" />
|
||||
<Content Include="Pictures\EmergencyStop-XL-on.png" />
|
||||
<Content Include="Pictures\Tank-L-hot.png" />
|
||||
<Content Include="Pictures\Tank-M-hot.png" />
|
||||
<Content Include="Pictures\Tank-S-hot.png" />
|
||||
<Content Include="Pictures\Tank-XL-hot.png" />
|
||||
<Content Include="Pictures\UniCB-M-error.png" />
|
||||
<Content Include="Pictures\UniCB-M-off.png" />
|
||||
<Content Include="Pictures\UniCB-M-on.png" />
|
||||
|
||||
@@ -365,7 +365,7 @@ namespace SchematicDrawing
|
||||
{
|
||||
GNode gnode = new GNode(item, nid);
|
||||
item.GNodes.Add(gnode);
|
||||
graph.AddNode(gnode, dshape.Shape == Shape.Tank, dshape.Shape == Shape.Scale);
|
||||
graph.AddNode(gnode, dshape.Shape == Shape.Tank || dshape.Shape == Shape.TankHot, dshape.Shape == Shape.Scale);
|
||||
}
|
||||
|
||||
foreach (var edge in dshape.Edges)
|
||||
@@ -864,7 +864,7 @@ namespace SchematicDrawing
|
||||
/// Draw the component image
|
||||
Rectangle rect = dsh.GetRotatedFlippedImageRectangle(item);
|
||||
|
||||
if (item is IRouteBasedDrawingItem && routeBit == false /// closed
|
||||
if (item is IRouteBasedDrawingItem && routeBit == false /// closed
|
||||
&& item.GNodes.Count > 0 && item.GNodes[0].Dist < Const.Vacuum /// wet
|
||||
&& dsh.HasClosedWet) /// has appropriate image
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;LANG_PL</DefineConstants>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -5,16 +5,18 @@ VisualStudioVersion = 17.8.34330.188
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TBF", "TBF\TBF.csproj", "{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{7EBEEA14-91C4-48D7-AF0A-7A4BC3FF9A28} = {7EBEEA14-91C4-48D7-AF0A-7A4BC3FF9A28}
|
||||
{C8939821-BA5C-4988-A3D0-BF53B74865C7} = {C8939821-BA5C-4988-A3D0-BF53B74865C7}
|
||||
{211B5E3F-9996-48A7-ABDE-C878DD2D71C2} = {211B5E3F-9996-48A7-ABDE-C878DD2D71C2}
|
||||
{0C0A1F4D-1363-4544-A7C5-196C76D26CCA} = {0C0A1F4D-1363-4544-A7C5-196C76D26CCA}
|
||||
{0F79CA69-9DBC-41F3-A6FC-5A2937365343} = {0F79CA69-9DBC-41F3-A6FC-5A2937365343}
|
||||
{439D0878-C76E-452B-B17D-209A89E91D36} = {439D0878-C76E-452B-B17D-209A89E91D36}
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB} = {9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4} = {743DF7DB-C7B6-42EB-986D-0F485E5588E4}
|
||||
{46E3B0E1-209F-4550-B0DD-D7E2C039B3CE} = {46E3B0E1-209F-4550-B0DD-D7E2C039B3CE}
|
||||
{211B5E3F-9996-48A7-ABDE-C878DD2D71C2} = {211B5E3F-9996-48A7-ABDE-C878DD2D71C2}
|
||||
{32817BF9-E380-4467-9C7F-936F4B122BC7} = {32817BF9-E380-4467-9C7F-936F4B122BC7}
|
||||
{439D0878-C76E-452B-B17D-209A89E91D36} = {439D0878-C76E-452B-B17D-209A89E91D36}
|
||||
{46E3B0E1-209F-4550-B0DD-D7E2C039B3CE} = {46E3B0E1-209F-4550-B0DD-D7E2C039B3CE}
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4} = {743DF7DB-C7B6-42EB-986D-0F485E5588E4}
|
||||
{7EBEEA14-91C4-48D7-AF0A-7A4BC3FF9A28} = {7EBEEA14-91C4-48D7-AF0A-7A4BC3FF9A28}
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3} = {8F942729-F454-4C99-BA6C-746962065AE3}
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB} = {9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}
|
||||
{C8939821-BA5C-4988-A3D0-BF53B74865C7} = {C8939821-BA5C-4988-A3D0-BF53B74865C7}
|
||||
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2} = {FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Results", "Results\Results.csproj", "{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}"
|
||||
@@ -26,8 +28,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Config", "Config\Config.csp
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResultsBrowser", "ResultsBrowser\ResultsBrowser.csproj", "{07BA543A-54CA-4A59-9AD9-DDE7038E1BF9}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB} = {9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48} = {8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB} = {9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeviceTest", "DeviceTest\DeviceTest.csproj", "{6D3384DC-4638-4A92-91A8-F39D900377C6}"
|
||||
@@ -104,6 +106,19 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LabelPrinting", "LabelPrint
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TBFTests", "TBFTests\TBFTests.csproj", "{77EB589F-C670-4489-AAD6-2A3C02061FD1}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppDiagnostic", "AppDiagnostic\AppDiagnostic.csproj", "{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3} = {8F942729-F454-4C99-BA6C-746962065AE3}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharedComponents", "SharedComponents\SharedComponents.csproj", "{8F942729-F454-4C99-BA6C-746962065AE3}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sensus.iPerl.RfidCom", "..\iPerlHead\Sensus.iPerl.RfidCom\Sensus.iPerl.RfidCom.csproj", "{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sensus.iPerl.TestConsole", "..\iPerlHead\Sensus.iPerl.TestConsole\Sensus.iPerl.TestConsole.csproj", "{5025ED8B-A94F-4E58-8BE0-68481B061609}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NfcS5_DLL", "..\NfcS5_DLL\NfcS5_DLL.csproj", "{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -127,15 +142,15 @@ Global
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Release|x86.ActiveCfg = Release|x86
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Release|x86.Build.0 = Release|x86
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
@@ -464,6 +479,66 @@ Global
|
||||
{77EB589F-C670-4489-AAD6-2A3C02061FD1}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{77EB589F-C670-4489-AAD6-2A3C02061FD1}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{77EB589F-C670-4489-AAD6-2A3C02061FD1}.Release|x86.Build.0 = Release|Any CPU
|
||||
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{FA9ABAD1-7184-4295-ADE8-D44F2E3DE6B2}.Release|x86.Build.0 = Release|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{8F942729-F454-4C99-BA6C-746962065AE3}.Release|x86.Build.0 = Release|Any CPU
|
||||
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{A3E14180-7F00-42E5-94A9-8DB62EAD6EE8}.Release|x86.Build.0 = Release|Any CPU
|
||||
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Debug|x86.Build.0 = Debug|x86
|
||||
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Release|x86.ActiveCfg = Release|x86
|
||||
{5025ED8B-A94F-4E58-8BE0-68481B061609}.Release|x86.Build.0 = Release|x86
|
||||
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -1,33 +1,4 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAssert_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fd08b5425b14a4a129bfa8e447a81395e12190_003F4e_003F763c73b7_003FAssert_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AComponent_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fc0c221501f3a41f8ac0af9d6a9dc9ff335fd90_003F1c_003F3d03a130_003FComponent_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AContainerControl_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F32c22f7c1b7049ccad5f07031bb43bf35b8590_003Fb3_003F54768651_003FContainerControl_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AControl_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F32c22f7c1b7049ccad5f07031bb43bf35b8590_003F01_003F35d9c974_003FControl_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AEnum_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F4290c01eea7748b3aa477ca831e6a387531830_003F96_003F1b5cc389_003FEnum_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AExecutionContextSwitcher_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F4290c01eea7748b3aa477ca831e6a387531830_003F78_003Fabacf9b6_003FExecutionContextSwitcher_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AFileDialog_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F32c22f7c1b7049ccad5f07031bb43bf35b8590_003Fe6_003F4ece5b68_003FFileDialog_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AGetChildAtPointSkip_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F32c22f7c1b7049ccad5f07031bb43bf35b8590_003F63_003F931a2e4f_003FGetChildAtPointSkip_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AIList_00601_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F4290c01eea7748b3aa477ca831e6a387531830_003F6e_003Fc16f1098_003FIList_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AILog_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F9c853b67fc2341bf8af0d999ea188b6a42000_003Ff4_003F27b3d1bb_003FILog_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AImage_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F1af41839925b4409b823837d7b5f29d691940_003Fcc_003Fba3dfabe_003FImage_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AJsonConvert_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F43b5ed322493bdcdb2e73ba6f9808f93c7c41fdf_003FJsonConvert_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AList_00601_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F4290c01eea7748b3aa477ca831e6a387531830_003F92_003Fe3eb9ff2_003FList_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANetworkStream_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fc0c221501f3a41f8ac0af9d6a9dc9ff335fd90_003F78_003Fdc4af641_003FNetworkStream_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ARotateFlipType_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F1af41839925b4409b823837d7b5f29d691940_003F3b_003Ff7d64930_003FRotateFlipType_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AStreamReader_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F4290c01eea7748b3aa477ca831e6a387531830_003Fb8_003Fd3bcd2f1_003FStreamReader_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AStreamWriter_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F4290c01eea7748b3aa477ca831e6a387531830_003F2e_003F8ad77ef0_003FStreamWriter_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AStringWriter_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F3020f90f960f433086d545c4e07afdfd531820_003F00_003F5212e7ed_003FStringWriter_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ATaskFactory_00601_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F4290c01eea7748b3aa477ca831e6a387531830_003Fe5_003Fa31e7ef9_003FTaskFactory_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ATask_00601_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F4290c01eea7748b3aa477ca831e6a387531830_003F9a_003F1a93d99e_003FTask_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ATask_00601_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F9c2967a135e648bdb993c5397a44991b573620_003Fa3_003F820cf97f_003FTask_00601_002Ecs_002Fz_003A2_002D1/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ATcpClient_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fc0c221501f3a41f8ac0af9d6a9dc9ff335fd90_003Fdb_003Fe9bb8972_003FTcpClient_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ATestMethodInfo_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F4472e9d6a19b4c92bcc9a80bd60ca17d26da8_003F98_003F3ffb6d31_003FTestMethodInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThread_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F4290c01eea7748b3aa477ca831e6a387531830_003F06_003Fbeac08f5_003FThread_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F4290c01eea7748b3aa477ca831e6a387531830_003F67_003F5737ad8a_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AUdpClient_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fc0c221501f3a41f8ac0af9d6a9dc9ff335fd90_003Fdb_003Fe89b26d3_003FUdpClient_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AUserControl_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F32c22f7c1b7049ccad5f07031bb43bf35b8590_003Fc3_003F7d8608ff_003FUserControl_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AXmlReflectionImporter_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F9e4992465ee24dc8915fd9be20badb7d281d48_003F14_003Ffe12756e_003FXmlReflectionImporter_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003A_005F_005FError_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F4290c01eea7748b3aa477ca831e6a387531830_003Ffa_003Fa44fa010_003F_005F_005FError_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:Boolean x:Key="/Default/Environment/UnitTesting/CreateUnitTestDialog/ShowAdvancedOptions/@EntryValue">True</s:Boolean>
|
||||
<s:String x:Key="/Default/Environment/UnitTesting/CreateUnitTestDialog/TestProjectMapping/=743DF7DB_002DC7B6_002D42EB_002D986D_002D0F485E5588E4/@EntryIndexedValue">77EB589F-C670-4489-AAD6-2A3C02061FD1</s:String>
|
||||
<s:String x:Key="/Default/Environment/UnitTesting/CreateUnitTestDialog/TestProjectMapping/=8648FD92_002DCDA1_002D4C3A_002DB5F9_002DFE547CE1FA48/@EntryIndexedValue">77EB589F-C670-4489-AAD6-2A3C02061FD1</s:String>
|
||||
@@ -38,17 +9,12 @@
|
||||
<TestId>MSTest::77EB589F-C670-4489-AAD6-2A3C02061FD1::.NETFramework,Version=v4.7.2::TBFTests.Rig.Modbus.Meret.AdjustableScale.AdjustableMeterTest.GetCorrection</TestId>
|
||||
<TestId>MSTest::77EB589F-C670-4489-AAD6-2A3C02061FD1::.NETFramework,Version=v4.7.2::TBFTests.Rig.Network.Camera.KeyenceIV3G120.CameraTest.RtpListener</TestId>
|
||||
<TestId>MSTest::77EB589F-C670-4489-AAD6-2A3C02061FD1::.NETFramework,Version=v4.7.2::TBFTests.Rig.Network.Camera.KeyenceIV3G120.CameraTest.Initialize</TestId>
|
||||
<TestId>MSTest::77EB589F-C670-4489-AAD6-2A3C02061FD1::.NETFramework,Version=v4.7.2::TBFTests.Rig.Network.Camera.CJMS11.CameraTest.Initialize</TestId>
|
||||
</TestAncestor>
|
||||
</SessionState></s:String>
|
||||
|
||||
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=fee81c72_002D0b13_002D439c_002D8921_002D12878bb8cd86/@EntryIndexedValue"><SessionState ContinuousTestingMode="0" IsActive="True" Name="Initialize" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session">
|
||||
<TestAncestor>
|
||||
<TestId>MSTest::77EB589F-C670-4489-AAD6-2A3C02061FD1::.NETFramework,Version=v4.7.2::TBFTests.Rig.Network.Camera.KeyenceIV3G120.CameraTest.Initialize</TestId>
|
||||
<TestId>MSTest::77EB589F-C670-4489-AAD6-2A3C02061FD1::.NETFramework,Version=v4.7.2::TBFTests.Rig.Network.Camera.CJMS11.CameraTest.Initialize</TestId>
|
||||
<TestId>MSTest::77EB589F-C670-4489-AAD6-2A3C02061FD1::.NETFramework,Version=v4.7.2::TBFTests.Rig.Network.Camera.CJMS11.CameraTest.Initialize_TwoCamerasInParallel</TestId>
|
||||
<TestId>MSTest::77EB589F-C670-4489-AAD6-2A3C02061FD1::.NETFramework,Version=v4.7.2::TBFTests.Rig.Network.Camera.CJMS11.CameraTest.Initialize_TwoCamerasInParallelAsync</TestId>
|
||||
<TestId>MSTest::77EB589F-C670-4489-AAD6-2A3C02061FD1::.NETFramework,Version=v4.7.2::TBFTests.Rig.Network.Camera.CJMS11.CameraTest</TestId>
|
||||
</TestAncestor>
|
||||
</SessionState></s:String>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Config_002FResources_002FStrings/@EntryIndexedValue">False</s:Boolean>
|
||||
@@ -56,21 +22,17 @@
|
||||
|
||||
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Miscellaneous_0020Files_002FWyqupug/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FResources_002FStrings/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FResources_002FStrings/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FDataEntry_002FStandartCameraPurchaseOrder_002FCycleBeginningForm/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FDataEntry_002FStandartCameraPurchaseOrder_002FCycleEndForm/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FDataEntry_002FStandartCameraPurchaseOrder_002FCycleEndForm/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FDataEntry_002FStandartCameraPurchaseOrder_002FTestStartEndForm/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FNetwork_002FAdapterFTP_002FNetadapterCfgCtrl/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FNetwork_002FCamera_002FCJMS11_002FCameraCfgCtrl/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FNetwork_002FCamera_002FCJMS11_002FTerminalDlg/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FNetwork_002FAdapterFTP_002FNetadapterCfgCtrl/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FNetwork_002FCamera_002FKeyenceIV3G120_002FCameraCfgCtrl/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FNetwork_002FCamera_002FRoiForFixedStartKeyence_002FRoiCfgCtrl/@EntryIndexedValue">True</s:Boolean>
|
||||
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FNetwork_002FCamera_002FKeyenceIV3G120_002FCameraCfgCtrl/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FNetwork_002FCamera_002FRoiForFixedStartCJMS11_002FRoiCfgCtrl/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FNetwork_002FCamera_002FRoiForFixedStartKeyence_002FRoiCfgCtrl/@EntryIndexedValue">False</s:Boolean>
|
||||
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FNetwork_002FRestAPI_002FRestApiCfgCtrl/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FNetwork_002FRestAPI_002FRestApiCfgCtrl/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FOutput_002FPrinters_002FGroupPrinting_002FSingle_002FPrinterCfgCtrl/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FOutput_002FPrinters_002FGroupPrinting_002FSingle_002FPrinterTestBenchComponentSelectorDlg/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FOutput_002FPrinters_002FGroupPrinting_002FSingle_002FPrinterTestBenchComponentSelectorDlg/@EntryIndexedValue">True</s:Boolean>
|
||||
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FRegisterReaders_002FFrequencyMeterFromUniCB_002FRRCfgCtrl/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FUI_002FBench_002FComponents_002FComponentsManagerDlg/@EntryIndexedValue">False</s:Boolean>
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace TBF.Boxes
|
||||
}
|
||||
else
|
||||
{
|
||||
return string.Format(string.Format("{{0:{0}}}", Format), Val * Factor);
|
||||
return string.Format(Format, Val * Factor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("3.9.2145.4")]
|
||||
[assembly: AssemblyFileVersion("3.9.2145.4")]
|
||||
[assembly: AssemblyVersion("3.9.2144.1")]
|
||||
[assembly: AssemblyFileVersion("3.9.2144.1")]
|
||||
|
||||
Generated
+27
@@ -401,6 +401,24 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Application diagnostic.
|
||||
/// </summary>
|
||||
internal static string AppDiagnostic {
|
||||
get {
|
||||
return ResourceManager.GetString("AppDiagnostic", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Application diagnostic.
|
||||
/// </summary>
|
||||
internal static string Application_Diagnostic {
|
||||
get {
|
||||
return ResourceManager.GetString("Application_Diagnostic", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Approval.
|
||||
/// </summary>
|
||||
@@ -4775,6 +4793,15 @@ namespace TBF.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Reg. min step.
|
||||
/// </summary>
|
||||
internal static string RegulMinStep {
|
||||
get {
|
||||
return ResourceManager.GetString("RegulMinStep", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Relative Q from.
|
||||
/// </summary>
|
||||
|
||||
@@ -197,6 +197,12 @@
|
||||
</data>
|
||||
<data name="Reg_valve" xml:space="preserve">
|
||||
<value>Reg. valve</value>
|
||||
</data>
|
||||
<data name="RegulMinStep" xml:space="preserve">
|
||||
<value>Reg. min step</value>
|
||||
</data>
|
||||
<data name="Application_Diagnostic" xml:space="preserve">
|
||||
<value>Application diagnostic</value>
|
||||
</data>
|
||||
<data name="Balance" xml:space="preserve">
|
||||
<value>Scale</value>
|
||||
@@ -2442,6 +2448,9 @@
|
||||
</data>
|
||||
<data name="Upgrade_DB" xml:space="preserve">
|
||||
<value>Upgrade database</value>
|
||||
</data>
|
||||
<data name="AppDiagnostic" xml:space="preserve">
|
||||
<value>Application diagnostic</value>
|
||||
</data>
|
||||
<data name="About" xml:space="preserve">
|
||||
<value>About</value>
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Common;
|
||||
using log4net;
|
||||
using Dirichlet.Numerics;
|
||||
using TBF.Boxes;
|
||||
using TBF.Rig.ControlBoard;
|
||||
using TBF.Rig.GenericDevices;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace TBF.Rig.BuiltIn
|
||||
{
|
||||
@@ -195,76 +195,84 @@ namespace TBF.Rig.BuiltIn
|
||||
/// <remarks>Only Elde.Valve valves are used, other valves on the lists are ignored</remarks>
|
||||
public SetValvesOp(IControlBoard cb, bool open, OutputPath outPath, DateTimeBox timeStamp, FloatBox switchTime)
|
||||
{
|
||||
this.cb = cb;
|
||||
if (this.cb == null) throw new ArgumentNullException("ctrlBoard");
|
||||
|
||||
this.timeStamp = timeStamp;
|
||||
this.switchTime = switchTime;
|
||||
this.startStopValveBitNr = outPath.StartValve1 is Valve.Valve ? (outPath.StartValve1 as Valve.Valve).BitPosition : 0;
|
||||
|
||||
IList<IValve> none = new List<IValve>(); /// An empty list of valves
|
||||
switchPointsRaw = new List<SwitchPoint>();
|
||||
|
||||
if (open)
|
||||
try
|
||||
{
|
||||
if (outPath.InvertSV1)
|
||||
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve1), 0); /// close SV1
|
||||
this.cb = cb;
|
||||
if (this.cb == null) throw new ArgumentNullException("ctrlBoard");
|
||||
|
||||
this.timeStamp = timeStamp;
|
||||
this.switchTime = switchTime;
|
||||
this.startStopValveBitNr = outPath.StartValve1 is Valve.Valve ? (outPath.StartValve1 as Valve.Valve).BitPosition : 0;
|
||||
|
||||
IList<IValve> none = new List<IValve>(); /// An empty list of valves
|
||||
switchPointsRaw = new List<SwitchPoint>();
|
||||
|
||||
if (open)
|
||||
{
|
||||
if (outPath.InvertSV1)
|
||||
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve1), 0); /// close SV1
|
||||
else
|
||||
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve1), none, 0); /// open SV1
|
||||
|
||||
if (outPath.StartValve2 != null)
|
||||
{
|
||||
if (outPath.InvertSV2)
|
||||
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve2), -outPath.LagSV2); /// close SV2 after lag
|
||||
else
|
||||
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve2), none, -outPath.LagSV2); /// open SV2 after lag
|
||||
}
|
||||
|
||||
if (outPath.StartValve3 != null)
|
||||
{
|
||||
if (outPath.InvertSV3)
|
||||
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve3), -outPath.LagSV3); /// close SV3 after lag
|
||||
else
|
||||
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve3), none, -outPath.LagSV3); /// open SV3 after lag
|
||||
}
|
||||
}
|
||||
else
|
||||
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve1), none, 0); /// open SV1
|
||||
|
||||
if (outPath.StartValve2 != null)
|
||||
{
|
||||
if (outPath.InvertSV2)
|
||||
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve2), -outPath.LagSV2); /// close SV2 after lag
|
||||
if (outPath.InvertSV1)
|
||||
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve1), none, 0); /// open SV1
|
||||
else
|
||||
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve2), none, -outPath.LagSV2); /// open SV2 after lag
|
||||
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve1), 0); /// close SV1
|
||||
|
||||
if (outPath.StartValve2 != null)
|
||||
{
|
||||
if (outPath.InvertSV2)
|
||||
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve2), none, outPath.LagSV2); /// open SV2 after lag
|
||||
else
|
||||
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve2), outPath.LagSV2); /// close SV2 after lag
|
||||
}
|
||||
|
||||
if (outPath.StartValve3 != null)
|
||||
{
|
||||
if (outPath.InvertSV3)
|
||||
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve3), none, outPath.LagSV3); /// open SV3 after lag
|
||||
else
|
||||
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve3), outPath.LagSV3); /// close SV3 after lag
|
||||
}
|
||||
}
|
||||
|
||||
if (outPath.StartValve3 != null)
|
||||
{
|
||||
if (outPath.InvertSV3)
|
||||
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve3), -outPath.LagSV3); /// close SV3 after lag
|
||||
else
|
||||
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve3), none, -outPath.LagSV3); /// open SV3 after lag
|
||||
}
|
||||
switchPoints = SortAndMergeSwitchPoints(switchPointsRaw);
|
||||
timeShift = -switchPoints[0].TimeSec;
|
||||
MakeMasks(switchPoints, timeShift);
|
||||
}
|
||||
else
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (outPath.InvertSV1)
|
||||
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve1), none, 0); /// open SV1
|
||||
else
|
||||
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve1), 0); /// close SV1
|
||||
|
||||
if (outPath.StartValve2 != null)
|
||||
{
|
||||
if (outPath.InvertSV2)
|
||||
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve2), none, outPath.LagSV2); /// open SV2 after lag
|
||||
else
|
||||
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve2), outPath.LagSV2); /// close SV2 after lag
|
||||
}
|
||||
|
||||
if (outPath.StartValve3 != null)
|
||||
{
|
||||
if (outPath.InvertSV3)
|
||||
AddSwitchPoints(switchPointsRaw, ValveBase.MakeList(outPath.StartValve3), none, outPath.LagSV3); /// open SV3 after lag
|
||||
else
|
||||
AddSwitchPoints(switchPointsRaw, none, ValveBase.MakeList(outPath.StartValve3), outPath.LagSV3); /// close SV3 after lag
|
||||
}
|
||||
MessageBox.Show(
|
||||
$"Chyba počas zastavenia regulácie prietoku, v ramci SetValvesOp():\n{ex.Message}\n\nStack trace:\n{ex.StackTrace}",
|
||||
"Chyba",
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Error
|
||||
);
|
||||
throw;
|
||||
}
|
||||
|
||||
switchPoints = SortAndMergeSwitchPoints(switchPointsRaw);
|
||||
timeShift = -switchPoints[0].TimeSec;
|
||||
MakeMasks(switchPoints, timeShift);
|
||||
}
|
||||
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
if (cb.DebugLevel == DebugMode.Simulate)
|
||||
{
|
||||
return ;
|
||||
}
|
||||
|
||||
UInt128 changed = cb.SetValves(switchPoints[0].MasksOpen, switchPoints[0].MasksClose, StateMachine.LogicalFnValves);
|
||||
|
||||
if (timeStamp != null && switchPoints[0].TimeSec == timeShift)
|
||||
@@ -283,12 +291,7 @@ namespace TBF.Rig.BuiltIn
|
||||
/// </returns>
|
||||
public Event Run()
|
||||
{
|
||||
if (cb.DebugLevel == DebugMode.Simulate)
|
||||
{
|
||||
return Event.ValvesSet;
|
||||
}
|
||||
|
||||
if (nextIx >= switchPoints.Count)
|
||||
if (nextIx >= switchPoints.Count)
|
||||
{
|
||||
return (StateMachine.Time >= swStartTime + maxDelayTime + waitOnCBDelay) ? Event.ValvesSet : Event.ValvesBusy;
|
||||
}
|
||||
@@ -317,11 +320,6 @@ namespace TBF.Rig.BuiltIn
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Stop()
|
||||
{
|
||||
if (cb.DebugLevel == DebugMode.Simulate)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (switchTime != null && startStopValveBitNr >= 16 && startStopValveBitNr <= 23 && cb is ControlBoard.Uni.UniCB)
|
||||
{
|
||||
switchTime.Val = (cb as ControlBoard.Uni.UniCB).Data.ValveSwitchTime[startStopValveBitNr - 16];
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace TBF.Rig.ControlBoard
|
||||
/// <returns>Operation</returns>
|
||||
IOperation QueryMeasurementEndOp();
|
||||
|
||||
void StopFlowControl(bool isFromUI, int regVId);
|
||||
void StopFlowControl(bool isFromUI, int regVId, int regulationMinStep = 0);
|
||||
|
||||
void StopAll(bool isFromUI);
|
||||
}
|
||||
|
||||
@@ -492,7 +492,7 @@ namespace TBF.Rig.ControlBoard.Papouch
|
||||
return null;
|
||||
}
|
||||
|
||||
public void StopFlowControl(bool isFromUI, int rvId)
|
||||
public void StopFlowControl(bool isFromUI, int rvId, int regulationMinStep = 0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -55,6 +55,9 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
public int StabTime { get; set; } /// SetFlow
|
||||
public int InitDacVal { get; set; } /// SetFlow
|
||||
public int DivThreshold { get; set; } /// StartTest argument
|
||||
public int RegulationMinStep { get;
|
||||
set;
|
||||
}
|
||||
|
||||
|
||||
public Action()
|
||||
@@ -78,6 +81,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
RVMovePar1 = 0;
|
||||
RVMovePar2 = 0;
|
||||
InitDacVal = 0;
|
||||
RegulationMinStep = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -123,7 +127,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
}
|
||||
|
||||
///----------------------------------------------------------------------------------------------
|
||||
public static Action MeasureFlow(bool isFromUI, int flowMeterId)
|
||||
public static Action MeasureFlow(bool isFromUI, int flowMeterId, int regulationMinStep = 0)
|
||||
{
|
||||
return new Action
|
||||
{
|
||||
@@ -163,7 +167,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
|
||||
///----------------------------------------------------------------------------------------------
|
||||
public static Action SetFlow(bool isFromUI, int regValveId, double freqLo, double freqHi,
|
||||
int pid, int stabTime_ms)
|
||||
int pid, int stabTime_ms, int regulationMinStep = 0)
|
||||
{
|
||||
int rvMovePar1 = Convert.ToInt32(Math.Round(13.1072 * freqLo));
|
||||
int rvMovePar2 = Convert.ToInt32(Math.Round(13.1072 * freqHi));
|
||||
@@ -178,6 +182,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
RegVMode = RegValveMode.TargetFrequency,
|
||||
RVMovePar1 = rvMovePar1,
|
||||
RVMovePar2 = rvMovePar2,
|
||||
//RegulationMinStep = regulationMinStep,
|
||||
PID = pid,
|
||||
TolerRV = (regValveId == TBF.Rig.Uni.RegValveAnalog.RegValve.RVAnalogIdx)
|
||||
? Convert.ToInt32(Math.Round(13.1072 * 0.015 * freqLo)) : 0,
|
||||
@@ -207,7 +212,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
///----------------------------------------------------------------------------------------------
|
||||
public static Action StartTest(bool isFromUI, int flowMId, int divId, int divThreshold,
|
||||
bool isSyncMethod, bool isDivUsed, bool isDelayedStart, bool isStartStop,
|
||||
bool isProlonged, int totalPulsesCount, int massPulsesCount = 0)
|
||||
bool isProlonged, int totalPulsesCount, int massPulsesCount = 0, int regulationMinStep = 0)
|
||||
{
|
||||
return new Action
|
||||
{
|
||||
@@ -225,6 +230,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
TotalPulsesCount = totalPulsesCount,
|
||||
MassPulsesCount = (massPulsesCount <= 0) ? totalPulsesCount : massPulsesCount,
|
||||
StartStop = Command.Start,
|
||||
//RegulationMinStep = regulationMinStep,
|
||||
};
|
||||
}
|
||||
void SetStartTestArgs(Action action)
|
||||
@@ -272,7 +278,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
}
|
||||
|
||||
///----------------------------------------------------------------------------------------------
|
||||
public static Action RegVlvIncrMove(bool isFromUI, int regValveId, double timeSec)
|
||||
public static Action RegVlvIncrMove(bool isFromUI, int regValveId, double timeSec, int regulationMinStep = 0)
|
||||
{
|
||||
int rvMovePar = Math.Abs(Convert.ToInt32(Math.Round(timeSec / 0.050))); /// Step is 50 ms
|
||||
|
||||
@@ -285,6 +291,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
RegVMode = (timeSec >= 0) ? RegValveMode.PulseWidth : (RegValveMode.PulseWidth | RegValveMode.NegPulseWidth),
|
||||
RVMovePar1 = rvMovePar,
|
||||
RVMovePar2 = rvMovePar,
|
||||
//RegulationMinStep = regulationMinStep,
|
||||
};
|
||||
}
|
||||
void SetRegVlvIncrMoveArgs(Action action)
|
||||
@@ -293,6 +300,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
RegVMode = action.RegVMode;
|
||||
RVMovePar1 = action.RVMovePar1;
|
||||
RVMovePar2 = action.RVMovePar2;
|
||||
//RegulationMinStep = action.RegulationMinStep;
|
||||
}
|
||||
/// Check whether new action arguments are compatible with alredy collected arguments (true = yes)
|
||||
bool CheckSharedRegVlvIncrMoveArgs(Action newAction)
|
||||
@@ -302,7 +310,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
}
|
||||
|
||||
///----------------------------------------------------------------------------------------------
|
||||
public static Action RegVlvMoveToPos(bool isFromUI, int regValveId, int adcValLo, int adcValHi = -1)
|
||||
public static Action RegVlvMoveToPos(bool isFromUI, int regValveId, int adcValLo, int adcValHi = -1, int regulationMinStep = 0)
|
||||
{
|
||||
int rvMovePar1, rvMovePar2;
|
||||
|
||||
@@ -318,7 +326,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
rvMovePar1 = Math.Max(adcValLo - 5, 0);
|
||||
rvMovePar2 = Math.Min(adcValLo + 5, 1023);
|
||||
}
|
||||
|
||||
|
||||
return new Action
|
||||
{
|
||||
ActionId = ActionID.RegVlvMoveToPos,
|
||||
@@ -328,6 +336,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
RegVMode = RegValveMode.TargetPosition,
|
||||
RVMovePar1 = rvMovePar1,
|
||||
RVMovePar2 = rvMovePar2,
|
||||
//RegulationMinStep = regulationMinStep,
|
||||
};
|
||||
}
|
||||
void SetRegVlvMoveToPosArgs(Action action)
|
||||
@@ -336,6 +345,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
RegVMode = action.RegVMode;
|
||||
RVMovePar1 = action.RVMovePar1;
|
||||
RVMovePar2 = action.RVMovePar2;
|
||||
//RegulationMinStep = action.RegulationMinStep;
|
||||
}
|
||||
/// Check whether new action arguments are compatible with alredy collected arguments (true = yes)
|
||||
bool CheckSharedRegVlvMoveToPosArgs(Action newAction)
|
||||
@@ -345,7 +355,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
}
|
||||
|
||||
///----------------------------------------------------------------------------------------------
|
||||
public static Action RegVlvStop(bool isFromUI, int regValveId)
|
||||
public static Action RegVlvStop(bool isFromUI, int regValveId, int RegulationMinStep = 0)
|
||||
{
|
||||
return new Action
|
||||
{
|
||||
@@ -356,6 +366,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
RegVMode = RegValveMode.Stop,
|
||||
RVMovePar1 = 0,
|
||||
RVMovePar2 = 0,
|
||||
//RegulationMinStep = RegulationMinStep
|
||||
};
|
||||
}
|
||||
void SetRegVlvStopArgs(Action action)
|
||||
@@ -364,6 +375,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
RegVMode = action.RegVMode;
|
||||
RVMovePar1 = action.RVMovePar1;
|
||||
RVMovePar2 = action.RVMovePar2;
|
||||
//RegulationMinStep = action.RegulationMinStep;
|
||||
}
|
||||
/// Check whether new action arguments are compatible with alredy collected arguments (true = yes)
|
||||
bool CheckSharedRegVlvStopArgs(Action newAction)
|
||||
@@ -604,7 +616,8 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
combinedAction.TolerRV,
|
||||
combinedAction.StabTime,
|
||||
combinedAction.InitDacVal,
|
||||
combinedAction.DivThreshold);
|
||||
combinedAction.DivThreshold,
|
||||
combinedAction.RegulationMinStep);
|
||||
|
||||
return combinedAction;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ using System;
|
||||
using System.Diagnostics;
|
||||
using log4net;
|
||||
using Dirichlet.Numerics;
|
||||
using Common;
|
||||
using System.Web.Routing;
|
||||
|
||||
namespace TBF.Rig.ControlBoard.Uni
|
||||
{
|
||||
@@ -88,7 +90,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
message[30] = (byte)(action.RVMovePar2 & 0xFF);
|
||||
message[31] = (byte)((action.RVMovePar2 >> 8) & 0xFF);
|
||||
message[32] = GetRVStopParam(action);
|
||||
|
||||
|
||||
/// DA1
|
||||
message[33] = (byte)(arguments.InitDacVal & 0xFF);
|
||||
message[34] = (byte)((arguments.InitDacVal >> 8) & 0xFF);
|
||||
@@ -98,8 +100,21 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
message[37] = (byte)Math.Max(0, Math.Min(255, arguments.StabTime)); /// StabRV
|
||||
message[38] = (byte)((arguments.DivThreshold >> 2) & 0xFF);
|
||||
|
||||
message[39] = 0;
|
||||
message[40] = 0;
|
||||
//---
|
||||
message[39] = (byte)((action.RegulationMinStep << 4) & 0xFF); // ak 0 = koli kompatibilite, 1-6 = hodnoty prislusne pre spodnu saturaciu vypinacej periody casu
|
||||
message[40] = (byte)((action.RegulationMinStep << 4) & 0xFF);
|
||||
//---
|
||||
/*int x = 0;
|
||||
if (action.RegVId == 1 || action.RegVId == 2) x = 3;
|
||||
else if (action.RegVId == 3 || action.RegVId == 4) x = 5;
|
||||
else if (action.RegVId == 5 || action.RegVId == 5) x = 3;
|
||||
message[39] = (byte)((x << 4) & 0xFF);
|
||||
message[40] = (byte)((x << 4) & 0xFF);*/
|
||||
/*//---
|
||||
message[39] = 0x50; // ak 0 = koli kompatibilite, 1-6 = hodnoty prislusne pre spodnu saturaciu vypinacej periody casu
|
||||
message[40] = 0x50;
|
||||
//---*/
|
||||
|
||||
Debug.Assert(40 == PayloadLen + 2);
|
||||
|
||||
/// Checksum (2 bytes)
|
||||
@@ -108,6 +123,8 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
message[PayloadLen + 3] = (byte)(checksum & 0xFF);
|
||||
message[PayloadLen + 4] = (byte)((checksum >> 8) & 0xFF);
|
||||
|
||||
log.Info("");
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
@@ -151,11 +168,16 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
return (byte)0x20;
|
||||
}
|
||||
|
||||
if ((a.ActionId & ActionID.SetFlow) != 0 && a.RegVId == TBF.Rig.Uni.RegValveAnalog.RegValve.RVAnalogIdx)
|
||||
else if ((a.ActionId & ActionID.SetFlow) != 0 && a.RegVId == TBF.Rig.Uni.RegValveAnalog.RegValve.RVAnalogIdx)
|
||||
{
|
||||
return (byte)0x42;
|
||||
}
|
||||
|
||||
/*else
|
||||
{
|
||||
return (a.RegulationMinStep >= 0 || a.RegulationMinStep <= 6)?(byte)(a.RegulationMinStep << 4):(byte)(7<<4);
|
||||
}*/
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
/// Copyright (c) 2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using TBF.Rig.GenericDevices;
|
||||
|
||||
@@ -16,7 +19,8 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
/// Set by the constructor
|
||||
///
|
||||
readonly UniCB uniCB;
|
||||
readonly TBF.Rig.Uni.FlowMeter.FlowMeter flowMeter;
|
||||
readonly object flowMeter;
|
||||
readonly TBF.Rig.Uni.FlowMetersInParallel.FlowMeter flowMeterInParallel;
|
||||
readonly TBF.Rig.Uni.Diverter.Diverter diverter;
|
||||
readonly int pulsesCount; /// Number of reference pulses for a complete test
|
||||
readonly bool withDiverter; /// Test with diverter (and scale)
|
||||
@@ -50,36 +54,119 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
public StandingStartStopTestOp(UniCB cb, OutputPath devices, int pulsesCount, bool withDiverter)
|
||||
{
|
||||
this.uniCB = cb;
|
||||
try
|
||||
{
|
||||
flowMeter = devices.FlowMeter as TBF.Rig.Uni.FlowMeter.FlowMeter;
|
||||
if(flowMeter == null) flowMeter = devices.FlowMeter as TBF.Rig.Uni.FlowMetersInParallel.FlowMeter;
|
||||
|
||||
flowMeter = devices.FlowMeter as TBF.Rig.Uni.FlowMeter.FlowMeter;
|
||||
if (flowMeter == null) throw new ArgumentNullException("Invalid flow meter");
|
||||
if (flowMeter == null) throw new ArgumentNullException("Invalid flow meter");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string deviceInfo = GetAllDevicesInfo(devices);
|
||||
string flowMeterStatus = devices.FlowMeter == null
|
||||
? "devices.FlowMeter je NULL"
|
||||
: $"devices.FlowMeter je typu: {devices.FlowMeter.GetType().FullName}";
|
||||
|
||||
MessageBox.Show(
|
||||
$"Chyba počas zastavenia regulácie prietoku, v ramci StandingStartStopTestOp() pre flowMeter:\n" +
|
||||
$"{ex.Message}\n\n" +
|
||||
$"Diagnostika:\n{flowMeterStatus}\n\n" +
|
||||
$"{deviceInfo}\n\n" +
|
||||
$"Stack trace:\n{ex.StackTrace}",
|
||||
"Chyba",
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Error
|
||||
);
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
this.pulsesCount = pulsesCount;
|
||||
this.withDiverter = withDiverter;
|
||||
|
||||
if (withDiverter)
|
||||
{
|
||||
diverter = devices.Diverter as TBF.Rig.Uni.Diverter.Diverter;
|
||||
if (diverter == null) throw new ArgumentNullException("Invalid diverter");
|
||||
try
|
||||
{
|
||||
diverter = devices.Diverter as TBF.Rig.Uni.Diverter.Diverter;
|
||||
if (diverter == null) throw new ArgumentNullException("Invalid diverter");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string deviceInfo = GetAllDevicesInfo(devices);
|
||||
|
||||
MessageBox.Show(
|
||||
$"Chyba počas zastavenia regulácie prietoku, v ramci StandingStartStopTestOp() pre diverter:\n" +
|
||||
$"{ex.Message}\n\n{deviceInfo}\n\nStack trace:\n{ex.StackTrace}",
|
||||
"Chyba",
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Error
|
||||
);
|
||||
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
string GetAllDevicesInfo(object obj)
|
||||
{
|
||||
if (obj == null) return "devices objekt je null.";
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendLine("Zoznam zariadení v devices:");
|
||||
|
||||
var props = obj.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance);
|
||||
foreach (var prop in props)
|
||||
{
|
||||
try
|
||||
{
|
||||
object value = prop.GetValue(obj);
|
||||
string valueStr = value != null ? value.ToString() : "null";
|
||||
sb.AppendLine($"{prop.Name}: {valueStr}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
sb.AppendLine($"{prop.Name}: [Chyba pri načítaní - {ex.Message}]");
|
||||
}
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start this operation
|
||||
/// </summary>
|
||||
public void Start()
|
||||
public void Start()
|
||||
{
|
||||
log.InfoFormat("Start() Et#={0} pulses={1} withDiverter={2}", flowMeter.Idx1, pulsesCount, withDiverter);
|
||||
if (flowMeter is TBF.Rig.Uni.FlowMeter.FlowMeter)
|
||||
{
|
||||
log.InfoFormat("Start() Et#={0} pulses={1} withDiverter={2}", ((TBF.Rig.Uni.FlowMeter.FlowMeter)flowMeter).Idx1, pulsesCount, withDiverter);
|
||||
|
||||
/// Start the test (and the flow measurement)
|
||||
if (withDiverter) { uniCB.DivResolution = diverter.Resolution; }
|
||||
uniCB.SetActivity(Activity.StandingStartStopTest);
|
||||
uniCB.StartTest(false, flowMeter.Idx1, (withDiverter ? diverter.DiverterNr : 0), 0,
|
||||
false, withDiverter, false, true, false, pulsesCount);
|
||||
/// Start the test (and the flow measurement)
|
||||
if (withDiverter) { uniCB.DivResolution = diverter.Resolution; }
|
||||
uniCB.SetActivity(Activity.StandingStartStopTest);
|
||||
uniCB.StartTest(false, ((TBF.Rig.Uni.FlowMeter.FlowMeter)flowMeter).Idx1, (withDiverter ? diverter.DiverterNr : 0), 0,
|
||||
false, withDiverter, false, true, false, pulsesCount);
|
||||
|
||||
opState = OpState.StartingTest;
|
||||
opState = OpState.StartingTest;
|
||||
}
|
||||
else if (flowMeter is TBF.Rig.Uni.FlowMetersInParallel.FlowMeter)
|
||||
{
|
||||
log.InfoFormat("Start() Et#={0} pulses={1} withDiverter={2}", ((TBF.Rig.Uni.FlowMetersInParallel.FlowMeter)flowMeter).Idx1, pulsesCount, withDiverter);
|
||||
|
||||
/// Start the test (and the flow measurement)
|
||||
if (withDiverter) { uniCB.DivResolution = diverter.Resolution; }
|
||||
uniCB.SetActivity(Activity.StandingStartStopTest);
|
||||
uniCB.StartTest(false, ((TBF.Rig.Uni.FlowMetersInParallel.FlowMeter)flowMeter).Idx1, (withDiverter ? diverter.DiverterNr : 0), 0,
|
||||
false, withDiverter, false, true, false, pulsesCount);
|
||||
|
||||
opState = OpState.StartingTest;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -17,6 +17,8 @@ using TBF.Boxes;
|
||||
using TBF.Rig.GenericDevices;
|
||||
using TBF.Rig.Sequences;
|
||||
using TBF.UiBridge;
|
||||
using AppDiagnostic;
|
||||
using SharedComponents;
|
||||
|
||||
namespace TBF.Rig.ControlBoard.Uni
|
||||
{
|
||||
@@ -547,7 +549,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
|
||||
if (!outputsInitialized || (outputLatch & routeMask) != (route & routeMask)) /// || (StateMachine.Time - lastStateMachineTime) >= 15)
|
||||
{
|
||||
var actionsToModify = actionQueue.Where(x => (x.ActionId == ActionID.ChangeRoute));
|
||||
var actionsToModify = actionQueue.Where(x => (x.ActionId == ActionID.ChangeRoute));
|
||||
bool oneModified = false;
|
||||
foreach (var a in actionsToModify)
|
||||
{
|
||||
@@ -573,7 +575,11 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
|
||||
|
||||
var combinedAction = Action.FetchNonConflictingActions(actionQueue); /// Default action is RequestDataOnly
|
||||
|
||||
combinedAction.RegulationMinStep = devices.RegulMinStep;
|
||||
|
||||
byte[] outData = OutputMessage.GetMessage(combinedAction, config, (ulong)valvesToInvert);
|
||||
|
||||
if (outData != null && outData.Length > 0)
|
||||
{
|
||||
if ((combinedAction.ActionId & ActionID.ChangeRoute) != 0)
|
||||
@@ -595,7 +601,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
{
|
||||
serialPort.Write(outData, 0, outData.Length);
|
||||
lastSentTime = DateTime.Now;
|
||||
}
|
||||
}
|
||||
|
||||
log.Debug(" " + OutputMessage.Caption());
|
||||
log.Debug(Telegram.LogTelegram(string.Format("Sent {0}: ", lastSentTime.ToString("HH:mm:ss")), outData));
|
||||
@@ -615,7 +621,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region IControlBoard interface
|
||||
|
||||
@@ -781,12 +787,13 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
|
||||
#endregion
|
||||
|
||||
public void MeasureFlow(bool isFromUI, int flowMeterId)
|
||||
public void MeasureFlow(bool isFromUI, int flowMeterId, int regulationMinStep = 0)
|
||||
{
|
||||
if (IsUIBlocked && isFromUI) return;
|
||||
|
||||
actionQueue.Enqueue(Action.MeasureFlow(isFromUI, flowMeterId));
|
||||
actionQueue.Enqueue(Action.MeasureFlow(isFromUI, flowMeterId, regulationMinStep));
|
||||
log.InfoFormat("Enqueue( MeasureFlow(fm={0}) )", flowMeterId);
|
||||
|
||||
foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
|
||||
}
|
||||
|
||||
@@ -794,12 +801,13 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
/// To be used with a regulation valve controlled by incremental pulses.
|
||||
/// Stability time is fixed: 200 ms
|
||||
/// </summary>
|
||||
public void SetFlow(bool isFromUI, int regVId, double freqLo, double freqHi)
|
||||
public void SetFlow(bool isFromUI, int regVId, double freqLo, double freqHi, int regulationMinStep = 0)
|
||||
{
|
||||
if (IsUIBlocked && isFromUI) return;
|
||||
|
||||
actionQueue.Enqueue(Action.SetFlow(isFromUI, regVId, freqLo, freqHi, Convert.ToInt32(Math.Round(Devices.PidCoef)), 200));
|
||||
actionQueue.Enqueue(Action.SetFlow(isFromUI, regVId, freqLo, freqHi, Convert.ToInt32(Math.Round(Devices.PidCoef)), 200, regulationMinStep));
|
||||
log.InfoFormat("Enqueue( SetFlow(rv={0}, fLo={1}, fHi={2}, pid={3}) )", regVId, freqLo, freqHi, Convert.ToInt32(Math.Round(Devices.PidCoef)));
|
||||
|
||||
foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
|
||||
}
|
||||
|
||||
@@ -814,22 +822,23 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
totalPulsesCount, massPulsesCount));
|
||||
log.InfoFormat("Enqueue( StartTest(fm={0}, div={1}, Sync={2}, withDiv={3}, s/s={4}, prolonged={5} pulsesCount={6} massPulsesCount={7}) )",
|
||||
flowMId, divId, isSyncMethod, isDivUsed, isStartStop, isProlonged, totalPulsesCount, massPulsesCount);
|
||||
|
||||
foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
|
||||
}
|
||||
|
||||
public void StopFlowControl(bool isFromUI, int regVId)
|
||||
public void StopFlowControl(bool isFromUI, int regVId, int regulationMinStep = 0)
|
||||
{
|
||||
if (IsUIBlocked && isFromUI) return;
|
||||
|
||||
if (regVId < TBF.Rig.Uni.RegValveAnalog.RegValve.RVAnalogIdx)
|
||||
{
|
||||
actionQueue.Enqueue(Action.RegVlvStop(isFromUI, regVId));
|
||||
actionQueue.Enqueue(Action.RegVlvStop(isFromUI, regVId, regulationMinStep));
|
||||
log.InfoFormat("Enqueue( RegVlvStop(rv={0}) )", regVId);
|
||||
}
|
||||
else if (regVId == TBF.Rig.Uni.RegValveAnalog.RegValve.RVAnalogIdx)
|
||||
{
|
||||
int dacVal = Data.StavDA[0];
|
||||
actionQueue.Enqueue(Action.RegVlvMoveToPos(isFromUI, regVId, dacVal));
|
||||
actionQueue.Enqueue(Action.RegVlvMoveToPos(isFromUI, regVId, dacVal, regulationMinStep));
|
||||
log.InfoFormat("Enqueue( RegVlvMoveToPos(rv={0}, positionLo={1}) )", regVId, dacVal);
|
||||
}
|
||||
foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
|
||||
@@ -841,6 +850,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
|
||||
actionQueue.Enqueue(Action.Stop(isFromUI));
|
||||
log.InfoFormat("Enqueue( Stop() )");
|
||||
|
||||
foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
|
||||
}
|
||||
|
||||
@@ -849,11 +859,11 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
/// </summary>
|
||||
/// <param name="rvId">Reg. valve ID</param>
|
||||
/// <param name="time">Time in seconds, positive value opens the reg. valve</param>
|
||||
public void RegVlvIncrMove(bool isFromUI, int regVId, double time)
|
||||
public void RegVlvIncrMove(bool isFromUI, int regVId, double time, int regulationMinStep = 0)
|
||||
{
|
||||
if (IsUIBlocked && isFromUI || regVId >= TBF.Rig.Uni.RegValveAnalog.RegValve.RVAnalogIdx) return;
|
||||
|
||||
var newAction = Action.RegVlvIncrMove(isFromUI, regVId, time);
|
||||
var newAction = Action.RegVlvIncrMove(isFromUI, regVId, time, regulationMinStep);
|
||||
|
||||
var actionsToModify = actionQueue.Where(x => (x.ActionId == ActionID.RegVlvIncrMove && x.RegVId == newAction.RegVId));
|
||||
bool oneModified = false;
|
||||
@@ -870,7 +880,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
oneModified = true;
|
||||
log.InfoFormat("RegVlvIncrMove(UI={0}, RV={1}, time={2}) ... an action in the queue modified", isFromUI, regVId, time);
|
||||
}
|
||||
|
||||
|
||||
if (!oneModified)
|
||||
{
|
||||
actionQueue.Enqueue(newAction);
|
||||
@@ -885,12 +895,13 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
/// </summary>
|
||||
/// <param name="rvId">Reg. valve ID</param>
|
||||
/// <param name="position">Reg. valve position (0 .. 1.0)</param>
|
||||
public void RegVlvMoveToPos(bool isFromUI, int regVId, int adcValLo, int adcValHi = -1)
|
||||
public void RegVlvMoveToPos(bool isFromUI, int regVId, int adcValLo, int adcValHi = -1, int regulationMinStep = 0)
|
||||
{
|
||||
if (IsUIBlocked && isFromUI || regVId > TBF.Rig.Uni.RegValveAnalog.RegValve.RVAnalogIdx) return;
|
||||
|
||||
actionQueue.Enqueue(Action.RegVlvMoveToPos(isFromUI, regVId, adcValLo, adcValHi));
|
||||
actionQueue.Enqueue(Action.RegVlvMoveToPos(isFromUI, regVId, adcValLo, adcValHi, regulationMinStep));
|
||||
log.InfoFormat("Enqueue( RegVlvMoveToPos(rv={0}, positionLo={1}, positionHi={2}) )", regVId, adcValLo, adcValHi);
|
||||
|
||||
foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
|
||||
}
|
||||
|
||||
@@ -907,6 +918,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
actionQueue.Enqueue(Action.Stop(isFromUI));
|
||||
}
|
||||
log.InfoFormat("Enqueue( SwitchDiverter(div#={0}, toTank={1}) )", divNr1, toTank);
|
||||
|
||||
foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
|
||||
}
|
||||
|
||||
@@ -916,6 +928,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
|
||||
actionQueue.Enqueue(Action.DelayStartOrStop(isFromUI));
|
||||
log.InfoFormat("Enqueue( DelayStartOrStop() )");
|
||||
|
||||
foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
|
||||
}
|
||||
|
||||
@@ -930,6 +943,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
DivTransitionData.DiverterAssociationValidUntil = StateMachine.Time + 5;
|
||||
actionQueue.Enqueue(Action.GetDiverterTransitionData(isFromUI));
|
||||
log.InfoFormat("Enqueue( GetDiverterTransitionData(div#={0}, toTank={1}) )", diverter.DiverterNr, toTank);
|
||||
|
||||
foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
|
||||
}
|
||||
|
||||
@@ -939,6 +953,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
|
||||
actionQueue.Enqueue(Action.GetScopeAnalyzerData(isFromUI));
|
||||
log.InfoFormat("Enqueue( GetScopeAnalyzerData() )");
|
||||
|
||||
foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
|
||||
}
|
||||
|
||||
@@ -948,6 +963,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
|
||||
actionQueue.Enqueue(Action.ResetScopeAnalyzer(isFromUI));
|
||||
log.InfoFormat("Enqueue( ResetScopeAnalyzer() )");
|
||||
|
||||
foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
|
||||
}
|
||||
|
||||
@@ -957,6 +973,7 @@ namespace TBF.Rig.ControlBoard.Uni
|
||||
|
||||
actionQueue.Enqueue(Action.GetSwitchCounterData(isFromUI));
|
||||
log.InfoFormat("Enqueue( GetSwitchCounterData() )");
|
||||
|
||||
foreach (var a in actionQueue) log.DebugFormat(" {0}", a);
|
||||
}
|
||||
|
||||
|
||||
@@ -480,7 +480,7 @@ namespace TBF.Rig.DataEntry.StandartCameraPurchaseOrder
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine(@"The selected item is not a number.");
|
||||
Console.WriteLine("The selected item is not a number.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -302,27 +302,11 @@ namespace TBF.Rig.DataEntry.StandartCameraPurchaseOrder
|
||||
if (nrLines == 1)
|
||||
{
|
||||
Width = 1040;
|
||||
startLabel2.Visible = false;
|
||||
endLabel2.Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Width = 1420;
|
||||
}
|
||||
|
||||
OkButtonPosition();
|
||||
}
|
||||
|
||||
void OkButtonPosition()
|
||||
{
|
||||
if (okButton.Location.X > Width)
|
||||
{
|
||||
int margin = 5;
|
||||
okButton.Location = new Point(
|
||||
this.ClientSize.Width - okButton.Width - margin,
|
||||
okButton.Location.Y
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
+23
-21
@@ -33,10 +33,9 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CycleBeginningForm));
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.orderGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.orderComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.pictureBox = new System.Windows.Forms.PictureBox();
|
||||
this.orderGroupBox.SuspendLayout();
|
||||
this.orderComboBox = new TBF.UI.Shared.SuggestComboBox();
|
||||
this.labelOrder = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
@@ -48,50 +47,53 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// orderGroupBox
|
||||
//
|
||||
this.orderGroupBox.Controls.Add(this.orderComboBox);
|
||||
resources.ApplyResources(this.orderGroupBox, "orderGroupBox");
|
||||
this.orderGroupBox.ForeColor = System.Drawing.Color.Black;
|
||||
this.orderGroupBox.Name = "orderGroupBox";
|
||||
this.orderGroupBox.TabStop = false;
|
||||
//
|
||||
// orderComboBox
|
||||
//
|
||||
this.orderComboBox.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.orderComboBox, "orderComboBox");
|
||||
this.orderComboBox.Name = "orderComboBox";
|
||||
//
|
||||
// pictureBox
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox, "pictureBox");
|
||||
this.pictureBox.Name = "pictureBox";
|
||||
this.pictureBox.TabStop = false;
|
||||
//
|
||||
// orderComboBox
|
||||
//
|
||||
this.orderComboBox.DropDownHeight = 530;
|
||||
this.orderComboBox.FilterRule = null;
|
||||
resources.ApplyResources(this.orderComboBox, "orderComboBox");
|
||||
this.orderComboBox.FormattingEnabled = true;
|
||||
this.orderComboBox.Name = "orderComboBox";
|
||||
this.orderComboBox.PropertySelector = null;
|
||||
this.orderComboBox.SuggestBoxHeight = 192;
|
||||
this.orderComboBox.SuggestListOrderRule = null;
|
||||
//
|
||||
// labelOrder
|
||||
//
|
||||
resources.ApplyResources(this.labelOrder, "labelOrder");
|
||||
this.labelOrder.Name = "labelOrder";
|
||||
//
|
||||
// CycleBeginningForm
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.DarkGray;
|
||||
this.Controls.Add(this.labelOrder);
|
||||
this.Controls.Add(this.orderComboBox);
|
||||
this.Controls.Add(this.pictureBox);
|
||||
this.Controls.Add(this.orderGroupBox);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.ForeColor = System.Drawing.Color.Black;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "CycleBeginningForm";
|
||||
this.TopMost = true;
|
||||
this.Load += new System.EventHandler(this.CycleBeginningForm_Load);
|
||||
this.orderGroupBox.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.GroupBox orderGroupBox;
|
||||
private System.Windows.Forms.ComboBox orderComboBox;
|
||||
private System.Windows.Forms.PictureBox pictureBox;
|
||||
private UI.Shared.SuggestComboBox orderComboBox;
|
||||
private System.Windows.Forms.Label labelOrder;
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,6 @@ using TBF.Rig.Sequences;
|
||||
using TBF.Rig.Output.DB.SensusOracle;
|
||||
using TBF.Resources;
|
||||
using System.Drawing;
|
||||
using NHibernate;
|
||||
|
||||
namespace TBF.Rig.DataEntry.iPerl
|
||||
{
|
||||
@@ -24,8 +23,7 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
readonly EntryFormCfg cfg;
|
||||
|
||||
/// Loaded from database beforethe form is open
|
||||
IList<IOrderInfo> listOfOrders;
|
||||
string preselectedOrder;
|
||||
IList<OrderDetails> listOfOrders;
|
||||
|
||||
/// To be retrieved after the form is closed
|
||||
public string PurchaseOrder;
|
||||
@@ -42,7 +40,6 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
{
|
||||
InitializeComponent();
|
||||
ControlBox = false;
|
||||
preselectedOrder = null;
|
||||
|
||||
completed = false;
|
||||
StartForceCloseHandler();
|
||||
@@ -53,12 +50,11 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of text boxes for serial numbers</param>
|
||||
public CycleBeginningForm(int waterMetersCount, EntryFormCfg cfg, string preselectedOrder = null)
|
||||
public CycleBeginningForm(int waterMetersCount, EntryFormCfg cfg)
|
||||
: this()
|
||||
{
|
||||
this.WaterMetersCount = waterMetersCount;
|
||||
this.cfg = cfg;
|
||||
this.preselectedOrder = preselectedOrder;
|
||||
SNText = null;
|
||||
Disabled = null;
|
||||
}
|
||||
@@ -67,49 +63,12 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
private void CycleBeginningForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
Text = Strings.Data;
|
||||
orderGroupBox.Text = Strings.Purchase_order;
|
||||
labelOrder.Text = Strings.Purchase_order;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
|
||||
listOfOrders = new List<IOrderInfo>();
|
||||
|
||||
if ((cfg.Orders == Orders.FromOracle || cfg.Orders == Orders.CombinedAndFromOracle)
|
||||
&& ProcessData.OracleDB != null)
|
||||
{
|
||||
foreach (var o in ProcessData.OracleDB.ReadOrders())
|
||||
{
|
||||
listOfOrders.Add(o);
|
||||
}
|
||||
}
|
||||
|
||||
if ((cfg.Orders == Orders.FromTracingDB || cfg.Orders == Orders.CombinedAndFromTracingDB)
|
||||
&& ProcessData.TracingDB != null
|
||||
&& ProcessData.TracingDB.DebugLevel == DebugMode.Normal)
|
||||
{
|
||||
foreach (var o in ProcessData.TracingDB.ReadOrders())
|
||||
{
|
||||
listOfOrders.Add(o);
|
||||
}
|
||||
}
|
||||
|
||||
string insertFirst = null;
|
||||
if (!string.IsNullOrEmpty(preselectedOrder))
|
||||
{
|
||||
insertFirst = preselectedOrder;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Program.LocalSettings.PurchaseOrderHistoryCount > 0)
|
||||
{
|
||||
foreach (var o in listOfOrders)
|
||||
{
|
||||
if (o.POName == Program.LocalSettings.PurchaseOrderHistory[0])
|
||||
{
|
||||
insertFirst = o.POName;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
listOfOrders = ((cfg.Orders == Orders.FromOracle || cfg.Orders == Orders.CombinedAndFromOracle) && ProcessData.OracleDB != null)
|
||||
? ProcessData.OracleDB.ReadOrders()
|
||||
: new List<OrderDetails>();
|
||||
|
||||
switch (cfg.Orders)
|
||||
{
|
||||
@@ -117,71 +76,25 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
PrepareOrderCombo(orderComboBox);
|
||||
break;
|
||||
|
||||
case Orders.FromOracle:
|
||||
case Orders.FromTracingDB:
|
||||
if (insertFirst != null)
|
||||
{
|
||||
orderComboBox.Items.Add(insertFirst);
|
||||
orderComboBox.Text = insertFirst;
|
||||
}
|
||||
|
||||
foreach (var o in listOfOrders)
|
||||
if (o.POName != insertFirst)
|
||||
orderComboBox.Items.Add(o.POName);
|
||||
break;
|
||||
|
||||
case Orders.CombinedAndFromOracle:
|
||||
case Orders.CombinedAndFromTracingDB:
|
||||
if (insertFirst != null)
|
||||
{
|
||||
orderComboBox.Items.Add(insertFirst);
|
||||
orderComboBox.Text = insertFirst;
|
||||
}
|
||||
orderComboBox.Items.Add("BBAAMMXX");
|
||||
orderComboBox.Items.Add("BBAAOMXX");
|
||||
orderComboBox.Items.Add("BBAAQMXX");
|
||||
orderComboBox.Items.Add("BBAATMFR");
|
||||
orderComboBox.Items.Add("BBAATMXX");
|
||||
orderComboBox.Items.Add("CCAAMMXX");
|
||||
orderComboBox.Items.Add("CCAAOMXX");
|
||||
orderComboBox.Items.Add("CCAAQMXX");
|
||||
orderComboBox.Items.Add("CCAATMFR");
|
||||
orderComboBox.Items.Add("CCAATMXX");
|
||||
orderComboBox.Items.Add("DDAAMMXX");
|
||||
orderComboBox.Items.Add("DDAAOMXX");
|
||||
orderComboBox.Items.Add("DDAAQMXX");
|
||||
orderComboBox.Items.Add("DDAATMXX");
|
||||
orderComboBox.Items.Add("DEAAMMXX");
|
||||
orderComboBox.Items.Add("DEAAOMXX");
|
||||
orderComboBox.Items.Add("DEAAQMXX");
|
||||
orderComboBox.Items.Add("DEAATMXX");
|
||||
orderComboBox.Items.Add("EEAAMMXX");
|
||||
orderComboBox.Items.Add("EEAAOMXX");
|
||||
orderComboBox.Items.Add("EEAAQMXX");
|
||||
orderComboBox.Items.Add("EEAATMFR");
|
||||
orderComboBox.Items.Add("EEAATMXX");
|
||||
orderComboBox.Items.Add("FFAAMMXX");
|
||||
orderComboBox.Items.Add("FFAAOMXX");
|
||||
orderComboBox.Items.Add("FFAAQMXX");
|
||||
orderComboBox.Items.Add("FFAATMFR");
|
||||
orderComboBox.Items.Add("FFAATMXX");
|
||||
orderComboBox.Items.Add("GFAAMMXX");
|
||||
orderComboBox.Items.Add("GFAAOMXX");
|
||||
orderComboBox.Items.Add("GFAAQMXX");
|
||||
orderComboBox.Items.Add("GFAATMXX");
|
||||
case Orders.FromOracle:
|
||||
|
||||
foreach (var o in listOfOrders)
|
||||
if (o.POName != insertFirst)
|
||||
orderComboBox.Items.Add(o.POName);
|
||||
{
|
||||
orderComboBox.Items.Add(o.POName + " - " + o.SNPrefix);
|
||||
}
|
||||
if (Program.LocalSettings.PurchaseOrderHistoryCount > 0)
|
||||
orderComboBox.SelectedIndex = orderComboBox.FindString(Program.LocalSettings.PurchaseOrderHistory[0]);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
///
|
||||
/// Draw an appropriate test bench picture
|
||||
///
|
||||
Side side = (TBF.Rig.Sequences.ProcessData.BenchInfo is DataContainer.iPerlBenchInfo.Component)
|
||||
? (TBF.Rig.Sequences.ProcessData.BenchInfo as DataContainer.iPerlBenchInfo.Component).Side
|
||||
: Side.Left;
|
||||
Side side = (ProcessData.BenchInfo is DataContainer.iPerlBenchInfo.Component)
|
||||
? (ProcessData.BenchInfo as DataContainer.iPerlBenchInfo.Component).Side
|
||||
: Side.Left;
|
||||
if ((cfg.Direction == Direction.Reversed_LR) && (side == Side.Left))
|
||||
{
|
||||
/// direction L->R (reversed), left side
|
||||
@@ -202,7 +115,9 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
/// direction R->L (forward), left side
|
||||
pictureBox.Image = Image.FromFile(string.Format("{0}\\Pictures\\forward_dir_left.jpg", Program.ExecutableDir, true));
|
||||
}
|
||||
}
|
||||
pictureBox.SendToBack();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load Purchase order combo box items from the LocalSettings PurchaseOrderHistory array
|
||||
@@ -223,45 +138,20 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (orderComboBox.Text.Length > 8 ||
|
||||
(cfg.Orders != Orders.Arbitrary && !orderComboBox.Items.Contains(orderComboBox.Text)))
|
||||
PurchaseOrder = orderComboBox.Text.Split(' ')[0].Trim();
|
||||
|
||||
if (PurchaseOrder.Length > 10 ||
|
||||
(cfg.Orders != Orders.Arbitrary && orderComboBox.FindString(PurchaseOrder) < 0))
|
||||
{
|
||||
MessageBox.Show(Strings.Invalid_order_number, Strings.Error, MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Exclamation);
|
||||
return;
|
||||
}
|
||||
|
||||
IOrderInfo oInfo = (listOfOrders == null) ? null : listOfOrders.FirstOrDefault<IOrderInfo>(x => x.POName == orderComboBox.Text);
|
||||
///
|
||||
if (oInfo is Output.DB.SensusOracle.OrderDetails)
|
||||
{
|
||||
ProcessData.OrderInfo = oInfo;
|
||||
}
|
||||
else if (oInfo is SharedDatabase.Entities.OrderInfo && ProcessData.TracingDB != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var session = ProcessData.TracingDB.SessionFactory.OpenSession())
|
||||
{
|
||||
var list = session.QueryOver<SharedDatabase.Entities.OrderInfo>()
|
||||
.Where(x => (x.POName == Program.MainWnd.SelectedProcedure.OrderInfo.POName))
|
||||
.List();
|
||||
ProcessData.OrderInfo = (list.Count == 1) ? list[0] : null;
|
||||
string workflow = (list.Count == 1) ? list[0].Workflow : null;
|
||||
ProcessData.WorkflowSummary = SharedDatabase.WorkflowSummary.ReadFromDB(workflow, "test", session);
|
||||
session.Close();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.ErrorFormat("Unable to load an order, workflow or workstep: {0}", ex);
|
||||
ProcessData.OrderInfo = null;
|
||||
ProcessData.WorkflowSummary = null;
|
||||
}
|
||||
}
|
||||
ProcessData.OrderDetails = (listOfOrders == null) ? null : listOfOrders.FirstOrDefault<OrderDetails>(x => x.POName == orderComboBox.Text);
|
||||
|
||||
PurchaseOrder = orderComboBox.Text;
|
||||
Program.LocalSettings.UpdateHistory(orderComboBox.Text, ref Program.LocalSettings.PurchaseOrderHistory);
|
||||
|
||||
Program.LocalSettings.UpdateHistory(PurchaseOrder, ref Program.LocalSettings.PurchaseOrderHistory);
|
||||
|
||||
completed = true;
|
||||
Close();
|
||||
@@ -285,6 +175,6 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
Close();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,10 +122,14 @@
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="okButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>627, 26</value>
|
||||
<value>836, 32</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="okButton.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>4, 4, 4, 4</value>
|
||||
</data>
|
||||
<data name="okButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>112, 63</value>
|
||||
<value>149, 78</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="okButton.TabIndex" type="System.Int32, mscorlib">
|
||||
@@ -144,61 +148,16 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>okButton.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="orderComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>90, 32</value>
|
||||
</data>
|
||||
<data name="orderComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>432, 31</value>
|
||||
</data>
|
||||
<data name="orderComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>orderComboBox.Name" xml:space="preserve">
|
||||
<value>orderComboBox</value>
|
||||
</data>
|
||||
<data name=">>orderComboBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>orderComboBox.Parent" xml:space="preserve">
|
||||
<value>orderGroupBox</value>
|
||||
</data>
|
||||
<data name=">>orderComboBox.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="orderGroupBox.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="orderGroupBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>28, 12</value>
|
||||
</data>
|
||||
<data name="orderGroupBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>565, 82</value>
|
||||
</data>
|
||||
<data name="orderGroupBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="orderGroupBox.Text" xml:space="preserve">
|
||||
<value>Order</value>
|
||||
</data>
|
||||
<data name=">>orderGroupBox.Name" xml:space="preserve">
|
||||
<value>orderGroupBox</value>
|
||||
</data>
|
||||
<data name=">>orderGroupBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>orderGroupBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>orderGroupBox.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="pictureBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>28, 118</value>
|
||||
<value>37, 145</value>
|
||||
</data>
|
||||
<data name="pictureBox.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>4, 4, 4, 4</value>
|
||||
</data>
|
||||
<data name="pictureBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>711, 497</value>
|
||||
<value>948, 612</value>
|
||||
</data>
|
||||
<data name="pictureBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>8</value>
|
||||
@@ -213,19 +172,79 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>pictureBox.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="orderComboBox.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="orderComboBox.IntegralHeight" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="orderComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>37, 73</value>
|
||||
</data>
|
||||
<data name="orderComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>777, 37</value>
|
||||
</data>
|
||||
<data name="orderComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name=">>orderComboBox.Name" xml:space="preserve">
|
||||
<value>orderComboBox</value>
|
||||
</data>
|
||||
<data name=">>orderComboBox.Type" xml:space="preserve">
|
||||
<value>TBF.UI.Shared.SuggestComboBox, TBF, Version=2.33.2152.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>orderComboBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>orderComboBox.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="labelOrder.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="labelOrder.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Verdana, 14.25pt</value>
|
||||
</data>
|
||||
<data name="labelOrder.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>32, 32</value>
|
||||
</data>
|
||||
<data name="labelOrder.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>83, 29</value>
|
||||
</data>
|
||||
<data name="labelOrder.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="labelOrder.Text" xml:space="preserve">
|
||||
<value>label1</value>
|
||||
</data>
|
||||
<data name=">>labelOrder.Name" xml:space="preserve">
|
||||
<value>labelOrder</value>
|
||||
</data>
|
||||
<data name=">>labelOrder.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>labelOrder.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>labelOrder.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 13</value>
|
||||
<value>8, 16</value>
|
||||
</data>
|
||||
<data name="$this.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>769, 639</value>
|
||||
<value>1025, 786</value>
|
||||
</data>
|
||||
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>4, 4, 4, 4</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Batch data</value>
|
||||
|
||||
@@ -7,7 +7,6 @@ using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.Rig;
|
||||
using TBF.Rig.GenericDevices;
|
||||
using TBF.Rig.Sequences;
|
||||
|
||||
namespace TBF.Rig.DataEntry.iPerl
|
||||
{
|
||||
@@ -85,7 +84,7 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
this.waterMeters = ProcessData.BatchRslts.Batch.WaterMeters;
|
||||
this.waterMeters = TBF.Rig.Sequences.ProcessData.BatchRslts.Batch.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -98,10 +97,6 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>null (not implemented)</returns>
|
||||
public IOperation ShowAdvancedTestStartFormOp(IRegReader[] regReaders, IList<Results.Entities.WaterMeter> waterMeters, bool isCondOp) { return null; }
|
||||
public IOperation ShowTestCollectFormOp(IRegReader[] regReaders, double volumeRef, double errLimLo, double errLimHi) { return null; }
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestEndFormOp(IRegReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
|
||||
{
|
||||
@@ -118,8 +113,7 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
///
|
||||
void OpenBeginningDlg(EntryForm myRef)
|
||||
{
|
||||
myRef.modelessDlg = new CycleBeginningForm(TBF.Data.WMsCount, myRef.entryFormCfg,
|
||||
ProcessData.SelectedProcedure.OrderInfo != null ? ProcessData.SelectedProcedure.OrderInfo.POName : string.Empty);
|
||||
myRef.modelessDlg = new CycleBeginningForm(TBF.Data.WMsCount, myRef.entryFormCfg);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
@@ -142,16 +136,7 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
switch (currentOp)
|
||||
{
|
||||
case CurrentOp.ShowFormAtCycleBeginning:
|
||||
if (ProcessData.SelectedProcedure.OrderInfo == null || entryFormCfg.Direction != Direction.S640)
|
||||
{
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Only in case of 640 meters and an order information entered during the procedure selection
|
||||
/// this DataEntry form at the beginning of the cycle is skipped
|
||||
modelessDlg = null;
|
||||
}
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenBeginningDlg), this);
|
||||
break;
|
||||
case CurrentOp.EnterTestStartStates:
|
||||
Program.MainWnd.Invoke(new EntryFormDlgt(OpenTestStartStatesDlg), this);
|
||||
@@ -166,17 +151,7 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
/// <returns>Event.ResultsPrinted</returns>
|
||||
public Event Run()
|
||||
{
|
||||
if (ProcessData.SelectedProcedure.OrderInfo != null && entryFormCfg.Direction == Direction.S640)
|
||||
{
|
||||
for (int i = 0; i < waterMeters.Count; i++)
|
||||
{
|
||||
if (waterMeters[i] != null)
|
||||
waterMeters[i].PurchaseOrder = ProcessData.SelectedProcedure.OrderInfo.POName;
|
||||
}
|
||||
return Event.ModelessFormClosed;
|
||||
}
|
||||
|
||||
if ((modelessDlg is IHasCompleted) && !(modelessDlg as IHasCompleted).Completed)
|
||||
if ((modelessDlg is IHasCompleted) && !(modelessDlg as IHasCompleted).Completed)
|
||||
{
|
||||
return Event.ModelessFormIsOpen;
|
||||
}
|
||||
@@ -239,5 +214,26 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
}
|
||||
currentOp = CurrentOp.None;
|
||||
}
|
||||
}
|
||||
|
||||
public IOperation ShowAdvancedTestStartFormOp(IRegReader[] regReaders, IList<Results.Entities.WaterMeter> waterMeters, bool isCondOp = false)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestStartStates;
|
||||
this.regReaders = regReaders;
|
||||
this.waterMeters = waterMeters;
|
||||
// Handle isCondOp if necessary
|
||||
return this;
|
||||
}
|
||||
|
||||
public IOperation ShowTestCollectFormOp(IRegReader[] regReaders, double volumeRef, double errLimLo, double errLimHi)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestEndStates;
|
||||
this.regReaders = regReaders;
|
||||
this.refVolume = volumeRef;
|
||||
this.errLimLo = errLimLo;
|
||||
this.errLimHi = errLimHi;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,23 +32,17 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
public enum Orders
|
||||
{
|
||||
#if LANG_SK
|
||||
[Description("Ľubovolné")] Arbitrary,
|
||||
[Description("Z Oracle databázy")] FromOracle,
|
||||
[Description("Zo sledovacej databázy")] FromTracingDB,
|
||||
[Description("Združené a z Oracle")] CombinedAndFromOracle,
|
||||
[Description("Združené a zo sledovacej databázy")] CombinedAndFromTracingDB,
|
||||
#elif LANG_CZ
|
||||
[Description("Libovolné")] Arbitrary,
|
||||
[Description("Z Oracle databáze")] FromOracle,
|
||||
[Description("Ze sledovací databáze")] FromTracingDB,
|
||||
[Description("Sdružené a z Oracle")] CombinedAndFromOracle,
|
||||
[Description("Sdružené a ze sledovací databáze")] CombinedAndFromTracingDB,
|
||||
[Description("Ľubovolné")] Arbitrary,
|
||||
[Description("Aktívne z Oracle")] FromOracle,
|
||||
[Description("Združené a aktívne z Oracle")] CombinedAndFromOracle,
|
||||
#elif LANG_DE
|
||||
[Description("Arbitrary")] Arbitrary,
|
||||
[Description("Active from Oracle")] FromOracle,
|
||||
[Description("Combined and active from Oracle")] CombinedAndFromOracle,
|
||||
#else
|
||||
[Description("Arbitrary")] Arbitrary,
|
||||
[Description("From Oracle")] FromOracle,
|
||||
[Description("From Tracing DB")] FromTracingDB,
|
||||
[Description("Combined and from Oracle")] CombinedAndFromOracle,
|
||||
[Description("Combined and from Tracing DB")] CombinedAndFromTracingDB,
|
||||
[Description("Arbitrary")] Arbitrary,
|
||||
[Description("Active from Oracle")] FromOracle,
|
||||
[Description("Combined and active from Oracle")] CombinedAndFromOracle,
|
||||
#endif
|
||||
Count,
|
||||
}
|
||||
@@ -99,15 +93,22 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
|
||||
public ICollection<string> ParamValues(int i)
|
||||
{
|
||||
var list = new List<string>();
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
for (Direction d = 0; d < Direction.Count; d++) list.Add(d.ToDescription());
|
||||
return list;
|
||||
return new string[]
|
||||
{
|
||||
Direction.Forward_RL.ToDescription(),
|
||||
Direction.Reversed_LR.ToDescription(),
|
||||
Direction.S640.ToDescription(),
|
||||
};
|
||||
case 1:
|
||||
for (Orders o = 0; o < Orders.Count; o++) list.Add(o.ToDescription());
|
||||
return list;
|
||||
return new string[]
|
||||
{
|
||||
Orders.Arbitrary.ToDescription(),
|
||||
Orders.FromOracle.ToDescription(),
|
||||
Orders.CombinedAndFromOracle.ToDescription(),
|
||||
};
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
{
|
||||
public class Factory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return GetType().Namespace.Substring(8); } }
|
||||
public string ClassName { get { return "DataEntry-iPerl"; } }
|
||||
public override string ToString() { return ClassName; }
|
||||
|
||||
public IComponent DummyComponent() { return new EntryForm(); }
|
||||
|
||||
@@ -22,7 +22,8 @@ namespace TBF.Rig.Dummy.RegValve
|
||||
public bool IsCoax { get { return false; } }
|
||||
|
||||
public double Position { get { return 50.0; } }
|
||||
|
||||
///
|
||||
public int RegulationMinStep { get { return 0; } }
|
||||
|
||||
IDictionary<double, double> dict;
|
||||
public IDictionary<double, double> Dict { get { return dict; } }
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
namespace TBF.Rig.Network.AdapterJMS
|
||||
{
|
||||
public class Factory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return this.GetType().Namespace.Substring(8); } }
|
||||
public override string ToString() { return ClassName; }
|
||||
|
||||
public IComponent DummyComponent() { return new Netadapter(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Netadapter(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new NetadapterCfg(this.GetType().Namespace.Substring(8), this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
return ComponentCfgBase.CreateFromDbEntity(NetadapterCfg.Serializer, component, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Threading.Tasks;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using log4net;
|
||||
using NHibernate;
|
||||
using TBF.Rig.Network.Camera.CJMS11;
|
||||
|
||||
namespace TBF.Rig.Network.AdapterJMS
|
||||
{
|
||||
public class Netadapter : ComponentBase, GenericDevices.INetworkAdapter
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Netadapter));
|
||||
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
|
||||
|
||||
readonly NetadapterCfg netadapterCfg;
|
||||
|
||||
IPAddress ipAddress;
|
||||
IPAddress netMask;
|
||||
IPAddress broadcastAddress;
|
||||
|
||||
int tcpPort = -1;
|
||||
IList<TcpClient> tcpClients;
|
||||
private IList<Task> connectAsyncList;
|
||||
|
||||
public IPAddress IPAddress { get { return ipAddress; } }
|
||||
public IPAddress NetMask { get { return netMask; } }
|
||||
public IPAddress BroadcastAddress { get { return broadcastAddress; } }
|
||||
|
||||
public IList<TcpClient> TcpClients { get { return tcpClients; } }
|
||||
public int TcpPort { get { return tcpPort; } }
|
||||
|
||||
public TcpClient GetTcpClient(string ipAddressCJMS)
|
||||
{
|
||||
foreach (TcpClient tcpClient in tcpClients)
|
||||
{
|
||||
if (tcpClient.Client.RemoteEndPoint.ToString().Contains(ipAddressCJMS))
|
||||
{
|
||||
return tcpClient;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public IList<Task> TasksConnectAsync { get { return connectAsyncList; } }
|
||||
|
||||
|
||||
public Netadapter() { }
|
||||
|
||||
public Netadapter(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
netadapterCfg = cfg as NetadapterCfg;
|
||||
log.Warn(this.ToString());
|
||||
tcpClients = new List<TcpClient>();
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
if (DebugLevel == DebugMode.Simulate)
|
||||
{
|
||||
ipAddress = IPAddress.Parse("192.168.1.100");
|
||||
netMask = IPAddress.Parse("255.255.255.0");
|
||||
broadcastAddress = IPAddress.Parse("192.168.1.255");
|
||||
return;
|
||||
}
|
||||
|
||||
//TODO hold connections to cameras and other devices, close them when the adapter is removed.
|
||||
ISession session = TBF.DB.CreateSession(DBKind.Config);
|
||||
//TODO BUMI - get the port from the config file - defined by UI
|
||||
if (tcpPort == -1) tcpPort = 32456; //default port
|
||||
|
||||
IList<Component> cmpntEntities = session.QueryOver<Component>()
|
||||
.OrderBy(x => x. ItemNr).Asc
|
||||
.List();
|
||||
|
||||
connectAsyncList = new List<Task>();
|
||||
foreach (var cmpnt in cmpntEntities)
|
||||
{
|
||||
Rig.Generic.IComponentFactory factory = TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName);
|
||||
|
||||
/// Camera - jouined to a network adapter
|
||||
if (factory is Rig.Network.Camera.CJMS11.Factory)
|
||||
{
|
||||
CameraCfg cmpntCfgFromCmpntEntity =
|
||||
factory.CmpntCfgFromCmpntEntity(cmpnt) as Rig.Network.Camera.CJMS11.CameraCfg;
|
||||
if (cmpntCfgFromCmpntEntity == null) continue;
|
||||
// TcpClient tcpClient = new TcpClient();
|
||||
// tcpClients.Add(tcpClient);
|
||||
// connectAsyncList.Add(tcpClient.ConnectAsync(cmpntCfgFromCmpntEntity.IPAddressCJMS, tcpPort));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//Task.WaitAll(connectAsyncList.ToArray()); // run all tasks in parallel
|
||||
|
||||
// AdapterInfo.RefreshNetAdaptersInfo();
|
||||
// AdapterInfo netadapter = AdapterInfo.GetNetAdapter(netadapterCfg.Description);
|
||||
// ipAddress = netadapter.IPAddress;
|
||||
// netMask = netadapter.NetMask;
|
||||
//
|
||||
// if (this.Cfg.DebugLevel != DebugMode.Simulate)
|
||||
// {
|
||||
// broadcastAddress = netadapter.GetBroadcastAddress();
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
namespace TBF.Rig.Network.AdapterJMS
|
||||
{
|
||||
public class NetadapterCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(NetadapterCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl(IList<Config.Entities.Component> cmpntEntities) { return new NetadapterCfgCtrl(); }
|
||||
|
||||
|
||||
public string Description; /// Description string of the selected network adapter
|
||||
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
NetadapterCfg() {}
|
||||
|
||||
public NetadapterCfg(string name, IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
Name = name;
|
||||
Factory = factory;
|
||||
ParentName = string.Empty;
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("Name={0}, Description={1}", Name, Description);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Windows.Forms;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
namespace TBF.Rig.Network.AdapterJMS
|
||||
{
|
||||
public partial class NetadapterCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
NetadapterCfg config;
|
||||
public IComponentCfg Config
|
||||
{
|
||||
get { return config as IComponentCfg; }
|
||||
set
|
||||
{
|
||||
config = value as NetadapterCfg;
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
public NetadapterCfgCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void EntryFormCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (ParentForm == null) return; /// Return is executed when tab page is open in Designer
|
||||
if (config == null) return; /// Control was not loaded, settings were not changed
|
||||
|
||||
Localize();
|
||||
|
||||
Redraw();
|
||||
}
|
||||
|
||||
void Redraw()
|
||||
{
|
||||
classNameLabel.Text = config.Factory.ClassName;
|
||||
nameTextBox.Text = config.Name;
|
||||
|
||||
AdapterInfo.RefreshNetAdaptersInfo();
|
||||
IList<AdapterInfo> adapters = AdapterInfo.NetAdapters;
|
||||
|
||||
string cfgAdapter = string.Empty;
|
||||
foreach (AdapterInfo ai in adapters)
|
||||
{
|
||||
string record;
|
||||
|
||||
if (ai.IPAddress == null)
|
||||
{
|
||||
/// This happens with network adapters that currently have no IP address,
|
||||
/// for instance not connected wireless or dial-up adapters
|
||||
record = "???.???.???.???";
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Do not consider IPv6 adapters as well as "Any", "Broadcast", "Loopback" or "None" addresses
|
||||
if ((ai.IPAddress.AddressFamily == System.Net.Sockets.AddressFamily.InterNetworkV6) ||
|
||||
ai.IPAddress.Equals(IPAddress.Any) ||
|
||||
ai.IPAddress.Equals(IPAddress.Broadcast) ||
|
||||
ai.IPAddress.Equals(IPAddress.IPv6Any) ||
|
||||
ai.IPAddress.Equals(IPAddress.IPv6Loopback) ||
|
||||
ai.IPAddress.Equals(IPAddress.IPv6None) ||
|
||||
ai.IPAddress.Equals(IPAddress.Loopback) ||
|
||||
ai.IPAddress.Equals(IPAddress.None))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
record = ai.IPAddress.ToString();
|
||||
}
|
||||
|
||||
record += " - " + ai.Description;
|
||||
int i = adapterComboBox.Items.Add(record);
|
||||
if (ai.Description == config.Description)
|
||||
{
|
||||
/// Select the adapter currently in the configuration
|
||||
adapterComboBox.SelectedIndex = i;
|
||||
}
|
||||
}
|
||||
|
||||
/// Select the first one if the adapter from the configuration does not exist on the system
|
||||
if (adapterComboBox.SelectedIndex < 0 && adapterComboBox.Items.Count > 0)
|
||||
{
|
||||
adapterComboBox.SelectedIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
}
|
||||
|
||||
public void Closing()
|
||||
{
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
adapterComboBox.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||
|
||||
if (!adapterComboBox.Items.Contains(adapterComboBox.Text))
|
||||
{
|
||||
flags = CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + "Invalid 'Parent Name'";
|
||||
}
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateCfg()
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
|
||||
|
||||
config.Name = nameTextBox.Text;
|
||||
|
||||
/// Network adapter
|
||||
string strAdapter = adapterComboBox.Text;
|
||||
int iDash = strAdapter.IndexOf(" - ");
|
||||
config.Description = iDash < 0 ? "" : strAdapter.Substring(iDash + 3);
|
||||
|
||||
return flags;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,109 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.Rig.Network.AdapterJMS
|
||||
{
|
||||
partial class NetadapterCfgCtrl
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.adapterLabel = new System.Windows.Forms.Label();
|
||||
this.adapterComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(101, 50);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(114, 20);
|
||||
this.nameTextBox.TabIndex = 5;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(9, 53);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 4;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(98, 24);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.classNameLabel.TabIndex = 3;
|
||||
this.classNameLabel.Text = "ComonentName";
|
||||
//
|
||||
// adapterLabel
|
||||
//
|
||||
this.adapterLabel.AutoSize = true;
|
||||
this.adapterLabel.Location = new System.Drawing.Point(9, 80);
|
||||
this.adapterLabel.Name = "adapterLabel";
|
||||
this.adapterLabel.Size = new System.Drawing.Size(44, 13);
|
||||
this.adapterLabel.TabIndex = 6;
|
||||
this.adapterLabel.Text = "Adapter";
|
||||
//
|
||||
// adapterComboBox
|
||||
//
|
||||
this.adapterComboBox.Enabled = false;
|
||||
this.adapterComboBox.Location = new System.Drawing.Point(101, 77);
|
||||
this.adapterComboBox.Name = "adapterComboBox";
|
||||
this.adapterComboBox.Size = new System.Drawing.Size(333, 21);
|
||||
this.adapterComboBox.TabIndex = 7;
|
||||
//
|
||||
// NetadapterCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.adapterComboBox);
|
||||
this.Controls.Add(this.adapterLabel);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Name = "NetadapterCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(450, 300);
|
||||
this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox nameTextBox;
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
private System.Windows.Forms.Label adapterLabel;
|
||||
private System.Windows.Forms.ComboBox adapterComboBox;
|
||||
}
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,74 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.Rig.Network.Camera.CJMS11
|
||||
{
|
||||
public enum TestImagesMode
|
||||
{
|
||||
None,
|
||||
SaveFirstImages,
|
||||
SaveLastImages,
|
||||
LoadImages,
|
||||
Count,
|
||||
Invalid,
|
||||
}
|
||||
|
||||
public class CameraCfg : ComponentCfgBase, IChildComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(CameraCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl(IList<Config.Entities.Component> cmpntEntities) { return new CameraCfgCtrl(); }
|
||||
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public int HardwareAddress;
|
||||
public bool DisplayTerminal;
|
||||
|
||||
[XmlIgnore]
|
||||
public TestImagesMode TestImagesMode;
|
||||
|
||||
[XmlIgnore]
|
||||
public int TestImagesCount;
|
||||
|
||||
public string IPAddressCJMS;
|
||||
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
CameraCfg() { }
|
||||
|
||||
public CameraCfg(string name, IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
Name = name;
|
||||
Factory = factory;
|
||||
ParentName = "Network.Adapter";
|
||||
HardwareAddress = 1;
|
||||
TestImagesMode = TestImagesMode.None;
|
||||
TestImagesCount = 3000;
|
||||
DebugLevel = DebugMode.AutoDetect;
|
||||
IPAddressCJMS = "192.168.1.100";
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("Name={0}, s/n={1}, Terminal={2}, TestImagesMode={3}, TestImagesCount={4}, Parent={5}, IPAddressCJMS={6}",
|
||||
Name,
|
||||
HardwareAddress,
|
||||
DisplayTerminal ? Strings.yes : Strings.no,
|
||||
TestImagesMode,
|
||||
TestImagesCount,
|
||||
ParentName,
|
||||
IPAddressCJMS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,276 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Forms;
|
||||
using Castle.Components.DictionaryAdapter.Xml;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using log4net;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Resources;
|
||||
using TBF.Rig.Network.Adapter;
|
||||
using TBF.UI.Bench.Components;
|
||||
|
||||
namespace TBF.Rig.Network.Camera.CJMS11
|
||||
{
|
||||
public partial class CameraCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(CameraCfgCtrl));
|
||||
ComponentParametersDlg parent;
|
||||
|
||||
private bool isIPCalculated = false;
|
||||
|
||||
public bool ShowMore
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
CameraCfg config;
|
||||
|
||||
public IComponentCfg Config
|
||||
{
|
||||
get { return config as IComponentCfg; }
|
||||
set
|
||||
{
|
||||
config = value as CameraCfg;
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
public CameraCfgCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void PumpCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
parent = ParentForm as ComponentParametersDlg;
|
||||
if (parent == null) return;
|
||||
|
||||
if (parent.CmpntEntities != null)
|
||||
{
|
||||
foreach (var cmpnt in parent.CmpntEntities)
|
||||
{
|
||||
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is TBF.Rig.Network.AdapterJMS.Factory)
|
||||
{
|
||||
parentNameComboBox.Items.Add(cmpnt.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (TestImagesMode mode = 0; mode < TestImagesMode.Count; mode++)
|
||||
{
|
||||
testImagesModeComboBox.Items.Add(mode.ToString());
|
||||
}
|
||||
|
||||
Redraw();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
nameLabel.Text = Strings.Name;
|
||||
parentNameLabel.Text = Strings.Parent_name;
|
||||
hwAddressLabel.Text = Strings.Serial_number;
|
||||
}
|
||||
|
||||
public void Closing()
|
||||
{
|
||||
}
|
||||
|
||||
void Redraw()
|
||||
{
|
||||
if (config == null) return; /// Control was not loaded, settings were not changed
|
||||
|
||||
classNameLabel.Text = config.Factory.ClassName;
|
||||
nameTextBox.Text = config.Name;
|
||||
parentNameComboBox.Text = string.IsNullOrEmpty(config.ParentName) ? "---" : config.ParentName;
|
||||
hwAddressTextBox.Text = config.HardwareAddress.ToString();
|
||||
displayTerminalCheckBox.Checked = config.DisplayTerminal;
|
||||
testImagesModeComboBox.Text = config.TestImagesMode.ToString();
|
||||
testImagesCountTextBox.Text = config.TestImagesCount.ToString();
|
||||
if (!(isIPCalculated && (config.IPAddressCJMS == null || config.IPAddressCJMS.Equals(""))))
|
||||
{
|
||||
ipAddressTextBox.Text = config.IPAddressCJMS;
|
||||
}
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
parentNameComboBox.Enabled = true;
|
||||
hwAddressTextBox.Enabled = true;
|
||||
displayTerminalCheckBox.Enabled = true;
|
||||
testImagesModeComboBox.Enabled = true;
|
||||
testImagesCountTextBox.Enabled = true;
|
||||
ipAddressTextBox.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||
|
||||
int dummy;
|
||||
if (!parentNameComboBox.Items.Contains(parentNameComboBox.Text))
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + string.Format(Strings.Invalid_0, parentNameLabel.Text);
|
||||
}
|
||||
|
||||
if (!int.TryParse(hwAddressTextBox.Text, out dummy) || dummy % 100 > 63)
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + string.Format(Strings.Invalid_0, hwAddressLabel.Text);
|
||||
}
|
||||
|
||||
TestImagesMode newTestImagesMode = TestImagesMode.Invalid;
|
||||
for (TestImagesMode mode = 0; mode < TestImagesMode.Count; mode++)
|
||||
{
|
||||
if (testImagesModeComboBox.Text == mode.ToString()) newTestImagesMode = mode;
|
||||
}
|
||||
|
||||
if (newTestImagesMode == TestImagesMode.Invalid)
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + string.Format(Strings.Invalid_0, testImagesModeLabel.Text);
|
||||
}
|
||||
|
||||
if (!int.TryParse(testImagesCountTextBox.Text, out dummy) || dummy < 0 || dummy > 3000
|
||||
|| ((dummy == 0) && (newTestImagesMode != TestImagesMode.None)))
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + string.Format(Strings.Invalid_0, testImagesCountLabel.Text);
|
||||
}
|
||||
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateCfg()
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||
|
||||
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
|
||||
|
||||
string newParentName = parentNameComboBox.Text.Equals("---") ? string.Empty : parentNameComboBox.Text;
|
||||
int newHWAddress = int.Parse(hwAddressTextBox.Text);
|
||||
TestImagesMode newTestImagesMode = 0;
|
||||
for (TestImagesMode mode = 0; mode < TestImagesMode.Count; mode++)
|
||||
{
|
||||
if (testImagesModeComboBox.Text == mode.ToString()) newTestImagesMode = mode;
|
||||
}
|
||||
|
||||
int newTestImagesCount = int.Parse(testImagesCountTextBox.Text);
|
||||
|
||||
|
||||
if (config.Name != nameTextBox.Text ||
|
||||
config.ParentName != newParentName ||
|
||||
config.HardwareAddress != newHWAddress ||
|
||||
config.DisplayTerminal != displayTerminalCheckBox.Checked ||
|
||||
(config.IPAddressCJMS != ipAddressTextBox.Text && !ipAddressTextBox.Text.Contains("?"))
|
||||
)
|
||||
{
|
||||
config.Name = nameTextBox.Text;
|
||||
config.ParentName = newParentName;
|
||||
config.HardwareAddress = newHWAddress;
|
||||
config.DisplayTerminal = displayTerminalCheckBox.Checked;
|
||||
if (!ipAddressTextBox.Text.Contains("?"))
|
||||
{
|
||||
config.IPAddressCJMS = ipAddressTextBox.Text;
|
||||
}
|
||||
|
||||
flags |= (CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange);
|
||||
}
|
||||
|
||||
|
||||
if (config.TestImagesMode != newTestImagesMode ||
|
||||
config.TestImagesCount != newTestImagesCount)
|
||||
{
|
||||
config.TestImagesMode = newTestImagesMode;
|
||||
config.TestImagesCount = newTestImagesCount;
|
||||
|
||||
flags |= (CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.VolatileChange);
|
||||
}
|
||||
|
||||
if ((flags & CfgUpdateFlags.InvokeCfgChange) != 0)
|
||||
{
|
||||
Camera.OnCfgChange(this, new CfgChangeArgs(CfgChangeCmd.CfgChange, config));
|
||||
}
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
|
||||
private void parentNameComboBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (parent == null) return;
|
||||
|
||||
if (parent.CmpntEntities != null)
|
||||
{
|
||||
foreach (var cmpnt in parent.CmpntEntities)
|
||||
{
|
||||
IComponentFactory cmpntFactoryFromClassName =
|
||||
TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName);
|
||||
if (cmpntFactoryFromClassName is TBF.Rig.Network.Adapter.Factory)
|
||||
{
|
||||
NetadapterCfg netadapterCfg =
|
||||
cmpntFactoryFromClassName.CmpntCfgFromCmpntEntity(cmpnt) as NetadapterCfg;
|
||||
string adapterDescription = netadapterCfg.Description;
|
||||
AdapterInfo netadapter = AdapterInfo.GetNetAdapter(adapterDescription);
|
||||
ipAddressAdapterTextBox.Text = netadapter.IPAddress.ToString();
|
||||
if (config.IPAddressCJMS == null || config.IPAddressCJMS.Equals(""))
|
||||
{
|
||||
ipAddressTextBox.Text = getAdatpterIP(netadapter);
|
||||
}
|
||||
|
||||
isIPCalculated = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private string getAdatpterIP(AdapterInfo netadapter)
|
||||
{
|
||||
List<string> ipSegments = GetIPAddressInSegments(netadapter.IPAddress.ToString());
|
||||
|
||||
string address = string.Format(
|
||||
"{0}.{1}.{2}.???",
|
||||
ipSegments[0],
|
||||
ipSegments[1],
|
||||
ipSegments[2]
|
||||
);
|
||||
|
||||
return address;
|
||||
}
|
||||
|
||||
private List<string> GetIPAddressInSegments(string ipAddress)
|
||||
{
|
||||
List<string> ipAddressSegments = new List<string>();
|
||||
// Regular expression to match IPv4 and capture 4 segments
|
||||
string pattern = @"^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$";
|
||||
|
||||
Match match = Regex.Match(ipAddress, pattern);
|
||||
|
||||
if (match.Success)
|
||||
{
|
||||
ipAddressSegments.Add(match.Groups[1].Value);
|
||||
ipAddressSegments.Add(match.Groups[2].Value);
|
||||
ipAddressSegments.Add(match.Groups[3].Value);
|
||||
ipAddressSegments.Add(match.Groups[4].Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
log.Error("Invalid IP address format.");
|
||||
}
|
||||
|
||||
return ipAddressSegments;
|
||||
}
|
||||
}
|
||||
}
|
||||
-260
@@ -1,260 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.Rig.Network.Camera.CJMS11
|
||||
{
|
||||
partial class CameraCfgCtrl
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.hwAddressTextBox = new System.Windows.Forms.TextBox();
|
||||
this.hwAddressLabel = new System.Windows.Forms.Label();
|
||||
this.parentNameLabel = new System.Windows.Forms.Label();
|
||||
this.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.parentNameComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.displayTerminalCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.testImagesCountTextBox = new System.Windows.Forms.TextBox();
|
||||
this.testImagesCountLabel = new System.Windows.Forms.Label();
|
||||
this.testImagesModeComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.testImagesModeLabel = new System.Windows.Forms.Label();
|
||||
this.ipAddressTextBox = new System.Windows.Forms.TextBox();
|
||||
this.iPAddressLabel = new System.Windows.Forms.Label();
|
||||
this.ipAddressAdapterTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// hwAddressTextBox
|
||||
//
|
||||
this.hwAddressTextBox.Enabled = false;
|
||||
this.hwAddressTextBox.Location = new System.Drawing.Point(198, 209);
|
||||
this.hwAddressTextBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.hwAddressTextBox.Name = "hwAddressTextBox";
|
||||
this.hwAddressTextBox.Size = new System.Drawing.Size(193, 26);
|
||||
this.hwAddressTextBox.TabIndex = 6;
|
||||
//
|
||||
// hwAddressLabel
|
||||
//
|
||||
this.hwAddressLabel.AutoSize = true;
|
||||
this.hwAddressLabel.Location = new System.Drawing.Point(42, 213);
|
||||
this.hwAddressLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.hwAddressLabel.Name = "hwAddressLabel";
|
||||
this.hwAddressLabel.Size = new System.Drawing.Size(107, 20);
|
||||
this.hwAddressLabel.TabIndex = 5;
|
||||
this.hwAddressLabel.Text = "Serial number";
|
||||
//
|
||||
// parentNameLabel
|
||||
//
|
||||
this.parentNameLabel.AutoSize = true;
|
||||
this.parentNameLabel.Location = new System.Drawing.Point(42, 106);
|
||||
this.parentNameLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.parentNameLabel.Name = "parentNameLabel";
|
||||
this.parentNameLabel.Size = new System.Drawing.Size(100, 20);
|
||||
this.parentNameLabel.TabIndex = 3;
|
||||
this.parentNameLabel.Text = "Parent name";
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(198, 63);
|
||||
this.nameTextBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(193, 26);
|
||||
this.nameTextBox.TabIndex = 2;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(42, 68);
|
||||
this.nameLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(51, 20);
|
||||
this.nameLabel.TabIndex = 1;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(194, 26);
|
||||
this.classNameLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(125, 20);
|
||||
this.classNameLabel.TabIndex = 0;
|
||||
this.classNameLabel.Text = "ComonentName";
|
||||
//
|
||||
// parentNameComboBox
|
||||
//
|
||||
this.parentNameComboBox.Enabled = false;
|
||||
this.parentNameComboBox.FormattingEnabled = true;
|
||||
this.parentNameComboBox.Location = new System.Drawing.Point(198, 102);
|
||||
this.parentNameComboBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.parentNameComboBox.Name = "parentNameComboBox";
|
||||
this.parentNameComboBox.Size = new System.Drawing.Size(193, 28);
|
||||
this.parentNameComboBox.TabIndex = 4;
|
||||
this.parentNameComboBox.TextChanged += new System.EventHandler(this.parentNameComboBox_TextChanged);
|
||||
//
|
||||
// displayTerminalCheckBox
|
||||
//
|
||||
this.displayTerminalCheckBox.AutoSize = true;
|
||||
this.displayTerminalCheckBox.Enabled = false;
|
||||
this.displayTerminalCheckBox.Location = new System.Drawing.Point(200, 255);
|
||||
this.displayTerminalCheckBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.displayTerminalCheckBox.Name = "displayTerminalCheckBox";
|
||||
this.displayTerminalCheckBox.Size = new System.Drawing.Size(146, 24);
|
||||
this.displayTerminalCheckBox.TabIndex = 7;
|
||||
this.displayTerminalCheckBox.Text = "Display terminal";
|
||||
this.displayTerminalCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// testImagesCountTextBox
|
||||
//
|
||||
this.testImagesCountTextBox.Enabled = false;
|
||||
this.testImagesCountTextBox.Location = new System.Drawing.Point(198, 335);
|
||||
this.testImagesCountTextBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.testImagesCountTextBox.Name = "testImagesCountTextBox";
|
||||
this.testImagesCountTextBox.Size = new System.Drawing.Size(67, 26);
|
||||
this.testImagesCountTextBox.TabIndex = 12;
|
||||
//
|
||||
// testImagesCountLabel
|
||||
//
|
||||
this.testImagesCountLabel.AutoSize = true;
|
||||
this.testImagesCountLabel.Location = new System.Drawing.Point(42, 339);
|
||||
this.testImagesCountLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.testImagesCountLabel.Name = "testImagesCountLabel";
|
||||
this.testImagesCountLabel.Size = new System.Drawing.Size(139, 20);
|
||||
this.testImagesCountLabel.TabIndex = 11;
|
||||
this.testImagesCountLabel.Text = "Test images count";
|
||||
//
|
||||
// testImagesModeComboBox
|
||||
//
|
||||
this.testImagesModeComboBox.Enabled = false;
|
||||
this.testImagesModeComboBox.FormattingEnabled = true;
|
||||
this.testImagesModeComboBox.Location = new System.Drawing.Point(198, 295);
|
||||
this.testImagesModeComboBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.testImagesModeComboBox.Name = "testImagesModeComboBox";
|
||||
this.testImagesModeComboBox.Size = new System.Drawing.Size(193, 28);
|
||||
this.testImagesModeComboBox.TabIndex = 14;
|
||||
//
|
||||
// testImagesModeLabel
|
||||
//
|
||||
this.testImagesModeLabel.AutoSize = true;
|
||||
this.testImagesModeLabel.Location = new System.Drawing.Point(42, 299);
|
||||
this.testImagesModeLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.testImagesModeLabel.Name = "testImagesModeLabel";
|
||||
this.testImagesModeLabel.Size = new System.Drawing.Size(139, 20);
|
||||
this.testImagesModeLabel.TabIndex = 13;
|
||||
this.testImagesModeLabel.Text = "Test images mode";
|
||||
//
|
||||
// ipAddressTextBox
|
||||
//
|
||||
this.ipAddressTextBox.Enabled = false;
|
||||
this.ipAddressTextBox.Location = new System.Drawing.Point(198, 176);
|
||||
this.ipAddressTextBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.ipAddressTextBox.Name = "ipAddressTextBox";
|
||||
this.ipAddressTextBox.Size = new System.Drawing.Size(193, 26);
|
||||
this.ipAddressTextBox.TabIndex = 15;
|
||||
//
|
||||
// iPAddressLabel
|
||||
//
|
||||
this.iPAddressLabel.AutoSize = true;
|
||||
this.iPAddressLabel.Location = new System.Drawing.Point(42, 176);
|
||||
this.iPAddressLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.iPAddressLabel.Name = "iPAddressLabel";
|
||||
this.iPAddressLabel.Size = new System.Drawing.Size(89, 20);
|
||||
this.iPAddressLabel.TabIndex = 16;
|
||||
this.iPAddressLabel.Text = "IP address:";
|
||||
//
|
||||
// ipAddressAdapterTextBox
|
||||
//
|
||||
this.ipAddressAdapterTextBox.Enabled = false;
|
||||
this.ipAddressAdapterTextBox.Location = new System.Drawing.Point(200, 140);
|
||||
this.ipAddressAdapterTextBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.ipAddressAdapterTextBox.Name = "ipAddressAdapterTextBox";
|
||||
this.ipAddressAdapterTextBox.Size = new System.Drawing.Size(193, 26);
|
||||
this.ipAddressAdapterTextBox.TabIndex = 17;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(42, 140);
|
||||
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(150, 20);
|
||||
this.label1.TabIndex = 18;
|
||||
this.label1.Text = "Adapter IP address:";
|
||||
//
|
||||
// CameraCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.ipAddressAdapterTextBox);
|
||||
this.Controls.Add(this.iPAddressLabel);
|
||||
this.Controls.Add(this.ipAddressTextBox);
|
||||
this.Controls.Add(this.testImagesModeComboBox);
|
||||
this.Controls.Add(this.testImagesModeLabel);
|
||||
this.Controls.Add(this.hwAddressTextBox);
|
||||
this.Controls.Add(this.hwAddressLabel);
|
||||
this.Controls.Add(this.testImagesCountTextBox);
|
||||
this.Controls.Add(this.testImagesCountLabel);
|
||||
this.Controls.Add(this.displayTerminalCheckBox);
|
||||
this.Controls.Add(this.parentNameComboBox);
|
||||
this.Controls.Add(this.parentNameLabel);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.Name = "CameraCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(603, 391);
|
||||
this.Load += new System.EventHandler(this.PumpCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
}
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
|
||||
private System.Windows.Forms.TextBox ipAddressAdapterTextBox;
|
||||
|
||||
private System.Windows.Forms.TextBox ipAddressTextBox;
|
||||
private System.Windows.Forms.Label iPAddressLabel;
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox hwAddressTextBox;
|
||||
private System.Windows.Forms.Label hwAddressLabel;
|
||||
private System.Windows.Forms.Label parentNameLabel;
|
||||
private System.Windows.Forms.TextBox nameTextBox;
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
private System.Windows.Forms.ComboBox parentNameComboBox;
|
||||
private System.Windows.Forms.CheckBox displayTerminalCheckBox;
|
||||
private System.Windows.Forms.TextBox testImagesCountTextBox;
|
||||
private System.Windows.Forms.Label testImagesCountLabel;
|
||||
private System.Windows.Forms.ComboBox testImagesModeComboBox;
|
||||
private System.Windows.Forms.Label testImagesModeLabel;
|
||||
}
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -1,25 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
namespace TBF.Rig.Network.Camera.CJMS11
|
||||
{
|
||||
public class Factory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return GetType().Namespace.Substring(8); } }
|
||||
public override string ToString() { return ClassName; }
|
||||
|
||||
public IComponent DummyComponent() { return new Camera(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Camera(cfg, components); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new CameraCfg(this.GetType().Namespace.Substring(8), this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
return ComponentCfgBase.CreateFromDbEntity(CameraCfg.Serializer, component, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,178 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using log4net;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Network.Telnet;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace TBF.Rig.Network.Camera.CJMS11
|
||||
{
|
||||
public class GrabImagesOp : IOperation
|
||||
{
|
||||
/// TODO: Implement support for grabbing multiple images, now imgFileNames.Lenght should be 1
|
||||
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(GrabImagesOp));
|
||||
public override string ToString() { return string.Format("GrabImageOp()"); }
|
||||
|
||||
readonly Camera camera;
|
||||
|
||||
readonly string[] imgFileNames;
|
||||
readonly bool blackAndWhite;
|
||||
readonly bool lowResolution;
|
||||
readonly ImageRotation imageRotation;
|
||||
|
||||
string command;
|
||||
bool grabImageCommandSent;
|
||||
string response;
|
||||
bool grabPassed;
|
||||
bool grabFailed;
|
||||
bool transferringGrabbedImage;
|
||||
|
||||
Image grabedImage;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Events: Event.None or Event.Error
|
||||
/// </summary>
|
||||
/// <param name="camera">CLP1611.Camera reference</param>
|
||||
public GrabImagesOp(Camera camera, string[] imgFileNames, bool blackAndWhite, bool lowResolution, ImageRotation imageRotation)
|
||||
{
|
||||
/// TODO: Implement support for grabbing multiple images, now imgFileNames.Lenght should be 1
|
||||
|
||||
this.camera = camera;
|
||||
//this.telnet = camera.Telnet;
|
||||
this.imgFileNames = imgFileNames;
|
||||
this.blackAndWhite = blackAndWhite;
|
||||
this.lowResolution = lowResolution;
|
||||
this.imageRotation = imageRotation;
|
||||
|
||||
grabImageCommandSent = false;
|
||||
transferringGrabbedImage = false;
|
||||
|
||||
if (camera.DebugLevel == DebugMode.Normal || camera.DebugLevel == DebugMode.DetectedOn)
|
||||
{
|
||||
Camera.ImageCameraHandler += ImageReceived;
|
||||
}
|
||||
//TODO BUMI improve by simulate image
|
||||
Camera.ImageCameraHandler += ImageReceived;
|
||||
}
|
||||
|
||||
void PromptReceived(object sndr, PromptReceivedJMSEventArgs a)
|
||||
{
|
||||
response = a.Response;
|
||||
}
|
||||
|
||||
void ImageReceived(object sndr, PromptReceivedImageEventArgs a)
|
||||
{
|
||||
if(a.idxCamera != camera.CameraIdx) return;
|
||||
grabedImage = a.image;
|
||||
grabPassed = true;
|
||||
}
|
||||
|
||||
|
||||
public void Start()
|
||||
{
|
||||
grabImageCommandSent = false;
|
||||
transferringGrabbedImage = false;
|
||||
grabPassed = false;
|
||||
grabedImage = null;
|
||||
|
||||
if ((imgFileNames != null) && (imgFileNames.Length > 0) && File.Exists(imgFileNames[0]))
|
||||
{
|
||||
///
|
||||
/// An image specified, (1) delete previous image, (2) check if this is a simulation
|
||||
///
|
||||
File.Delete(imgFileNames[0]);
|
||||
|
||||
/* if (camera.CameraCfg.DebugLevel == DebugMode.Simulate || camera.CameraCfg.DebugLevel == DebugMode.DetectedOff)
|
||||
{
|
||||
///
|
||||
/// Camera is in simulation mode => create a simulated image
|
||||
///
|
||||
File.Copy(string.Format("{0}\\Pictures\\sample.jpg", Program.ExecutableDir), imgFileNames[0]);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
public Event Run()
|
||||
{
|
||||
if ((imgFileNames == null) || (imgFileNames.Length < 1) || (imgFileNames[0] == null))
|
||||
{
|
||||
///
|
||||
/// No images to be grabbed => Done
|
||||
///
|
||||
return Event.GrabPassed;
|
||||
}
|
||||
/*else if (camera.CameraCfg.DebugLevel == DebugMode.Simulate ||
|
||||
camera.CameraCfg.DebugLevel == DebugMode.DetectedOff)
|
||||
{
|
||||
///
|
||||
/// Camera is in simulation mode => create a simulated image and complete
|
||||
///
|
||||
return Event.GrabPassed;
|
||||
}*/
|
||||
else if (camera.IsGrabImageListenerThreadAlive)
|
||||
{
|
||||
return Event.CameraBusy;
|
||||
}
|
||||
else if (!grabImageCommandSent)
|
||||
{
|
||||
///
|
||||
/// Normal operation, no command sent yet => (1) wait until telnet state = Inactive, (2) send a command
|
||||
///
|
||||
camera.StartGrabImageListener();
|
||||
grabImageCommandSent = true;
|
||||
return Event.CameraBusy;
|
||||
}
|
||||
else if (grabPassed)
|
||||
{
|
||||
///
|
||||
/// Normal operation, grab passed => transfer/transferring the image
|
||||
|
||||
|
||||
if (transferringGrabbedImage)
|
||||
{
|
||||
/// Grab passed and image transfer is in progress
|
||||
return Event.GrabPassed;
|
||||
}
|
||||
else if (camera.IsSaveImageListenerThreadAlive)
|
||||
{
|
||||
/// Wait until the previous image transfer completes
|
||||
return Event.CameraBusy;
|
||||
}
|
||||
else //if (0 == camera.DownloadFile(blackAndWhite ? "grabbed.jpg" : "grabbed.bmp", imgFileNames[0]))
|
||||
{
|
||||
camera.StartSaveImageToFileListener(grabedImage, imgFileNames[0]);
|
||||
/// File transfer successfully started
|
||||
transferringGrabbedImage = true;
|
||||
return Event.GrabPassed;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
///
|
||||
/// Normal operation, grab failed => there in no image to transfer
|
||||
///
|
||||
return Event.GrabFailed;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
//if (camera.CameraCfg.DebugLevel == DebugMode.Simulate) return;
|
||||
|
||||
if (camera.IsGrabImageListenerThreadAlive)
|
||||
{
|
||||
camera.SetStopGrabImageListenerFlag();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
using TBF.Rig.Network.Camera.CJMS11.POJO;
|
||||
|
||||
namespace TBF.Rig.Network.Camera.CJMS11
|
||||
{
|
||||
public class JmsMessage
|
||||
{
|
||||
private POJO.MessageStatus status;
|
||||
private CommandM command;
|
||||
private string payload;
|
||||
|
||||
private string orig_status;
|
||||
private string orig_command;
|
||||
private string orig_payload;
|
||||
|
||||
public POJO.MessageStatus Status
|
||||
{
|
||||
get => status;
|
||||
set => status = value;
|
||||
}
|
||||
|
||||
public CommandM Command
|
||||
{
|
||||
get => command;
|
||||
set => command = value;
|
||||
}
|
||||
|
||||
public string Payload
|
||||
{
|
||||
get => payload;
|
||||
set => payload = value;
|
||||
}
|
||||
|
||||
public string OrigStatus => orig_status;
|
||||
|
||||
public string OrigCommand => orig_command;
|
||||
|
||||
public string OrigPayload => orig_payload;
|
||||
|
||||
public JmsMessage(string status, string command, string payload)
|
||||
{
|
||||
this.status = MessageStatusEnum.GetCommandM(status);
|
||||
this.command = CommandMEnum.GetCommandM(command);
|
||||
|
||||
orig_status = status;
|
||||
orig_command = command;
|
||||
orig_payload = payload;
|
||||
this.payload = payload;
|
||||
}
|
||||
|
||||
public bool isMessageImageType(){
|
||||
return this.command == CommandM.grab_image_;
|
||||
}
|
||||
|
||||
public ParsedImage getImage(){
|
||||
if(isMessageImageType()){
|
||||
return JmsPacket.ImageParser(this.payload);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format( "status:{0}, command:{1}, payload:{2}, orig_status:{3}, orig_command:{4}, orig_payload:{5}",
|
||||
status,
|
||||
command,
|
||||
payload,
|
||||
orig_status,
|
||||
orig_command,
|
||||
orig_payload);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
using System;
|
||||
using System.Text.RegularExpressions;
|
||||
using log4net;
|
||||
using TBF.Rig.Network.Camera.CJMS11.POJO;
|
||||
|
||||
namespace TBF.Rig.Network.Camera.CJMS11
|
||||
{
|
||||
public class JmsPacket
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(JmsPacket));
|
||||
|
||||
private JmsMessage jmsMessage;
|
||||
private string messageOrigin;
|
||||
|
||||
public string MessageOrigin { get => messageOrigin; }
|
||||
|
||||
public JmsMessage JmsMessage
|
||||
{
|
||||
get => jmsMessage;
|
||||
set => jmsMessage = value;
|
||||
}
|
||||
|
||||
public JmsPacket(string message)
|
||||
{
|
||||
messageOrigin = message;
|
||||
|
||||
try
|
||||
{
|
||||
if (ParseMessage(messageOrigin))
|
||||
{
|
||||
//success
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
log.Error("Error parsing message: " + e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private bool ParseMessage(string message)
|
||||
{
|
||||
message = message.Trim();
|
||||
if (message.Length < 1) return false;
|
||||
|
||||
this.jmsMessage = JmsMessageFromString(message);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static JmsMessage JmsMessageFromString(string message)
|
||||
{
|
||||
// Equivalent regex pattern
|
||||
var pattern = new Regex(@"^(ACK|NACK):\s*(\S+)\s*(?:~(.*)~)?\s*END$", RegexOptions.Singleline);
|
||||
|
||||
var match = pattern.Match(message);
|
||||
if (match.Success)
|
||||
{
|
||||
string status = match.Groups[1].Value;
|
||||
string commandStr = match.Groups[2].Value;
|
||||
string payload = match.Groups[3].Success ? match.Groups[3].Value : "";
|
||||
|
||||
return new JmsMessage(status, commandStr, payload);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new ArgumentException($"Message format not recognized: {message}");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static ParsedImage ImageParser(string payloadImage)
|
||||
{
|
||||
// Equivalent regex pattern
|
||||
var imagePattern = new Regex(@"IMAGE:([A-Z0-9_]+):\s*(.*?)\s*~IMAGE_END", RegexOptions.Singleline);
|
||||
|
||||
var match = imagePattern.Match(payloadImage);
|
||||
if (match.Success)
|
||||
{
|
||||
string encoding = match.Groups[1].Value;
|
||||
string imageData = match.Groups[2].Value;
|
||||
|
||||
return new ParsedImage(ImageTypeEnum.GetCommandM(encoding), imageData);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new ArgumentException($"Payload does not match expected image format: {payloadImage}");
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("JmsPacket -> original message: {0} -> JmsMessage: {1}", messageOrigin, jmsMessage.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using log4net;
|
||||
using Common;
|
||||
using TBF.Rig.Network.Telnet;
|
||||
|
||||
namespace TBF.Rig.Network.Camera.CJMS11
|
||||
{
|
||||
public class LiveStreamOp : IOperation
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(LiveStreamOp));
|
||||
|
||||
readonly Camera camera;
|
||||
readonly Telnet.TelnetClient telnet;
|
||||
readonly string command;
|
||||
|
||||
bool liveStreamCommandSent;
|
||||
|
||||
/// <summary>
|
||||
/// Events: Event.None or Event.Error
|
||||
/// </summary>
|
||||
/// <param name="camera">CLP1611.Camera reference</param>
|
||||
public LiveStreamOp(Camera camera, string command)
|
||||
{
|
||||
this.camera = camera;
|
||||
this.command = command;
|
||||
}
|
||||
|
||||
|
||||
public void Start()
|
||||
{
|
||||
liveStreamCommandSent = false;
|
||||
}
|
||||
|
||||
public Event Run()
|
||||
{
|
||||
if (camera.CameraCfg.DebugLevel == DebugMode.Simulate) return Event.None;
|
||||
|
||||
log.DebugFormat("Run(): telnet.State = {0}, liveStreamCommandSent = {1}", telnet.State, liveStreamCommandSent);
|
||||
|
||||
if (!liveStreamCommandSent)
|
||||
{
|
||||
if (camera.Running && (telnet.State == TelnetClient.TelnetState.Inactive))
|
||||
{
|
||||
telnet.Enqueue(new Telnet.Command(Telnet.CmdAction.SEND_STRING, command));
|
||||
liveStreamCommandSent = true;
|
||||
log.WarnFormat("{0} IP={1} command={2}", camera.Name, camera.IPAddress, command);
|
||||
}
|
||||
}
|
||||
|
||||
return Event.None;
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
if (camera.CameraCfg.DebugLevel == DebugMode.Simulate) return;
|
||||
|
||||
log.DebugFormat("Stop(): telnet.State = {0}, liveStreamCommandSent = {1}", telnet.State, liveStreamCommandSent);
|
||||
|
||||
if (liveStreamCommandSent)
|
||||
{
|
||||
telnet.Enqueue(new Telnet.Command(Telnet.CmdAction.SEND_COMMAND, Telnet.TelnetClient.CtrlCCommand));
|
||||
log.WarnFormat("{0} IP={1} command=CTRL-C", camera.Name, camera.IPAddress);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
namespace TBF.Rig.Network.Camera.CJMS11
|
||||
{
|
||||
public enum CommandM
|
||||
{
|
||||
noCommand,
|
||||
unknown_, // special: only return - unknown command
|
||||
connect_, // special: only return - TCP connection created
|
||||
type_camera_,
|
||||
status_,
|
||||
prepare_camera_,
|
||||
grab_image_,
|
||||
send_,
|
||||
start_stream_,
|
||||
stop_stream_,
|
||||
start_stream_images_,
|
||||
stop_stream_images_,
|
||||
get_cfg_,
|
||||
set_cfg_,
|
||||
close_,
|
||||
disconnect_,
|
||||
overload_config_,
|
||||
client_count_
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace TBF.Rig.Network.Camera.CJMS11
|
||||
{
|
||||
public static class CommandMEnum
|
||||
{
|
||||
private static readonly Dictionary<CommandM, string> commandToString = new Dictionary<CommandM, string>
|
||||
{
|
||||
{ CommandM.noCommand, "noCommand" },
|
||||
{ CommandM.unknown_, "unknown" },
|
||||
{ CommandM.connect_, "connect" },
|
||||
{ CommandM.type_camera_, "type_camera" },
|
||||
{ CommandM.status_, "status" },
|
||||
{ CommandM.prepare_camera_, "prepare_camera" },
|
||||
{ CommandM.grab_image_, "grab_image" },
|
||||
{ CommandM.send_, "send" },
|
||||
{ CommandM.start_stream_, "start_stream" },
|
||||
{ CommandM.stop_stream_, "stop_stream" },
|
||||
{ CommandM.start_stream_images_, "start_stream_images" },
|
||||
{ CommandM.stop_stream_images_, "stop_stream_images" },
|
||||
{ CommandM.get_cfg_, "get_cfg" },
|
||||
{ CommandM.set_cfg_, "set_cfg" },
|
||||
{ CommandM.close_, "close" },
|
||||
{ CommandM.disconnect_, "disconnect" },
|
||||
{ CommandM.overload_config_, "overload_config" },
|
||||
{ CommandM.client_count_, "client_count" }
|
||||
};
|
||||
|
||||
|
||||
private static readonly Dictionary<string, CommandM> stringToCommand = commandToString.ToDictionary(kvp => kvp.Value, kvp => kvp.Key);
|
||||
|
||||
public static string GetVal(CommandM cmd)
|
||||
{
|
||||
return commandToString.TryGetValue(cmd, out var str) ? str : "unknown";
|
||||
}
|
||||
|
||||
public static CommandM GetCommandM(string token)
|
||||
{
|
||||
if (string.IsNullOrEmpty(token))
|
||||
return CommandM.noCommand;
|
||||
|
||||
return stringToCommand.TryGetValue(token, out var cmd) ? cmd : CommandM.noCommand;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
namespace TBF.Rig.Network.Camera.CJMS11.POJO
|
||||
{
|
||||
public enum ImageType
|
||||
{
|
||||
UNKNOWN,
|
||||
BASE_64,
|
||||
MJPEG,
|
||||
RGB888
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace TBF.Rig.Network.Camera.CJMS11.POJO
|
||||
{
|
||||
public class ImageTypeEnum
|
||||
{
|
||||
private static readonly Dictionary<ImageType, string> commandToString = new Dictionary<ImageType, string>
|
||||
{
|
||||
{ ImageType.BASE_64, "BASE_64" },
|
||||
{ ImageType.MJPEG, "MJPEG" },
|
||||
{ ImageType.RGB888, "RGB888" },
|
||||
{ ImageType.UNKNOWN, "" }
|
||||
};
|
||||
|
||||
private static readonly Dictionary<string, ImageType> stringToCommand = commandToString.ToDictionary(kvp => kvp.Value, kvp => kvp.Key);
|
||||
|
||||
public static string GetVal(ImageType cmd)
|
||||
{
|
||||
return commandToString.TryGetValue(cmd, out var str) ? str : "unknown";
|
||||
}
|
||||
|
||||
public static ImageType GetCommandM(string token)
|
||||
{
|
||||
if (string.IsNullOrEmpty(token))
|
||||
return ImageType.UNKNOWN;
|
||||
|
||||
return stringToCommand.TryGetValue(token, out var cmd) ? cmd : ImageType.UNKNOWN;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
namespace TBF.Rig.Network.Camera.CJMS11.POJO
|
||||
{
|
||||
public enum MessageStatus
|
||||
{
|
||||
UNDEFINED,
|
||||
ACK,
|
||||
NACK,
|
||||
ERROR
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace TBF.Rig.Network.Camera.CJMS11.POJO
|
||||
{
|
||||
public class MessageStatusEnum
|
||||
{
|
||||
private static readonly Dictionary<MessageStatus, string> commandToString = new Dictionary<MessageStatus, string>
|
||||
{
|
||||
{ MessageStatus.UNDEFINED, "" },
|
||||
{ MessageStatus.ACK, "ACK" },
|
||||
{ MessageStatus.NACK, "NACK" },
|
||||
{ MessageStatus.ERROR, "ERROR" }
|
||||
};
|
||||
|
||||
private static readonly Dictionary<string, MessageStatus> stringToCommand = commandToString.ToDictionary(kvp => kvp.Value, kvp => kvp.Key);
|
||||
|
||||
public static string GetVal(MessageStatus cmd)
|
||||
{
|
||||
return commandToString.TryGetValue(cmd, out var str) ? str : "undefined";
|
||||
}
|
||||
|
||||
public static MessageStatus GetCommandM(string token)
|
||||
{
|
||||
if (string.IsNullOrEmpty(token))
|
||||
return MessageStatus.UNDEFINED;
|
||||
|
||||
return stringToCommand.TryGetValue(token, out var cmd) ? cmd : MessageStatus.UNDEFINED;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
using System;
|
||||
using TBF.Rig.Network.Camera.CJMS11.POJO;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
|
||||
|
||||
|
||||
namespace TBF.Rig.Network.Camera.CJMS11
|
||||
{
|
||||
public class ParsedImage
|
||||
{
|
||||
public ImageType Encoding { get; }
|
||||
public string ImageData { get; }
|
||||
|
||||
public Image Image { get { return (ImageData.Length>0 ? Base64ToImage(ImageData) : null); } }
|
||||
|
||||
public ParsedImage(ImageType encoding, string imageData)
|
||||
{
|
||||
Encoding = encoding;
|
||||
ImageData = imageData;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"ParsedImage{{encoding='{Encoding}', imageData='{ImageData}'}}";
|
||||
}
|
||||
|
||||
public static Image Base64ToImage(string base64Image)
|
||||
{
|
||||
byte[] imageBytes = Convert.FromBase64String(base64Image);
|
||||
|
||||
using (var ms = new MemoryStream(imageBytes))
|
||||
{
|
||||
return Image.FromStream(ms);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TBF.Rig.Network.Camera.CJMS11
|
||||
{
|
||||
public class RoisAndResults
|
||||
{
|
||||
public const int MaxRegisteredRois = 4; /// Max. count of registered (and measured) ROI-s
|
||||
|
||||
public long CameraTimeMs;
|
||||
public int[] Angles;
|
||||
|
||||
private IList<string> roiParams;
|
||||
public int RegisteredRoisCount { get { return roiParams.Count; } }
|
||||
|
||||
|
||||
public RoisAndResults()
|
||||
{
|
||||
Angles = new int[MaxRegisteredRois];
|
||||
roiParams = new List<string>();
|
||||
}
|
||||
|
||||
|
||||
public void ClearRoiParams()
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
roiParams.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
public int RegisterRoi(string roiParam)
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
if (this.roiParams.Count >= MaxRegisteredRois) return 0;
|
||||
|
||||
this.roiParams.Add(roiParam);
|
||||
return this.roiParams.Count; /// return a handle 1 .. MaxRegisteredRois
|
||||
}
|
||||
}
|
||||
|
||||
public string GetRoiParams(int roiHandle)
|
||||
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
if (roiHandle > 0 && roiHandle <= roiParams.Count)
|
||||
{
|
||||
return roiParams[roiHandle - 1];
|
||||
}
|
||||
else
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SetResults(long timeMs, int[] angles)
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
CameraTimeMs = timeMs;
|
||||
for (int i = 0; i < Math.Min(angles.Length, Angles.Length); i++)
|
||||
{
|
||||
Angles[i] = angles[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int GetResult(int roiHandle, out long timeMs)
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
if (roiHandle > 0 && roiHandle <= roiParams.Count)
|
||||
{
|
||||
timeMs = CameraTimeMs;
|
||||
return Angles[roiHandle - 1];
|
||||
}
|
||||
else
|
||||
{
|
||||
timeMs = 0;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
namespace TBF.Rig.Network.Camera.CJMS11
|
||||
{
|
||||
partial class TerminalDlg
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.vtTextBox = new System.Windows.Forms.TextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// vtTextBox
|
||||
//
|
||||
this.vtTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.vtTextBox.Location = new System.Drawing.Point(0, 0);
|
||||
this.vtTextBox.Multiline = true;
|
||||
this.vtTextBox.Name = "vtTextBox";
|
||||
this.vtTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both;
|
||||
this.vtTextBox.Size = new System.Drawing.Size(737, 437);
|
||||
this.vtTextBox.TabIndex = 0;
|
||||
//
|
||||
// TerminalDlg
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(737, 437);
|
||||
this.Controls.Add(this.vtTextBox);
|
||||
this.Name = "TerminalDlg";
|
||||
this.Text = "Terminal";
|
||||
this.Load += new System.EventHandler(this.Terminal_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox vtTextBox;
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using TBF.Rig.Network.Telnet;
|
||||
|
||||
namespace TBF.Rig.Network.Camera.CJMS11
|
||||
{
|
||||
public partial class TerminalDlg : Form
|
||||
{
|
||||
TelnetClient telnet;
|
||||
|
||||
public TerminalDlg()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public TerminalDlg(string name, TelnetClient telnet)
|
||||
{
|
||||
InitializeComponent();
|
||||
Text = name;
|
||||
this.telnet = telnet;
|
||||
}
|
||||
|
||||
private void Terminal_Load(object sender, EventArgs e)
|
||||
{
|
||||
telnet.vtTextChangedHandler += delegate(object sndr, VtTextChangedEventArgs args)
|
||||
{
|
||||
if (InvokeRequired) { Invoke(new EventHandler<VtTextChangedEventArgs>(OnTextChanged), sndr, args); }
|
||||
else OnTextChanged(sndr, args);
|
||||
};
|
||||
}
|
||||
|
||||
void OnTextChanged(object sndr, VtTextChangedEventArgs args)
|
||||
{
|
||||
vtTextBox.Text = args.VtText;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -42,10 +42,14 @@ namespace TBF.Rig.Network.Camera.Roi
|
||||
{
|
||||
foreach (var cmpnt in parent.CmpntEntities)
|
||||
{
|
||||
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is TBF.Rig.Network.Camera.CJMS11.Factory)
|
||||
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is TBF.Rig.Network.Camera.CLP1611.Factory)
|
||||
{
|
||||
parentNameComboBox.Items.Add(cmpnt.Name);
|
||||
}
|
||||
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is TBF.Rig.Network.Camera.Roi.Factory)
|
||||
{
|
||||
previousRoiComboBox.Items.Add(cmpnt.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
namespace TBF.Rig.Network.Camera.RoiForFixedStartCJMS11
|
||||
{
|
||||
public class Factory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return this.GetType().Namespace.Substring(8); } }
|
||||
public override string ToString() { return ClassName; }
|
||||
|
||||
public IComponent DummyComponent() { return new Roi(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Roi(cfg, components); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new RoiCfg(this.GetType().Namespace.Substring(8), this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
return ComponentCfgBase.CreateFromDbEntity(RoiCfg.Serializer, component, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.Rig.Network.Camera.RoiForFixedStartCJMS11
|
||||
{
|
||||
public class ProcedureParams : ProcedureParamsBase, IParamsProvider, IProcedureParams
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(ProcedureParams) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public double PulsesPerLtr; /// [l^-1]
|
||||
|
||||
public override void InitializeAll()
|
||||
{
|
||||
PulsesPerLtr = 1.0;
|
||||
}
|
||||
|
||||
string[] paramNames = new string[]
|
||||
{
|
||||
Strings.PulsesPerLtr,
|
||||
};
|
||||
public override string ParamName(int i) { return paramNames[i]; }
|
||||
public override int ParamsCount() { return paramNames.Length; }
|
||||
|
||||
public override string ToString(int i)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 0: return PulsesPerLtr.ToString();
|
||||
default: return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
/// Retrieves parameters from UI controls
|
||||
public CfgUpdateFlags UpdateParam(int i, string strValue)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 0: PulsesPerLtr = Utils.ParseUDouble(strValue); return CfgUpdateFlags.None;
|
||||
default: return CfgUpdateFlags.None;
|
||||
}
|
||||
}
|
||||
|
||||
/// Verifies whether strings in UI controls represent valid parameters
|
||||
public bool ValidateParam(int i, string strValue, out string message)
|
||||
{
|
||||
message = string.Empty;
|
||||
|
||||
double dummy;
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
if (Utils.TryParseUDouble(strValue, out dummy)) return true;
|
||||
break;
|
||||
default:
|
||||
message = "Invalid index";
|
||||
return false;
|
||||
}
|
||||
|
||||
message = ParamName(i) + " is invalid";
|
||||
return false;
|
||||
}
|
||||
|
||||
void CopyContentTo(ProcedureParams prms)
|
||||
{
|
||||
prms.PulsesPerLtr = this.PulsesPerLtr;
|
||||
}
|
||||
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
ProcedureParams pars = new ProcedureParams();
|
||||
CopyContentTo(pars);
|
||||
return pars;
|
||||
}
|
||||
|
||||
public override void UpdateFromDbEntity(ComponentProcedure dbEntity)
|
||||
{
|
||||
if (dbEntity == null) return;
|
||||
try
|
||||
{
|
||||
ProcedureParams tmp = Serializer.Deserialize(new StringReader(dbEntity.Parameters)) as ProcedureParams;
|
||||
|
||||
procedureParamsEntity = dbEntity;
|
||||
componentName = dbEntity.CmpntName;
|
||||
procedure = dbEntity.Procedure;
|
||||
|
||||
if (tmp != null) tmp.CopyContentTo(this);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public ProcedureParams() { }
|
||||
|
||||
public ProcedureParams(bool initialize)
|
||||
{
|
||||
if (initialize) InitializeAll();
|
||||
}
|
||||
|
||||
public ProcedureParams(ComponentProcedure procedureParamsEntity, string componentName, Procedure procedure)
|
||||
{
|
||||
this.procedureParamsEntity = procedureParamsEntity;
|
||||
this.componentName = componentName;
|
||||
this.procedure = procedure;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,144 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2017-2021 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using log4net;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.GenericDevices;
|
||||
|
||||
namespace TBF.Rig.Network.Camera.RoiForFixedStartCJMS11
|
||||
{
|
||||
public class Roi : ComponentBase, GenericDevices.IRegReaderStillCamera
|
||||
{
|
||||
/// TODO: Implement support for sharing one camera by multiple ROI-s
|
||||
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Roi));
|
||||
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
|
||||
|
||||
readonly RoiCfg roiCfg;
|
||||
|
||||
///
|
||||
/// Camera and ICamera
|
||||
///
|
||||
public readonly CJMS11.Camera NetCamera;
|
||||
public GenericDevices.ICamera Camera { get { return NetCamera as GenericDevices.ICamera; } }
|
||||
|
||||
public int Position
|
||||
{
|
||||
get
|
||||
{
|
||||
int firstDigitPos = Name.IndexOfAny(new char[] { '1', '2', '3', '4', '5', '6', '7', '8', '9', '0' });
|
||||
int position;
|
||||
return (firstDigitPos < 0) ? 0 : (int.TryParse(Name.Substring(firstDigitPos), out position) ? position : 0);
|
||||
}
|
||||
}
|
||||
public RegisterReaderType RegisterReaderType { get { return RegisterReaderType.Manual; } }
|
||||
public double PulsesPerLtr { get { return roiCfg.ProcParams.PulsesPerLtr; } }
|
||||
public double LtrsPerPulse { get { return (PulsesPerLtr <= float.Epsilon) ? 1.0 : (1 / PulsesPerLtr); } }
|
||||
|
||||
|
||||
double beginWMState;
|
||||
public double BeginWMState
|
||||
{
|
||||
get { return beginWMState; }
|
||||
set { beginWMState = value; }
|
||||
}
|
||||
|
||||
double endWMState;
|
||||
public double EndWMState
|
||||
{
|
||||
get { return endWMState; }
|
||||
set { endWMState = value; }
|
||||
}
|
||||
|
||||
public double WMVolume { get { return endWMState - beginWMState; } }
|
||||
|
||||
public int WMPulses { get { return (int)(WMVolume / LtrsPerPulse); } }
|
||||
|
||||
public int WMRefPulses { get { return StateMachine.ControlBoardMain.RefPulses; ; } }
|
||||
|
||||
|
||||
public Roi() { }
|
||||
|
||||
public Roi(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
{
|
||||
roiCfg = cfg as RoiCfg;
|
||||
NetCamera = TbfComponents.FindComponent(cfg.ParentName, components) as CJMS11.Camera;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
#region Configuration Change Handling
|
||||
|
||||
public static void OnCfgChange(object sender, CfgChangeArgs args)
|
||||
{
|
||||
if (CfgChangeHandler == null) return;
|
||||
try { CfgChangeHandler(sender, args); }
|
||||
catch (Exception e) { log.Error("CfgChangeHandler(...) failed", e); }
|
||||
}
|
||||
|
||||
public static event EventHandler<CfgChangeArgs> CfgChangeHandler;
|
||||
|
||||
public override void StartChangeHandler()
|
||||
{
|
||||
CfgChangeHandler += delegate(object sender, CfgChangeArgs args)
|
||||
{
|
||||
RoiCfg tmpcfg = args.Cfg as RoiCfg;
|
||||
if (tmpcfg != null && tmpcfg.Name.Equals(Name))
|
||||
{
|
||||
if (args.Command == CfgChangeCmd.CfgChange)
|
||||
{
|
||||
roiCfg.BlackAndWhite = tmpcfg.BlackAndWhite;
|
||||
roiCfg.LowResolution = tmpcfg.LowResolution;
|
||||
roiCfg.ImageRotation = tmpcfg.ImageRotation;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endregion Configuration Change Handling
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
log.DebugFormat("{0}:Clear()", Name);
|
||||
beginWMState = 0;
|
||||
endWMState = 0;
|
||||
}
|
||||
|
||||
|
||||
public IOperation GrabImageOp(string imageFileName)
|
||||
{
|
||||
return GrabImageOp(imageFileName, roiCfg.BlackAndWhite, roiCfg.LowResolution, roiCfg.ImageRotation);
|
||||
}
|
||||
|
||||
public IOperation GrabImageOp(string imageFileName,
|
||||
bool blackAndWhite, bool lowResolution, ImageRotation imageRotation)
|
||||
{
|
||||
if (NetCamera != null)
|
||||
{
|
||||
///TODO BUMI - implementing grabing multiple images
|
||||
/// 1. Create a list of image file names
|
||||
/// 2. implement count of images to grab
|
||||
/// 3. implement grabing multiple images
|
||||
|
||||
/// TODO: Implement support for sharing one camera by multiple ROI-s
|
||||
return NetCamera.GrabImagesOp(new string[] { imageFileName }, blackAndWhite, lowResolution, imageRotation);
|
||||
}
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
public IValve GetValve()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Rig.Network.Camera.RoiForFixedStartCJMS11.common;
|
||||
|
||||
namespace TBF.Rig.Network.Camera.RoiForFixedStartCJMS11
|
||||
{
|
||||
public class RoiCfg : ComponentCfgBase, IChildComponentCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(RoiCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl(IList<Config.Entities.Component> cmpntEntities) { return new RoiCfgCtrl(); }
|
||||
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public bool BlackAndWhite;
|
||||
public bool LowResolution;
|
||||
public ImageRotation ImageRotation;
|
||||
|
||||
[XmlIgnore]
|
||||
private Frame _imageFrame;
|
||||
|
||||
[XmlElement(IsNullable = true)]
|
||||
public Frame ImageFrame
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_imageFrame == null)
|
||||
{
|
||||
_imageFrame = new Frame(); // Ensure non-null when accessed
|
||||
}
|
||||
return _imageFrame;
|
||||
}
|
||||
set
|
||||
{
|
||||
_imageFrame = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Procedure parameters </summary>
|
||||
[XmlIgnore]
|
||||
public ProcedureParams ProcParams;
|
||||
public override IParamsProvider GetRuntimeProcParamsProvider() { return ProcParams; }
|
||||
public override IParamsProvider CreateProcParamsProvider() { return new ProcedureParams(true); }
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
RoiCfg()
|
||||
{
|
||||
ProcParams = new ProcedureParams(true);
|
||||
}
|
||||
|
||||
public RoiCfg(string name, IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
Name = name;
|
||||
Factory = factory;
|
||||
ParentName = "Camera";
|
||||
BlackAndWhite = false;
|
||||
LowResolution = true;
|
||||
ImageRotation = ImageRotation.None;
|
||||
ImageFrame = Frame.StandardFrame();
|
||||
DebugLevel = DebugMode.Inherit;
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("{0} Camera={1} B&W={2}, LowRes={3}, Rotation={4}, Frame={5}",
|
||||
Name, ParentName, BlackAndWhite, LowResolution, ImageRotation, ImageFrame);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,200 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Resources;
|
||||
using TBF.Rig.Network.Camera.RoiForFixedStartCJMS11.common;
|
||||
using TBF.UI.Bench.Components;
|
||||
|
||||
namespace TBF.Rig.Network.Camera.RoiForFixedStartCJMS11
|
||||
{
|
||||
public partial class RoiCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(RoiCfgCtrl));
|
||||
|
||||
ComponentParametersDlg parent;
|
||||
|
||||
|
||||
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
RoiCfg config;
|
||||
public IComponentCfg Config
|
||||
{
|
||||
get { return config as IComponentCfg; }
|
||||
set
|
||||
{
|
||||
config = value as RoiCfg;
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
public RoiCfgCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void PumpCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
parent = ParentForm as ComponentParametersDlg;
|
||||
if (parent == null) return;
|
||||
|
||||
if (parent.CmpntEntities != null)
|
||||
{
|
||||
foreach (var cmpnt in parent.CmpntEntities)
|
||||
{
|
||||
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is TBF.Rig.Network.Camera.CJMS11.Factory)
|
||||
{
|
||||
parentNameComboBox.Items.Add(cmpnt.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach (var resolutionFrame in ResolutionFrames.CommonResolutions)
|
||||
{
|
||||
resolutionComboBox.Items.Add(resolutionFrame.ToString());
|
||||
}
|
||||
|
||||
|
||||
for (ImageRotation ir = 0; ir < ImageRotation.Count; ir++)
|
||||
{
|
||||
imageRotationComboBox.Items.Add(ir.ToDescription());
|
||||
}
|
||||
|
||||
Redraw();
|
||||
}
|
||||
|
||||
public void Closing()
|
||||
{
|
||||
}
|
||||
|
||||
void Redraw()
|
||||
{
|
||||
if (config == null) return; /// Control was not loaded, settings were not changed
|
||||
|
||||
classNameLabel.Text = config.Factory.ClassName;
|
||||
nameTextBox.Text = config.Name;
|
||||
parentNameComboBox.Text = string.IsNullOrEmpty(config.ParentName) ? "---" : config.ParentName;
|
||||
blackAndWhiteCheckBox.Checked = config.BlackAndWhite;
|
||||
loResolutionCheckBox.Checked = config.LowResolution;
|
||||
imageRotationComboBox.Text = config.ImageRotation.ToDescription();
|
||||
resolutionComboBox.Text = config.ImageFrame.ToString();
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
parentNameComboBox.Enabled = true;
|
||||
blackAndWhiteCheckBox.Enabled = true;
|
||||
loResolutionCheckBox.Enabled = true;
|
||||
imageRotationComboBox.Enabled = true;
|
||||
resolutionComboBox.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||
|
||||
if (!parentNameComboBox.Items.Contains(parentNameComboBox.Text))
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + string.Format(Strings.Invalid_0, parentNameLabel.Text);
|
||||
}
|
||||
|
||||
if (!imageRotationComboBox.Items.Contains(imageRotationComboBox.Text))
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + string.Format(Strings.Invalid_0, imageRotationLabel.Text);
|
||||
}
|
||||
|
||||
if (!resolutionComboBox.Items.Contains(resolutionComboBox.Text))
|
||||
{
|
||||
flags |= CfgUpdateFlags.Error;
|
||||
message += Environment.NewLine + string.Format(Strings.Invalid_0, resolutionComboBox.Text);
|
||||
}
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateCfg()
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||
|
||||
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
|
||||
|
||||
if (config.Name != nameTextBox.Text)
|
||||
{
|
||||
config.Name = nameTextBox.Text;
|
||||
flags |= (CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange);
|
||||
}
|
||||
|
||||
string newParentName = parentNameComboBox.Text.Equals("---") ? string.Empty : parentNameComboBox.Text;
|
||||
if (config.ParentName != newParentName)
|
||||
{
|
||||
config.ParentName = newParentName;
|
||||
flags |= (CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange);
|
||||
}
|
||||
|
||||
if (config.BlackAndWhite != blackAndWhiteCheckBox.Checked)
|
||||
{
|
||||
config.BlackAndWhite = blackAndWhiteCheckBox.Checked;
|
||||
flags |= (CfgUpdateFlags.AnyChange | CfgUpdateFlags.InvokeCfgChange);
|
||||
}
|
||||
|
||||
if (config.LowResolution != loResolutionCheckBox.Checked)
|
||||
{
|
||||
config.LowResolution = loResolutionCheckBox.Checked;
|
||||
flags |= (CfgUpdateFlags.AnyChange | CfgUpdateFlags.InvokeCfgChange);
|
||||
}
|
||||
|
||||
for (ImageRotation ir = 0; ir < ImageRotation.Count; ir++)
|
||||
{
|
||||
if (imageRotationComboBox.Text == ir.ToDescription())
|
||||
{
|
||||
if (config.ImageRotation != ir)
|
||||
{
|
||||
config.ImageRotation = ir;
|
||||
flags |= (CfgUpdateFlags.AnyChange | CfgUpdateFlags.InvokeCfgChange);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (resolutionComboBox.Text != config.ImageFrame.ToString())
|
||||
{
|
||||
config.ImageFrame = Frame.Parse(resolutionComboBox.Text);
|
||||
flags |= (CfgUpdateFlags.AnyChange | CfgUpdateFlags.InvokeCfgChange);
|
||||
}
|
||||
|
||||
if ((flags & CfgUpdateFlags.InvokeCfgChange) != 0)
|
||||
{
|
||||
Roi.OnCfgChange(this, new CfgChangeArgs(CfgChangeCmd.CfgChange, config));
|
||||
}
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
#region Configuration Change Handling
|
||||
|
||||
public static void OnCmdResponse(object sender, CmdResponseArgs args)
|
||||
{
|
||||
if (CmdResponseHandler == null) return;
|
||||
try { CmdResponseHandler(sender, args); }
|
||||
catch (Exception e) { log.Error("CmdResponseHandler(...) failed", e); }
|
||||
}
|
||||
|
||||
public static event EventHandler<CmdResponseArgs> CmdResponseHandler;
|
||||
|
||||
public void StartResponseHandler() { }
|
||||
public void StopResponseHandler() { }
|
||||
|
||||
#endregion Configuration Change Handling
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,222 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
namespace TBF.Rig.Network.Camera.RoiForFixedStartCJMS11
|
||||
{
|
||||
partial class RoiCfgCtrl
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.parentNameLabel = new System.Windows.Forms.Label();
|
||||
this.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.parentNameComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.imageRotationComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.imageRotationLabel = new System.Windows.Forms.Label();
|
||||
this.blackAndWhiteCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.loResolutionCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.resolutionComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// parentNameLabel
|
||||
//
|
||||
this.parentNameLabel.AutoSize = true;
|
||||
this.parentNameLabel.Location = new System.Drawing.Point(30, 118);
|
||||
this.parentNameLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.parentNameLabel.Name = "parentNameLabel";
|
||||
this.parentNameLabel.Size = new System.Drawing.Size(65, 20);
|
||||
this.parentNameLabel.TabIndex = 3;
|
||||
this.parentNameLabel.Text = "Camera";
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(208, 75);
|
||||
this.nameTextBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(259, 26);
|
||||
this.nameTextBox.TabIndex = 2;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(30, 80);
|
||||
this.nameLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(51, 20);
|
||||
this.nameLabel.TabIndex = 1;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(204, 40);
|
||||
this.classNameLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(173, 20);
|
||||
this.classNameLabel.TabIndex = 0;
|
||||
this.classNameLabel.Text = "ComponentClassName";
|
||||
//
|
||||
// parentNameComboBox
|
||||
//
|
||||
this.parentNameComboBox.Enabled = false;
|
||||
this.parentNameComboBox.FormattingEnabled = true;
|
||||
this.parentNameComboBox.Location = new System.Drawing.Point(208, 114);
|
||||
this.parentNameComboBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.parentNameComboBox.Name = "parentNameComboBox";
|
||||
this.parentNameComboBox.Size = new System.Drawing.Size(259, 28);
|
||||
this.parentNameComboBox.TabIndex = 4;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(-316, -226);
|
||||
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(87, 20);
|
||||
this.label1.TabIndex = 5;
|
||||
this.label1.Text = "Arguments";
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.Enabled = false;
|
||||
this.textBox1.Location = new System.Drawing.Point(-188, -231);
|
||||
this.textBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.Size = new System.Drawing.Size(556, 26);
|
||||
this.textBox1.TabIndex = 6;
|
||||
//
|
||||
// imageRotationComboBox
|
||||
//
|
||||
this.imageRotationComboBox.Enabled = false;
|
||||
this.imageRotationComboBox.FormattingEnabled = true;
|
||||
this.imageRotationComboBox.Location = new System.Drawing.Point(208, 237);
|
||||
this.imageRotationComboBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.imageRotationComboBox.Name = "imageRotationComboBox";
|
||||
this.imageRotationComboBox.Size = new System.Drawing.Size(138, 28);
|
||||
this.imageRotationComboBox.TabIndex = 8;
|
||||
//
|
||||
// imageRotationLabel
|
||||
//
|
||||
this.imageRotationLabel.AutoSize = true;
|
||||
this.imageRotationLabel.Location = new System.Drawing.Point(30, 242);
|
||||
this.imageRotationLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.imageRotationLabel.Name = "imageRotationLabel";
|
||||
this.imageRotationLabel.Size = new System.Drawing.Size(153, 20);
|
||||
this.imageRotationLabel.TabIndex = 7;
|
||||
this.imageRotationLabel.Text = "Image rotation (ccw)";
|
||||
//
|
||||
// blackAndWhiteCheckBox
|
||||
//
|
||||
this.blackAndWhiteCheckBox.AutoSize = true;
|
||||
this.blackAndWhiteCheckBox.Enabled = false;
|
||||
this.blackAndWhiteCheckBox.Location = new System.Drawing.Point(208, 166);
|
||||
this.blackAndWhiteCheckBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.blackAndWhiteCheckBox.Name = "blackAndWhiteCheckBox";
|
||||
this.blackAndWhiteCheckBox.Size = new System.Drawing.Size(134, 24);
|
||||
this.blackAndWhiteCheckBox.TabIndex = 5;
|
||||
this.blackAndWhiteCheckBox.Text = "Black && White";
|
||||
this.blackAndWhiteCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// loResolutionCheckBox
|
||||
//
|
||||
this.loResolutionCheckBox.AutoSize = true;
|
||||
this.loResolutionCheckBox.Enabled = false;
|
||||
this.loResolutionCheckBox.Location = new System.Drawing.Point(208, 202);
|
||||
this.loResolutionCheckBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.loResolutionCheckBox.Name = "loResolutionCheckBox";
|
||||
this.loResolutionCheckBox.Size = new System.Drawing.Size(137, 24);
|
||||
this.loResolutionCheckBox.TabIndex = 6;
|
||||
this.loResolutionCheckBox.Text = "Low resolution";
|
||||
this.loResolutionCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Location = new System.Drawing.Point(30, 293);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(152, 28);
|
||||
this.label2.TabIndex = 9;
|
||||
this.label2.Text = "Choose resolution:";
|
||||
//
|
||||
// resolutionComboBox
|
||||
//
|
||||
this.resolutionComboBox.DropDownWidth = 259;
|
||||
this.resolutionComboBox.Enabled = false;
|
||||
this.resolutionComboBox.FormattingEnabled = true;
|
||||
this.resolutionComboBox.Location = new System.Drawing.Point(208, 290);
|
||||
this.resolutionComboBox.Name = "resolutionComboBox";
|
||||
this.resolutionComboBox.Size = new System.Drawing.Size(262, 28);
|
||||
this.resolutionComboBox.TabIndex = 10;
|
||||
//
|
||||
// RoiCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.resolutionComboBox);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.imageRotationComboBox);
|
||||
this.Controls.Add(this.imageRotationLabel);
|
||||
this.Controls.Add(this.blackAndWhiteCheckBox);
|
||||
this.Controls.Add(this.loResolutionCheckBox);
|
||||
this.Controls.Add(this.parentNameComboBox);
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.parentNameLabel);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.Name = "RoiCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(750, 462);
|
||||
this.Load += new System.EventHandler(this.PumpCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
}
|
||||
|
||||
private System.Windows.Forms.ComboBox resolutionComboBox;
|
||||
|
||||
private System.Windows.Forms.Label label2;
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label parentNameLabel;
|
||||
private System.Windows.Forms.TextBox nameTextBox;
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
private System.Windows.Forms.ComboBox parentNameComboBox;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private System.Windows.Forms.ComboBox imageRotationComboBox;
|
||||
private System.Windows.Forms.Label imageRotationLabel;
|
||||
private System.Windows.Forms.CheckBox blackAndWhiteCheckBox;
|
||||
private System.Windows.Forms.CheckBox loResolutionCheckBox;
|
||||
}
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -1,70 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace TBF.Rig.Network.Camera.RoiForFixedStartCJMS11.common
|
||||
{
|
||||
public class Frame
|
||||
{
|
||||
public int Width { get; set; }
|
||||
public int Height { get; set; }
|
||||
|
||||
public Frame() // standard frame
|
||||
{
|
||||
this.Width = 640;
|
||||
this.Height = 480;
|
||||
}
|
||||
|
||||
public Frame(int width, int height)
|
||||
{
|
||||
Width = width;
|
||||
Height = height;
|
||||
}
|
||||
|
||||
public static Frame StandardFrame()
|
||||
{
|
||||
return new Frame();
|
||||
}
|
||||
|
||||
public override string ToString() => $"{Width}x{Height}";
|
||||
|
||||
|
||||
// Static method to parse string like "1920x1080"
|
||||
public static Frame Parse(string resolution)
|
||||
{
|
||||
var match = Regex.Match(resolution, @"^\s*(\d+)\s*[xX]\s*(\d+)\s*$");
|
||||
if (!match.Success)
|
||||
{
|
||||
throw new FormatException($"Invalid resolution format: '{resolution}'");
|
||||
}
|
||||
|
||||
int width = int.Parse(match.Groups[1].Value);
|
||||
int height = int.Parse(match.Groups[2].Value);
|
||||
|
||||
return new Frame(width, height);
|
||||
}
|
||||
|
||||
///
|
||||
/// Finds nearest frame based on selected dimension
|
||||
/// <b> example: </b>
|
||||
/// <code>
|
||||
/// var input = new Frame(1500, 800);
|
||||
/// //Nearest by Width
|
||||
/// var nearestByWidth = input.FindNearest(allFrames, f => f.Width);
|
||||
/// Console.WriteLine($"Nearest by width: {nearestByWidth}"); // → 1280x720
|
||||
/// //Nearest by Height
|
||||
/// var nearestByHeight = input.FindNearest(allFrames, f => f.Height);
|
||||
/// Console.WriteLine($"Nearest by height: {nearestByHeight}"); // → 1280x720
|
||||
/// </code>
|
||||
|
||||
public Frame FindNearest(IEnumerable<Frame> candidates, Func<Frame, int> dimensionSelector)
|
||||
{
|
||||
int target = dimensionSelector(this);
|
||||
return candidates
|
||||
.OrderBy(f => Math.Abs(dimensionSelector(f) - target))
|
||||
.ThenBy(dimensionSelector) // tie-breaker: prefer smaller
|
||||
.FirstOrDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace TBF.Rig.Network.Camera.RoiForFixedStartCJMS11.common
|
||||
{
|
||||
public class ResolutionFrames : List<Frame>
|
||||
{
|
||||
|
||||
public ResolutionFrames(IEnumerable<Frame> collection) : base(collection)
|
||||
{
|
||||
}
|
||||
|
||||
public static readonly IReadOnlyList<Frame> CommonResolutions = new List<Frame>
|
||||
{
|
||||
new Frame(320, 240),
|
||||
new Frame(352, 288),
|
||||
new Frame(640, 480), // standard frame
|
||||
new Frame(720, 480),
|
||||
new Frame(1280, 720),
|
||||
new Frame(1920, 1080),
|
||||
new Frame(2560, 1440),
|
||||
new Frame(3840, 2160),
|
||||
new Frame(4096, 2160)
|
||||
}.AsReadOnly();
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using Common;
|
||||
|
||||
namespace TBF.Rig.Network.Camera.common
|
||||
{
|
||||
public class ImageUtils
|
||||
{
|
||||
|
||||
public static void Rotate(Image image, ImageRotation direction)
|
||||
{
|
||||
if(!(direction == ImageRotation.Deg90 || direction == ImageRotation.Deg180 || direction == ImageRotation.Deg270))
|
||||
return;
|
||||
if (image == null)
|
||||
throw new ArgumentNullException(nameof(image));
|
||||
|
||||
RotateFlipType flipType =
|
||||
direction == ImageRotation.Deg90 ? RotateFlipType.Rotate90FlipNone :
|
||||
direction == ImageRotation.Deg180 ? RotateFlipType.Rotate180FlipNone :
|
||||
direction == ImageRotation.Deg270 ? RotateFlipType.Rotate270FlipNone :
|
||||
RotateFlipType.RotateNoneFlipNone;
|
||||
|
||||
|
||||
image.RotateFlip(flipType);
|
||||
}
|
||||
public static Image RotateCustom(Image image, ImageRotation direction)
|
||||
{
|
||||
if (image == null)
|
||||
throw new ArgumentNullException(nameof(image));
|
||||
|
||||
int newWidth = image.Width;
|
||||
int newHeight = image.Height;
|
||||
|
||||
RotateFlipType flipType;
|
||||
|
||||
switch (direction)
|
||||
{
|
||||
case ImageRotation.Deg90:
|
||||
flipType = RotateFlipType.Rotate90FlipNone;
|
||||
newWidth = image.Height;
|
||||
newHeight = image.Width;
|
||||
break;
|
||||
case ImageRotation.Deg180:
|
||||
flipType = RotateFlipType.Rotate180FlipNone;
|
||||
break;
|
||||
case ImageRotation.Deg270:
|
||||
flipType = RotateFlipType.Rotate270FlipNone;
|
||||
newWidth = image.Height;
|
||||
newHeight = image.Width;
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentException("Unsupported rotation direction");
|
||||
}
|
||||
|
||||
Bitmap rotated = new Bitmap(newWidth, newHeight);
|
||||
using (Graphics g = Graphics.FromImage(rotated))
|
||||
{
|
||||
g.TranslateTransform(newWidth / 2f, newHeight / 2f);
|
||||
g.RotateTransform(
|
||||
direction == ImageRotation.Deg90 ? 90 :
|
||||
direction == ImageRotation.Deg180 ? 180 :
|
||||
direction == ImageRotation.Deg270 ? 270 :
|
||||
0);
|
||||
g.TranslateTransform(-image.Width / 2f, -image.Height / 2f);
|
||||
g.DrawImage(image, new PointF(0, 0));
|
||||
}
|
||||
|
||||
return rotated;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using TBF.Rig.Network.Camera.CJMS11;
|
||||
|
||||
namespace TBF.Rig.Network.Telnet
|
||||
{
|
||||
@@ -63,34 +61,6 @@ namespace TBF.Rig.Network.Telnet
|
||||
Response = text;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Type of argument of PromptReceviedEventHandler
|
||||
/// </summary>
|
||||
public class PromptReceivedJMSEventArgs : EventArgs
|
||||
{
|
||||
public string Response; /// Response to a command from the telnet server ...
|
||||
/// ... without the terminal prompt string.
|
||||
public JmsMessage Message; /// Message received from the server.
|
||||
|
||||
public PromptReceivedJMSEventArgs(string text, JmsMessage message)
|
||||
{
|
||||
Response = text;
|
||||
Message = message;
|
||||
}
|
||||
}
|
||||
|
||||
public class PromptReceivedImageEventArgs : EventArgs
|
||||
{
|
||||
public Image image; /// server image.
|
||||
public int idxCamera; /// camera index.
|
||||
|
||||
public PromptReceivedImageEventArgs(int idxCamera, Image image)
|
||||
{
|
||||
this.image = image;
|
||||
this.idxCamera = idxCamera;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,8 @@ namespace TBF.Rig
|
||||
public string Selector;
|
||||
public IFlowMeter FlowMeter;
|
||||
public IRegValve RegValve;
|
||||
public float PidCoef;
|
||||
public int RegulMinStep;
|
||||
public float PidCoef;
|
||||
public IDiverter Diverter;
|
||||
public ITempMeter TempMtrDiv;
|
||||
public IScaleOrTank Scale;
|
||||
@@ -39,7 +40,7 @@ namespace TBF.Rig
|
||||
RegVPositions = new List<RegValvePosition>();
|
||||
ValvesOpen = new List<IValve>();
|
||||
ValvesClose = new List<IValve>();
|
||||
}
|
||||
}
|
||||
|
||||
/// Constructor from data entity
|
||||
public OutputPath(Config.Entities.OutputPath entity, IList<Rig.Generic.IComponent> components)
|
||||
@@ -50,7 +51,8 @@ namespace TBF.Rig
|
||||
Selector = entity.Selector;
|
||||
FlowMeter = TbfComponents.FindComponent(entity.FlowMeter, components) as IFlowMeter;
|
||||
RegValve = TbfComponents.FindComponent(entity.RegValve, components) as IRegValve;
|
||||
PidCoef = entity.PidCoef;
|
||||
RegulMinStep = entity.RegulMinStep;
|
||||
PidCoef = entity.PidCoef;
|
||||
Diverter = TbfComponents.FindComponent(entity.Diverter, components) as IDiverter;
|
||||
TempMtrDiv = TbfComponents.FindComponent(entity.TempMtrDiv, components) as ITempMeter;
|
||||
Scale = TbfComponents.FindComponent(entity.Scale, components) as IScaleOrTank;
|
||||
|
||||
@@ -18,6 +18,8 @@ using TBF.Rig.Network.RestAPI;
|
||||
using TBF.Rig.Network.RestAPI.facade;
|
||||
using TBF.Rig.Output.Printers.GroupPrinting.Single;
|
||||
using TBF.UiBridge;
|
||||
using SharedComponents;
|
||||
using System.Text;
|
||||
|
||||
namespace TBF.Rig.Sequences
|
||||
{
|
||||
@@ -33,6 +35,7 @@ namespace TBF.Rig.Sequences
|
||||
|
||||
int simultWithPurgingCount;
|
||||
Generic.IComponentCfg simultWithPurgingCfg;
|
||||
Generic.IComponent simultWithPurging;
|
||||
Generic.IProcedureParams simultWithPurgingProcParams;
|
||||
IList<Config.Entities.Test> simultWithPurgingTests;
|
||||
IList<Generic.ITestParams> simultWithPurgingTestParams;
|
||||
@@ -44,10 +47,10 @@ namespace TBF.Rig.Sequences
|
||||
IList<Generic.ITestParams> simultWithEvacuationTestParams;
|
||||
|
||||
System.Windows.Forms.Form modelessDlg;
|
||||
///
|
||||
delegate void CommunicationFormDlgt(MainSeq myRef, Generic.IComponentCfg cfg, Generic.IProcedureParams procParams, IList<Test> tests, IList<Generic.ITestParams> multiTestParams);
|
||||
///
|
||||
void OpenIPerlCommForm(MainSeq myRef, Generic.IComponentCfg cfg, Generic.IProcedureParams procParams, IList<Test> tests, IList<Generic.ITestParams> multiTestParams)
|
||||
delegate void CommunicationFormDlgt(MainSeq myRef, Generic.IComponent testMethod, Generic.IComponentCfg cfg, Generic.IProcedureParams procParams, IList<Test> tests, IList<Generic.ITestParams> multiTestParams);
|
||||
///
|
||||
void OpenIPerlCommForm(MainSeq myRef, Generic.IComponent testMethod, Generic.IComponentCfg cfg, Generic.IProcedureParams procParams, IList<Test> tests, IList<Generic.ITestParams> multiTestParams)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -60,9 +63,13 @@ namespace TBF.Rig.Sequences
|
||||
IList<TestMethods.iPerlCommunication.iPerlCommunicationParams> iPerlCommParams = new List<TestMethods.iPerlCommunication.iPerlCommunicationParams>();
|
||||
foreach (var tp in multiTestParams) iPerlCommParams.Add(tp as TestMethods.iPerlCommunication.iPerlCommunicationParams);
|
||||
|
||||
myRef.modelessDlg = new TestMethods.iPerlCommunication.iPerlCommunicationForm(iPerlCfg, tests, iPerlCommParams);
|
||||
myRef.modelessDlg.Show();
|
||||
}
|
||||
/*myRef.modelessDlg = new TestMethods.iPerlCommunication.iPerlCommunicationForm(iPerlCfg, tests, iPerlCommParams);
|
||||
myRef.modelessDlg.Show();*/
|
||||
|
||||
myRef.modelessDlg = new TestMethods.iPerlCommunication.iPerlCommunicationForm(
|
||||
testMethod as TBF.Rig.TestMethods.iPerlCommunication.TestMethod, tests, iPerlCommParams);
|
||||
myRef.modelessDlg.Show();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
log.FatalFormat("---------------( MainSeq : OpenIperlCommForm crashed !!! )---------------");
|
||||
@@ -76,7 +83,7 @@ namespace TBF.Rig.Sequences
|
||||
}
|
||||
}
|
||||
///
|
||||
void OpenS640CommForm(MainSeq myRef, Generic.IComponentCfg cfg, Generic.IProcedureParams procParams, IList<Test> tests, IList<Generic.ITestParams> multiTestParams)
|
||||
void OpenS640CommForm(MainSeq myRef, Generic.IComponent testMethod, Generic.IComponentCfg cfg, Generic.IProcedureParams procParams, IList<Test> tests, IList<Generic.ITestParams> multiTestParams)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1494,13 +1501,45 @@ namespace TBF.Rig.Sequences
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
/*catch (Exception exc)
|
||||
{
|
||||
string msg = string.Format("Unable to update Batch.RsltsSent in local MySQL DB, BatchNr = {0}",
|
||||
ProcessData.BatchRslts.Batch.BatchNr);
|
||||
Bridge.OnError(this, msg);
|
||||
log.FatalFormat("{0}: {1}", msg, exc.Message);
|
||||
goto error;
|
||||
}*/
|
||||
catch (Exception exc)
|
||||
{
|
||||
var batch = ProcessData.BatchRslts.Batch;
|
||||
|
||||
// ⚠️ Skladanie detailného logu do jedného reťazca
|
||||
var logBuilder = new StringBuilder();
|
||||
logBuilder.AppendLine("----------------- Unable to update Batch.RsltsSent in local MySQL DB, BatchNr = {0} ------------------");
|
||||
logBuilder.AppendLine("❌ Chyba pri UPDATE `batch` SET `RsltsSent` = '1'");
|
||||
logBuilder.AppendLine($"BatchNr = {batch.BatchNr}");
|
||||
logBuilder.AppendLine($"SQL príkaz: UPDATE `batch` SET `RsltsSent` = '1' WHERE `batch`.`BatchNr` = {batch.BatchNr};");
|
||||
logBuilder.AppendLine();
|
||||
logBuilder.AppendLine("💥 Výnimka:");
|
||||
logBuilder.AppendLine($" - Message: {exc.Message}");
|
||||
logBuilder.AppendLine($" - StackTrace: {exc.StackTrace}");
|
||||
logBuilder.AppendLine($" - InnerException: {(exc.InnerException != null ? exc.InnerException.Message : "null")}");
|
||||
logBuilder.AppendLine();
|
||||
logBuilder.AppendLine("📦 Batch obsah:");
|
||||
|
||||
// 💡 Dynamický výpis vlastností objektu Batch
|
||||
var props = batch.GetType().GetProperties();
|
||||
foreach (var prop in props)
|
||||
{
|
||||
object value = prop.GetValue(batch, null);
|
||||
logBuilder.AppendLine($" - {prop.Name}: {value}");
|
||||
}
|
||||
|
||||
// ✍️ Uloženie do vlastného logu
|
||||
LiveLogCache.Instance.AddLog(logBuilder.ToString());
|
||||
|
||||
Bridge.OnError(this, "Chyba pri aktualizácii výsledkov v MySQL.");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace TBF.Rig.Sequences
|
||||
public static IErrorFlags ErrorFlagsComp;
|
||||
public static IStatisticsMonitoring StatisticsMonitoringComp;
|
||||
public static Output.DB.SensusOracle.Database OracleDB;
|
||||
public static Output.DB.SensusOracle.OrderDetails OrderDetails;
|
||||
public static Output.DB.ProductionTracing.Tracing TracingDB;
|
||||
|
||||
///
|
||||
@@ -528,18 +529,22 @@ namespace TBF.Rig.Sequences
|
||||
StateMachine.ControlBoardMain.TestTime.ToString("F3"),/// test time in s
|
||||
StateMachine.ControlBoardMain.RefPulses, /// reference flow meter pulses count
|
||||
outPath.FlowMeter != null ? Formulas.VolumeFromPulses(StateMachine.ControlBoardMain.RefPulses, 1 / outPath.FlowMeter.LtrPerPulse).ToString("F3") : "0.000", /// volume in l
|
||||
benchPath.TempMtrUp != null ? benchPath.TempMtrUp.ReadTemperature() : 0, /// temp. at the beginning of line in degree C
|
||||
benchPath.TempMtrUp != null ? benchPath.TempMtrUp.ReadTemperature() : 0, /// temp. at the beginning of line in degree C
|
||||
benchPath.TempMtrDown != null ? benchPath.TempMtrDown.ReadTemperature() : 0, /// temp. at the end of line in degree C
|
||||
outPath.TempMtrDiv != null ? outPath.TempMtrDiv.ReadTemperature() : 0, /// temp. at the diverter in degree C
|
||||
PressUp, /// water pressure at the beginning of test line in bar (= 100 kPa)
|
||||
PressDown, /// water pressure at the end of test line in bar (= 100 kPa)
|
||||
PressDelta,
|
||||
outPath.TempMtrDiv != null ? outPath.TempMtrDiv.ReadTemperature() : 0, /// temp. at the diverter in degree C
|
||||
//---new2
|
||||
PressUp.ToString(), /// water pressure at the beginning of test line in bar (= 100 kPa)
|
||||
PressDown.ToString(), /// water pressure at the end of test line in bar (= 100 kPa)
|
||||
PressDelta.ToString(),
|
||||
//---endnew2
|
||||
(outPath.Scale is IScale) ? (outPath.Scale as IScale).Mass : 0, /// collected water mass in kg
|
||||
"VolMM",
|
||||
AmbTemp, /// ambient temperature in degree C
|
||||
AmbHumi, /// ambient humidity in R%
|
||||
AmbPress, /// ambient pressure in mbar (= 1 hPa)
|
||||
outPath.RegValve?.Position.ToString("F1")); /// regulation valve position in % (0=closed / 100=open)
|
||||
//---new2
|
||||
AmbTemp.ToString(), /// ambient temperature in degree C
|
||||
AmbHumi.ToString(), /// ambient humidity in R%
|
||||
AmbPress.ToString(), /// ambient pressure in mbar (= 1 hPa)
|
||||
//---endnew2
|
||||
outPath.RegValve.Position.ToString("F1")); /// regulation valve position in % (0=closed / 100=open)
|
||||
}
|
||||
|
||||
public void LogProcessDataHeaderHeatMeters(ILog logger, string sectionName)
|
||||
@@ -561,19 +566,25 @@ namespace TBF.Rig.Sequences
|
||||
benchPath.TempMtrUp != null ? benchPath.TempMtrUp.ReadTemperature() : 0, /// temp. at the beginning of line in degree C
|
||||
benchPath.TempMtrDown != null ? benchPath.TempMtrDown.ReadTemperature() : 0, /// temp. at the end of test in degree C
|
||||
outPath.TempMtrDiv != null ? outPath.TempMtrDiv.ReadTemperature() : 0, /// temp. at the diverter in degree C
|
||||
PressUp,
|
||||
PressDown,
|
||||
PressDelta,
|
||||
//---new2
|
||||
PressUp.ToString(),
|
||||
PressDown.ToString(),
|
||||
PressDelta.ToString(),
|
||||
//---endnew2
|
||||
(outPath.Scale is IScale) ? (outPath.Scale as IScale).Mass : 0, /// collected water mass in kg
|
||||
"VolMM",
|
||||
AmbTemp,
|
||||
AmbHumi,
|
||||
AmbPress,
|
||||
//---new2
|
||||
AmbTemp.ToString(),
|
||||
AmbHumi.ToString(),
|
||||
AmbPress.ToString(),
|
||||
//---endnew2
|
||||
outPath.RegValve.Position.ToString("F1"),
|
||||
TempRefHi1,
|
||||
TempRefHi2,
|
||||
TempRefLo1,
|
||||
TempRefLo2);
|
||||
//---new2
|
||||
TempRefHi1.ToString(),
|
||||
TempRefHi2.ToString(),
|
||||
TempRefLo1.ToString(),
|
||||
TempRefLo2.ToString());
|
||||
//---endnew2
|
||||
}
|
||||
|
||||
///
|
||||
|
||||
@@ -1505,25 +1505,23 @@ namespace TBF.Rig.Sequences
|
||||
tstRslt.DensityLine = Formulas.RealDensity();
|
||||
tstRslt.DensityDiv = Formulas.RealDensity();
|
||||
|
||||
double flowMeterLtrPerPulse = outPath.FlowMeter?.LtrPerPulse ?? 1;
|
||||
|
||||
tstRslt.MethodClass = TbfComponents.FindComponent(test.Method).ClassName;
|
||||
tstRslt.StartTime = DateTime.Now;
|
||||
tstRslt.EndTime = DateTime.Now + new TimeSpan(0, 0, 1);
|
||||
tstRslt.FlowSetTime = 10;
|
||||
tstRslt.TestTime = tstRslt.TargetTime();
|
||||
tstRslt.PulsesMaster = (flowMeterLtrPerPulse > 1E-6) ? (1.0075 * tstRslt.TargetVolume() / flowMeterLtrPerPulse) : 1;
|
||||
tstRslt.PulsesMaster = (outPath.FlowMeter.LtrPerPulse > 1E-6) ? (1.0075 * tstRslt.TargetVolume() / outPath.FlowMeter.LtrPerPulse) : 1;
|
||||
tstRslt.MassStartRaw = 0;
|
||||
tstRslt.MassStart = MeasurementCorrection.CorrectedValue(tstRslt.MassStartRaw, outPath.Scale.Corrections);
|
||||
tstRslt.MassEndRaw = tstRslt.TargetVolume() * Formulas.RealDensity() / 1000.0f;
|
||||
tstRslt.MassEnd = MeasurementCorrection.CorrectedValue(tstRslt.MassEndRaw, outPath.Scale.Corrections);
|
||||
tstRslt.Flow = 3.6 * flowMeterLtrPerPulse * tstRslt.PulsesMaster / tstRslt.TestTime;
|
||||
tstRslt.Flow = 3.6 * outPath.FlowMeter.LtrPerPulse * tstRslt.PulsesMaster / tstRslt.TestTime;
|
||||
tstRslt.MassOfEvapWater = 0;
|
||||
tstRslt.VolumeCTV = 1000 * tstRslt.Batch.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.DensityLine; /// [l] commercially true volume
|
||||
tstRslt.VolumeMaster = flowMeterLtrPerPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
|
||||
tstRslt.ConstMasterRaw = flowMeterLtrPerPulse; /// Uncorrected master flowmeter coefficient
|
||||
tstRslt.ConstMasterCorr = outPath.FlowMeter?.LtrPerPulseCorrected(tstRslt.Flow, tstRslt.TempDownMean) ?? 1; /// Corrected master pulses per liter
|
||||
tstRslt.ConstMaster = (tstRslt.VolumeMaster == 0) ? tstRslt.ConstMasterCorr : (flowMeterLtrPerPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster);
|
||||
tstRslt.VolumeMaster = outPath.FlowMeter.LtrPerPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
|
||||
tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient
|
||||
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.Flow, tstRslt.TempDownMean); /// Corrected master pulses per liter
|
||||
tstRslt.ConstMaster = (tstRslt.VolumeMaster == 0) ? tstRslt.ConstMasterCorr : (outPath.FlowMeter.LtrPerPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster);
|
||||
|
||||
tstRslt.ErrorMaster = Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV);
|
||||
|
||||
|
||||
@@ -76,14 +76,11 @@ namespace TBF.Rig
|
||||
new Modbus.WaterAnalyzer.Factory(),
|
||||
new Network.Adapter.Factory(),
|
||||
new Network.AdapterFTP.Factory(),
|
||||
new Network.AdapterJMS.Factory(),
|
||||
new Network.Camera.CJMS11.Factory(),
|
||||
new Network.Camera.CLP1611.Factory(),
|
||||
new Network.Camera.KeyenceIV3G120.Factory(),
|
||||
new Network.Camera.Display.Factory(),
|
||||
new Network.Camera.Roi.Factory(),
|
||||
new Network.Camera.RoiForFixedStart.Factory(),
|
||||
new Network.Camera.RoiForFixedStartCJMS11.Factory(),
|
||||
new Network.Camera.RoiForFixedStartKeyence.Factory(),
|
||||
new Network.Comet.Ambient.Factory(),
|
||||
new Network.RestAPI.Factory(),
|
||||
@@ -136,6 +133,7 @@ namespace TBF.Rig
|
||||
new RegisterReaders.KPackE.Radio.Factory(), /// Radio for KPackE register readers
|
||||
new Uni.RegValve.Factory(),
|
||||
new Uni.RegValveAnalog.Factory(),
|
||||
new Uni.RegValveLowRegulTimeSaturation.Factory(),
|
||||
new Scales.MettlerToledo.Factory(),
|
||||
new TestMethods.Adjustment.Factory(),
|
||||
new TestMethods.ChangeFlowDirection.Factory(),
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace TBF.Rig.TestMethods.Endurance
|
||||
|
||||
/// Auxiliary public lists used also by user controls in tab pages
|
||||
public IList<Rig.Generic.IComponent> TbfComponents;
|
||||
public IList<IValve> Valves;
|
||||
public IList<Rig.BuiltIn.Valve.Valve> Valves = new List<Rig.BuiltIn.Valve.Valve>();
|
||||
|
||||
|
||||
ITabWithListViewEx seqStepsCtrl;
|
||||
@@ -39,8 +39,9 @@ namespace TBF.Rig.TestMethods.Endurance
|
||||
EnduranceCycle = new List<CycleStep>();
|
||||
}
|
||||
|
||||
public CycleDlg(IList<CycleStep> cycle)
|
||||
public CycleDlg(IList<CycleStep> cycle, IList<Rig.BuiltIn.Valve.Valve> valves)
|
||||
{
|
||||
this.Valves = valves;
|
||||
/// Detect display setting: 100% = 96dpi, 125% = 120dpi, 150% = 144dpi.
|
||||
Dpi = (int)this.CreateGraphics().DpiX;
|
||||
|
||||
@@ -64,25 +65,9 @@ namespace TBF.Rig.TestMethods.Endurance
|
||||
seqStepsCtrl = new CycleStepsCtrl() as ITabWithListViewEx;
|
||||
|
||||
/// Prepare a list of valves for the endurance test
|
||||
/// ... list is set by user
|
||||
|
||||
/// Load the list of components from the database
|
||||
NHibernate.ISession session = TBF.DB.CreateSession(DBKind.Config);
|
||||
var cmptnEntities = session.QueryOver<Config.Entities.Component>().OrderBy(x => x.ItemNr).Asc .List();
|
||||
TbfComponents = TBF.Rig.TbfComponents.LoadComponentsFromDB(cmptnEntities);
|
||||
Valves = new List<IValve>();
|
||||
for (int bitNr = 0; bitNr < 8; bitNr++)
|
||||
{
|
||||
foreach (var vlv in TbfComponents)
|
||||
{
|
||||
if (vlv is TBF.Rig.BuiltIn.Valve.Valve && (vlv as TBF.Rig.BuiltIn.Valve.Valve).BitPosition == bitNr)
|
||||
{
|
||||
Valves.Add(vlv as IValve);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EnduranceCycle = (cycle != null) ? cycle : new List<CycleStep>(); /// TODO: Load from component parameters
|
||||
EnduranceCycle = (cycle != null) ? cycle : new List<CycleStep>(); /// TODO: Load from component parameters
|
||||
|
||||
/// Create a tab with sequence steps for each sequence ordered by ItemNr.
|
||||
AddCycleStepsTab(EnduranceCycle);
|
||||
|
||||
@@ -2,17 +2,28 @@
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.VisualStyles;
|
||||
using TBF.Resources;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Rig.GenericDevices;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Resources;
|
||||
|
||||
using System.Linq;
|
||||
using TBF.Rig.Sequences;
|
||||
|
||||
using NHibernate;
|
||||
using log4net;
|
||||
|
||||
namespace TBF.Rig.TestMethods.Endurance
|
||||
{
|
||||
public partial class TestMethodCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
public bool ShowMore { get { return false; } }
|
||||
IList<Rig.BuiltIn.Valve.Valve> valvesFromDB = new List<Rig.BuiltIn.Valve.Valve>();
|
||||
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
string cycle;
|
||||
|
||||
@@ -30,7 +41,9 @@ namespace TBF.Rig.TestMethods.Endurance
|
||||
public TestMethodCfgCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
valvesFromDB = LoadValvesFromDB();
|
||||
CreateValveRows(valvesFromDB.Count, valvesFromDB); // toľko riadkov, koľko ventilov
|
||||
}
|
||||
|
||||
private void EntryFormCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
@@ -76,11 +89,109 @@ namespace TBF.Rig.TestMethods.Endurance
|
||||
|
||||
private void enduranceCycleButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
CycleDlg dlg = new CycleDlg(CycleStep.StringToCycle(cycle));
|
||||
CycleDlg dlg = new CycleDlg(CycleStep.StringToCycle(cycle), GetSelectedValves());
|
||||
if (dlg.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
cycle = CycleStep.CycleToString(dlg.EnduranceCycle);
|
||||
}
|
||||
}
|
||||
}
|
||||
private void CreateValveRows(int numberOfRows, IList<Rig.BuiltIn.Valve.Valve> valves)
|
||||
{
|
||||
tableLayoutPanel1.RowCount = numberOfRows;
|
||||
tableLayoutPanel1.ColumnCount = 2;
|
||||
|
||||
tableLayoutPanel1.Controls.Clear();
|
||||
tableLayoutPanel1.ColumnStyles.Clear();
|
||||
tableLayoutPanel1.RowStyles.Clear();
|
||||
|
||||
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.AutoSize));
|
||||
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100));
|
||||
|
||||
for (int i = 0; i < numberOfRows; i++)
|
||||
{
|
||||
tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.AutoSize));
|
||||
|
||||
var label = new Label
|
||||
{
|
||||
Text = $"Valve {i + 1}",
|
||||
Anchor = AnchorStyles.Left,
|
||||
AutoSize = true,
|
||||
Margin = new Padding(5)
|
||||
};
|
||||
|
||||
var comboBox = new ComboBox
|
||||
{
|
||||
DropDownStyle = ComboBoxStyle.DropDownList,
|
||||
Anchor = AnchorStyles.Left | AnchorStyles.Right,
|
||||
Dock = DockStyle.Fill,
|
||||
Margin = new Padding(5),
|
||||
Name = $"comboValve{i + 1}",
|
||||
DisplayMember = "Name" // zobrazenie názvu ventilu
|
||||
};
|
||||
|
||||
comboBox.Items.Add("None");
|
||||
|
||||
foreach (var valve in valves)
|
||||
{
|
||||
comboBox.Items.Add(valve.Name/* + " (bit nr = " + valve.BitPosition + ")"*/);
|
||||
}
|
||||
|
||||
comboBox.SelectedIndex = 0;
|
||||
|
||||
tableLayoutPanel1.Controls.Add(label, 0, i);
|
||||
tableLayoutPanel1.Controls.Add(comboBox, 1, i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private IList<Rig.BuiltIn.Valve.Valve> LoadValvesFromDB()
|
||||
{
|
||||
/// Load the list of components from the database
|
||||
IList<Rig.BuiltIn.Valve.Valve> valves = new List<Rig.BuiltIn.Valve.Valve>();
|
||||
|
||||
using (NHibernate.ISession session = TBF.DB.CreateSession(DBKind.Config))
|
||||
{
|
||||
IList<IComponent> TbfComponents = Rig.TbfComponents.LoadComponentsFromDB(session);
|
||||
valves = getAllValves(TbfComponents);
|
||||
|
||||
}
|
||||
/// Find all master valvesFromDB
|
||||
return valves;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Process the list of components and return all valvesFromDB (masters and coupled)
|
||||
/// </summary>
|
||||
public static IList<Rig.BuiltIn.Valve.Valve> getAllValves(IList<Generic.IComponent> cmpnts)
|
||||
{
|
||||
IList<Rig.BuiltIn.Valve.Valve> result = new List<Rig.BuiltIn.Valve.Valve>();
|
||||
foreach (var cmpnt in cmpnts) if (cmpnt is Rig.BuiltIn.Valve.Valve) result.Add(cmpnt as Rig.BuiltIn.Valve.Valve);
|
||||
return result;
|
||||
}
|
||||
|
||||
private List<Rig.BuiltIn.Valve.Valve> GetSelectedValves()
|
||||
{
|
||||
var selectedValves = new List<Rig.BuiltIn.Valve.Valve>();
|
||||
|
||||
foreach (Control control in tableLayoutPanel1.Controls)
|
||||
{
|
||||
if (control is ComboBox comboBox)
|
||||
{
|
||||
var selectedName = comboBox.SelectedItem?.ToString();
|
||||
|
||||
if (!string.IsNullOrEmpty(selectedName) && selectedName != "None")
|
||||
{
|
||||
// Nájdeme ventil podľa mena v zozname všetkých
|
||||
var valve = valvesFromDB.FirstOrDefault(v => v.Name == selectedName);
|
||||
if (valve != null)
|
||||
{
|
||||
selectedValves.Add(valve);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return selectedValves;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+81
-57
@@ -31,62 +31,85 @@ namespace TBF.Rig.TestMethods.Endurance
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.enduranceCycleButton = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(137, 57);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.nameTextBox.TabIndex = 5;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(27, 60);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 4;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(134, 33);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.classNameLabel.TabIndex = 3;
|
||||
this.classNameLabel.Text = "ComonentName";
|
||||
//
|
||||
// enduranceCycleButton
|
||||
//
|
||||
this.enduranceCycleButton.Enabled = false;
|
||||
this.enduranceCycleButton.Location = new System.Drawing.Point(137, 83);
|
||||
this.enduranceCycleButton.Name = "enduranceCycleButton";
|
||||
this.enduranceCycleButton.Size = new System.Drawing.Size(130, 31);
|
||||
this.enduranceCycleButton.TabIndex = 6;
|
||||
this.enduranceCycleButton.Text = "Endurance cycle";
|
||||
this.enduranceCycleButton.UseVisualStyleBackColor = true;
|
||||
this.enduranceCycleButton.Click += new System.EventHandler(this.enduranceCycleButton_Click);
|
||||
//
|
||||
// TestMethodCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.enduranceCycleButton);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Name = "TestMethodCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 200);
|
||||
this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
this.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.enduranceCycleButton = new System.Windows.Forms.Button();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(137, 57);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.nameTextBox.TabIndex = 5;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(27, 60);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 4;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(134, 33);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.classNameLabel.TabIndex = 3;
|
||||
this.classNameLabel.Text = "ComonentName";
|
||||
//
|
||||
// enduranceCycleButton
|
||||
//
|
||||
this.enduranceCycleButton.Enabled = false;
|
||||
this.enduranceCycleButton.Location = new System.Drawing.Point(137, 83);
|
||||
this.enduranceCycleButton.Name = "enduranceCycleButton";
|
||||
this.enduranceCycleButton.Size = new System.Drawing.Size(130, 31);
|
||||
this.enduranceCycleButton.TabIndex = 6;
|
||||
this.enduranceCycleButton.Text = "Endurance cycle";
|
||||
this.enduranceCycleButton.UseVisualStyleBackColor = true;
|
||||
this.enduranceCycleButton.Click += new System.EventHandler(this.enduranceCycleButton_Click);
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.AutoSize = true;
|
||||
this.tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.tableLayoutPanel1.ColumnCount = 2;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 37.5F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 62.5F));
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(30, 120);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 8;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(0, 120);
|
||||
this.tableLayoutPanel1.TabIndex = 8;
|
||||
//
|
||||
// TestMethodCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.Controls.Add(this.enduranceCycleButton);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Name = "TestMethodCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 502);
|
||||
this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
@@ -96,5 +119,6 @@ namespace TBF.Rig.TestMethods.Endurance
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
private System.Windows.Forms.Button enduranceCycleButton;
|
||||
}
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollection
|
||||
///
|
||||
State.Create(string.Format("{0}({1}) : Starting pump {2}", test.Method, test.Name, (inPath.Pump != null) ? inPath.Pump.Name : "?"))
|
||||
.AddOperation(checkUiOp)
|
||||
// .AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60))
|
||||
// .AddOperation(new Operations.SetAllRegulValvesOp(inPath.RegulValves, inPath.RegulValvesPct, 60))
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(heatMetersPromptOp)
|
||||
.AddOperation(inPath.Pump != null ? cBrd.SetValvesOp(inPath.Pump, null) : null)
|
||||
|
||||
@@ -123,11 +123,6 @@ namespace TBF.Rig.TestMethods.LeakTest
|
||||
Bridge.OnActivity(this, Strings.Setting_the_water_pressure);
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Progress.FlowSetting));
|
||||
//------------------------------------------------
|
||||
|
||||
//TODO BUMI - check this possition for sstart logging - when finish remove this comment
|
||||
//--- log start process in this section
|
||||
LogProcessDataTestInfo(processDataLogger, test.Procedure.Name, test.Name);
|
||||
|
||||
|
||||
float pumpPower = test.PumpPower;
|
||||
int startTime = StateMachine.Time;
|
||||
@@ -219,14 +214,10 @@ namespace TBF.Rig.TestMethods.LeakTest
|
||||
Bridge.OnActivity(this, Strings.Test_in_progress);
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Progress.Test));
|
||||
//------------------------------------------------
|
||||
|
||||
LogProcessDataHeader(processDataLogger, "Maximum water pressure set");
|
||||
|
||||
State.Create(string.Format("{0}({1}) : Maximum water pressure set", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(new Operations.TimerOp(testParams.DurationPMax))
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
@@ -255,14 +246,10 @@ namespace TBF.Rig.TestMethods.LeakTest
|
||||
//-----------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Measuring_the_weight);
|
||||
//-----------------------------------------------------
|
||||
|
||||
LogProcessDataHeader(processDataLogger, "Measuring the start mass");
|
||||
|
||||
State.Create(string.Format("{0}({1}) : Measuring the start mass", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(scale.ReadStableMassOp(ref StartMass, test.TimeFlow2Mass, test.MassMethod, test.MassRepeats, test.MassSpread))
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
@@ -288,14 +275,10 @@ namespace TBF.Rig.TestMethods.LeakTest
|
||||
///------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Test_in_progress);
|
||||
///------------------------------------------------
|
||||
|
||||
LogProcessDataHeader(processDataLogger, "Starting the test");
|
||||
|
||||
State.Create(string.Format("{0}({1}) : Starting the test", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(new Operations.TimerOp(testParams.DurationLeak))
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
@@ -322,14 +305,10 @@ namespace TBF.Rig.TestMethods.LeakTest
|
||||
//-----------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Measuring_the_weight);
|
||||
//-----------------------------------------------------
|
||||
|
||||
LogProcessDataHeader(processDataLogger, " Measuring the end mass");
|
||||
|
||||
State.Create(string.Format("{0}({1}) : Measuring the end mass", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(scale.ReadStableMassOp(ref EndMass, test.TimeStop2Mass, test.MassMethod, test.MassRepeats, test.MassSpread))
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
|
||||
@@ -11,6 +11,7 @@ using TBF.Rig;
|
||||
using TBF.Boxes;
|
||||
using TBF.Resources;
|
||||
using TBF.UiBridge;
|
||||
//using AppDiagnostic;
|
||||
|
||||
namespace TBF.Rig.TestMethods.PMaxTest
|
||||
{
|
||||
@@ -110,7 +111,7 @@ namespace TBF.Rig.TestMethods.PMaxTest
|
||||
Bridge.OnActivity(this, Strings.Setting_the_water_pressure);
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Progress.FlowSetting));
|
||||
//------------------------------------------------
|
||||
|
||||
|
||||
float pumpPower = test.PumpPower;
|
||||
while (true)
|
||||
{
|
||||
@@ -174,27 +175,29 @@ namespace TBF.Rig.TestMethods.PMaxTest
|
||||
|
||||
int startTime = StateMachine.Time;
|
||||
int endTime = startTime + testParams.DurationPMax;
|
||||
|
||||
//TODO BUMI - check this possition for sstart logging - when finish remove this comment
|
||||
//--- log start process in this section
|
||||
LogProcessDataTestInfo(processDataLogger, test.Procedure.Name, test.Name);
|
||||
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Test_in_progress);
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Progress.Test));
|
||||
//------------------------------------------------
|
||||
|
||||
//TODO BUMI - check if is ok possition to start logging - at last remove comment
|
||||
//--- log start process in this section
|
||||
LogProcessDataHeader(processDataLogger, "Starting the test");
|
||||
|
||||
|
||||
|
||||
/*//---new1
|
||||
LogProcessDataTestInfo(processDataLogger, test.Procedure.Name, test.Name);
|
||||
|
||||
if (heatMetersPath == null) LogProcessDataHeader(processDataLogger, "Start mass");
|
||||
else LogProcessDataHeaderHeatMeters(processDataLogger, "Start mass");
|
||||
//---endNew1*/
|
||||
|
||||
//DiagApi.addLog();
|
||||
|
||||
State.Create(string.Format("{0}({1}) : Starting the test", test.Method, test.Name))
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(readTempPressOps)
|
||||
.AddOperation(new Operations.TimerOp(testParams.DurationPMax))
|
||||
.AddOperation(processDataLoggingOp)
|
||||
.EnterState();
|
||||
//---new1
|
||||
.AddOperation(processDataLoggingOp)
|
||||
//---endNew1
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
|
||||
@@ -210,8 +213,7 @@ namespace TBF.Rig.TestMethods.PMaxTest
|
||||
Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Test_in_progress, remainingTime));
|
||||
}
|
||||
while (e.Contains(Event.TimerBusy));
|
||||
|
||||
|
||||
|
||||
///
|
||||
/// PMaxTest completed
|
||||
///
|
||||
|
||||
@@ -513,8 +513,6 @@ namespace TBF.Rig.TestMethods.StandingStart
|
||||
(rr as Rig.Network.Camera.RoiForFixedStart.Roi).BeginWMState = dataEntryCmpnt.WMStartState(i);
|
||||
if (rr is Rig.Network.Camera.RoiForFixedStartKeyence.Roi)
|
||||
(rr as Rig.Network.Camera.RoiForFixedStartKeyence.Roi).BeginWMState = dataEntryCmpnt.WMStartState(i);
|
||||
if (rr is Rig.Network.Camera.RoiForFixedStartCJMS11.Roi)
|
||||
(rr as Rig.Network.Camera.RoiForFixedStartCJMS11.Roi).BeginWMState = dataEntryCmpnt.WMStartState(i);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -756,15 +754,6 @@ namespace TBF.Rig.TestMethods.StandingStart
|
||||
|
||||
if (rr is Rig.Network.Camera.RoiForFixedStart.Roi)
|
||||
(rr as Rig.Network.Camera.RoiForFixedStart.Roi).EndWMState = dataEntryCmpnt.WMEndState(i);
|
||||
|
||||
if (rr is Rig.Network.Camera.RoiForFixedStartKeyence.Roi)
|
||||
{
|
||||
(rr as Rig.Network.Camera.RoiForFixedStartKeyence.Roi).EndWMState =
|
||||
dataEntryCmpnt.WMEndState(i);
|
||||
log.DebugFormat(" StandingStartMassCollectionSeq.cs - EndWMState [{0}] -> RoiForFixedStartKeyence.Roi",dataEntryCmpnt.WMEndState(i));
|
||||
}
|
||||
if(rr is Rig.Network.Camera.RoiForFixedStartCJMS11.Roi)
|
||||
(rr as Rig.Network.Camera.RoiForFixedStartCJMS11.Roi).EndWMState = dataEntryCmpnt.WMEndState(i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -603,8 +603,6 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
||||
dataEntryCmpnt.WMStartState(i);
|
||||
log.DebugFormat(" StandingStartMassCollectionSeq.cs - BeginWMState [{0}] -> RoiForFixedStartKeyence.Roi",dataEntryCmpnt.WMStartState(i));
|
||||
}
|
||||
if (rr is Rig.Network.Camera.RoiForFixedStartCJMS11.Roi)
|
||||
(rr as Rig.Network.Camera.RoiForFixedStartCJMS11.Roi).BeginWMState = dataEntryCmpnt.WMStartState(i);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -938,9 +936,6 @@ namespace TBF.Rig.TestMethods.StandingStartMassCollection
|
||||
dataEntryCmpnt.WMEndState(i);
|
||||
log.DebugFormat(" StandingStartMassCollectionSeq.cs - EndWMState [{0}] -> RoiForFixedStartKeyence.Roi",dataEntryCmpnt.WMEndState(i));
|
||||
}
|
||||
if(rr is Rig.Network.Camera.RoiForFixedStartCJMS11.Roi)
|
||||
(rr as Rig.Network.Camera.RoiForFixedStartCJMS11.Roi).EndWMState = dataEntryCmpnt.WMEndState(i);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2021 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2015-2022 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.IO.Ports;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig;
|
||||
using TBF.Rig.GenericDevices;
|
||||
using TBF.Rig.Sequences;
|
||||
using TBF.UiBridge;
|
||||
|
||||
namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
{
|
||||
public class TestMethod : ComponentBase, GenericDevices.ISimultTestMethod
|
||||
public class TestMethod : ComponentBase, ISimultTestMethod, ISequenceCondition, ISessionDataMngmnt
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(TestMethod));
|
||||
protected static readonly ILog rfidDataLogger = LogManager.GetLogger("RfidData");
|
||||
@@ -22,12 +21,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
|
||||
public bool CanTest(MetersKind meters) { return meters == MetersKind.Single; }
|
||||
public bool DoTransitions() { return false; }
|
||||
public bool CheckDeviceCaps(Test test, OutputPath devices, out string message)
|
||||
{
|
||||
message = string.Format("{0}: CheckDeviceCaps() is not implemented yet", Name);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public bool SimultWithPrevious { get { return testMethodCfg.TestParams.SimultWithPrevious; } }
|
||||
public bool SimultWithNext { get { return testMethodCfg.TestParams.SimultWithNext; } }
|
||||
@@ -68,14 +61,32 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
|
||||
|
||||
readonly TestMethodCfg testMethodCfg;
|
||||
|
||||
public bool[] IperlCommMilestone;
|
||||
IList<IOperation> sequenceConditionOps;
|
||||
|
||||
public TestMethod() { }
|
||||
public TestMethod()
|
||||
{
|
||||
CreateMilestonesAndConditions();
|
||||
}
|
||||
|
||||
public TestMethod(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
}
|
||||
CreateMilestonesAndConditions();
|
||||
}
|
||||
|
||||
void CreateMilestonesAndConditions()
|
||||
{
|
||||
IperlCommMilestone = new bool[(int)ConditionID.Count];
|
||||
|
||||
sequenceConditionOps = new List<IOperation>();
|
||||
for (ConditionID id = ConditionID.A; id < ConditionID.Count; id++)
|
||||
{
|
||||
sequenceConditionOps.Add(new SequenceConditionOp(this, id));
|
||||
}
|
||||
}
|
||||
|
||||
/// IDevice interface - only Initialize() is used
|
||||
public override void Initialize()
|
||||
@@ -97,16 +108,60 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
{
|
||||
if (DebugLevel == DebugMode.Normal)
|
||||
{
|
||||
return (new iPerlCommunicationSeq()).Execute(test, repetNr, testMethodCfg, testMethodCfg.TestParams);
|
||||
return (new iPerlCommunicationSeq()).Execute(test, repetNr, this, testMethodCfg.TestParams);
|
||||
}
|
||||
else
|
||||
{
|
||||
/// DebugLevel == DebugMode.Simulate
|
||||
(new iPerlCommunicationSeq()).MakeSimulatedTrivial(test, repetNr, test.Part);
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Progress.Completed));
|
||||
Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name, ProcessData.BatchRslts.GetTestRslt(Results.Utils.GetTestName(test.Name, 1, 1), 0)));
|
||||
Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name, ProcessData.BatchRslts.GetTestRslt(Common.Utils.GetTestName(test.Name, 1, 1), 0)));
|
||||
return new List<Event> { Event.Done };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int ConditionsCount { get { return (int)ConditionID.Count; } }
|
||||
|
||||
public string ConditionName(int i)
|
||||
{
|
||||
return (i >= 0 && i < (int)ConditionID.Count) ? ConditionOp(i).ToString() : string.Empty;
|
||||
}
|
||||
|
||||
public IOperation ConditionOp(int i)
|
||||
{
|
||||
return (i >= 0 && i < (int)ConditionID.Count) ? sequenceConditionOps[i] : null;
|
||||
}
|
||||
|
||||
|
||||
public void StartSession()
|
||||
{
|
||||
/// Clear milestones
|
||||
if (IperlCommMilestone != null)
|
||||
{
|
||||
for (int i = 0; i < IperlCommMilestone.Length; i++)
|
||||
{
|
||||
IperlCommMilestone[i] = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SaveMark(object o)
|
||||
{
|
||||
/// No marks
|
||||
}
|
||||
|
||||
public void EndSession()
|
||||
{
|
||||
/// Nothing at the end of session
|
||||
}
|
||||
|
||||
public bool CheckDeviceCaps(Test test, OutputPath devices, out string message)
|
||||
{
|
||||
// Implement the method to satisfy the ITestMethod interface.
|
||||
// For now, provide a basic implementation.
|
||||
message = "Device capabilities check not implemented.";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
/// Copyright (c) 2015-2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using System.IO.Ports;
|
||||
using System.Threading;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
@@ -22,9 +24,20 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
public int CommTimeout; /// Communication timeout in ms (500 .. 5000)
|
||||
public int DelayBetweenRetries; /// Delay between communication retries in ms (0 .. 5000)
|
||||
public int MaxCommRetries; /// Max. number of retries (1 .. 10)
|
||||
public int WaitTimeAfterFailure; /// Wait time after communication failure in ms
|
||||
public int PassThroughWaitTime; /// Pass Through wait time for radio parameters in ms
|
||||
public int NrThreads; /// Numbwr of parallel threads (1, 2 or 4)
|
||||
public int IperlCheckErrorsToStop;
|
||||
|
||||
///
|
||||
/// NFC S4.5 Combihead params
|
||||
///
|
||||
public int MciTimeoutMs;
|
||||
public int BaudRate;
|
||||
public int DataBits;
|
||||
public Parity ParityBit;
|
||||
public StopBits StopBits;
|
||||
|
||||
public int DfltQ2c_15_rl;
|
||||
public int DfltQ2c_15_lr;
|
||||
public int DfltQ2c_20_rl;
|
||||
@@ -59,10 +72,17 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
ParentName = string.Empty;
|
||||
CommTimeout = 1800; /// ms
|
||||
MaxCommRetries = 4;
|
||||
NrThreads = 2; /// 1, 2 or 4 threads
|
||||
WaitTimeAfterFailure = 2200;
|
||||
PassThroughWaitTime = 1500;
|
||||
NrThreads = 2; /// 1, 2 or 4 threads
|
||||
IperlCheckErrorsToStop = 10;
|
||||
MciTimeoutMs = 4000; // ms, NFC interface
|
||||
BaudRate = 57600; // NFC Interface
|
||||
DataBits = 8; // NFC Interface
|
||||
ParityBit = Parity.None; // NFC Interface
|
||||
StopBits = StopBits.Two; // NFC Interface
|
||||
|
||||
TestParams = CreateTestParamsProvider() as iPerlCommunicationParams;
|
||||
TestParams = CreateTestParamsProvider() as iPerlCommunicationParams;
|
||||
}
|
||||
|
||||
public TestMethodCfg(IComponentFactory factory)
|
||||
|
||||
@@ -9,7 +9,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
public class TestMethodFactory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return GetType().Namespace.Substring(8); } }
|
||||
public override string ToString() { return ClassName; }
|
||||
|
||||
public IComponent DummyComponent() { return new TestMethod(); }
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+144
-144
@@ -178,54 +178,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
this.pictureBox3 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox2 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.checkBoxImage1 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage2 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage3 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage4 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage5 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage6 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage7 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage8 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage9 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage10 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage11 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage12 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage13 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage14 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage15 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage16 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage17 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage18 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage19 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage20 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage21 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage22 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage23 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage24 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage25 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage26 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage27 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage28 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage29 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage30 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage31 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage32 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage33 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage34 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage35 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage36 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage37 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage38 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage39 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage40 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage41 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage42 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage43 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage44 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage45 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage46 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage47 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage48 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.saveButton = new System.Windows.Forms.Button();
|
||||
this.samplePictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.samplePictureBox2 = new System.Windows.Forms.PictureBox();
|
||||
@@ -233,6 +185,54 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
this.sampleLabel1 = new System.Windows.Forms.Label();
|
||||
this.sampleLabel2 = new System.Windows.Forms.Label();
|
||||
this.sampleLabel3 = new System.Windows.Forms.Label();
|
||||
this.checkBoxImage48 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage47 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage46 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage45 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage44 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage43 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage42 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage41 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage40 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage39 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage38 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage37 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage36 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage35 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage34 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage33 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage32 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage31 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage30 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage29 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage28 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage27 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage26 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage25 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage24 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage23 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage22 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage21 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage20 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage19 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage18 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage17 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage16 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage15 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage14 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage13 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage12 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage11 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage10 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage9 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage8 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage7 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage6 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage5 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage4 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage3 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage2 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
this.checkBoxImage1 = new TBF.Rig.TestMethods.iPerlCommunication.CheckBoxImage();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox48)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox47)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox46)).BeginInit();
|
||||
@@ -281,57 +281,57 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage5)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage6)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage7)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage8)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage9)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage10)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage11)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage12)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage13)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage14)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage15)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage16)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage17)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage18)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage19)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage20)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage21)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage22)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage23)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage24)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage25)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage26)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage27)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage28)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage29)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage30)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage31)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage32)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage33)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage34)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage35)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage36)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage37)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage38)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage39)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage40)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage41)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage42)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage43)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage44)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage45)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage46)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage47)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage48)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.samplePictureBox1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.samplePictureBox2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.samplePictureBox3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage48)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage47)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage46)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage45)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage44)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage43)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage42)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage41)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage40)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage39)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage38)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage37)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage36)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage35)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage34)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage33)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage32)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage31)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage30)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage29)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage28)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage27)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage26)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage25)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage24)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage23)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage22)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage21)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage20)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage19)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage18)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage17)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage16)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage15)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage14)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage13)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage12)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage11)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage10)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage9)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage8)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage7)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage6)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage5)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// wmTextBox2
|
||||
@@ -2639,57 +2639,57 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage5)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage6)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage7)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage8)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage9)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage10)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage11)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage12)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage13)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage14)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage15)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage16)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage17)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage18)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage19)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage20)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage21)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage22)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage23)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage24)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage25)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage26)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage27)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage28)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage29)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage30)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage31)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage32)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage33)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage34)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage35)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage36)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage37)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage38)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage39)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage40)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage41)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage42)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage43)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage44)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage45)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage46)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage47)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage48)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.samplePictureBox1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.samplePictureBox2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.samplePictureBox3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage48)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage47)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage46)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage45)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage44)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage43)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage42)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage41)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage40)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage39)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage38)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage37)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage36)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage35)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage34)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage33)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage32)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage31)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage30)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage29)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage28)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage27)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage26)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage25)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage24)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage23)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage22)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage21)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage20)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage19)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage18)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage17)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage16)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage15)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage14)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage13)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage12)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage11)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage10)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage9)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage8)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage7)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage6)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage5)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.checkBoxImage1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -65,6 +65,8 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionLRStr);
|
||||
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionIncl05Str);
|
||||
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionAltIncl05Str);
|
||||
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionPlusIncl05Str);
|
||||
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionPlusAltIncl05Str);
|
||||
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionGreeceIncl05Str);
|
||||
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionRLIncl05Str);
|
||||
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionLRIncl05Str);
|
||||
@@ -86,9 +88,16 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
retVal.Add(iPerlCommunicationForm.Write2HzCorrectionStr);
|
||||
retVal.Add(iPerlCommunicationForm.DewaReworkRLStr);
|
||||
retVal.Add(iPerlCommunicationForm.DewaReworkLRStr);
|
||||
retVal.Add(iPerlCommunicationForm.StartTestingSealedMetersStr);
|
||||
retVal.Add(iPerlCommunicationForm.EndTestingSealedMetersStr);
|
||||
retVal.Add(string.Format("{0} if enabled", iPerlCommunicationForm.ReadConfigurationStr));
|
||||
retVal.Add(string.Format("{0} 80", iPerlCommunicationForm.SetTestModeStr));
|
||||
retVal.Add("iPerl_check prevWorkStep direction q2factors");
|
||||
for (ConditionID id = ConditionID.A; id < ConditionID.Count; id++)
|
||||
{
|
||||
retVal.Add(string.Format(SequenceConditionOp.ConditionNameFmt, id));
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2022 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2015-2023 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -11,6 +11,9 @@ using RestClient;
|
||||
using TBF.Rig.Sequences;
|
||||
using TBF.Resources;
|
||||
using TBF.UiBridge;
|
||||
using Results;
|
||||
using Results.Entities;
|
||||
using TBF.Rig.TestMethods.iPerlCommunication.iPerlHead;
|
||||
|
||||
namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
{
|
||||
@@ -22,15 +25,16 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
public const string StrictQ2ErrorCheckStr = "Strict Q2 error check ";
|
||||
public const string Q2correctionCheckCmd = "Q2 correction check ";
|
||||
public const string IperlCheckCmd = "iPERL_check ";
|
||||
public const string SimulateCmd = "simulate ";
|
||||
|
||||
|
||||
System.Windows.Forms.Form modelessDlg;
|
||||
System.Windows.Forms.Form modelessDlg;
|
||||
///
|
||||
delegate void iPerlCommFormDlgt(iPerlCommunicationSeq myRef, TestMethodCfg cfg, Test test, iPerlCommunicationParams testParams);
|
||||
delegate void iPerlCommFormDlgt(iPerlCommunicationSeq myRef, TestMethod method, Test test, iPerlCommunicationParams testParams);
|
||||
///
|
||||
void OpenIPerlCommForm(iPerlCommunicationSeq myRef, TestMethodCfg cfg, Test test, iPerlCommunicationParams testParams)
|
||||
void OpenIPerlCommForm(iPerlCommunicationSeq myRef, TestMethod method, Test test, iPerlCommunicationParams testParams)
|
||||
{
|
||||
myRef.modelessDlg = new iPerlCommunicationForm(cfg, test, testParams);
|
||||
myRef.modelessDlg = new iPerlCommunicationForm(method, test, testParams);
|
||||
myRef.modelessDlg.Show();
|
||||
}
|
||||
|
||||
@@ -52,8 +56,10 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
/// Event.OpArgumentError . Target flow is out of range
|
||||
/// Event.Error . . . . . . Unspecified error
|
||||
/// </returns>
|
||||
public IList<Event> Execute(Test test, int repetitionNr, TestMethodCfg cfg, iPerlCommunicationParams testParams)
|
||||
public IList<Event> Execute(Test test, int repetitionNr, TestMethod method, iPerlCommunicationParams testParams)
|
||||
{
|
||||
TestMethodCfg cfg = method.Cfg as TestMethodCfg;
|
||||
|
||||
IList<Event> e; /// Events from currently running operations
|
||||
checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state
|
||||
modelessDlg = null;
|
||||
@@ -69,17 +75,16 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
|
||||
/// Get 'wmType' from IperlHead procedure parameters
|
||||
int wmType = 0;
|
||||
if (IperlHeads != null)
|
||||
#if IPERL
|
||||
/*foreach (var wm in ProcessData.BatchRslts.Batch.WaterMeters)
|
||||
{
|
||||
foreach (var ih in IperlHeads)
|
||||
if (wm != null && !wm.Disabled && wm.WMTypeId() > 0)
|
||||
{
|
||||
if (ih.WMType_ID > 0)
|
||||
{
|
||||
wmType = ih.WMType_ID;
|
||||
break;
|
||||
}
|
||||
wmType = wm.WMTypeId();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
#endif
|
||||
|
||||
if (cfg.UseWebService)
|
||||
{
|
||||
@@ -121,9 +126,10 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Progress.JustStarted));
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Progress.FlowSetting));
|
||||
|
||||
string fromTestName = testParams.Activity.Substring(cmd.Length);
|
||||
|
||||
MakeQ2CorrectedFrom(test.Name, fromTestName);
|
||||
string[] args = testParams.Activity.Substring(cmd.Length).Split(new char[] { ' ' });
|
||||
string fromTestName = (args.Length >= 1) ? args[0] : string.Empty;
|
||||
bool isPlus = (args.Length >= 2) ? args[1].ToLower().Contains("plus") : false;
|
||||
MakeQ2CorrectedFrom(test.Name, fromTestName, isPlus);
|
||||
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Progress.Completed));
|
||||
Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name, ProcessData.BatchRslts.GetTestRslt(test.Name, 0)));
|
||||
@@ -174,9 +180,9 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
|
||||
string[] args = testParams.Activity.Substring(cmd.Length).Split(new char[] { ' ' });
|
||||
|
||||
int maxTestIndex = (ProcessData.BenchInfo is DataContainer.iPerlBenchInfo.Component)
|
||||
? (ProcessData.BenchInfo as DataContainer.iPerlBenchInfo.Component).MaxTestIndex
|
||||
: int.MaxValue;
|
||||
//int maxTestIndex = (ProcessData.BenchInfo is TBF.Rig.DataContainer.BenchInfo.Component)
|
||||
// ? (ProcessData.BenchInfo as TBF.Rig.DataContainer.BenchInfo.Component).MaxTestIndex
|
||||
// : int.MaxValue;
|
||||
|
||||
Results.Entities.TestRslt tstRslt = ProcessData.BatchRslts.GetTestRslt(test.Name, 0);
|
||||
|
||||
@@ -285,7 +291,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
|
||||
return new List<Event> { Event.Done };
|
||||
}
|
||||
else if (testParams.Activity.ToLower().Contains(cmd = "simulate "))
|
||||
else if (testParams.Activity.ToLower().Contains(cmd = SimulateCmd))
|
||||
{
|
||||
TestProgressEventArgs.SetEstimatedTimes(new int[] { 0, 0, 0, 30, 0, 30, 0, 0 });
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Progress.JustStarted));
|
||||
@@ -298,9 +304,49 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
else if (testParams.Activity.Substring(cmd.Length).ToLower() == "compound nok") MakeSimulatedCompound(test, 1, 0, 4.7f, 0.9f);
|
||||
else if (testParams.Activity.Substring(cmd.Length).ToLower() == "compound rise") MakeSimulatedCompound(test, 1, 0, 0.7f, 0.0f);
|
||||
else if (testParams.Activity.Substring(cmd.Length).ToLower() == "compound fall") MakeSimulatedCompound(test, 1, 0, 0.7f, 0.9f);
|
||||
else if (testParams.Activity.Substring(cmd.Length).ToLower() == "iperls")
|
||||
{
|
||||
string[] pcbNrs = new string[] { "831232435539", "831232435562", "831232435587",
|
||||
"831232432141", "831232432497", "831232763641" };
|
||||
|
||||
TestRslt tstRslt = BatchRslts.GetTestRslt(test.Name, test.Part);
|
||||
if (tstRslt != null)
|
||||
{
|
||||
Results.Utils.GetCounterStates(tstRslt, Program.LocalSettings.Counters);
|
||||
|
||||
/// Auxiliary results ... not required
|
||||
|
||||
/// Main results
|
||||
tstRslt.MethodClass = TbfComponents.FindComponent(test.Method).ClassName;
|
||||
tstRslt.TestDone = true;
|
||||
tstRslt.StartTime = tstRslt.Batch.StartTime;
|
||||
tstRslt.EndTime = DateTime.Now;
|
||||
tstRslt.FlowSetTime = 0;
|
||||
tstRslt.MassOfEvapWater = 0;
|
||||
tstRslt.TestTime = 1;
|
||||
|
||||
for (int i = 0; i < BatchRslts.Batch.WaterMeters.Count; i++)
|
||||
{
|
||||
MeterTestRslt meterRslt =
|
||||
BatchRslts.GetMeterTestRslt(test.Name, i, CompoundMeterId.Single);
|
||||
|
||||
if (meterRslt != null)
|
||||
{
|
||||
meterRslt.WaterMeter.SerialNr = pcbNrs[i % pcbNrs.Length];
|
||||
meterRslt.Passed = true;
|
||||
meterRslt.TestDone = true;
|
||||
}
|
||||
//if (iperlHeads[i] != null)
|
||||
//{
|
||||
// iperlHeads[i].CommFailed = iperlHeads[i].Disabled = false;
|
||||
// iperlHeads[i].SerialNr = pcbNrs[i % pcbNrs.Length];
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Progress.Completed));
|
||||
Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name, ProcessData.BatchRslts.GetTestRslt(Results.Utils.GetTestName(test.Name, 1, 1), 0)));
|
||||
Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name, ProcessData.BatchRslts.GetTestRslt(Common.Utils.GetTestName(test.Name, 1, 1), 0)));
|
||||
allResults.Info(TestResult2CsvLine(test.Name, 0)); /// Append the results to the CSV-file
|
||||
|
||||
//------------------------------------------------
|
||||
@@ -308,8 +354,8 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
//------------------------------------------------
|
||||
|
||||
State.Create(string.Format("iPerlCommunicationSeq : {0}", testParams.Activity))
|
||||
.AddOperation(checkUiOp)
|
||||
.EnterState();
|
||||
.AddOperation(checkUiOp)
|
||||
.EnterState();
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
|
||||
if (TestAndLogUiCmdStop(test, e))
|
||||
@@ -322,7 +368,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
///
|
||||
/// Show the modeless dialog with error indication
|
||||
///
|
||||
Program.MainWnd.Invoke(new iPerlCommFormDlgt(OpenIPerlCommForm), new object[] { this, cfg, test, testParams });
|
||||
Program.MainWnd.Invoke(new iPerlCommFormDlgt(OpenIPerlCommForm), new object[] { this, method, test, testParams });
|
||||
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.iPerl_Communication_in_progress);
|
||||
@@ -332,10 +378,9 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
bool completed = false;
|
||||
|
||||
State.Create("iPerlCommunicationSeq : Wait until the entry form is closed")
|
||||
.AddOperation(checkUiOp)
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
.AddOperation(checkUiOp)
|
||||
.EnterState();
|
||||
do {
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
stopPressed = TestAndLogUiCmdStop(test, e);
|
||||
completed = (modelessDlg is GenericDevices.IHasCompleted)
|
||||
@@ -475,7 +520,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
/// <param name="testName">This test name</param>
|
||||
/// <param name="oriTestRslt">Name of Q2 test done before Q2 correction (Q2adj)</param>
|
||||
/// <remarks>Assuming this test does not have multiple parts (part = 0)</remarks>
|
||||
void MakeQ2CorrectedFrom(string testName, string oriTestName)
|
||||
void MakeQ2CorrectedFrom(string testName, string oriTestName, bool isPlus = false)
|
||||
{
|
||||
Results.Entities.TestRslt oriTestRslt = ProcessData.BatchRslts.GetTestRslt(oriTestName, 0);
|
||||
Results.Entities.TestRslt tstRslt = ProcessData.BatchRslts.GetTestRslt(testName, 0);
|
||||
@@ -551,8 +596,8 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
tstRslt.MassEndRaw = oriTestRslt.MassEndRaw;
|
||||
tstRslt.MassEnd = oriTestRslt.MassEnd;
|
||||
tstRslt.MassOfEvapWater = oriTestRslt.MassOfEvapWater;
|
||||
tstRslt.Qdetected = oriTestRslt.Qdetected;
|
||||
tstRslt.Flow = oriTestRslt.Flow;
|
||||
//tstRslt.FlowMass = oriTestRslt.FlowMass;
|
||||
//tstRslt.FlowVolume = oriTestRslt.FlowVolume;
|
||||
tstRslt.VolumeCTV = oriTestRslt.VolumeCTV;
|
||||
tstRslt.VolumeMaster = oriTestRslt.VolumeMaster;
|
||||
tstRslt.ErrorMaster = oriTestRslt.ErrorMaster;
|
||||
@@ -572,15 +617,19 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
|
||||
for (int i = 0; i < ProcessData.BatchRslts.WMPositionsCount; i++)
|
||||
{
|
||||
Results.Entities.MeterTestRslt oriMeterRslt = ProcessData.BatchRslts.GetMeterTestRslt(oriTestName, i, CompoundMeterId.Single);
|
||||
Results.Entities.MeterTestRslt meterRslt = ProcessData.BatchRslts.GetMeterTestRslt(testName, i, CompoundMeterId.Single);
|
||||
// Fix for CS7036: Added the missing 'meterId' argument to the GetMeterTestRslt method call.
|
||||
var q3mtr = ProcessData.BatchRslts.GetMeterTestRslt("Q3", i, CompoundMeterId.SingleOrCompound);
|
||||
double q3error = (q3mtr != null) ? q3mtr.Error : 0;
|
||||
|
||||
Results.Entities.MeterTestRslt oriMeterRslt = ProcessData.BatchRslts.GetMeterTestRslt(oriTestName, i, CompoundMeterId.SingleOrCompound);
|
||||
Results.Entities.MeterTestRslt meterRslt = ProcessData.BatchRslts.GetMeterTestRslt(testName, i, CompoundMeterId.SingleOrCompound);
|
||||
|
||||
/// Reference to iPerl water meter or null:
|
||||
TestMethods.iPerlCommunication.iPerlHead.IperlHead iPerl = ((sensPath != null) && (sensPath.RegisterReaders != null) && (i < sensPath.RegisterReaders.Length))
|
||||
? (sensPath.RegisterReaders[i] as TestMethods.iPerlCommunication.iPerlHead.IperlHead)
|
||||
: null;
|
||||
|
||||
if (meterRslt != null && oriMeterRslt != null)
|
||||
if (iPerl != null && meterRslt != null && oriMeterRslt != null)
|
||||
{
|
||||
#if ORACLE_DB
|
||||
meterRslt.ErrorBC = oriMeterRslt.Error;
|
||||
@@ -591,33 +640,27 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
meterRslt.VolumeRef = oriMeterRslt.VolumeRef;
|
||||
meterRslt.TestTime = oriMeterRslt.TestTime;
|
||||
|
||||
if (iPerl == null || ((iPerl.Q2CorrRL == 0) && (iPerl.Q2CorrLR == 0)))
|
||||
if (q3error * oriMeterRslt.Error < 0)
|
||||
{
|
||||
/// Either no iPerl head or no Q2 correction
|
||||
meterRslt.Error = oriMeterRslt.Error;
|
||||
meterRslt.VolumeMeter = oriMeterRslt.VolumeMeter;
|
||||
meterRslt.VolumeStart = oriMeterRslt.VolumeStart;
|
||||
meterRslt.VolumeEnd = oriMeterRslt.VolumeEnd;
|
||||
meterRslt.Passed = (meterRslt.Error >= tstRslt.ErrLimLo() + tstRslt.ErrLimMargin()
|
||||
&& meterRslt.Error <= tstRslt.ErrLimHi() - tstRslt.ErrLimMargin());
|
||||
meterRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
/// iPerl with Q2 correction => generate an artificial error equal to +1/10 of the original one (relative to Q2 target error)
|
||||
meterRslt.Error = 0.1 * oriMeterRslt.Error;
|
||||
}
|
||||
else
|
||||
{
|
||||
/// iPerl with Q2 correction => generate an artificial error equal to -1/10 of the original one (relative to Q2 target error)
|
||||
double targetError = iPerl.CalibTargetQ2;
|
||||
meterRslt.Error = targetError - 0.1 * (oriMeterRslt.Error - targetError);
|
||||
meterRslt.VolumeMeter = oriMeterRslt.VolumeRef * (100.0 + meterRslt.Error) / 100.0;
|
||||
meterRslt.VolumeStart = oriMeterRslt.VolumeStart;
|
||||
double signature = (oriMeterRslt.VolumeEnd > oriMeterRslt.VolumeStart) ? (+1) : (-1);
|
||||
meterRslt.VolumeEnd = meterRslt.VolumeStart + signature * meterRslt.VolumeMeter;
|
||||
meterRslt.Passed = (meterRslt.Error >= tstRslt.ErrLimLo() + tstRslt.ErrLimMargin()
|
||||
&& meterRslt.Error <= tstRslt.ErrLimHi() - tstRslt.ErrLimMargin());
|
||||
meterRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
meterRslt.Error = - 0.1 * oriMeterRslt.Error;
|
||||
}
|
||||
}
|
||||
|
||||
meterRslt.VolumeMeter = meterRslt.VolumeRef * (100.0 + meterRslt.Error) / 100.0;
|
||||
double signature = (oriMeterRslt.VolumeEnd > oriMeterRslt.VolumeStart) ? (+1) : (-1);
|
||||
meterRslt.VolumeStart = oriMeterRslt.VolumeStart;
|
||||
meterRslt.VolumeEnd = meterRslt.VolumeStart + signature * meterRslt.VolumeMeter;
|
||||
|
||||
meterRslt.Passed = (meterRslt.Error >= tstRslt.ErrLimLo() + tstRslt.ErrLimMargin()
|
||||
&& meterRslt.Error <= tstRslt.ErrLimHi() - tstRslt.ErrLimMargin());
|
||||
meterRslt.TestDone = true;
|
||||
tstRslt.TestDone = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -703,8 +746,8 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
tstRslt.MassEndRaw = oriTestRslt.MassEndRaw;
|
||||
tstRslt.MassEnd = oriTestRslt.MassEnd;
|
||||
tstRslt.MassOfEvapWater = oriTestRslt.MassOfEvapWater;
|
||||
tstRslt.Qdetected = oriTestRslt.Qdetected;
|
||||
tstRslt.Flow = oriTestRslt.Flow;
|
||||
//tstRslt.FlowMass = oriTestRslt.FlowMass;
|
||||
//tstRslt.FlowVolume = oriTestRslt.FlowVolume;
|
||||
tstRslt.VolumeCTV = oriTestRslt.VolumeCTV;
|
||||
tstRslt.VolumeMaster = oriTestRslt.VolumeMaster;
|
||||
tstRslt.ErrorMaster = oriTestRslt.ErrorMaster;
|
||||
@@ -752,7 +795,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
meterRslt.VolumeStart = oriMeterRslt.VolumeStart;
|
||||
meterRslt.VolumeEnd = oriMeterRslt.VolumeEnd;
|
||||
#if ORACLE_DB
|
||||
if (ProcessData.BatchRslts.Batch.WaterMeters[i].Pruefindex == 1)
|
||||
if ((ProcessData.BatchRslts.Batch.WaterMeters[i].Pruefindex % 100) == 1)
|
||||
{
|
||||
meterRslt.Passed = (oriMeterRslt.Error >= tstRslt.ErrLimLo() + tstRslt.ErrLimMargin()
|
||||
&& oriMeterRslt.Error <= tstRslt.ErrLimHi() - tstRslt.ErrLimMargin());
|
||||
@@ -855,8 +898,8 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
tstRslt.MassEndRaw = testRsltQ2ac.MassEndRaw;
|
||||
tstRslt.MassEnd = testRsltQ2ac.MassEnd;
|
||||
tstRslt.MassOfEvapWater = testRsltQ2ac.MassOfEvapWater;
|
||||
tstRslt.Qdetected = testRsltQ2ac.Qdetected;
|
||||
tstRslt.Flow = testRsltQ2ac.Flow;
|
||||
//tstRslt.FlowMass = testRsltQ2ac.FlowMass;
|
||||
//tstRslt.FlowVolume = testRsltQ2ac.FlowVolume;
|
||||
tstRslt.VolumeCTV = testRsltQ2ac.VolumeCTV;
|
||||
tstRslt.VolumeMaster = testRsltQ2ac.VolumeMaster;
|
||||
tstRslt.ErrorMaster = testRsltQ2ac.ErrorMaster;
|
||||
@@ -894,14 +937,8 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
meterRslt.TestDone = meterRsltQ2ac.TestDone;
|
||||
tstRslt.TestDone = true;
|
||||
|
||||
double targetError = 0;
|
||||
if ((sensPath != null) && (sensPath.RegisterReaders != null) && (sensPath.RegisterReaders.Length > i) && (sensPath.RegisterReaders[i] is iPerlHead.IperlHead))
|
||||
{
|
||||
targetError = (sensPath.RegisterReaders[i] as iPerlHead.IperlHead).CalibTargetQ2;
|
||||
}
|
||||
|
||||
if ((((meterRsltQ2bc.Error - targetError) < -0.51) && (meterRsltQ2ac.Error < meterRsltQ2bc.Error)) ||
|
||||
(((meterRsltQ2bc.Error - targetError) > +0.51) && (meterRsltQ2ac.Error > meterRsltQ2bc.Error)))
|
||||
if (((meterRsltQ2bc.Error < -0.51) && (meterRsltQ2ac.Error < meterRsltQ2bc.Error)) ||
|
||||
((meterRsltQ2bc.Error > +0.51) && (meterRsltQ2ac.Error > meterRsltQ2bc.Error)))
|
||||
{
|
||||
meterRslt.Passed = false; /// Q2 correction check failed
|
||||
}
|
||||
|
||||
@@ -2,19 +2,22 @@
|
||||
/// Copyright (c) 2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using TBF.Rig.TestMethods.iPerlCommunication.iPerlHead;
|
||||
using static Sensus.iPerl.NfcHandler.MCI_Protocol;
|
||||
|
||||
namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
{
|
||||
public class iPerlDataWrite
|
||||
{
|
||||
public MessageID MessageID;
|
||||
public StructName StructName;
|
||||
public int Offset;
|
||||
public byte[] Data;
|
||||
public string Description;
|
||||
|
||||
public iPerlDataWrite(MessageID mesageID, int offset, byte[] data, string description)
|
||||
public iPerlDataWrite(MessageID mesageID, StructName structName, int offset, byte[] data, string description)
|
||||
{
|
||||
MessageID = mesageID;
|
||||
StructName = structName;
|
||||
Offset = offset;
|
||||
Data = data;
|
||||
Description = description;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user