Source code for RsFsw.Implementations.Applications.K91_Wlan.Configure.Wlan.Smapping.Tx.Stream

from ........Internal.Core import Core
from ........Internal.CommandsGroup import CommandsGroup
from ........Internal.Types import DataType
from ........Internal.StructBase import StructBase
from ........Internal.ArgStruct import ArgStruct
from ........Internal.ArgSingleList import ArgSingleList
from ........Internal.ArgSingle import ArgSingle
from ........Internal.RepeatedCapability import RepeatedCapability
from ........ import repcap


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

	Repeated Capability Setting:
	
	.. code-block:: python
	
			# Range: Nr1 .. Nr8 \n
			driver.applications.k91Wlan.configure.wlan.smapping.tx.stream.repcap_stream_set(repcap.Stream.Nr1)
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("stream", core, parent)
		self._cmd_group.rep_cap = RepeatedCapability(self._cmd_group.group_name, 'repcap_stream_get', 'repcap_stream_set', repcap.Stream.Nr1)

	def repcap_stream_set(self, stream: repcap.Stream) -> None:
		"""
		Repeated Capability default value numeric suffix.
		This value is used, if you do not explicitely set it in the child set/get methods, or if you leave it to Stream.Default.
		Default value after init: Stream.Nr1
		"""
		self._cmd_group.set_repcap_enum_value(stream)

	def repcap_stream_get(self) -> repcap.Stream:
		"""
		Returns the current default repeated capability for the child set/get methods.
		"""
		# noinspection PyTypeChecker
		return self._cmd_group.get_repcap_enum_value()

[docs] def set(self, stsi: float, stsq: float, antenna=repcap.Antenna.Default, stream=repcap.Stream.Default) -> None: """ ``CONFigure:WLAN:SMAPping:TX<ant>:STReam<str>`` \n Snippet: ``driver.applications.k91Wlan.configure.wlan.smapping.tx.stream.set(stsi = 1.0, stsq = 1.0, antenna = repcap.Antenna.Default, stream = repcap.Stream.Default)`` \n This remote control command specifies the mapping for a specific transmit channel (antenna) and stream. :param stsi: Imag part of the complex element of the STS-Stream :param stsq: Real part of the complex element of the STS-Stream :param antenna: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Tx') :param stream: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Stream') """ param = ArgSingleList().compose_cmd_string(ArgSingle('stsi', stsi, DataType.Float), ArgSingle('stsq', stsq, DataType.Float)) antenna_cmd_val = self._cmd_group.get_repcap_cmd_value(antenna, repcap.Antenna) stream_cmd_val = self._cmd_group.get_repcap_cmd_value(stream, repcap.Stream) self._core.io.write(f'CONFigure:WLAN:SMAPping:TX{antenna_cmd_val}:STReam{stream_cmd_val} {param}'.rstrip())
# noinspection PyTypeChecker
[docs] class StreamStruct(StructBase): """ Response structure. Fields: \n - 1 Stsi: float: Imag part of the complex element of the STS-Stream - 2 Stsq: float: Real part of the complex element of the STS-Stream """ __meta_args_list = [ ArgStruct.scalar_float('Stsi'), ArgStruct.scalar_float('Stsq')] def __init__(self): StructBase.__init__(self, self) self.Stsi: float = None self.Stsq: float = None
[docs] def get(self, antenna=repcap.Antenna.Default, stream=repcap.Stream.Default) -> StreamStruct: """ ``CONFigure:WLAN:SMAPping:TX<ant>:STReam<str>`` \n Snippet: ``value: StreamStruct = driver.applications.k91Wlan.configure.wlan.smapping.tx.stream.get(antenna = repcap.Antenna.Default, stream = repcap.Stream.Default)`` \n This remote control command specifies the mapping for a specific transmit channel (antenna) and stream. :param antenna: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Tx') :param stream: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Stream') :return: structure: for return value, see the help for StreamStruct structure arguments. """ antenna_cmd_val = self._cmd_group.get_repcap_cmd_value(antenna, repcap.Antenna) stream_cmd_val = self._cmd_group.get_repcap_cmd_value(stream, repcap.Stream) return self._core.io.query_struct(f'CONFigure:WLAN:SMAPping:TX{antenna_cmd_val}:STReam{stream_cmd_val}?', self.__class__.StreamStruct())
def clone(self) -> 'StreamCls': """ 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 = StreamCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group