from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ......Internal.Utilities import trim_str_response
from ...... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class SelectCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("select", core, parent)
[docs]
def set(self, sub_config: str, lane=repcap.Lane.Default) -> None:
"""
``LANE<*>:EQUalization:CTLE:SCONfig[:SELect]`` \n
Snippet: ``driver.lane.equalization.ctle.sconfig.select.set(sub_config = 'abc', lane = repcap.Lane.Default)`` \n
Selects a preset standard according to the selected serial standard. You can set the serial standard with method
``RsRtx.signalConfig.setup.setting.serStandard.set()`` .
:param lane: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Lane')
"""
param = Conversions.value_to_quoted_str(sub_config)
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:SCONfig:SELect {param}')
[docs]
def get(self, lane=repcap.Lane.Default) -> str:
"""
``LANE<*>:EQUalization:CTLE:SCONfig[:SELect]`` \n
Snippet: ``value: str = driver.lane.equalization.ctle.sconfig.select.get(lane = repcap.Lane.Default)`` \n
Selects a preset standard according to the selected serial standard. You can set the serial standard with method
``RsRtx.signalConfig.setup.setting.serStandard.set()`` .
:param lane: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Lane')
"""
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:SCONfig:SELect?')
return trim_str_response(response)