from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ...... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class StopCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("stop", core, parent)
[docs]
def set(self, rel_time_stp_lev_meas_wind: float, settings=repcap.Settings.Default) -> None:
"""
``MDEFaults:SETTings<*>:EYE:RELative:STOP`` \n
Snippet: ``driver.mdefaults.settings.eye.relative.stop.set(rel_time_stp_lev_meas_wind = 1.0, settings = repcap.Settings.Default)`` \n
Defines the global stop time for the eye measurements.
:param rel_time_stp_lev_meas_wind: Stop time of the window in % of the difference of the eye crossings. Tcrossing1 relates to 0 %, and Tcrossing2 relates to 100 %.
:param settings: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Settings')
"""
param = Conversions.decimal_value_to_str(rel_time_stp_lev_meas_wind)
settings_cmd_val = self._cmd_group.get_repcap_cmd_value(settings, repcap.Settings)
self._core.io.write(f'MDEFaults:SETTings{settings_cmd_val}:EYE:RELative:STOP {param}')
[docs]
def get(self, settings=repcap.Settings.Default) -> float:
"""
``MDEFaults:SETTings<*>:EYE:RELative:STOP`` \n
Snippet: ``value: float = driver.mdefaults.settings.eye.relative.stop.get(settings = repcap.Settings.Default)`` \n
Defines the global stop time for the eye measurements.
:param settings: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Settings')
:return: rel_time_stp_lev_meas_wind: Stop time of the window in % of the difference of the eye crossings. Tcrossing1 relates to 0 %, and Tcrossing2 relates to 100 %.
"""
settings_cmd_val = self._cmd_group.get_repcap_cmd_value(settings, repcap.Settings)
response = self._core.io.query_str(f'MDEFaults:SETTings{settings_cmd_val}:EYE:RELative:STOP?')
return Conversions.str_to_float(response)