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 SminCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("smin", core, parent)
[docs]
def set(self, search: str, src_addr_patt_min: int) -> None:
"""
``SEARch:TRIGger:ETHernet:FRAMe:SMIN`` \n
Snippet: ``driver.search.trigger.ethernet.frame.smin.set(search = 'abc', src_addr_patt_min = 1)`` \n
Defines a source address, or sets the start value of a source address range.
:param search: String parameter
:param src_addr_patt_min: Numeric or string pattern, see 'Bit pattern parameter'. The string parameter accepts the bit value X (don't care) .
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('src_addr_patt_min', src_addr_patt_min, DataType.Integer))
self._core.io.write(f'SEARch:TRIGger:ETHernet:FRAMe:SMIN {param}'.rstrip())
[docs]
def get(self, search: str) -> int:
"""
``SEARch:TRIGger:ETHernet:FRAMe:SMIN`` \n
Snippet: ``value: int = driver.search.trigger.ethernet.frame.smin.get(search = 'abc')`` \n
Defines a source address, or sets the start value of a source address range.
:param search: String parameter
:return: src_addr_patt_min: Numeric or string pattern, see 'Bit pattern parameter'. The string parameter accepts the bit value X (don't care) .
"""
param = Conversions.value_to_quoted_str(search)
response = self._core.io.query_str(f'SEARch:TRIGger:ETHernet:FRAMe:SMIN? {param}')
return Conversions.str_to_int(response)