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 LengthCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("length", core, parent)
[docs]
def set(self, search: str, length_error: bool) -> None:
"""
``SEARch:TRIGger:RFFE:ERRor:LENGth`` \n
Snippet: ``driver.search.trigger.rffe.error.length.set(search = 'abc', length_error = False)`` \n
Enables the search for length errors - when an incorrect length of the command sequence has been found.
:param search: String parameter
:param length_error: OFF | ON
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('length_error', length_error, DataType.Boolean))
self._core.io.write(f'SEARch:TRIGger:RFFE:ERRor:LENGth {param}'.rstrip())
[docs]
def get(self, search: str) -> bool:
"""
``SEARch:TRIGger:RFFE:ERRor:LENGth`` \n
Snippet: ``value: bool = driver.search.trigger.rffe.error.length.get(search = 'abc')`` \n
Enables the search for length errors - when an incorrect length of the command sequence has been found.
:param search: String parameter
:return: length_error: OFF | ON
"""
param = Conversions.value_to_quoted_str(search)
response = self._core.io.query_str(f'SEARch:TRIGger:RFFE:ERRor:LENGth? {param}')
return Conversions.str_to_bool(response)