from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from .....Internal.Types import DataType
from .....Internal.ArgSingleList import ArgSingleList
from .....Internal.ArgSingle import ArgSingle
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class TimeCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("time", core, parent)
[docs]
def set(self, search: str, time: float) -> None:
"""
``SEARch:TRIGger:SLEWrate:TIME`` \n
Snippet: ``driver.search.trigger.slewrate.time.set(search = 'abc', time = 1.0)`` \n
For the ranges Within and Outside, the slew rate defines the center of a range which is defined by the limits ±Delta. For
the ranges Shorter and Longer, the slew rate defines the maximum and minimum slew rate limits, respectively. The range is
defined using method ``RsRtx.search.trigger.slewrate.range.set()`` .
:param search: String with the name of the search
:param time: 100E-12 to 864
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('time', time, DataType.Float))
self._core.io.write_with_opc(f'SEARch:TRIGger:SLEWrate:TIME {param}'.rstrip())
[docs]
def get(self, search: str) -> float:
"""
``SEARch:TRIGger:SLEWrate:TIME`` \n
Snippet: ``value: float = driver.search.trigger.slewrate.time.get(search = 'abc')`` \n
For the ranges Within and Outside, the slew rate defines the center of a range which is defined by the limits ±Delta. For
the ranges Shorter and Longer, the slew rate defines the maximum and minimum slew rate limits, respectively. The range is
defined using method ``RsRtx.search.trigger.slewrate.range.set()`` .
:param search: String with the name of the search
:return: time: 100E-12 to 864
"""
param = Conversions.value_to_quoted_str(search)
response = self._core.io.query_str_with_opc(f'SEARch:TRIGger:SLEWrate:TIME? {param}')
return Conversions.str_to_float(response)