from typing import List

from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class Analyzer:
	"""Analyzer commands group definition. 3 total commands, 2 Sub-groups, 1 group commands"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._base = CommandsGroup("analyzer", core, parent)

	@property
	def enable(self):
		"""enable commands group. 0 Sub-classes, 1 commands."""
		if not hasattr(self, '_enable'):
			from .Enable import Enable
			self._enable = Enable(self._core, self._base)
		return self._enable

	@property
	def execute(self):
		"""execute commands group. 0 Sub-classes, 1 commands."""
		if not hasattr(self, '_execute'):
			from .Execute import Execute
			self._execute = Execute(self._core, self._base)
		return self._execute

	def get_value(self) -> List[float]:
		"""SCPI: SERVice:TIMing:ANALyzer \n
		Snippet: value: List[float] = driver.service.timing.analyzer.get_value() \n
		No command help available \n
			:return: timing_analyzer: No help available
		"""
		response = self._core.io.query_bin_or_ascii_float_list('SERVice:TIMing:ANALyzer?')
		return response

	def clone(self) -> 'Analyzer':
		"""Clones the group by creating new object from it and its whole existing sub-groups
		Also copies all the existing default Repeated Capabilities setting,
		which you can change independently without affecting the original group"""
		new_group = Analyzer(self._core, self._base.parent)
		self._base.synchronize_repcaps(new_group)
		return new_group
