Source code for rsrtx.Implementations.Power.Soa.Logarithmic.Point.Current

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


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

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

[docs] def set(self, amp: float, powerPoint=repcap.PowerPoint.Default) -> None: """ ``POWer:SOA:LOGarithmic:POINt<*>:CURRent`` \n Snippet: ``driver.power.soa.logarithmic.point.current.set(amp = 1.0, powerPoint = repcap.PowerPoint.Default)`` \n Sets the current value for the respective point. :param amp: 0.01 to 1000 :param powerPoint: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Point') """ param = Conversions.decimal_value_to_str(amp) powerPoint_cmd_val = self._cmd_group.get_repcap_cmd_value(powerPoint, repcap.PowerPoint) self._core.io.write(f'POWer:SOA:LOGarithmic:POINt{powerPoint_cmd_val}:CURRent {param}')
[docs] def get(self, powerPoint=repcap.PowerPoint.Default) -> float: """ ``POWer:SOA:LOGarithmic:POINt<*>:CURRent`` \n Snippet: ``value: float = driver.power.soa.logarithmic.point.current.get(powerPoint = repcap.PowerPoint.Default)`` \n Sets the current value for the respective point. :param powerPoint: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Point') :return: amp: 0.01 to 1000 """ powerPoint_cmd_val = self._cmd_group.get_repcap_cmd_value(powerPoint, repcap.PowerPoint) response = self._core.io.query_str(f'POWer:SOA:LOGarithmic:POINt{powerPoint_cmd_val}:CURRent?') return Conversions.str_to_float(response)