Source code for RsSmw.Implementations.Source.Bb.Tetra.Sconfiguration.Tmode.Slot.Ldirection.Scrambling

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


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

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

[docs] def set(self, scrambling: bool, testMode=repcap.TestMode.Default, slot=repcap.Slot.Default, channel=repcap.Channel.Default) -> None: """ ``[SOURce<HW>]:BB:TETRa:SCONfiguration:TMODe<DI>:SLOT<ST>:LDIRection<CH>:SCRambling`` \n Snippet: ``driver.source.bb.tetra.sconfiguration.tmode.slot.ldirection.scrambling.set(scrambling = False, testMode = repcap.TestMode.Default, slot = repcap.Slot.Default, channel = repcap.Channel.Default)`` \n Enables/disables auto scrambling. :param scrambling: 1 | ON | 0| OFF :param testMode: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Tmode') :param slot: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Slot') :param channel: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Ldirection') """ param = Conversions.bool_to_str(scrambling) testMode_cmd_val = self._cmd_group.get_repcap_cmd_value(testMode, repcap.TestMode) slot_cmd_val = self._cmd_group.get_repcap_cmd_value(slot, repcap.Slot) channel_cmd_val = self._cmd_group.get_repcap_cmd_value(channel, repcap.Channel) self._core.io.write(f'SOURce<HwInstance>:BB:TETRa:SCONfiguration:TMODe{testMode_cmd_val}:SLOT{slot_cmd_val}:LDIRection{channel_cmd_val}:SCRambling {param}')
[docs] def get(self, testMode=repcap.TestMode.Default, slot=repcap.Slot.Default, channel=repcap.Channel.Default) -> bool: """ ``[SOURce<HW>]:BB:TETRa:SCONfiguration:TMODe<DI>:SLOT<ST>:LDIRection<CH>:SCRambling`` \n Snippet: ``value: bool = driver.source.bb.tetra.sconfiguration.tmode.slot.ldirection.scrambling.get(testMode = repcap.TestMode.Default, slot = repcap.Slot.Default, channel = repcap.Channel.Default)`` \n Enables/disables auto scrambling. :param testMode: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Tmode') :param slot: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Slot') :param channel: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Ldirection') :return: scrambling: 1 | ON | 0| OFF """ testMode_cmd_val = self._cmd_group.get_repcap_cmd_value(testMode, repcap.TestMode) slot_cmd_val = self._cmd_group.get_repcap_cmd_value(slot, repcap.Slot) channel_cmd_val = self._cmd_group.get_repcap_cmd_value(channel, repcap.Channel) response = self._core.io.query_str(f'SOURce<HwInstance>:BB:TETRa:SCONfiguration:TMODe{testMode_cmd_val}:SLOT{slot_cmd_val}:LDIRection{channel_cmd_val}:SCRambling?') return Conversions.str_to_bool(response)