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

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


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

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

[docs] def set(self, algorithm: enums.TriggerEyeAlgorithm, trigger=repcap.Trigger.Default) -> None: """ ``TRIGger<*>:CDR:EYE:ALGorithm`` \n Snippet: ``driver.trigger.cdr.eye.algorithm.set(algorithm = enums.TriggerEyeAlgorithm.CFRequency, trigger = repcap.Trigger.Default)`` \n Sets the software algorithm that is used for clock data recovery. :param algorithm: CFRequency | FF \n - CFRequency: Constant frequency. CDR uses the nominal bit rate to generate the clock signal. The method assumes that the frequency of the signal is constant during the complete acquisition. - FF: Feed forward algorithm, a mathematical optimization method. Feed forward is available if none of the listed serial standards is used (SIGNalconfig:SETup:SETTingm:SERStandard is set to CUSTom) . :param trigger: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger') """ param = Conversions.enum_scalar_to_str(algorithm, enums.TriggerEyeAlgorithm) 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:ALGorithm {param}')
# noinspection PyTypeChecker
[docs] def get(self, trigger=repcap.Trigger.Default) -> enums.TriggerEyeAlgorithm: """ ``TRIGger<*>:CDR:EYE:ALGorithm`` \n Snippet: ``value: enums.TriggerEyeAlgorithm = driver.trigger.cdr.eye.algorithm.get(trigger = repcap.Trigger.Default)`` \n Sets the software algorithm that is used for clock data recovery. :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:ALGorithm?') return Conversions.str_to_scalar_enum(response, enums.TriggerEyeAlgorithm)