from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class MaxPrecisionCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("maxPrecision", core, parent)
[docs]
def set(self, enab_classifier: bool, eye=repcap.Eye.Default) -> None:
"""
``EYE<*>:MEASurement:MAXPrecision`` \n
Snippet: ``driver.eye.measurement.maxPrecision.set(enab_classifier = False, eye = repcap.Eye.Default)`` \n
If this function is enabled, the rising and falling transitions for the eye measurmens Eye rise time, Eye fall time and
Duty cycle distortion are separated.
:param enab_classifier: OFF | ON
:param eye: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Eye')
"""
param = Conversions.bool_to_str(enab_classifier)
eye_cmd_val = self._cmd_group.get_repcap_cmd_value(eye, repcap.Eye)
self._core.io.write_with_opc(f'EYE{eye_cmd_val}:MEASurement:MAXPrecision {param}')
[docs]
def get(self, eye=repcap.Eye.Default) -> bool:
"""
``EYE<*>:MEASurement:MAXPrecision`` \n
Snippet: ``value: bool = driver.eye.measurement.maxPrecision.get(eye = repcap.Eye.Default)`` \n
If this function is enabled, the rising and falling transitions for the eye measurmens Eye rise time, Eye fall time and
Duty cycle distortion are separated.
:param eye: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Eye')
:return: enab_classifier: 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}:MEASurement:MAXPrecision?')
return Conversions.str_to_bool(response)