from .......Internal.Core import Core
from .......Internal.CommandsGroup import CommandsGroup
from .......Internal import Conversions
from ....... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ValueCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("value", core, parent)
[docs]
def set(self, display_pps: float, window=repcap.Window.Default) -> None:
"""
``DISPlay[:WINDow<n>]:PRATe[:VALue]`` \n
Snippet: ``driver.applications.k70Vsa.display.window.prate.value.set(display_pps = 1.0, window = repcap.Window.Default)`` \n
Determines the number of points to be displayed per symbol if manual mode is selected (see method
``RsFsw.applications.k70Vsa.display.window.prate.auto.set()`` ) . Is not available for result displays based on the
capture buffer; in this case, the displayed points per symbol are defined by the sample rate (method
``RsFsw.applications.k70Vsa.sense.ddemod.prate.set()`` command) .
:param display_pps: 1, 2, 4, 8,16 or 32 1 only the symbol time instants are displayed 2, 4, 8, 16, 32 more points are displayed than symbols
:param window: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Window')
"""
param = Conversions.decimal_value_to_str(display_pps)
window_cmd_val = self._cmd_group.get_repcap_cmd_value(window, repcap.Window)
self._core.io.write(f'DISPlay:WINDow{window_cmd_val}:PRATe:VALue {param}')
[docs]
def get(self, window=repcap.Window.Default) -> float:
"""
``DISPlay[:WINDow<n>]:PRATe[:VALue]`` \n
Snippet: ``value: float = driver.applications.k70Vsa.display.window.prate.value.get(window = repcap.Window.Default)`` \n
Determines the number of points to be displayed per symbol if manual mode is selected (see method
``RsFsw.applications.k70Vsa.display.window.prate.auto.set()`` ) . Is not available for result displays based on the
capture buffer; in this case, the displayed points per symbol are defined by the sample rate (method
``RsFsw.applications.k70Vsa.sense.ddemod.prate.set()`` command) .
:param window: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Window')
:return: display_pps: 1, 2, 4, 8,16 or 32 1 only the symbol time instants are displayed 2, 4, 8, 16, 32 more points are displayed than symbols
"""
window_cmd_val = self._cmd_group.get_repcap_cmd_value(window, repcap.Window)
response = self._core.io.query_str(f'DISPlay:WINDow{window_cmd_val}:PRATe:VALue?')
return Conversions.str_to_float(response)