Source code for RsSmw.Implementations.System.Security.Network.State

from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from .....Internal.Types import DataType
from .....Internal.ArgSingleList import ArgSingleList
from .....Internal.ArgSingle import ArgSingle


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class StateCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("state", core, parent)

[docs] def set(self, sec_pass_word: str, lan_stor_state: bool) -> None: """ ``SYSTem:SECurity:NETWork:[STATe]`` \n Snippet: ``driver.system.security.network.state.set(sec_pass_word = 'abc', lan_stor_state = False)`` \n Disables the LAN interface in general, including all services. :param sec_pass_word: string Current security password. The default password is 123456. :param lan_stor_state: 1 | ON | 0| OFF """ param = ArgSingleList().compose_cmd_string(ArgSingle('sec_pass_word', sec_pass_word, DataType.String), ArgSingle('lan_stor_state', lan_stor_state, DataType.Boolean)) self._core.io.write(f'SYSTem:SECurity:NETWork:STATe {param}'.rstrip())
[docs] def get(self) -> bool: """ ``SYSTem:SECurity:NETWork:[STATe]`` \n Snippet: ``value: bool = driver.system.security.network.state.get()`` \n Disables the LAN interface in general, including all services. :return: lan_stor_state: 1 | ON | 0| OFF """ response = self._core.io.query_str(f'SYSTem:SECurity:NETWork:STATe?') return Conversions.str_to_bool(response)