commit f09385a359d71f272b995ccb103422706ae0d8ed
Author: Pultak <pultak5@gmail.com>
Date:   Sun May 8 12:48:17 2022 +0200

    re #9712 Added configuration properties of the t32 api

diff --git a/ld_client/LDClient/LDClient.csproj b/ld_client/LDClient/LDClient.csproj
index c575ea0..a63b79f 100644
--- a/ld_client/LDClient/LDClient.csproj
+++ b/ld_client/LDClient/LDClient.csproj
@@ -7,21 +7,24 @@
     <Nullable>enable</Nullable>
   </PropertyGroup>
 
-  <ItemGroup>
+	<PropertyGroup Condition=" '$(OS)' == 'Windows_NT' ">
+		<DefineConstants>_WINDOWS</DefineConstants>
+	</PropertyGroup>
+
+	<ItemGroup>
     <None Remove="appsettings.json" />
+    <None Remove="t32api64.dll" />
   </ItemGroup>
 
   <ItemGroup>
     <EmbeddedResource Include="appsettings.json">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </EmbeddedResource>
+    <EmbeddedResource Include="lib\t32api64.dll">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </EmbeddedResource>
   </ItemGroup>
 
-  <ItemGroup>
-    <Reference Include="t32apinet">
-      <HintPath>..\dotnet\t32apinet\bin\Release\t32apinet.dll</HintPath>
-    </Reference>
-  </ItemGroup>
 
   <ItemGroup>
     <PackageReference Include="DiskQueue" Version="1.5.0" />
diff --git a/ld_client/LDClient/appsettings.json b/ld_client/LDClient/appsettings.json
index 3a3a702..ba3cadb 100644
--- a/ld_client/LDClient/appsettings.json
+++ b/ld_client/LDClient/appsettings.json
@@ -26,18 +26,43 @@
     "CacheFileName": "cache"
   },
   "DebuggerDetection": {
-    "F32RemArguments": [
+    "T32RemArguments": [
       "localhost port=20000 printer.filetype ASCIIE",
       "localhost port=20000 printer.open C:\\app\\result.txt",
       "localhost port=20000 WinPrint.version.hardware",
       "localhost port=20000 printer.close "
     ],
-    "F32RemExecutable": "c:\\app\\tools\\T32\\bin\\windows64\\t32rem.exe",
+    "T32ApiAddress": "localhost",
+    "T32ApiPort": "20000",
+    "T32ApiPacketLen": "1024",
+    "T32ApiCommands": [
+      "AREA.Create TWOWIRE",
+      "AREA.Select TWOWIRE",
+      "AREA.clear TWOWIRE",
+
+      "WinPOS 1. 1. 50. 3. 0. 0. MYAREA",
+      "Print \"TwoWire:\"",
+      "Print.cable.twowire()",
+      "Area.View TWOWIRE",
+
+      "PRinTer.FileType ASCIIE",
+      "PRinTer.OPEN C:\\app\\result.txt",
+      "WinPrint.license.list",
+      "screen.wait",
+      "WinPrint.Area.View TWOWIRE",
+      "WinPrint.version.hardware",
+      "Printer.CLOSE",
+
+      "Area.delete TWOWIRE",
+
+      "enddo"
+    ],
+    "T32RemExecutable": "c:\\app\\tools\\T32\\bin\\windows64\\t32rem.exe",
     "T32ProcessName": "t32mtc",
     "T32InfoLocation": "C:\\app\\result.txt",
     "DetectionPeriod": 5000,
-    "FetchInfoMaxAttempts": 5,
-    "FetchInfoAttemptPeriod": 1000,
+    "FetchInfoMaxAttempts": 15,
+    "FetchInfoAttemptPeriod": 4000,
     "T32RemSuccessExitCode": 0,
     "T32RemWaitTimeoutMs": 2000
   }
diff --git a/ld_client/LDClient/utils/ConfigLoader.cs b/ld_client/LDClient/utils/ConfigLoader.cs
index 6dc3cf7..f585cce 100644
--- a/ld_client/LDClient/utils/ConfigLoader.cs
+++ b/ld_client/LDClient/utils/ConfigLoader.cs
@@ -38,8 +38,14 @@ namespace LDClient.utils {
         /// </summary>
         private const string DdSection = "DebuggerDetection";
 
+
+        public string[] T32ApiCommands { get; private set; } = null!;
+        public string T32ApiAddress { get; private set; } = null!;
+        public string T32ApiPort { get; private set; } = null!;
+        public string T32ApiPacketLen { get; private set; } = null!;
+
         #region Logger
-        
+
         /// <summary>
         /// Maximum size of the log file (it will start to rotate when this limit is reached).
         /// </summary>
@@ -135,7 +141,7 @@ namespace LDClient.utils {
         /// <summary>
         /// Path to the t32rem.exe which is used to send commands to a debugger.
         /// </summary>
-        public string F32RemExecutable { get; private set; } = null!;
+        public string T32RemExecutable { get; private set; } = null!;
         
         /// <summary>
         /// How many times the application attempts to check if there
@@ -151,7 +157,7 @@ namespace LDClient.utils {
         /// <summary>
         /// Arguments (commands) sent to the t32rem.exe file.
         /// </summary>
-        public string[] F32RemArguments { get; private set; } = null!;
+        public string[] T32RemArguments { get; private set; } = null!;
         
         /// <summary>
         /// Status code indication successful execution of the t32rem.exe file.
@@ -251,12 +257,17 @@ namespace LDClient.utils {
                 T32ProcessName = debugger["T32ProcessName"];
                 T32InfoLocation = debugger["T32InfoLocation"];
                 DetectionPeriod = uint.Parse(debugger["DetectionPeriod"]);
-                F32RemExecutable = debugger["F32RemExecutable"];
+                T32RemExecutable = debugger["T32RemExecutable"];
                 FetchInfoMaxAttempts = uint.Parse(debugger["FetchInfoMaxAttempts"]);
                 FetchInfoAttemptPeriod = uint.Parse(debugger["FetchInfoAttemptPeriod"]);
                 T32RemSuccessExitCode = int.Parse(debugger["T32RemSuccessExitCode"]);
                 T32RemWaitTimeoutMs = int.Parse(debugger["T32RemWaitTimeoutMs"]);
-                F32RemArguments = configuration.GetSection($"{DdSection}:F32RemArguments").GetChildren().Select(key => key.Value).ToArray();
+                T32RemArguments = configuration.GetSection($"{DdSection}:T32RemArguments").GetChildren().Select(key => key.Value).ToArray();
+                T32ApiCommands = configuration.GetSection($"{DdSection}:T32ApiCommands").GetChildren().Select(key => key.Value).ToArray();
+                T32ApiAddress = debugger["T32ApiAddress"];
+                T32ApiPort = debugger["T32ApiPort"];
+                T32ApiPacketLen = debugger["T32ApiPacketLen"];
+                
             } catch (Exception e) {
                 Console.WriteLine(e);
                 Environment.Exit(ErrorExitCode);
