From 2379bbd007658cc15a5c04f3e7eb55302f5add89 Mon Sep 17 00:00:00 2001 From: BlueFinBima Date: Sun, 22 Dec 2024 13:25:29 +0000 Subject: [PATCH] Implement hostname support for DCS interfaces. --- .../DCS/Common/DCSExportConfiguration.cs | 6 +++--- .../Common/ExportConfigurationSection.xaml | 8 ++++---- .../Interfaces/DCS/Common/HeliosExport16.lua | 20 ++++++++++++++++++- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/Helios/Interfaces/DCS/Common/DCSExportConfiguration.cs b/Helios/Interfaces/DCS/Common/DCSExportConfiguration.cs index 93d1780ea..45498ad3e 100644 --- a/Helios/Interfaces/DCS/Common/DCSExportConfiguration.cs +++ b/Helios/Interfaces/DCS/Common/DCSExportConfiguration.cs @@ -155,7 +155,7 @@ public class ModuleFormatInfo private string _exportImpersonationModuleText = ""; /// - /// IP address to which Export.lua will send UDP updates + /// IP V4 address or Hostname to which Export.lua will send UDP updates /// private string _ipAddress; @@ -390,7 +390,7 @@ public int ExportFrequency /// IP address to which Export.lua will send UDP updates /// This is a site-specific setting persisted in HeliosSettings instead of in the profile. /// - public string IPAddress + public string NetworkAddress { get => _ipAddress; set @@ -1055,7 +1055,7 @@ private void UpdateExportScript() _exportMain = exportMainRaw // REVISIT: validate the IP address against allowable protocol versions and address types for this version of HeliosExport__.lua - .Replace("HELIOS_REPLACE_IPAddress", IPAddress) + .Replace("HELIOS_REPLACE_NETWORKADDRESS", NetworkAddress) .Replace("HELIOS_REPLACE_Port", Port.ToString()) .Replace("HELIOS_REPLACE_ExportInterval", Math.Round(1d / Math.Max(4, ExportFrequency), 3).ToString(CultureInfo.InvariantCulture)); } diff --git a/Helios/Interfaces/DCS/Common/ExportConfigurationSection.xaml b/Helios/Interfaces/DCS/Common/ExportConfigurationSection.xaml index 10b987fee..27998d71f 100644 --- a/Helios/Interfaces/DCS/Common/ExportConfigurationSection.xaml +++ b/Helios/Interfaces/DCS/Common/ExportConfigurationSection.xaml @@ -33,10 +33,10 @@ -