Source code for rsrtx.Implementations.Trigger.AnEdge.Coupling

from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import enums
from .... import repcap


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class CouplingCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

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

[docs] def set(self, extern_ana_usr_cpl: enums.ChannelCoupling, trigger=repcap.Trigger.Default) -> None: """ ``TRIGger<*>:ANEDge:COUPling`` \n Snippet: ``driver.trigger.anEdge.coupling.set(extern_ana_usr_cpl = enums.ChannelCoupling.AC, trigger = repcap.Trigger.Default)`` \n Sets the coupling for the external trigger signal. :param extern_ana_usr_cpl: DC | DCLimit | AC \n - DC: Direct connection with 50 Ω termination, passes both DC and AC components of the trigger signal. - DCLimit: Direct connection with 1 MΩ termination, passes both DC and AC components of the trigger signal. - AC: Connection through DC capacitor, removes DC and very low-frequency components. :param trigger: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger') """ param = Conversions.enum_scalar_to_str(extern_ana_usr_cpl, enums.ChannelCoupling) trigger_cmd_val = self._cmd_group.get_repcap_cmd_value(trigger, repcap.Trigger) self._core.io.write_with_opc(f'TRIGger{trigger_cmd_val}:ANEDge:COUPling {param}')
# noinspection PyTypeChecker
[docs] def get(self, trigger=repcap.Trigger.Default) -> enums.ChannelCoupling: """ ``TRIGger<*>:ANEDge:COUPling`` \n Snippet: ``value: enums.ChannelCoupling = driver.trigger.anEdge.coupling.get(trigger = repcap.Trigger.Default)`` \n Sets the coupling for the external trigger signal. :param trigger: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger') """ trigger_cmd_val = self._cmd_group.get_repcap_cmd_value(trigger, repcap.Trigger) response = self._core.io.query_str_with_opc(f'TRIGger{trigger_cmd_val}:ANEDge:COUPling?') return Conversions.str_to_scalar_enum(response, enums.ChannelCoupling)