from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from ....Internal.Types import DataType
from ....Internal.ArgSingleList import ArgSingleList
from ....Internal.ArgSingle import ArgSingle
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ZcouplingCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("zcoupling", core, parent)
[docs]
def set(self, search: str, zoom_coupling: bool) -> None:
"""
``SEARch:GATE:ZCOupling`` \n
Snippet: ``driver.search.gate.zcoupling.set(search = 'abc', zoom_coupling = False)`` \n
If enabled, the gate area is set to the limits of a zoom area. The zoom diagramm is selected using method
``RsRtx.search.gate.zdiagram.set()`` .
:param search: String with the name of the search
:param zoom_coupling: OFF | ON
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('zoom_coupling', zoom_coupling, DataType.Boolean))
self._core.io.write_with_opc(f'SEARch:GATE:ZCOupling {param}'.rstrip())
[docs]
def get(self, search: str) -> bool:
"""
``SEARch:GATE:ZCOupling`` \n
Snippet: ``value: bool = driver.search.gate.zcoupling.get(search = 'abc')`` \n
If enabled, the gate area is set to the limits of a zoom area. The zoom diagramm is selected using method
``RsRtx.search.gate.zdiagram.set()`` .
:param search: String with the name of the search
:return: zoom_coupling: OFF | ON
"""
param = Conversions.value_to_quoted_str(search)
response = self._core.io.query_str_with_opc(f'SEARch:GATE:ZCOupling? {param}')
return Conversions.str_to_bool(response)