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
from ...... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class LowerCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("lower", core, parent)
[docs]
def set(self, key: str, signal_source: enums.SignalSource, value: float) -> None:
"""
``SEARch:TRIGger:LEVel:RUNT:LOWer`` \n
Snippet: ``driver.search.trigger.level.runt.lower.set(key = 'abc', signal_source = enums.SignalSource.AJ1, value = 1.0)`` \n
Set the lower and upper voltage threshold, respectively.
:param key: String with the name of the search
:param signal_source: Source of the search, see 'Waveform parameter'
:param value: Voltage value
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('key', key, DataType.String), ArgSingle('signal_source', signal_source, DataType.Enum, enums.SignalSource), ArgSingle('value', value, DataType.Float))
self._core.io.write_with_opc(f'SEARch:TRIGger:LEVel:RUNT:LOWer {param}'.rstrip())
[docs]
def get(self, key: str, signal_source: enums.SignalSource) -> float:
"""
``SEARch:TRIGger:LEVel:RUNT:LOWer`` \n
Snippet: ``value: float = driver.search.trigger.level.runt.lower.get(key = 'abc', signal_source = enums.SignalSource.AJ1)`` \n
Set the lower and upper voltage threshold, respectively.
:param key: String with the name of the search
:param signal_source: Source of the search, see 'Waveform parameter'
:return: value: Voltage value
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('key', key, DataType.String), ArgSingle('signal_source', signal_source, DataType.Enum, enums.SignalSource))
response = self._core.io.query_str_with_opc(f'SEARch:TRIGger:LEVel:RUNT:LOWer? {param}'.rstrip())
return Conversions.str_to_float(response)