Source code for rsmxo.Implementations.Measurement.Eye.Level

from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import repcap


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class LevelCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("level", core, parent)

[docs] def set(self, relative_level: float, measIndex=repcap.MeasIndex.Default) -> None: """ ``MEASurement<*>:EYE:LEVel`` \n Snippet: ``driver.measurement.eye.level.set(relative_level = 1.0, measIndex = repcap.MeasIndex.Default)`` \n Defines the relative level for the jitter measurements on eye diagrams if method ``RsMxo.measurement.eye.useLevel.set()`` is ON. The setting also defines the level for duty cycle distortion measurement. :param relative_level: 1 to 99 :param measIndex: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Measurement') """ param = Conversions.decimal_value_to_str(relative_level) measIndex_cmd_val = self._cmd_group.get_repcap_cmd_value(measIndex, repcap.MeasIndex) self._core.io.write(f'MEASurement{measIndex_cmd_val}:EYE:LEVel {param}')
[docs] def get(self, measIndex=repcap.MeasIndex.Default) -> float: """ ``MEASurement<*>:EYE:LEVel`` \n Snippet: ``value: float = driver.measurement.eye.level.get(measIndex = repcap.MeasIndex.Default)`` \n Defines the relative level for the jitter measurements on eye diagrams if method ``RsMxo.measurement.eye.useLevel.set()`` is ON. The setting also defines the level for duty cycle distortion measurement. :param measIndex: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Measurement') :return: relative_level: 1 to 99 """ measIndex_cmd_val = self._cmd_group.get_repcap_cmd_value(measIndex, repcap.MeasIndex) response = self._core.io.query_str(f'MEASurement{measIndex_cmd_val}:EYE:LEVel?') return Conversions.str_to_float(response)