From d7c69c4c914314c99c2510cef0a7f2e329dbffb1 Mon Sep 17 00:00:00 2001 From: Jerker Dahlblom Date: Wed, 24 Jan 2024 20:51:57 +0200 Subject: [PATCH 1/3] Starting on LuaConsole --- .vscode/settings.json | 2 +- .../UserControls/UserControlAPI.xaml.cs | 9 +++ .../UserControls/UserControlAPIBase.cs | 1 + .../Scripts/DCS-INSIGHT/lib/APIHandler.lua | 4 ++ .../lib/commands/LoadStringAPI.lua | 69 +++++++++++++++++++ .../lib/commands/common/ParamName.lua | 1 + 6 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 src/server/Scripts/DCS-INSIGHT/lib/commands/LoadStringAPI.lua diff --git a/.vscode/settings.json b/.vscode/settings.json index 5cb932f..32875db 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,7 +3,7 @@ "[lua]": { "editor.defaultFormatter": "JohnnyMorganz.stylua" }, - "stylua.targetReleaseVersion": "v0.17.0", + "stylua.targetReleaseVersion": "latest", "Lua.runtime.version": "Lua 5.1", "Lua.workspace.library": [ "DCS_API_defs.lua" diff --git a/src/client/DCSInsight/UserControls/UserControlAPI.xaml.cs b/src/client/DCSInsight/UserControls/UserControlAPI.xaml.cs index 0cce633..9ec3efb 100644 --- a/src/client/DCSInsight/UserControls/UserControlAPI.xaml.cs +++ b/src/client/DCSInsight/UserControls/UserControlAPI.xaml.cs @@ -89,6 +89,15 @@ protected override void BuildUI() IsTabStop = true }; + if (DCSAPI.Syntax == LuaConsole) + { + textBox.TextWrapping = TextWrapping.Wrap; + textBox.AcceptsReturn = true; + textBox.AcceptsTab = true; + textBox.MinWidth = 300; + textBox.MinHeight = 150; + } + if (dcsAPIParameterType.Type == ParameterTypeEnum.number) { textBox.KeyDown += TextBoxParameter_OnKeyDown_Number; diff --git a/src/client/DCSInsight/UserControls/UserControlAPIBase.cs b/src/client/DCSInsight/UserControls/UserControlAPIBase.cs index c9123de..2b87e48 100644 --- a/src/client/DCSInsight/UserControls/UserControlAPIBase.cs +++ b/src/client/DCSInsight/UserControls/UserControlAPIBase.cs @@ -34,6 +34,7 @@ public abstract partial class UserControlAPIBase : UserControl, IDisposable, IAs protected Label LabelPollingInterval; protected ComboBox ComboBoxPollTimes; protected static readonly AutoResetEvent AutoResetEventPolling = new(false); + protected const string LuaConsole = "LuaConsole"; public int Id { get; protected set; } protected abstract void BuildUI(); diff --git a/src/server/Scripts/DCS-INSIGHT/lib/APIHandler.lua b/src/server/Scripts/DCS-INSIGHT/lib/APIHandler.lua index dd6a7fd..976b140 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/APIHandler.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/APIHandler.lua @@ -63,6 +63,7 @@ local LoGeoCoordinatesToLoCoordinatesAPI = require("Scripts.DCS-INSIGHT.lib.commands.LoGeoCoordinatesToLoCoordinatesAPI") local LoGetAltitudeAPI = require("Scripts.DCS-INSIGHT.lib.commands.LoGetAltitudeAPI") local LoCoordinatesToGeoCoordinatesAPI = require("Scripts.DCS-INSIGHT.lib.commands.LoCoordinatesToGeoCoordinatesAPI") +local LoadStringAPI = require("Scripts.DCS-INSIGHT.lib.commands.LoadStringAPI") --- @class APIHandler --- @field public commandsTable table @@ -133,6 +134,9 @@ function APIHandler:addParameterAPIs() self.commandsTable[#self.commandsTable + 1] = LoCoordinatesToGeoCoordinatesAPI:new(nil, counter()) self.apiTable[#self.apiTable + 1] = self.commandsTable[#self.commandsTable].apiInfo + + self.commandsTable[#self.commandsTable + 1] = LoadStringAPI:new(nil, counter()) + self.apiTable[#self.apiTable + 1] = self.commandsTable[#self.commandsTable].apiInfo end --- @func Fills the commands and api table with APIs not taking parameters diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoadStringAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoadStringAPI.lua new file mode 100644 index 0000000..c62b7f4 --- /dev/null +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoadStringAPI.lua @@ -0,0 +1,69 @@ +module("LoadStringAPI", package.seeall) + +local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") +local Parameter = require("Scripts.DCS-INSIGHT.lib.commands.common.Parameter") +local ParamName = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamName") +local ParamType = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamType") + +--- @class LoadStringAPI : APIBase +--- @field id number API ID +--- @field apiInfo APIInfo +local LoadStringAPI = APIBase:new() + +--- @func Returns new LoadStringAPI +--- @param o table|nil Parent +--- @param apiId integer API ID, must be unique +--- @return APIBase +function LoadStringAPI:new(o, apiId) + o = o or APIBase:new(o, apiId, false, "LuaConsole", 1) + + o:add_param_def(0, ParamName.lua_code, ParamType.string) + + setmetatable(o, self) + self.__index = self + return o +end + +--- @func Inits with internal data +function LoadStringAPI:init() end + +--- @func Executes sent api and returns the same api containing a result field +--- @param api APIInfo +function LoadStringAPI:execute(api) + local param0 + + local result_code, message = self:verify_params() + if result_code == 1 then + api.error_thrown = true + api.error_message = message + return api + end + + for i, param in pairs(api.parameter_defs) do + if param.id == 0 then + param0 = param.value + end + end + + local f, err = loadstring(param0) + if f then + local result, err2 = pcall(f()) + if err2 then + api.error_thrown = true + api.error_message = err2 + return api + end + api = self:decode_result(api, result, nil) + return api + else + api.error_thrown = true + if err ~= nil then + api.error_message = err + return api + end + api.error_message = "Error parsing lua snippet." + return api + end +end + +return LoadStringAPI diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/common/ParamName.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/common/ParamName.lua index 7b8cf83..207c0d0 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/common/ParamName.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/common/ParamName.lua @@ -19,6 +19,7 @@ local ParamName = { latitude_degrees = "latitude_degrees", x = "x", z = "z", + lua_code = "lua code", } return ParamName From 4a0ea0f23f09837e48e9d832fdb14f53d3d28c46 Mon Sep 17 00:00:00 2001 From: Jerker Dahlblom Date: Thu, 25 Jan 2024 19:20:21 +0200 Subject: [PATCH 2/3] Lua Console (LuaConsole) working * Lua Console added. Possible to execute lua snippets. * Removed @func from lua * Added support for developer settings * Renamed command modules to end with ...InsightAPI so that they are easily distinguished when looking at environment --- .gitignore | 1 + src/client/DCSInsight/Misc/Common.cs | 11 ++++ src/client/DCSInsight/Misc/Constants.cs | 7 +++ .../UserControls/UserControlAPI.xaml | 1 + .../UserControls/UserControlAPI.xaml.cs | 63 ++++++++++++++++--- .../UserControls/UserControlAPIBase.cs | 4 +- .../Windows/WindowRangeTest.xaml.cs | 1 + .../Scripts/DCS-INSIGHT/ServerSettings.lua | 5 ++ .../Scripts/DCS-INSIGHT/lib/APIHandler.lua | 45 +++++++++---- .../Scripts/DCS-INSIGHT/lib/DCSInsight.lua | 8 +-- .../Scripts/DCS-INSIGHT/lib/Listener.lua | 4 +- .../lib/commands/GetArgumentValueAPI.lua | 8 +-- .../lib/commands/GetFrequencyAPI.lua | 8 +-- .../lib/commands/ListCockpitParamsAPI.lua | 8 +-- .../lib/commands/ListIndicationAPI.lua | 8 +-- .../LoCoordinatesToGeoCoordinatesAPI.lua | 8 +-- .../LoGeoCoordinatesToLoCoordinatesAPI.lua | 8 +-- .../lib/commands/LoGetADIPitchBankYawAPI.lua | 8 +-- .../commands/LoGetAccelerationUnitsAPI.lua | 8 +-- .../LoGetAircraftDrawArgumentValueAPI.lua | 8 +-- .../lib/commands/LoGetAltitudeAPI.lua | 8 +-- .../LoGetAltitudeAboveGroundLevelAPI.lua | 8 +-- .../LoGetAltitudeAboveSeaLevelAPI.lua | 8 +-- .../lib/commands/LoGetAngleOfAttackAPI.lua | 8 +-- .../lib/commands/LoGetAngleOfSideSlipAPI.lua | 8 +-- .../lib/commands/LoGetAngularVelocityAPI.lua | 8 +-- .../LoGetBasicAtmospherePressureAPI.lua | 8 +-- .../commands/LoGetControlPanel_HSI_API.lua | 8 +-- .../lib/commands/LoGetEngineInfoAPI.lua | 8 +-- .../lib/commands/LoGetF15_TWS_ContactsAPI.lua | 8 +-- .../lib/commands/LoGetFMDataAPI.lua | 8 +-- .../lib/commands/LoGetGlideDeviationAPI.lua | 8 +-- .../commands/LoGetIndicatedAirSpeedAPI.lua | 8 +-- .../LoGetLockedTargetInformationAPI.lua | 8 +-- .../lib/commands/LoGetMCPStateAPI.lua | 8 +-- .../lib/commands/LoGetMachNumberAPI.lua | 8 +-- .../lib/commands/LoGetMagneticYawAPI.lua | 8 +-- .../lib/commands/LoGetMechInfoAPI.lua | 8 +-- .../lib/commands/LoGetMissionStartTimeAPI.lua | 8 +-- .../lib/commands/LoGetModelTimeAPI.lua | 8 +-- .../lib/commands/LoGetNameByTypeAPI.lua | 8 +-- .../lib/commands/LoGetNavigationInfoAPI.lua | 8 +-- .../lib/commands/LoGetObjectByIdAPI.lua | 8 +-- .../lib/commands/LoGetPayloadInfoAPI.lua | 8 +-- .../lib/commands/LoGetPilotNameAPI.lua | 8 +-- .../lib/commands/LoGetPlayerPlaneIdAPI.lua | 8 +-- .../lib/commands/LoGetRadarAltimeterAPI.lua | 8 +-- .../commands/LoGetRadioBeaconsStatusAPI.lua | 8 +-- .../lib/commands/LoGetRouteAPI.lua | 8 +-- .../lib/commands/LoGetSelfDataAPI.lua | 8 +-- .../lib/commands/LoGetSideDeviationAPI.lua | 8 +-- .../commands/LoGetSightingSystemInfoAPI.lua | 8 +-- .../lib/commands/LoGetSlipBallPositionAPI.lua | 8 +-- .../lib/commands/LoGetSnaresAPI.lua | 8 +-- .../lib/commands/LoGetTWSInfoAPI.lua | 8 +-- .../commands/LoGetTargetInformationAPI.lua | 8 +-- .../lib/commands/LoGetTrueAirSpeedAPI.lua | 8 +-- .../lib/commands/LoGetVectorVelocityAPI.lua | 8 +-- .../commands/LoGetVectorWindVelocityAPI.lua | 8 +-- .../lib/commands/LoGetVerticalVelocityAPI.lua | 8 +-- .../lib/commands/LoGetWingInfoAPI.lua | 8 +-- .../lib/commands/LoGetWingTargetsAPI.lua | 8 +-- .../lib/commands/LoGetWorldObjectsAPI.lua | 8 +-- .../commands/LoIsObjectExportAllowedAPI.lua | 8 +-- .../commands/LoIsOwnshipExportAllowedAPI.lua | 8 +-- .../commands/LoIsSensorExportAllowedAPI.lua | 8 +-- .../lib/commands/LoSetCommand1API.lua | 8 +-- .../lib/commands/LoSetCommand2API.lua | 8 +-- .../lib/commands/LoadStringAPI.lua | 17 +++-- .../commands/PerformClickableActionAPI.lua | 8 +-- .../lib/commands/SetArgumentValueAPI.lua | 8 +-- .../lib/commands/SetCommandAPI.lua | 8 +-- .../lib/commands/SetFrequencyAPI.lua | 9 ++- .../lib/commands/UpdateArgumentsAPI.lua | 8 +-- .../lib/commands/common/APIBase.lua | 10 +-- .../lib/commands/common/APIInfo.lua | 2 - .../lib/commands/common/Parameter.lua | 23 ++++--- .../Scripts/DCS-INSIGHT/lib/common/Common.lua | 35 +++++++++++ .../Scripts/DCS-INSIGHT/lib/common/Logger.lua | 16 ++--- .../Scripts/DCS-INSIGHT/lib/io/Socket_API.lua | 20 +++--- 80 files changed, 449 insertions(+), 321 deletions(-) create mode 100644 src/client/DCSInsight/Misc/Constants.cs create mode 100644 src/server/Scripts/DCS-INSIGHT/lib/common/Common.lua diff --git a/.gitignore b/.gitignore index 65f329d..f06a7f7 100644 --- a/.gitignore +++ b/.gitignore @@ -400,3 +400,4 @@ FodyWeavers.xsd # JetBrains Rider *.sln.iml *.bak +src/server/Scripts/DCS-INSIGHT/ServerSettingsDevelopment.lua diff --git a/src/client/DCSInsight/Misc/Common.cs b/src/client/DCSInsight/Misc/Common.cs index 2e39b4a..3922040 100644 --- a/src/client/DCSInsight/Misc/Common.cs +++ b/src/client/DCSInsight/Misc/Common.cs @@ -2,6 +2,7 @@ using System.IO; using System.Linq; using System.Windows; +using System.Windows.Input; using NLog; namespace DCSInsight.Misc @@ -61,5 +62,15 @@ public static Tuple CheckJSONDirectory(string jsonDirectory) return new Tuple(true, jsonFound); } + + public static void UIElement_OnMouseEnter(object sender, MouseEventArgs e) + { + Mouse.OverrideCursor = Cursors.Hand; + } + + public static void UIElement_OnMouseLeave(object sender, MouseEventArgs e) + { + Mouse.OverrideCursor = Cursors.Arrow; + } } } diff --git a/src/client/DCSInsight/Misc/Constants.cs b/src/client/DCSInsight/Misc/Constants.cs new file mode 100644 index 0000000..a32da9c --- /dev/null +++ b/src/client/DCSInsight/Misc/Constants.cs @@ -0,0 +1,7 @@ +namespace DCSInsight.Misc +{ + internal static class Constants + { + internal const string ListEnvironmentSnippet = "local keys = {}\r\nfor k, v in pairs(_G) do\r\n\tkeys[#keys+1] = k \r\nend\r\nreturn keys"; + } +} diff --git a/src/client/DCSInsight/UserControls/UserControlAPI.xaml b/src/client/DCSInsight/UserControls/UserControlAPI.xaml index c33625a..33eb293 100644 --- a/src/client/DCSInsight/UserControls/UserControlAPI.xaml +++ b/src/client/DCSInsight/UserControls/UserControlAPI.xaml @@ -23,6 +23,7 @@ + diff --git a/src/client/DCSInsight/UserControls/UserControlAPI.xaml.cs b/src/client/DCSInsight/UserControls/UserControlAPI.xaml.cs index 9ec3efb..ccf27dc 100644 --- a/src/client/DCSInsight/UserControls/UserControlAPI.xaml.cs +++ b/src/client/DCSInsight/UserControls/UserControlAPI.xaml.cs @@ -4,6 +4,7 @@ using System.Windows; using System.Windows.Controls; using System.Windows.Input; +using System.Windows.Media; using DCSInsight.Events; using DCSInsight.JSON; using DCSInsight.Misc; @@ -44,7 +45,7 @@ protected override void SetFormState() { ButtonSend.IsEnabled = !TextBoxParameterList.Any(o => string.IsNullOrEmpty(o.Text)) && IsConnected; - if (DCSAPI.ReturnsData) + if (DCSAPI.ReturnsData && !IsLuaConsole) { CheckBoxPolling.IsEnabled = ButtonSend.IsEnabled; ComboBoxPollTimes.IsEnabled = CheckBoxPolling.IsChecked == false; @@ -89,15 +90,63 @@ protected override void BuildUI() IsTabStop = true }; - if (DCSAPI.Syntax == LuaConsole) + if (IsLuaConsole) { textBox.TextWrapping = TextWrapping.Wrap; textBox.AcceptsReturn = true; textBox.AcceptsTab = true; - textBox.MinWidth = 300; + textBox.MinWidth = 500; textBox.MinHeight = 150; + textBox.VerticalScrollBarVisibility = ScrollBarVisibility.Auto; + + var labelConsoleWarning = new Label + { + Content = "[warning]", + Foreground = (SolidColorBrush)new BrushConverter().ConvertFromString("#0000FF"), + }; + labelConsoleWarning.MouseEnter += Common.UIElement_OnMouseEnter; + labelConsoleWarning.MouseLeave += Common.UIElement_OnMouseLeave; + labelConsoleWarning.MouseDown += LabelConsoleWarningOnMouseDown; + + void LabelConsoleWarningOnMouseDown(object sender, MouseButtonEventArgs e) + { + MessageBox.Show("WARNING! This function enables arbitrary lua code to be\r\nexecuted on your computer, including calls to package os (Operating System).\r\nDo NOT enable unless your are firewalled.", "Warning", MessageBoxButton.OK); + } + + labelConsoleWarning.Tag = textBox; + StackPanelLinks.Children.Add(labelConsoleWarning); + + var labelDefaultLua = new Label + { + Content = "[list environment]", + Foreground = (SolidColorBrush)new BrushConverter().ConvertFromString("#0000FF"), + }; + labelDefaultLua.MouseEnter += Common.UIElement_OnMouseEnter; + labelDefaultLua.MouseLeave += Common.UIElement_OnMouseLeave; + labelDefaultLua.MouseDown += LabelDefaultLuaOnMouseDown; + + void LabelDefaultLuaOnMouseDown(object sender, MouseButtonEventArgs e) + { + try + { + var callingTextBox = (TextBox)((Label)sender).Tag; + callingTextBox.Text = Constants.ListEnvironmentSnippet; + SetFormState(); + if (ButtonSend.IsEnabled) + { + SendCommand(); + } + } + catch (Exception ex) + { + Common.ShowErrorMessageBox(ex); + } + } + + labelDefaultLua.Tag = textBox; + StackPanelLinks.Children.Add(labelDefaultLua); } - + if (dcsAPIParameterType.Type == ParameterTypeEnum.number) { textBox.KeyDown += TextBoxParameter_OnKeyDown_Number; @@ -119,7 +168,7 @@ protected override void BuildUI() ButtonSend.Click += ButtonSend_OnClick; controlList.Add(ButtonSend); - if (DCSAPI.ReturnsData) + if (DCSAPI.ReturnsData && !IsLuaConsole) { LabelKeepResults = new Label { @@ -200,8 +249,8 @@ public override void SetResult(DCSAPI dcsApi) { Dispatcher?.BeginInvoke((Action)(() => LabelResult.Content = $"Result ({dcsApi.ResultType})")); - var result = dcsApi.ErrorThrown ? dcsApi.ErrorMessage : (string.IsNullOrEmpty(dcsApi.Result) ? "nil" : dcsApi.Result); - + var result = dcsApi.ErrorThrown ? dcsApi.ErrorMessage : string.IsNullOrEmpty(dcsApi.Result) ? "nil" : dcsApi.Result; + AutoResetEventPolling.Set(); if (result == DCSAPI.Result) diff --git a/src/client/DCSInsight/UserControls/UserControlAPIBase.cs b/src/client/DCSInsight/UserControls/UserControlAPIBase.cs index 2b87e48..ffd0756 100644 --- a/src/client/DCSInsight/UserControls/UserControlAPIBase.cs +++ b/src/client/DCSInsight/UserControls/UserControlAPIBase.cs @@ -34,7 +34,8 @@ public abstract partial class UserControlAPIBase : UserControl, IDisposable, IAs protected Label LabelPollingInterval; protected ComboBox ComboBoxPollTimes; protected static readonly AutoResetEvent AutoResetEventPolling = new(false); - protected const string LuaConsole = "LuaConsole"; + private const string LuaConsole = "LuaConsole"; + protected bool IsLuaConsole; public int Id { get; protected set; } protected abstract void BuildUI(); @@ -45,6 +46,7 @@ public abstract partial class UserControlAPIBase : UserControl, IDisposable, IAs protected UserControlAPIBase(DCSAPI dcsAPI, bool isConnected) { DCSAPI = dcsAPI; + IsLuaConsole = DCSAPI.Syntax == LuaConsole; Id = DCSAPI.Id; IsConnected = isConnected; PollingTimer = new Timer(PollingTimerCallback); diff --git a/src/client/DCSInsight/Windows/WindowRangeTest.xaml.cs b/src/client/DCSInsight/Windows/WindowRangeTest.xaml.cs index 1930064..4fbc05b 100644 --- a/src/client/DCSInsight/Windows/WindowRangeTest.xaml.cs +++ b/src/client/DCSInsight/Windows/WindowRangeTest.xaml.cs @@ -44,6 +44,7 @@ public WindowRangeTest(List dcsAPIList) { InitializeComponent(); _dcsAPIList = dcsAPIList; + _dcsAPIList.RemoveAll(o => o.Syntax == "LuaConsole"); ICEventHandler.AttachErrorListener(this); ICEventHandler.AttachConnectionListener(this); ICEventHandler.AttachDataListener(this); diff --git a/src/server/Scripts/DCS-INSIGHT/ServerSettings.lua b/src/server/Scripts/DCS-INSIGHT/ServerSettings.lua index 503ee3c..945b5da 100644 --- a/src/server/Scripts/DCS-INSIGHT/ServerSettings.lua +++ b/src/server/Scripts/DCS-INSIGHT/ServerSettings.lua @@ -11,4 +11,9 @@ ServerSettings.TCP_port = 7790 -- Log incoming and outgoing JSON ServerSettings.Log_JSON = false +-- WARNING! This function enables arbitrary lua code to be +-- executed on your computer, including calls to package os (Operating System). +-- Do NOT enable unless your are firewalled. +ServerSettings.EnableLuaConsole = false + return ServerSettings diff --git a/src/server/Scripts/DCS-INSIGHT/lib/APIHandler.lua b/src/server/Scripts/DCS-INSIGHT/lib/APIHandler.lua index 976b140..34c5a8a 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/APIHandler.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/APIHandler.lua @@ -1,7 +1,10 @@ module("APIHandler", package.seeall) local Log = require("Scripts.DCS-INSIGHT.lib.common.Log") +local ServerSettings = require("Scripts.DCS-INSIGHT.ServerSettings") +local CommonInsight = require("Scripts.DCS-INSIGHT.lib.common.Common") +local LoadStringAPI = require("Scripts.DCS-INSIGHT.lib.commands.LoadStringAPI") local GetArgumentValueAPI = require("Scripts.DCS-INSIGHT.lib.commands.GetArgumentValueAPI") local SetArgumentValueAPI = require("Scripts.DCS-INSIGHT.lib.commands.SetArgumentValueAPI") local SetCommandAPI = require("Scripts.DCS-INSIGHT.lib.commands.SetCommandAPI") @@ -63,14 +66,13 @@ local LoGeoCoordinatesToLoCoordinatesAPI = require("Scripts.DCS-INSIGHT.lib.commands.LoGeoCoordinatesToLoCoordinatesAPI") local LoGetAltitudeAPI = require("Scripts.DCS-INSIGHT.lib.commands.LoGetAltitudeAPI") local LoCoordinatesToGeoCoordinatesAPI = require("Scripts.DCS-INSIGHT.lib.commands.LoCoordinatesToGeoCoordinatesAPI") -local LoadStringAPI = require("Scripts.DCS-INSIGHT.lib.commands.LoadStringAPI") --- @class APIHandler --- @field public commandsTable table --- @field public apiTable table local APIHandler = {} ---- @func Returns new APIHandler +--- Returns new APIHandler function APIHandler:new() --- @type APIHandler local o = { @@ -88,7 +90,22 @@ local function counter() return id end ---- @func Fills the commands and api table with APIs having device_id as parameter +--- Adds the lua console +function APIHandler:addLuaConsole() + Log:log_simple(0) + if CommonInsight:tryRequire("Scripts.DCS-INSIGHT.ServerSettingsDevelopment") then + local ServerSettingsDevelopment = require("Scripts.DCS-INSIGHT.ServerSettingsDevelopment") + if ServerSettingsDevelopment.EnableLuaConsole then + self.commandsTable[#self.commandsTable + 1] = LoadStringAPI:new(nil, counter()) + self.apiTable[#self.apiTable + 1] = self.commandsTable[#self.commandsTable].apiInfo + end + elseif ServerSettings.EnableLuaConsole then + self.commandsTable[#self.commandsTable + 1] = LoadStringAPI:new(nil, counter()) + self.apiTable[#self.apiTable + 1] = self.commandsTable[#self.commandsTable].apiInfo + end +end + +--- Fills the commands and api table with APIs having device_id as parameter function APIHandler:addDeviceAPIs() self.commandsTable[#self.commandsTable + 1] = GetArgumentValueAPI:new(nil, counter()) self.apiTable[#self.apiTable + 1] = self.commandsTable[#self.commandsTable].apiInfo @@ -112,7 +129,7 @@ function APIHandler:addDeviceAPIs() self.apiTable[#self.apiTable + 1] = self.commandsTable[#self.commandsTable].apiInfo end ---- @func Fills the commands and api table with APIs taking parameters but not device_id +--- Fills the commands and api table with APIs taking parameters but not device_id function APIHandler:addParameterAPIs() self.commandsTable[#self.commandsTable + 1] = LoGetAircraftDrawArgumentValueAPI:new(nil, counter()) self.apiTable[#self.apiTable + 1] = self.commandsTable[#self.commandsTable].apiInfo @@ -134,12 +151,9 @@ function APIHandler:addParameterAPIs() self.commandsTable[#self.commandsTable + 1] = LoCoordinatesToGeoCoordinatesAPI:new(nil, counter()) self.apiTable[#self.apiTable + 1] = self.commandsTable[#self.commandsTable].apiInfo - - self.commandsTable[#self.commandsTable + 1] = LoadStringAPI:new(nil, counter()) - self.apiTable[#self.apiTable + 1] = self.commandsTable[#self.commandsTable].apiInfo end ---- @func Fills the commands and api table with APIs not taking parameters +--- Fills the commands and api table with APIs not taking parameters function APIHandler:addParameterlessAPIs() self.commandsTable[#self.commandsTable + 1] = ListCockpitParamsAPI:new(nil, counter()) self.apiTable[#self.apiTable + 1] = self.commandsTable[#self.commandsTable].apiInfo @@ -282,21 +296,28 @@ function APIHandler:addParameterlessAPIs() self.apiTable[#self.apiTable + 1] = self.commandsTable[#self.commandsTable].apiInfo end ---- @func Fills the commands and api table +--- Fills the commands and api table function APIHandler:init() + self:addLuaConsole() self:addDeviceAPIs() self:addParameterAPIs() self:addParameterlessAPIs() self:verify_entries() end ---- @func Executes the command and returns a command containing the result +--- Executes the command and returns a command containing the result --- @param api APIInfo function APIHandler:execute(api) for k, v in pairs(self.commandsTable) do if api.id == v.id then local result_code, result = pcall(v.execute, v, api) -- = v:execute(api) - if result_code == true then + + if api.error_thrown then + if api.error_message == nil then + api.error_message = "Error but no error message" + end + return result + elseif result_code == true then result.error_thrown = false result.error_message = "" return result @@ -319,7 +340,7 @@ function APIHandler:execute(api) end end ---- @func Performs checks on registered api +--- Performs checks on registered api --- @return boolean function APIHandler:verify_entries() local message = "Following api have been loaded :\n" diff --git a/src/server/Scripts/DCS-INSIGHT/lib/DCSInsight.lua b/src/server/Scripts/DCS-INSIGHT/lib/DCSInsight.lua index 8752634..3647ba9 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/DCSInsight.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/DCSInsight.lua @@ -76,10 +76,10 @@ function LuaExportAfterNextFrame() local currentTime = LoGetModelTime() if currentTime >= lastStepTime then - local bool, err = pcall(step) - err = err or "something failed" - if not bool then - Log:log_simple("Listener.step() failed: " .. err) + local result_code, result = pcall(step) + result = result or "something failed" + if not result_code then + Log:log_simple("Listener.step() failed: " .. result) end lastStepTime = currentTime + 0.1 end diff --git a/src/server/Scripts/DCS-INSIGHT/lib/Listener.lua b/src/server/Scripts/DCS-INSIGHT/lib/Listener.lua index 3a0fb0a..e57abd5 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/Listener.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/Listener.lua @@ -14,7 +14,7 @@ local ServerSettings = require("Scripts.DCS-INSIGHT.ServerSettings") --- @field public ReadClientData function local Listener = {} ---- @func Returns new Listener +--- Returns new Listener --- @return Listener function Listener:new(host, port, APIHandler) local o = { @@ -66,7 +66,7 @@ Listener.ReadClientData = function(str) end end ---- @func Initializes the TCPServer and APIHandler +--- Initializes the TCPServer and APIHandler function Listener:init() self.APIHandler:init() self.tcpServer = TCPServer:new(self.host, self.port, socket, self.ReadClientData) diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/GetArgumentValueAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/GetArgumentValueAPI.lua index de0f41f..e3b74db 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/GetArgumentValueAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/GetArgumentValueAPI.lua @@ -1,4 +1,4 @@ -module("GetArgumentValueAPI", package.seeall) +module("GetArgumentValueInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") local ParamName = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamName") @@ -9,7 +9,7 @@ local ParamType = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamType") --- @field apiInfo APIInfo local GetArgumentValueAPI = APIBase:new() ---- @func Returns new GetArgumentValueAPI +--- Returns new GetArgumentValueAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -24,10 +24,10 @@ function GetArgumentValueAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function GetArgumentValueAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function GetArgumentValueAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/GetFrequencyAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/GetFrequencyAPI.lua index 6bdc7d9..3363904 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/GetFrequencyAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/GetFrequencyAPI.lua @@ -1,4 +1,4 @@ -module("GetFrequencyAPI", package.seeall) +module("GetFrequencyInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") local ParamName = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamName") @@ -9,7 +9,7 @@ local ParamType = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamType") --- @field apiInfo APIInfo local GetFrequencyAPI = APIBase:new() ---- @func Returns new GetFrequencyAPI +--- Returns new GetFrequencyAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -24,10 +24,10 @@ function GetFrequencyAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function GetFrequencyAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function GetFrequencyAPI:execute(api) local param0 diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/ListCockpitParamsAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/ListCockpitParamsAPI.lua index ce736b8..81aed92 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/ListCockpitParamsAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/ListCockpitParamsAPI.lua @@ -1,4 +1,4 @@ -module("ListCockpitParamsAPI", package.seeall) +module("ListCockpitParamsInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local ListCockpitParamsAPI = APIBase:new() ---- @func Returns new ListCockpitParamsAPI +--- Returns new ListCockpitParamsAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -20,10 +20,10 @@ function ListCockpitParamsAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function ListCockpitParamsAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function ListCockpitParamsAPI:execute(api) local result = list_cockpit_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/ListIndicationAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/ListIndicationAPI.lua index 8fd93b8..7f99f5b 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/ListIndicationAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/ListIndicationAPI.lua @@ -1,4 +1,4 @@ -module("ListIndicationAPI", package.seeall) +module("ListIndicationInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") local ParamName = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamName") @@ -9,7 +9,7 @@ local ParamType = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamType") --- @field apiInfo APIInfo local ListIndicationAPI = APIBase:new() ---- @func Returns new ListIndicationAPI +--- Returns new ListIndicationAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -23,10 +23,10 @@ function ListIndicationAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function ListIndicationAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function ListIndicationAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoCoordinatesToGeoCoordinatesAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoCoordinatesToGeoCoordinatesAPI.lua index ea39186..4c765f7 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoCoordinatesToGeoCoordinatesAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoCoordinatesToGeoCoordinatesAPI.lua @@ -1,4 +1,4 @@ -module("LoCoordinatesToGeoCoordinatesAPI", package.seeall) +module("LoCoordinatesToGeoCoordinatesInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") local ParamName = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamName") @@ -9,7 +9,7 @@ local ParamType = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamType") --- @field apiInfo APIInfo local LoCoordinatesToGeoCoordinatesAPI = APIBase:new() ---- @func Returns new LoCoordinatesToGeoCoordinatesAPI +--- Returns new LoCoordinatesToGeoCoordinatesAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -24,10 +24,10 @@ function LoCoordinatesToGeoCoordinatesAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoCoordinatesToGeoCoordinatesAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoCoordinatesToGeoCoordinatesAPI:execute(api) local param0 diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGeoCoordinatesToLoCoordinatesAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGeoCoordinatesToLoCoordinatesAPI.lua index 2343b06..7e470fa 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGeoCoordinatesToLoCoordinatesAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGeoCoordinatesToLoCoordinatesAPI.lua @@ -1,4 +1,4 @@ -module("LoGeoCoordinatesToLoCoordinatesAPI", package.seeall) +module("LoGeoCoordinatesToLoCoordinatesInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") local ParamName = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamName") @@ -9,7 +9,7 @@ local ParamType = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamType") --- @field apiInfo APIInfo local LoGeoCoordinatesToLoCoordinatesAPI = APIBase:new() ---- @func Returns new LoGeoCoordinatesToLoCoordinatesAPI +--- Returns new LoGeoCoordinatesToLoCoordinatesAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -24,10 +24,10 @@ function LoGeoCoordinatesToLoCoordinatesAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGeoCoordinatesToLoCoordinatesAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGeoCoordinatesToLoCoordinatesAPI:execute(api) local param0 diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetADIPitchBankYawAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetADIPitchBankYawAPI.lua index 55750eb..be5e61e 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetADIPitchBankYawAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetADIPitchBankYawAPI.lua @@ -1,4 +1,4 @@ -module("LoGetADIPitchBankYawAPI", package.seeall) +module("LoGetADIPitchBankYawInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetADIPitchBankYawAPI = APIBase:new() ---- @func Returns new LoGetADIPitchBankYawAPI +--- Returns new LoGetADIPitchBankYawAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetADIPitchBankYawAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetADIPitchBankYawAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetADIPitchBankYawAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAccelerationUnitsAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAccelerationUnitsAPI.lua index 55996af..b56be13 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAccelerationUnitsAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAccelerationUnitsAPI.lua @@ -1,4 +1,4 @@ -module("LoGetAccelerationUnitsAPI", package.seeall) +module("LoGetAccelerationUnitsInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetAccelerationUnitsAPI = APIBase:new() ---- @func Returns new LoGetAccelerationUnitsAPI +--- Returns new LoGetAccelerationUnitsAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetAccelerationUnitsAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetAccelerationUnitsAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetAccelerationUnitsAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAircraftDrawArgumentValueAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAircraftDrawArgumentValueAPI.lua index fb69bca..0eb47a4 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAircraftDrawArgumentValueAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAircraftDrawArgumentValueAPI.lua @@ -1,4 +1,4 @@ -module("LoGetAircraftDrawArgumentValueAPI", package.seeall) +module("LoGetAircraftDrawArgumentValueInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") local ParamName = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamName") @@ -9,7 +9,7 @@ local ParamType = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamType") --- @field apiInfo APIInfo local LoGetAircraftDrawArgumentValueAPI = APIBase:new() ---- @func Returns new LoGetAircraftDrawArgumentValueAPI +--- Returns new LoGetAircraftDrawArgumentValueAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -23,10 +23,10 @@ function LoGetAircraftDrawArgumentValueAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetAircraftDrawArgumentValueAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetAircraftDrawArgumentValueAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAltitudeAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAltitudeAPI.lua index decd430..cde0e9f 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAltitudeAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAltitudeAPI.lua @@ -1,4 +1,4 @@ -module("LoGetAltitudeAPI", package.seeall) +module("LoGetAltitudeInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetAltitudeAPI = APIBase:new() ---- @func Returns new LoGetAltitudeAPI +--- Returns new LoGetAltitudeAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetAltitudeAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetAltitudeAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetAltitudeAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAltitudeAboveGroundLevelAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAltitudeAboveGroundLevelAPI.lua index eeb8d9d..131e19d 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAltitudeAboveGroundLevelAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAltitudeAboveGroundLevelAPI.lua @@ -1,4 +1,4 @@ -module("LoGetAltitudeAboveGroundLevelAPI", package.seeall) +module("LoGetAltitudeAboveGroundLevelInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetAltitudeAboveGroundLevelAPI = APIBase:new() ---- @func Returns new LoGetAltitudeAboveGroundLevelAPI +--- Returns new LoGetAltitudeAboveGroundLevelAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetAltitudeAboveGroundLevelAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetAltitudeAboveGroundLevelAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetAltitudeAboveGroundLevelAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAltitudeAboveSeaLevelAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAltitudeAboveSeaLevelAPI.lua index 3181a43..5bbb50f 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAltitudeAboveSeaLevelAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAltitudeAboveSeaLevelAPI.lua @@ -1,4 +1,4 @@ -module("LoGetAltitudeAboveSeaLevelAPI", package.seeall) +module("LoGetAltitudeAboveSeaLevelInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetAltitudeAboveSeaLevelAPI = APIBase:new() ---- @func Returns new LoGetAltitudeAboveSeaLevelAPI +--- Returns new LoGetAltitudeAboveSeaLevelAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetAltitudeAboveSeaLevelAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetAltitudeAboveSeaLevelAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetAltitudeAboveSeaLevelAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAngleOfAttackAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAngleOfAttackAPI.lua index 5e407cf..4263dc5 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAngleOfAttackAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAngleOfAttackAPI.lua @@ -1,4 +1,4 @@ -module("LoGetAngleOfAttackAPI", package.seeall) +module("LoGetAngleOfAttackInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetAngleOfAttackAPI = APIBase:new() ---- @func Returns new LoGetAngleOfAttackAPI +--- Returns new LoGetAngleOfAttackAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetAngleOfAttackAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetAngleOfAttackAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetAngleOfAttackAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAngleOfSideSlipAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAngleOfSideSlipAPI.lua index 7a35028..6dcc975 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAngleOfSideSlipAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAngleOfSideSlipAPI.lua @@ -1,4 +1,4 @@ -module("LoGetAngleOfSideSlipAPI", package.seeall) +module("LoGetAngleOfSideSlipInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetAngleOfSideSlipAPI = APIBase:new() ---- @func Returns new LoGetAngleOfSideSlipAPI +--- Returns new LoGetAngleOfSideSlipAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetAngleOfSideSlipAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetAngleOfSideSlipAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetAngleOfSideSlipAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAngularVelocityAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAngularVelocityAPI.lua index 1810e62..81fce4a 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAngularVelocityAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetAngularVelocityAPI.lua @@ -1,4 +1,4 @@ -module("LoGetAngularVelocityAPI", package.seeall) +module("LoGetAngularVelocityInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetAngularVelocityAPI = APIBase:new() ---- @func Returns new LoGetAngularVelocityAPI +--- Returns new LoGetAngularVelocityAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetAngularVelocityAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetAngularVelocityAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetAngularVelocityAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetBasicAtmospherePressureAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetBasicAtmospherePressureAPI.lua index f80f776..0c3015c 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetBasicAtmospherePressureAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetBasicAtmospherePressureAPI.lua @@ -1,4 +1,4 @@ -module("LoGetBasicAtmospherePressureAPI", package.seeall) +module("LoGetBasicAtmospherePressureInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetBasicAtmospherePressureAPI = APIBase:new() ---- @func Returns new LoGetBasicAtmospherePressureAPI +--- Returns new LoGetBasicAtmospherePressureAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetBasicAtmospherePressureAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetBasicAtmospherePressureAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetBasicAtmospherePressureAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetControlPanel_HSI_API.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetControlPanel_HSI_API.lua index 8524c22..137fe35 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetControlPanel_HSI_API.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetControlPanel_HSI_API.lua @@ -1,4 +1,4 @@ -module("LoGetControlPanel_HSI_API", package.seeall) +module("LoGetControlPanel_HSI_InsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetControlPanel_HSI_API = APIBase:new() ---- @func Returns new LoGetControlPanel_HSI_API +--- Returns new LoGetControlPanel_HSI_API --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetControlPanel_HSI_API:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetControlPanel_HSI_API:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetControlPanel_HSI_API:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetEngineInfoAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetEngineInfoAPI.lua index fdf78fb..02c2384 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetEngineInfoAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetEngineInfoAPI.lua @@ -1,4 +1,4 @@ -module("LoGetEngineInfoAPI", package.seeall) +module("LoGetEngineInfoInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetEngineInfoAPI = APIBase:new() ---- @func Returns new LoGetEngineInfoAPI +--- Returns new LoGetEngineInfoAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetEngineInfoAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetEngineInfoAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetEngineInfoAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetF15_TWS_ContactsAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetF15_TWS_ContactsAPI.lua index 6eeccf1..1d0755e 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetF15_TWS_ContactsAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetF15_TWS_ContactsAPI.lua @@ -1,4 +1,4 @@ -module("LoGetF15_TWS_ContactsAPI", package.seeall) +module("LoGetF15_TWS_ContactsInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") local ParamName = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamName") @@ -9,7 +9,7 @@ local ParamType = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamType") --- @field apiInfo APIInfo local LoGetF15_TWS_ContactsAPI = APIBase:new() ---- @func Returns new LoGetF15_TWS_ContactsAPI +--- Returns new LoGetF15_TWS_ContactsAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -21,10 +21,10 @@ function LoGetF15_TWS_ContactsAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetF15_TWS_ContactsAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetF15_TWS_ContactsAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetFMDataAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetFMDataAPI.lua index ada9122..e06daa0 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetFMDataAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetFMDataAPI.lua @@ -1,4 +1,4 @@ -module("LoGetFMDataAPI", package.seeall) +module("LoGetFMDataInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetFMDataAPI = APIBase:new() ---- @func Returns new LoGetFMDataAPI +--- Returns new LoGetFMDataAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetFMDataAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetFMDataAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetFMDataAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetGlideDeviationAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetGlideDeviationAPI.lua index 1e4d90b..ae73b41 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetGlideDeviationAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetGlideDeviationAPI.lua @@ -1,4 +1,4 @@ -module("LoGetGlideDeviationAPI", package.seeall) +module("LoGetGlideDeviationInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetGlideDeviationAPI = APIBase:new() ---- @func Returns new LoGetGlideDeviationAPI +--- Returns new LoGetGlideDeviationAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetGlideDeviationAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetGlideDeviationAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetGlideDeviationAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetIndicatedAirSpeedAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetIndicatedAirSpeedAPI.lua index e57d6e3..a4f94b7 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetIndicatedAirSpeedAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetIndicatedAirSpeedAPI.lua @@ -1,4 +1,4 @@ -module("LoGetIndicatedAirSpeedAPI", package.seeall) +module("LoGetIndicatedAirSpeedInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetIndicatedAirSpeedAPI = APIBase:new() ---- @func Returns new LoGetIndicatedAirSpeedAPI +--- Returns new LoGetIndicatedAirSpeedAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetIndicatedAirSpeedAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetIndicatedAirSpeedAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetIndicatedAirSpeedAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetLockedTargetInformationAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetLockedTargetInformationAPI.lua index 36c657e..5159f1f 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetLockedTargetInformationAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetLockedTargetInformationAPI.lua @@ -1,4 +1,4 @@ -module("LoGetLockedTargetInformationAPI", package.seeall) +module("LoGetLockedTargetInformationInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetLockedTargetInformationAPI = APIBase:new() ---- @func Returns new LoGetLockedTargetInformationAPI +--- Returns new LoGetLockedTargetInformationAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetLockedTargetInformationAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetLockedTargetInformationAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetLockedTargetInformationAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetMCPStateAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetMCPStateAPI.lua index a0d2df8..0da88f9 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetMCPStateAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetMCPStateAPI.lua @@ -1,4 +1,4 @@ -module("LoGetMCPStateAPI", package.seeall) +module("LoGetMCPStateInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetMCPStateAPI = APIBase:new() ---- @func Returns new LoGetMCPStateAPI +--- Returns new LoGetMCPStateAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetMCPStateAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetMCPStateAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetMCPStateAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetMachNumberAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetMachNumberAPI.lua index 6077bac..c2ad2dd 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetMachNumberAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetMachNumberAPI.lua @@ -1,4 +1,4 @@ -module("LoGetMachNumberAPI", package.seeall) +module("LoGetMachNumberInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetMachNumberAPI = APIBase:new() ---- @func Returns new LoGetMachNumberAPI +--- Returns new LoGetMachNumberAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetMachNumberAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetMachNumberAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetMachNumberAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetMagneticYawAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetMagneticYawAPI.lua index f02fabe..2ce03e3 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetMagneticYawAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetMagneticYawAPI.lua @@ -1,4 +1,4 @@ -module("LoGetMagneticYawAPI", package.seeall) +module("LoGetMagneticYawInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetMagneticYawAPI = APIBase:new() ---- @func Returns new LoGetMagneticYawAPI +--- Returns new LoGetMagneticYawAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetMagneticYawAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetMagneticYawAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetMagneticYawAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetMechInfoAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetMechInfoAPI.lua index f9bee7a..f0e6700 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetMechInfoAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetMechInfoAPI.lua @@ -1,4 +1,4 @@ -module("LoGetMechInfoAPI", package.seeall) +module("LoGetMechInfoInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetMechInfoAPI = APIBase:new() ---- @func Returns new LoGetMechInfoAPI +--- Returns new LoGetMechInfoAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetMechInfoAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetMechInfoAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetMechInfoAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetMissionStartTimeAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetMissionStartTimeAPI.lua index 5bcdaf4..0b57baa 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetMissionStartTimeAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetMissionStartTimeAPI.lua @@ -1,4 +1,4 @@ -module("LoGetMissionStartTimeAPI", package.seeall) +module("LoGetMissionStartTimeInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetMissionStartTimeAPI = APIBase:new() ---- @func Returns new LoGetMissionStartTimeAPI +--- Returns new LoGetMissionStartTimeAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetMissionStartTimeAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetMissionStartTimeAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetMissionStartTimeAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetModelTimeAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetModelTimeAPI.lua index a70a2e3..13d9315 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetModelTimeAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetModelTimeAPI.lua @@ -1,4 +1,4 @@ -module("LoGetModelTimeAPI", package.seeall) +module("LoGetModelTimeInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetModelTimeAPI = APIBase:new() ---- @func Returns new LoGetModelTimeAPI +--- Returns new LoGetModelTimeAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetModelTimeAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetModelTimeAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetModelTimeAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetNameByTypeAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetNameByTypeAPI.lua index d3dc4e4..f8e0039 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetNameByTypeAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetNameByTypeAPI.lua @@ -1,4 +1,4 @@ -module("LoGetNameByTypeAPI", package.seeall) +module("LoGetNameByTypeInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") local ParamName = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamName") @@ -9,7 +9,7 @@ local ParamType = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamType") --- @field apiInfo APIInfo local LoGetNameByTypeAPI = APIBase:new() ---- @func Returns new LoGetNameByTypeAPI +--- Returns new LoGetNameByTypeAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -27,10 +27,10 @@ function LoGetNameByTypeAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetNameByTypeAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetNameByTypeAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetNavigationInfoAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetNavigationInfoAPI.lua index e19292e..61bbe6b 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetNavigationInfoAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetNavigationInfoAPI.lua @@ -1,4 +1,4 @@ -module("LoGetNavigationInfoAPI", package.seeall) +module("LoGetNavigationInfoInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetNavigationInfoAPI = APIBase:new() ---- @func Returns new LoGetNavigationInfoAPI +--- Returns new LoGetNavigationInfoAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetNavigationInfoAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetNavigationInfoAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetNavigationInfoAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetObjectByIdAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetObjectByIdAPI.lua index df5bae6..54bc16c 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetObjectByIdAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetObjectByIdAPI.lua @@ -1,4 +1,4 @@ -module("LoGetObjectByIdAPI", package.seeall) +module("LoGetObjectByIdInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") local ParamName = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamName") @@ -9,7 +9,7 @@ local ParamType = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamType") --- @field apiInfo APIInfo local LoGetObjectByIdAPI = APIBase:new() ---- @func Returns new LoGetObjectByIdAPI +--- Returns new LoGetObjectByIdAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -23,10 +23,10 @@ function LoGetObjectByIdAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetObjectByIdAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetObjectByIdAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetPayloadInfoAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetPayloadInfoAPI.lua index 898d4a0..468ac5a 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetPayloadInfoAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetPayloadInfoAPI.lua @@ -1,4 +1,4 @@ -module("LoGetPayloadInfoAPI", package.seeall) +module("LoGetPayloadInfoInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetPayloadInfoAPI = APIBase:new() ---- @func Returns new LoGetPayloadInfoAPI +--- Returns new LoGetPayloadInfoAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetPayloadInfoAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetPayloadInfoAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetPayloadInfoAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetPilotNameAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetPilotNameAPI.lua index 51f14b7..c484ce5 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetPilotNameAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetPilotNameAPI.lua @@ -1,4 +1,4 @@ -module("LoGetPilotNameAPI", package.seeall) +module("LoGetPilotNameInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetPilotNameAPI = APIBase:new() ---- @func Returns new LoGetPilotNameAPI +--- Returns new LoGetPilotNameAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetPilotNameAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetPilotNameAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetPilotNameAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetPlayerPlaneIdAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetPlayerPlaneIdAPI.lua index 0ac1ee9..e99da08 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetPlayerPlaneIdAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetPlayerPlaneIdAPI.lua @@ -1,4 +1,4 @@ -module("LoGetPlayerPlaneIdAPI", package.seeall) +module("LoGetPlayerPlaneIdInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") local ParamName = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamName") @@ -9,7 +9,7 @@ local ParamType = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamType") --- @field apiInfo APIInfo local LoGetPlayerPlaneIdAPI = APIBase:new() ---- @func Returns new LoGetPlayerPlaneIdAPI +--- Returns new LoGetPlayerPlaneIdAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -21,10 +21,10 @@ function LoGetPlayerPlaneIdAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetPlayerPlaneIdAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetPlayerPlaneIdAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetRadarAltimeterAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetRadarAltimeterAPI.lua index ca1578c..4a4d65c 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetRadarAltimeterAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetRadarAltimeterAPI.lua @@ -1,4 +1,4 @@ -module("LoGetRadarAltimeterAPI", package.seeall) +module("LoGetRadarAltimeterInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetRadarAltimeterAPI = APIBase:new() ---- @func Returns new LoGetRadarAltimeterAPI +--- Returns new LoGetRadarAltimeterAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetRadarAltimeterAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetRadarAltimeterAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetRadarAltimeterAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetRadioBeaconsStatusAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetRadioBeaconsStatusAPI.lua index bfccbcb..a966ef7 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetRadioBeaconsStatusAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetRadioBeaconsStatusAPI.lua @@ -1,4 +1,4 @@ -module("LoGetRadioBeaconsStatusAPI", package.seeall) +module("LoGetRadioBeaconsStatusInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetRadioBeaconsStatusAPI = APIBase:new() ---- @func Returns new LoGetRadioBeaconsStatusAPI +--- Returns new LoGetRadioBeaconsStatusAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetRadioBeaconsStatusAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetRadioBeaconsStatusAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetRadioBeaconsStatusAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetRouteAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetRouteAPI.lua index 3cbbbfd..9a3b28c 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetRouteAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetRouteAPI.lua @@ -1,4 +1,4 @@ -module("LoGetRouteAPI", package.seeall) +module("LoGetRouteInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetRouteAPI = APIBase:new() ---- @func Returns new LoGetRouteAPI +--- Returns new LoGetRouteAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetRouteAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetRouteAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetRouteAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetSelfDataAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetSelfDataAPI.lua index 6c61fc8..7d3e7ce 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetSelfDataAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetSelfDataAPI.lua @@ -1,4 +1,4 @@ -module("LoGetSelfDataAPI", package.seeall) +module("LoGetSelfDataInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetSelfDataAPI = APIBase:new() ---- @func Returns new LoGetSelfDataAPI +--- Returns new LoGetSelfDataAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetSelfDataAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetSelfDataAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetSelfDataAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetSideDeviationAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetSideDeviationAPI.lua index 6657c06..496c2e0 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetSideDeviationAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetSideDeviationAPI.lua @@ -1,4 +1,4 @@ -module("LoGetSideDeviationAPI", package.seeall) +module("LoGetSideDeviationInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetSideDeviationAPI = APIBase:new() ---- @func Returns new LoGetSideDeviationAPI +--- Returns new LoGetSideDeviationAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetSideDeviationAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetSideDeviationAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetSideDeviationAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetSightingSystemInfoAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetSightingSystemInfoAPI.lua index 59c2617..4240e28 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetSightingSystemInfoAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetSightingSystemInfoAPI.lua @@ -1,4 +1,4 @@ -module("LoGetSightingSystemInfoAPI", package.seeall) +module("LoGetSightingSystemInfoInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") local ParamName = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamName") @@ -9,7 +9,7 @@ local ParamType = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamType") --- @field apiInfo APIInfo local LoGetSightingSystemInfoAPI = APIBase:new() ---- @func Returns new LoGetSightingSystemInfoAPI +--- Returns new LoGetSightingSystemInfoAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -21,10 +21,10 @@ function LoGetSightingSystemInfoAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetSightingSystemInfoAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetSightingSystemInfoAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetSlipBallPositionAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetSlipBallPositionAPI.lua index b9f3985..185d417 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetSlipBallPositionAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetSlipBallPositionAPI.lua @@ -1,4 +1,4 @@ -module("LoGetSlipBallPositionAPI", package.seeall) +module("LoGetSlipBallPositionInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetSlipBallPositionAPI = APIBase:new() ---- @func Returns new LoGetSlipBallPositionAPI +--- Returns new LoGetSlipBallPositionAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetSlipBallPositionAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetSlipBallPositionAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetSlipBallPositionAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetSnaresAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetSnaresAPI.lua index 13fb3f1..55cc500 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetSnaresAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetSnaresAPI.lua @@ -1,4 +1,4 @@ -module("LoGetSnaresAPI", package.seeall) +module("LoGetSnaresInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetSnaresAPI = APIBase:new() ---- @func Returns new LoGetSnaresAPI +--- Returns new LoGetSnaresAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetSnaresAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetSnaresAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetSnaresAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetTWSInfoAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetTWSInfoAPI.lua index e7ccfc2..d8d709f 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetTWSInfoAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetTWSInfoAPI.lua @@ -1,4 +1,4 @@ -module("LoGetTWSInfoAPI", package.seeall) +module("LoGetTWSInfoInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetTWSInfoAPI = APIBase:new() ---- @func Returns new LoGetTWSInfoAPI +--- Returns new LoGetTWSInfoAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetTWSInfoAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetTWSInfoAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetTWSInfoAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetTargetInformationAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetTargetInformationAPI.lua index 37c22ff..a8420f6 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetTargetInformationAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetTargetInformationAPI.lua @@ -1,4 +1,4 @@ -module("LoGetTargetInformationAPI", package.seeall) +module("LoGetTargetInformationInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") local ParamName = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamName") @@ -9,7 +9,7 @@ local ParamType = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamType") --- @field apiInfo APIInfo local LoGetTargetInformationAPI = APIBase:new() ---- @func Returns new LoGetTargetInformationAPI +--- Returns new LoGetTargetInformationAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -21,10 +21,10 @@ function LoGetTargetInformationAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetTargetInformationAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetTargetInformationAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetTrueAirSpeedAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetTrueAirSpeedAPI.lua index 1147dd0..f9abf03 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetTrueAirSpeedAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetTrueAirSpeedAPI.lua @@ -1,4 +1,4 @@ -module("LoGetTrueAirSpeedAPI", package.seeall) +module("LoGetTrueAirSpeedInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetTrueAirSpeedAPI = APIBase:new() ---- @func Returns new LoGetTrueAirSpeedAPI +--- Returns new LoGetTrueAirSpeedAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetTrueAirSpeedAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetTrueAirSpeedAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetTrueAirSpeedAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetVectorVelocityAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetVectorVelocityAPI.lua index c2d53e7..42dde08 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetVectorVelocityAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetVectorVelocityAPI.lua @@ -1,4 +1,4 @@ -module("LoGetVectorVelocityAPI", package.seeall) +module("LoGetVectorVelocityInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetVectorVelocityAPI = APIBase:new() ---- @func Returns new LoGetVectorVelocityAPI +--- Returns new LoGetVectorVelocityAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetVectorVelocityAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetVectorVelocityAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetVectorVelocityAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetVectorWindVelocityAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetVectorWindVelocityAPI.lua index bc9a267..00ec6b6 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetVectorWindVelocityAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetVectorWindVelocityAPI.lua @@ -1,4 +1,4 @@ -module("LoGetVectorWindVelocityAPI", package.seeall) +module("LoGetVectorWindVelocityInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetVectorWindVelocityAPI = APIBase:new() ---- @func Returns new LoGetVectorWindVelocityAPI +--- Returns new LoGetVectorWindVelocityAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetVectorWindVelocityAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetVectorWindVelocityAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetVectorWindVelocityAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetVerticalVelocityAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetVerticalVelocityAPI.lua index 4c3194c..e4dd391 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetVerticalVelocityAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetVerticalVelocityAPI.lua @@ -1,4 +1,4 @@ -module("LoGetVerticalVelocityAPI", package.seeall) +module("LoGetVerticalVelocityInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetVerticalVelocityAPI = APIBase:new() ---- @func Returns new LoGetVerticalVelocityAPI +--- Returns new LoGetVerticalVelocityAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetVerticalVelocityAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetVerticalVelocityAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetVerticalVelocityAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetWingInfoAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetWingInfoAPI.lua index 247b9cb..5893741 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetWingInfoAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetWingInfoAPI.lua @@ -1,4 +1,4 @@ -module("LoGetWingInfoAPI", package.seeall) +module("LoGetWingInfoInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoGetWingInfoAPI = APIBase:new() ---- @func Returns new LoGetWingInfoAPI +--- Returns new LoGetWingInfoAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoGetWingInfoAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetWingInfoAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetWingInfoAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetWingTargetsAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetWingTargetsAPI.lua index ce66b05..0077587 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetWingTargetsAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetWingTargetsAPI.lua @@ -1,4 +1,4 @@ -module("LoGetWingTargetsAPI", package.seeall) +module("LoGetWingTargetsInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") local ParamName = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamName") @@ -9,7 +9,7 @@ local ParamType = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamType") --- @field apiInfo APIInfo local LoGetWingTargetsAPI = APIBase:new() ---- @func Returns new LoGetWingTargetsAPI +--- Returns new LoGetWingTargetsAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -21,10 +21,10 @@ function LoGetWingTargetsAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetWingTargetsAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetWingTargetsAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetWorldObjectsAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetWorldObjectsAPI.lua index 4064dbb..68aa074 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetWorldObjectsAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoGetWorldObjectsAPI.lua @@ -1,4 +1,4 @@ -module("LoGetWorldObjectsAPI", package.seeall) +module("LoGetWorldObjectsInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") local ParamName = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamName") @@ -9,7 +9,7 @@ local ParamType = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamType") --- @field apiInfo APIInfo local LoGetWorldObjectsAPI = APIBase:new() ---- @func Returns new LoGetWorldObjectsAPI +--- Returns new LoGetWorldObjectsAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -21,10 +21,10 @@ function LoGetWorldObjectsAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoGetWorldObjectsAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoGetWorldObjectsAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoIsObjectExportAllowedAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoIsObjectExportAllowedAPI.lua index fcc751f..ad20d11 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoIsObjectExportAllowedAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoIsObjectExportAllowedAPI.lua @@ -1,4 +1,4 @@ -module("LoIsObjectExportAllowedAPI", package.seeall) +module("LoIsObjectExportAllowedInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoIsObjectExportAllowedAPI = APIBase:new() ---- @func Returns new LoIsObjectExportAllowedAPI +--- Returns new LoIsObjectExportAllowedAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoIsObjectExportAllowedAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoIsObjectExportAllowedAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoIsObjectExportAllowedAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoIsOwnshipExportAllowedAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoIsOwnshipExportAllowedAPI.lua index 6554577..0fd63da 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoIsOwnshipExportAllowedAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoIsOwnshipExportAllowedAPI.lua @@ -1,4 +1,4 @@ -module("LoIsOwnshipExportAllowedAPI", package.seeall) +module("LoIsOwnshipExportAllowedInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoIsOwnshipExportAllowedAPI = APIBase:new() ---- @func Returns new LoIsOwnshipExportAllowedAPI +--- Returns new LoIsOwnshipExportAllowedAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoIsOwnshipExportAllowedAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoIsOwnshipExportAllowedAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoIsOwnshipExportAllowedAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoIsSensorExportAllowedAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoIsSensorExportAllowedAPI.lua index 7240dff..e44fdec 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoIsSensorExportAllowedAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoIsSensorExportAllowedAPI.lua @@ -1,4 +1,4 @@ -module("LoIsSensorExportAllowedAPI", package.seeall) +module("LoIsSensorExportAllowedInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") @@ -7,7 +7,7 @@ local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") --- @field apiInfo APIInfo local LoIsSensorExportAllowedAPI = APIBase:new() ---- @func Returns new LoIsSensorExportAllowedAPI +--- Returns new LoIsSensorExportAllowedAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -19,10 +19,10 @@ function LoIsSensorExportAllowedAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoIsSensorExportAllowedAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoIsSensorExportAllowedAPI:execute(api) local result_code, message = self:verify_params() diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoSetCommand1API.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoSetCommand1API.lua index ebd7c3b..48d7155 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoSetCommand1API.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoSetCommand1API.lua @@ -1,4 +1,4 @@ -module("LoSetCommand1API", package.seeall) +module("LoSetCommand1InsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") local ParamName = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamName") @@ -9,7 +9,7 @@ local ParamType = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamType") --- @field apiInfo APIInfo local LoSetCommand1API = APIBase:new() ---- @func Returns new LoSetCommand1API +--- Returns new LoSetCommand1API --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -23,10 +23,10 @@ function LoSetCommand1API:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoSetCommand1API:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoSetCommand1API:execute(api) local param0 diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoSetCommand2API.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoSetCommand2API.lua index a9619f4..dc3a7af 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoSetCommand2API.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoSetCommand2API.lua @@ -1,4 +1,4 @@ -module("LoSetCommand2API", package.seeall) +module("LoSetCommand2InsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") local ParamName = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamName") @@ -9,7 +9,7 @@ local ParamType = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamType") --- @field apiInfo APIInfo local LoSetCommand2API = APIBase:new() ---- @func Returns new LoSetCommand2API +--- Returns new LoSetCommand2API --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -24,10 +24,10 @@ function LoSetCommand2API:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoSetCommand2API:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoSetCommand2API:execute(api) local param0 diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoadStringAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoadStringAPI.lua index c62b7f4..398eb73 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/LoadStringAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/LoadStringAPI.lua @@ -1,7 +1,6 @@ -module("LoadStringAPI", package.seeall) +module("LoadStringInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") -local Parameter = require("Scripts.DCS-INSIGHT.lib.commands.common.Parameter") local ParamName = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamName") local ParamType = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamType") @@ -10,12 +9,12 @@ local ParamType = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamType") --- @field apiInfo APIInfo local LoadStringAPI = APIBase:new() ---- @func Returns new LoadStringAPI +--- Returns new LoadStringAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase function LoadStringAPI:new(o, apiId) - o = o or APIBase:new(o, apiId, false, "LuaConsole", 1) + o = o or APIBase:new(o, apiId, true, "LuaConsole", 1) o:add_param_def(0, ParamName.lua_code, ParamType.string) @@ -24,10 +23,10 @@ function LoadStringAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function LoadStringAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function LoadStringAPI:execute(api) local param0 @@ -47,10 +46,10 @@ function LoadStringAPI:execute(api) local f, err = loadstring(param0) if f then - local result, err2 = pcall(f()) - if err2 then + local result_code, result = pcall(f) + if not result_code then api.error_thrown = true - api.error_message = err2 + api.error_message = result return api end api = self:decode_result(api, result, nil) diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/PerformClickableActionAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/PerformClickableActionAPI.lua index 62bb14c..adb931c 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/PerformClickableActionAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/PerformClickableActionAPI.lua @@ -1,4 +1,4 @@ -module("PerformClickableActionAPI", package.seeall) +module("PerformClickableActionInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") local ParamName = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamName") @@ -9,7 +9,7 @@ local ParamType = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamType") --- @field apiInfo APIInfo local PerformClickableActionAPI = APIBase:new() ---- @func Returns new PerformClickableActionAPI +--- Returns new PerformClickableActionAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -25,10 +25,10 @@ function PerformClickableActionAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function PerformClickableActionAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function PerformClickableActionAPI:execute(api) local param0 diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/SetArgumentValueAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/SetArgumentValueAPI.lua index 1604a92..7e98456 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/SetArgumentValueAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/SetArgumentValueAPI.lua @@ -1,4 +1,4 @@ -module("SetArgumentValueAPI", package.seeall) +module("SetArgumentValueInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") local ParamName = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamName") @@ -9,7 +9,7 @@ local ParamType = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamType") --- @field apiInfo APIInfo local SetArgumentValueAPI = APIBase:new() ---- @func Returns new SetArgumentValueAPI +--- Returns new SetArgumentValueAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -25,10 +25,10 @@ function SetArgumentValueAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function SetArgumentValueAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function SetArgumentValueAPI:execute(api) local param0 diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/SetCommandAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/SetCommandAPI.lua index 5246375..845b54a 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/SetCommandAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/SetCommandAPI.lua @@ -1,4 +1,4 @@ -module("SetCommandAPI", package.seeall) +module("SetCommandInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") local ParamName = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamName") @@ -9,7 +9,7 @@ local ParamType = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamType") --- @field apiInfo APIInfo local SetCommandAPI = APIBase:new() ---- @func Returns new SetCommandAPI +--- Returns new SetCommandAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -25,10 +25,10 @@ function SetCommandAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function SetCommandAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function SetCommandAPI:execute(api) local param0 diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/SetFrequencyAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/SetFrequencyAPI.lua index a88b8ea..3e96c0f 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/SetFrequencyAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/SetFrequencyAPI.lua @@ -1,7 +1,6 @@ -module("SetFrequencyAPI", package.seeall) +module("SetFrequencyInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") -local Parameter = require("Scripts.DCS-INSIGHT.lib.commands.common.Parameter") local ParamName = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamName") local ParamType = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamType") @@ -10,7 +9,7 @@ local ParamType = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamType") --- @field apiInfo APIInfo local SetFrequencyAPI = APIBase:new() ---- @func Returns new SetFrequencyAPI +--- Returns new SetFrequencyAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -25,10 +24,10 @@ function SetFrequencyAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function SetFrequencyAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function SetFrequencyAPI:execute(api) local param0 diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/UpdateArgumentsAPI.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/UpdateArgumentsAPI.lua index cce6f8a..f15f5e5 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/UpdateArgumentsAPI.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/UpdateArgumentsAPI.lua @@ -1,4 +1,4 @@ -module("UpdateArgumentsAPI", package.seeall) +module("UpdateArgumentsInsightAPI", package.seeall) local APIBase = require("Scripts.DCS-INSIGHT.lib.commands.common.APIBase") local ParamName = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamName") @@ -9,7 +9,7 @@ local ParamType = require("Scripts.DCS-INSIGHT.lib.commands.common.ParamType") --- @field apiInfo APIInfo local UpdateArgumentsAPI = APIBase:new() ---- @func Returns new UpdateArgumentsAPI +--- Returns new UpdateArgumentsAPI --- @param o table|nil Parent --- @param apiId integer API ID, must be unique --- @return APIBase @@ -24,10 +24,10 @@ function UpdateArgumentsAPI:new(o, apiId) return o end ---- @func Inits with internal data +--- Inits with internal data function UpdateArgumentsAPI:init() end ---- @func Executes sent api and returns the same api containing a result field +--- Executes sent api and returns the same api containing a result field --- @param api APIInfo function UpdateArgumentsAPI:execute(api) local param0 diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/common/APIBase.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/common/APIBase.lua index 6cd9d74..b4f5444 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/common/APIBase.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/common/APIBase.lua @@ -40,7 +40,7 @@ function APIBase:execute(api) error("step must be implemented by the APIBase subclass", 2) end ---- @func Adds a parameter definition +--- Adds a parameter definition --- @param id number --- @param name string --- @param type number @@ -48,7 +48,7 @@ function APIBase:add_param_def(id, name, type) self.apiInfo.parameter_defs[#self.apiInfo.parameter_defs + 1] = Parameter:new(id, name, type) end ---- @func Verifies that the parameter have values +--- Verifies that the parameter have values --- @return number result_code, string error_message function APIBase:verify_params() for i, param in pairs(self.apiInfo.parameter_defs) do @@ -60,7 +60,7 @@ function APIBase:verify_params() return 0, "" end ---- @func Decodes result based on whether it is a function or procedure and sets api.result accordingly +--- Decodes result based on whether it is a function or procedure and sets api.result accordingly --- @param api APIInfo --- @param result any --- @param result_type string|nil @@ -94,7 +94,7 @@ function APIBase:decode_result(api, result, result_type) return api end ---- @func Checks that there is a device with that number +--- Checks that there is a device with that number --- @param device_id number --- @return boolean function APIBase:verify_device(device_id) @@ -106,7 +106,7 @@ function APIBase:verify_device(device_id) end end ---- @func Returns the path of the caller (file system) +--- Returns the path of the caller (file system) --- @return string function APIBase:script_path() local str = debug.getinfo(2, "S").source:sub(2) diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/common/APIInfo.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/common/APIInfo.lua index 608931e..7d7e4f9 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/common/APIInfo.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/common/APIInfo.lua @@ -1,7 +1,5 @@ module("APIInfo", package.seeall) -local Parameter = require("Scripts.DCS-INSIGHT.lib.commands.common.Parameter") - --- @class APIInfo --- @field id number --- @field returns_data boolean diff --git a/src/server/Scripts/DCS-INSIGHT/lib/commands/common/Parameter.lua b/src/server/Scripts/DCS-INSIGHT/lib/commands/common/Parameter.lua index 1e73fde..ad5d685 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/commands/common/Parameter.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/commands/common/Parameter.lua @@ -7,22 +7,21 @@ module("APIParameter", package.seeall) --- @field value string local APIParameter = {} - ---- @func Returns new APIParameter +--- Returns new APIParameter --- @param id number --- @param name string --- @param type integer --- @param value any function APIParameter:new(id, name, type, value) - local o = { - id = id, - name = name, - type = type, - value = value - } - setmetatable(o, self) - self.__index = self - return o + local o = { + id = id, + name = name, + type = type, + value = value, + } + setmetatable(o, self) + self.__index = self + return o end -return APIParameter \ No newline at end of file +return APIParameter diff --git a/src/server/Scripts/DCS-INSIGHT/lib/common/Common.lua b/src/server/Scripts/DCS-INSIGHT/lib/common/Common.lua new file mode 100644 index 0000000..414a0bc --- /dev/null +++ b/src/server/Scripts/DCS-INSIGHT/lib/common/Common.lua @@ -0,0 +1,35 @@ +module("CommonInsight", package.seeall) + +local CommonInsight = {} + +--- Checks is module is loaded +--- @param module_name string +--- @return boolean +function CommonInsight:isModuleAvailable(module_name) + if package.loaded[module_name] then + return true + else + for _, searcher in ipairs(package.searchers or package.loaders) do + local loader = searcher(module_name) + if type(loader) == "function" then + package.preload[module_name] = loader + return true + end + end + return false + end +end + +--- Tries to require the module +--- @param module_name string +--- @return boolean +function CommonInsight:tryRequire(module_name) + local return_code, module = pcall(require, module_name) + if return_code then + return true + end + + return false +end + +return CommonInsight diff --git a/src/server/Scripts/DCS-INSIGHT/lib/common/Logger.lua b/src/server/Scripts/DCS-INSIGHT/lib/common/Logger.lua index c771350..d9c6e4b 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/common/Logger.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/common/Logger.lua @@ -6,7 +6,7 @@ module("Logger", package.seeall) --- @field private bytesLogged number Used by log_table local Logger = {} ---- @func Returns new Logger +--- Returns new Logger --- @return Logger function Logger:new(logfile) local o = { @@ -19,7 +19,7 @@ function Logger:new(logfile) return o end ---- @func Tries to log the object +--- Tries to log the object --- @param obj any Object function Logger:log(obj) if obj == nil then @@ -34,7 +34,7 @@ function Logger:log(obj) end end ---- @func Logs string or number +--- Logs string or number --- @param data string|number function Logger:log_simple(data) if data == nil then @@ -53,7 +53,7 @@ function Logger:log_simple(data) end end ---- @func Logs whether variable is nilstring or number +--- Logs whether variable is nilstring or number --- @param variableName string --- @param variable any function Logger:log_is_nil(variableName, variable) @@ -65,7 +65,7 @@ function Logger:log_is_nil(variableName, variable) self:log_simple(variableName .. " is not nil") end ---- @func Logs the type of the variable +--- Logs the type of the variable --- @param name string Name of variable --- @param variable any The variable to determine type of function Logger:log_type(name, variable) @@ -88,7 +88,7 @@ end -- Break ALL when max depth reached -- Break when data logged exceeds limit ---- @func Logs a table (recursively if table contains tables) +--- Logs a table (recursively if table contains tables) --- @param tab table Table to dump/log --- @param max_depth integer How deep recursively to go function Logger:log_table(tab, max_depth, max_bytes_to_log) @@ -100,7 +100,7 @@ end function Logger:dump_table(tab, max_depth, max_bytes_to_log) self.bytesLogged = 0 -- Inner function just to hide the depth argument - --- @func Recursive table dump + --- Recursive table dump --- @param tablex table --- @param depth number --- @param max_depth number @@ -153,7 +153,7 @@ function Logger:dump_table(tab, max_depth, max_bytes_to_log) return result_code, result_buffer end ---- @func Logs a table's indexes +--- Logs a table's indexes --- @require tab table Table to dump/log function Logger:log_table_indexes(tab) if tab == nil then diff --git a/src/server/Scripts/DCS-INSIGHT/lib/io/Socket_API.lua b/src/server/Scripts/DCS-INSIGHT/lib/io/Socket_API.lua index ba11eb3..8bfde6b 100644 --- a/src/server/Scripts/DCS-INSIGHT/lib/io/Socket_API.lua +++ b/src/server/Scripts/DCS-INSIGHT/lib/io/Socket_API.lua @@ -4,38 +4,38 @@ --- A lua sockets socket connection SocketConnection = {} ---- @func Changes the connection timeout value +--- Changes the connection timeout value --- @param value integer the timeout to set function SocketConnection:settimeout(value) end ---- @func Sends data to the socket +--- Sends data to the socket --- @param data string the data to send --- @return integer? success_code --- @return string? error function SocketConnection:send(data) end ---- @func Receives data from the socket +--- Receives data from the socket --- @param buffer_size integer? the max amount of data to receive --- @return string? data the data received --- @return string? error whether there was an error receiving data --- @return string? partial any partial data received function SocketConnection:receive(buffer_size) end ---- @func Closes the socket connection +--- Closes the socket connection function SocketConnection:close() end --- @class UDPSocketConnection: SocketConnection --- A lua sockets UDP socket connection UDPSocketConnection = {} ---- @func Binds the UDP object to a local address +--- Binds the UDP object to a local address --- @param address string the address to bind to --- @param port integer the port at the address to bind to --- @return integer? success_code --- @return string? error function UDPSocketConnection:setsockname(address, port) end ---- @func Changes the peer of the UDP object, turning it from unconnected to connected or vice-versa +--- Changes the peer of the UDP object, turning it from unconnected to connected or vice-versa --- @param address string the address to connect to --- @param port integer the port at the address to connect to --- @return integer? success_code @@ -46,18 +46,18 @@ function UDPSocketConnection:setpeername(address, port) end --- A lua socket Socket = {} ---- @func Throws an acception if ret1 is falsy, using ret2 as the error message. +--- Throws an acception if ret1 is falsy, using ret2 as the error message. --- @param ret1 any? the first return value to determine whether to throw an error --- @vararg string? remaining return values to add to the error message if necessary function Socket.try(ret1, ...) end ---- @func Gets the current udp socket connection +--- Gets the current udp socket connection --- @return UDPSocketConnection socket_connection the udp socket connection function Socket.udp() return {} end ---- @func Creates and returns a connection acceptor bound to the specified address +--- Creates and returns a connection acceptor bound to the specified address --- @param address string the address to bind to --- @param port integer the port on the address to bind to --- @param backlog integer? the number of allowed connectinos to be queued @@ -70,7 +70,7 @@ end --- A lua sockets TCP socket connection TCPSocketConnection = {} ---- @func Accepts any pending incoming connection +--- Accepts any pending incoming connection --- @return TCPSocketConnection? connection a new socket connection for the incoming connection --- @return string? error the error message, if any function TCPSocketConnection:accept() end From cbf925a5a28a826bbf06c385b260df805dbd45e9 Mon Sep 17 00:00:00 2001 From: Jerker Dahlblom Date: Thu, 25 Jan 2024 19:23:11 +0200 Subject: [PATCH 3/3] Version bump --- src/client/DCSInsight/DCSInsight.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/DCSInsight/DCSInsight.csproj b/src/client/DCSInsight/DCSInsight.csproj index 4c8ec00..5ba1b14 100644 --- a/src/client/DCSInsight/DCSInsight.csproj +++ b/src/client/DCSInsight/DCSInsight.csproj @@ -8,7 +8,7 @@ dcs-insight 1.0.0 - 1.8.6 + 1.8.7 Images\Magnifier_icon.ico