from ...........Internal.Core import Core
from ...........Internal.CommandsGroup import CommandsGroup
from ...........Internal import Conversions
from ........... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
[docs]class DcmCls:
"""Dcm commands group definition. 1 total commands, 0 Subgroups, 1 group commands"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("dcm", core, parent)
[docs] def set(self, type_py: float, segment=repcap.Segment.Default, channel=repcap.Channel.Default, ruAllocationIx=repcap.RuAllocationIx.Default, userIx=repcap.UserIx.Default) -> None:
"""SCPI: CONFigure:WLAN:RUConfig:SEGMent<seg>:CHANnel<ch>:RULocation<cf>:USER<mu>:DCM \n
Snippet: driver.applications.k91Wlan.configure.wlan.ruConfig.segment.channel.rulocation.user.dcm.set(type_py = 1.0, segment = repcap.Segment.Default, channel = repcap.Channel.Default, ruAllocationIx = repcap.RuAllocationIx.Default, userIx = repcap.UserIx.Default) \n
Defines the use of dual carrier modulation for the specified user. \n
:param type_py: ON | OFF | 0 | 1 OFF | 0 DCM not used ON | 1 DCM is used
:param segment: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Segment')
:param channel: optional repeated capability selector. Default value: Ch1 (settable in the interface 'Channel')
:param ruAllocationIx: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Rulocation')
:param userIx: optional repeated capability selector. Default value: Ix1 (settable in the interface 'User')
"""
param = Conversions.decimal_value_to_str(type_py)
segment_cmd_val = self._cmd_group.get_repcap_cmd_value(segment, repcap.Segment)
channel_cmd_val = self._cmd_group.get_repcap_cmd_value(channel, repcap.Channel)
ruAllocationIx_cmd_val = self._cmd_group.get_repcap_cmd_value(ruAllocationIx, repcap.RuAllocationIx)
userIx_cmd_val = self._cmd_group.get_repcap_cmd_value(userIx, repcap.UserIx)
self._core.io.write(f'CONFigure:WLAN:RUConfig:SEGMent{segment_cmd_val}:CHANnel{channel_cmd_val}:RULocation{ruAllocationIx_cmd_val}:USER{userIx_cmd_val}:DCM {param}')
[docs] def get(self, segment=repcap.Segment.Default, channel=repcap.Channel.Default, ruAllocationIx=repcap.RuAllocationIx.Default, userIx=repcap.UserIx.Default) -> float:
"""SCPI: CONFigure:WLAN:RUConfig:SEGMent<seg>:CHANnel<ch>:RULocation<cf>:USER<mu>:DCM \n
Snippet: value: float = driver.applications.k91Wlan.configure.wlan.ruConfig.segment.channel.rulocation.user.dcm.get(segment = repcap.Segment.Default, channel = repcap.Channel.Default, ruAllocationIx = repcap.RuAllocationIx.Default, userIx = repcap.UserIx.Default) \n
Defines the use of dual carrier modulation for the specified user. \n
:param segment: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Segment')
:param channel: optional repeated capability selector. Default value: Ch1 (settable in the interface 'Channel')
:param ruAllocationIx: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Rulocation')
:param userIx: optional repeated capability selector. Default value: Ix1 (settable in the interface 'User')
:return: type_py: ON | OFF | 0 | 1 OFF | 0 DCM not used ON | 1 DCM is used"""
segment_cmd_val = self._cmd_group.get_repcap_cmd_value(segment, repcap.Segment)
channel_cmd_val = self._cmd_group.get_repcap_cmd_value(channel, repcap.Channel)
ruAllocationIx_cmd_val = self._cmd_group.get_repcap_cmd_value(ruAllocationIx, repcap.RuAllocationIx)
userIx_cmd_val = self._cmd_group.get_repcap_cmd_value(userIx, repcap.UserIx)
response = self._core.io.query_str(f'CONFigure:WLAN:RUConfig:SEGMent{segment_cmd_val}:CHANnel{channel_cmd_val}:RULocation{ruAllocationIx_cmd_val}:USER{userIx_cmd_val}:DCM?')
return Conversions.str_to_float(response)