Source code for rsmxo.Implementations.Trigger.Sbsw.Milstd.Doperator

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

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

[docs] def set(self, frame: str, field: str, operator: enums.OperatorB) -> None: """ ``TRIGger:SBSW:MILStd:DOPerator`` \n Snippet: ``driver.trigger.sbsw.milstd.doperator.set(frame = 'abc', field = 'abc', operator = enums.OperatorB.EQUal)`` \n Sets the operator for the data pattern of the software trigger in the selected field of the selected frame. """ param = ArgSingleList().compose_cmd_string(ArgSingle('frame', frame, DataType.String), ArgSingle('field', field, DataType.String), ArgSingle('operator', operator, DataType.Enum, enums.OperatorB)) self._core.io.write(f'TRIGger:SBSW:MILStd:DOPerator {param}'.rstrip())
# noinspection PyTypeChecker
[docs] def get(self) -> enums.OperatorB: """ ``TRIGger:SBSW:MILStd:DOPerator`` \n Snippet: ``value: enums.OperatorB = driver.trigger.sbsw.milstd.doperator.get()`` \n Sets the operator for the data pattern of the software trigger in the selected field of the selected frame. """ response = self._core.io.query_str(f'TRIGger:SBSW:MILStd:DOPerator?') return Conversions.str_to_scalar_enum(response, enums.OperatorB)