from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class PowerCls:
"""
| Commands in total: 5
| Subgroups: 0
| Direct child commands: 5
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("power", core, parent)
[docs]
def get_pfactor(self) -> float:
"""
``POWer:QUALity:RESult:POWer:PFACtor`` \n
Snippet: ``value: float = driver.power.quality.result.power.get_pfactor()`` \n
Returns the value of the respective result.
:return: power_factor: Depends on the measured quantity.
"""
response = self._core.io.query_str('POWer:QUALity:RESult:POWer:PFACtor?')
return Conversions.str_to_float(response)
[docs]
def get_phase(self) -> float:
"""
``POWer:QUALity:RESult:POWer:PHASe`` \n
Snippet: ``value: float = driver.power.quality.result.power.get_phase()`` \n
Returns the value of the respective result.
:return: power_phase_angle: Depends on the measured quantity.
"""
response = self._core.io.query_str('POWer:QUALity:RESult:POWer:PHASe?')
return Conversions.str_to_float(response)
[docs]
def get_real_power(self) -> float:
"""
``POWer:QUALity:RESult:POWer:REALpower`` \n
Snippet: ``value: float = driver.power.quality.result.power.get_real_power()`` \n
Returns the value of the respective result.
:return: power_real: Depends on the measured quantity.
"""
response = self._core.io.query_str('POWer:QUALity:RESult:POWer:REALpower?')
return Conversions.str_to_float(response)
[docs]
def get_reactive(self) -> float:
"""
``POWer:QUALity:RESult:POWer:REACtive`` \n
Snippet: ``value: float = driver.power.quality.result.power.get_reactive()`` \n
Returns the value of the respective result.
:return: power_reactive: Depends on the measured quantity.
"""
response = self._core.io.query_str('POWer:QUALity:RESult:POWer:REACtive?')
return Conversions.str_to_float(response)
[docs]
def get_apparent(self) -> float:
"""
``POWer:QUALity:RESult:POWer:APParent`` \n
Snippet: ``value: float = driver.power.quality.result.power.get_apparent()`` \n
Returns the value of the respective result.
:return: power_apparent: Depends on the measured quantity.
"""
response = self._core.io.query_str('POWer:QUALity:RESult:POWer:APParent?')
return Conversions.str_to_float(response)