Source code for rsrtx.Implementations.Search.Trigger.Lin.Idor.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
from ...... import repcap


# 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: str, use_identifier: bool, idOr=repcap.IdOr.Default) -> None: """ ``SEARch:TRIGger:LIN:IDOR<*>:ENABle`` \n Snippet: ``driver.search.trigger.lin.idor.enable.set(search = 'abc', use_identifier = False, idOr = repcap.IdOr.Default)`` \n Includes the indicated IDOR address in the 'identifier OR' search. :param use_identifier: OFF | ON :param idOr: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Idor') """ param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('use_identifier', use_identifier, DataType.Boolean)) idOr_cmd_val = self._cmd_group.get_repcap_cmd_value(idOr, repcap.IdOr) self._core.io.write(f'SEARch:TRIGger:LIN:IDOR{idOr_cmd_val}:ENABle {param}'.rstrip())
[docs] def get(self, search: str, idOr=repcap.IdOr.Default) -> bool: """ ``SEARch:TRIGger:LIN:IDOR<*>:ENABle`` \n Snippet: ``value: bool = driver.search.trigger.lin.idor.enable.get(search = 'abc', idOr = repcap.IdOr.Default)`` \n Includes the indicated IDOR address in the 'identifier OR' search. :param idOr: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Idor') :return: use_identifier: OFF | ON """ param = Conversions.value_to_quoted_str(search) idOr_cmd_val = self._cmd_group.get_repcap_cmd_value(idOr, repcap.IdOr) response = self._core.io.query_str(f'SEARch:TRIGger:LIN:IDOR{idOr_cmd_val}:ENABle? {param}') return Conversions.str_to_bool(response)