Source code for rsrtx.Implementations.Search.Trigger.Lin.Border

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

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

[docs] def set(self, search: str, endianness: enums.Endianness) -> None: """ ``SEARch:TRIGger:LIN:BORDer`` \n Snippet: ``driver.search.trigger.lin.border.set(search = 'abc', endianness = enums.Endianness.BENDian)`` \n Sets the byte order (endianness) of the data transfer. :param endianness: BENDian | LENDian \n - BENDian: Big endian, data is analyzed and evaluated in the order of reception. - LENDian: Little endian, the instrument reads the complete data, reverses the byte order of the data, and compares it with the specified data word. """ param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('endianness', endianness, DataType.Enum, enums.Endianness)) self._core.io.write(f'SEARch:TRIGger:LIN:BORDer {param}'.rstrip())
# noinspection PyTypeChecker
[docs] def get(self, search: str) -> enums.Endianness: """ ``SEARch:TRIGger:LIN:BORDer`` \n Snippet: ``value: enums.Endianness = driver.search.trigger.lin.border.get(search = 'abc')`` \n Sets the byte order (endianness) of the data transfer. :return: endianness: BENDian | LENDian \n - BENDian: Big endian, data is analyzed and evaluated in the order of reception. - LENDian: Little endian, the instrument reads the complete data, reverses the byte order of the data, and compares it with the specified data word. """ param = Conversions.value_to_quoted_str(search) response = self._core.io.query_str(f'SEARch:TRIGger:LIN:BORDer? {param}') return Conversions.str_to_scalar_enum(response, enums.Endianness)