Source code for rsmxo.Implementations.Power.Quality.Result.Current.CrestFactor.WfmCount

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


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

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

[docs] def get(self, power=repcap.Power.Default) -> int: """ ``POWer<*>:QUALity:RESult:CURRent:CREStfactor:WFMCount`` \n Snippet: ``value: int = driver.power.quality.result.current.crestFactor.wfmCount.get(power = repcap.Power.Default)`` \n Returns the current crest factor, the Peak value / RMS value for the power quality analysis. For details on the statistics, see 'Overview of statistic results'. :param power: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Power') :return: waveforms_count: -1E+26 to 1E+26 """ power_cmd_val = self._cmd_group.get_repcap_cmd_value(power, repcap.Power) response = self._core.io.query_str(f'POWer{power_cmd_val}:QUALity:RESult:CURRent:CREStfactor:WFMCount?') return Conversions.str_to_int(response)