Source code for rsrtx.Implementations.Lane.Equalization.Training.NorGain

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


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

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

[docs] def set(self, normalize_gain: bool, lane=repcap.Lane.Default) -> None: """ ``LANE<*>:EQUalization:TRAining:NORGain`` \n Snippet: ``driver.lane.equalization.training.norGain.set(normalize_gain = False, lane = repcap.Lane.Default)`` \n Sets ths state of the normalize gain for FFE. The gain of a trained DFE is always 1. If enabled, the gain of the FFE is normalized to 1, such that the signal has a similar amplitude at the input and output of the equalizer. If disabled, the equalizer is trained such that the output PAM levels are separated by 1 V (e.g., +/- 0.5 V for NRZ) . :param normalize_gain: OFF | ON :param lane: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Lane') """ param = Conversions.bool_to_str(normalize_gain) 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:TRAining:NORGain {param}')
[docs] def get(self, lane=repcap.Lane.Default) -> bool: """ ``LANE<*>:EQUalization:TRAining:NORGain`` \n Snippet: ``value: bool = driver.lane.equalization.training.norGain.get(lane = repcap.Lane.Default)`` \n Sets ths state of the normalize gain for FFE. The gain of a trained DFE is always 1. If enabled, the gain of the FFE is normalized to 1, such that the signal has a similar amplitude at the input and output of the equalizer. If disabled, the equalizer is trained such that the output PAM levels are separated by 1 V (e.g., +/- 0.5 V for NRZ) . :param lane: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Lane') :return: normalize_gain: OFF | ON """ 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:TRAining:NORGain?') return Conversions.str_to_bool(response)