from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class SubtrahendCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("subtrahend", core, parent)
[docs]
def set(self, subtrahend: float) -> None:
"""
``[SENSe]:PMETer:MATH:SUBTrahend`` \n
Snippet: ``driver.sense.pmeter.math.subtrahend.set(subtrahend = 1.0)`` \n
Defines the subtrahend for power sensor math (<Sensor B> in <Sensor A> - <Sensor B>) .
:param subtrahend: 1 | 2 | 3 | 4
"""
param = Conversions.decimal_value_to_str(subtrahend)
self._core.io.write(f'SENSe:PMETer:MATH:SUBTrahend {param}')
[docs]
def get(self) -> float:
"""
``[SENSe]:PMETer:MATH:SUBTrahend`` \n
Snippet: ``value: float = driver.sense.pmeter.math.subtrahend.get()`` \n
Defines the subtrahend for power sensor math (<Sensor B> in <Sensor A> - <Sensor B>) .
:return: subtrahend: 1 | 2 | 3 | 4
"""
response = self._core.io.query_str(f'SENSe:PMETer:MATH:SUBTrahend?')
return Conversions.str_to_float(response)