Source code for RsFsw.Implementations.System.Channel.Mode

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


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

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

[docs] def set(self, settings_mode: enums.ChannelSettingsMode) -> None: """ ``SYSTem:CHANnel:MODE`` \n Snippet: ``driver.system.channel.mode.set(settings_mode = enums.ChannelSettingsMode.CSETting)`` \n Determines which parameters are used when you create a new channel. :param settings_mode: CSETting | PRESet CSETting (Default:) The general firmware parameters of the currently active channel are copied to the new channel. PRESet The default settings for the selected channel type are used for the new channel. This setting has the same effect as performing a channel preset for the new channel. """ param = Conversions.enum_scalar_to_str(settings_mode, enums.ChannelSettingsMode) self._core.io.write(f'SYSTem:CHANnel:MODE {param}')
# noinspection PyTypeChecker
[docs] def get(self) -> enums.ChannelSettingsMode: """ ``SYSTem:CHANnel:MODE`` \n Snippet: ``value: enums.ChannelSettingsMode = driver.system.channel.mode.get()`` \n Determines which parameters are used when you create a new channel. :return: settings_mode: CSETting | PRESet CSETting (Default:) The general firmware parameters of the currently active channel are copied to the new channel. PRESet The default settings for the selected channel type are used for the new channel. This setting has the same effect as performing a channel preset for the new channel. """ response = self._core.io.query_str(f'SYSTem:CHANnel:MODE?') return Conversions.str_to_scalar_enum(response, enums.ChannelSettingsMode)