from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class OtubeCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("otube", core, parent)
[docs]
def set(self, value: float, refLevel=repcap.RefLevel.Default) -> None:
"""
``REFLevel<*>:RELative:OTUBe`` \n
Snippet: ``driver.refLevel.relative.otube.set(value = 1.0, refLevel = repcap.RefLevel.Default)`` \n
Defines a percentage of the signal level by which the absolute signal level may be larger than the high signal level or
lower than the low signal level to be considered high or low, respectively.
:param refLevel: optional repeated capability selector. Default value: Nr1 (settable in the interface 'RefLevel')
"""
param = Conversions.decimal_value_to_str(value)
refLevel_cmd_val = self._cmd_group.get_repcap_cmd_value(refLevel, repcap.RefLevel)
self._core.io.write_with_opc(f'REFLevel{refLevel_cmd_val}:RELative:OTUBe {param}')
[docs]
def get(self, refLevel=repcap.RefLevel.Default) -> float:
"""
``REFLevel<*>:RELative:OTUBe`` \n
Snippet: ``value: float = driver.refLevel.relative.otube.get(refLevel = repcap.RefLevel.Default)`` \n
Defines a percentage of the signal level by which the absolute signal level may be larger than the high signal level or
lower than the low signal level to be considered high or low, respectively.
:param refLevel: optional repeated capability selector. Default value: Nr1 (settable in the interface 'RefLevel')
"""
refLevel_cmd_val = self._cmd_group.get_repcap_cmd_value(refLevel, repcap.RefLevel)
response = self._core.io.query_str_with_opc(f'REFLevel{refLevel_cmd_val}:RELative:OTUBe?')
return Conversions.str_to_float(response)