Source code for RsFsw.Implementations.Applications.K50_Spurious.Sense.Fplan.Component

from .......Internal.Core import Core
from .......Internal.CommandsGroup import CommandsGroup
from .......Internal.RepeatedCapability import RepeatedCapability
from ....... import repcap


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ComponentCls:
	"""
	| Commands in total: 9
	| Subgroups: 7
	| Direct child commands: 1

	Repeated Capability Setting:
	
	.. code-block:: python
	
			# Range: Ix1 .. Ix32 \n
			driver.applications.k50Spurious.sense.fplan.component.repcap_component_set(repcap.Component.Ix1)
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("component", core, parent)
		self._cmd_group.rep_cap = RepeatedCapability(self._cmd_group.group_name, 'repcap_component_get', 'repcap_component_set', repcap.Component.Ix1)

	def repcap_component_set(self, component: repcap.Component) -> None:
		"""
		Repeated Capability default value numeric suffix.
		This value is used, if you do not explicitely set it in the child set/get methods, or if you leave it to Component.Default.
		Default value after init: Component.Ix1
		"""
		self._cmd_group.set_repcap_enum_value(component)

	def repcap_component_get(self) -> repcap.Component:
		"""
		Returns the current default repeated capability for the child set/get methods.
		"""
		# noinspection PyTypeChecker
		return self._cmd_group.get_repcap_enum_value()

	@property
	def typePy(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_typePy'):
			from .TypePy import TypePyCls
			self._typePy = TypePyCls(self._core, self._cmd_group)
		return self._typePy

	@property
	def bcenter(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_bcenter'):
			from .Bcenter import BcenterCls
			self._bcenter = BcenterCls(self._core, self._cmd_group)
		return self._bcenter

	@property
	def bspan(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_bspan'):
			from .Bspan import BspanCls
			self._bspan = BspanCls(self._core, self._cmd_group)
		return self._bspan

	@property
	def add(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_add'):
			from .Add import AddCls
			self._add = AddCls(self._core, self._cmd_group)
		return self._add

	@property
	def factor(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_factor'):
			from .Factor import FactorCls
			self._factor = FactorCls(self._core, self._cmd_group)
		return self._factor

	@property
	def port(self):
		"""
		| Commands in total: 2
		| Subgroups: 2
		| Direct child commands: 0
		"""
		if not hasattr(self, '_port'):
			from .Port import PortCls
			self._port = PortCls(self._core, self._cmd_group)
		return self._port

	@property
	def identity(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_identity'):
			from .Identity import IdentityCls
			self._identity = IdentityCls(self._core, self._cmd_group)
		return self._identity

[docs] def delete(self, component=repcap.Component.Default) -> None: """ ``[SENSe]:FPLan:COMPonent<co>:DELete`` \n Snippet: ``driver.applications.k50Spurious.sense.fplan.component.delete(component = repcap.Component.Default)`` \n Will delete the selected row from the frequency plan. :param component: optional repeated capability selector. Default value: Ix1 (settable in the interface 'Component') """ component_cmd_val = self._cmd_group.get_repcap_cmd_value(component, repcap.Component) self._core.io.write(f'SENSe:FPLan:COMPonent{component_cmd_val}:DELete')
[docs] def delete_with_opc(self, component=repcap.Component.Default, opc_timeout_ms: int = -1) -> None: component_cmd_val = self._cmd_group.get_repcap_cmd_value(component, repcap.Component) """ ``[SENSe]:FPLan:COMPonent<co>:DELete`` \n Snippet: ``driver.applications.k50Spurious.sense.fplan.component.delete_with_opc(component = repcap.Component.Default)`` \n Will delete the selected row from the frequency plan. Same as delete, but waits for the operation to complete before continuing further. Use the RsFsw.utilities.opc_timeout_set() to set the timeout value. :param component: optional repeated capability selector. Default value: Ix1 (settable in the interface 'Component') :param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call. """ self._core.io.write_with_opc(f'SENSe:FPLan:COMPonent{component_cmd_val}:DELete', opc_timeout_ms)
def clone(self) -> 'ComponentCls': """ 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 = ComponentCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group