Source code for rsrtx.Implementations.Measurement.Jitter.CdrMode

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 CdrModeCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

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

[docs] def set(self, jitter_cdrm_ode: enums.CdrMode, measurement=repcap.Measurement.Default) -> None: """ ``MEASurement<*>:JITTer:CDRMode`` \n Snippet: ``driver.measurement.jitter.cdrMode.set(jitter_cdrm_ode = enums.CdrMode.HW, measurement = repcap.Measurement.Default)`` \n Defines the origin of the clock signal - wether a real clock signal or a clock generated using one of the CDR methods. The command is available for the following measurements: time-interval error, unit interval and data rate (method ``RsRtx.measurement.main.set()`` and/or method ``RsRtx.measurement.additional.set()`` are set to measurements TIE | UINTerval | DRATe) . :param jitter_cdrm_ode: SIGNal | SW1 | SW2 | SW3 | SW4 | | HW \n - SIGNal: The clock is a real clock signal. - SW1 | SW2 | SW3 | SW4: The clock is generated by a software algorithm. You can define two software algorithms for CDR. To configure the CDR, use the CDR:SOFTware commands. - HW: The clock is generated from the source signal by the integrated CDR circuitry. The HW CDR must be active to acquire the jitter data (trigger type = CDR or serial pattern with CDR) :param measurement: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Measurement') """ param = Conversions.enum_scalar_to_str(jitter_cdrm_ode, enums.CdrMode) measurement_cmd_val = self._cmd_group.get_repcap_cmd_value(measurement, repcap.Measurement) self._core.io.write_with_opc(f'MEASurement{measurement_cmd_val}:JITTer:CDRMode {param}')
# noinspection PyTypeChecker
[docs] def get(self, measurement=repcap.Measurement.Default) -> enums.CdrMode: """ ``MEASurement<*>:JITTer:CDRMode`` \n Snippet: ``value: enums.CdrMode = driver.measurement.jitter.cdrMode.get(measurement = repcap.Measurement.Default)`` \n Defines the origin of the clock signal - wether a real clock signal or a clock generated using one of the CDR methods. The command is available for the following measurements: time-interval error, unit interval and data rate (method ``RsRtx.measurement.main.set()`` and/or method ``RsRtx.measurement.additional.set()`` are set to measurements TIE | UINTerval | DRATe) . :param measurement: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Measurement') :return: jitter_cdrm_ode: SIGNal | SW1 | SW2 | SW3 | SW4 | | HW \n - SIGNal: The clock is a real clock signal. - SW1 | SW2 | SW3 | SW4: The clock is generated by a software algorithm. You can define two software algorithms for CDR. To configure the CDR, use the CDR:SOFTware commands. - HW: The clock is generated from the source signal by the integrated CDR circuitry. The HW CDR must be active to acquire the jitter data (trigger type = CDR or serial pattern with CDR) """ measurement_cmd_val = self._cmd_group.get_repcap_cmd_value(measurement, repcap.Measurement) response = self._core.io.query_str_with_opc(f'MEASurement{measurement_cmd_val}:JITTer:CDRMode?') return Conversions.str_to_scalar_enum(response, enums.CdrMode)