Source code for rsrtx.Implementations.Search.Trigger.Ethernet.Frame.Scondition

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 SconditionCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

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

[docs] def set(self, search: str, src_addr_optor: enums.ConditionOperator) -> None: """ ``SEARch:TRIGger:ETHernet:FRAMe:SCONdition`` \n Snippet: ``driver.search.trigger.ethernet.frame.scondition.set(search = 'abc', src_addr_optor = enums.ConditionOperator.EQUal)`` \n Defines the operator to search a specific source address within a frame. :param search: EQUal | NEQual | LTHan | LETHan | GTHan | GETHan | INRange | OORange \n - EQUal | NEQual | LTHan | LETHan | GTHan | GETHan: Equal, Not equal, Less than, Less than or equal, Greater Than, Greater than or equal. These conditions require a destination address to be set with SEARch:TRIGger:ETHernet:FRAMe:SMIN. - INRange | OORange: In range, Out of range. Set the minimum and maximum value of the range with SEARch:TRIGger:ETHernet:FRAMe:SMIN and SEARch:TRIGger:ETHernet:FRAMe:SMAX. :param src_addr_optor: String parameter """ param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('src_addr_optor', src_addr_optor, DataType.Enum, enums.ConditionOperator)) self._core.io.write(f'SEARch:TRIGger:ETHernet:FRAMe:SCONdition {param}'.rstrip())
# noinspection PyTypeChecker
[docs] def get(self, search: str) -> enums.ConditionOperator: """ ``SEARch:TRIGger:ETHernet:FRAMe:SCONdition`` \n Snippet: ``value: enums.ConditionOperator = driver.search.trigger.ethernet.frame.scondition.get(search = 'abc')`` \n Defines the operator to search a specific source address within a frame. :param search: EQUal | NEQual | LTHan | LETHan | GTHan | GETHan | INRange | OORange \n - EQUal | NEQual | LTHan | LETHan | GTHan | GETHan: Equal, Not equal, Less than, Less than or equal, Greater Than, Greater than or equal. These conditions require a destination address to be set with SEARch:TRIGger:ETHernet:FRAMe:SMIN. - INRange | OORange: In range, Out of range. Set the minimum and maximum value of the range with SEARch:TRIGger:ETHernet:FRAMe:SMIN and SEARch:TRIGger:ETHernet:FRAMe:SMAX. """ param = Conversions.value_to_quoted_str(search) response = self._core.io.query_str(f'SEARch:TRIGger:ETHernet:FRAMe:SCONdition? {param}') return Conversions.str_to_scalar_enum(response, enums.ConditionOperator)