Source code for rsmxo.Implementations.Synchronize.Device.Channels

from typing import List

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

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

[docs] def set(self, sources: List[enums.AnalogChannels], device=repcap.Device.Default) -> None: """ ``SYNChronize:DEVice<*>:CHANnels`` \n Snippet: ``driver.synchronize.device.channels.set(sources = [AnalogChannels.C1, AnalogChannels.C8], device = repcap.Device.Default)`` \n Selects the channels of scope 2 to be synchronized, displayed and analyzed. You can select active and inactive channels. :param sources: C1,C2,C3,C4,C5,C6,C7,C8 :param device: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Device') """ param = Conversions.enum_list_to_str(sources, enums.AnalogChannels) device_cmd_val = self._cmd_group.get_repcap_cmd_value(device, repcap.Device) self._core.io.write(f'SYNChronize:DEVice{device_cmd_val}:CHANnels {param}')
# noinspection PyTypeChecker
[docs] def get(self, device=repcap.Device.Default) -> List[enums.AnalogChannels]: """ ``SYNChronize:DEVice<*>:CHANnels`` \n Snippet: ``value: List[enums.AnalogChannels] = driver.synchronize.device.channels.get(device = repcap.Device.Default)`` \n Selects the channels of scope 2 to be synchronized, displayed and analyzed. You can select active and inactive channels. :param device: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Device') :return: sources: C1,C2,C3,C4,C5,C6,C7,C8 """ device_cmd_val = self._cmd_group.get_repcap_cmd_value(device, repcap.Device) response = self._core.io.query_str(f'SYNChronize:DEVice{device_cmd_val}:CHANnels?') return Conversions.str_to_list_enum(response, enums.AnalogChannels)