Source code for rsmxo.Implementations.Power.Switching.Result.Ton.Power.EvtCount

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


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

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

[docs] def get(self, power=repcap.Power.Default) -> int: """ ``POWer<*>:SWITching:RESult:TON:POWer:EVTCount`` \n Snippet: ``value: int = driver.power.switching.result.ton.power.evtCount.get(power = repcap.Power.Default)`` \n Return the number of calculated measurement results of the selected measurement type if statistics are enabled. :param power: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Power') :return: count: 0 to 4000000000 """ power_cmd_val = self._cmd_group.get_repcap_cmd_value(power, repcap.Power) response = self._core.io.query_str(f'POWer{power_cmd_val}:SWITching:RESult:TON:POWer:EVTCount?') return Conversions.str_to_int(response)