Skip to content

Commit beba374

Browse files
committed
Add in new messages to make it explicit where an interface is loaded from.
1 parent d0562fd commit beba374

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

Aircraft Mosquito Plugin/Interfaces/MosquitoInterface.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ namespace GadrocsWorkshop.Helios.Interfaces.DCS.DH98Mosquito
1818
{
1919
using GadrocsWorkshop.Helios.ComponentModel;
2020
using GadrocsWorkshop.Helios.Interfaces.DCS.Common;
21+
using GadrocsWorkshop.Helios.UDPInterface;
22+
using GadrocsWorkshop.Helios.Util;
23+
using NLog;
24+
using System;
2125
using System.Collections.Generic;
2226
using System.Linq;
23-
using System;
24-
using GadrocsWorkshop.Helios.UDPInterface;
2527

2628
[HeliosInterface(
2729
"Helios.DH98Mosquito", // Helios internal type ID used in Profile XML, must never change
@@ -32,6 +34,8 @@ namespace GadrocsWorkshop.Helios.Interfaces.DCS.DH98Mosquito
3234

3335
public class DH98MosquitoInterface : DCSInterface
3436
{
37+
private static readonly NLog.Logger Logger = NLog.LogManager.GetCurrentClassLogger();
38+
3539
#pragma warning disable IDE1006 // Naming Standard issues
3640
#pragma warning disable IDE0051 // Remove unused private members
3741

@@ -529,6 +533,8 @@ public DH98MosquitoInterface(string name)
529533
}
530534
#endregion Radio Equipment
531535

536+
Logger.Info($"Helios Style 1 interface loaded for {TypeIdentifier}. (Interface contained {Functions.Count()} Network Functions).");
537+
532538
#if (DEV)
533539
Console.WriteLine("Number of functions:\t{0}",Functions.Count());
534540
foreach(DCSFunction nf in Functions)

Helios/UDPInterface/BaseUDPInterface.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
using GadrocsWorkshop.Helios.Interfaces.Capabilities.ProfileAwareInterface;
1919
using GadrocsWorkshop.Helios.Interfaces.DCS.Common;
2020
using GadrocsWorkshop.Helios.Json;
21+
using GadrocsWorkshop.Helios.Util;
2122
using GadrocsWorkshop.Helios.Windows;
2223
using System;
2324
using System.Collections.Generic;
@@ -31,6 +32,7 @@
3132
using System.Runtime.InteropServices;
3233
using System.Security.Cryptography;
3334
using System.Timers;
35+
using System.Windows;
3436
using System.Windows.Threading;
3537

3638
namespace GadrocsWorkshop.Helios.UDPInterface
@@ -525,6 +527,7 @@ protected bool LoadFunctionsFromJson()
525527

526528
// if we survive the loading, install all these functions
527529
InstallFunctions(loaded);
530+
Logger.Info($"Soft interface definition {jsonFileName} loaded from {Anonymizer.Anonymize(jsonPath)}. (Interface contained {loaded.Functions.Count()} Network Functions).");
528531

529532
return true;
530533
}

0 commit comments

Comments
 (0)