from .......Internal.Core import Core
from .......Internal.CommandsGroup import CommandsGroup
from .......Internal import Conversions
from .......Internal.RepeatedCapability import RepeatedCapability
from ....... import enums
from ....... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
[docs]class ModulationCls:
"""Modulation commands group definition. 1 total commands, 0 Subgroups, 1 group commands
Repeated Capability: Stream, default value after init: Stream.Nr1"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("modulation", 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, modulation: enums.WlannFbMod, frameBlock=repcap.FrameBlock.Default, userIx=repcap.UserIx.Default, stream=repcap.Stream.Default) -> None:
"""SCPI: [SOURce<HW>]:BB:WLNN:FBLock<CH>:[USER<DI>]:MODulation<ST> \n
Snippet: driver.source.bb.wlnn.fblock.user.modulation.set(modulation = enums.WlannFbMod.BPSK, frameBlock = repcap.FrameBlock.Default, userIx = repcap.UserIx.Default, stream = repcap.Stream.Default) \n
Selects the modulation used for the spatial stream. \n
:param modulation: BPSK| QPSK| QAM16| QAM64| QAM256| QAM1024| QAM4096
:param frameBlock: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Fblock')
:param userIx: optional repeated capability selector. Default value: Nr1 (settable in the interface 'User')
:param stream: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Modulation')
"""
param = Conversions.enum_scalar_to_str(modulation, enums.WlannFbMod)
frameBlock_cmd_val = self._cmd_group.get_repcap_cmd_value(frameBlock, repcap.FrameBlock)
userIx_cmd_val = self._cmd_group.get_repcap_cmd_value(userIx, repcap.UserIx)
stream_cmd_val = self._cmd_group.get_repcap_cmd_value(stream, repcap.Stream)
self._core.io.write(f'SOURce<HwInstance>:BB:WLNN:FBLock{frameBlock_cmd_val}:USER{userIx_cmd_val}:MODulation{stream_cmd_val} {param}')
# noinspection PyTypeChecker
[docs] def get(self, frameBlock=repcap.FrameBlock.Default, userIx=repcap.UserIx.Default, stream=repcap.Stream.Default) -> enums.WlannFbMod:
"""SCPI: [SOURce<HW>]:BB:WLNN:FBLock<CH>:[USER<DI>]:MODulation<ST> \n
Snippet: value: enums.WlannFbMod = driver.source.bb.wlnn.fblock.user.modulation.get(frameBlock = repcap.FrameBlock.Default, userIx = repcap.UserIx.Default, stream = repcap.Stream.Default) \n
Selects the modulation used for the spatial stream. \n
:param frameBlock: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Fblock')
:param userIx: optional repeated capability selector. Default value: Nr1 (settable in the interface 'User')
:param stream: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Modulation')
:return: modulation: BPSK| QPSK| QAM16| QAM64| QAM256| QAM1024| QAM4096"""
frameBlock_cmd_val = self._cmd_group.get_repcap_cmd_value(frameBlock, repcap.FrameBlock)
userIx_cmd_val = self._cmd_group.get_repcap_cmd_value(userIx, repcap.UserIx)
stream_cmd_val = self._cmd_group.get_repcap_cmd_value(stream, repcap.Stream)
response = self._core.io.query_str(f'SOURce<HwInstance>:BB:WLNN:FBLock{frameBlock_cmd_val}:USER{userIx_cmd_val}:MODulation{stream_cmd_val}?')
return Conversions.str_to_scalar_enum(response, enums.WlannFbMod)
def clone(self) -> 'ModulationCls':
"""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 = ModulationCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group