Source code for rsrtx.Implementations.Search.Trigger.State.Csource

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 CsourceCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

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

[docs] def set(self, search: str, source: enums.SignalSource) -> None: """ ``SEARch:TRIGger:STATe:CSOurce`` \n Snippet: ``driver.search.trigger.state.csource.set(search = 'abc', source = enums.SignalSource.AJ1)`` \n Sets the source of the clock signal. :param search: String with the name of the search :param source: C1W1 | C2W1 | C3W1 | C4W1 | M1 | M2 | M3 | M4 | M5 | M6 | M7 | M8 | R1 | R2 | R3 | R4 | D0 | D1 | D2 | D3 | D4 | D5 | D6 | D7 | D8 | D9 | D10 | D11 | D12 | D13 | D14 | D15 """ param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('source', source, DataType.Enum, enums.SignalSource)) self._core.io.write_with_opc(f'SEARch:TRIGger:STATe:CSOurce {param}'.rstrip())
# noinspection PyTypeChecker
[docs] def get(self, search: str) -> enums.SignalSource: """ ``SEARch:TRIGger:STATe:CSOurce`` \n Snippet: ``value: enums.SignalSource = driver.search.trigger.state.csource.get(search = 'abc')`` \n Sets the source of the clock signal. :param search: String with the name of the search :return: source: C1W1 | C2W1 | C3W1 | C4W1 | M1 | M2 | M3 | M4 | M5 | M6 | M7 | M8 | R1 | R2 | R3 | R4 | D0 | D1 | D2 | D3 | D4 | D5 | D6 | D7 | D8 | D9 | D10 | D11 | D12 | D13 | D14 | D15 """ param = Conversions.value_to_quoted_str(search) response = self._core.io.query_str_with_opc(f'SEARch:TRIGger:STATe:CSOurce? {param}') return Conversions.str_to_scalar_enum(response, enums.SignalSource)