Source code for RsSmw.Implementations.Source.Bb.C2K.Mstation.Channel.Data

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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class DataCls:
	"""
	| Commands in total: 4
	| Subgroups: 3
	| Direct child commands: 1
	"""

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

	@property
	def dselect(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_dselect'):
			from .Dselect import DselectCls
			self._dselect = DselectCls(self._core, self._cmd_group)
		return self._dselect

	@property
	def pattern(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_pattern'):
			from .Pattern import PatternCls
			self._pattern = PatternCls(self._core, self._cmd_group)
		return self._pattern

	@property
	def rate(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_rate'):
			from .Rate import RateCls
			self._rate = RateCls(self._core, self._cmd_group)
		return self._rate

[docs] def set(self, data: enums.DataSourceA, mobileStation=repcap.MobileStation.Default, channel=repcap.Channel.Default) -> None: """ ``[SOURce<HW>]:BB:C2K:MSTation<ST>:CHANnel<CH>:DATA`` \n Snippet: ``driver.source.bb.c2K.mstation.channel.data.set(data = enums.DataSourceA.DLISt, mobileStation = repcap.MobileStation.Default, channel = repcap.Channel.Default)`` \n The command sets the data source for the specified channel. The data source for the power control bits is selected with the method ``RsSmw.source.bb.c2K.mstation.tpc.data.set()`` . For the traffic channels, this value is specific for the selected radio configuration. :param data: ZERO | ONE | PATTern | PN9 | PN11 | PN15 | PN16 | PN20 | PN21 | PN23 | DLISt PNxx The pseudo-random sequence generator is used as the data source. Different random sequence lengths can be selected. DLISt A data list is used. The data list is selected with the method ``RsSmw.source.bb.c2K.mstation.channel.data.dselect.set()`` . ZERO | ONE Internal 0 and 1 data is used. PATTern Internal data is used. The bit pattern for the data is defined by the command method ``RsSmw.source.bb.c2K.mstation.channel.data.pattern.set()`` . :param mobileStation: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Mstation') :param channel: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Channel') """ param = Conversions.enum_scalar_to_str(data, enums.DataSourceA) mobileStation_cmd_val = self._cmd_group.get_repcap_cmd_value(mobileStation, repcap.MobileStation) channel_cmd_val = self._cmd_group.get_repcap_cmd_value(channel, repcap.Channel) self._core.io.write(f'SOURce<HwInstance>:BB:C2K:MSTation{mobileStation_cmd_val}:CHANnel{channel_cmd_val}:DATA {param}')
# noinspection PyTypeChecker
[docs] def get(self, mobileStation=repcap.MobileStation.Default, channel=repcap.Channel.Default) -> enums.DataSourceA: """ ``[SOURce<HW>]:BB:C2K:MSTation<ST>:CHANnel<CH>:DATA`` \n Snippet: ``value: enums.DataSourceA = driver.source.bb.c2K.mstation.channel.data.get(mobileStation = repcap.MobileStation.Default, channel = repcap.Channel.Default)`` \n The command sets the data source for the specified channel. The data source for the power control bits is selected with the method ``RsSmw.source.bb.c2K.mstation.tpc.data.set()`` . For the traffic channels, this value is specific for the selected radio configuration. :param mobileStation: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Mstation') :param channel: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Channel') :return: data: ZERO | ONE | PATTern | PN9 | PN11 | PN15 | PN16 | PN20 | PN21 | PN23 | DLISt PNxx The pseudo-random sequence generator is used as the data source. Different random sequence lengths can be selected. DLISt A data list is used. The data list is selected with the method ``RsSmw.source.bb.c2K.mstation.channel.data.dselect.set()`` . ZERO | ONE Internal 0 and 1 data is used. PATTern Internal data is used. The bit pattern for the data is defined by the command method ``RsSmw.source.bb.c2K.mstation.channel.data.pattern.set()`` . """ mobileStation_cmd_val = self._cmd_group.get_repcap_cmd_value(mobileStation, repcap.MobileStation) channel_cmd_val = self._cmd_group.get_repcap_cmd_value(channel, repcap.Channel) response = self._core.io.query_str(f'SOURce<HwInstance>:BB:C2K:MSTation{mobileStation_cmd_val}:CHANnel{channel_cmd_val}:DATA?') return Conversions.str_to_scalar_enum(response, enums.DataSourceA)
def clone(self) -> 'DataCls': """ Clones the group by creating new object from it and its whole existing subgroups. Also copies all the existing default Repeated Capabilities setting, which you can change independently without affecting the original group. """ new_group = DataCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group