from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ...... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class PasteCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("paste", core, parent)
[docs]
def set(self, commandBlock=repcap.CommandBlock.Default) -> None:
"""
``[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.
:param commandBlock: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Cblock')
"""
commandBlock_cmd_val = self._cmd_group.get_repcap_cmd_value(commandBlock, repcap.CommandBlock)
self._core.io.write(f'SOURce<HwInstance>:BB:NFC:CBLock{commandBlock_cmd_val}:PASTe')
[docs]
def set_with_opc(self, commandBlock=repcap.CommandBlock.Default, opc_timeout_ms: int = -1) -> None:
commandBlock_cmd_val = self._cmd_group.get_repcap_cmd_value(commandBlock, repcap.CommandBlock)
"""
``[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.
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.
:param commandBlock: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Cblock')
:param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call.
"""
self._core.io.write_with_opc(f'SOURce<HwInstance>:BB:NFC:CBLock{commandBlock_cmd_val}:PASTe', opc_timeout_ms)