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
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class SdmxCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("sdmx", core, parent)
[docs]
def set(self, search: str, sm_data_pattern_to: int) -> None:
"""
``SEARch:TRIGger:SENT:SDMX`` \n
Snippet: ``driver.search.trigger.sent.sdmx.set(search = 'abc', sm_data_pattern_to = 1)`` \n
Sets the end value of an identifier range for SEARch:TRIGger:SENT:SDCN INRange or OORange INRange or OORange.
:param sm_data_pattern_to: Numeric or string pattern, 'Bit pattern parameter'. The string parameter accepts the bit value X (don't care) .
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('sm_data_pattern_to', sm_data_pattern_to, DataType.Integer))
self._core.io.write(f'SEARch:TRIGger:SENT:SDMX {param}'.rstrip())
[docs]
def get(self, search: str) -> int:
"""
``SEARch:TRIGger:SENT:SDMX`` \n
Snippet: ``value: int = driver.search.trigger.sent.sdmx.get(search = 'abc')`` \n
Sets the end value of an identifier range for SEARch:TRIGger:SENT:SDCN INRange or OORange INRange or OORange.
:return: sm_data_pattern_to: Numeric or string pattern, 'Bit pattern parameter'. The string parameter accepts the bit value X (don't care) .
"""
param = Conversions.value_to_quoted_str(search)
response = self._core.io.query_str(f'SEARch:TRIGger:SENT:SDMX? {param}')
return Conversions.str_to_int(response)