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 CedgeCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("cedge", core, parent)
[docs]
def set(self, search: str, clock_edge: enums.Edge) -> None:
"""
``SEARch:TRIGger:STATe:CEDGe`` \n
Snippet: ``driver.search.trigger.state.cedge.set(search = 'abc', clock_edge = enums.Edge.EITHer)`` \n
Sets the trigger edge of the clock signal.
:param search: String with the name of the search
:param clock_edge: POSitive | NEGative | EITHer
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('clock_edge', clock_edge, DataType.Enum, enums.Edge))
self._core.io.write_with_opc(f'SEARch:TRIGger:STATe:CEDGe {param}'.rstrip())
# noinspection PyTypeChecker
[docs]
def get(self, search: str) -> enums.Edge:
"""
``SEARch:TRIGger:STATe:CEDGe`` \n
Snippet: ``value: enums.Edge = driver.search.trigger.state.cedge.get(search = 'abc')`` \n
Sets the trigger edge of the clock signal.
:param search: String with the name of the search
:return: clock_edge: POSitive | NEGative | EITHer
"""
param = Conversions.value_to_quoted_str(search)
response = self._core.io.query_str_with_opc(f'SEARch:TRIGger:STATe:CEDGe? {param}')
return Conversions.str_to_scalar_enum(response, enums.Edge)