from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal import Conversions
from ...Internal.Types import DataType
from ...Internal.Utilities import trim_str_response
from ...Internal.ArgSingleList import ArgSingleList
from ...Internal.ArgSingle import ArgSingle
from ... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ZdiagramCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("zdiagram", core, parent)
[docs]
def set(self, diagram: str, zoom_diagram: str, eye=repcap.Eye.Default) -> None:
"""
``EYE<*>:ZDIagram`` \n
Snippet: ``driver.eye.zdiagram.set(diagram = 'abc', zoom_diagram = 'abc', eye = repcap.Eye.Default)`` \n
Selects the zoom to which the eye mask area is set if method ``RsRtx.eye.zcoupling.set()`` is enabled.
:param zoom_diagram: String with the name of the diagram on which the zoom is based
:param eye: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Eye')
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('diagram', diagram, DataType.String), ArgSingle('zoom_diagram', zoom_diagram, DataType.String))
eye_cmd_val = self._cmd_group.get_repcap_cmd_value(eye, repcap.Eye)
self._core.io.write_with_opc(f'EYE{eye_cmd_val}:ZDIagram {param}'.rstrip())
[docs]
def get(self, diagram: str, eye=repcap.Eye.Default) -> str:
"""
``EYE<*>:ZDIagram`` \n
Snippet: ``value: str = driver.eye.zdiagram.get(diagram = 'abc', eye = repcap.Eye.Default)`` \n
Selects the zoom to which the eye mask area is set if method ``RsRtx.eye.zcoupling.set()`` is enabled.
:param eye: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Eye')
:return: zoom_diagram: String with the name of the diagram on which the zoom is based
"""
param = Conversions.value_to_quoted_str(diagram)
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}:ZDIagram? {param}')
return trim_str_response(response)