Source code for rsrtx.Implementations.Lane.Equalization.Ffe.Taps.Tap

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


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

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

[docs] def set(self, value: float, lane=repcap.Lane.Default, laneEqTap=repcap.LaneEqTap.Default) -> None: """ ``LANE<*>:EQUalization:FFE:TAPS:TAP<*>`` \n Snippet: ``driver.lane.equalization.ffe.taps.tap.set(value = 1.0, lane = repcap.Lane.Default, laneEqTap = repcap.LaneEqTap.Default)`` \n Sets the value of the tap for the FFE. :param value: -40E+9 to 40E+9 :param lane: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Lane') :param laneEqTap: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Taps') """ param = Conversions.decimal_value_to_str(value) lane_cmd_val = self._cmd_group.get_repcap_cmd_value(lane, repcap.Lane) laneEqTap_cmd_val = self._cmd_group.get_repcap_cmd_value(laneEqTap, repcap.LaneEqTap) self._core.io.write_with_opc(f'LANE{lane_cmd_val}:EQUalization:FFE:TAPS:TAP{laneEqTap_cmd_val} {param}')
[docs] def get(self, lane=repcap.Lane.Default, laneEqTap=repcap.LaneEqTap.Default) -> float: """ ``LANE<*>:EQUalization:FFE:TAPS:TAP<*>`` \n Snippet: ``value: float = driver.lane.equalization.ffe.taps.tap.get(lane = repcap.Lane.Default, laneEqTap = repcap.LaneEqTap.Default)`` \n Sets the value of the tap for the FFE. :param lane: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Lane') :param laneEqTap: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Taps') :return: value: -40E+9 to 40E+9 """ lane_cmd_val = self._cmd_group.get_repcap_cmd_value(lane, repcap.Lane) laneEqTap_cmd_val = self._cmd_group.get_repcap_cmd_value(laneEqTap, repcap.LaneEqTap) response = self._core.io.query_str_with_opc(f'LANE{lane_cmd_val}:EQUalization:FFE:TAPS:TAP{laneEqTap_cmd_val}?') return Conversions.str_to_float(response)