Skip to content

Commit

Permalink
Add plugin_version abstractmethod property to sigan interface
Browse files Browse the repository at this point in the history
  • Loading branch information
aromanielloNTIA committed Oct 19, 2023
1 parent 88b564a commit f5b1609
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scos_actions/hardware/mocks/mock_sigan.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import numpy as np

from scos_actions import __version__ as SCOS_ACTIONS_VERSION
from scos_actions.hardware.sigan_iface import SignalAnalyzerInterface
from scos_actions.utils import get_datetime_str_now

Expand Down Expand Up @@ -36,6 +37,7 @@ def __init__(self, randomize_values=False):
self._overload = False
self._capture_time = None
self._is_available = True
self._plugin_version = SCOS_ACTIONS_VERSION

# Simulate returning less than the requested number of samples from
# self.recv_num_samps
Expand All @@ -49,6 +51,10 @@ def __init__(self, randomize_values=False):
@property
def is_available(self):
return self._is_available

@property
def plugin_version(self):
return self._plugin_version

@property
def sample_rate(self):
Expand Down
6 changes: 6 additions & 0 deletions scos_actions/hardware/sigan_iface.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ def is_available(self) -> bool:
"""Returns True if sigan is initialized and ready for measurements."""
pass

@property
@abstractmethod
def plugin_version(self) -> str:
"""Returns the version of the SCOS plugin defining this interface."""
pass

@abstractmethod
def acquire_time_domain_samples(
self,
Expand Down

0 comments on commit f5b1609

Please sign in to comment.