aboutsummaryrefslogtreecommitdiff
path: root/pyecsca/sca/scope/base.py
diff options
context:
space:
mode:
authorJ08nY2020-03-03 22:32:13 +0100
committerJ08nY2020-03-03 22:32:13 +0100
commitdeca0e3d89ff4483dd6b6b4ad99b3400145bee5b (patch)
treebfe240b4fa6092e09c9abdc25243b78cb7f97e22 /pyecsca/sca/scope/base.py
parent9ed79b918009580a04649c7acdce63247d2314ed (diff)
downloadpyecsca-deca0e3d89ff4483dd6b6b4ad99b3400145bee5b.tar.gz
pyecsca-deca0e3d89ff4483dd6b6b4ad99b3400145bee5b.tar.zst
pyecsca-deca0e3d89ff4483dd6b6b4ad99b3400145bee5b.zip
Diffstat (limited to 'pyecsca/sca/scope/base.py')
-rw-r--r--pyecsca/sca/scope/base.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/pyecsca/sca/scope/base.py b/pyecsca/sca/scope/base.py
index 2979a7d..f88bc35 100644
--- a/pyecsca/sca/scope/base.py
+++ b/pyecsca/sca/scope/base.py
@@ -70,13 +70,21 @@ class Scope(object):
"""Arm the scope, it will listen for the trigger after this point."""
raise NotImplementedError
- def capture(self, channel: str, timeout: Optional[int] = None) -> Optional[np.ndarray]:
+ def capture(self, timeout: Optional[int] = None) -> bool:
"""
Wait for the trace to capture, this will block until the scope has a trace.
- :param channel: The channel to retrieve the trace from.
:param timeout: A time in milliseconds to wait for the trace, returns `None` if it runs out.
- :return: The trace, or if timed out, None.
+ :return: Whether capture was successful (or it timed out).
+ """
+ raise NotImplementedError
+
+ def retrieve(self, channel: str) -> Optional[np.ndarray]:
+ """
+ Retrieve a captured trace of a channel.
+
+ :param channel: The channel to retrieve the trace from.
+ :return: The captured trace (if any).
"""
raise NotImplementedError