Source code for RsCMPX_NrFr2Meas.Implementations.Configure.NrMmwMeas.Cc.Allocation.Bwp

from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ...... import enums
from ...... import repcap


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
[docs] class BwpCls: """Bwp commands group definition. 1 total commands, 0 Subgroups, 1 group commands""" def __init__(self, core: Core, parent): self._core = core self._cmd_group = CommandsGroup("bwp", core, parent)
[docs] def set(self, bandwidth_part: enums.BandwidthPart, carrierComponent=repcap.CarrierComponent.Default, allocationMore=repcap.AllocationMore.Default) -> None: """SCPI: CONFigure:NRMMw:MEASurement<Instance>[:CC<no>]:ALLocation<Allocation>:BWP \n Snippet: driver.configure.nrMmwMeas.cc.allocation.bwp.set(bandwidth_part = enums.BandwidthPart.BWP0, carrierComponent = repcap.CarrierComponent.Default, allocationMore = repcap.AllocationMore.Default) \n Assigns a bandwidth part to allocation <a> of carrier <no>. \n :param bandwidth_part: No help available :param carrierComponent: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Cc') :param allocationMore: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Allocation') """ param = Conversions.enum_scalar_to_str(bandwidth_part, enums.BandwidthPart) carrierComponent_cmd_val = self._cmd_group.get_repcap_cmd_value(carrierComponent, repcap.CarrierComponent) allocationMore_cmd_val = self._cmd_group.get_repcap_cmd_value(allocationMore, repcap.AllocationMore) self._core.io.write(f'CONFigure:NRMMw:MEASurement<Instance>:CC{carrierComponent_cmd_val}:ALLocation{allocationMore_cmd_val}:BWP {param}')
# noinspection PyTypeChecker
[docs] def get(self, carrierComponent=repcap.CarrierComponent.Default, allocationMore=repcap.AllocationMore.Default) -> enums.BandwidthPart: """SCPI: CONFigure:NRMMw:MEASurement<Instance>[:CC<no>]:ALLocation<Allocation>:BWP \n Snippet: value: enums.BandwidthPart = driver.configure.nrMmwMeas.cc.allocation.bwp.get(carrierComponent = repcap.CarrierComponent.Default, allocationMore = repcap.AllocationMore.Default) \n Assigns a bandwidth part to allocation <a> of carrier <no>. \n :param carrierComponent: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Cc') :param allocationMore: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Allocation') :return: bandwidth_part: No help available""" carrierComponent_cmd_val = self._cmd_group.get_repcap_cmd_value(carrierComponent, repcap.CarrierComponent) allocationMore_cmd_val = self._cmd_group.get_repcap_cmd_value(allocationMore, repcap.AllocationMore) response = self._core.io.query_str(f'CONFigure:NRMMw:MEASurement<Instance>:CC{carrierComponent_cmd_val}:ALLocation{allocationMore_cmd_val}:BWP?') return Conversions.str_to_scalar_enum(response, enums.BandwidthPart)