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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class Paste:
	"""Paste commands group definition. 1 total commands, 0 Sub-groups, 1 group commands"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._base = CommandsGroup("paste", core, parent)

	def set(self, commandBlock=repcap.CommandBlock.Default) -> None:
		"""SCPI: [SOURce<HW>]:BB:NFC:CBLock<CH>:PASTe \n
		Snippet: driver.source.bb.nfc.cblock.paste.set(commandBlock = repcap.CommandBlock.Default) \n
		Pastes a command block (which was copied before) at the given position into the command sequence. \n
			:param commandBlock: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Cblock')"""
		commandBlock_cmd_val = self._base.get_repcap_cmd_value(commandBlock, repcap.CommandBlock)
		self._core.io.write(f'SOURce<HwInstance>:BB:NFC:CBLock{commandBlock_cmd_val}:PASTe')

	def set_with_opc(self, commandBlock=repcap.CommandBlock.Default) -> None:
		commandBlock_cmd_val = self._base.get_repcap_cmd_value(commandBlock, repcap.CommandBlock)
		"""SCPI: [SOURce<HW>]:BB:NFC:CBLock<CH>:PASTe \n
		Snippet: driver.source.bb.nfc.cblock.paste.set_with_opc(commandBlock = repcap.CommandBlock.Default) \n
		Pastes a command block (which was copied before) at the given position into the command sequence. \n
		Same as set, but waits for the operation to complete before continuing further. Use the RsSmw.utilities.opc_timeout_set() to set the timeout value. \n
			:param commandBlock: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Cblock')"""
		self._core.io.write_with_opc(f'SOURce<HwInstance>:BB:NFC:CBLock{commandBlock_cmd_val}:PASTe')
