From c56da5634c8e2cfaa0e8f45c42c181abb8f37916 Mon Sep 17 00:00:00 2001 From: Justin Haze Date: Fri, 8 Mar 2024 15:47:45 -0700 Subject: [PATCH] add plugin_name property to sigan iface --- scos_actions/actions/acquire_sea_data_product.py | 2 +- scos_actions/hardware/mocks/mock_sigan.py | 6 ++++++ scos_actions/hardware/sigan_iface.py | 6 ++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/scos_actions/actions/acquire_sea_data_product.py b/scos_actions/actions/acquire_sea_data_product.py index 52c62c1e..1b68bdbc 100644 --- a/scos_actions/actions/acquire_sea_data_product.py +++ b/scos_actions/actions/acquire_sea_data_product.py @@ -794,7 +794,7 @@ def capture_diagnostics( "scos_sensor_version": SCOS_SENSOR_GIT_TAG, "scos_actions_version": SCOS_ACTIONS_VERSION, "scos_sigan_plugin": ntia_diagnostics.ScosPlugin( - name="scos_tekrsa", version=self.sensor.signal_analyzer.plugin_version + name=self.sensor.signal_analyzer.plugin_name, version=self.sensor.signal_analyzer.plugin_version ), "preselector_api_version": PRESELECTOR_API_VERSION, "sigan_firmware_version": self.sensor.signal_analyzer.firmware_version, diff --git a/scos_actions/hardware/mocks/mock_sigan.py b/scos_actions/hardware/mocks/mock_sigan.py index 7b8b96f4..8774f48b 100644 --- a/scos_actions/hardware/mocks/mock_sigan.py +++ b/scos_actions/hardware/mocks/mock_sigan.py @@ -7,6 +7,7 @@ import numpy as np from scos_actions import __version__ as SCOS_ACTIONS_VERSION +from scos_actions import __package__ as SCOS_ACTIONS_NAME from scos_actions.calibration.calibration import Calibration from scos_actions.hardware.sigan_iface import SignalAnalyzerInterface from scos_actions.utils import get_datetime_str_now @@ -65,6 +66,7 @@ def __init__( self._capture_time = None self._is_available = True self._plugin_version = SCOS_ACTIONS_VERSION + self._plugin_name = SCOS_ACTIONS_NAME self._firmware_version = "1.2.3" self._api_version = "v1.2.3" @@ -84,6 +86,10 @@ def is_available(self): @property def plugin_version(self): return self._plugin_version + + @property + def plugin_name(self) -> str: + return self._plugin_name @property def firmware_version(self): diff --git a/scos_actions/hardware/sigan_iface.py b/scos_actions/hardware/sigan_iface.py index 3b211113..0b2f1d05 100644 --- a/scos_actions/hardware/sigan_iface.py +++ b/scos_actions/hardware/sigan_iface.py @@ -56,6 +56,12 @@ def plugin_version(self) -> str: """Returns the version of the SCOS plugin defining this interface.""" pass + @property + @abstractmethod + def plugin_name(self) -> str: + """Returns the name of the SCOS plugin defining this interface.""" + pass + @property def firmware_version(self) -> str: """Returns the version of the signal analyzer firmware."""