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 SlopeCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("slope", core, parent)
[docs]
def set(self, search: str, slope: enums.Edge) -> None:
"""
``SEARch:TRIGger:INTerval:SLOPe`` \n
Snippet: ``driver.search.trigger.interval.slope.set(search = 'abc', slope = enums.Edge.EITHer)`` \n
Sets the edge for the search.
:param search: String parameter, name of the search definition
:param slope: See 'Slope parameter'.
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('slope', slope, DataType.Enum, enums.Edge))
self._core.io.write_with_opc(f'SEARch:TRIGger:INTerval:SLOPe {param}'.rstrip())
# noinspection PyTypeChecker
[docs]
def get(self, search: str) -> enums.Edge:
"""
``SEARch:TRIGger:INTerval:SLOPe`` \n
Snippet: ``value: enums.Edge = driver.search.trigger.interval.slope.get(search = 'abc')`` \n
Sets the edge for the search.
:param search: String parameter, name of the search definition
:return: slope: See 'Slope parameter'.
"""
param = Conversions.value_to_quoted_str(search)
response = self._core.io.query_str_with_opc(f'SEARch:TRIGger:INTerval:SLOPe? {param}')
return Conversions.str_to_scalar_enum(response, enums.Edge)