from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class StateCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("state", core, parent)
[docs]
def set(self, state: bool, lane=repcap.Lane.Default) -> None:
"""
``LANE<*>:EQUalization:FFE:STATe`` \n
Snippet: ``driver.lane.equalization.ffe.state.set(state = False, lane = repcap.Lane.Default)`` \n
Enables the feed-forward equalizer (FFE) .
:param state: OFF | ON
:param lane: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Lane')
"""
param = Conversions.bool_to_str(state)
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:FFE:STATe {param}')
[docs]
def get(self, lane=repcap.Lane.Default) -> bool:
"""
``LANE<*>:EQUalization:FFE:STATe`` \n
Snippet: ``value: bool = driver.lane.equalization.ffe.state.get(lane = repcap.Lane.Default)`` \n
Enables the feed-forward equalizer (FFE) .
:param lane: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Lane')
:return: state: 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:FFE:STATe?')
return Conversions.str_to_bool(response)