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 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, search: str, relative_stop: float) -> None:
"""
``SEARch:GATE:RELative:STOP`` \n
Snippet: ``driver.search.gate.relative.stop.set(search = 'abc', relative_stop = 1.0)`` \n
Defines the end value for the gate.
:param search: Search definition
:param relative_stop: 0 to 100
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('relative_stop', relative_stop, DataType.Float))
self._core.io.write_with_opc(f'SEARch:GATE:RELative:STOP {param}'.rstrip())
[docs]
def get(self, search: str) -> float:
"""
``SEARch:GATE:RELative:STOP`` \n
Snippet: ``value: float = driver.search.gate.relative.stop.get(search = 'abc')`` \n
Defines the end value for the gate.
:param search: Search definition
:return: relative_stop: 0 to 100
"""
param = Conversions.value_to_quoted_str(search)
response = self._core.io.query_str_with_opc(f'SEARch:GATE:RELative:STOP? {param}')
return Conversions.str_to_float(response)