from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class PrLevelCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("prLevel", core, parent)
[docs]
def set(self, pls_ref_lev_manual: float, measurement=repcap.Measurement.Default) -> None:
"""
``MEASurement<*>:AMPTime:PRLevel`` \n
Snippet: ``driver.measurement.ampTime.prLevel.set(pls_ref_lev_manual = 1.0, measurement = repcap.Measurement.Default)`` \n
Available only if method ``RsRtx.measurement.ampTime.prlMode.set()`` is set to USER. Sets the reference level for the
positive and negative pulse measurements for the user defined reference level.
:param pls_ref_lev_manual: -100E+24 to 100E+24
:param measurement: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Measurement')
"""
param = Conversions.decimal_value_to_str(pls_ref_lev_manual)
measurement_cmd_val = self._cmd_group.get_repcap_cmd_value(measurement, repcap.Measurement)
self._core.io.write_with_opc(f'MEASurement{measurement_cmd_val}:AMPTime:PRLevel {param}')
[docs]
def get(self, measurement=repcap.Measurement.Default) -> float:
"""
``MEASurement<*>:AMPTime:PRLevel`` \n
Snippet: ``value: float = driver.measurement.ampTime.prLevel.get(measurement = repcap.Measurement.Default)`` \n
Available only if method ``RsRtx.measurement.ampTime.prlMode.set()`` is set to USER. Sets the reference level for the
positive and negative pulse measurements for the user defined reference level.
:param measurement: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Measurement')
:return: pls_ref_lev_manual: -100E+24 to 100E+24
"""
measurement_cmd_val = self._cmd_group.get_repcap_cmd_value(measurement, repcap.Measurement)
response = self._core.io.query_str_with_opc(f'MEASurement{measurement_cmd_val}:AMPTime:PRLevel?')
return Conversions.str_to_float(response)