Source code for rsrtx.Implementations.Lane.Tffe.State

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<*>:TFFE:STATe`` \n Snippet: ``driver.lane.tffe.state.set(state = False, lane = repcap.Lane.Default)`` \n Enables the transmitter feed forward equalization. :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}:TFFE:STATe {param}')
[docs] def get(self, lane=repcap.Lane.Default) -> bool: """ ``LANE<*>:TFFE:STATe`` \n Snippet: ``value: bool = driver.lane.tffe.state.get(lane = repcap.Lane.Default)`` \n Enables the transmitter feed forward equalization. :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}:TFFE:STATe?') return Conversions.str_to_bool(response)