Browse Source

吞吐量配置指令测试

yhluo 2 weeks ago
parent
commit
6598df39a0

+ 59 - 126
UAS_MES_HYSX/FunctionCode/Make/Make_WirelessThroughput.Designer.cs

@@ -41,6 +41,8 @@
             this.ProtDetails = new UAS_MES_NEW.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
             this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
             this.panel1 = new System.Windows.Forms.Panel();
+            this.comboBox1 = new System.Windows.Forms.ComboBox();
+            this.label20 = new System.Windows.Forms.Label();
             this.ExePath = new System.Windows.Forms.TextBox();
             this.ProductList = new System.Windows.Forms.TextBox();
             this.IPList = new System.Windows.Forms.TextBox();
@@ -64,23 +66,15 @@
             this.Password = new System.Windows.Forms.TextBox();
             this.panel2 = new System.Windows.Forms.Panel();
             this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
-            this.DownMax = new System.Windows.Forms.TextBox();
-            this.DownMin = new System.Windows.Forms.TextBox();
-            this.UpMax = new System.Windows.Forms.TextBox();
             this.ResMin = new System.Windows.Forms.Label();
             this.label17 = new System.Windows.Forms.Label();
             this.ResMax = new System.Windows.Forms.Label();
             this.label16 = new System.Windows.Forms.Label();
-            this.label14 = new System.Windows.Forms.Label();
-            this.label13 = new System.Windows.Forms.Label();
             this.label12 = new System.Windows.Forms.Label();
-            this.UpMin = new System.Windows.Forms.TextBox();
             this.label15 = new System.Windows.Forms.Label();
             this.textBox1 = new System.Windows.Forms.TextBox();
             this.label11 = new System.Windows.Forms.Label();
             this.OperatResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
-            this.label20 = new System.Windows.Forms.Label();
-            this.comboBox1 = new System.Windows.Forms.ComboBox();
             this.SNDetails.SuspendLayout();
             this.tableLayoutPanel1.SuspendLayout();
             this.ProtDetails.SuspendLayout();
@@ -247,18 +241,18 @@
             // 
             // panel1
             // 
+            this.panel1.Controls.Add(this.Radio1);
+            this.panel1.Controls.Add(this.Radio2);
             this.panel1.Controls.Add(this.comboBox1);
             this.panel1.Controls.Add(this.label20);
             this.panel1.Controls.Add(this.ExePath);
             this.panel1.Controls.Add(this.ProductList);
             this.panel1.Controls.Add(this.IPList);
             this.panel1.Controls.Add(this.label19);
+            this.panel1.Controls.Add(this.Locat1);
             this.panel1.Controls.Add(this.label18);
-            this.panel1.Controls.Add(this.Locat3);
             this.panel1.Controls.Add(this.Locat2);
-            this.panel1.Controls.Add(this.Locat1);
-            this.panel1.Controls.Add(this.Radio2);
-            this.panel1.Controls.Add(this.Radio1);
+            this.panel1.Controls.Add(this.Locat3);
             this.panel1.Controls.Add(this.Account);
             this.panel1.Controls.Add(this.label5);
             this.panel1.Controls.Add(this.label10);
@@ -276,6 +270,30 @@
             this.panel1.Size = new System.Drawing.Size(1076, 289);
             this.panel1.TabIndex = 12;
             // 
+            // comboBox1
+            // 
+            this.comboBox1.FormattingEnabled = true;
+            this.comboBox1.Items.AddRange(new object[] {
+            "指令一",
+            "指令二"});
+            this.comboBox1.Location = new System.Drawing.Point(681, 154);
+            this.comboBox1.Name = "comboBox1";
+            this.comboBox1.Size = new System.Drawing.Size(227, 39);
+            this.comboBox1.TabIndex = 25;
+            this.comboBox1.Visible = false;
+            this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
+            // 
+            // label20
+            // 
+            this.label20.AutoSize = true;
+            this.label20.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label20.Location = new System.Drawing.Point(537, 159);
+            this.label20.Name = "label20";
+            this.label20.Size = new System.Drawing.Size(159, 28);
+            this.label20.TabIndex = 24;
+            this.label20.Text = "测试指令模式:";
+            this.label20.Visible = false;
+            // 
             // ExePath
             // 
             this.ExePath.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -324,12 +342,13 @@
             this.Locat3.AutoSize = true;
             this.Locat3.Cursor = System.Windows.Forms.Cursors.Hand;
             this.Locat3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Locat3.Location = new System.Drawing.Point(839, 160);
