Source code for rsrtx.Implementations.Wgenerator.Modulation.Am.Function

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

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

[docs] def set(self, signal_type: enums.WgenModulationFnc, wgenerator=repcap.Wgenerator.Default) -> None: """ ``WGENerator<*>:MODulation:AM[:FUNCtion]`` \n Snippet: ``driver.wgenerator.modulation.am.function.set(signal_type = enums.WgenModulationFnc.RAMP, wgenerator = repcap.Wgenerator.Default)`` \n Sets the type of the modulation signal for the amplitude modulation, if method ``RsRtx.wgenerator.modulation.typePy.set()`` is set to AM. :param signal_type: SINusoid | SQUare | RAMP :param wgenerator: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Wgenerator') """ param = Conversions.enum_scalar_to_str(signal_type, enums.WgenModulationFnc) wgenerator_cmd_val = self._cmd_group.get_repcap_cmd_value(wgenerator, repcap.Wgenerator) self._core.io.write(f'WGENerator{wgenerator_cmd_val}:MODulation:AM:FUNCtion {param}')
# noinspection PyTypeChecker
[docs] def get(self, wgenerator=repcap.Wgenerator.Default) -> enums.WgenModulationFnc: """ ``WGENerator<*>:MODulation:AM[:FUNCtion]`` \n Snippet: ``value: enums.WgenModulationFnc = driver.wgenerator.modulation.am.function.get(wgenerator = repcap.Wgenerator.Default)`` \n Sets the type of the modulation signal for the amplitude modulation, if method ``RsRtx.wgenerator.modulation.typePy.set()`` is set to AM. :param wgenerator: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Wgenerator') :return: signal_type: SINusoid | SQUare | RAMP """ wgenerator_cmd_val = self._cmd_group.get_repcap_cmd_value(wgenerator, repcap.Wgenerator) response = self._core.io.query_str(f'WGENerator{wgenerator_cmd_val}:MODulation:AM:FUNCtion?') return Conversions.str_to_scalar_enum(response, enums.WgenModulationFnc)