from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class PositionCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("position", core, parent)
[docs]
def set(self, position: float, tdRtSignal=repcap.TdRtSignal.Default) -> None:
"""
``TDRT:SIGNal<*>:POSition`` \n
Snippet: ``driver.tdrt.signal.position.set(position = 1.0, tdRtSignal = repcap.TdRtSignal.Default)`` \n
Set the vertical position of the indicated TDR/TDT signal.
:param position: 1E-12 to 100E+12
:param tdRtSignal: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Signal')
"""
param = Conversions.decimal_value_to_str(position)
tdRtSignal_cmd_val = self._cmd_group.get_repcap_cmd_value(tdRtSignal, repcap.TdRtSignal)
self._core.io.write_with_opc(f'TDRT:SIGNal{tdRtSignal_cmd_val}:POSition {param}')
[docs]
def get(self, tdRtSignal=repcap.TdRtSignal.Default) -> float:
"""
``TDRT:SIGNal<*>:POSition`` \n
Snippet: ``value: float = driver.tdrt.signal.position.get(tdRtSignal = repcap.TdRtSignal.Default)`` \n
Set the vertical position of the indicated TDR/TDT signal.
:param tdRtSignal: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Signal')
:return: position: 1E-12 to 100E+12
"""
tdRtSignal_cmd_val = self._cmd_group.get_repcap_cmd_value(tdRtSignal, repcap.TdRtSignal)
response = self._core.io.query_str_with_opc(f'TDRT:SIGNal{tdRtSignal_cmd_val}:POSition?')
return Conversions.str_to_float(response)