Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for ntia-diagnostics 2.1.0, add extra software version metadata to SEA action #104

Merged
merged 7 commits into from
Jan 5, 2024
2 changes: 1 addition & 1 deletion scos_actions/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "7.0.1"
__version__ = "7.1.0"
5 changes: 4 additions & 1 deletion scos_actions/actions/acquire_sea_data_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,8 @@ def capture_diagnostics(self, action_start_tic: float, cpu_speeds: list) -> None
start time, and SCOS uptime.

Software versions: the OS platform, Python version, scos_actions
version, and preselector API version.
version, the preselector API version, the signal analyzer API
version, and the signal analyzer firmware version.

The total action runtime is also recorded.

Expand Down Expand Up @@ -773,6 +774,8 @@ def capture_diagnostics(self, action_start_tic: float, cpu_speeds: list) -> None
name="scos_tekrsa", version=self.sigan.plugin_version
),
"preselector_api_version": PRESELECTOR_API_VERSION,
"sigan_firmware_version": self.sigan.firmware_version,
"sigan_api_version": self.sigan.api_version,
}

toc = perf_counter()
Expand Down
10 changes: 10 additions & 0 deletions scos_actions/hardware/mocks/mock_sigan.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ def __init__(self, randomize_values=False):
self._capture_time = None
self._is_available = True
self._plugin_version = SCOS_ACTIONS_VERSION
self._firmware_version = "1.2.3"
self._api_version = "v1.2.3"

# Simulate returning less than the requested number of samples from
# self.recv_num_samps
Expand All @@ -55,6 +57,14 @@ def is_available(self):
@property
def plugin_version(self):
return self._plugin_version

@property
def firmware_version(self):
return self._firmware_version

@property
def api_version(self):
return self._api_version

@property
def sample_rate(self):
Expand Down
12 changes: 12 additions & 0 deletions scos_actions/hardware/sigan_iface.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,18 @@ def plugin_version(self) -> str:
"""Returns the version of the SCOS plugin defining this interface."""
pass

@property
@abstractmethod
def firmware_version(self) -> str:
aromanielloNTIA marked this conversation as resolved.
Show resolved Hide resolved
"""Returns the version of the signal analyzer firmware."""
pass

@property
@abstractmethod
def api_version(self) -> str:
"""Returns the version of the underlying signal analyzer API."""
pass

@abstractmethod
def acquire_time_domain_samples(
self,
Expand Down
4 changes: 4 additions & 0 deletions scos_actions/metadata/structs/ntia_diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ class Software(msgspec.Struct, **SIGMF_OBJECT_KWARGS):
:param scos_sigan_plugin: `ScosPlugin` object describing the plugin which defines the
signal analyzer interface.
:param preselector_api_version: Version of the NTIA `preselector` package.
:param sigan_firmware_version: Version of the signal analyzer firmware.
:param sigan_api_version: Version of the signal analyzer API.
"""

system_platform: Optional[str] = None
Expand All @@ -187,6 +189,8 @@ class Software(msgspec.Struct, **SIGMF_OBJECT_KWARGS):
scos_actions_version: Optional[str] = None
scos_sigan_plugin: Optional[ScosPlugin] = None
preselector_api_version: Optional[str] = None
sigan_firmware_version: Optional[str] = None
sigan_api_version: Optional[str] = None


class Diagnostics(msgspec.Struct, **SIGMF_OBJECT_KWARGS):
Expand Down