Source code for rsrtx.Implementations.Search.Trigger.Milstd.Tpspecifier

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

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

[docs] def set(self, search: str, type_specifier: enums.BusMilstdTypeSpec) -> None: """ ``SEARch:TRIGger:MILStd:TPSPecifier`` \n Snippet: ``driver.search.trigger.milstd.tpspecifier.set(search = 'abc', type_specifier = enums.BusMilstdTypeSpec.ALL)`` \n Sets the sync impulse/ word type to be searched for. :param type_specifier: CSTatus: command/status word """ param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('type_specifier', type_specifier, DataType.Enum, enums.BusMilstdTypeSpec)) self._core.io.write(f'SEARch:TRIGger:MILStd:TPSPecifier {param}'.rstrip())
# noinspection PyTypeChecker
[docs] def get(self, search: str) -> enums.BusMilstdTypeSpec: """ ``SEARch:TRIGger:MILStd:TPSPecifier`` \n Snippet: ``value: enums.BusMilstdTypeSpec = driver.search.trigger.milstd.tpspecifier.get(search = 'abc')`` \n Sets the sync impulse/ word type to be searched for. :return: type_specifier: CSTatus: command/status word """ param = Conversions.value_to_quoted_str(search) response = self._core.io.query_str(f'SEARch:TRIGger:MILStd:TPSPecifier? {param}') return Conversions.str_to_scalar_enum(response, enums.BusMilstdTypeSpec)