Source code for rsrtx.Implementations.Lane.Equalization.Ctle.DcGain

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


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

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

[docs] def set(self, gain_dc: float, lane=repcap.Lane.Default) -> None: """ ``LANE<*>:EQUalization:CTLE:DCGain`` \n Snippet: ``driver.lane.equalization.ctle.dcGain.set(gain_dc = 1.0, lane = repcap.Lane.Default)`` \n Sets a DC gain for the CTLE filter. The DC gain determines the level of signal amplification at the low frequency end, thus ensuring that low frequency components are amplified to an adequate level to maintain signal integrity. :param gain_dc: -40 to 40 :param lane: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Lane') """ param = Conversions.decimal_value_to_str(gain_dc) lane_cmd_val = self._cmd_group.get_repcap_cmd_value(lane, repcap.Lane) self._core.io.write_with_opc(f'LANE{lane_cmd_val}:EQUalization:CTLE:DCGain {param}')
[docs] def get(self, lane=repcap.Lane.Default) -> float: """ ``LANE<*>:EQUalization:CTLE:DCGain`` \n Snippet: ``value: float = driver.lane.equalization.ctle.dcGain.get(lane = repcap.Lane.Default)`` \n Sets a DC gain for the CTLE filter. The DC gain determines the level of signal amplification at the low frequency end, thus ensuring that low frequency components are amplified to an adequate level to maintain signal integrity. :param lane: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Lane') :return: gain_dc: -40 to 40 """ lane_cmd_val = self._cmd_group.get_repcap_cmd_value(lane, repcap.Lane) response = self._core.io.query_str_with_opc(f'LANE{lane_cmd_val}:EQUalization:CTLE:DCGain?') return Conversions.str_to_float(response)