Source code for RsFswp.Implementations.Source.Current.Control.Limit.High

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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
[docs]class HighCls: """High commands group definition. 1 total commands, 0 Subgroups, 1 group commands""" def __init__(self, core: Core, parent): self._core = core self._cmd_group = CommandsGroup("high", core, parent)
[docs] def set(self, current: float, source=repcap.Source.Default) -> None: """SCPI: SOURce:CURRent:CONTrol<1|2>:LIMit:HIGH \n Snippet: driver.source.current.control.limit.high.set(current = 1.0, source = repcap.Source.Default) \n This command returns the maximum current of the Vtune connector. \n :param current: numeric value The return value is always 0.02 A. Unit: A :param source: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Control') """ param = Conversions.decimal_value_to_str(current) source_cmd_val = self._cmd_group.get_repcap_cmd_value(source, repcap.Source) self._core.io.write(f'SOURce:CURRent:CONTrol{source_cmd_val}:LIMit:HIGH {param}')
[docs] def get(self, source=repcap.Source.Default) -> float: """SCPI: SOURce:CURRent:CONTrol<1|2>:LIMit:HIGH \n Snippet: value: float = driver.source.current.control.limit.high.get(source = repcap.Source.Default) \n This command returns the maximum current of the Vtune connector. \n :param source: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Control') :return: current: numeric value The return value is always 0.02 A. Unit: A""" source_cmd_val = self._cmd_group.get_repcap_cmd_value(source, repcap.Source) response = self._core.io.query_str(f'SOURce:CURRent:CONTrol{source_cmd_val}:LIMit:HIGH?') return Conversions.str_to_float(response)