Source code for rsrtx.Implementations.Trigger.Cmsb.Advanced.Bit

from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal.Types import DataType
from .....Internal.ArgSingleList import ArgSingleList
from .....Internal.ArgSingle import ArgSingle
from ..... import enums
from ..... import repcap


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class BitCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

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

[docs] def set(self, frame: str, field: str, bit: enums.BusBitCondition, trigger=repcap.Trigger.Default) -> None: """ ``TRIGger<*>:CMSB:ADVanced:BIT`` \n Snippet: ``driver.trigger.cmsb.advanced.bit.set(frame = 'abc', field = 'abc', bit = enums.BusBitCondition.DC, trigger = repcap.Trigger.Default)`` \n Sets the bit state of a field to be triggered on that only consists of one bit. :param bit: ONE | ZERO | DC \n - ONE: 1 - ZERO: 0 - DC: 'Do not care' (DC) = X :param trigger: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger') """ param = ArgSingleList().compose_cmd_string(ArgSingle('frame', frame, DataType.String), ArgSingle('field', field, DataType.String), ArgSingle('bit', bit, DataType.Enum, enums.BusBitCondition)) trigger_cmd_val = self._cmd_group.get_repcap_cmd_value(trigger, repcap.Trigger) self._core.io.write(f'TRIGger{trigger_cmd_val}:CMSB:ADVanced:BIT {param}'.rstrip())