from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class PwordCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("pword", core, parent)
[docs]
def set(self, password: str, ndrive=repcap.Ndrive.Default) -> None:
"""
``MMEMory:NDRive<*>:PWORd`` \n
Snippet: ``driver.massMemory.ndrive.pword.set(password = 'abc', ndrive = repcap.Ndrive.Default)`` \n
Sets the password that is used to access the network folder. Note that the SCPI protocol is NOT encrypted, so the
password can be read on the network. Use the password at your own risk.
:param password: String with the password
:param ndrive: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Ndrive')
"""
param = Conversions.value_to_quoted_str(password)
ndrive_cmd_val = self._cmd_group.get_repcap_cmd_value(ndrive, repcap.Ndrive)
self._core.io.write(f'MMEMory:NDRive{ndrive_cmd_val}:PWORd {param}')