from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class StateCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("state", core, parent)
[docs]
def set(self, state: bool, eye=repcap.Eye.Default) -> None:
"""
``EYE<*>:QUALify:SIGNal[:STATe]`` \n
Snippet: ``driver.eye.qualify.signal.state.set(state = False, eye = repcap.Eye.Default)`` \n
Enables the waveform-based qualification for the eye generation.
:param state: OFF | ON
:param eye: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Eye')
"""
param = Conversions.bool_to_str(state)
eye_cmd_val = self._cmd_group.get_repcap_cmd_value(eye, repcap.Eye)
self._core.io.write_with_opc(f'EYE{eye_cmd_val}:QUALify:SIGNal:STATe {param}')
[docs]
def get(self, eye=repcap.Eye.Default) -> bool:
"""
``EYE<*>:QUALify:SIGNal[:STATe]`` \n
Snippet: ``value: bool = driver.eye.qualify.signal.state.get(eye = repcap.Eye.Default)`` \n
Enables the waveform-based qualification for the eye generation.
:param eye: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Eye')
:return: state: OFF | ON
"""
eye_cmd_val = self._cmd_group.get_repcap_cmd_value(eye, repcap.Eye)
response = self._core.io.query_str_with_opc(f'EYE{eye_cmd_val}:QUALify:SIGNal:STATe?')
return Conversions.str_to_bool(response)