Source code for rsrtx.Implementations.Cdr.Hardware.Pll

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


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

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

	# noinspection PyTypeChecker
[docs] def get_order(self) -> enums.CdrPllOrder: """ ``CDR:HARDware:PLL:ORDer`` \n Snippet: ``value: enums.CdrPllOrder = driver.cdr.hardware.pll.get_order()`` \n Sets the order of the PLL: first or second order. PLL of higher order can compensate for more complex jitter behavior. :return: pll_order: FIRSt | SECond """ response = self._core.io.query_str_with_opc('CDR:HARDware:PLL:ORDer?') return Conversions.str_to_scalar_enum(response, enums.CdrPllOrder)
[docs] def set_order(self, pll_order: enums.CdrPllOrder) -> None: """ ``CDR:HARDware:PLL:ORDer`` \n Snippet: ``driver.cdr.hardware.pll.set_order(pll_order = enums.CdrPllOrder.FIRSt)`` \n Sets the order of the PLL: first or second order. PLL of higher order can compensate for more complex jitter behavior. :param pll_order: FIRSt | SECond """ param = Conversions.enum_scalar_to_str(pll_order, enums.CdrPllOrder) self._core.io.write_with_opc(f'CDR:HARDware:PLL:ORDer {param}')
[docs] def get_bandwidth(self) -> float: """ ``CDR:HARDware:PLL:BWIDth`` \n Snippet: ``value: float = driver.cdr.hardware.pll.get_bandwidth()`` \n Sets the PLL bandwidth. It defines the part of the spectrum that the PLL can follow during synchronization. The PLL bandwidth is usually defined by the transmission standard. :return: pll_nandwidth: Nominal BITRate * Range of RELBwidth (dependent range) """ response = self._core.io.query_str_with_opc('CDR:HARDware:PLL:BWIDth?') return Conversions.str_to_float(response)
[docs] def set_bandwidth(self, pll_nandwidth: float) -> None: """ ``CDR:HARDware:PLL:BWIDth`` \n Snippet: ``driver.cdr.hardware.pll.set_bandwidth(pll_nandwidth = 1.0)`` \n Sets the PLL bandwidth. It defines the part of the spectrum that the PLL can follow during synchronization. The PLL bandwidth is usually defined by the transmission standard. :param pll_nandwidth: Nominal BITRate * Range of RELBwidth (dependent range) """ param = Conversions.decimal_value_to_str(pll_nandwidth) self._core.io.write_with_opc(f'CDR:HARDware:PLL:BWIDth {param}')
[docs] def get_rel_bwidth(self) -> float: """ ``CDR:HARDware:PLL:RELBwidth`` \n Snippet: ``value: float = driver.cdr.hardware.pll.get_rel_bwidth()`` \n Sets the relative bandwidth, that is the ratio of the nominal bit rate to the PLL bandwidth. :return: pll_rel_bw: 500 to 3000 """ response = self._core.io.query_str_with_opc('CDR:HARDware:PLL:RELBwidth?') return Conversions.str_to_float(response)
[docs] def set_rel_bwidth(self, pll_rel_bw: float) -> None: """ ``CDR:HARDware:PLL:RELBwidth`` \n Snippet: ``driver.cdr.hardware.pll.set_rel_bwidth(pll_rel_bw = 1.0)`` \n Sets the relative bandwidth, that is the ratio of the nominal bit rate to the PLL bandwidth. :param pll_rel_bw: 500 to 3000 """ param = Conversions.decimal_value_to_str(pll_rel_bw) self._core.io.write_with_opc(f'CDR:HARDware:PLL:RELBwidth {param}')
[docs] def get_damping(self) -> float: """ ``CDR:HARDware:PLL:DAMPing`` \n Snippet: ``value: float = driver.cdr.hardware.pll.get_damping()`` \n Sets the damping factor, which is only relevant for second order PLL. :return: damping_factor: 0.5 to 1 """ response = self._core.io.query_str_with_opc('CDR:HARDware:PLL:DAMPing?') return Conversions.str_to_float(response)
[docs] def set_damping(self, damping_factor: float) -> None: """ ``CDR:HARDware:PLL:DAMPing`` \n Snippet: ``driver.cdr.hardware.pll.set_damping(damping_factor = 1.0)`` \n Sets the damping factor, which is only relevant for second order PLL. :param damping_factor: 0.5 to 1 """ param = Conversions.decimal_value_to_str(damping_factor) self._core.io.write_with_opc(f'CDR:HARDware:PLL:DAMPing {param}')