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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class OutputCls:
	"""Output commands group definition. 1 total commands, 0 Subgroups, 1 group commands"""

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

	def set(self, signal_level: enums.SignalLevel) -> None:
		"""SCPI: SOURce:GENerator:PULSe:TRIGger:OUTPut \n
		Snippet: driver.applications.k30NoiseFigure.source.generator.pulse.trigger.output.set(signal_level = enums.SignalLevel.HIGH) \n
		No command help available \n
			:param signal_level: No help available
		"""
		param = Conversions.enum_scalar_to_str(signal_level, enums.SignalLevel)
		self._core.io.write(f'SOURce:GENerator:PULSe:TRIGger:OUTPut {param}')

	# noinspection PyTypeChecker
	def get(self) -> enums.SignalLevel:
		"""SCPI: SOURce:GENerator:PULSe:TRIGger:OUTPut \n
		Snippet: value: enums.SignalLevel = driver.applications.k30NoiseFigure.source.generator.pulse.trigger.output.get() \n
		No command help available \n
			:return: signal_level: No help available"""
		response = self._core.io.query_str(f'SOURce:GENerator:PULSe:TRIGger:OUTPut?')
		return Conversions.str_to_scalar_enum(response, enums.SignalLevel)
