Source code for RsFsw.Implementations.Applications.K149_Uwb.Calculate.Limit.Espectrum.Pclass.Maximum

from ........Internal.Core import Core
from ........Internal.CommandsGroup import CommandsGroup
from ........Internal import Conversions
from ........ import repcap


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

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

[docs] def set(self, max_py: float, window=repcap.Window.Default, limitIx=repcap.LimitIx.Default, powerClass=repcap.PowerClass.Default) -> None: """ ``CALCulate<n>:LIMit<li>:ESPectrum:PCLass<pc>:MAXimum`` \n Snippet: ``driver.applications.k149Uwb.calculate.limit.espectrum.pclass.maximum.set(max_py = 1.0, window = repcap.Window.Default, limitIx = repcap.LimitIx.Default, powerClass = repcap.PowerClass.Default)`` \n Defines the upper limit of a particular power class. Note: \n - The last power class always has an upper limit of 200 dBm. - The upper limit of a power class must always be the same as the lower limit of the subsequent power class. - The power class must already exist (see method ``RsFsw.calculate.limit.espectrum.pclass.count.set()`` ) . :param window: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Calculate') :param limitIx: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Limit') :param powerClass: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Pclass') """ param = Conversions.decimal_value_to_str(max_py) window_cmd_val = self._cmd_group.get_repcap_cmd_value(window, repcap.Window) limitIx_cmd_val = self._cmd_group.get_repcap_cmd_value(limitIx, repcap.LimitIx) powerClass_cmd_val = self._cmd_group.get_repcap_cmd_value(powerClass, repcap.PowerClass) self._core.io.write(f'CALCulate{window_cmd_val}:LIMit{limitIx_cmd_val}:ESPectrum:PCLass{powerClass_cmd_val}:MAXimum {param}')
[docs] def get(self, window=repcap.Window.Default, limitIx=repcap.LimitIx.Default, powerClass=repcap.PowerClass.Default) -> float: """ ``CALCulate<n>:LIMit<li>:ESPectrum:PCLass<pc>:MAXimum`` \n Snippet: ``value: float = driver.applications.k149Uwb.calculate.limit.espectrum.pclass.maximum.get(window = repcap.Window.Default, limitIx = repcap.LimitIx.Default, powerClass = repcap.PowerClass.Default)`` \n Defines the upper limit of a particular power class. Note: \n - The last power class always has an upper limit of 200 dBm. - The upper limit of a power class must always be the same as the lower limit of the subsequent power class. - The power class must already exist (see method ``RsFsw.calculate.limit.espectrum.pclass.count.set()`` ) . :param window: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Calculate') :param limitIx: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Limit') :param powerClass: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Pclass') """ window_cmd_val = self._cmd_group.get_repcap_cmd_value(window, repcap.Window) limitIx_cmd_val = self._cmd_group.get_repcap_cmd_value(limitIx, repcap.LimitIx) powerClass_cmd_val = self._cmd_group.get_repcap_cmd_value(powerClass, repcap.PowerClass) response = self._core.io.query_str(f'CALCulate{window_cmd_val}:LIMit{limitIx_cmd_val}:ESPectrum:PCLass{powerClass_cmd_val}:MAXimum?') return Conversions.str_to_float(response)