from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class RateCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("rate", core, parent)
[docs]
def set(self, time: float, evnt=repcap.Evnt.Default) -> None:
"""
``TRIGger:EVENt<*>:SLEW:RATE`` \n
Snippet: ``driver.trigger.event.slew.rate.set(time = 1.0, evnt = repcap.Evnt.Default)`` \n
For method ``RsMxo.trigger.event.slew.range.set()`` = INSRange and OUTRange, the slew rate defines the center of a range
which is defined by the limits ±Delta. For method ``RsMxo.trigger.event.slew.range.set()`` = LTHan and GTHan, the slew
rate defines the maximum and minimum slew rate limits, respectively. When the signal crosses this level, the slew rate
measurement starts or stops depending on the selected slope (see method ``RsMxo.trigger.event.slew.slope.set()`` ) .
:param time: 1E-10 to 10000
:param evnt: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Event')
"""
param = Conversions.decimal_value_to_str(time)
evnt_cmd_val = self._cmd_group.get_repcap_cmd_value(evnt, repcap.Evnt)
self._core.io.write(f'TRIGger:EVENt{evnt_cmd_val}:SLEW:RATE {param}')
[docs]
def get(self, evnt=repcap.Evnt.Default) -> float:
"""
``TRIGger:EVENt<*>:SLEW:RATE`` \n
Snippet: ``value: float = driver.trigger.event.slew.rate.get(evnt = repcap.Evnt.Default)`` \n
For method ``RsMxo.trigger.event.slew.range.set()`` = INSRange and OUTRange, the slew rate defines the center of a range
which is defined by the limits ±Delta. For method ``RsMxo.trigger.event.slew.range.set()`` = LTHan and GTHan, the slew
rate defines the maximum and minimum slew rate limits, respectively. When the signal crosses this level, the slew rate
measurement starts or stops depending on the selected slope (see method ``RsMxo.trigger.event.slew.slope.set()`` ) .
:param evnt: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Event')
:return: time: 1E-10 to 10000
"""
evnt_cmd_val = self._cmd_group.get_repcap_cmd_value(evnt, repcap.Evnt)
response = self._core.io.query_str(f'TRIGger:EVENt{evnt_cmd_val}:SLEW:RATE?')
return Conversions.str_to_float(response)