Source code for rsrtx.Implementations.Search.Trigger.Can.Fdata.Brs

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

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

[docs] def set(self, search: str, brs_bit: enums.BusBitCondition) -> None: """ ``SEARch:TRIGger:CAN:FDATa:BRS`` \n Snippet: ``driver.search.trigger.can.fdata.brs.set(search = 'abc', brs_bit = enums.BusBitCondition.DC)`` \n Sets the bit rate switching bit for identifier and identifier + data searches. The setting is available in CAN FD option R&S RTP-K9. :param search: String with the search name :param brs_bit: DC: Don't care """ param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('brs_bit', brs_bit, DataType.Enum, enums.BusBitCondition)) self._core.io.write(f'SEARch:TRIGger:CAN:FDATa:BRS {param}'.rstrip())
# noinspection PyTypeChecker
[docs] def get(self, search: str) -> enums.BusBitCondition: """ ``SEARch:TRIGger:CAN:FDATa:BRS`` \n Snippet: ``value: enums.BusBitCondition = driver.search.trigger.can.fdata.brs.get(search = 'abc')`` \n Sets the bit rate switching bit for identifier and identifier + data searches. The setting is available in CAN FD option R&S RTP-K9. :param search: String with the search name :return: brs_bit: DC: Don't care """ param = Conversions.value_to_quoted_str(search) response = self._core.io.query_str(f'SEARch:TRIGger:CAN:FDATa:BRS? {param}') return Conversions.str_to_scalar_enum(response, enums.BusBitCondition)