Source code for rsrtx.Implementations.Search.Trigger.I2C.Dpoperator

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 enums


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

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

[docs] def set(self, search: str, dat_posi_optor: enums.DataIndexOperator) -> None: """ ``SEARch:TRIGger:I2C:DPOPerator`` \n Snippet: ``driver.search.trigger.i2C.dpoperator.set(search = 'abc', dat_posi_optor = enums.DataIndexOperator.ANY)`` \n Sets the operator for the data position. You can defined an exact position, or a position range. """ param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('dat_posi_optor', dat_posi_optor, DataType.Enum, enums.DataIndexOperator)) self._core.io.write(f'SEARch:TRIGger:I2C:DPOPerator {param}'.rstrip())
# noinspection PyTypeChecker
[docs] def get(self, search: str) -> enums.DataIndexOperator: """ ``SEARch:TRIGger:I2C:DPOPerator`` \n Snippet: ``value: enums.DataIndexOperator = driver.search.trigger.i2C.dpoperator.get(search = 'abc')`` \n Sets the operator for the data position. You can defined an exact position, or a position range. :param search: ANY | OFF | EQUal | GETHan | INRange | RANGe \n - ANY = OFF: The position of the required pattern is not relevant. - EQUal | GETHan: Equal, Greater or equal than. These conditions require one data position to be set with SEARch:TRIGger:I2C:DPOSition. - INRange = RANGe: In range: Set the minimum and maximum value of the range with SEARch:TRIGger:I2C:DPOSition and SEARch:TRIGger:I2C:DPTO. """ param = Conversions.value_to_quoted_str(search) response = self._core.io.query_str(f'SEARch:TRIGger:I2C:DPOPerator? {param}') return Conversions.str_to_scalar_enum(response, enums.DataIndexOperator)