Source code for RsSmw.Implementations.Source.Bb.W3Gpp.Bstation.Channel.Hsdpa.TtiDistance

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


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

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

[docs] def set(self, tti_distance: int, baseStation=repcap.BaseStation.Default, channelNull=repcap.ChannelNull.Default) -> None: """ ``[SOURce<HW>]:BB:W3GPp:BSTation<ST>:CHANnel<CH0>:HSDPa:TTIDistance`` \n Snippet: ``driver.source.bb.w3Gpp.bstation.channel.hsdpa.ttiDistance.set(tti_distance = 1, baseStation = repcap.BaseStation.Default, channelNull = repcap.ChannelNull.Default)`` \n The command selects the distance between two packets in HSDPA packet mode. The distance is set in number of sub-frames (3 slots = 2 ms) . An 'Inter TTI Distance' of 1 means continuous generation. :param tti_distance: integer Range: 1 to 16 :param baseStation: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Bstation') :param channelNull: optional repeated capability selector. Default value: Nr0 (settable in the interface 'Channel') """ param = Conversions.decimal_value_to_str(tti_distance) baseStation_cmd_val = self._cmd_group.get_repcap_cmd_value(baseStation, repcap.BaseStation) channelNull_cmd_val = self._cmd_group.get_repcap_cmd_value(channelNull, repcap.ChannelNull) self._core.io.write(f'SOURce<HwInstance>:BB:W3GPp:BSTation{baseStation_cmd_val}:CHANnel{channelNull_cmd_val}:HSDPa:TTIDistance {param}')
[docs] def get(self, baseStation=repcap.BaseStation.Default, channelNull=repcap.ChannelNull.Default) -> int: """ ``[SOURce<HW>]:BB:W3GPp:BSTation<ST>:CHANnel<CH0>:HSDPa:TTIDistance`` \n Snippet: ``value: int = driver.source.bb.w3Gpp.bstation.channel.hsdpa.ttiDistance.get(baseStation = repcap.BaseStation.Default, channelNull = repcap.ChannelNull.Default)`` \n The command selects the distance between two packets in HSDPA packet mode. The distance is set in number of sub-frames (3 slots = 2 ms) . An 'Inter TTI Distance' of 1 means continuous generation. :param baseStation: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Bstation') :param channelNull: optional repeated capability selector. Default value: Nr0 (settable in the interface 'Channel') :return: tti_distance: integer Range: 1 to 16 """ baseStation_cmd_val = self._cmd_group.get_repcap_cmd_value(baseStation, repcap.BaseStation) channelNull_cmd_val = self._cmd_group.get_repcap_cmd_value(channelNull, repcap.ChannelNull) response = self._core.io.query_str(f'SOURce<HwInstance>:BB:W3GPp:BSTation{baseStation_cmd_val}:CHANnel{channelNull_cmd_val}:HSDPa:TTIDistance?') return Conversions.str_to_int(response)