+            this.Locat3.Location = new System.Drawing.Point(842, 204);
             this.Locat3.Name = "Locat3";
             this.Locat3.Size = new System.Drawing.Size(187, 32);
             this.Locat3.TabIndex = 16;
             this.Locat3.Text = "安居云固件TF卡";
             this.Locat3.UseVisualStyleBackColor = true;
+            this.Locat3.Visible = false;
             this.Locat3.Click += new System.EventHandler(this.Locat3_Click);
             // 
             // Locat2
@@ -337,12 +356,13 @@
             this.Locat2.AutoSize = true;
             this.Locat2.Cursor = System.Windows.Forms.Cursors.Hand;
             this.Locat2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Locat2.Location = new System.Drawing.Point(667, 160);
+            this.Locat2.Location = new System.Drawing.Point(670, 204);
             this.Locat2.Name = "Locat2";
             this.Locat2.Size = new System.Drawing.Size(166, 32);
             this.Locat2.TabIndex = 15;
             this.Locat2.Text = "中心固件TF卡";
             this.Locat2.UseVisualStyleBackColor = true;
+            this.Locat2.Visible = false;
             this.Locat2.Click += new System.EventHandler(this.Locat2_Click);
             // 
             // Locat1
@@ -350,12 +370,13 @@
             this.Locat1.AutoSize = true;
             this.Locat1.Cursor = System.Windows.Forms.Cursors.Hand;
             this.Locat1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Locat1.Location = new System.Drawing.Point(539, 160);
+            this.Locat1.Location = new System.Drawing.Point(542, 204);
             this.Locat1.Name = "Locat1";
             this.Locat1.Size = new System.Drawing.Size(122, 32);
             this.Locat1.TabIndex = 14;
             this.Locat1.Text = "系统内置";
             this.Locat1.UseVisualStyleBackColor = true;
+            this.Locat1.Visible = false;
             this.Locat1.Click += new System.EventHandler(this.Locat1_Click);
             // 
             // Radio2
@@ -363,7 +384,7 @@
             this.Radio2.AutoSize = true;
             this.Radio2.Cursor = System.Windows.Forms.Cursors.Hand;
             this.Radio2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Radio2.Location = new System.Drawing.Point(696, 198);
+            this.Radio2.Location = new System.Drawing.Point(696, 107);
             this.Radio2.Name = "Radio2";
             this.Radio2.Size = new System.Drawing.Size(108, 32);
             this.Radio2.TabIndex = 13;
@@ -376,7 +397,7 @@
             this.Radio1.AutoSize = true;
             this.Radio1.Cursor = System.Windows.Forms.Cursors.Hand;
             this.Radio1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Radio1.Location = new System.Drawing.Point(539, 198);
+            this.Radio1.Location = new System.Drawing.Point(538, 108);
             this.Radio1.Name = "Radio1";
             this.Radio1.Size = new System.Drawing.Size(125, 32);
             this.Radio1.TabIndex = 12;
@@ -435,7 +456,7 @@
             this.label6.Name = "label6";
             this.label6.Size = new System.Drawing.Size(153, 28);
             this.label6.TabIndex = 2;
-            this.label6.Text = "iperf 服务地址:";
+            this.label6.Text = "iperf 服务端口:";
             // 
             // label9
             // 
@@ -500,62 +521,32 @@
             // 
             // tableLayoutPanel3
             // 
-            this.tableLayoutPanel3.ColumnCount = 4;
-            this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
-            this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
-            this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
-            this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
-            this.tableLayoutPanel3.Controls.Add(this.DownMax, 2, 2);
-            this.tableLayoutPanel3.Controls.Add(this.DownMin, 1, 2);
-            this.tableLayoutPanel3.Controls.Add(this.UpMax, 2, 1);
-            this.tableLayoutPanel3.Controls.Add(this.ResMin, 3, 2);
+            this.tableLayoutPanel3.ColumnCount = 2;
+            this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
+            this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
+            this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
+            this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
+            this.tableLayoutPanel3.Controls.Add(this.ResMin, 1, 2);
             this.tableLayoutPanel3.Controls.Add(this.label17, 0, 2);
-            this.tableLayoutPanel3.Controls.Add(this.ResMax, 3, 1);
+            this.tableLayoutPanel3.Controls.Add(this.ResMax, 1, 1);
             this.tableLayoutPanel3.Controls.Add(this.label16, 0, 1);
