Source code for rsrtx.Implementations.Search.Trigger.Tbto.Error.Fec

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

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

[docs] def set(self, search: str, error_fec: bool) -> None: """ ``SEARch:TRIGger:TBTO:ERRor:FEC`` \n Snippet: ``driver.search.trigger.tbto.error.fec.set(search = 'abc', error_fec = False)`` \n Enables search for RS-FEC errors. :param error_fec: OFF | ON """ param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('error_fec', error_fec, DataType.Boolean)) self._core.io.write(f'SEARch:TRIGger:TBTO:ERRor:FEC {param}'.rstrip())
[docs] def get(self, search: str) -> bool: """ ``SEARch:TRIGger:TBTO:ERRor:FEC`` \n Snippet: ``value: bool = driver.search.trigger.tbto.error.fec.get(search = 'abc')`` \n Enables search for RS-FEC errors. :return: error_fec: OFF | ON """ param = Conversions.value_to_quoted_str(search) response = self._core.io.query_str(f'SEARch:TRIGger:TBTO:ERRor:FEC? {param}') return Conversions.str_to_bool(response)