Source code for RsSmw.Implementations.Output.Protection

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


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

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

[docs] def clear(self) -> None: """ ``OUTPut<HW>:PROTection:CLEar`` \n Snippet: ``driver.output.protection.clear()`` \n Resets the protective circuit after it has been tripped. To define the output state, use the command method ``RsSmw.output.state.value()`` . """ self._core.io.write(f'OUTPut<HwInstance>:PROTection:CLEar')
[docs] def clear_with_opc(self, opc_timeout_ms: int = -1) -> None: """ ``OUTPut<HW>:PROTection:CLEar`` \n Snippet: ``driver.output.protection.clear_with_opc()`` \n Resets the protective circuit after it has been tripped. To define the output state, use the command method ``RsSmw.output.state.value()`` . Same as clear, 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'OUTPut<HwInstance>:PROTection:CLEar', opc_timeout_ms)
[docs] def get_state(self) -> bool: """ ``OUTPut<HW>:PROTection:STATe`` \n Snippet: ``value: bool = driver.output.protection.get_state()`` \n Attenuates the RF output signal for about 40 dB to protect external devices against internal signals. :return: state: 1 | ON | 0| OFF """ response = self._core.io.query_str('OUTPut<HwInstance>:PROTection:STATe?') return Conversions.str_to_bool(response)
[docs] def set_state(self, state: bool) -> None: """ ``OUTPut<HW>:PROTection:STATe`` \n Snippet: ``driver.output.protection.set_state(state = False)`` \n Attenuates the RF output signal for about 40 dB to protect external devices against internal signals. :param state: 1 | ON | 0| OFF """ param = Conversions.bool_to_str(state) self._core.io.write(f'OUTPut<HwInstance>:PROTection:STATe {param}')
[docs] def get_tripped(self) -> bool: """ ``OUTPut<HW>:PROTection:TRIPped`` \n Snippet: ``value: bool = driver.output.protection.get_tripped()`` \n Queries the state of the protective circuit. :return: tripped: 1 | ON | 0| OFF """ response = self._core.io.query_str('OUTPut<HwInstance>:PROTection:TRIPped?') return Conversions.str_to_bool(response)