from .......Internal.Core import Core
from .......Internal.CommandsGroup import CommandsGroup
from .......Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class SidxCls:
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("sidx", core, parent)
[docs]
def get_interval(self) -> int:
"""
``[SOURce<HW>]:BB:NR5G:UBWP:RESTart:SIDX:INTerval`` \n
Snippet: ``value: int = driver.source.bb.nr5G.ubwp.restart.sidx.get_interval()`` \n
Defines the number of slots after which the slot index within a frame restarts.
Prerequisites for this command \n
- Turn on custom slot index restart (method ``RsSmbv.source.bb.nr5G.ubwp.restart.sidx.state()`` ) .
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:NR5G:UBWP:RESTart:SIDX:INTerval?')
return Conversions.str_to_int(response)
[docs]
def set_interval(self, res_slot_idx_int: int) -> None:
"""
``[SOURce<HW>]:BB:NR5G:UBWP:RESTart:SIDX:INTerval`` \n
Snippet: ``driver.source.bb.nr5G.ubwp.restart.sidx.set_interval(res_slot_idx_int = 1)`` \n
Defines the number of slots after which the slot index within a frame restarts.
Prerequisites for this command \n
- Turn on custom slot index restart (method ``RsSmbv.source.bb.nr5G.ubwp.restart.sidx.state()`` ) .
:param res_slot_idx_int: integer Range: 0 to 640
"""
param = Conversions.decimal_value_to_str(res_slot_idx_int)
self._core.io.write(f'SOURce<HwInstance>:BB:NR5G:UBWP:RESTart:SIDX:INTerval {param}')
[docs]
def get_state(self) -> bool:
"""
``[SOURce<HW>]:BB:NR5G:UBWP:RESTart:SIDX:STATe`` \n
Snippet: ``value: bool = driver.source.bb.nr5G.ubwp.restart.sidx.get_state()`` \n
Turns a restart of the slot index within a frame on and off. If on, define the restart interval with method
``RsSmbv.source.bb.nr5G.ubwp.restart.sidx.interval()`` .
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:NR5G:UBWP:RESTart:SIDX:STATe?')
return Conversions.str_to_bool(response)
[docs]
def set_state(self, restart_slot_idx: bool) -> None:
"""
``[SOURce<HW>]:BB:NR5G:UBWP:RESTart:SIDX:STATe`` \n
Snippet: ``driver.source.bb.nr5G.ubwp.restart.sidx.set_state(restart_slot_idx = False)`` \n
Turns a restart of the slot index within a frame on and off. If on, define the restart interval with method
``RsSmbv.source.bb.nr5G.ubwp.restart.sidx.interval()`` .
:param restart_slot_idx: 1 | ON | 0| OFF
"""
param = Conversions.bool_to_str(restart_slot_idx)
self._core.io.write(f'SOURce<HwInstance>:BB:NR5G:UBWP:RESTart:SIDX:STATe {param}')