from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from ....Internal.Utilities import trim_str_response
from .... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class LpathCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("lpath", core, parent)
[docs]
def set(self, local_path: str, ndrive=repcap.Ndrive.Default) -> None:
"""
``MMEMory:NDRive<*>:LPATh`` \n
Snippet: ``driver.massMemory.ndrive.lpath.set(local_path = 'abc', ndrive = repcap.Ndrive.Default)`` \n
Sets the local folder on the MXO 5, to which the network folder is mapped. With this name, you can access the connected
folder on the instrument.
:param local_path: String with the path of the local folder
:param ndrive: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Ndrive')
"""
param = Conversions.value_to_quoted_str(local_path)
ndrive_cmd_val = self._cmd_group.get_repcap_cmd_value(ndrive, repcap.Ndrive)
self._core.io.write(f'MMEMory:NDRive{ndrive_cmd_val}:LPATh {param}')
[docs]
def get(self, ndrive=repcap.Ndrive.Default) -> str:
"""
``MMEMory:NDRive<*>:LPATh`` \n
Snippet: ``value: str = driver.massMemory.ndrive.lpath.get(ndrive = repcap.Ndrive.Default)`` \n
Sets the local folder on the MXO 5, to which the network folder is mapped. With this name, you can access the connected
folder on the instrument.
:param ndrive: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Ndrive')
:return: local_path: String with the path of the local folder
"""
ndrive_cmd_val = self._cmd_group.get_repcap_cmd_value(ndrive, repcap.Ndrive)
response = self._core.io.query_str(f'MMEMory:NDRive{ndrive_cmd_val}:LPATh?')
return trim_str_response(response)