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 SpanCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("span", core, parent)
[docs]
def set(self, search: str, relative_span: float) -> None:
"""
``SEARch:RESDiagram:VERT:RELative:SPAN`` \n
Snippet: ``driver.search.resDiagram.vert.relative.span.set(search = 'abc', relative_span = 1.0)`` \n
Defines the height of the zoom area.
:param search: Search definition
:param relative_span: 1E-15 to 100
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('relative_span', relative_span, DataType.Float))
self._core.io.write_with_opc(f'SEARch:RESDiagram:VERT:RELative:SPAN {param}'.rstrip())
[docs]
def get(self, search: str) -> float:
"""
``SEARch:RESDiagram:VERT:RELative:SPAN`` \n
Snippet: ``value: float = driver.search.resDiagram.vert.relative.span.get(search = 'abc')`` \n
Defines the height of the zoom area.
:param search: Search definition
:return: relative_span: 1E-15 to 100
"""
param = Conversions.value_to_quoted_str(search)
response = self._core.io.query_str_with_opc(f'SEARch:RESDiagram:VERT:RELative:SPAN? {param}')
return Conversions.str_to_float(response)