Source code for rsrtx.Implementations.Probe.Setup.LaState

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


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

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

	# noinspection PyTypeChecker
[docs] def get(self, probe=repcap.Probe.Default) -> enums.ProbeLaserState: """ ``PROBe<*>:SETup:LASTate`` \n Snippet: ``value: enums.ProbeLaserState = driver.probe.setup.laState.get(probe = repcap.Probe.Default)`` \n Returns the current status of the laser. :param probe: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Probe') :return: laser_state: GOOD | WARNing | CRITical \n - GOOD: The laser is working. - WARNing: The laser needs service, but is still working. - CRITical: Defective laser, send to your Rohde & Schwarz service center. """ probe_cmd_val = self._cmd_group.get_repcap_cmd_value(probe, repcap.Probe) response = self._core.io.query_str_with_opc(f'PROBe{probe_cmd_val}:SETup:LASTate?') return Conversions.str_to_scalar_enum(response, enums.ProbeLaserState)