from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class DminCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("dmin", core, parent)
[docs]
def set(self, data_min_pattern: int, trigger=repcap.Trigger.Default, tcondition=repcap.Tcondition.Default) -> None:
"""
``TRIGger<*>:I2S:TCONdition<*>:DMIN`` \n
Snippet: ``driver.trigger.i2S.tcondition.dmin.set(data_min_pattern = 1, trigger = repcap.Trigger.Default, tcondition = repcap.Tcondition.Default)`` \n
Specifies a data pattern, or sets the start value of a data pattern range.
:param data_min_pattern: Numeric pattern in 2's complement format. See also: 'Bit pattern parameter' X bits are not allowed. If the bit string is shorter than the word length, the rightmost bit of the input bit string is aligned to the rightmost (LSB) bit of the word.
:param trigger: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger')
:param tcondition: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Tcondition')
"""
param = Conversions.decimal_value_to_str(data_min_pattern)
trigger_cmd_val = self._cmd_group.get_repcap_cmd_value(trigger, repcap.Trigger)
tcondition_cmd_val = self._cmd_group.get_repcap_cmd_value(tcondition, repcap.Tcondition)
self._core.io.write(f'TRIGger{trigger_cmd_val}:I2S:TCONdition{tcondition_cmd_val}:DMIN {param}')
[docs]
def get(self, trigger=repcap.Trigger.Default, tcondition=repcap.Tcondition.Default) -> int:
"""
``TRIGger<*>:I2S:TCONdition<*>:DMIN`` \n
Snippet: ``value: int = driver.trigger.i2S.tcondition.dmin.get(trigger = repcap.Trigger.Default, tcondition = repcap.Tcondition.Default)`` \n
Specifies a data pattern, or sets the start value of a data pattern range.
:param trigger: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger')
:param tcondition: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Tcondition')
:return: data_min_pattern: Numeric pattern in 2's complement format. See also: 'Bit pattern parameter' X bits are not allowed. If the bit string is shorter than the word length, the rightmost bit of the input bit string is aligned to the rightmost (LSB) bit of the word.
"""
trigger_cmd_val = self._cmd_group.get_repcap_cmd_value(trigger, repcap.Trigger)
tcondition_cmd_val = self._cmd_group.get_repcap_cmd_value(tcondition, repcap.Tcondition)
response = self._core.io.query_str(f'TRIGger{trigger_cmd_val}:I2S:TCONdition{tcondition_cmd_val}:DMIN?')
return Conversions.str_to_int(response)