Source code for RsFsw.Implementations.Applications.K30_NoiseFigure.Sense.Sweep.Egate.Polarity

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


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

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

[docs] def set(self, polarity: enums.SlopeType) -> None: """ ``[SENSe]:SWEep:EGATe:POLarity`` \n Snippet: ``driver.applications.k30NoiseFigure.sense.sweep.egate.polarity.set(polarity = enums.SlopeType.NEGative)`` \n Selects the polarity of an external gate signal. The setting applies both to the edge of an edge-triggered signal and the level of a level-triggered signal. :param polarity: POSitive | NEGative """ param = Conversions.enum_scalar_to_str(polarity, enums.SlopeType) self._core.io.write(f'SENSe:SWEep:EGATe:POLarity {param}')
# noinspection PyTypeChecker
[docs] def get(self) -> enums.SlopeType: """ ``[SENSe]:SWEep:EGATe:POLarity`` \n Snippet: ``value: enums.SlopeType = driver.applications.k30NoiseFigure.sense.sweep.egate.polarity.get()`` \n Selects the polarity of an external gate signal. The setting applies both to the edge of an edge-triggered signal and the level of a level-triggered signal. :return: polarity: POSitive | NEGative """ response = self._core.io.query_str(f'SENSe:SWEep:EGATe:POLarity?') return Conversions.str_to_scalar_enum(response, enums.SlopeType)