from ........Internal.Core import Core
from ........Internal.CommandsGroup import CommandsGroup
from ........Internal import Conversions
from ........ import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class UlimitCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("ulimit", core, parent)
[docs]
def set(self, upper_limit: float, lane=repcap.Lane.Default, laneEqTap=repcap.LaneEqTap.Default) -> None:
"""
``LANE<*>:EQUalization:TRAining:DFE:LIMits:TAP<*>:ULIMit`` \n
Snippet: ``driver.lane.equalization.training.dfe.limits.tap.ulimit.set(upper_limit = 1.0, lane = repcap.Lane.Default, laneEqTap = repcap.LaneEqTap.Default)`` \n
Sets the upper limit for the respective tap of the DFE filter. The trained/generated filter tap values are within these
given limits.
:param upper_limit: -1 to 1
: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 'Tap')
"""
param = Conversions.decimal_value_to_str(upper_limit)
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:TRAining:DFE:LIMits:TAP{laneEqTap_cmd_val}:ULIMit {param}')
[docs]
def get(self, lane=repcap.Lane.Default, laneEqTap=repcap.LaneEqTap.Default) -> float:
"""
``LANE<*>:EQUalization:TRAining:DFE:LIMits:TAP<*>:ULIMit`` \n
Snippet: ``value: float = driver.lane.equalization.training.dfe.limits.tap.ulimit.get(lane = repcap.Lane.Default, laneEqTap = repcap.LaneEqTap.Default)`` \n
Sets the upper limit for the respective tap of the DFE filter. The trained/generated filter tap values are within these
given limits.
: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 'Tap')
:return: upper_limit: -1 to 1
"""
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:TRAining:DFE:LIMits:TAP{laneEqTap_cmd_val}:ULIMit?')
return Conversions.str_to_float(response)