Compare commits
6 Commits
502804c2de
...
b4c0384b57
| Author | SHA1 | Date | |
|---|---|---|---|
| b4c0384b57 | |||
| f4b8e42f59 | |||
| abee5fa6b1 | |||
| b8926ef93f | |||
| 71a66dca2d | |||
| 978c620287 |
@ -1,23 +1,17 @@
|
||||
using GenesisCordonelInterface.Core.Threading;
|
||||
using NLog;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Xylem.Common.Hardware.Interfaces.Ports.PortCore;
|
||||
using Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
||||
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
|
||||
using Xylem.Common.Hardware.WaterMeter.WaterMeterRegisters;
|
||||
using static GenesisCordonelInterface.API.PublicModels;
|
||||
using static Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore.GenesisMeter;
|
||||
using static Xylem.Common.Hardware.WaterMeter.Genesis.Registers.Register;
|
||||
|
||||
namespace GenesisCordonelInterface.API
|
||||
{
|
||||
@ -79,6 +73,7 @@ namespace GenesisCordonelInterface.API
|
||||
Slot = m.Slot,
|
||||
Selected = IsSlotSelected(m.Slot),
|
||||
PcbId = m.PcbId,
|
||||
IsConnected = m.IsConnected,
|
||||
IsLoggedOn = m.IsLoggedOn,
|
||||
RequestPort = m.RequestPort?.GetPortName(),
|
||||
StreamingPort = m.StreamingPort?.GetPortName(),
|
||||
@ -125,7 +120,7 @@ namespace GenesisCordonelInterface.API
|
||||
|
||||
#region ================================== Helpers ==================================
|
||||
|
||||
private GenesisMeter GetMeter(int slot)
|
||||
public GenesisMeter GetMeter(int slot)
|
||||
{
|
||||
var meter = _meterBatch.ListOfMeters
|
||||
.OfType<GenesisMeter>()
|
||||
@ -468,6 +463,8 @@ namespace GenesisCordonelInterface.API
|
||||
SlotId = slot,
|
||||
Success = true,
|
||||
Exists = false,
|
||||
IsConnected = false,
|
||||
IsLoggedOn = false,
|
||||
Message = "Slot is empty."
|
||||
};
|
||||
}
|
||||
@ -477,6 +474,8 @@ namespace GenesisCordonelInterface.API
|
||||
SlotId = slot,
|
||||
Success = true,
|
||||
Exists = true,
|
||||
IsConnected = meter.IsConnected,
|
||||
IsLoggedOn = meter.IsLoggedOn,
|
||||
Message = "Slot found.",
|
||||
|
||||
PcbId = meter.PcbId,
|
||||
@ -498,6 +497,8 @@ namespace GenesisCordonelInterface.API
|
||||
SlotId = slot,
|
||||
Success = false,
|
||||
Exists = false,
|
||||
IsConnected = false,
|
||||
IsLoggedOn = false,
|
||||
Message = ex.Message
|
||||
};
|
||||
}
|
||||
@ -567,6 +568,11 @@ namespace GenesisCordonelInterface.API
|
||||
{
|
||||
LogInfo(operation, "Start.");
|
||||
|
||||
foreach (var meter in _meterBatch.ListOfMeters)
|
||||
{
|
||||
meter.DisposeMeter();
|
||||
}
|
||||
|
||||
_meterBatch.ListOfMeters.Clear();
|
||||
|
||||
foreach (var pair in _workers.ToList())
|
||||
@ -723,31 +729,43 @@ namespace GenesisCordonelInterface.API
|
||||
|
||||
var meter = GetMeter(slot);
|
||||
|
||||
meter.Login();
|
||||
|
||||
if (!meter.IsLoggedOn)
|
||||
{
|
||||
var failedResult = new PublicModels.GciLoginResult
|
||||
meter.Login();
|
||||
|
||||
if (meter.IsLoggedOn)
|
||||
{
|
||||
LogInfo(operation, $"New Slot {slot} login success.");
|
||||
|
||||
return new PublicModels.GciLoginResult
|
||||
{
|
||||
Success = true,
|
||||
SlotId = slot,
|
||||
IsLoggedOn = true,
|
||||
Message = "Logged on now"
|
||||
};
|
||||
}
|
||||
|
||||
LogInfo(operation, $"Failed Slot {slot} login.");
|
||||
|
||||
return new PublicModels.GciLoginResult
|
||||
{
|
||||
Success = false,
|
||||
SlotId = slot,
|
||||
IsLoggedOn = false,
|
||||
Message = "Login failed."
|
||||
Message = "Login failed"
|
||||
};
|
||||
|
||||
LogInfo(operation, $"Failed. {failedResult}");
|
||||
|
||||
return failedResult;
|
||||
}
|
||||
|
||||
var result = new PublicModels.GciLoginResult
|
||||
{
|
||||
Success = true,
|
||||
SlotId = slot,
|
||||
IsLoggedOn = true
|
||||
IsLoggedOn = true,
|
||||
Message = "Already logged on"
|
||||
};
|
||||
|
||||
LogInfo(operation, $"Success. {result}");
|
||||
LogInfo(operation, $"Slot={slot} already logged on.");
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -783,21 +801,31 @@ namespace GenesisCordonelInterface.API
|
||||
|
||||
var meter = GetMeter(slot);
|
||||
|
||||
//meter.SoftDispose();
|
||||
//meter.Dispose();
|
||||
|
||||
if(!meter.IsLoggedOn)
|
||||
if (!meter.IsConnected)
|
||||
{
|
||||
meter.ConnectMeter();
|
||||
|
||||
if (!meter.IsLoggedOn)
|
||||
LogInfo(operation, $"New Slot {slot} connection success.");
|
||||
|
||||
return new PublicModels.GciConnectResult
|
||||
{
|
||||
Success = true,
|
||||
SlotId = slot,
|
||||
IsConnected = true,
|
||||
Message = "Connected now"
|
||||
};
|
||||
}
|
||||
|
||||
if (!meter.IsConnected)
|
||||
{
|
||||
LogInfo(operation, $"Failed. Slot={slot}, Reason=Login failed.");
|
||||
LogInfo(operation, $"Failed Slot {slot} connection.");
|
||||
|
||||
return new PublicModels.GciConnectResult
|
||||
{
|
||||
Success = false,
|
||||
SlotId = slot,
|
||||
Message = "Login failed."
|
||||
IsConnected = false,
|
||||
Message = "Connect failed"
|
||||
};
|
||||
}
|
||||
|
||||
@ -805,18 +833,11 @@ namespace GenesisCordonelInterface.API
|
||||
{
|
||||
Success = true,
|
||||
SlotId = slot,
|
||||
PcbId = meter.PcbId,
|
||||
IsLoggedOn = true,
|
||||
FwVersion = meter.FwVersion,
|
||||
InterfaceVersion = meter.InterfaceInfo?.InterfaceVersion,
|
||||
InterfaceSupportsFwVersion = meter.InterfaceSupportsFwVersion,
|
||||
Registers = null//BuildRegisters(meter)
|
||||
IsConnected = true,
|
||||
Message = "Already connected"
|
||||
};
|
||||
|
||||
LogInfo(operation,
|
||||
$"Success. Slot={slot}, PcbId={result.PcbId ?? "<empty>"}, " +
|
||||
$"FwVersion={result.FwVersion ?? "<empty>"}, InterfaceVersion={result.InterfaceVersion ?? "<empty>"}, " +
|
||||
$"Registers={result.Registers?.Count}");
|
||||
LogInfo(operation, $"Slot={slot} already connected.");
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -828,6 +849,7 @@ namespace GenesisCordonelInterface.API
|
||||
{
|
||||
Success = false,
|
||||
SlotId = slot,
|
||||
IsConnected = false,
|
||||
Message = ex.Message
|
||||
};
|
||||
}
|
||||
@ -933,69 +955,6 @@ namespace GenesisCordonelInterface.API
|
||||
|
||||
try
|
||||
{
|
||||
/*const String checkMark = "\u2714";
|
||||
using (var mb = new MeterBatch())
|
||||
{
|
||||
using (var meter = new GenesisMeter())
|
||||
{
|
||||
meter.SetupFromConfigFile(slot, false);
|
||||
mb.AddMeter(meter);
|
||||
|
||||
meter.Logout();
|
||||
|
||||
var pcbId = meter.GetPcbId();
|
||||
|
||||
if (string.IsNullOrEmpty(pcbId))
|
||||
{
|
||||
var text = $"FAILED\nSlot: {slot}\nRequest port: {meter.RequestPort.GetPortName()}";
|
||||
MessageBox.Show(text, @"FAILED", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
|
||||
Logger.Info("COM: Streaming detection SUCCESS for slot " + slot + ", port " + meter.StreamingPort.GetPortName() + ".");
|
||||
}
|
||||
else
|
||||
{
|
||||
var text = $"SUCCESS\nSlot: {slot}\nRequest port: {meter.RequestPort.GetPortName()}\n\n{checkMark}";
|
||||
MessageBox.Show(text, @"SUCCESS", MessageBoxButtons.OK);
|
||||
|
||||
Logger.Error("COM: Streaming detection FAILED for slot " + slot + ", port " + meter.StreamingPort.GetPortName() + ".");
|
||||
}
|
||||
|
||||
return new PublicModels.GciGetPcbIdResult
|
||||
{
|
||||
SlotId = slot,
|
||||
Success = !string.IsNullOrWhiteSpace(pcbId),
|
||||
PcbId = pcbId,
|
||||
Message = !string.IsNullOrWhiteSpace(pcbId)
|
||||
? "PCB ID read successfully."
|
||||
: "PCB ID is empty."
|
||||
};
|
||||
}
|
||||
}*/
|
||||
//toto ide!!!
|
||||
/*LogInfo(operation, $"Start. Slot={slot}");
|
||||
|
||||
using (var mb = new MeterBatch())
|
||||
using (var meter = new GenesisMeter())
|
||||
{
|
||||
meter.SetupFromConfigFile(slot, false);
|
||||
mb.AddMeter(meter);
|
||||
meter.Logout();
|
||||
|
||||
string pcbId = meter.GetPcbId();
|
||||
|
||||
LogInfo(operation, $"Finish. Slot={slot}, PcbId={pcbId ?? "<empty>"}");
|
||||
|
||||
return new PublicModels.GciGetPcbIdResult
|
||||
{
|
||||
SlotId = slot,
|
||||
Success = !string.IsNullOrWhiteSpace(pcbId),
|
||||
PcbId = pcbId,
|
||||
Message = !string.IsNullOrWhiteSpace(pcbId)
|
||||
? "PCB ID read successfully."
|
||||
: "PCB ID is empty."
|
||||
};
|
||||
}
|
||||
*/
|
||||
LogInfo(operation, $"Start. Slot={slot}");
|
||||
|
||||
var meter = GetMeter(slot);
|
||||
@ -1004,34 +963,21 @@ namespace GenesisCordonelInterface.API
|
||||
|
||||
string pcbId = meter.GetPcbId();
|
||||
|
||||
bool isValid =
|
||||
!string.IsNullOrWhiteSpace(pcbId) &&
|
||||
pcbId.Length == 9;
|
||||
|
||||
LogInfo(operation, $"Finish. Slot={slot}, PcbId={pcbId ?? "<empty>"}");
|
||||
|
||||
return new PublicModels.GciGetPcbIdResult
|
||||
{
|
||||
SlotId = slot,
|
||||
Success = !string.IsNullOrWhiteSpace(pcbId),
|
||||
Success = isValid,
|
||||
PcbId = pcbId,
|
||||
Message = !string.IsNullOrWhiteSpace(pcbId)
|
||||
Message = isValid
|
||||
? "PCB ID read successfully."
|
||||
: "PCB ID is empty."
|
||||
: "Invalid length"
|
||||
};
|
||||
/*var meter = new GenesisMeter();// GetMeter(slot);
|
||||
meter.SetupFromConfigFile(slot, true);
|
||||
meter.Logout();
|
||||
|
||||
string pcbId = meter.GetPcbId();
|
||||
|
||||
LogInfo(operation, $"Finish. Slot={slot}, PcbId={pcbId ?? "<empty>"}");
|
||||
|
||||
return new PublicModels.GciGetPcbIdResult
|
||||
{
|
||||
SlotId = slot,
|
||||
Success = !string.IsNullOrWhiteSpace(pcbId),
|
||||
PcbId = pcbId,
|
||||
Message = !string.IsNullOrWhiteSpace(pcbId)
|
||||
? "PCB ID read successfully."
|
||||
: "PCB ID is empty."
|
||||
};*/
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -1269,7 +1215,6 @@ namespace GenesisCordonelInterface.API
|
||||
#endregion
|
||||
|
||||
#region ================================== METER BATCH SETUP ==================================
|
||||
// ----------------------------------------------------
|
||||
|
||||
public void ReloadSlotSetup()
|
||||
{
|
||||
@ -1363,7 +1308,6 @@ namespace GenesisCordonelInterface.API
|
||||
return _cachedRegisters;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@ -136,6 +136,7 @@ namespace GenesisCordonelInterface.API
|
||||
Slot = slot.SlotId,
|
||||
Selected = true,
|
||||
PcbId = slot.PcbId,
|
||||
IsConnected = false,
|
||||
IsLoggedOn = false,
|
||||
RequestPort = slot.RequestPort == null ? "" : slot.RequestPort.PortName,
|
||||
StreamingPort = slot.StreamingPort == null ? "" : slot.StreamingPort.PortName,
|
||||
|
||||
@ -1,12 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Xylem.Common.Hardware.Interfaces.Ports.PortCore;
|
||||
using static GenesisCordonelInterface.API.InterfaceOutsideToGCI;
|
||||
using static Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore.GenesisMeter;
|
||||
|
||||
namespace GenesisCordonelInterface.API
|
||||
{
|
||||
@ -90,6 +83,7 @@ namespace GenesisCordonelInterface.API
|
||||
public int Slot { get; set; }
|
||||
public bool Selected { get; set; }
|
||||
public string PcbId { get; set; }
|
||||
public bool IsConnected { get; set; }
|
||||
public bool IsLoggedOn { get; set; }
|
||||
public string RequestPort { get; set; }
|
||||
public string StreamingPort { get; set; }
|
||||
@ -97,6 +91,7 @@ namespace GenesisCordonelInterface.API
|
||||
public string FwVersion { get; set; }
|
||||
public string InterfaceVersion { get; set; }
|
||||
}
|
||||
|
||||
public class RegisterWriteResult
|
||||
{
|
||||
public bool Success { get; set; }
|
||||
@ -140,26 +135,27 @@ namespace GenesisCordonelInterface.API
|
||||
public class GciSlotInfo
|
||||
{
|
||||
public int SlotId { get; set; }
|
||||
|
||||
public bool Exists { get; set; }
|
||||
public bool Success { get; set; }
|
||||
public bool IsConnected { get; set; }
|
||||
public bool IsLoggedOn { get; set; }
|
||||
public string Message { get; set; }
|
||||
public string PcbId { get; set; }
|
||||
public string Password { get; set; }
|
||||
|
||||
public GciConfigSource ConfigSource { get; set; }
|
||||
public GciPasswordSource PasswordSource { get; set; }
|
||||
|
||||
public GciPortConfig RequestPort { get; set; }
|
||||
public GciPortConfig StreamingPort { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format(
|
||||
"SlotId={0}, Exists={1}, Success={2}, Message={3}, PcbId={4}, Password={5}, ConfigSource={6}, PasswordSource={7}, RequestPort={8}, StreamingPort={9}",
|
||||
"SlotId={0}, Exists={1}, Success={2}, IsConnected={3}, IsLoggedOn={4}, Message={5}, PcbId={6}, Password={7}, ConfigSource={8}, PasswordSource={9}, RequestPort={10}, StreamingPort={11}",
|
||||
SlotId,
|
||||
Exists,
|
||||
Success,
|
||||
IsConnected,
|
||||
IsLoggedOn,
|
||||
Message,
|
||||
PcbId,
|
||||
Password,
|
||||
@ -341,39 +337,31 @@ namespace GenesisCordonelInterface.API
|
||||
public int SlotId { get; set; }
|
||||
public bool Success { get; set; }
|
||||
public string PcbId { get; set; }
|
||||
public bool IsLoggedOn { get; set; }
|
||||
public string FwVersion { get; set; }
|
||||
public string InterfaceVersion { get; set; }
|
||||
public bool InterfaceSupportsFwVersion { get; set; }
|
||||
public List<GciRegisterSnapshot> Registers { get; set; } = new List<GciRegisterSnapshot>();
|
||||
public bool IsConnected { get; set; }
|
||||
public string Message { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format(
|
||||
"SlotId={0}, Success={1}, IsLoggedOn={2}, PcbId={3}, FwVersion={4}, InterfaceVersion={5}, InterfaceSupportsFwVersion={6}, Registers={7}, Message={8}",
|
||||
"SlotId={0}, Success={1}, PcbId={2}, IsConnected={3}, Message={4}",
|
||||
SlotId,
|
||||
Success,
|
||||
IsLoggedOn,
|
||||
PcbId,
|
||||
FwVersion,
|
||||
InterfaceVersion,
|
||||
InterfaceSupportsFwVersion,
|
||||
Registers == null ? 0 : Registers.Count,
|
||||
IsConnected,
|
||||
Message);
|
||||
}
|
||||
}
|
||||
|
||||
public class GciLoginResult
|
||||
{
|
||||
public bool Success { get; set; }
|
||||
public int SlotId { get; set; }
|
||||
public bool Success { get; set; }
|
||||
public string PcbId { get; set; }
|
||||
public bool IsLoggedOn { get; set; }
|
||||
public string Message { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"Slot={SlotId}, Success={Success}, IsLoggedOn={IsLoggedOn}, Message={Message ?? "<none>"}";
|
||||
return $"Slot={SlotId}, Success={Success}, PcbId={PcbId}, IsLoggedOn={IsLoggedOn}, Message={Message ?? "<none>"}";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -9,9 +9,10 @@ namespace GenesisCordonelInterface.UI.Grid
|
||||
return new List<MeterGridColumnConfig>
|
||||
{
|
||||
new MeterGridColumnConfig { Name = "Slot", HeaderText = "Slot", DisplayIndex = 0, Width = 50, ReadOnly = true },
|
||||
new MeterGridColumnConfig { Name = "Selected", HeaderText = "Selected", DisplayIndex = 1, Width = 60 },
|
||||
new MeterGridColumnConfig { Name = "Selected", HeaderText = "Selected", DisplayIndex = 1, Width = 40 },
|
||||
new MeterGridColumnConfig { Name = "PcbId", HeaderText = "PcbId", DisplayIndex = 2, Width = 80 },
|
||||
new MeterGridColumnConfig { Name = "IsLoggedOn", HeaderText = "IsLoggedOn", DisplayIndex = 3, Width = 80 },
|
||||
new MeterGridColumnConfig { Name = "IsConnected", HeaderText = "IsConnected", DisplayIndex = 3, Width = 40 },
|
||||
new MeterGridColumnConfig { Name = "IsLoggedOn", HeaderText = "IsLoggedOn", DisplayIndex = 3, Width = 40 },
|
||||
new MeterGridColumnConfig { Name = "RequestPort", HeaderText = "RequestPort", DisplayIndex = 4, Width = 90 },
|
||||
new MeterGridColumnConfig { Name = "StreamingPort", HeaderText = "StreamingPort", DisplayIndex = 5, Width = 100 },
|
||||
new MeterGridColumnConfig { Name = "FwVersion", HeaderText = "FwVersion", DisplayIndex = 6, Width = 80 },
|
||||
|
||||
@ -59,6 +59,7 @@ namespace GenesisCordonelInterface.UI.Grid
|
||||
SetCell(row, "Slot", meter.Slot);
|
||||
SetCell(row, "Selected", meter.Selected);
|
||||
SetCell(row, "PcbId", meter.PcbId);
|
||||
SetCell(row, "IsConnected", meter.IsConnected);
|
||||
SetCell(row, "IsLoggedOn", meter.IsLoggedOn);
|
||||
SetCell(row, "RequestPort", meter.RequestPort);
|
||||
SetCell(row, "StreamingPort", meter.StreamingPort);
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
public int Slot { get; set; }
|
||||
public bool Selected { get; set; }
|
||||
public string PcbId { get; set; }
|
||||
public bool IsConnected { get; set; }
|
||||
public bool IsLoggedOn { get; set; }
|
||||
public string RequestPort { get; set; }
|
||||
public string StreamingPort { get; set; }
|
||||
|
||||
@ -4,12 +4,9 @@ using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Xylem.Common.CommonCore.Consts;
|
||||
using Xylem.Common.Hardware.Interfaces.Ports.PortCore;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig;
|
||||
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
|
||||
using Xylem.Common.Ui.CordonelPreadjustmentUi;
|
||||
using CordonelPreadjustmentUi;
|
||||
|
||||
@ -477,115 +477,6 @@ namespace GenesisCordonelInterface.UI.LaatzenAPI_GenesisToolBox
|
||||
}
|
||||
}
|
||||
|
||||
private async void __Connect()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (cbComSlot.SelectedItem == null ||
|
||||
string.IsNullOrEmpty(cbComSlot.SelectedItem.ToString()) ||
|
||||
!int.TryParse(cbComSlot.SelectedItem.ToString(), out var slotNo))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
SetBusy(true, "Connect");
|
||||
DisableAllButtons();
|
||||
_dataTable.Rows.Clear();
|
||||
|
||||
var result = await interfaceToLaatzen.ConnectOneSlotAsync(slotNo);
|
||||
|
||||
if (result.Success)
|
||||
{
|
||||
lblState.ForeColor = Color.Green;
|
||||
lblState.Text = $@"Connected to PCB {result.PcbId}";
|
||||
lblConfigVersion.Text = @"Configuration Version: " + result.InterfaceVersion;
|
||||
lblConfigVersion.ForeColor = result.InterfaceSupportsFwVersion ? Color.Green : Color.Red;
|
||||
|
||||
if (!result.InterfaceSupportsFwVersion)
|
||||
{
|
||||
var text = "CONFIGURATION OUTDATED!\n\n" +
|
||||
"The loaded \"configuration.json\" " +
|
||||
$"version: {result.InterfaceVersion}\n" +
|
||||
$"does NOT support the Cordonel FW version: {result.FwVersion}!";
|
||||
|
||||
MessageBox.Show(text, @"FAILED", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
|
||||
foreach (var item in result.Registers)
|
||||
{
|
||||
var row = _dataTable.NewRow();
|
||||
row["Name"] = item.Name;
|
||||
row["Type"] = item.Type;
|
||||
row["isChecked"] = false;
|
||||
row["Value"] = "";
|
||||
row["RawValue"] = item.RawValue;
|
||||
row["RawValueFile"] = item.RawValue;
|
||||
row["Min"] = item.Min;
|
||||
row["Max"] = item.Max;
|
||||
row["Description"] = item.Description;
|
||||
row["Version"] = item.Version;
|
||||
row["IsAvailable"] = item.IsAvailable;
|
||||
row["Privilege"] = item.Privilege;
|
||||
row["btnHistoryText"] = "View History";
|
||||
|
||||
_dataTable.Rows.Add(row);
|
||||
}
|
||||
|
||||
registerGridView.DataSource = _dataTable.DefaultView;
|
||||
|
||||
var column = registerGridView?.Columns["isChecked"];
|
||||
if (column != null)
|
||||
{
|
||||
column.SortMode = DataGridViewColumnSortMode.Automatic;
|
||||
registerGridView.Sort(column, ListSortDirection.Descending);
|
||||
|
||||
var viewColumn = registerGridView.Columns["RawValueFile"];
|
||||
if (viewColumn != null)
|
||||
viewColumn.Visible = false;
|
||||
}
|
||||
|
||||
column = registerGridView?.Columns["Name"];
|
||||
if (column != null)
|
||||
{
|
||||
registerGridView.Sort(column, ListSortDirection.Ascending);
|
||||
}
|
||||
|
||||
if (registerGridView.Columns["btnHistory"] == null)
|
||||
{
|
||||
var btnHistory = new DataGridViewButtonColumn
|
||||
{
|
||||
Name = "btnHistory",
|
||||
DataPropertyName = "btnHistoryText"
|
||||
};
|
||||
|
||||
registerGridView.Columns.Add(btnHistory);
|
||||
}
|
||||
|
||||
registerGridView.Visible = true;
|
||||
btnConnect.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
btnConnect.Enabled = false;
|
||||
lblState.ForeColor = Color.Red;
|
||||
lblState.Text = $@"Not Connected to PcbId:{result.PcbId}";
|
||||
registerGridView.Visible = false;
|
||||
|
||||
MessageBox.Show(result.Message ?? "Connect failed.", @"FAILED", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, @"FAILED", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
btnConnect.Enabled = true;
|
||||
}
|
||||
finally
|
||||
{
|
||||
SetBusy(false);
|
||||
EnableAllButtons();
|
||||
}
|
||||
}
|
||||
|
||||
private void GetPcbId(Int32 slotNR)
|
||||
{
|
||||
try
|
||||
|
||||
@ -14,12 +14,11 @@ using Xylem.Common.CommonCore.Consts;
|
||||
using Xylem.Common.Hardware.Interfaces.Ports.PortCore;
|
||||
using Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments;
|
||||
using Xylem.Common.Hardware.Interfaces.Ports.SerialPorts;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
||||
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
|
||||
using Xylem.Common.Utils.Logging;
|
||||
using NLog;
|
||||
using GenesisCordonelInterface.API;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig;
|
||||
|
||||
namespace GenesisCordonelInterface.UI.LaatzenAPI_GenesisToolBox
|
||||
{
|
||||
|
||||
@ -268,7 +268,7 @@ namespace GenesisCordonelInterface.UI.StaraTuraAPI_GenesisCordonelInterface
|
||||
if (!result.Success)
|
||||
throw new Exception(result.Message);
|
||||
|
||||
MessageBox.Show($"Connected.\r\nPCB ID: {result.PcbId}");
|
||||
MessageBox.Show($"Connected.\r\n");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
375
TBF.sln
375
TBF.sln
@ -202,18 +202,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LegacyGenCtl", "ExternalPro
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eRegisterCore", "ExternalProjects\Laatzen\Genesis\Common\Hardware\WaterMeter\eRegister\eRegisterCore\eRegisterCore.csproj", "{A83696BF-D8A2-4809-8424-CFE172AED5B6}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataPackages", "ExternalProjects\Laatzen\Genesis\Common\Hardware\WaterMeter\eRegister\DataPackages\DataPackages.csproj", "{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StreamingProtocol", "ExternalProjects\Laatzen\Genesis\Common\Hardware\WaterMeter\eRegister\Protocols\StreamingProtocol.csproj", "{B6A19B80-0F0F-434C-A754-A7712FC208B2}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MagFluxCore", "ExternalProjects\Laatzen\Genesis\Common\Hardware\WaterMeter\MagFlux\MagFluxCore\MagFluxCore.csproj", "{B5DA260C-71CC-45CA-B79E-D1B376AF718C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataPackages", "ExternalProjects\Laatzen\Genesis\Common\Hardware\WaterMeter\MagFlux\DataPackages\DataPackages.csproj", "{BA17D20E-0CEB-4B27-9772-2392BD750ED5}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StreamingProtocol", "ExternalProjects\Laatzen\Genesis\Common\Hardware\WaterMeter\MagFlux\Protocols\StreamingProtocol\StreamingProtocol.csproj", "{D6B81C60-2763-4C4D-989F-90822F53B01A}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RequestProtocol", "ExternalProjects\Laatzen\Genesis\Common\Hardware\WaterMeter\MagFlux\Protocols\RequestProtocol\RequestProtocol.csproj", "{00748F11-4B49-4D8B-93C4-4A11A210CCE2}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tools.JsonToXlsHelper", "ExternalProjects\Laatzen\Genesis\Common\Tools\Tools.JsonToXlsHelper\Tools.JsonToXlsHelper.csproj", "{20F137FD-C25E-42B7-A68F-58C746475897}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MagFluxConfig", "ExternalProjects\Laatzen\Genesis\Common\Hardware\WaterMeter\MagFlux\MagFluxConfig\MagFluxConfig.csproj", "{70398B99-B134-4BBD-968B-7399B70C3CE2}"
|
||||
@ -5600,150 +5590,6 @@ Global
|
||||
{A83696BF-D8A2-4809-8424-CFE172AED5B6}.XP32bit|x64.Build.0 = Debug|Any CPU
|
||||
{A83696BF-D8A2-4809-8424-CFE172AED5B6}.XP32bit|x86.ActiveCfg = Debug|Any CPU
|
||||
{A83696BF-D8A2-4809-8424-CFE172AED5B6}.XP32bit|x86.Build.0 = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}._MANUAL_CONTROL|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}._MANUAL_CONTROL|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}._MANUAL_CONTROL|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}._MANUAL_CONTROL|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}._MANUAL_CONTROL|x64.ActiveCfg = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}._MANUAL_CONTROL|x64.Build.0 = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}._MANUAL_CONTROL|x86.ActiveCfg = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}._MANUAL_CONTROL|x86.Build.0 = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.COM|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.COM|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.COM|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.COM|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.COM|x64.ActiveCfg = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.COM|x64.Build.0 = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.COM|x86.ActiveCfg = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.COM|x86.Build.0 = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.Debug-local IIS-CUST|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.Debug-local IIS-CUST|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.Debug-local IIS-CUST|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.Debug-local IIS-CUST|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.Debug-local IIS-CUST|x64.ActiveCfg = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.Debug-local IIS-CUST|x64.Build.0 = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.Debug-local IIS-CUST|x86.ActiveCfg = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.Debug-local IIS-CUST|x86.Build.0 = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.PerformTest|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.PerformTest|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.PerformTest|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.PerformTest|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.PerformTest|x64.ActiveCfg = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.PerformTest|x64.Build.0 = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.PerformTest|x86.ActiveCfg = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.PerformTest|x86.Build.0 = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.Release|x64.Build.0 = Release|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.Release|x86.Build.0 = Release|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.ReleaseTest|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.ReleaseTest|Any CPU.Build.0 = Release|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.ReleaseTest|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.ReleaseTest|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.ReleaseTest|x64.ActiveCfg = Release|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.ReleaseTest|x64.Build.0 = Release|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.ReleaseTest|x86.ActiveCfg = Release|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.ReleaseTest|x86.Build.0 = Release|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.VPN_Debug|Any CPU.ActiveCfg = VPN_Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.VPN_Debug|Any CPU.Build.0 = VPN_Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.VPN_Debug|Mixed Platforms.ActiveCfg = VPN_Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.VPN_Debug|Mixed Platforms.Build.0 = VPN_Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.VPN_Debug|x64.ActiveCfg = VPN_Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.VPN_Debug|x64.Build.0 = VPN_Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.VPN_Debug|x86.ActiveCfg = VPN_Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.VPN_Debug|x86.Build.0 = VPN_Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.XP32bit|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.XP32bit|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.XP32bit|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.XP32bit|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.XP32bit|x64.ActiveCfg = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.XP32bit|x64.Build.0 = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.XP32bit|x86.ActiveCfg = Debug|Any CPU
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478}.XP32bit|x86.Build.0 = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}._MANUAL_CONTROL|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}._MANUAL_CONTROL|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}._MANUAL_CONTROL|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}._MANUAL_CONTROL|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}._MANUAL_CONTROL|x64.ActiveCfg = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}._MANUAL_CONTROL|x64.Build.0 = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}._MANUAL_CONTROL|x86.ActiveCfg = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}._MANUAL_CONTROL|x86.Build.0 = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.COM|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.COM|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.COM|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.COM|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.COM|x64.ActiveCfg = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.COM|x64.Build.0 = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.COM|x86.ActiveCfg = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.COM|x86.Build.0 = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.Debug-local IIS-CUST|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.Debug-local IIS-CUST|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.Debug-local IIS-CUST|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.Debug-local IIS-CUST|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.Debug-local IIS-CUST|x64.ActiveCfg = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.Debug-local IIS-CUST|x64.Build.0 = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.Debug-local IIS-CUST|x86.ActiveCfg = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.Debug-local IIS-CUST|x86.Build.0 = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.PerformTest|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.PerformTest|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.PerformTest|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.PerformTest|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.PerformTest|x64.ActiveCfg = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.PerformTest|x64.Build.0 = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.PerformTest|x86.ActiveCfg = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.PerformTest|x86.Build.0 = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.Release|x64.Build.0 = Release|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.Release|x86.Build.0 = Release|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.ReleaseTest|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.ReleaseTest|Any CPU.Build.0 = Release|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.ReleaseTest|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.ReleaseTest|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.ReleaseTest|x64.ActiveCfg = Release|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.ReleaseTest|x64.Build.0 = Release|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.ReleaseTest|x86.ActiveCfg = Release|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.ReleaseTest|x86.Build.0 = Release|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.VPN_Debug|Any CPU.ActiveCfg = VPN_Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.VPN_Debug|Any CPU.Build.0 = VPN_Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.VPN_Debug|Mixed Platforms.ActiveCfg = VPN_Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.VPN_Debug|Mixed Platforms.Build.0 = VPN_Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.VPN_Debug|x64.ActiveCfg = VPN_Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.VPN_Debug|x64.Build.0 = VPN_Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.VPN_Debug|x86.ActiveCfg = VPN_Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.VPN_Debug|x86.Build.0 = VPN_Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.XP32bit|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.XP32bit|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.XP32bit|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.XP32bit|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.XP32bit|x64.ActiveCfg = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.XP32bit|x64.Build.0 = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.XP32bit|x86.ActiveCfg = Debug|Any CPU
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2}.XP32bit|x86.Build.0 = Debug|Any CPU
|
||||
{B5DA260C-71CC-45CA-B79E-D1B376AF718C}._MANUAL_CONTROL|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B5DA260C-71CC-45CA-B79E-D1B376AF718C}._MANUAL_CONTROL|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B5DA260C-71CC-45CA-B79E-D1B376AF718C}._MANUAL_CONTROL|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
@ -5816,222 +5662,6 @@ Global
|
||||
{B5DA260C-71CC-45CA-B79E-D1B376AF718C}.XP32bit|x64.Build.0 = Debug|Any CPU
|
||||
{B5DA260C-71CC-45CA-B79E-D1B376AF718C}.XP32bit|x86.ActiveCfg = Debug|Any CPU
|
||||
{B5DA260C-71CC-45CA-B79E-D1B376AF718C}.XP32bit|x86.Build.0 = Debug|Any CPU
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}._MANUAL_CONTROL|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}._MANUAL_CONTROL|Any CPU.Build.0 = _MANUAL_CONTROL|Any CPU
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}._MANUAL_CONTROL|Mixed Platforms.ActiveCfg = _MANUAL_CONTROL|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}._MANUAL_CONTROL|Mixed Platforms.Build.0 = _MANUAL_CONTROL|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}._MANUAL_CONTROL|x64.ActiveCfg = _MANUAL_CONTROL|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}._MANUAL_CONTROL|x64.Build.0 = _MANUAL_CONTROL|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}._MANUAL_CONTROL|x86.ActiveCfg = _MANUAL_CONTROL|x86
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}._MANUAL_CONTROL|x86.Build.0 = _MANUAL_CONTROL|x86
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.COM|Any CPU.ActiveCfg = COM|Any CPU
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.COM|Any CPU.Build.0 = COM|Any CPU
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.COM|Mixed Platforms.ActiveCfg = COM|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.COM|Mixed Platforms.Build.0 = COM|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.COM|x64.ActiveCfg = COM|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.COM|x64.Build.0 = COM|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.COM|x86.ActiveCfg = COM|x86
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.COM|x86.Build.0 = COM|x86
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Debug|Mixed Platforms.Build.0 = Debug|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Debug|x64.Build.0 = Debug|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Debug|x86.Build.0 = Debug|x86
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Debug-local IIS-CUST|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Debug-local IIS-CUST|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Debug-local IIS-CUST|Mixed Platforms.ActiveCfg = Debug|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Debug-local IIS-CUST|Mixed Platforms.Build.0 = Debug|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Debug-local IIS-CUST|x64.ActiveCfg = Debug|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Debug-local IIS-CUST|x64.Build.0 = Debug|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Debug-local IIS-CUST|x86.ActiveCfg = Debug|x86
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Debug-local IIS-CUST|x86.Build.0 = Debug|x86
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.PerformTest|Any CPU.ActiveCfg = PerformTest|Any CPU
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.PerformTest|Any CPU.Build.0 = PerformTest|Any CPU
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.PerformTest|Mixed Platforms.ActiveCfg = PerformTest|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.PerformTest|Mixed Platforms.Build.0 = PerformTest|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.PerformTest|x64.ActiveCfg = PerformTest|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.PerformTest|x64.Build.0 = PerformTest|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.PerformTest|x86.ActiveCfg = PerformTest|x86
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.PerformTest|x86.Build.0 = PerformTest|x86
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Release|Mixed Platforms.ActiveCfg = Release|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Release|Mixed Platforms.Build.0 = Release|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Release|x64.ActiveCfg = Release|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Release|x64.Build.0 = Release|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Release|x86.ActiveCfg = Release|x86
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Release|x86.Build.0 = Release|x86
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.ReleaseTest|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.ReleaseTest|Any CPU.Build.0 = Release|Any CPU
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.ReleaseTest|Mixed Platforms.ActiveCfg = Release|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.ReleaseTest|Mixed Platforms.Build.0 = Release|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.ReleaseTest|x64.ActiveCfg = Release|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.ReleaseTest|x64.Build.0 = Release|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.ReleaseTest|x86.ActiveCfg = Release|x86
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.ReleaseTest|x86.Build.0 = Release|x86
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.VPN_Debug|Any CPU.ActiveCfg = VPN_Debug|Any CPU
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.VPN_Debug|Any CPU.Build.0 = VPN_Debug|Any CPU
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.VPN_Debug|Mixed Platforms.ActiveCfg = VPN_Debug|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.VPN_Debug|Mixed Platforms.Build.0 = VPN_Debug|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.VPN_Debug|x64.ActiveCfg = VPN_Debug|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.VPN_Debug|x64.Build.0 = VPN_Debug|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.VPN_Debug|x86.ActiveCfg = VPN_Debug|x86
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.VPN_Debug|x86.Build.0 = VPN_Debug|x86
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.XP32bit|Any CPU.ActiveCfg = XP32bit|Any CPU
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.XP32bit|Any CPU.Build.0 = XP32bit|Any CPU
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.XP32bit|Mixed Platforms.ActiveCfg = XP32bit|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.XP32bit|Mixed Platforms.Build.0 = XP32bit|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.XP32bit|x64.ActiveCfg = XP32bit|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.XP32bit|x64.Build.0 = XP32bit|x64
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.XP32bit|x86.ActiveCfg = XP32bit|x86
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5}.XP32bit|x86.Build.0 = XP32bit|x86
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}._MANUAL_CONTROL|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}._MANUAL_CONTROL|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}._MANUAL_CONTROL|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}._MANUAL_CONTROL|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}._MANUAL_CONTROL|x64.ActiveCfg = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}._MANUAL_CONTROL|x64.Build.0 = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}._MANUAL_CONTROL|x86.ActiveCfg = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}._MANUAL_CONTROL|x86.Build.0 = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.COM|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.COM|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.COM|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.COM|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.COM|x64.ActiveCfg = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.COM|x64.Build.0 = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.COM|x86.ActiveCfg = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.COM|x86.Build.0 = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.Debug-local IIS-CUST|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.Debug-local IIS-CUST|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.Debug-local IIS-CUST|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.Debug-local IIS-CUST|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.Debug-local IIS-CUST|x64.ActiveCfg = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.Debug-local IIS-CUST|x64.Build.0 = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.Debug-local IIS-CUST|x86.ActiveCfg = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.Debug-local IIS-CUST|x86.Build.0 = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.PerformTest|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.PerformTest|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.PerformTest|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.PerformTest|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.PerformTest|x64.ActiveCfg = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.PerformTest|x64.Build.0 = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.PerformTest|x86.ActiveCfg = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.PerformTest|x86.Build.0 = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.Release|x64.Build.0 = Release|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.Release|x86.Build.0 = Release|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.ReleaseTest|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.ReleaseTest|Any CPU.Build.0 = Release|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.ReleaseTest|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.ReleaseTest|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.ReleaseTest|x64.ActiveCfg = Release|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.ReleaseTest|x64.Build.0 = Release|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.ReleaseTest|x86.ActiveCfg = Release|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.ReleaseTest|x86.Build.0 = Release|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.VPN_Debug|Any CPU.ActiveCfg = VPN_Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.VPN_Debug|Any CPU.Build.0 = VPN_Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.VPN_Debug|Mixed Platforms.ActiveCfg = VPN_Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.VPN_Debug|Mixed Platforms.Build.0 = VPN_Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.VPN_Debug|x64.ActiveCfg = VPN_Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.VPN_Debug|x64.Build.0 = VPN_Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.VPN_Debug|x86.ActiveCfg = VPN_Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.VPN_Debug|x86.Build.0 = VPN_Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.XP32bit|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.XP32bit|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.XP32bit|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.XP32bit|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.XP32bit|x64.ActiveCfg = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.XP32bit|x64.Build.0 = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.XP32bit|x86.ActiveCfg = Debug|Any CPU
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A}.XP32bit|x86.Build.0 = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}._MANUAL_CONTROL|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}._MANUAL_CONTROL|Any CPU.Build.0 = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}._MANUAL_CONTROL|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}._MANUAL_CONTROL|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}._MANUAL_CONTROL|x64.ActiveCfg = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}._MANUAL_CONTROL|x64.Build.0 = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}._MANUAL_CONTROL|x86.ActiveCfg = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}._MANUAL_CONTROL|x86.Build.0 = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.COM|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.COM|Any CPU.Build.0 = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.COM|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.COM|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.COM|x64.ActiveCfg = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.COM|x64.Build.0 = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.COM|x86.ActiveCfg = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.COM|x86.Build.0 = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.Debug-local IIS-CUST|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.Debug-local IIS-CUST|Any CPU.Build.0 = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.Debug-local IIS-CUST|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.Debug-local IIS-CUST|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.Debug-local IIS-CUST|x64.ActiveCfg = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.Debug-local IIS-CUST|x64.Build.0 = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.Debug-local IIS-CUST|x86.ActiveCfg = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.Debug-local IIS-CUST|x86.Build.0 = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.PerformTest|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.PerformTest|Any CPU.Build.0 = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.PerformTest|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.PerformTest|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.PerformTest|x64.ActiveCfg = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.PerformTest|x64.Build.0 = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.PerformTest|x86.ActiveCfg = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.PerformTest|x86.Build.0 = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.Release|x64.Build.0 = Release|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.Release|x86.Build.0 = Release|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.ReleaseTest|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.ReleaseTest|Any CPU.Build.0 = Release|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.ReleaseTest|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.ReleaseTest|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.ReleaseTest|x64.ActiveCfg = Release|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.ReleaseTest|x64.Build.0 = Release|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.ReleaseTest|x86.ActiveCfg = Release|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.ReleaseTest|x86.Build.0 = Release|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.VPN_Debug|Any CPU.ActiveCfg = VPN_Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.VPN_Debug|Any CPU.Build.0 = VPN_Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.VPN_Debug|Mixed Platforms.ActiveCfg = VPN_Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.VPN_Debug|Mixed Platforms.Build.0 = VPN_Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.VPN_Debug|x64.ActiveCfg = VPN_Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.VPN_Debug|x64.Build.0 = VPN_Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.VPN_Debug|x86.ActiveCfg = VPN_Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.VPN_Debug|x86.Build.0 = VPN_Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.XP32bit|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.XP32bit|Any CPU.Build.0 = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.XP32bit|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.XP32bit|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.XP32bit|x64.ActiveCfg = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.XP32bit|x64.Build.0 = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.XP32bit|x86.ActiveCfg = Debug|Any CPU
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2}.XP32bit|x86.Build.0 = Debug|Any CPU
|
||||
{20F137FD-C25E-42B7-A68F-58C746475897}._MANUAL_CONTROL|Any CPU.ActiveCfg = _MANUAL_CONTROL|Any CPU
|
||||
{20F137FD-C25E-42B7-A68F-58C746475897}._MANUAL_CONTROL|Any CPU.Build.0 = _MANUAL_CONTROL|Any CPU
|
||||
{20F137FD-C25E-42B7-A68F-58C746475897}._MANUAL_CONTROL|Mixed Platforms.ActiveCfg = _MANUAL_CONTROL|x64
|
||||
@ -6214,12 +5844,7 @@ Global
|
||||
{62E5BA37-36AB-4F0A-BC12-554E7A1F1A39} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
|
||||
{60765BF4-6165-4F2F-8756-1C699826265D} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
|
||||
{A83696BF-D8A2-4809-8424-CFE172AED5B6} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
|
||||
{C2808A8E-C0BA-44EC-B7B1-1C66AD3D8478} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
|
||||
{B6A19B80-0F0F-434C-A754-A7712FC208B2} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
|
||||
{B5DA260C-71CC-45CA-B79E-D1B376AF718C} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
|
||||
{BA17D20E-0CEB-4B27-9772-2392BD750ED5} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
|
||||
{D6B81C60-2763-4C4D-989F-90822F53B01A} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
|
||||
{00748F11-4B49-4D8B-93C4-4A11A210CCE2} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
|
||||
{20F137FD-C25E-42B7-A68F-58C746475897} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
|
||||
{70398B99-B134-4BBD-968B-7399B70C3CE2} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
|
||||
EndGlobalSection
|
||||
|
||||
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("3.9.3069.1")]
|
||||
[assembly: AssemblyFileVersion("3.9.3069.1")]
|
||||
[assembly: AssemblyVersion("3.9.3085.1")]
|
||||
[assembly: AssemblyFileVersion("3.9.3085.1")]
|
||||
|
||||
@ -307,14 +307,31 @@ namespace TBF.Rig.BridgeComponents.GciBridge
|
||||
public async Task<GciPublicModels.GciInitSlotResult> InitSlotAsync(
|
||||
GciPublicModels.GciInitSlotRequest request)
|
||||
{
|
||||
EnsureExternalInterface();
|
||||
|
||||
|
||||
if (request == null)
|
||||
throw new ArgumentNullException(nameof(request));
|
||||
|
||||
if (request.SlotId <= 0)
|
||||
throw new ArgumentException("Invalid slot id.");
|
||||
|
||||
if (string.Equals(request.RequestPort?.Type, "SIMULATE", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
log.InfoFormat("{0}: InitSlotAsync invoked. {1}, SIMULATE", Name, request);
|
||||
await Task.Delay(500);
|
||||
log.InfoFormat("{0}: InitSlotAsync SIMULATE finished.", Name);
|
||||
|
||||
return new GciPublicModels.GciInitSlotResult()
|
||||
{
|
||||
SlotId = request.SlotId,
|
||||
Success = true,
|
||||
AlreadyExists = false,
|
||||
Updated = false,
|
||||
Message = "Simulated",
|
||||
};
|
||||
}
|
||||
|
||||
EnsureExternalInterface();
|
||||
|
||||
var result = await gciExternalInterface.InitSlotAsync(request);
|
||||
|
||||
log.InfoFormat("{0}: InitSlotAsync invoked. {1}, Result={2}", Name, request, result);
|
||||
@ -337,14 +354,31 @@ namespace TBF.Rig.BridgeComponents.GciBridge
|
||||
public async Task<GciPublicModels.GciInitSlotResult> UpdateSlotAsync(
|
||||
GciPublicModels.GciInitSlotRequest request)
|
||||
{
|
||||
EnsureExternalInterface();
|
||||
|
||||
|
||||
if (request == null)
|
||||
throw new ArgumentNullException(nameof(request));
|
||||
|
||||
if (request.SlotId <= 0)
|
||||
throw new ArgumentException("Invalid slot id.");
|
||||
|
||||
if (string.Equals(request.RequestPort?.Type, "SIMULATE", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
log.InfoFormat("{0}: UpdateSlotAsync invoked. {1}, SIMULATE", Name, request);
|
||||
await Task.Delay(500);
|
||||
log.InfoFormat("{0}: UpdateSlotAsync SIMULATE finished.", Name);
|
||||
|
||||
return new GciPublicModels.GciInitSlotResult()
|
||||
{
|
||||
SlotId = request.SlotId,
|
||||
Success = true,
|
||||
AlreadyExists = false,
|
||||
Updated = true,
|
||||
Message = "Simulated",
|
||||
};
|
||||
}
|
||||
|
||||
EnsureExternalInterface();
|
||||
|
||||
var result = await gciExternalInterface.UpdateSlotAsync(request);
|
||||
|
||||
log.InfoFormat("{0}: UpdateSlotAsync invoked. {1}, Result={2}", Name, request, result);
|
||||
@ -488,6 +522,8 @@ namespace TBF.Rig.BridgeComponents.GciBridge
|
||||
int slotId,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
log.InfoFormat("{0}: DisconnectAsync({1}) invoked.", Name, slotId);
|
||||
|
||||
EnsureExternalInterface();
|
||||
|
||||
if (slotId <= 0)
|
||||
|
||||
@ -8,10 +8,11 @@ namespace TBF.Rig.BridgeComponents.GciBridge.UI.Grid
|
||||
{
|
||||
return new List<MeterGridColumnConfig>
|
||||
{
|
||||
new MeterGridColumnConfig { Name = "Slot", HeaderText = "Slot", DisplayIndex = 0, Width = 50, ReadOnly = true },
|
||||
new MeterGridColumnConfig { Name = "Selected", HeaderText = "Selected", DisplayIndex = 1, Width = 60 },
|
||||
new MeterGridColumnConfig { Name = "Slot", HeaderText = "Slot", DisplayIndex = 0, Width = 30, ReadOnly = true },
|
||||
new MeterGridColumnConfig { Name = "Selected", HeaderText = "Selected", DisplayIndex = 1, Width = 30 },
|
||||
new MeterGridColumnConfig { Name = "PcbId", HeaderText = "PcbId", DisplayIndex = 2, Width = 80 },
|
||||
new MeterGridColumnConfig { Name = "IsLoggedOn", HeaderText = "IsLoggedOn", DisplayIndex = 3, Width = 80 },
|
||||
new MeterGridColumnConfig { Name = "IsLoggedOn", HeaderText = "IsLoggedOn", DisplayIndex = 3, Width = 30 },
|
||||
new MeterGridColumnConfig { Name = "IsLoggedOn", HeaderText = "IsLoggedOn", DisplayIndex = 3, Width = 30 },
|
||||
new MeterGridColumnConfig { Name = "RequestPort", HeaderText = "RequestPort", DisplayIndex = 4, Width = 90 },
|
||||
new MeterGridColumnConfig { Name = "StreamingPort", HeaderText = "StreamingPort", DisplayIndex = 5, Width = 100 },
|
||||
new MeterGridColumnConfig { Name = "FwVersion", HeaderText = "FwVersion", DisplayIndex = 6, Width = 80 },
|
||||
|
||||
@ -33,6 +33,7 @@ namespace TBF.Rig.BridgeComponents.GciBridge.UI.Grid
|
||||
grid.Columns.Add("Slot", "Slot");
|
||||
grid.Columns.Add(new DataGridViewCheckBoxColumn { Name = "Selected", HeaderText = "Selected" });
|
||||
grid.Columns.Add("PcbId", "PcbId");
|
||||
grid.Columns.Add(new DataGridViewCheckBoxColumn { Name = "IsConnected", HeaderText = "IsConnected" });
|
||||
grid.Columns.Add(new DataGridViewCheckBoxColumn { Name = "IsLoggedOn", HeaderText = "IsLoggedOn" });
|
||||
|
||||
grid.Columns.Add(CreateComPortColumn("RequestPort", "RequestPort", comPorts));
|
||||
@ -84,6 +85,7 @@ namespace TBF.Rig.BridgeComponents.GciBridge.UI.Grid
|
||||
SetCell(row, "Slot", meter.Slot);
|
||||
SetCell(row, "Selected", meter.Selected);
|
||||
SetCell(row, "PcbId", meter.PcbId);
|
||||
SetCell(row, "IsConnected", meter.IsConnected);
|
||||
SetCell(row, "IsLoggedOn", meter.IsLoggedOn);
|
||||
SetCell(row, "RequestPort", meter.RequestPort);
|
||||
SetCell(row, "RequestPortType", NormalizeRequestPortType(meter.RequestPortType));
|
||||
@ -113,6 +115,7 @@ namespace TBF.Rig.BridgeComponents.GciBridge.UI.Grid
|
||||
SetCell(row, "RequestPort", slot.RequestPort == null ? "" : slot.RequestPort.PortName);
|
||||
SetCell(row, "RequestPortType", MapRequestPortTypeBack(slot.RequestPort == null ? null : slot.RequestPort.Type));
|
||||
SetCell(row, "StreamingPort", slot.StreamingPort == null ? "" : slot.StreamingPort.PortName);
|
||||
SetCell(row, "IsConnected", false);
|
||||
SetCell(row, "IsLoggedOn", false);
|
||||
SetCell(row, "FwVersion", "");
|
||||
SetCell(row, "InterfaceVersion", "");
|
||||
@ -148,6 +151,7 @@ namespace TBF.Rig.BridgeComponents.GciBridge.UI.Grid
|
||||
SetCell(row, "RequestPortType", "IRDA");
|
||||
SetCell(row, "StreamingPort", "");
|
||||
SetCell(row, "PcbId", "");
|
||||
SetCell(row, "IsConnected", false);
|
||||
SetCell(row, "IsLoggedOn", false);
|
||||
SetCell(row, "FwVersion", "");
|
||||
SetCell(row, "InterfaceVersion", "");
|
||||
@ -170,6 +174,7 @@ namespace TBF.Rig.BridgeComponents.GciBridge.UI.Grid
|
||||
Slot = Convert.ToInt32(row.Cells["Slot"].Value),
|
||||
Selected = GetBool(row, "Selected"),
|
||||
PcbId = GetString(row, "PcbId"),
|
||||
IsConnected = GetBool(row, "IsConnected"),
|
||||
IsLoggedOn = GetBool(row, "IsLoggedOn"),
|
||||
RequestPort = GetString(row, "RequestPort"),
|
||||
RequestPortType = NormalizeRequestPortType(GetString(row, "RequestPortType")),
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
public int Slot { get; set; }
|
||||
public bool Selected { get; set; }
|
||||
public string PcbId { get; set; }
|
||||
public bool IsConnected { get; set; }
|
||||
public bool IsLoggedOn { get; set; }
|
||||
public string RequestPort { get; set; }
|
||||
public string StreamingPort { get; set; }
|
||||
|
||||
@ -5,6 +5,7 @@ using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Forms;
|
||||
using Xylem.Common.Utils.Logging;
|
||||
using TBF.Rig.BridgeComponents.GciBridge.UI.StaraTuraAPI_GciBridge;
|
||||
|
||||
namespace TBF.Rig.BridgeComponents.GciBridge.UI
|
||||
|
||||
@ -4,6 +4,7 @@ using Common;
|
||||
using GenesisCordonelInterface.API;
|
||||
using log4net;
|
||||
using TBF.Rig.BridgeComponents.GciBridge;
|
||||
using TBF.Rig.RegisterReaders.GenesisRegReader.communication.common;
|
||||
using TBF.Rig.RegisterReaders.GenesisRegReader.implementations;
|
||||
using TBF.Rig.TestMethods.iPerlCommunication.communication.C4.diagnosticLed;
|
||||
|
||||
@ -17,25 +18,83 @@ namespace TBF.Rig.RegisterReaders.GenesisRegReader.communication
|
||||
|
||||
private GenesisSmartReader genesisHead;
|
||||
//private SerialDriver serialDriver;
|
||||
|
||||
|
||||
|
||||
public void BuildConnection(GenesisSmartReader genesidHead)
|
||||
public async Task BuildConnection(GenesisSmartReader genesidHead)
|
||||
{
|
||||
//TODO BUMI make fix rebuild
|
||||
PublicModels.GciInitSlotRequest request = new PublicModels.GciInitSlotRequest
|
||||
await BuildConnectionAsync(genesidHead).ConfigureAwait(false);
|
||||
}
|
||||
public async Task BuildConnectionAsync(GenesisSmartReader genesidHead)
|
||||
{
|
||||
if (genesidHead == null)
|
||||
throw new ArgumentNullException(nameof(genesidHead));
|
||||
|
||||
bool simulation = genesidHead.DebugLevel == DebugMode.Simulate;
|
||||
|
||||
var request = new PublicModels.GciInitSlotRequest
|
||||
{
|
||||
SlotId = genesidHead.GetSlotNr,
|
||||
ConfigSource = PublicModels.GciConfigSource.InterfaceInputConfig,
|
||||
PasswordSource = PublicModels.GciPasswordSource.InterfaceInputPassword,
|
||||
RequestPort = new PublicModels.GciPortConfig{ PortName = $"COM{genesidHead.RfidComPortNr}", Type = PublicModels.MapPortType("IRDA")},
|
||||
StreamingPort = new PublicModels.GciPortConfig{ PortName = $"COM{genesidHead.OptoComPortNr}", Type = string.Empty}
|
||||
|
||||
RequestPort = new PublicModels.GciPortConfig
|
||||
{
|
||||
PortName = $"COM{genesidHead.RfidComPortNr}",
|
||||
Type = simulation ? "SIMULATE" : PublicModels.MapPortType("IRDA")
|
||||
},
|
||||
|
||||
StreamingPort = new PublicModels.GciPortConfig
|
||||
{
|
||||
PortName = "NA", //$"COM{genesidHead.OptoComPortNr}",
|
||||
Type = simulation ? "SIMULATE" : string.Empty
|
||||
}
|
||||
};
|
||||
genesidHead?.CommInterfaceBridge.InitSlotAsync(request);
|
||||
log.Debug("BuildConnection() - SlotNr: " + genesidHead.GetSlotNr + " initialized");
|
||||
genesidHead?.CommInterfaceBridge?.UpdateSlotAsync(request);
|
||||
log.Debug("BuildConnection() - SlotNr: " + genesidHead.GetSlotNr + " updated!");
|
||||
|
||||
log.Debug($"BuildConnection() - SlotNr: {genesidHead.GetSlotNr} initializing... Request: {request}");
|
||||
|
||||
var bridge = genesidHead.CommInterfaceBridge;
|
||||
if (bridge == null)
|
||||
throw new InvalidOperationException("CommInterfaceBridge is null.");
|
||||
|
||||
var initResult = await WithTimeout(
|
||||
bridge.InitSlotAsync(request),
|
||||
TimeSpan.FromSeconds(15),
|
||||
"InitSlotAsync timeout");
|
||||
|
||||
log.Debug($"BuildConnection() - SlotNr: {genesidHead.GetSlotNr} initialized. Result: {initResult}");
|
||||
|
||||
if (initResult == null)
|
||||
throw new InvalidOperationException("InitSlotAsync returned null.");
|
||||
|
||||
var updateResult = await WithTimeout(
|
||||
bridge.UpdateSlotAsync(request),
|
||||
TimeSpan.FromSeconds(15),
|
||||
"UpdateSlotAsync timeout");
|
||||
|
||||
log.Debug($"BuildConnection() - SlotNr: {genesidHead.GetSlotNr} updated! Result: {updateResult}");
|
||||
|
||||
if (updateResult == null)
|
||||
throw new InvalidOperationException("UpdateSlotAsync returned null.");
|
||||
|
||||
slotDefined = true;
|
||||
}
|
||||
|
||||
private static async Task<T> WithTimeout<T>(
|
||||
Task<T> task,
|
||||
TimeSpan timeout,
|
||||
string timeoutMessage)
|
||||
{
|
||||
var timeoutTask = Task.Delay(timeout);
|
||||
|
||||
var completedTask = await Task.WhenAny(task, timeoutTask);
|
||||
|
||||
if (completedTask == timeoutTask)
|
||||
throw new TimeoutException(timeoutMessage);
|
||||
|
||||
return await task;
|
||||
}
|
||||
|
||||
public OptoHeadTest(GenesisSmartReader genesisHead)
|
||||
{
|
||||
this.genesisHead = genesisHead;
|
||||
@ -51,62 +110,20 @@ namespace TBF.Rig.RegisterReaders.GenesisRegReader.communication
|
||||
// serialDriver = null;
|
||||
}
|
||||
|
||||
private bool isConnected = false;
|
||||
private bool slotDefined = false;
|
||||
|
||||
public bool IsSlotDefined { get => slotDefined; }
|
||||
|
||||
|
||||
public void DisposeSlot()
|
||||
{
|
||||
slotDefined = false;
|
||||
}
|
||||
public bool IsConnected { get => isConnected; }
|
||||
|
||||
public async Task<bool> ReadSerialNrAsync()
|
||||
public void DisposeSlot() { slotDefined = false; isConnected = false; }
|
||||
|
||||
public async Task<string> ReadRequest_PCBAsync(GenesisSmartReader genesisHead)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (genesisHead == null)
|
||||
return false;
|
||||
log.Debug("ReadRequest_PCB called for iHead: " + genesisHead);
|
||||
|
||||
if (string.IsNullOrEmpty(genesisHead.CommInterface))
|
||||
return false;
|
||||
|
||||
if (genesisHead.CommInterfaceBridge == null)
|
||||
return false;
|
||||
|
||||
if (!IsSlotDefined)
|
||||
BuildConnection(genesisHead);
|
||||
|
||||
GciBridge gciBridge = genesisHead.CommInterfaceBridge;
|
||||
|
||||
gciBridge.GciBridgeCfg.EnableExternalAccess = true;
|
||||
gciBridge.GciBridgeCfg.EnableGuiAccess = false;
|
||||
gciBridge.Initialize();
|
||||
|
||||
RadioService headService = new RadioService(gciBridge);
|
||||
|
||||
string pcbId = await headService.ReadRequest_PCBAsync(genesisHead);
|
||||
|
||||
return !string.IsNullOrEmpty(pcbId);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.Error($"ReadSerialNr(COM{genesisHead?.RfidComPortNr}) - Exception: {ex}");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public string ReadRequest_PCB()
|
||||
{
|
||||
// if (genesisHead.DebugLevel == DebugMode.Simulate)
|
||||
// {
|
||||
// log.Debug("ReadRequest_PCB() - Simulated response");
|
||||
// return "-OK Simulated response-";
|
||||
// }
|
||||
|
||||
try
|
||||
{
|
||||
log.Debug("ReadRequest_PCB called for iHead: " + genesisHead.ToString());
|
||||
if (genesisHead == null)
|
||||
return string.Empty;
|
||||
|
||||
@ -118,31 +135,70 @@ namespace TBF.Rig.RegisterReaders.GenesisRegReader.communication
|
||||
|
||||
if (!IsSlotDefined)
|
||||
{
|
||||
BuildConnection(genesisHead);
|
||||
await BuildConnectionAsync(genesisHead);
|
||||
}
|
||||
|
||||
if (genesisHead.DebugLevel == DebugMode.Simulate)
|
||||
{
|
||||
log.Debug("ReadRequest_PCB() - Simulated response");
|
||||
return "-OK Simulated PCB-";
|
||||
}
|
||||
|
||||
GciBridge gciBridge = genesisHead.CommInterfaceBridge;
|
||||
|
||||
log.Debug("ReadRequest_PCB() - GciBridge created");
|
||||
|
||||
gciBridge.GciBridgeCfg.EnableExternalAccess = true;
|
||||
gciBridge.GciBridgeCfg.EnableGuiAccess = false;
|
||||
|
||||
gciBridge.Initialize();
|
||||
|
||||
log.Debug("ReadRequest_PCB() - GciBridge initialized");
|
||||
|
||||
|
||||
RadioService headService = new RadioService(gciBridge);
|
||||
string serialNo = headService.ReadRequest_PCB(ref genesisHead);
|
||||
log.Info(
|
||||
$"PCB Number: {serialNo} on COM{genesisHead.RfidComPortNr} SlotNr: {genesisHead.GetSlotNr} serialDriver: {genesisHead?.CommInterfaceBridge}");
|
||||
|
||||
|
||||
ReadPcbResult pcbResult = await headService.ReadRequest_PCBAsync(genesisHead);
|
||||
|
||||
if (pcbResult == null)
|
||||
{
|
||||
log.Info( $"PCB Number NOT found on COM{genesisHead.RfidComPortNr} SlotNr: {genesisHead.GetSlotNr}");
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
isConnected = pcbResult.IsConnected;
|
||||
|
||||
string serialNo = pcbResult.PcbId;
|
||||
log.Info( $"PCB Number: {serialNo} on COM{genesisHead.RfidComPortNr} SlotNr: {genesisHead.GetSlotNr}");
|
||||
|
||||
if (pcbResult.IsValidPcb)
|
||||
{
|
||||
genesisHead.SerialNr = pcbResult.PcbId;
|
||||
if (genesisHead.ConfigStruct != null)
|
||||
{
|
||||
genesisHead.ConfigStruct.PCBNumberString = pcbResult.PcbId;
|
||||
}
|
||||
log.Info( $"PCB STORED TO HEAD Number: {serialNo} on COM{genesisHead.RfidComPortNr} SlotNr: {genesisHead.GetSlotNr} is valid");
|
||||
}
|
||||
|
||||
return serialNo;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.Error("ReadRequest_PCB() - Exception:" + ex.StackTrace);
|
||||
return (ex.Message.ToString());
|
||||
log.Error("ReadRequest_PCBAsync() - Exception:", ex);
|
||||
return ex.Message;
|
||||
}
|
||||
}
|
||||
|
||||
public string ReadRequest_PCB()
|
||||
{
|
||||
return Task.Run(() => ReadRequest_PCBAsync(genesisHead))
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Set Test mode
|
||||
/// </summary>
|
||||
@ -150,19 +206,79 @@ namespace TBF.Rig.RegisterReaders.GenesisRegReader.communication
|
||||
/// <returns></returns>
|
||||
public bool SetTestMode()
|
||||
{
|
||||
if (!IsSlotDefined)
|
||||
{
|
||||
BuildConnection(genesisHead);
|
||||
}
|
||||
|
||||
log.Debug("SetTestMode called for iHead: " + genesisHead.ToString());
|
||||
bool activityModeActive = SetActivityMode_Active();
|
||||
bool optActiveMode = SetOptTestMode();
|
||||
|
||||
log.Debug("SetTestMode result: optoMod-> " + optActiveMode + " meterModeActive ->" + activityModeActive);
|
||||
return (optActiveMode && activityModeActive);
|
||||
return Task.Run(SetTestMode_Async)
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public async Task<bool> SetTestMode_Async()
|
||||
{
|
||||
try
|
||||
{
|
||||
log.Debug("SetTestMode_Async called for iHead: " + genesisHead);
|
||||
|
||||
if (genesisHead == null)
|
||||
return false;
|
||||
|
||||
if (string.IsNullOrEmpty(genesisHead.CommInterface))
|
||||
return false;
|
||||
|
||||
if (genesisHead.CommInterfaceBridge == null)
|
||||
return false;
|
||||
|
||||
if (!IsSlotDefined)
|
||||
{
|
||||
await BuildConnectionAsync(genesisHead);
|
||||
}
|
||||
|
||||
if (genesisHead.DebugLevel == DebugMode.Simulate)
|
||||
{
|
||||
log.Debug("SetTestMode_Async() - Simulated response");
|
||||
return true;
|
||||
}
|
||||
|
||||
GciBridge gciBridge = genesisHead.CommInterfaceBridge;
|
||||
|
||||
log.Debug("SetTestMode_Async() - GciBridge created");
|
||||
|
||||
gciBridge.GciBridgeCfg.EnableExternalAccess = true;
|
||||
gciBridge.GciBridgeCfg.EnableGuiAccess = false;
|
||||
gciBridge.Initialize();
|
||||
|
||||
log.Debug("SetTestMode_Async() - GciBridge initialized");
|
||||
|
||||
RadioService headService = new RadioService(gciBridge);
|
||||
var ledModeAsync = await headService.SetLedMode_Async(genesisHead, LedState.active, isConnected);
|
||||
|
||||
if (!ledModeAsync)
|
||||
{
|
||||
log.Info(
|
||||
$"FAILED - SET LED MODE ACTIVE on COM{genesisHead.RfidComPortNr} SlotNr: {genesisHead.GetSlotNr}");
|
||||
return false;
|
||||
}
|
||||
|
||||
isConnected = true;
|
||||
|
||||
try
|
||||
{
|
||||
await headService.Disconnect_Async(genesisHead);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.Error("SetTestMode_Async() - DISCONNECT Exception:", ex);
|
||||
}
|
||||
|
||||
|
||||
return ledModeAsync;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.Error("SetTestMode_Async() - Exception:", ex);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set Active mode
|
||||
/// </summary>
|
||||
@ -170,16 +286,77 @@ namespace TBF.Rig.RegisterReaders.GenesisRegReader.communication
|
||||
/// <returns></returns>
|
||||
public bool SetActiveMode()
|
||||
{
|
||||
if (!IsSlotDefined)
|
||||
return Task.Run(SetActiveMode_Async)
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
}
|
||||
|
||||
|
||||
public async Task<bool> SetActiveMode_Async()
|
||||
{
|
||||
try
|
||||
{
|
||||
BuildConnection(genesisHead);
|
||||
}
|
||||
log.Debug("SetActiveMode_Async called for iHead: " + genesisHead);
|
||||
|
||||
log.Debug("SetActiveMode called for iHead: " + genesisHead.ToString());
|
||||
bool optActiveMode = SetOptActiveMode(genesisHead);
|
||||
//bool activityModeIdle = SetActivityMode_Idle();
|
||||
|
||||
return optActiveMode;
|
||||
if (genesisHead == null)
|
||||
return false;
|
||||
|
||||
if (string.IsNullOrEmpty(genesisHead.CommInterface))
|
||||
return false;
|
||||
|
||||
if (genesisHead.CommInterfaceBridge == null)
|
||||
return false;
|
||||
|
||||
if (!IsSlotDefined)
|
||||
{
|
||||
await BuildConnectionAsync(genesisHead);
|
||||
}
|
||||
|
||||
if (genesisHead.DebugLevel == DebugMode.Simulate)
|
||||
{
|
||||
log.Debug("SetActiveMode_Async() - Simulated response");
|
||||
return true;
|
||||
}
|
||||
|
||||
GciBridge gciBridge = genesisHead.CommInterfaceBridge;
|
||||
|
||||
log.Debug("SetActiveMode_Async() - GciBridge created");
|
||||
|
||||
gciBridge.GciBridgeCfg.EnableExternalAccess = true;
|
||||
gciBridge.GciBridgeCfg.EnableGuiAccess = false;
|
||||
gciBridge.Initialize();
|
||||
|
||||
log.Debug("SetActiveMode_Async() - GciBridge initialized");
|
||||
|
||||
RadioService headService = new RadioService(gciBridge);
|
||||
var ledModeAsync = await headService.SetLedMode_Async(genesisHead, LedState.inactive, isConnected);
|
||||
|
||||
if (!ledModeAsync)
|
||||
{
|
||||
log.Info(
|
||||
$"FAILED - SET LED MODE INACTIVE on COM{genesisHead.RfidComPortNr} SlotNr: {genesisHead.GetSlotNr}");
|
||||
return false;
|
||||
}
|
||||
|
||||
isConnected = true;
|
||||
|
||||
try
|
||||
{
|
||||
await headService.Disconnect_Async(genesisHead);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.Error("SetActiveMode_Async() - DISCONNECT Exception:", ex);
|
||||
}
|
||||
|
||||
|
||||
return ledModeAsync;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.Error("SetActiveMode_Async() - Exception:", ex);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -242,7 +419,7 @@ namespace TBF.Rig.RegisterReaders.GenesisRegReader.communication
|
||||
// if (genesisHead != null)
|
||||
// {
|
||||
// if(genesisHead.RfidComPortNr != 0 && !genesisHead?.CommInterfaceBridgeComponent?.GciExternalInterface?.IsConnected == false)
|
||||
// BuildConnection(genesisHead);
|
||||
// BuildConnection(genesisHead).ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
//
|
||||
//
|
||||
// RadioService headService = new RadioService(genesisHead?.CommInterfaceBridgeComponent);
|
||||
@ -276,19 +453,17 @@ namespace TBF.Rig.RegisterReaders.GenesisRegReader.communication
|
||||
return "-OK Simulated response-";
|
||||
}
|
||||
|
||||
// try
|
||||
// {
|
||||
// bool activeMode = SetActiveMode();
|
||||
// isTestModeSuccessful = activeMode;
|
||||
// return activeMode ? "Set Active Mode - OK" : "Set Active Mode - FAILED";
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// log.Error("SetActiveMode() - Exception:" + ex.StackTrace);
|
||||
// return "Set Active Mode - Exception";
|
||||
// }
|
||||
|
||||
return "Set Active Mode - No Implemented Exception";
|
||||
try
|
||||
{
|
||||
bool testMode = SetActiveMode();
|
||||
isTestModeSuccessful = testMode;
|
||||
return testMode ? "Set Active Mode - OK" : "Set Active Mode - FAILED";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.Error("SetActiveMode() - Exception:" + ex.StackTrace);
|
||||
return "Set Active Mode - Exception";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -304,7 +479,7 @@ namespace TBF.Rig.RegisterReaders.GenesisRegReader.communication
|
||||
// if (iHead != null)
|
||||
// {
|
||||
// if(genesisHead.RfidComPortNr != 0 && !genesisHead?.CommInterfaceBridgeComponent?.GciExternalInterface?.IsConnected == false)
|
||||
// BuildConnection(genesisHead);
|
||||
// BuildConnection(genesisHead).ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
//
|
||||
// RadioService headService = new RadioService(genesisHead?.CommInterfaceBridgeComponent);
|
||||
// return headService.SetOptActiveMode(iHead);
|
||||
@ -324,26 +499,61 @@ namespace TBF.Rig.RegisterReaders.GenesisRegReader.communication
|
||||
/// <param name="iHead"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="Exception"></exception>
|
||||
private bool SetActivityMode_Active()
|
||||
private async Task<bool> SetActivityMode_Active()
|
||||
{
|
||||
|
||||
// try
|
||||
// {
|
||||
// if (genesisHead != null)
|
||||
// {
|
||||
// if (genesisHead.RfidComPortNr != 0 &&
|
||||
// !genesisHead?.CommInterfaceBridgeComponent?.GciExternalInterface?.IsConnected == false)
|
||||
// BuildConnection(genesisHead);
|
||||
//
|
||||
// log.Debug("SetActivityMode_Active called for iHead: " + genesisHead.ToString());
|
||||
// RadioService headService = new RadioService(genesisHead?.CommInterfaceBridgeComponent);
|
||||
// return headService.SetActivityMode_Active(genesisHead);
|
||||
// }
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// log.Error("SetActivityMode_Active() - Exception:" + ex.StackTrace);
|
||||
// }
|
||||
try
|
||||
{
|
||||
log.Debug("SetActivityMode_Active called for iHead: " + genesisHead);
|
||||
|
||||
if (genesisHead == null)
|
||||
return false;
|
||||
|
||||
if (string.IsNullOrEmpty(genesisHead.CommInterface))
|
||||
return false;
|
||||
|
||||
if (genesisHead.CommInterfaceBridge == null)
|
||||
return false;
|
||||
|
||||
if (!IsSlotDefined)
|
||||
{
|
||||
await BuildConnectionAsync(genesisHead);
|
||||
}
|
||||
|
||||
if (genesisHead.DebugLevel == DebugMode.Simulate)
|
||||
{
|
||||
log.Debug("SetActivityMode_Active() - Simulated response");
|
||||
return true;
|
||||
}
|
||||
|
||||
GciBridge gciBridge = genesisHead.CommInterfaceBridge;
|
||||
|
||||
log.Debug("SetActivityMode_Active() - GciBridge created");
|
||||
|
||||
gciBridge.GciBridgeCfg.EnableExternalAccess = true;
|
||||
gciBridge.GciBridgeCfg.EnableGuiAccess = false;
|
||||
|
||||
gciBridge.Initialize();
|
||||
|
||||
log.Debug("SetActivityMode_Active() - GciBridge initialized");
|
||||
|
||||
RadioService headService = new RadioService(gciBridge);
|
||||
var active = await headService.SetActivityMode_Active(genesisHead, isConnected);
|
||||
|
||||
if (!active)
|
||||
{
|
||||
log.Info( $"SetActivityMode_Active not set on COM{genesisHead.RfidComPortNr} SlotNr: {genesisHead.GetSlotNr}");
|
||||
return false;
|
||||
}
|
||||
|
||||
log.Info( $"SetActivityMode_Active set on COM{genesisHead.RfidComPortNr} SlotNr: {genesisHead.GetSlotNr}");
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.Error("SetActivityMode_Active() - Exception:", ex);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -362,7 +572,7 @@ namespace TBF.Rig.RegisterReaders.GenesisRegReader.communication
|
||||
// {
|
||||
// if (genesisHead.RfidComPortNr != 0 &&
|
||||
// !genesisHead?.CommInterfaceBridgeComponent?.GciExternalInterface?.IsConnected == false)
|
||||
// BuildConnection(genesisHead);
|
||||
// BuildConnection(genesisHead).ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
//
|
||||
// log.Debug("SetActivityMode_Idle called for iHead: " + genesisHead.ToString());
|
||||
//
|
||||
@ -407,7 +617,7 @@ namespace TBF.Rig.RegisterReaders.GenesisRegReader.communication
|
||||
//
|
||||
// if (genesisHead.RfidComPortNr != 0 &&
|
||||
// !genesisHead?.CommInterfaceBridgeComponent?.GciExternalInterface?.IsConnected == false)
|
||||
// BuildConnection(genesisHead);
|
||||
// BuildConnection(genesisHead).ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
//
|
||||
// RadioService headService = new RadioService(genesisHead?.CommInterfaceBridgeComponent);
|
||||
// genesisHead.ConfigStruct.PCBNumberString = headService.ReadRequest_PCB(ref genesisHead);
|
||||
@ -416,7 +626,7 @@ namespace TBF.Rig.RegisterReaders.GenesisRegReader.communication
|
||||
//
|
||||
// if (ledState != DiagnosticLedState.StatusUnknown) // do set
|
||||
// {
|
||||
// genesisHead.ConfigStruct.OpthoStatusMode = headService.SetOptoStatusMode(genesisHead, ledState);
|
||||
// genesisHead.ConfigStruct.OpthoStatusMode = headService.SetLedMode_Async(genesisHead, ledState);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
|
||||
@ -1,23 +1,38 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using GenesisCordonelInterface.API;
|
||||
using log4net;
|
||||
using TBF.Rig.BridgeComponents.GciBridge;
|
||||
using TBF.Rig.RegisterReaders.GenesisRegReader.common;
|
||||
using TBF.Rig.RegisterReaders.GenesisRegReader.communication.common;
|
||||
using TBF.Rig.RegisterReaders.GenesisRegReader.implementations;
|
||||
using TBF.Rig.TestMethods.iPerlCommunication.communication.C4.diagnosticLed;
|
||||
using TBF.Rig.TestMethods.iPerlCommunication.communication.C4.protocolCommons;
|
||||
using PublicModels = TBF.Rig.BridgeComponents.GciBridge.Interfaces.PublicModels;
|
||||
|
||||
|
||||
namespace TBF.Rig.RegisterReaders.GenesisRegReader.communication
|
||||
{
|
||||
public class ReadPcbResult
|
||||
{
|
||||
public bool IsConnected { get; set; }
|
||||
|
||||
public bool IsLoggedOn { get; set; }
|
||||
|
||||
public bool IsValidPcb { get; set; }
|
||||
|
||||
public string PcbId { get; set; }
|
||||
|
||||
public string Message { get; set; }
|
||||
}
|
||||
|
||||
public class RadioService
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(RadioService));
|
||||
|
||||
static string okResponse = "Command complete, no errors";
|
||||
static string errorResponse = "Unable to execute";
|
||||
|
||||
|
||||
private bool bConnected = false;
|
||||
|
||||
private GciBridge _bridge;
|
||||
|
||||
public RadioService(GciBridge genesisHeadCommInterfaceBridgeComponent)
|
||||
@ -25,261 +40,465 @@ namespace TBF.Rig.RegisterReaders.GenesisRegReader.communication
|
||||
this._bridge = genesisHeadCommInterfaceBridgeComponent;
|
||||
log.Debug("RadioService created with GciBridge= " + genesisHeadCommInterfaceBridgeComponent + "");
|
||||
}
|
||||
|
||||
public async Task<string> ReadRequest_PCBAsyn1(GenesisSmartReader iHead)
|
||||
|
||||
private async Task<ReadPcbResult> EnsureConnectedAsync(
|
||||
GenesisSmartReader head,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
if (iHead?.CommInterfaceBridge == null)
|
||||
return null;
|
||||
|
||||
var connectTask = iHead.CommInterfaceBridge.ConnectAsync(iHead.GetSlotNr);
|
||||
|
||||
// Wait either for ConnectAsync or timeout
|
||||
if (await Task.WhenAny(connectTask, Task.Delay(TimeSpan.FromMinutes(1))) != connectTask)
|
||||
log.Debug("EnsureConnectedAsync called for iHead: " + head);
|
||||
if (head?.CommInterfaceBridge == null)
|
||||
{
|
||||
// Timed out
|
||||
return null;
|
||||
return new ReadPcbResult
|
||||
{
|
||||
IsConnected = false,
|
||||
IsLoggedOn = false,
|
||||
IsValidPcb = false,
|
||||
Message = "CommInterfaceBridge is null."
|
||||
};
|
||||
}
|
||||
|
||||
var slotInfo = await _bridge.GetSlotAsync(head.GetSlotNr);
|
||||
if (slotInfo == null || !slotInfo.Success)
|
||||
{
|
||||
//just no definet yet ?
|
||||
log.Debug("EnsureConnectedAsync() - SlotInfo is null.");
|
||||
}
|
||||
else if (slotInfo.IsConnected)
|
||||
{
|
||||
log.Debug("EnsureConnectedAsync() - Slot: " + slotInfo);
|
||||
return new ReadPcbResult
|
||||
{
|
||||
IsConnected = true,
|
||||
IsLoggedOn = slotInfo.IsLoggedOn,
|
||||
IsValidPcb = false,
|
||||
PcbId = slotInfo.PcbId,
|
||||
Message = "Already connected."
|
||||
};
|
||||
}
|
||||
|
||||
log.Debug("EnsureConnectedAsync() - Connecting...");
|
||||
|
||||
var connectTask = head.CommInterfaceBridge.ConnectAsync(head.GetSlotNr, token);
|
||||
var timeoutTask = Task.Delay(TimeSpan.FromMinutes(1), token);
|
||||
|
||||
var completedTask = await Task.WhenAny(connectTask, timeoutTask);
|
||||
|
||||
if (completedTask != connectTask)
|
||||
{
|
||||
return new ReadPcbResult
|
||||
{
|
||||
IsConnected = false,
|
||||
IsLoggedOn = false,
|
||||
IsValidPcb = false,
|
||||
Message = "Connect timeout."
|
||||
};
|
||||
}
|
||||
|
||||
var result = await connectTask;
|
||||
|
||||
if (result == null || !result.Success || !result.IsLoggedOn)
|
||||
return null;
|
||||
|
||||
string pcbId = result.PcbId;
|
||||
|
||||
if (!string.IsNullOrEmpty(pcbId))
|
||||
if (result == null || !result.Success)
|
||||
{
|
||||
if (iHead.ConfigStruct != null)
|
||||
iHead.ConfigStruct.PCBNumberString = pcbId;
|
||||
|
||||
return pcbId;
|
||||
return new ReadPcbResult
|
||||
{
|
||||
IsConnected = false,
|
||||
IsLoggedOn = false,
|
||||
IsValidPcb = false,
|
||||
Message = result == null ? "Connect result is null." : "Connect failed."
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
return new ReadPcbResult
|
||||
{
|
||||
IsConnected = result.IsConnected,
|
||||
IsLoggedOn = false,
|
||||
IsValidPcb = false,
|
||||
Message = "Connected OK."
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
public async Task<PublicModels.UdsPasswordResult> FindKeyStone(
|
||||
string txtPCBId,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
string pcbId = txtPCBId?.Trim();
|
||||
|
||||
if (string.IsNullOrWhiteSpace(pcbId))
|
||||
throw new Exception("PCB ID is empty.");
|
||||
|
||||
token.ThrowIfCancellationRequested();
|
||||
|
||||
PublicModels.UdsPasswordResult result = await _bridge.GetPasswordAsync(pcbId, token);
|
||||
|
||||
log.Debug("GetPasswordAsync PCB=" + pcbId + " Result: " + result);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public async Task<GenesisCordonelInterface.API.PublicModels.GciLoginResult> LoginByPasswordAsync(
|
||||
int slotId, string txtPassword,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(txtPassword))
|
||||
throw new Exception("LoginByPasswordAsync() - PASSWORD is empty.");
|
||||
|
||||
token.ThrowIfCancellationRequested();
|
||||
|
||||
log.Debug("LoginByPasswordAsync( Slot: {0}) - set password to: " + txtPassword.Substring(0, 4) + "************");
|
||||
var gciSetPasswordResult = await _bridge.SetPasswordAsync(slotId,txtPassword, token);
|
||||
log.Debug("LoginByPasswordAsync( Slot: {0}) - SetPasswordAsync Result: " + gciSetPasswordResult);
|
||||
|
||||
log.Debug($"LoginByPasswordAsync( Slot: {slotId}) - START LOGIN");
|
||||
|
||||
GenesisCordonelInterface.API.PublicModels.GciLoginResult result = await _bridge.LoginAsync(slotId, token);
|
||||
|
||||
log.Debug($"LoginByPasswordAsync( Slot: {slotId}) Result: " + result);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public async Task<string> ReadRequest_PCBAsync(GenesisSmartReader iHead)
|
||||
public async Task<ReadPcbResult> ReadRequest_PCBAsync( GenesisSmartReader head)
|
||||
{
|
||||
log.Debug("ReadRequest_PCB called for iHead: " + iHead);
|
||||
|
||||
if (iHead?.CommInterfaceBridge == null)
|
||||
return null;
|
||||
|
||||
using var cts = new CancellationTokenSource(TimeSpan.FromMinutes(1));
|
||||
|
||||
PublicModels.GciConnectResult result;
|
||||
|
||||
try
|
||||
{
|
||||
log.Debug("ReadRequest_PCB() - calling ConnectAsync");
|
||||
|
||||
result = await iHead.CommInterfaceBridge
|
||||
.ConnectAsync(iHead.GetSlotNr, cts.Token)
|
||||
.ConfigureAwait(false);
|
||||
|
||||
log.Debug("ReadRequest_PCB() - ConnectAsync completed");
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
log.Debug("ReadRequest_PCB() - ConnectAsync timeout/cancelled");
|
||||
return null;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.Error("ReadRequest_PCB() - ConnectAsync failed", ex);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (result == null || !result.Success || !result.IsLoggedOn)
|
||||
{
|
||||
log.Debug("ReadRequest_PCB() - invalid result: " + result);
|
||||
return null;
|
||||
}
|
||||
|
||||
string pcbId = result.PcbId;
|
||||
|
||||
if (string.IsNullOrEmpty(pcbId))
|
||||
{
|
||||
log.Debug("ReadRequest_PCB() - pcbId is empty");
|
||||
return null;
|
||||
}
|
||||
|
||||
if (iHead.ConfigStruct != null)
|
||||
{
|
||||
iHead.ConfigStruct.PCBNumberString = pcbId;
|
||||
log.Debug("ReadRequest_PCB() - PCBNumberString: " + pcbId);
|
||||
}
|
||||
|
||||
return pcbId;
|
||||
}
|
||||
|
||||
public string ReadRequest_PCB(ref GenesisSmartReader iHead)
|
||||
{
|
||||
var head = iHead; // <-- copy to local (no longer ref)
|
||||
|
||||
log.Debug("ReadRequest_PCB called for iHead: " + head);
|
||||
|
||||
if (head?.CommInterfaceBridge == null)
|
||||
return null;
|
||||
{
|
||||
return new ReadPcbResult
|
||||
{
|
||||
IsConnected = false,
|
||||
IsValidPcb = false,
|
||||
Message = "CommInterfaceBridge is null."
|
||||
};
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var connectTask = Task.Run(async () =>
|
||||
await head.CommInterfaceBridge.ConnectAsync(head.GetSlotNr)
|
||||
);
|
||||
// CONNECT ONLY IF NEEDED
|
||||
var connectResult =
|
||||
await EnsureConnectedAsync(head);
|
||||
|
||||
var completedTask = Task.WhenAny(
|
||||
connectTask,
|
||||
Task.Delay(TimeSpan.FromMinutes(1))
|
||||
).GetAwaiter().GetResult();
|
||||
|
||||
if (completedTask != connectTask)
|
||||
if (!connectResult.IsConnected)
|
||||
{
|
||||
log.Debug("ReadRequest_PCB() - Timeout happened");
|
||||
return null;
|
||||
return connectResult;
|
||||
}
|
||||
|
||||
var result = connectTask.GetAwaiter().GetResult();
|
||||
log.Debug("ReadRequest_PCB() - Result: " + result);
|
||||
log.Debug($"ReadRequest_PCB() connect - {connectResult.Message}");
|
||||
|
||||
|
||||
if (result == null || !result.Success || !result.IsLoggedOn)
|
||||
return null;
|
||||
// PCB READ LOOP
|
||||
string validPcbId = null;
|
||||
int maxAttempts = 5;
|
||||
DateTime startTime = DateTime.UtcNow;
|
||||
TimeSpan maxDuration = TimeSpan.FromSeconds(10);
|
||||
|
||||
var pcbId = result.PcbId;
|
||||
log.Debug("Result pcbId: " + pcbId);
|
||||
|
||||
if (!string.IsNullOrEmpty(pcbId) && head.ConfigStruct != null)
|
||||
//LOOP
|
||||
for (int attempt = 1; attempt <= maxAttempts; attempt++)
|
||||
{
|
||||
head.ConfigStruct.PCBNumberString = pcbId;
|
||||
log.Debug("Result set to ConfigStruct.PCBNumberString = " + head.ConfigStruct.PCBNumberString);
|
||||
if (DateTime.UtcNow - startTime > maxDuration)
|
||||
{
|
||||
log.Debug("ReadRequest_PCB() - PCB max duration exceeded");
|
||||
break;
|
||||
}
|
||||
|
||||
log.Debug($"ReadRequest_PCB() - PCB attempt {attempt}/{maxAttempts}");
|
||||
var pcbTask = head.CommInterfaceBridge.GetPcbIdAsync(head.GetSlotNr);
|
||||
var timeoutTaskPcb = Task.Delay(TimeSpan.FromSeconds(5));
|
||||
var completedTaskPcb = await Task.WhenAny(pcbTask, timeoutTaskPcb);
|
||||
|
||||
if (completedTaskPcb != pcbTask)
|
||||
{
|
||||
log.Debug($"ReadRequest_PCB() PCB attempt {attempt} - Timeout");
|
||||
continue;
|
||||
}
|
||||
|
||||
var resultPCB = await pcbTask;
|
||||
|
||||
// VALIDATION BLOCK
|
||||
{
|
||||
if (resultPCB == null)
|
||||
{
|
||||
log.Debug($"ReadRequest_PCB() PCB attempt {attempt} - result is null");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!resultPCB.Success)
|
||||
{
|
||||
log.Debug($"ReadRequest_PCB() PCB attempt {attempt} - Success=false");
|
||||
continue;
|
||||
}
|
||||
|
||||
string pcbId = resultPCB.PcbId;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(pcbId))
|
||||
{
|
||||
log.Debug($"ReadRequest_PCB() PCB attempt {attempt} - PCB empty");
|
||||
continue;
|
||||
}
|
||||
|
||||
pcbId = pcbId.Trim();
|
||||
|
||||
if (pcbId.Length != 9)
|
||||
{
|
||||
log.Debug( $"ReadRequest_PCB() PCB attempt {attempt} - Invalid PCB length: '{pcbId}', len={pcbId.Length}");
|
||||
continue;
|
||||
}
|
||||
|
||||
validPcbId = pcbId;
|
||||
log.Debug($"ReadRequest_PCB() PCB valid: {validPcbId}");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return pcbId;
|
||||
if (string.IsNullOrEmpty(validPcbId))
|
||||
{
|
||||
return new ReadPcbResult
|
||||
{
|
||||
IsConnected = connectResult.IsConnected,
|
||||
IsValidPcb = false,
|
||||
PcbId = null,
|
||||
Message = "Valid PCB not found."
|
||||
};
|
||||
}
|
||||
|
||||
if (head.ConfigStruct != null)
|
||||
{
|
||||
head.ConfigStruct.PCBNumberString = validPcbId;
|
||||
}
|
||||
|
||||
return new ReadPcbResult
|
||||
{
|
||||
IsConnected = connectResult.IsConnected,
|
||||
IsValidPcb = true,
|
||||
PcbId = validPcbId,
|
||||
Message = "PCB OK"
|
||||
};
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.Error("ReadRequest_PCB() failed", ex);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
log.Error("ReadRequest_PCBAsync() failed", ex);
|
||||
|
||||
public string ReadRequest_PCB2(ref GenesisSmartReader iHead)
|
||||
{
|
||||
return ReadRequest_PCBAsync(iHead).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public string ReadRequest_PCB1(ref GenesisSmartReader iHead)
|
||||
{
|
||||
log.Debug("ReadRequest_PCB called for iHead: " + iHead.ToString());
|
||||
if (iHead?.CommInterfaceBridge == null)
|
||||
return null;
|
||||
|
||||
// -- connection --
|
||||
var connectTask = iHead.CommInterfaceBridge.ConnectAsync(iHead.GetSlotNr);
|
||||
log.Debug("ReadRequest_PCB() - ConnectAsync created, Now waiting for result");
|
||||
|
||||
var completedTask = Task.WhenAny(
|
||||
connectTask,
|
||||
Task.Delay(TimeSpan.FromMinutes(1))
|
||||
).GetAwaiter().GetResult();
|
||||
|
||||
log.Debug("ReadRequest_PCB() - CompletedTask: " + completedTask);
|
||||
|
||||
// Timeout happened
|
||||
if (completedTask != connectTask)
|
||||
{
|
||||
log.Debug("ReadRequest_PCB() - Timeout happened");
|
||||
return null;
|
||||
}
|
||||
|
||||
var result = connectTask.GetAwaiter().GetResult();
|
||||
log.Debug("ReadRequest_PCB() - ConnectAsync completed");
|
||||
|
||||
if (result == null || !result.Success || !result.IsLoggedOn)
|
||||
return null;
|
||||
log.Debug("ReadRequest_PCB() - result: " + result);
|
||||
//~ -- connection --
|
||||
|
||||
string pcbId = result.PcbId;
|
||||
log.Debug("ReadRequest_PCB() - pcbId: " + pcbId);
|
||||
|
||||
if (!string.IsNullOrEmpty(pcbId))
|
||||
{
|
||||
if (iHead.ConfigStruct != null)
|
||||
return new ReadPcbResult
|
||||
{
|
||||
iHead.ConfigStruct.PCBNumberString = pcbId;
|
||||
log.Debug("ReadRequest_PCB() - iHead.ConfigStruct.PCBNumberString: " +
|
||||
iHead.ConfigStruct.PCBNumberString);
|
||||
IsConnected = false,
|
||||
IsValidPcb = false,
|
||||
PcbId = null,
|
||||
Message = ex.Message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<bool> PrepareLoginAdnConnect_Async(
|
||||
GenesisSmartReader iHead,
|
||||
bool isConnected,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
log.Debug("PrepareLoginAdnConnect_Async called for iHead: " + iHead + " isConnected: " + isConnected);
|
||||
|
||||
if (iHead?.CommInterfaceBridge == null)
|
||||
return false;
|
||||
|
||||
try
|
||||
{
|
||||
token.ThrowIfCancellationRequested();
|
||||
|
||||
var connectResult = await EnsureConnectedAsync(iHead, token);
|
||||
|
||||
if (!connectResult.IsConnected)
|
||||
return false;
|
||||
log.Debug($"PrepareLoginAdnConnect_Async() connect - {connectResult.Message}");
|
||||
|
||||
if (connectResult.IsLoggedOn)
|
||||
return true;
|
||||
|
||||
//get stored PCB - Keystone
|
||||
log.Debug("Have we PCB stored?");
|
||||
string pcb = iHead.ConfigStruct?.PCBNumberString;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(pcb))
|
||||
{
|
||||
pcb = connectResult.PcbId;
|
||||
if (string.IsNullOrWhiteSpace(pcb))
|
||||
{
|
||||
pcb = iHead.SerialNr;
|
||||
}
|
||||
//GET PCB FROM Meter
|
||||
if (string.IsNullOrWhiteSpace(pcb))
|
||||
{
|
||||
log.Debug("PrepareLoginAdnConnect_Async() No PCB stored. Trying to get PCB from Meter");
|
||||
var pcbResult = await ReadRequest_PCBAsync(iHead);
|
||||
if (pcbResult.IsValidPcb)
|
||||
{
|
||||
pcb = pcbResult.PcbId;
|
||||
iHead.SerialNr = pcb;
|
||||
if (iHead.ConfigStruct != null)
|
||||
{
|
||||
iHead.ConfigStruct.PCBNumberString = pcb;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return pcbId;
|
||||
if (string.IsNullOrWhiteSpace(pcb))
|
||||
{
|
||||
log.Debug("PrepareLoginAdnConnect_Async() No PCB stored. MISSING PCB!!!!!");
|
||||
return false;
|
||||
}
|
||||
|
||||
log.Debug( $"PrepareLoginAdnConnect_Async() Start Find Keystone Slot: {iHead.GetSlotNr} PCB:{iHead.SerialNr} Calib PCB:{pcb} - find keystone");
|
||||
|
||||
var keyStoneResult = await FindKeyStone(pcb, token);
|
||||
|
||||
if (keyStoneResult == null || !keyStoneResult.Success)
|
||||
return false;
|
||||
|
||||
//LOGIN
|
||||
|
||||
log.Debug( $"PrepareLoginAdnConnect_Async() Start Login Slot: {iHead.GetSlotNr} PCB:{iHead.SerialNr} Calib PCB:{pcb} - login");
|
||||
GenesisCordonelInterface.API.PublicModels.GciLoginResult loginByPasswordAsync =
|
||||
await LoginByPasswordAsync(iHead.GetSlotNr, keyStoneResult.Password, token);
|
||||
|
||||
if (loginByPasswordAsync == null || !loginByPasswordAsync.Success)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
log.Debug($"PrepareLoginAdnConnect_Async() Login OK");
|
||||
return true;
|
||||
}
|
||||
|
||||
log.Debug("ReadRequest_PCB() - pcbId is empty");
|
||||
return null;
|
||||
}
|
||||
|
||||
public ProtocolStatuses GetActivityStatusMode(GenesisSmartReader iHead)
|
||||
{
|
||||
if (iHead?.CommInterfaceBridge == null)
|
||||
return ProtocolStatuses.Unknown;
|
||||
|
||||
var connectResult = iHead.CommInterfaceBridge
|
||||
.ConnectAsync(iHead.GetSlotNr)
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
|
||||
if (connectResult == null || !connectResult.Success || !connectResult.IsLoggedOn)
|
||||
return ProtocolStatuses.Unknown;
|
||||
|
||||
var pcbResult = iHead.CommInterfaceBridge
|
||||
.GetPcbIdAsync(iHead.GetSlotNr)
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
|
||||
if (pcbResult == null || !pcbResult.Success || string.IsNullOrWhiteSpace(pcbResult.PcbId))
|
||||
return ProtocolStatuses.Unknown;
|
||||
|
||||
if (iHead.ConfigStruct != null)
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
iHead.ConfigStruct.PCBNumberString = pcbResult.PcbId;
|
||||
log.Debug("PrepareLoginAdnConnect_Async() canceled.");
|
||||
return false;
|
||||
}
|
||||
|
||||
return ProtocolStatuses.Active;
|
||||
}
|
||||
|
||||
public DiagnosticLedState SetOptoStatusMode(GenesisSmartReader iHead, DiagnosticLedState opthoStatusMode)
|
||||
public static readonly String LedMode = "GENESISFLOW_LedMode";
|
||||
|
||||
public async Task<LedState> GetActivityLedStatusMode_Async(
|
||||
GenesisSmartReader iHead,
|
||||
bool isConnected,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
log.Debug("GetActivityLedStatusMode_Async called for iHead: " + iHead + " isConnected: " + isConnected);
|
||||
|
||||
if (iHead?.CommInterfaceBridge == null)
|
||||
return DiagnosticLedState.StatusUnknown;
|
||||
return LedState.Unknown;
|
||||
|
||||
var connectResult = iHead.CommInterfaceBridge
|
||||
.ConnectAsync(iHead.GetSlotNr)
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
|
||||
if (connectResult == null || !connectResult.Success || !connectResult.IsLoggedOn)
|
||||
return DiagnosticLedState.StatusUnknown;
|
||||
|
||||
//SetDiagnosticLEDState
|
||||
|
||||
var pcbResult = iHead.CommInterfaceBridge
|
||||
.GetPcbIdAsync(iHead.GetSlotNr)
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
|
||||
if (pcbResult == null || !pcbResult.Success || string.IsNullOrWhiteSpace(pcbResult.PcbId))
|
||||
return DiagnosticLedState.StatusUnknown;
|
||||
|
||||
if (iHead.ConfigStruct != null)
|
||||
try
|
||||
{
|
||||
iHead.ConfigStruct.PCBNumberString = pcbResult.PcbId;
|
||||
var loginAdnConnectAsync = await PrepareLoginAdnConnect_Async(iHead, isConnected, token);
|
||||
|
||||
if (!loginAdnConnectAsync)
|
||||
return LedState.Unknown;
|
||||
|
||||
//Get Activity Status
|
||||
|
||||
GenesisCordonelInterface.API.PublicModels.RegisterReadResult registerReadResult =
|
||||
await _bridge.ReadRegisterAsync(iHead.GetSlotNr,LedMode, token);
|
||||
|
||||
if (registerReadResult == null || !registerReadResult.Success)
|
||||
{
|
||||
return LedState.Unknown;
|
||||
}
|
||||
log.Debug($"GetActivityStatusMode() Read Register OK Response: {registerReadResult}");
|
||||
try
|
||||
{
|
||||
byte[] bytes = HexFormatter.HexStringToByteArray(registerReadResult.RawHex);
|
||||
//Convert byte array to int
|
||||
if (bytes == null || bytes.Length < 4)
|
||||
{
|
||||
log.Debug("Invalid byte array length");
|
||||
return LedState.Unknown;
|
||||
}
|
||||
|
||||
int value = BitConverter.ToInt32(bytes, 0);
|
||||
|
||||
// continue your real status logic here...
|
||||
return value == 6 ? LedState.active : LedState.inactive;
|
||||
}catch(Exception ex)
|
||||
{
|
||||
log.Error("GetActivityStatusMode() failed", ex);
|
||||
return LedState.Unknown;
|
||||
}
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
log.Debug("GetActivityLedStatusMode_Async() canceled.");
|
||||
return LedState.Unknown;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.Error("GetActivityLedStatusMode_Async() failed", ex);
|
||||
return LedState.Unknown;
|
||||
}
|
||||
|
||||
|
||||
return DiagnosticLedState.StatusUnknown;
|
||||
}
|
||||
|
||||
public async Task<bool> SetLedMode_Async(GenesisSmartReader iHead, LedState ledMode, bool isConnected,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
log.Debug("SetLedMode_Async called for iHead: " + iHead + " isConnected: " + isConnected);
|
||||
if (iHead?.CommInterfaceBridge == null)
|
||||
return false;
|
||||
|
||||
try
|
||||
{
|
||||
var loginAdnConnectAsync = await PrepareLoginAdnConnect_Async(iHead, isConnected, token);
|
||||
|
||||
if (!loginAdnConnectAsync)
|
||||
return false;
|
||||
|
||||
//Get Activity Status
|
||||
byte valueLed = (ledMode == LedState.active) ? (byte)6 : (byte)0;
|
||||
log.Debug($"SetLedMode_Async() Set Led Mode: {valueLed}");
|
||||
var registerWriteResult =
|
||||
await _bridge.WriteRegisterAsync(iHead.GetSlotNr, LedMode, valueLed, false, false, token);
|
||||
|
||||
if (registerWriteResult == null || !registerWriteResult.Success)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
log.Debug($"SetLedMode_Async() Write Register OK Response: {registerWriteResult}");
|
||||
return true;
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
log.Debug("GetActivityLedStatusMode_Async() canceled.");
|
||||
return false;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.Error("GetActivityLedStatusMode_Async() failed", ex);
|
||||
return false;
|
||||
}
|
||||
finally
|
||||
{
|
||||
log.Debug("SetLedMode_Async() - End - DO DISCONNECT");
|
||||
var gciDisconnectResult = await _bridge.DisconnectAsync(iHead.GetSlotNr);
|
||||
log.Debug($"SetLedMode_Async() Disconnect Result: {gciDisconnectResult}");
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<bool> Disconnect_Async(GenesisSmartReader iHead)
|
||||
{
|
||||
try
|
||||
{
|
||||
log.Debug("Disconnect_Async() - Start");
|
||||
var gciSlotInfo = await _bridge.GetSlotAsync(iHead.GetSlotNr);
|
||||
log.Debug($"Disconnect_Async() - Slot: {iHead.GetSlotNr} - SlotInfo: {gciSlotInfo}");
|
||||
log.Debug("Disconnect_Async() - DO DISCONNECT");
|
||||
var gciDisconnectResult = await _bridge.DisconnectAsync(iHead.GetSlotNr);
|
||||
log.Debug($"Disconnect_Async() Disconnect Result: {gciDisconnectResult}");
|
||||
|
||||
return gciDisconnectResult.Success;
|
||||
}catch(Exception ex)
|
||||
{
|
||||
log.Error("Disconnect_Async() failed", ex);
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static ushort SafeIntToUShort(int value)
|
||||
{
|
||||
@ -300,7 +519,7 @@ namespace TBF.Rig.RegisterReaders.GenesisRegReader.communication
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
|
||||
if (connectResult == null || !connectResult.Success || !connectResult.IsLoggedOn)
|
||||
if (connectResult == null || !connectResult.Success || !connectResult.IsConnected)
|
||||
return string.Empty;
|
||||
|
||||
// if (!string.IsNullOrEmpty(version))
|
||||
@ -316,29 +535,41 @@ namespace TBF.Rig.RegisterReaders.GenesisRegReader.communication
|
||||
}
|
||||
|
||||
|
||||
public bool SetActivityMode_Active(GenesisSmartReader iHead)
|
||||
public async Task<bool> SetActivityMode_Active(GenesisSmartReader iHead,
|
||||
bool isConnected, CancellationToken token = default)
|
||||
{
|
||||
log.Debug("SetActivityMode_Active called for iHead: " + iHead + " isConnected: " + isConnected);
|
||||
|
||||
if (iHead?.CommInterfaceBridge == null)
|
||||
return false;
|
||||
|
||||
var connectResult = iHead.CommInterfaceBridge
|
||||
.ConnectAsync(iHead.GetSlotNr)
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
try
|
||||
{
|
||||
token.ThrowIfCancellationRequested();
|
||||
|
||||
if (connectResult == null || !connectResult.Success || !connectResult.IsLoggedOn)
|
||||
var connectResult = await EnsureConnectedAsync(iHead, token);
|
||||
|
||||
if (!connectResult.IsConnected)
|
||||
return false;
|
||||
|
||||
isConnected = connectResult.IsConnected;
|
||||
|
||||
log.Debug($"SetActivityMode_Active() connect - {connectResult.Message}");
|
||||
|
||||
//Set LED to state 4
|
||||
// string version = _bridge?.GciExternalInterface?.GetPcbId(iHead.GetSlotNr);
|
||||
// if (!string.IsNullOrEmpty(version))
|
||||
// {
|
||||
// if (iHead.ConfigStruct != null) // store mechanism
|
||||
// {
|
||||
// iHead.ConfigStruct.Version = version;
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
}catch(OperationCanceledException)
|
||||
{
|
||||
return false;
|
||||
|
||||
//Set LED to state 4
|
||||
// string version = _bridge?.GciExternalInterface?.GetPcbId(iHead.GetSlotNr);
|
||||
// if (!string.IsNullOrEmpty(version))
|
||||
// {
|
||||
// if (iHead.ConfigStruct != null) // store mechanism
|
||||
// {
|
||||
// iHead.ConfigStruct.Version = version;
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -353,7 +584,7 @@ namespace TBF.Rig.RegisterReaders.GenesisRegReader.communication
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
|
||||
if (connectResult == null || !connectResult.Success || !connectResult.IsLoggedOn)
|
||||
if (connectResult == null || !connectResult.Success || !connectResult.IsConnected)
|
||||
return false;
|
||||
|
||||
//Set Activity State Idle
|
||||
@ -380,7 +611,7 @@ namespace TBF.Rig.RegisterReaders.GenesisRegReader.communication
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
|
||||
if (connectResult == null || !connectResult.Success || !connectResult.IsLoggedOn)
|
||||
if (connectResult == null || !connectResult.Success || !connectResult.IsConnected)
|
||||
return false;
|
||||
|
||||
//Set LED to state 4
|
||||
@ -412,7 +643,7 @@ namespace TBF.Rig.RegisterReaders.GenesisRegReader.communication
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
|
||||
if (connectResult == null || !connectResult.Success || !connectResult.IsLoggedOn)
|
||||
if (connectResult == null || !connectResult.Success || !connectResult.IsConnected)
|
||||
return false;
|
||||
|
||||
//Set LED to state 1
|
||||
@ -439,7 +670,7 @@ namespace TBF.Rig.RegisterReaders.GenesisRegReader.communication
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
|
||||
if (connectResult == null || !connectResult.Success || !connectResult.IsLoggedOn)
|
||||
if (connectResult == null || !connectResult.Success || !connectResult.IsConnected)
|
||||
return string.Empty;
|
||||
|
||||
// string version = _bridge?.GciExternalInterface?.GetPcbId(iperlHead.GetSlotNr);
|
||||
|
||||
@ -0,0 +1,9 @@
|
||||
namespace TBF.Rig.RegisterReaders.GenesisRegReader.communication.common
|
||||
{
|
||||
public enum LedState : int
|
||||
{
|
||||
Unknown = -1,
|
||||
inactive = 0,
|
||||
active = 1,
|
||||
}
|
||||
}
|
||||
1677
TBF/TBF.csproj
1677
TBF/TBF.csproj
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,151 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
using Common;
|
||||
using JetBrains.Annotations;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using TBF.Rig.BridgeComponents.GciBridge;
|
||||
using TBF.Rig.RegisterReaders.GenesisRegReader;
|
||||
using TBF.Rig.RegisterReaders.GenesisRegReader.communication;
|
||||
using TBF.Rig.RegisterReaders.GenesisRegReader.implementations;
|
||||
using Factory = TBF.Rig.RegisterReaders.GenesisRegReader.Factory;
|
||||
|
||||
namespace TBFTests.Rig.RegisterReaders.GenesisRegReader.communication
|
||||
{
|
||||
[TestClass]
|
||||
[TestSubject(typeof(GenesisSmartReader))]
|
||||
public class OptoHeadTest_Test
|
||||
{
|
||||
private const string BridgeName = "GciBridge_Test";
|
||||
|
||||
private static GenesisCfg CreateConnectionCfg()
|
||||
{
|
||||
var factory = new Factory();
|
||||
var cfg = new GenesisCfg(factory);
|
||||
|
||||
SetPrivateFieldByNames(cfg, 1,
|
||||
"slotNr",
|
||||
"_slotNr");
|
||||
|
||||
SetPrivateFieldByNames(cfg, 1,
|
||||
"rfidComPortNr",
|
||||
"_rfidComPortNr");
|
||||
|
||||
SetPrivateFieldByNames(cfg, 2,
|
||||
"optoComPortNr",
|
||||
"_optoComPortNr");
|
||||
|
||||
SetPrivateFieldByNames(cfg, BridgeName,
|
||||
"communicationInterfaceBridge",
|
||||
"_communicationInterfaceBridge");
|
||||
|
||||
return cfg;
|
||||
}
|
||||
|
||||
private static GenesisSmartReader CreateSimulatedGenesisReader()
|
||||
{
|
||||
var cfg = CreateConnectionCfg();
|
||||
|
||||
var reader = new GenesisSmartReader(cfg);
|
||||
|
||||
SetPrivateFieldByNames(reader,
|
||||
"Genesis1",
|
||||
"name",
|
||||
"_name");
|
||||
|
||||
SetPrivateFieldByNames(reader,
|
||||
DebugMode.Simulate,
|
||||
"debugLevel",
|
||||
"_debugLevel");
|
||||
|
||||
var bridge = new GciBridge();
|
||||
|
||||
SetPrivateFieldByNames(bridge,
|
||||
BridgeName,
|
||||
"name",
|
||||
"_name");
|
||||
|
||||
InjectBridge(reader, bridge);
|
||||
|
||||
return reader;
|
||||
}
|
||||
|
||||
private static void InjectBridge(
|
||||
GenesisSmartReader reader,
|
||||
GciBridge bridge)
|
||||
{
|
||||
SetPrivateFieldByNames(reader,
|
||||
bridge,
|
||||
"commInterfaceBridge",
|
||||
"_commInterfaceBridge");
|
||||
}
|
||||
|
||||
private static void SetPrivateFieldByNames(
|
||||
object target,
|
||||
object value,
|
||||
params string[] fieldNames)
|
||||
{
|
||||
foreach (var fieldName in fieldNames)
|
||||
{
|
||||
var field = target.GetType().GetField(
|
||||
fieldName,
|
||||
BindingFlags.Instance |
|
||||
BindingFlags.NonPublic |
|
||||
BindingFlags.Public);
|
||||
|
||||
if (field != null)
|
||||
{
|
||||
field.SetValue(target, value);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
throw new MissingFieldException(
|
||||
target.GetType().FullName,
|
||||
string.Join(" or ", fieldNames));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void BuildConnection_Simulation_ShouldWaitForInitAndUpdate_AndFinishWithin1500ms()
|
||||
{
|
||||
// Arrange
|
||||
var reader = CreateSimulatedGenesisReader();
|
||||
|
||||
var optoHeadTest = new OptoHeadTest(reader);
|
||||
|
||||
var stopwatch = Stopwatch.StartNew();
|
||||
|
||||
// Act
|
||||
optoHeadTest.BuildConnection(reader);
|
||||
|
||||
stopwatch.Stop();
|
||||
|
||||
// Assert
|
||||
Assert.IsTrue(
|
||||
stopwatch.ElapsedMilliseconds >= 950,
|
||||
$"BuildConnection finished too fast. " +
|
||||
$"InitSlotAsync + UpdateSlotAsync were probably not awaited. " +
|
||||
$"Elapsed={stopwatch.ElapsedMilliseconds}ms");
|
||||
|
||||
Assert.IsTrue(
|
||||
stopwatch.ElapsedMilliseconds <= 1500,
|
||||
$"BuildConnection took too long. " +
|
||||
$"Elapsed={stopwatch.ElapsedMilliseconds}ms");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void BuildConnection_NullGenesisHead_ShouldThrowArgumentNullException()
|
||||
{
|
||||
// Arrange
|
||||
var reader = CreateSimulatedGenesisReader();
|
||||
|
||||
var optoHeadTest = new OptoHeadTest(reader);
|
||||
|
||||
// Act + Assert
|
||||
Assert.ThrowsException<ArgumentNullException>(() =>
|
||||
{
|
||||
optoHeadTest.BuildConnection(null);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -785,6 +785,7 @@ namespace TBFTests.Rig.RegisterReaders.GenesisRegReader.implementations
|
||||
Assert.AreEqual(10.0, sut.TimestampSecStart, 0.0001);
|
||||
Assert.AreEqual(20.0, sut.TimestampSecEnd, 0.0001);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -107,6 +107,7 @@
|
||||
<Compile Include="Rig\Network\Camera\RoiForFixedStartKeyence\RoiTest.cs" />
|
||||
<Compile Include="Rig\Output\FileWriters\Enhanced\WriterTest.cs" />
|
||||
<Compile Include="Rig\RegisterReaders\GenesisRegReader\common\OptoTelegramRawTest.cs" />
|
||||
<Compile Include="Rig\RegisterReaders\GenesisRegReader\communication\OptoHeadTest_Test.cs" />
|
||||
<Compile Include="Rig\RegisterReaders\GenesisRegReader\implementations\FakeSerialDriver.cs" />
|
||||
<Compile Include="Rig\RegisterReaders\GenesisRegReader\implementations\GenesisReaderTests.cs" />
|
||||
<Compile Include="Rig\RegisterReaders\GenesisRegReader\implementations\GenesisSmartReaderChannelAveragingTests.cs" />
|
||||
@ -163,7 +164,6 @@
|
||||
<Name>TBF</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Choose>
|
||||
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
|
||||
<ItemGroup>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user