from .........Internal.Core import Core
from .........Internal.CommandsGroup import CommandsGroup
from .........Internal import Conversions
from ......... import enums
from ......... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class BsPeriodCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("bsPeriod", core, parent)
[docs]
def set(self, periodicity: enums.BurstSetPeriodicity, carrierComponent=repcap.CarrierComponent.Default) -> None:
"""
``CONFigure[:NR5G]:DL[:CC<cc>]:SSBLock:BSPeriod`` \n
Snippet: ``driver.applications.k14Xnr5G.configure.nr5G.downlink.cc.ssBlock.bsPeriod.set(periodicity = enums.BurstSetPeriodicity.AUTO, carrierComponent = repcap.CarrierComponent.Default)`` \n
Selects the burst set periodicity of a synchronization signal block.
:param periodicity: AUTO Determines the burst set periodicity of the signal automatically. MS05 | MS10 | MS20 | MS40 Selects one of the following periodicities: 5 ms, 10 ms, 20 ms, 40 ms
:param carrierComponent: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Cc')
"""
param = Conversions.enum_scalar_to_str(periodicity, enums.BurstSetPeriodicity)
carrierComponent_cmd_val = self._cmd_group.get_repcap_cmd_value(carrierComponent, repcap.CarrierComponent)
self._core.io.write(f'CONFigure:NR5G:DL:CC{carrierComponent_cmd_val}:SSBLock:BSPeriod {param}')
# noinspection PyTypeChecker
[docs]
def get(self, carrierComponent=repcap.CarrierComponent.Default) -> enums.BurstSetPeriodicity:
"""
``CONFigure[:NR5G]:DL[:CC<cc>]:SSBLock:BSPeriod`` \n
Snippet: ``value: enums.BurstSetPeriodicity = driver.applications.k14Xnr5G.configure.nr5G.downlink.cc.ssBlock.bsPeriod.get(carrierComponent = repcap.CarrierComponent.Default)`` \n
Selects the burst set periodicity of a synchronization signal block.
:param carrierComponent: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Cc')
:return: periodicity: AUTO Determines the burst set periodicity of the signal automatically. MS05 | MS10 | MS20 | MS40 Selects one of the following periodicities: 5 ms, 10 ms, 20 ms, 40 ms
"""
carrierComponent_cmd_val = self._cmd_group.get_repcap_cmd_value(carrierComponent, repcap.CarrierComponent)
response = self._core.io.query_str(f'CONFigure:NR5G:DL:CC{carrierComponent_cmd_val}:SSBLock:BSPeriod?')
return Conversions.str_to_scalar_enum(response, enums.BurstSetPeriodicity)