from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class RestartCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("restart", core, parent)
[docs]
def get_state(self) -> bool:
"""
``BERT:SETup:RESTart:[STATe]`` \n
Snippet: ``value: bool = driver.bert.setup.restart.get_state()`` \n
Activates/deactivates an external restart of the BERT measurement.
:return: state: 0 | OFF | 1| ON
"""
response = self._core.io.query_str('BERT:SETup:RESTart:STATe?')
return Conversions.str_to_bool(response)
[docs]
def set_state(self, state: bool) -> None:
"""
``BERT:SETup:RESTart:[STATe]`` \n
Snippet: ``driver.bert.setup.restart.set_state(state = False)`` \n
Activates/deactivates an external restart of the BERT measurement.
:param state: 0 | OFF | 1| ON
"""
param = Conversions.bool_to_str(state)
self._core.io.write(f'BERT:SETup:RESTart:STATe {param}')