Source code for rsrtx.Implementations.Trigger.Cdr.Eye.SamTime

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


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

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

[docs] def set(self, unt_intvl_offs: float, trigger=repcap.Trigger.Default) -> None: """ ``TRIGger<*>:CDR:EYE:SAMTime`` \n Snippet: ``driver.trigger.cdr.eye.samTime.set(unt_intvl_offs = 1.0, trigger = repcap.Trigger.Default)`` \n Sets a sampling time for the clock signal, an offset for the clock edge in relation to the bit start. The clock edge sets the beginning of the unit interval. The sampling time is a number between 0 and 1. Value 0 sets the clock edge to the beginning of the bit period; value 0.5 sets the clock edge to the middle of the bit period. :param unt_intvl_offs: 0 to 1 :param trigger: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger') """ param = Conversions.decimal_value_to_str(unt_intvl_offs) trigger_cmd_val = self._cmd_group.get_repcap_cmd_value(trigger, repcap.Trigger) self._core.io.write_with_opc(f'TRIGger{trigger_cmd_val}:CDR:EYE:SAMTime {param}')
[docs] def get(self, trigger=repcap.Trigger.Default) -> float: """ ``TRIGger<*>:CDR:EYE:SAMTime`` \n Snippet: ``value: float = driver.trigger.cdr.eye.samTime.get(trigger = repcap.Trigger.Default)`` \n Sets a sampling time for the clock signal, an offset for the clock edge in relation to the bit start. The clock edge sets the beginning of the unit interval. The sampling time is a number between 0 and 1. Value 0 sets the clock edge to the beginning of the bit period; value 0.5 sets the clock edge to the middle of the bit period. :param trigger: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger') """ trigger_cmd_val = self._cmd_group.get_repcap_cmd_value(trigger, repcap.Trigger) response = self._core.io.query_str_with_opc(f'TRIGger{trigger_cmd_val}:CDR:EYE:SAMTime?') return Conversions.str_to_float(response)