Source code for rsrtx.Implementations.Channel.Overload

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


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

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

[docs] def set(self, overload: bool, channel=repcap.Channel.Default) -> None: """ ``CHANnel<*>:OVERload`` \n Snippet: ``driver.channel.overload.set(overload = False, channel = repcap.Channel.Default)`` \n Retrieves the overload status of the specified channel from the status bit. When the overload problem is solved, the command resets the status bit. The overload status is returned asynchronously. Therefore, it is not possible to assign an overload to a specific acquisition during continuous acquisition. This assignment is only possible for a single acquisition. :param overload: Use OFF to reset the overload status bit. :param channel: optional repeated capability selector. Default value: Ch1 (settable in the interface 'Channel') """ param = Conversions.bool_to_str(overload) channel_cmd_val = self._cmd_group.get_repcap_cmd_value(channel, repcap.Channel) self._core.io.write_with_opc(f'CHANnel{channel_cmd_val}:OVERload {param}')
[docs] def get(self, channel=repcap.Channel.Default) -> bool: """ ``CHANnel<*>:OVERload`` \n Snippet: ``value: bool = driver.channel.overload.get(channel = repcap.Channel.Default)`` \n Retrieves the overload status of the specified channel from the status bit. When the overload problem is solved, the command resets the status bit. The overload status is returned asynchronously. Therefore, it is not possible to assign an overload to a specific acquisition during continuous acquisition. This assignment is only possible for a single acquisition. :param channel: optional repeated capability selector. Default value: Ch1 (settable in the interface 'Channel') :return: overload: Use OFF to reset the overload status bit. """ channel_cmd_val = self._cmd_group.get_repcap_cmd_value(channel, repcap.Channel) response = self._core.io.query_str_with_opc(f'CHANnel{channel_cmd_val}:OVERload?') return Conversions.str_to_bool(response)