from ..........Internal.Core import Core
from ..........Internal.CommandsGroup import CommandsGroup
from ..........Internal import Conversions
from .......... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
[docs]class UseCls:
"""Use commands group definition. 1 total commands, 0 Subgroups, 1 group commands"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("use", core, parent)
[docs] def set(self, use: bool, userIx=repcap.UserIx.Default, cell=repcap.Cell.Default) -> None:
"""SCPI: [SOURce<HW>]:BB:EUTRa:DL:USER<CH>:SCRambling:CELL<ST>:DMRS:USE \n
Snippet: driver.source.bb.eutra.downlink.user.scrambling.cell.dmrs.use.set(use = False, userIx = repcap.UserIx.Default, cell = repcap.Cell.Default) \n
Defines how the DMRS scrambling sequence is initialized. \n
:param use: 1| ON| 0| OFF OFF DRMS sequence is generated with the variable nID = NIDcell. ON Used are two variable nID = nIDDMRS,i set with the commands [:SOURcehw]:BB:EUTRa:DL:USERch:SCRambling:CELLst:DMRS:ID1|ID2
:param userIx: optional repeated capability selector. Default value: Nr1 (settable in the interface 'User')
:param cell: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Cell')
"""
param = Conversions.bool_to_str(use)
userIx_cmd_val = self._cmd_group.get_repcap_cmd_value(userIx, repcap.UserIx)
cell_cmd_val = self._cmd_group.get_repcap_cmd_value(cell, repcap.Cell)
self._core.io.write(f'SOURce<HwInstance>:BB:EUTRa:DL:USER{userIx_cmd_val}:SCRambling:CELL{cell_cmd_val}:DMRS:USE {param}')
[docs] def get(self, userIx=repcap.UserIx.Default, cell=repcap.Cell.Default) -> bool:
"""SCPI: [SOURce<HW>]:BB:EUTRa:DL:USER<CH>:SCRambling:CELL<ST>:DMRS:USE \n
Snippet: value: bool = driver.source.bb.eutra.downlink.user.scrambling.cell.dmrs.use.get(userIx = repcap.UserIx.Default, cell = repcap.Cell.Default) \n
Defines how the DMRS scrambling sequence is initialized. \n
:param userIx: optional repeated capability selector. Default value: Nr1 (settable in the interface 'User')
:param cell: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Cell')
:return: use: 1| ON| 0| OFF OFF DRMS sequence is generated with the variable nID = NIDcell. ON Used are two variable nID = nIDDMRS,i set with the commands [:SOURcehw]:BB:EUTRa:DL:USERch:SCRambling:CELLst:DMRS:ID1|ID2"""
userIx_cmd_val = self._cmd_group.get_repcap_cmd_value(userIx, repcap.UserIx)
cell_cmd_val = self._cmd_group.get_repcap_cmd_value(cell, repcap.Cell)
response = self._core.io.query_str(f'SOURce<HwInstance>:BB:EUTRa:DL:USER{userIx_cmd_val}:SCRambling:CELL{cell_cmd_val}:DMRS:USE?')
return Conversions.str_to_bool(response)