Source code for RsFsw.Implementations.System.Option.Trial.State

from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions


# 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, state: bool) -> None: """ ``SYSTem:OPTion:TRIal[:STATe]`` \n Snippet: ``driver.system.option.trial.state.set(state = False)`` \n Determines availability of trial license T0. It is pre-installed at the factory on request. Disabling the license is useful to check operation of the FSW without the trial applications. It does not pause and thus extend the limited time of use for this license. If the trial license is not available (not installed, expired) the command returns an error (E_OPTION_NA) . :param state: ON | OFF | 0 | 1 OFF | 0 Disables the license and thus the use of the trial applications. ON | 1 Enables the use of additional applications for a limited period of time (90 days from factory installation) . They are accessible from the common 'Mode' dialog box (see 'Selecting the operating mode and applications') . """ param = Conversions.bool_to_str(state) self._core.io.write(f'SYSTem:OPTion:TRIal:STATe {param}')
[docs] def get(self) -> bool: """ ``SYSTem:OPTion:TRIal[:STATe]`` \n Snippet: ``value: bool = driver.system.option.trial.state.get()`` \n Determines availability of trial license T0. It is pre-installed at the factory on request. Disabling the license is useful to check operation of the FSW without the trial applications. It does not pause and thus extend the limited time of use for this license. If the trial license is not available (not installed, expired) the command returns an error (E_OPTION_NA) . :return: state: ON | OFF | 0 | 1 OFF | 0 Disables the license and thus the use of the trial applications. ON | 1 Enables the use of additional applications for a limited period of time (90 days from factory installation) . They are accessible from the common 'Mode' dialog box (see 'Selecting the operating mode and applications') . """ response = self._core.io.query_str(f'SYSTem:OPTion:TRIal:STATe?') return Conversions.str_to_bool(response)