Source code for RsCMPX_NrFr1Meas.Implementations.Configure.NrSubMeas.Cc.Allocation.Pusch.Rb

from ........Internal.Core import Core
from ........Internal.CommandsGroup import CommandsGroup
from ........Internal.Types import DataType
from ........Internal.StructBase import StructBase
from ........Internal.ArgStruct import ArgStruct
from ........Internal.ArgSingleList import ArgSingleList
from ........Internal.ArgSingle import ArgSingle
from ........ import repcap


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class RbCls:
	"""
	| Commands in total: 2
	| Subgroups: 1
	| Direct child commands: 1
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("rb", core, parent)

	@property
	def auto(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_auto'):
			from .Auto import AutoCls
			self._auto = AutoCls(self._core, self._cmd_group)
		return self._auto

[docs] def set(self, no_rbs: int, start_rb: int, no_rb_cluster: int=None, start_rb_cluster: int=None, carrierComponent=repcap.CarrierComponent.Nr1, allocation=repcap.Allocation.Default) -> None: """ ``CONFigure:NRSub:MEASurement<Instance>[:CC<no>]:ALLocation<Allocation>:PUSCh:RB`` \n Snippet: ``driver.configure.nrSubMeas.cc.allocation.pusch.rb.set(no_rbs = 1, start_rb = 1, no_rb_cluster = 1, start_rb_cluster = 1, carrierComponent = repcap.CarrierComponent.Nr1, allocation = repcap.Allocation.Default)`` \n Specifies the PUSCH RB allocation, for carrier <no>, allocation <a>. The ranges have additional dependencies, see 'RB allocation for uplink measurements'. :param no_rbs: Number of allocated RBs for cluster 1. :param start_rb: Index of the first allocated RB for cluster 1. :param no_rb_cluster: Number of allocated RBs for cluster 2. :param start_rb_cluster: Index of the first allocated RB for cluster 2. :param carrierComponent: optional repeated capability selector. Default value: Nr1 :param allocation: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Allocation') """ param = ArgSingleList().compose_cmd_string(ArgSingle('no_rbs', no_rbs, DataType.Integer), ArgSingle('start_rb', start_rb, DataType.Integer), ArgSingle('no_rb_cluster', no_rb_cluster, DataType.Integer, None, is_optional=True), ArgSingle('start_rb_cluster', start_rb_cluster, DataType.Integer, None, is_optional=True)) carrierComponent_cmd_val = self._cmd_group.get_repcap_cmd_value(carrierComponent, repcap.CarrierComponent) allocation_cmd_val = self._cmd_group.get_repcap_cmd_value(allocation, repcap.Allocation) self._core.io.write(f'CONFigure:NRSub:MEASurement<Instance>:CC{carrierComponent_cmd_val}:ALLocation{allocation_cmd_val}:PUSCh:RB {param}'.rstrip())
# noinspection PyTypeChecker
[docs] class RbStruct(StructBase): """ Response structure. Fields: \n - 1 No_Rbs: int: Number of allocated RBs for cluster 1. - 2 Start_Rb: int: Index of the first allocated RB for cluster 1. - 3 No_Rb_Cluster: int: Number of allocated RBs for cluster 2. - 4 Start_Rb_Cluster: int: Index of the first allocated RB for cluster 2. """ __meta_args_list = [ ArgStruct.scalar_int('No_Rbs'), ArgStruct.scalar_int('Start_Rb'), ArgStruct.scalar_int('No_Rb_Cluster'), ArgStruct.scalar_int('Start_Rb_Cluster')] def __init__(self): StructBase.__init__(self, self) self.No_Rbs: int = None self.Start_Rb: int = None self.No_Rb_Cluster: int = None self.Start_Rb_Cluster: int = None
[docs] def get(self, carrierComponent=repcap.CarrierComponent.Nr1, allocation=repcap.Allocation.Default) -> RbStruct: """ ``CONFigure:NRSub:MEASurement<Instance>[:CC<no>]:ALLocation<Allocation>:PUSCh:RB`` \n Snippet: ``value: RbStruct = driver.configure.nrSubMeas.cc.allocation.pusch.rb.get(carrierComponent = repcap.CarrierComponent.Nr1, allocation = repcap.Allocation.Default)`` \n Specifies the PUSCH RB allocation, for carrier <no>, allocation <a>. The ranges have additional dependencies, see 'RB allocation for uplink measurements'. :param carrierComponent: optional repeated capability selector. Default value: Nr1 :param allocation: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Allocation') :return: structure: for return value, see the help for RbStruct structure arguments. """ carrierComponent_cmd_val = self._cmd_group.get_repcap_cmd_value(carrierComponent, repcap.CarrierComponent) allocation_cmd_val = self._cmd_group.get_repcap_cmd_value(allocation, repcap.Allocation) return self._core.io.query_struct(f'CONFigure:NRSub:MEASurement<Instance>:CC{carrierComponent_cmd_val}:ALLocation{allocation_cmd_val}:PUSCh:RB?', self.__class__.RbStruct())
def clone(self) -> 'RbCls': """ Clones the group by creating new object from it and its whole existing subgroups. Also copies all the existing default Repeated Capabilities setting, which you can change independently without affecting the original group. """ new_group = RbCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group