Source code for rsrtx.Implementations.Search.Trigger.State.B.Enable

from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ......Internal.Types import DataType
from ......Internal.ArgSingleList import ArgSingleList
from ......Internal.ArgSingle import ArgSingle


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

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

[docs] def set(self, search_name: str, state: bool) -> None: """ ``SEARch:TRIGger:STATe:B[:ENABle]`` \n Snippet: ``driver.search.trigger.state.b.enable.set(search_name = 'abc', state = False)`` \n Enables the channel to be considered in the state search. You can enable all channel signals except for the trigger source. Defines the logical combination of the indicated channels after evaluating the previous logical operations: \n - A[:ENABle]: CH1 - B[:ENABle]: CH2 - C[:ENABle]: CH3 - D[:ENABle]: CH4 Digital channels are not available. :param search_name: String with the name of the search :param state: OFF | ON """ param = ArgSingleList().compose_cmd_string(ArgSingle('search_name', search_name, DataType.String), ArgSingle('state', state, DataType.Boolean)) self._core.io.write_with_opc(f'SEARch:TRIGger:STATe:B:ENABle {param}'.rstrip())
[docs] def get(self, search_name: str) -> bool: """ ``SEARch:TRIGger:STATe:B[:ENABle]`` \n Snippet: ``value: bool = driver.search.trigger.state.b.enable.get(search_name = 'abc')`` \n Enables the channel to be considered in the state search. You can enable all channel signals except for the trigger source. Defines the logical combination of the indicated channels after evaluating the previous logical operations: \n - A[:ENABle]: CH1 - B[:ENABle]: CH2 - C[:ENABle]: CH3 - D[:ENABle]: CH4 Digital channels are not available. :param search_name: String with the name of the search :return: state: OFF | ON """ param = Conversions.value_to_quoted_str(search_name) response = self._core.io.query_str_with_opc(f'SEARch:TRIGger:STATe:B:ENABle? {param}') return Conversions.str_to_bool(response)