from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class CurrentCls:
"""
| Commands in total: 4
| Subgroups: 0
| Direct child commands: 4
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("current", core, parent)
[docs]
def get_rms(self) -> float:
"""
``POWer:QUALity:RESult:CURRent:RMS`` \n
Snippet: ``value: float = driver.power.quality.result.current.get_rms()`` \n
Returns the value of the respective result.
:return: current_rms: Depends on the measured quantity.
"""
response = self._core.io.query_str('POWer:QUALity:RESult:CURRent:RMS?')
return Conversions.str_to_float(response)
[docs]
def get_peak(self) -> float:
"""
``POWer:QUALity:RESult:CURRent:PEAK`` \n
Snippet: ``value: float = driver.power.quality.result.current.get_peak()`` \n
Returns the value of the respective result.
:return: current_peak: Depends on the measured quantity.
"""
response = self._core.io.query_str('POWer:QUALity:RESult:CURRent:PEAK?')
return Conversions.str_to_float(response)
[docs]
def get_crest_factor(self) -> float:
"""
``POWer:QUALity:RESult:CURRent:CREStfactor`` \n
Snippet: ``value: float = driver.power.quality.result.current.get_crest_factor()`` \n
Returns the value of the respective result.
:return: current_crest_fact: Depends on the measured quantity.
"""
response = self._core.io.query_str('POWer:QUALity:RESult:CURRent:CREStfactor?')
return Conversions.str_to_float(response)
[docs]
def get_frequency(self) -> float:
"""
``POWer:QUALity:RESult:CURRent:FREQuency`` \n
Snippet: ``value: float = driver.power.quality.result.current.get_frequency()`` \n
Returns the value of the respective result.
:return: current_freq: Depends on the measured quantity.
"""
response = self._core.io.query_str('POWer:QUALity:RESult:CURRent:FREQuency?')
return Conversions.str_to_float(response)