Source code for rsrtx.Implementations.Zvc.Z.Icurrent.Shunt.Mode

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 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, shunt_mode: enums.ShuntMode, zvcProbe=repcap.ZvcProbe.Default, zvcChannel=repcap.ZvcChannel.Default) -> None: """ ``ZVC:Z<*>:I<*>:SHUNt:MODE`` \n Snippet: ``driver.zvc.z.icurrent.shunt.mode.set(shunt_mode = enums.ShuntMode.EXTShunt, zvcProbe = repcap.ZvcProbe.Default, zvcChannel = repcap.ZvcChannel.Default)`` \n Sets the internal or external shunt mode. :param shunt_mode: INTShunt | EXTShunt :param zvcProbe: optional repeated capability selector. Default value: Ix1 (settable in the interface 'Z') :param zvcChannel: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Icurrent') """ param = Conversions.enum_scalar_to_str(shunt_mode, enums.ShuntMode) zvcProbe_cmd_val = self._cmd_group.get_repcap_cmd_value(zvcProbe, repcap.ZvcProbe) zvcChannel_cmd_val = self._cmd_group.get_repcap_cmd_value(zvcChannel, repcap.ZvcChannel) self._core.io.write_with_opc(f'ZVC:Z{zvcProbe_cmd_val}:I{zvcChannel_cmd_val}:SHUNt:MODE {param}')
# noinspection PyTypeChecker
[docs] def get(self, zvcProbe=repcap.ZvcProbe.Default, zvcChannel=repcap.ZvcChannel.Default) -> enums.ShuntMode: """ ``ZVC:Z<*>:I<*>:SHUNt:MODE`` \n Snippet: ``value: enums.ShuntMode = driver.zvc.z.icurrent.shunt.mode.get(zvcProbe = repcap.ZvcProbe.Default, zvcChannel = repcap.ZvcChannel.Default)`` \n Sets the internal or external shunt mode. :param zvcProbe: optional repeated capability selector. Default value: Ix1 (settable in the interface 'Z') :param zvcChannel: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Icurrent') :return: shunt_mode: INTShunt | EXTShunt """ zvcProbe_cmd_val = self._cmd_group.get_repcap_cmd_value(zvcProbe, repcap.ZvcProbe) zvcChannel_cmd_val = self._cmd_group.get_repcap_cmd_value(zvcChannel, repcap.ZvcChannel) response = self._core.io.query_str_with_opc(f'ZVC:Z{zvcProbe_cmd_val}:I{zvcChannel_cmd_val}:SHUNt:MODE?') return Conversions.str_to_scalar_enum(response, enums.ShuntMode)