Revize f09385a3
Přidáno uživatelem Pultak před téměř 3 roky(ů)
ld_client/LDClient/LDClient.csproj | ||
---|---|---|
7 | 7 |
<Nullable>enable</Nullable> |
8 | 8 |
</PropertyGroup> |
9 | 9 |
|
10 |
<ItemGroup> |
|
10 |
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT' "> |
|
11 |
<DefineConstants>_WINDOWS</DefineConstants> |
|
12 |
</PropertyGroup> |
|
13 |
|
|
14 |
<ItemGroup> |
|
11 | 15 |
<None Remove="appsettings.json" /> |
16 |
<None Remove="t32api64.dll" /> |
|
12 | 17 |
</ItemGroup> |
13 | 18 |
|
14 | 19 |
<ItemGroup> |
15 | 20 |
<EmbeddedResource Include="appsettings.json"> |
16 | 21 |
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
17 | 22 |
</EmbeddedResource> |
23 |
<EmbeddedResource Include="lib\t32api64.dll"> |
|
24 |
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
|
25 |
</EmbeddedResource> |
|
18 | 26 |
</ItemGroup> |
19 | 27 |
|
20 |
<ItemGroup> |
|
21 |
<Reference Include="t32apinet"> |
|
22 |
<HintPath>..\dotnet\t32apinet\bin\Release\t32apinet.dll</HintPath> |
|
23 |
</Reference> |
|
24 |
</ItemGroup> |
|
25 | 28 |
|
26 | 29 |
<ItemGroup> |
27 | 30 |
<PackageReference Include="DiskQueue" Version="1.5.0" /> |
ld_client/LDClient/appsettings.json | ||
---|---|---|
26 | 26 |
"CacheFileName": "cache" |
27 | 27 |
}, |
28 | 28 |
"DebuggerDetection": { |
29 |
"F32RemArguments": [
|
|
29 |
"T32RemArguments": [
|
|
30 | 30 |
"localhost port=20000 printer.filetype ASCIIE", |
31 | 31 |
"localhost port=20000 printer.open C:\\app\\result.txt", |
32 | 32 |
"localhost port=20000 WinPrint.version.hardware", |
33 | 33 |
"localhost port=20000 printer.close " |
34 | 34 |
], |
35 |
"F32RemExecutable": "c:\\app\\tools\\T32\\bin\\windows64\\t32rem.exe", |
|
35 |
"T32ApiAddress": "localhost", |
|
36 |
"T32ApiPort": "20000", |
|
37 |
"T32ApiPacketLen": "1024", |
|
38 |
"T32ApiCommands": [ |
|
39 |
"AREA.Create TWOWIRE", |
|
40 |
"AREA.Select TWOWIRE", |
|
41 |
"AREA.clear TWOWIRE", |
|
42 |
|
|
43 |
"WinPOS 1. 1. 50. 3. 0. 0. MYAREA", |
|
44 |
"Print \"TwoWire:\"", |
|
45 |
"Print.cable.twowire()", |
|
46 |
"Area.View TWOWIRE", |
|
47 |
|
|
48 |
"PRinTer.FileType ASCIIE", |
|
49 |
"PRinTer.OPEN C:\\app\\result.txt", |
|
50 |
"WinPrint.license.list", |
|
51 |
"screen.wait", |
|
52 |
"WinPrint.Area.View TWOWIRE", |
|
53 |
"WinPrint.version.hardware", |
|
54 |
"Printer.CLOSE", |
|
55 |
|
|
56 |
"Area.delete TWOWIRE", |
|
57 |
|
|
58 |
"enddo" |
|
59 |
], |
|
60 |
"T32RemExecutable": "c:\\app\\tools\\T32\\bin\\windows64\\t32rem.exe", |
|
36 | 61 |
"T32ProcessName": "t32mtc", |
37 | 62 |
"T32InfoLocation": "C:\\app\\result.txt", |
38 | 63 |
"DetectionPeriod": 5000, |
39 |
"FetchInfoMaxAttempts": 5, |
|
40 |
"FetchInfoAttemptPeriod": 1000,
|
|
64 |
"FetchInfoMaxAttempts": 15,
|
|
65 |
"FetchInfoAttemptPeriod": 4000,
|
|
41 | 66 |
"T32RemSuccessExitCode": 0, |
42 | 67 |
"T32RemWaitTimeoutMs": 2000 |
43 | 68 |
} |
ld_client/LDClient/utils/ConfigLoader.cs | ||
---|---|---|
38 | 38 |
/// </summary> |
39 | 39 |
private const string DdSection = "DebuggerDetection"; |
40 | 40 |
|
41 |
|
|
42 |
public string[] T32ApiCommands { get; private set; } = null!; |
|
43 |
public string T32ApiAddress { get; private set; } = null!; |
|
44 |
public string T32ApiPort { get; private set; } = null!; |
|
45 |
public string T32ApiPacketLen { get; private set; } = null!; |
|
46 |
|
|
41 | 47 |
#region Logger |
42 |
|
|
48 |
|
|
43 | 49 |
/// <summary> |
44 | 50 |
/// Maximum size of the log file (it will start to rotate when this limit is reached). |
45 | 51 |
/// </summary> |
... | ... | |
135 | 141 |
/// <summary> |
136 | 142 |
/// Path to the t32rem.exe which is used to send commands to a debugger. |
137 | 143 |
/// </summary> |
138 |
public string F32RemExecutable { get; private set; } = null!;
|
|
144 |
public string T32RemExecutable { get; private set; } = null!;
|
|
139 | 145 |
|
140 | 146 |
/// <summary> |
141 | 147 |
/// How many times the application attempts to check if there |
... | ... | |
151 | 157 |
/// <summary> |
152 | 158 |
/// Arguments (commands) sent to the t32rem.exe file. |
153 | 159 |
/// </summary> |
154 |
public string[] F32RemArguments { get; private set; } = null!;
|
|
160 |
public string[] T32RemArguments { get; private set; } = null!;
|
|
155 | 161 |
|
156 | 162 |
/// <summary> |
157 | 163 |
/// Status code indication successful execution of the t32rem.exe file. |
... | ... | |
251 | 257 |
T32ProcessName = debugger["T32ProcessName"]; |
252 | 258 |
T32InfoLocation = debugger["T32InfoLocation"]; |
253 | 259 |
DetectionPeriod = uint.Parse(debugger["DetectionPeriod"]); |
254 |
F32RemExecutable = debugger["F32RemExecutable"];
|
|
260 |
T32RemExecutable = debugger["T32RemExecutable"];
|
|
255 | 261 |
FetchInfoMaxAttempts = uint.Parse(debugger["FetchInfoMaxAttempts"]); |
256 | 262 |
FetchInfoAttemptPeriod = uint.Parse(debugger["FetchInfoAttemptPeriod"]); |
257 | 263 |
T32RemSuccessExitCode = int.Parse(debugger["T32RemSuccessExitCode"]); |
258 | 264 |
T32RemWaitTimeoutMs = int.Parse(debugger["T32RemWaitTimeoutMs"]); |
259 |
F32RemArguments = configuration.GetSection($"{DdSection}:F32RemArguments").GetChildren().Select(key => key.Value).ToArray(); |
|
265 |
T32RemArguments = configuration.GetSection($"{DdSection}:T32RemArguments").GetChildren().Select(key => key.Value).ToArray(); |
|
266 |
T32ApiCommands = configuration.GetSection($"{DdSection}:T32ApiCommands").GetChildren().Select(key => key.Value).ToArray(); |
|
267 |
T32ApiAddress = debugger["T32ApiAddress"]; |
|
268 |
T32ApiPort = debugger["T32ApiPort"]; |
|
269 |
T32ApiPacketLen = debugger["T32ApiPacketLen"]; |
|
270 |
|
|
260 | 271 |
} catch (Exception e) { |
261 | 272 |
Console.WriteLine(e); |
262 | 273 |
Environment.Exit(ErrorExitCode); |
Také k dispozici: Unified diff
re #9712 Added configuration properties of the t32 api