-            this.tableLayoutPanel3.Controls.Add(this.label14, 2, 0);
-            this.tableLayoutPanel3.Controls.Add(this.label13, 1, 0);
             this.tableLayoutPanel3.Controls.Add(this.label12, 0, 0);
-            this.tableLayoutPanel3.Controls.Add(this.UpMin, 1, 1);
-            this.tableLayoutPanel3.Controls.Add(this.label15, 3, 0);
+            this.tableLayoutPanel3.Controls.Add(this.label15, 1, 0);
             this.tableLayoutPanel3.Location = new System.Drawing.Point(5, 60);
             this.tableLayoutPanel3.Name = "tableLayoutPanel3";
             this.tableLayoutPanel3.RowCount = 3;
             this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
             this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
             this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
-            this.tableLayoutPanel3.Size = new System.Drawing.Size(532, 159);
+            this.tableLayoutPanel3.Size = new System.Drawing.Size(361, 159);
             this.tableLayoutPanel3.TabIndex = 15;
             // 
-            // DownMax
-            // 
-            this.DownMax.Anchor = System.Windows.Forms.AnchorStyles.Left;
-            this.DownMax.Location = new System.Drawing.Point(269, 113);
-            this.DownMax.Name = "DownMax";
-            this.DownMax.Size = new System.Drawing.Size(100, 39);
-            this.DownMax.TabIndex = 15;
-            // 
-            // DownMin
-            // 
-            this.DownMin.Anchor = System.Windows.Forms.AnchorStyles.Left;
-            this.DownMin.Location = new System.Drawing.Point(136, 113);
-            this.DownMin.Name = "DownMin";
-            this.DownMin.Size = new System.Drawing.Size(100, 39);
-            this.DownMin.TabIndex = 14;
-            // 
-            // UpMax
-            // 
-            this.UpMax.Anchor = System.Windows.Forms.AnchorStyles.Left;
-            this.UpMax.Location = new System.Drawing.Point(269, 60);
-            this.UpMax.Name = "UpMax";
-            this.UpMax.Size = new System.Drawing.Size(100, 39);
-            this.UpMax.TabIndex = 13;
-            // 
             // ResMin
             // 
             this.ResMin.Anchor = System.Windows.Forms.AnchorStyles.Left;
             this.ResMin.AutoSize = true;
             this.ResMin.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ResMin.Location = new System.Drawing.Point(402, 118);
+            this.ResMin.Location = new System.Drawing.Point(183, 118);
             this.ResMin.Name = "ResMin";
             this.ResMin.Size = new System.Drawing.Size(24, 28);
             this.ResMin.TabIndex = 11;
@@ -577,7 +568,7 @@
             this.ResMax.Anchor = System.Windows.Forms.AnchorStyles.Left;
             this.ResMax.AutoSize = true;
             this.ResMax.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ResMax.Location = new System.Drawing.Point(402, 65);
+            this.ResMax.Location = new System.Drawing.Point(183, 65);
             this.ResMax.Name = "ResMax";
             this.ResMax.Size = new System.Drawing.Size(24, 28);
             this.ResMax.TabIndex = 7;
@@ -594,28 +585,6 @@
             this.label16.TabIndex = 4;
             this.label16.Text = "上行带宽";
             // 
-            // label14
-            // 
-            this.label14.Anchor = System.Windows.Forms.AnchorStyles.Left;
-            this.label14.AutoSize = true;
-            this.label14.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label14.Location = new System.Drawing.Point(269, 12);
-            this.label14.Name = "label14";
-            this.label14.Size = new System.Drawing.Size(54, 28);
-            this.label14.TabIndex = 2;
-            this.label14.Text = "上限";
-            // 
-            // label13
-            // 
-            this.label13.Anchor = System.Windows.Forms.AnchorStyles.Left;
-            this.label13.AutoSize = true;
-            this.label13.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label13.Location = new System.Drawing.Point(136, 12);
-            this.label13.Name = "label13";
-            this.label13.Size = new System.Drawing.Size(54, 28);
-            this.label13.TabIndex = 1;
-            this.label13.Text = "下限";
-            // 
             // label12
             // 
             this.label12.Anchor = System.Windows.Forms.AnchorStyles.Left;
@@ -627,20 +596,12 @@
             this.label12.TabIndex = 0;
             this.label12.Text = "Mbps";
             // 
