from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from ....Internal.Utilities import trim_str_response
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class PasswordCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("password", core, parent)
[docs]
def set(self, password: str) -> None:
"""
``SYSTem:LXI:PASSword`` \n
Snippet: ``driver.system.lxi.password.set(password = 'abc')`` \n
This command defines the 'LAN' password.
:param password: String containing the password.
"""
param = Conversions.value_to_quoted_str(password)
self._core.io.write(f'SYSTem:LXI:PASSword {param}')
[docs]
def get(self) -> str:
"""
``SYSTem:LXI:PASSword`` \n
Snippet: ``value: str = driver.system.lxi.password.get()`` \n
This command defines the 'LAN' password.
:return: password: String containing the password.
"""
response = self._core.io.query_str(f'SYSTem:LXI:PASSword?')
return trim_str_response(response)