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 ClevelCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("clevel", core, parent)
[docs]
def set(self, search: str, clock_level: float) -> None:
"""
``SEARch:TRIGger:SETHold:CLEVel`` \n
Snippet: ``driver.search.trigger.setHold.clevel.set(search = 'abc', clock_level = 1.0)`` \n
Sets the voltage level for the clock signal. Both this command and method ``RsRtx.search.trigger.setHold.cedge.set()``
define the starting point for calculation of the setup and hold time.
:param search: Search definition
:param clock_level: -10 to 10
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('clock_level', clock_level, DataType.Float))
self._core.io.write_with_opc(f'SEARch:TRIGger:SETHold:CLEVel {param}'.rstrip())
[docs]
def get(self, search: str) -> float:
"""
``SEARch:TRIGger:SETHold:CLEVel`` \n
Snippet: ``value: float = driver.search.trigger.setHold.clevel.get(search = 'abc')`` \n
Sets the voltage level for the clock signal. Both this command and method ``RsRtx.search.trigger.setHold.cedge.set()``
define the starting point for calculation of the setup and hold time.
:param search: Search definition
:return: clock_level: -10 to 10
"""
param = Conversions.value_to_quoted_str(search)
response = self._core.io.query_str_with_opc(f'SEARch:TRIGger:SETHold:CLEVel? {param}')
return Conversions.str_to_float(response)