-            // UpMin
-            // 
-            this.UpMin.Anchor = System.Windows.Forms.AnchorStyles.Left;
-            this.UpMin.Location = new System.Drawing.Point(136, 60);
-            this.UpMin.Name = "UpMin";
-            this.UpMin.Size = new System.Drawing.Size(100, 39);
-            this.UpMin.TabIndex = 12;
-            // 
             // label15
             // 
             this.label15.Anchor = System.Windows.Forms.AnchorStyles.Left;
             this.label15.AutoSize = true;
             this.label15.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label15.Location = new System.Drawing.Point(402, 12);
+            this.label15.Location = new System.Drawing.Point(183, 12);
             this.label15.Name = "label15";
             this.label15.Size = new System.Drawing.Size(75, 28);
             this.label15.TabIndex = 3;
@@ -675,28 +636,6 @@
             this.OperatResult.TabIndex = 89;
             this.OperatResult.Text = "";
             // 
-            // label20
-            // 
-            this.label20.AutoSize = true;
-            this.label20.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label20.Location = new System.Drawing.Point(534, 115);
-            this.label20.Name = "label20";
-            this.label20.Size = new System.Drawing.Size(159, 28);
-            this.label20.TabIndex = 24;
-            this.label20.Text = "测试指令模式:";
-            // 
-            // comboBox1
-            // 
-            this.comboBox1.FormattingEnabled = true;
-            this.comboBox1.Items.AddRange(new object[] {
-            "指令一",
-            "指令二"});
-            this.comboBox1.Location = new System.Drawing.Point(678, 110);
-            this.comboBox1.Name = "comboBox1";
-            this.comboBox1.Size = new System.Drawing.Size(227, 39);
-            this.comboBox1.TabIndex = 25;
-            this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
-            // 
             // Make_WirelessThroughput
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
@@ -709,18 +648,18 @@
             this.Name = "Make_WirelessThroughput";
             this.Text = "Make_WirelessThroughput";
             this.Load += new System.EventHandler(this.Make_WirelessThroughput_Load);
-            this.SNDetails.ResumeLayout(true);
-            this.tableLayoutPanel1.ResumeLayout(true);
+            this.SNDetails.ResumeLayout(false);
+            this.tableLayoutPanel1.ResumeLayout(false);
             this.tableLayoutPanel1.PerformLayout();
-            this.ProtDetails.ResumeLayout(true);
-            this.tableLayoutPanel2.ResumeLayout(true);
-            this.panel1.ResumeLayout(true);
+            this.ProtDetails.ResumeLayout(false);
+            this.tableLayoutPanel2.ResumeLayout(false);
+            this.panel1.ResumeLayout(false);
             this.panel1.PerformLayout();
-            this.panel2.ResumeLayout(true);
+            this.panel2.ResumeLayout(false);
             this.panel2.PerformLayout();
-            this.tableLayoutPanel3.ResumeLayout(true);
+            this.tableLayoutPanel3.ResumeLayout(false);
             this.tableLayoutPanel3.PerformLayout();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
 
         }
 
@@ -762,16 +701,10 @@
         private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
         private System.Windows.Forms.Label label12;
         private System.Windows.Forms.Label label15;
-        private System.Windows.Forms.Label label14;
-        private System.Windows.Forms.Label label13;
         private System.Windows.Forms.Label ResMin;
         private System.Windows.Forms.Label label17;
         private System.Windows.Forms.Label ResMax;
         private System.Windows.Forms.Label label16;
-        private System.Windows.Forms.TextBox UpMin;
-        private System.Windows.Forms.TextBox DownMax;
-        private System.Windows.Forms.TextBox DownMin;
-        private System.Windows.Forms.TextBox UpMax;
         private System.Windows.Forms.Label label18;
         private System.Windows.Forms.TextBox IPList;
         private System.Windows.Forms.TextBox ProductList;

+ 59 - 33
UAS_MES_HYSX/FunctionCode/Make/Make_WirelessThroughput.cs

@@ -34,45 +34,35 @@ namespace UAS_MES_NEW.Make
         DataTable dt;
         DataHelper dh;
 
