Source code for RsSmw.Implementations.System.Identification

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


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

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

[docs] def preset(self) -> None: """ ``SYSTem:IDENtification:PRESet`` \n Snippet: ``driver.system.identification.preset()`` \n Sets the ``*IDN`` and ``*OPT`` strings in user defined mode to default values. """ self._core.io.write(f'SYSTem:IDENtification:PRESet')
[docs] def preset_with_opc(self, opc_timeout_ms: int = -1) -> None: """ ``SYSTem:IDENtification:PRESet`` \n Snippet: ``driver.system.identification.preset_with_opc()`` \n Sets the ``*IDN`` and ``*OPT`` strings in user defined mode to default values. Same as preset, but waits for the operation to complete before continuing further. Use the RsSmw.utilities.opc_timeout_set() to set the timeout value. :param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call. """ self._core.io.write_with_opc(f'SYSTem:IDENtification:PRESet', opc_timeout_ms)
# noinspection PyTypeChecker
[docs] def get_value(self) -> enums.AutoUser: """ ``SYSTem:IDENtification`` \n Snippet: ``value: enums.AutoUser = driver.system.identification.get_value()`` \n Selects the mode to determine the 'IDN String' and the 'OPT String' for the instrument, selected with command method ``RsSmw.system.language()`` . Note: While working in an emulation mode, the R&S SMW200A specific command set is disabled, that is, the SCPI command method ``RsSmw.system.identification.value()`` is discarded. :return: identification: AUTO | USER AUTO Automatically determines the strings. USER User-defined strings can be selected. """ response = self._core.io.query_str('SYSTem:IDENtification?') return Conversions.str_to_scalar_enum(response, enums.AutoUser)
[docs] def set_value(self, identification: enums.AutoUser) -> None: """ ``SYSTem:IDENtification`` \n Snippet: ``driver.system.identification.set_value(identification = enums.AutoUser.AUTO)`` \n Selects the mode to determine the 'IDN String' and the 'OPT String' for the instrument, selected with command method ``RsSmw.system.language()`` . Note: While working in an emulation mode, the R&S SMW200A specific command set is disabled, that is, the SCPI command method ``RsSmw.system.identification.value()`` is discarded. :param identification: AUTO | USER AUTO Automatically determines the strings. USER User-defined strings can be selected. """ param = Conversions.enum_scalar_to_str(identification, enums.AutoUser) self._core.io.write(f'SYSTem:IDENtification {param}')