Source code for rsrtx.Implementations.Search.Result.Limit

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

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

[docs] def set(self, search: str, res_list_lim: int) -> None: """ ``SEARch:RESult:LIMit`` \n Snippet: ``driver.search.result.limit.set(search = 'abc', res_list_lim = 1)`` \n Defines the maximum number of entries in the search result table. :param search: Search definition :param res_list_lim: 1 to 1000 """ param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('res_list_lim', res_list_lim, DataType.Integer)) self._core.io.write_with_opc(f'SEARch:RESult:LIMit {param}'.rstrip())
[docs] def get(self, search: str) -> int: """ ``SEARch:RESult:LIMit`` \n Snippet: ``value: int = driver.search.result.limit.get(search = 'abc')`` \n Defines the maximum number of entries in the search result table. :param search: Search definition :return: res_list_lim: 1 to 1000 """ param = Conversions.value_to_quoted_str(search) response = self._core.io.query_str_with_opc(f'SEARch:RESult:LIMit? {param}') return Conversions.str_to_int(response)