Source code for RsSmw.Implementations.Source.Bb.W3Gpp.Ts25141.Scode

from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ......Internal.Utilities import trim_str_response
from ...... import enums


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

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

	# noinspection PyTypeChecker
[docs] def get_mode(self) -> enums.Ts25141ScrCodeMode: """ ``[SOURce]:BB:W3GPp:TS25141:SCODe:MODE`` \n Snippet: ``value: enums.Ts25141ScrCodeMode = driver.source.bb.w3Gpp.ts25141.scode.get_mode()`` \n Sets the type for the scrambling code for the uplink direction. In downlink direction (test case 6.6) , the scrambling generator can be switched on and off. :return: mode: OFF | ON | LONG | SHORt """ response = self._core.io.query_str('SOURce:BB:W3GPp:TS25141:SCODe:MODE?') return Conversions.str_to_scalar_enum(response, enums.Ts25141ScrCodeMode)
[docs] def set_mode(self, mode: enums.Ts25141ScrCodeMode) -> None: """ ``[SOURce]:BB:W3GPp:TS25141:SCODe:MODE`` \n Snippet: ``driver.source.bb.w3Gpp.ts25141.scode.set_mode(mode = enums.Ts25141ScrCodeMode.LONG)`` \n Sets the type for the scrambling code for the uplink direction. In downlink direction (test case 6.6) , the scrambling generator can be switched on and off. :param mode: OFF | ON | LONG | SHORt """ param = Conversions.enum_scalar_to_str(mode, enums.Ts25141ScrCodeMode) self._core.io.write(f'SOURce:BB:W3GPp:TS25141:SCODe:MODE {param}')
[docs] def get_value(self) -> str: """ ``[SOURce]:BB:W3GPp:TS25141:SCODe`` \n Snippet: ``value: str = driver.source.bb.w3Gpp.ts25141.scode.get_value()`` \n Sets the scrambling code. The value range depends on whether the generator is used in uplink or downlink direction (test case 6.6) according to the selected test case. :return: scode: integer """ response = self._core.io.query_str('SOURce:BB:W3GPp:TS25141:SCODe?') return trim_str_response(response)
[docs] def set_value(self, scode: str) -> None: """ ``[SOURce]:BB:W3GPp:TS25141:SCODe`` \n Snippet: ``driver.source.bb.w3Gpp.ts25141.scode.set_value(scode = rawAbc)`` \n Sets the scrambling code. The value range depends on whether the generator is used in uplink or downlink direction (test case 6.6) according to the selected test case. :param scode: integer """ param = Conversions.value_to_str(scode) self._core.io.write(f'SOURce:BB:W3GPp:TS25141:SCODe {param}')