From a4eaf94fcb141030c271f043ccf034b85bb3c35b Mon Sep 17 00:00:00 2001 From: Pierre Wielders Date: Fri, 5 Jan 2024 14:45:12 +0100 Subject: [PATCH] [STARTMODE] Preperations for R5, starmode supersedes the autostart flag. Make sure the AutoStart flag is no longer used or published as it is superseded by the already existing startmode enum together eith the resumed flag (boolean). --- ConfigGenerator/params.config | 4 ++-- JsonGenerator/source/documentation_generator.py | 8 ++++---- cmake/FindConfigGenerator.cmake.in | 6 +++++- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ConfigGenerator/params.config b/ConfigGenerator/params.config index 52cd0fc..4328d67 100644 --- a/ConfigGenerator/params.config +++ b/ConfigGenerator/params.config @@ -1,4 +1,4 @@ -autostart +startmode callsign communicator configuration @@ -10,4 +10,4 @@ startuporder systemrootpath terminations volatilepathpostfix -webui \ No newline at end of file +webui diff --git a/JsonGenerator/source/documentation_generator.py b/JsonGenerator/source/documentation_generator.py index 423be7c..110f17a 100644 --- a/JsonGenerator/source/documentation_generator.py +++ b/JsonGenerator/source/documentation_generator.py @@ -759,9 +759,9 @@ def mergedict(d1, d2, prop): if "locator" in info: commonConfig["locator"] = {"type": "string", "description": 'Library name: *%s*' % info["locator"]} - commonConfig["autostart"] = { - "type": "boolean", - "description": "Determines if the plugin shall be started automatically along with the framework" + commonConfig["startmode"] = { + "type": "string", + "description": "Determines in which state the plugin should be moved to at startup of the framework" } required = [] @@ -777,7 +777,7 @@ def mergedict(d1, d2, prop): totalConfig["properties"] = commonConfig2 if "configuration" not in schema or ("nodefault" not in schema["configuration"] or not schema["configuration"]["nodefault"]): - totalConfig["required"] = ["callsign", "classname", "locator", "autostart"] + required + totalConfig["required"] = ["callsign", "classname", "locator", "startmode"] + required ParamTable("", totalConfig) diff --git a/cmake/FindConfigGenerator.cmake.in b/cmake/FindConfigGenerator.cmake.in index 15172ab..805b639 100644 --- a/cmake/FindConfigGenerator.cmake.in +++ b/cmake/FindConfigGenerator.cmake.in @@ -235,7 +235,11 @@ if(CMAKE_VERSION VERSION_LESS 3.20.0 AND LEGACY_CONFIG_GENERATOR) endif() if (NOT ${autostart} STREQUAL "") - map_append(${plugin_config} autostart ${autostart}) + if (${autostart} STREQUAL "false") + map_append(${plugin_config} startmode "Deactivated") + else() + map_append(${plugin_config} startmode "Activated") + endif() endif() if (NOT ${resumed} STREQUAL "")