diff --git a/.gitignore b/.gitignore index b08f65f93..1099e451e 100644 --- a/.gitignore +++ b/.gitignore @@ -44,6 +44,8 @@ ResultsBrowser/bin/ ResultsBrowser/obj/ ResultsParser/bin/ ResultsParser/obj/ +S640TestApp/bin/ +S640TestApp/obj/ SharedDatabase/bin SharedDatabase/obj SchematicDrawing/bin diff --git a/S640TestApp/App.config b/S640TestApp/App.config new file mode 100644 index 000000000..56efbc7b5 --- /dev/null +++ b/S640TestApp/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/S640TestApp/Program.cs b/S640TestApp/Program.cs new file mode 100644 index 000000000..6873f69c4 --- /dev/null +++ b/S640TestApp/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace S640TestApp +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new S640TestWnd()); + } + } +} diff --git a/S640TestApp/Properties/AssemblyInfo.cs b/S640TestApp/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..ac741e56d --- /dev/null +++ b/S640TestApp/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("S640TestApp")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("S640TestApp")] +[assembly: AssemblyCopyright("Copyright © 2023")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("2b84f803-89f3-43cd-9e2d-6ed03de6c3b8")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/S640TestApp/Properties/Resources.Designer.cs b/S640TestApp/Properties/Resources.Designer.cs new file mode 100644 index 000000000..be37fd57d --- /dev/null +++ b/S640TestApp/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace S640TestApp.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // 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.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("S640TestApp.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/S640TestApp/Properties/Resources.resx b/S640TestApp/Properties/Resources.resx new file mode 100644 index 000000000..af7dbebba --- /dev/null +++ b/S640TestApp/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/S640TestApp/Properties/Settings.Designer.cs b/S640TestApp/Properties/Settings.Designer.cs new file mode 100644 index 000000000..0fb69fe5b --- /dev/null +++ b/S640TestApp/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace S640TestApp.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/S640TestApp/Properties/Settings.settings b/S640TestApp/Properties/Settings.settings new file mode 100644 index 000000000..39645652a --- /dev/null +++ b/S640TestApp/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/S640TestApp/S640TestApp.csproj b/S640TestApp/S640TestApp.csproj new file mode 100644 index 000000000..e03750815 --- /dev/null +++ b/S640TestApp/S640TestApp.csproj @@ -0,0 +1,110 @@ + + + + + Debug + AnyCPU + {EE097B5A-8162-45B1-9643-4969FC3A8921} + WinExe + Properties + S640TestApp + S640TestApp + v4.7.2 + 512 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + Form + + + S640TestWnd.cs + + + + + S640TestWnd.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + {c8939821-ba5c-4988-a3d0-bf53b74865c7} + Common + + + {743df7db-c7b6-42eb-986d-0f485e5588e4} + Config + + + {46e3b0e1-209f-4550-b0dd-d7e2c039b3ce} + RestClient + + + {9d0dcc88-dc81-47eb-9fdd-4c3907871bfb} + Results + + + {8648fd92-cda1-4c3a-b5f9-fe547ce1fa48} + TBF + + + + + \ No newline at end of file diff --git a/S640TestApp/S640TestWnd.Designer.cs b/S640TestApp/S640TestWnd.Designer.cs new file mode 100644 index 000000000..bd0c2bb55 --- /dev/null +++ b/S640TestApp/S640TestWnd.Designer.cs @@ -0,0 +1,207 @@ +namespace S640TestApp +{ + partial class S640TestWnd + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.startButton = new System.Windows.Forms.Button(); + this.endButton = new System.Windows.Forms.Button(); + this.startCfgButton = new System.Windows.Forms.Button(); + this.endCfgButton = new System.Windows.Forms.Button(); + this.procParamsCfgButton = new System.Windows.Forms.Button(); + this.idWzTypTextBox = new System.Windows.Forms.TextBox(); + this.idWzTypLabel = new System.Windows.Forms.Label(); + this.getButton = new System.Windows.Forms.Button(); + this.baseUrlTextBox = new System.Windows.Forms.TextBox(); + this.relativeUrlTextBox = new System.Windows.Forms.TextBox(); + this.relativeUrlLabel = new System.Windows.Forms.Label(); + this.baseUrlLabel = new System.Windows.Forms.Label(); + this.getDefaultsGroupBox = new System.Windows.Forms.GroupBox(); + this.getDefaultsGroupBox.SuspendLayout(); + this.SuspendLayout(); + // + // startButton + // + this.startButton.Location = new System.Drawing.Point(12, 110); + this.startButton.Name = "startButton"; + this.startButton.Size = new System.Drawing.Size(109, 43); + this.startButton.TabIndex = 2; + this.startButton.Text = "Start"; + this.startButton.UseVisualStyleBackColor = true; + this.startButton.Click += new System.EventHandler(this.startButton_Click); + // + // endButton + // + this.endButton.Location = new System.Drawing.Point(12, 208); + this.endButton.Name = "endButton"; + this.endButton.Size = new System.Drawing.Size(109, 43); + this.endButton.TabIndex = 4; + this.endButton.Text = "End"; + this.endButton.UseVisualStyleBackColor = true; + this.endButton.Click += new System.EventHandler(this.endButton_Click); + // + // startCfgButton + // + this.startCfgButton.Location = new System.Drawing.Point(12, 61); + this.startCfgButton.Name = "startCfgButton"; + this.startCfgButton.Size = new System.Drawing.Size(109, 43); + this.startCfgButton.TabIndex = 1; + this.startCfgButton.Text = "Configure Start"; + this.startCfgButton.UseVisualStyleBackColor = true; + this.startCfgButton.Click += new System.EventHandler(this.startCfgButton_Click); + // + // endCfgButton + // + this.endCfgButton.Location = new System.Drawing.Point(12, 159); + this.endCfgButton.Name = "endCfgButton"; + this.endCfgButton.Size = new System.Drawing.Size(109, 43); + this.endCfgButton.TabIndex = 3; + this.endCfgButton.Text = "Configure End"; + this.endCfgButton.UseVisualStyleBackColor = true; + this.endCfgButton.Click += new System.EventHandler(this.endCfgButton_Click); + // + // procParamsCfgButton + // + this.procParamsCfgButton.Location = new System.Drawing.Point(12, 12); + this.procParamsCfgButton.Name = "procParamsCfgButton"; + this.procParamsCfgButton.Size = new System.Drawing.Size(109, 43); + this.procParamsCfgButton.TabIndex = 0; + this.procParamsCfgButton.Text = "Comm. parameters"; + this.procParamsCfgButton.UseVisualStyleBackColor = true; + this.procParamsCfgButton.Click += new System.EventHandler(this.procParamsCfgButton_Click); + // + // idWzTypTextBox + // + this.idWzTypTextBox.Location = new System.Drawing.Point(87, 75); + this.idWzTypTextBox.Name = "idWzTypTextBox"; + this.idWzTypTextBox.Size = new System.Drawing.Size(53, 20); + this.idWzTypTextBox.TabIndex = 5; + // + // idWzTypLabel + // + this.idWzTypLabel.AutoSize = true; + this.idWzTypLabel.Location = new System.Drawing.Point(12, 78); + this.idWzTypLabel.Name = "idWzTypLabel"; + this.idWzTypLabel.Size = new System.Drawing.Size(60, 13); + this.idWzTypLabel.TabIndex = 4; + this.idWzTypLabel.Text = "ID WZ Typ"; + // + // getButton + // + this.getButton.Location = new System.Drawing.Point(14, 109); + this.getButton.Name = "getButton"; + this.getButton.Size = new System.Drawing.Size(126, 33); + this.getButton.TabIndex = 6; + this.getButton.Text = "Get"; + this.getButton.UseVisualStyleBackColor = true; + this.getButton.Click += new System.EventHandler(this.getButton_Click); + // + // baseUrlTextBox + // + this.baseUrlTextBox.Location = new System.Drawing.Point(87, 25); + this.baseUrlTextBox.Name = "baseUrlTextBox"; + this.baseUrlTextBox.Size = new System.Drawing.Size(298, 20); + this.baseUrlTextBox.TabIndex = 1; + // + // relativeUrlTextBox + // + this.relativeUrlTextBox.Location = new System.Drawing.Point(87, 50); + this.relativeUrlTextBox.Name = "relativeUrlTextBox"; + this.relativeUrlTextBox.Size = new System.Drawing.Size(298, 20); + this.relativeUrlTextBox.TabIndex = 3; + // + // relativeUrlLabel + // + this.relativeUrlLabel.AutoSize = true; + this.relativeUrlLabel.Location = new System.Drawing.Point(11, 53); + this.relativeUrlLabel.Name = "relativeUrlLabel"; + this.relativeUrlLabel.Size = new System.Drawing.Size(71, 13); + this.relativeUrlLabel.TabIndex = 2; + this.relativeUrlLabel.Text = "Relative URL"; + // + // baseUrlLabel + // + this.baseUrlLabel.AutoSize = true; + this.baseUrlLabel.Location = new System.Drawing.Point(11, 28); + this.baseUrlLabel.Name = "baseUrlLabel"; + this.baseUrlLabel.Size = new System.Drawing.Size(56, 13); + this.baseUrlLabel.TabIndex = 0; + this.baseUrlLabel.Text = "Base URL"; + // + // getDefaultsGroupBox + // + this.getDefaultsGroupBox.Controls.Add(this.relativeUrlTextBox); + this.getDefaultsGroupBox.Controls.Add(this.baseUrlTextBox); + this.getDefaultsGroupBox.Controls.Add(this.idWzTypTextBox); + this.getDefaultsGroupBox.Controls.Add(this.idWzTypLabel); + this.getDefaultsGroupBox.Controls.Add(this.relativeUrlLabel); + this.getDefaultsGroupBox.Controls.Add(this.getButton); + this.getDefaultsGroupBox.Controls.Add(this.baseUrlLabel); + this.getDefaultsGroupBox.Location = new System.Drawing.Point(127, 12); + this.getDefaultsGroupBox.Name = "getDefaultsGroupBox"; + this.getDefaultsGroupBox.Size = new System.Drawing.Size(394, 157); + this.getDefaultsGroupBox.TabIndex = 5; + this.getDefaultsGroupBox.TabStop = false; + this.getDefaultsGroupBox.Text = "Get default Q2 correction factors"; + // + // S640TestWnd + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(533, 312); + this.Controls.Add(this.getDefaultsGroupBox); + this.Controls.Add(this.procParamsCfgButton); + this.Controls.Add(this.endCfgButton); + this.Controls.Add(this.startCfgButton); + this.Controls.Add(this.endButton); + this.Controls.Add(this.startButton); + this.Name = "S640TestWnd"; + this.Text = "Form1"; + this.getDefaultsGroupBox.ResumeLayout(false); + this.getDefaultsGroupBox.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button startButton; + private System.Windows.Forms.Button endButton; + private System.Windows.Forms.Button startCfgButton; + private System.Windows.Forms.Button endCfgButton; + private System.Windows.Forms.Button procParamsCfgButton; + private System.Windows.Forms.TextBox idWzTypTextBox; + private System.Windows.Forms.Label idWzTypLabel; + private System.Windows.Forms.Button getButton; + private System.Windows.Forms.TextBox baseUrlTextBox; + private System.Windows.Forms.TextBox relativeUrlTextBox; + private System.Windows.Forms.Label relativeUrlLabel; + private System.Windows.Forms.Label baseUrlLabel; + private System.Windows.Forms.GroupBox getDefaultsGroupBox; + } +} + diff --git a/S640TestApp/S640TestWnd.cs b/S640TestApp/S640TestWnd.cs new file mode 100644 index 000000000..8dd40f75f --- /dev/null +++ b/S640TestApp/S640TestWnd.cs @@ -0,0 +1,162 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using Common; +using Config; +using Config.Entities; +using RestClient; +using Results.Entities; +using TBF.Rig.TestMethods.S640Communication; + +namespace S640TestApp +{ + public partial class S640TestWnd : Form + { + ProcParams procParams; + S640StartCfg startCfg; + S640EndCfg endCfg; + + Test test; + IList waterMeters; + + + public S640TestWnd() + { + InitializeComponent(); + + baseUrlTextBox.Text = "https://api-operations.sensus-emea.com/core/"; + relativeUrlTextBox.Text = "metrology/q2correction/Locations/Wztyp/{0}"; + + test = new Test() + { + }; + + waterMeters = new List(); + waterMeters.Add(new WaterMeter() { }); + waterMeters.Add(new WaterMeter() { }); + waterMeters.Add(new WaterMeter() { }); + } + + private void procParamsCfgButton_Click(object sender, EventArgs e) + { + if (procParams == null) + { + procParams = new ProcParams(true); + } + + } + + private void startCfgButton_Click(object sender, EventArgs e) + { + if (startCfg == null) + { + startCfg = new S640StartFactory().DefaultConfig() as S640StartCfg; + } + + var cfgForm = new TBF.UI.Bench.Components.ComponentParametersDlg(this); + var cfgControl = startCfg.GetControl(null); + cfgControl.Config = startCfg; + cfgControl.Config.ItemNr = 1; + cfgForm.ComponentCfgCtrl = cfgControl; + cfgForm.UnlockAfterStart = true; + + DialogResult dr = cfgForm.ShowDialog(); + if (dr == DialogResult.OK) + { + return; + } + } + + private void startButton_Click(object sender, EventArgs e) + { + if (startCfg == null || procParams == null) + { + MessageBox.Show("Not configured"); + } + + (new S640CommForm(S640Activity.Start, startCfg, procParams, test, waterMeters)).ShowDialog(); + } + + private void endCfgButton_Click(object sender, EventArgs e) + { + if (endCfg == null) + { + endCfg = new S640EndFactory().DefaultConfig() as S640EndCfg; + } + + var cfgForm = new TBF.UI.Bench.Components.ComponentParametersDlg(this); + var cfgControl = endCfg.GetControl(null); + cfgControl.Config = endCfg; + cfgControl.Config.ItemNr = 1; + cfgForm.ComponentCfgCtrl = cfgControl; + cfgForm.UnlockAfterStart = true; + + DialogResult dr = cfgForm.ShowDialog(); + if (dr == DialogResult.OK) + { + return; + } + } + + private void endButton_Click(object sender, EventArgs e) + { + if (endCfg == null || procParams == null) + { + MessageBox.Show("Not configured"); + } + + (new S640CommForm(S640Activity.End, endCfg, procParams, test, waterMeters)).ShowDialog(); + } + + private void getButton_Click(object sender, EventArgs e) + { + string baseUrl = baseUrlTextBox.Text; + string relativeUrl = relativeUrlTextBox.Text; + int wmType = 0; + int q2PreCorrectionLR; + int q2PreCorrectionRL; + + if (string.IsNullOrEmpty(baseUrl) || string.IsNullOrEmpty(relativeUrl) || + !int.TryParse(idWzTypTextBox.Text, out wmType) || wmType <= 0) + { + MessageBox.Show("Invalid parameter(s)"); + return; + } + + /// Get Q2 pre-correction values from REST service + try + { + GetQ2PreCorrectionClient client = new GetQ2PreCorrectionClient(baseUrl); + client.GetToken("ReadUser", "sensus", + "https://deluh1web03.world.fluidtechnology.net/SensusCore/api/v1/Locations/1/Login2").Wait(); + string finalRelativeUrl = string.Format(relativeUrl, wmType); + Q2PreCorrection response = client.GetQ2Correction(finalRelativeUrl).Result; + if (response != null && response.AreDataCalculated) + { + q2PreCorrectionLR = response.CorrLR; + q2PreCorrectionRL = response.CorrRL; + MessageBox.Show(string.Format( + "Q2 corrections from a REST client for WM Type = {0} are: LR = {1}, RL = {2}", + wmType, q2PreCorrectionLR, q2PreCorrectionRL)); + } + else + { + MessageBox.Show(string.Format( + "Failed to obtain Q2 corrections from a REST client for WM Type = {0}", wmType)); + } + } + catch (Exception exc) + { + MessageBox.Show(string.Format( + "Failed to obtain Q2 corrections from a REST client for WM Type = {0}: {1}", + wmType, exc.Message)); + } + } + } +} diff --git a/S640TestApp/S640TestWnd.resx b/S640TestApp/S640TestWnd.resx new file mode 100644 index 000000000..1af7de150 --- /dev/null +++ b/S640TestApp/S640TestWnd.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/TBF.sln b/TBF.sln index 65c267ce8..620754022 100644 --- a/TBF.sln +++ b/TBF.sln @@ -96,6 +96,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GenericTest", "GenericTest\ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProductionTracing", "ProductionTracing\ProductionTracing.csproj", "{328AD6D5-6E62-42FB-B348-9899F813DBD3}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "S640TestApp", "S640TestApp\S640TestApp.csproj", "{EE097B5A-8162-45B1-9643-4969FC3A8921}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -420,6 +422,16 @@ Global {328AD6D5-6E62-42FB-B348-9899F813DBD3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {328AD6D5-6E62-42FB-B348-9899F813DBD3}.Release|Mixed Platforms.Build.0 = Release|Any CPU {328AD6D5-6E62-42FB-B348-9899F813DBD3}.Release|x86.ActiveCfg = Release|Any CPU + {EE097B5A-8162-45B1-9643-4969FC3A8921}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EE097B5A-8162-45B1-9643-4969FC3A8921}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EE097B5A-8162-45B1-9643-4969FC3A8921}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {EE097B5A-8162-45B1-9643-4969FC3A8921}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {EE097B5A-8162-45B1-9643-4969FC3A8921}.Debug|x86.ActiveCfg = Debug|Any CPU + {EE097B5A-8162-45B1-9643-4969FC3A8921}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EE097B5A-8162-45B1-9643-4969FC3A8921}.Release|Any CPU.Build.0 = Release|Any CPU + {EE097B5A-8162-45B1-9643-4969FC3A8921}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {EE097B5A-8162-45B1-9643-4969FC3A8921}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {EE097B5A-8162-45B1-9643-4969FC3A8921}.Release|x86.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/TBF/Rig/TestMethods/S640Communication/S640CommForm.cs b/TBF/Rig/TestMethods/S640Communication/S640CommForm.cs index a2f25ced0..53730d720 100644 --- a/TBF/Rig/TestMethods/S640Communication/S640CommForm.cs +++ b/TBF/Rig/TestMethods/S640Communication/S640CommForm.cs @@ -235,16 +235,16 @@ namespace TBF.Rig.TestMethods.S640Communication throw new Exception("Something strange: activities.Count != tests.Count"); } - if (ProcessData.RegisterReaders.Length != ProcessData.BatchRslts.Batch.WaterMeters.Count) + if (activities.Count > 0) + { + ProcessData.RegisterReaders = StateMachine.GetMetersPath(tests[0]).RegisterReaders; + } + + if (ProcessData.RegisterReaders.Length != waterMeters.Count) { throw new Exception("Something strange: RegisterReaders.Length != WaterMeters.Count"); } - if (activities.Count > 0) - { - ProcessData.RegisterReaders = StateMachine.GetMetersPath(tests[0]).RegisterReaders; - } - optoHeads = new RegisterReaders.S640Stream.S640Stream[ProcessData.RegisterReaders.Length]; /// for (int wmPos = 0; wmPos < ProcessData.RegisterReaders.Length; wmPos++) diff --git a/TBF/Rig/TestMethods/S640Communication/S640EndCfg.cs b/TBF/Rig/TestMethods/S640Communication/S640EndCfg.cs index 2da1e7546..772ea312c 100644 --- a/TBF/Rig/TestMethods/S640Communication/S640EndCfg.cs +++ b/TBF/Rig/TestMethods/S640Communication/S640EndCfg.cs @@ -62,7 +62,7 @@ namespace TBF.Rig.TestMethods.S640Communication public void InitializeAll() { OptoDataTimeout = 120; - FileExchangePath = "1"; + FileExchangePath = "C:\\eRegister Programming\\DataTransfer"; FileExchangeTimeout = 420; SerialNumbers = SerialNumbers.None; AssignedNumbers = SerialNumbers.None; diff --git a/TBF/Rig/TestMethods/S640Communication/S640StartCfg.cs b/TBF/Rig/TestMethods/S640Communication/S640StartCfg.cs index cdd2868d1..2059ae09e 100644 --- a/TBF/Rig/TestMethods/S640Communication/S640StartCfg.cs +++ b/TBF/Rig/TestMethods/S640Communication/S640StartCfg.cs @@ -61,7 +61,7 @@ namespace TBF.Rig.TestMethods.S640Communication public void InitializeAll() { OptoDataTimeout = 180; - FileExchangePath = "1"; + FileExchangePath = "C:\\eRegister Programming\\DataTransfer"; FileExchangeTimeout = 420; SerialNumbers = SerialNumbers.None; AssignedNumbers = SerialNumbers.None; diff --git a/clean.bat b/clean.bat index 20447d4b3..0407b9eaa 100644 --- a/clean.bat +++ b/clean.bat @@ -46,6 +46,8 @@ rmdir /s /q ResultsBrowser\bin rmdir /s /q ResultsBrowser\obj rmdir /s /q ResultsParser\bin rmdir /s /q ResultsParser\obj +rmdir /s /q S640TestApp\bin +rmdir /s /q S640TestApp\obj rmdir /s /q SharedDatabase\bin rmdir /s /q SharedDatabase\obj rmdir /s /q SchematicDrawing\bin