-        string telnetPort;
+        string curIp, telnetPort,testType;
+        List<string> cmdList = new List<string>();
 
         private void Make_WirelessThroughput_Load(object sender, EventArgs e)
         {
             dh = SystemInf.dh;
             try
             {
-                string hostName = Dns.GetHostName();
-                IPHostEntry hostEntry = Dns.GetHostEntry(hostName);
+                IPHostEntry hostEntry = Dns.GetHostEntry(Dns.GetHostName());
 
                 foreach (IPAddress ip in hostEntry.AddressList)
                 {
                     if (ip.AddressFamily == AddressFamily.InterNetwork)
                     {
-                        IPList.Text = ip.ToString();
+                        curIp = ip.ToString();
                     }
                 }
             }
             catch (Exception ex)
             {
-                ShowMsg(0, $"获取iperf服务器地址失败,{ex.Message}");
-            }
-            if (!IPList.Text.Contains(":"))
-            {
-                IPList.Text = IPList.Text + ":5021";
+                ShowMsg(0, $"获取iperf服务器地址或产品IP失败,请手动填写,{ex.Message}");
             }
 
+            IPList.Text = "5021";
             telnetPort = "23";
 
-            //if (!ProductList.Text.Contains(":"))
-            //{
-            //    ProductList.Text = ProductList.Text + ":23";
-            //}
-
             Locat1.Visible = false;
             Locat2.Visible = false;
             Locat3.Visible = false;
-            Radio1.Visible = false;
-            Radio2.Visible = false;
         }
 
         private void SN_KeyDown(object sender, KeyEventArgs e)
@@ -87,17 +77,28 @@ namespace UAS_MES_NEW.Make
 
 
             SQL.Clear();
-            //SQL.Append($"SELECT pr_test_account,pr_test_password FROM makeserial,product WHERE ms_sncode = '{sn}' AND ms_prodcode = pr_code");
-            SQL.Append($"SELECT * FROM (SELECT pr_test_account,pr_test_password FROM makeserial,product WHERE ms_sncode = '{sn}' AND ms_prodcode = pr_code ORDER BY ms_indate DESC) WHERE ROWNUM = 1");
+            SQL.Append($@"SELECT pr_test_account,pr_test_password,pr_test_start,pr_test_cmd1,pr_test_cmd2,pr_test_cmd3 FROM makeserial,product
+                        WHERE ms_sncode = '{sn}' AND ms_prodcode = pr_code ORDER BY ms_id DESC");
             dt = (DataTable)dh.ExecuteSql(SQL.ToString(), "select");
             if (dt.Rows.Count == 0)
             {
-                ShowMsg(0, $"序列号:{sn}未维护吞吐量测试账户密码");
+                ShowMsg(0, $"序列号:{sn}未维护吞吐量基础信息");
             }
             else
             {
                 Account.Text = dt.Rows[0]["pr_test_account"].ToString();
                 Password.Text = dt.Rows[0]["pr_test_password"].ToString();
+
+                cmdList.Add(dt.Rows[0]["pr_test_start"].ToString());
+                if(testType == "2.4G")
+                {
+                    cmdList.Add(dt.Rows[0]["pr_test_cmd1"].ToString());
+                }
+                else
+                {
+                    cmdList.Add(dt.Rows[0]["pr_test_cmd2"].ToString());
+                }
+                cmdList.Add(dt.Rows[0]["pr_test_cmd3"].ToString());
             }
 
             if (IsCheckSet()) return;
@@ -106,15 +107,14 @@ namespace UAS_MES_NEW.Make
 
             ShowMsg(1, $"开始测试");
 
-            int iSPort = Convert.ToInt32(IPList.Text.Trim().Split(':')[1]);
             var tester = new CameraIperfTester(
                 timeOut: TestTime.Text.Trim(),
-                cameraIp: ProductList.Text.Trim().Split(':')[0],
+                cameraIp: ProductList.Text.Trim(),
                 cameraPort: Convert.ToInt32(telnetPort),
                 username: Account.Text.Trim(),
                 password: Password.Text.Trim(),
-                iperfServerIp: IPList.Text.Trim().Split(':')[0],
-                iperfServerPort: iSPort
+                iperfServerIp: curIp,
+                iperfServerPort: Convert.ToInt32(IPList.Text.Trim())
             );
 
             string parentPath = Path.GetDirectoryName(ExePath.Text.Trim());
@@ -124,7 +124,7 @@ namespace UAS_MES_NEW.Make
                 Directory.CreateDirectory(logsPath);
             }
 
