from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal import Conversions
from ... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class AllCls:
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("all", core, parent)
# noinspection PyTypeChecker
[docs]
def get_result(self) -> enums.Test:
"""
``TEST<HW>:ALL:RESult`` \n
Snippet: ``value: enums.Test = driver.test.all.get_result()`` \n
Queries the progress of the performed selftest. Start the selftest with method ``RsSmw.test.all.start()`` .
:return: result: 0 | 1| RUNning | STOPped
"""
response = self._core.io.query_str('TEST<HwInstance>:ALL:RESult?')
return Conversions.str_to_scalar_enum(response, enums.Test)
[docs]
def start(self) -> None:
"""
``TEST<HW>:ALL:STARt`` \n
Snippet: ``driver.test.all.start()`` \n
Starts the selftest. Use the command method ``RsSmw.test.all.result()`` to query the progress of the test.
"""
self._core.io.write(f'TEST<HwInstance>:ALL:STARt')
[docs]
def start_with_opc(self, opc_timeout_ms: int = -1) -> None:
"""
``TEST<HW>:ALL:STARt`` \n
Snippet: ``driver.test.all.start_with_opc()`` \n
Starts the selftest. Use the command method ``RsSmw.test.all.result()`` to query the progress of the test.
Same as start, but waits for the operation to complete before continuing further. Use the RsSmw.utilities.opc_timeout_set() to set the timeout value.
:param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call.
"""
self._core.io.write_with_opc(f'TEST<HwInstance>:ALL:STARt', opc_timeout_ms)