Mexico - read additional parameters and store to DB, ver. 3.9.3135.0

Add support for reading and handling additional common parameters in OptoHeadTest. Extend RadioService and related classes with enhanced parsing and validation logic. Update UI and constants for functionality integration.
This commit is contained in:
2026-08-12 16:20:16 +02:00
parent 126322584f
commit 55d2381e8a
12 changed files with 291 additions and 152 deletions
@@ -20,6 +20,11 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
public string Unit; //dynamic
public string Version; // dynamic
public VersionTypeResult VersionType { get; set; }
public ReadingUnits? ReadingUnits { get; set; }
public FlipMode? FlipMode { get; set; }
public CalibrationFactorResult Calibration { get; set; }
public ConfigStruct()
{
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Threading;
using System.Web.UI.WebControls;
using System.Windows.Forms;
@@ -34,6 +35,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
var items = new[]
{
new {Name = "Read PCB", Value = "ReadPCB" },
new {Name = "Read Additional Common Parameters", Value = "ReadAdditionalCommonParameters" },
new {Name = "Set Test Mode", Value = "SetTestMode" },
new {Name = "Set Active Mode", Value = "SetActiveMode" },
#if DEBUG
@@ -80,12 +82,50 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
ListItem rfidListItem = new ListItem();
rfidListItem.Attributes.Add("style", "font-volume:bold");
//rfidListItem.Attributes.Add("style", "font-weight:bold");
List<ListItem> additionalItems = new List<ListItem>();
bool isTestModeSuccessful = false;
switch (rfidCommandComboBox.SelectedValue)
{
case "ReadPCB":
rfidListItem.Text = $"PCB: {iPerlHead.OptoHeadTest.ReadRequest_PCB()}";
break;
case "ReadAdditionalCommonParameters":
{
if (iPerlHead == null)
{
rfidListItem.Text = "FAILED: iPerl head is not available.";
break;
}
if (iPerlHead.OptoHeadTest == null)
{
rfidListItem.Text = "FAILED: OptoHeadTest is not available.";
break;
}
bool successful = iPerlHead.OptoHeadTest.ReadAdditionalCommonParameters( out string result, true);
if (!successful)
{
rfidListItem.Text = "FAILED: " + result;
break;
}
rfidListItem.Text = "Additional common parameters:";
string[] resultLines = result.Split(
new[] { "\r\n", "\n", "\r" },
StringSplitOptions.RemoveEmptyEntries);
foreach (string line in resultLines)
{
additionalItems.Add( new ListItem(" " + line.Trim()));
}
break;
}
case "SetTestMode":
rfidListItem.Text = iPerlHead.OptoHeadTest.SetTestMode(ref isTestModeSuccessful);
optoListBox.Items.Clear();
@@ -133,6 +173,11 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
break;
}
rfidOutputListBox.Items.Add(rfidListItem);
foreach (ListItem item in additionalItems)
{
rfidOutputListBox.Items.Add(item);
}
rfidOutputListBox.Items.AddRange(logChecker.Messages.ToArray());
}
}