from .......Internal.Core import Core
from .......Internal.CommandsGroup import CommandsGroup
from .......Internal import Conversions
from .......Internal.Types import DataType
from .......Internal.ArgSingleList import ArgSingleList
from .......Internal.ArgSingle import ArgSingle
from ....... import enums


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class TypePy:
	"""TypePy commands group definition. 1 total commands, 0 Sub-groups, 1 group commands"""

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

	def set(self, filter_type: enums.RbwFilterType, standard: enums.Standard = None) -> None:
		"""SCPI: CONFigure:VSE:MEASurement<Instance>:IQRecorder:FILTer:TYPE \n
		Snippet: driver.configure.vse.measurement.iqRecorder.filterPy.typePy.set(filter_type = enums.RbwFilterType.BANDpass, standard = enums.Standard.CUSTom) \n
		Selects or queries the type of filter to be applied to the data after demodulation and the related digital standard. \n
			:param filter_type: BANDpass | GAUSs
			:param standard: DMR | NXDN | P25 | TETRa | LTE | UDEFined
		"""
		param = ArgSingleList().compose_cmd_string(ArgSingle('filter_type', filter_type, DataType.Enum), ArgSingle('standard', standard, DataType.Enum, True))
		self._core.io.write(f'CONFigure:VSE:MEASurement<Instance>:IQRecorder:FILTer:TYPE {param}'.rstrip())

	# noinspection PyTypeChecker
	def get(self) -> enums.RbwFilterType:
		"""SCPI: CONFigure:VSE:MEASurement<Instance>:IQRecorder:FILTer:TYPE \n
		Snippet: value: enums.RbwFilterType = driver.configure.vse.measurement.iqRecorder.filterPy.typePy.get() \n
		Selects or queries the type of filter to be applied to the data after demodulation and the related digital standard. \n
			:return: filter_type: BANDpass | GAUSs"""
		response = self._core.io.query_str(f'CONFigure:VSE:MEASurement<Instance>:IQRecorder:FILTer:TYPE?')
		return Conversions.str_to_scalar_enum(response, enums.RbwFilterType)
