from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ResultCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("result", core, parent)
# noinspection PyTypeChecker
[docs]
def get(self, mask_test: str) -> enums.Result:
"""
``MTESt:RESult[:RESult]`` \n
Snippet: ``value: enums.Result = driver.mtest.result.result.get(mask_test = 'abc')`` \n
Returns the test result. A test has failed if the number of sample hits or acquisition hits exceeds the limit of
Violation tolerance hits (see method ``RsRtx.mtest.tolerance.set()`` , method ``RsRtx.mtest.result.count.failures.get()``
and method ``RsRtx.mtest.result.count.fwaveforms.get()`` ) .
:return: test_result: PASS | FAIL
"""
param = Conversions.value_to_quoted_str(mask_test)
response = self._core.io.query_str_with_opc(f'MTESt:RESult:RESult? {param}')
return Conversions.str_to_scalar_enum(response, enums.Result)