From d6f8ff09d0f10ec844677a4f74aaed6bfda30d91 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Mon, 13 Oct 2025 11:04:02 +0200 Subject: [PATCH] definelist has no put --- .../generator/autocomplete/bash_autocomplete.sh | 5 +++++ .../generator/autocomplete/zsh_autocomplete.sh | 5 +++++ slsDetectorSoftware/generator/commands.yaml | 2 -- .../generator/extended_commands.yaml | 13 ------------- slsDetectorSoftware/src/inferAction.cpp | 10 ++++++++-- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/slsDetectorSoftware/generator/autocomplete/bash_autocomplete.sh b/slsDetectorSoftware/generator/autocomplete/bash_autocomplete.sh index f4b92c950..ff9d3564a 100644 --- a/slsDetectorSoftware/generator/autocomplete/bash_autocomplete.sh +++ b/slsDetectorSoftware/generator/autocomplete/bash_autocomplete.sh @@ -712,6 +712,11 @@ if [[ "${cword}" == "2" ]]; then FCN_RETURN="" fi fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi return 0 } __delay() { diff --git a/slsDetectorSoftware/generator/autocomplete/zsh_autocomplete.sh b/slsDetectorSoftware/generator/autocomplete/zsh_autocomplete.sh index f0f32c197..bb3df9773 100644 --- a/slsDetectorSoftware/generator/autocomplete/zsh_autocomplete.sh +++ b/slsDetectorSoftware/generator/autocomplete/zsh_autocomplete.sh @@ -636,6 +636,11 @@ if [[ "${cword}" == "2" ]]; then FCN_RETURN="" fi fi +if [[ ${IS_GET} -eq 0 ]]; then +if [[ "${cword}" == "2" ]]; then +FCN_RETURN="" +fi +fi return 0 } __delay() { diff --git a/slsDetectorSoftware/generator/commands.yaml b/slsDetectorSoftware/generator/commands.yaml index cdabcd5e3..b0aa4e06a 100644 --- a/slsDetectorSoftware/generator/commands.yaml +++ b/slsDetectorSoftware/generator/commands.yaml @@ -2778,8 +2778,6 @@ definelist: GET: argc: 1 arg_types: [ std::string ] - PUT: - argc: -1 reg: is_description: true diff --git a/slsDetectorSoftware/generator/extended_commands.yaml b/slsDetectorSoftware/generator/extended_commands.yaml index d54c04518..037d96023 100644 --- a/slsDetectorSoftware/generator/extended_commands.yaml +++ b/slsDetectorSoftware/generator/extended_commands.yaml @@ -2517,19 +2517,6 @@ definelist: output: [] require_det_id: false store_result_in_t: true - PUT: - args: - - arg_types: [] - argc: -1 - cast_input: [] - check_det_id: false - convert_det_id: true - function: '' - input: [] - input_types: [] - output: [] - require_det_id: false - store_result_in_t: false command_name: definelist function_alias: definelist help: '' diff --git a/slsDetectorSoftware/src/inferAction.cpp b/slsDetectorSoftware/src/inferAction.cpp index 28323e3b4..4083cb595 100644 --- a/slsDetectorSoftware/src/inferAction.cpp +++ b/slsDetectorSoftware/src/inferAction.cpp @@ -806,8 +806,14 @@ int InferAction::define() { int InferAction::definelist() { - throw RuntimeError("sls_detector is disabled for command: definelist. Use " - "sls_detector_get or sls_detector_put"); + if (args.size() == 1) { + return slsDetectorDefs::GET_ACTION; + } + + else { + + throw RuntimeError("Could not infer action: Wrong number of arguments"); + } } int InferAction::delay() {