-            string Msg = tester.TestStart(SN.Text.Trim(), ExePath.Text.Trim(), logsPath, comboBox1.SelectedIndex.ToString());
+            string Msg = tester.TestStart(SN.Text.Trim(), ExePath.Text.Trim(), logsPath, cmdList);
             if (Msg.StartsWith("NG"))
             {
                 ShowMsg(0, Msg);
@@ -135,14 +135,13 @@ namespace UAS_MES_NEW.Make
             ShowMsg(1, $"OK,上行速率: {upRate},下行速率: {downRate}");
             ResMax.Text = upRate;
             ResMin.Text = downRate;
-            //string tDetail = $"upRate/{upRate};downRate/{downRate}";
-            if (comboBox1.SelectedIndex.ToString() == "0")
+            if (testType == "2.4G")
             {
-                CheckPassStation(SN.Text, "PASS", upRate, downRate, "2.4G");
+                CheckPassStation(SN.Text, "PASS", upRate, downRate, testType);
             }
             else
             {
-                CheckPassStation(SN.Text, "PASS", upRate, downRate, "5G");
+                CheckPassStation(SN.Text, "PASS", upRate, downRate, testType);
             }
         }
 
@@ -341,7 +340,7 @@ namespace UAS_MES_NEW.Make
                 this.iperfServerPort = iperfServerPort;
             }
 
-            public string TestStart(string sn, string iP, string lD,string cmdType)
+            public string TestStart(string sn, string iP, string lD,List<string> cmdList)
             {
                 StringBuilder Msg = new StringBuilder();
 
@@ -353,7 +352,7 @@ namespace UAS_MES_NEW.Make
                 logDirectory = lD;
 
                 Msg.Clear();
-                Msg.Append(StartIperfTest(cmdType));
+                Msg.Append(StartIperfTest(cmdList));
 
                 return Msg.ToString();
             }
@@ -408,14 +407,39 @@ namespace UAS_MES_NEW.Make
                 }
             }
 
-            public string StartIperfTest(string cmdType)
+            public string StartIperfTest(List<string> cmdList)
             {
                 try
                 {
                     StringBuilder streamTxt = new StringBuilder();
                     string upRate, downRate, cmdLog, upLog, downLog;
 
-                    if (cmdType == "0")
+                    WriteStream(_telnetStream, cmdList[2]);
+                    streamTxt.Append(ReadStream(_telnetStream));
+
+                    WriteStream(_telnetStream, cmdList[0].Replace("Port", iperfServerPort.ToString()));
+                    streamTxt.Append(ReadStream(_telnetStream));
+
+                    cmdLog = Path.Combine(logDirectory, $"{SN}_CMD.log");
+                    File.WriteAllText(cmdLog, streamTxt.ToString());
+
+                    upLog = Path.Combine(logDirectory, $"{SN}_up.log");
+                    downLog = Path.Combine(logDirectory, $"{SN}_down.log");
+
+                    RunIperfClient(cmdList[1].Replace("IP", cameraIp).Replace("Port", iperfServerPort.ToString()) + "-R", iperfPath, upLog);
+                    RunIperfClient(cmdList[1].Replace("IP", cameraIp).Replace("Port", iperfServerPort.ToString()), iperfPath, downLog);
+
+                    upRate = ParseIperfBitrate(upLog);
+                    downRate = ParseIperfBitrate(downLog);
+                    Close();
+
+                    if (string.IsNullOrEmpty(upRate) || string.IsNullOrEmpty(downRate))
+                    {
+                        return $"NG,产前维护指令测试失败,请核对指令或使用吞吐量日志解析";
+                    }
+                    return $"OK,{upRate}|{downRate}";
+
+                    /*if (cmdType == "0")
                     {
                         WriteStream(_telnetStream, "killall iperf3");
                         streamTxt.Append(ReadStream(_telnetStream));
@@ -481,7 +505,7 @@ namespace UAS_MES_NEW.Make
                             return $"NG,指令二获取测试结果,请核对指令或使用吞吐量日志解析";
                         }
                         return $"OK,{upRate}|{downRate}";
-                    }
+                    }*/
                 }
                 catch (Exception ex)
                 {
@@ -648,6 +672,7 @@ namespace UAS_MES_NEW.Make
         {
             if (Radio1.Checked)
             {
+                testType = "2.4G";
                 Radio2.Checked = false;
             }
         }
@@ -656,6 +681,7 @@ namespace UAS_MES_NEW.Make
         {
             if (Radio2.Checked)
             {
+                testType = "5G";
                 Radio1.Checked = false;
             }
         }