Source code for RsCMPX_NrFr1Meas.Implementations.Configure.NrSubMeas.Srs

from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import enums


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class SrsCls:
	"""
	| Commands in total: 32
	| Subgroups: 6
	| Direct child commands: 7
	"""

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

	@property
	def sresource(self):
		"""
		| Commands in total: 7
		| Subgroups: 7
		| Direct child commands: 0
		"""
		if not hasattr(self, '_sresource'):
			from .Sresource import SresourceCls
			self._sresource = SresourceCls(self._core, self._cmd_group)
		return self._sresource

	@property
	def modulation(self):
		"""
		| Commands in total: 3
		| Subgroups: 1
		| Direct child commands: 2
		"""
		if not hasattr(self, '_modulation'):
			from .Modulation import ModulationCls
			self._modulation = ModulationCls(self._core, self._cmd_group)
		return self._modulation

	@property
	def pdynamics(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_pdynamics'):
			from .Pdynamics import PdynamicsCls
			self._pdynamics = PdynamicsCls(self._core, self._cmd_group)
		return self._pdynamics

	@property
	def scount(self):
		"""
		| Commands in total: 2
		| Subgroups: 0
		| Direct child commands: 2
		"""
		if not hasattr(self, '_scount'):
			from .Scount import ScountCls
			self._scount = ScountCls(self._core, self._cmd_group)
		return self._scount

	@property
	def result(self):
		"""
		| Commands in total: 3
		| Subgroups: 0
		| Direct child commands: 3
		"""
		if not hasattr(self, '_result'):
			from .Result import ResultCls
			self._result = ResultCls(self._core, self._cmd_group)
		return self._result

	@property
	def limit(self):
		"""
		| Commands in total: 9
		| Subgroups: 4
		| Direct child commands: 1
		"""
		if not hasattr(self, '_limit'):
			from .Limit import LimitCls
			self._limit = LimitCls(self._core, self._cmd_group)
		return self._limit

[docs] def get_timeout(self) -> float: """ ``CONFigure:NRSub:MEASurement<Instance>:SRS:TOUT`` \n Snippet: ``value: float = driver.configure.nrSubMeas.srs.get_timeout()`` \n Defines a timeout for the measurement. The timer is started when the measurement is initiated via a READ or INIT command. It is not started if the measurement is initiated manually. When the measurement has completed the first measurement cycle (first single shot) , the statistical depth is reached and the timer is reset. If the first measurement cycle has not been completed when the timer expires, the measurement is stopped. The measurement state changes to RDY. The reliability indicator is set to 1, indicating that a measurement timeout occurred. Still running READ, FETCh or CALCulate commands are completed, returning the available results. At least for some results, there are no values at all or the statistical depth has not been reached. A timeout of 0 s corresponds to an infinite measurement timeout. :return: timeout: numeric """ response = self._core.io.query_str('CONFigure:NRSub:MEASurement<Instance>:SRS:TOUT?') return Conversions.str_to_float(response)
[docs] def set_timeout(self, timeout: float) -> None: """ ``CONFigure:NRSub:MEASurement<Instance>:SRS:TOUT`` \n Snippet: ``driver.configure.nrSubMeas.srs.set_timeout(timeout = 1.0)`` \n Defines a timeout for the measurement. The timer is started when the measurement is initiated via a READ or INIT command. It is not started if the measurement is initiated manually. When the measurement has completed the first measurement cycle (first single shot) , the statistical depth is reached and the timer is reset. If the first measurement cycle has not been completed when the timer expires, the measurement is stopped. The measurement state changes to RDY. The reliability indicator is set to 1, indicating that a measurement timeout occurred. Still running READ, FETCh or CALCulate commands are completed, returning the available results. At least for some results, there are no values at all or the statistical depth has not been reached. A timeout of 0 s corresponds to an infinite measurement timeout. :param timeout: numeric """ param = Conversions.decimal_value_to_str(timeout) self._core.io.write(f'CONFigure:NRSub:MEASurement<Instance>:SRS:TOUT {param}')
# noinspection PyTypeChecker
[docs] def get_repetition(self) -> enums.Repeat: """ ``CONFigure:NRSub:MEASurement<Instance>:SRS:REPetition`` \n Snippet: ``value: enums.Repeat = driver.configure.nrSubMeas.srs.get_repetition()`` \n Specifies the repetition mode of the measurement. The repetition mode specifies whether the measurement is stopped after a single shot or repeated continuously. Use the CONFigure:...:MEAS<i>:...:SCOunt commands to specify the number of measurement intervals per single shot. :return: repetition: SINGleshot: Single-shot measurement CONTinuous: Continuous measurement """ response = self._core.io.query_str('CONFigure:NRSub:MEASurement<Instance>:SRS:REPetition?') return Conversions.str_to_scalar_enum(response, enums.Repeat)
[docs] def set_repetition(self, repetition: enums.Repeat) -> None: """ ``CONFigure:NRSub:MEASurement<Instance>:SRS:REPetition`` \n Snippet: ``driver.configure.nrSubMeas.srs.set_repetition(repetition = enums.Repeat.CONTinuous)`` \n Specifies the repetition mode of the measurement. The repetition mode specifies whether the measurement is stopped after a single shot or repeated continuously. Use the CONFigure:...:MEAS<i>:...:SCOunt commands to specify the number of measurement intervals per single shot. :param repetition: SINGleshot: Single-shot measurement CONTinuous: Continuous measurement """ param = Conversions.enum_scalar_to_str(repetition, enums.Repeat) self._core.io.write(f'CONFigure:NRSub:MEASurement<Instance>:SRS:REPetition {param}')
# noinspection PyTypeChecker
[docs] def get_scondition(self) -> enums.StopCondition: """ ``CONFigure:NRSub:MEASurement<Instance>:SRS:SCONdition`` \n Snippet: ``value: enums.StopCondition = driver.configure.nrSubMeas.srs.get_scondition()`` \n Qualifies whether the measurement is stopped after a failed limit check or continued. With SLFail, the measurement is stopped and reaches the RDY state when one of the results exceeds the limits. :return: stop_condition: NONE: Continue measurement irrespective of the limit check. SLFail: Stop measurement on limit failure. """ response = self._core.io.query_str('CONFigure:NRSub:MEASurement<Instance>:SRS:SCONdition?') return Conversions.str_to_scalar_enum(response, enums.StopCondition)
[docs] def set_scondition(self, stop_condition: enums.StopCondition) -> None: """ ``CONFigure:NRSub:MEASurement<Instance>:SRS:SCONdition`` \n Snippet: ``driver.configure.nrSubMeas.srs.set_scondition(stop_condition = enums.StopCondition.NONE)`` \n Qualifies whether the measurement is stopped after a failed limit check or continued. With SLFail, the measurement is stopped and reaches the RDY state when one of the results exceeds the limits. :param stop_condition: NONE: Continue measurement irrespective of the limit check. SLFail: Stop measurement on limit failure. """ param = Conversions.enum_scalar_to_str(stop_condition, enums.StopCondition) self._core.io.write(f'CONFigure:NRSub:MEASurement<Instance>:SRS:SCONdition {param}')
[docs] def get_mo_exception(self) -> bool: """ ``CONFigure:NRSub:MEASurement<Instance>:SRS:MOEXception`` \n Snippet: ``value: bool = driver.configure.nrSubMeas.srs.get_mo_exception()`` \n Specifies whether measurement results that the CMP180 identifies as faulty or inaccurate are rejected. :return: meas_on_exception: OFF: Faulty results are rejected. ON: Results are never rejected. """ response = self._core.io.query_str('CONFigure:NRSub:MEASurement<Instance>:SRS:MOEXception?') return Conversions.str_to_bool(response)
[docs] def set_mo_exception(self, meas_on_exception: bool) -> None: """ ``CONFigure:NRSub:MEASurement<Instance>:SRS:MOEXception`` \n Snippet: ``driver.configure.nrSubMeas.srs.set_mo_exception(meas_on_exception = False)`` \n Specifies whether measurement results that the CMP180 identifies as faulty or inaccurate are rejected. :param meas_on_exception: OFF: Faulty results are rejected. ON: Results are never rejected. """ param = Conversions.bool_to_str(meas_on_exception) self._core.io.write(f'CONFigure:NRSub:MEASurement<Instance>:SRS:MOEXception {param}')
[docs] def get_no_resources(self) -> int: """ ``CONFigure:NRSub:MEASurement<Instance>:SRS:NOResources`` \n Snippet: ``value: int = driver.configure.nrSubMeas.srs.get_no_resources()`` \n Configures the number of SRS resources in the measured signal. :return: number_resources: numeric """ response = self._core.io.query_str('CONFigure:NRSub:MEASurement<Instance>:SRS:NOResources?') return Conversions.str_to_int(response)
[docs] def set_no_resources(self, number_resources: int) -> None: """ ``CONFigure:NRSub:MEASurement<Instance>:SRS:NOResources`` \n Snippet: ``driver.configure.nrSubMeas.srs.set_no_resources(number_resources = 1)`` \n Configures the number of SRS resources in the measured signal. :param number_resources: numeric """ param = Conversions.decimal_value_to_str(number_resources) self._core.io.write(f'CONFigure:NRSub:MEASurement<Instance>:SRS:NOResources {param}')
[docs] def get_mresource(self) -> int: """ ``CONFigure:NRSub:MEASurement<Instance>:SRS:MRESource`` \n Snippet: ``value: int = driver.configure.nrSubMeas.srs.get_mresource()`` \n Selects the SRS resource for modulation and power dynamics measurements (for signals with several SRS resources) . :return: meas_resource: numeric """ response = self._core.io.query_str('CONFigure:NRSub:MEASurement<Instance>:SRS:MRESource?') return Conversions.str_to_int(response)
[docs] def set_mresource(self, meas_resource: int) -> None: """ ``CONFigure:NRSub:MEASurement<Instance>:SRS:MRESource`` \n Snippet: ``driver.configure.nrSubMeas.srs.set_mresource(meas_resource = 1)`` \n Selects the SRS resource for modulation and power dynamics measurements (for signals with several SRS resources) . :param meas_resource: numeric """ param = Conversions.decimal_value_to_str(meas_resource) self._core.io.write(f'CONFigure:NRSub:MEASurement<Instance>:SRS:MRESource {param}')
[docs] def get_no_sub_frames(self) -> int: """ ``CONFigure:NRSub:MEASurement<Instance>:SRS:NOSubframes`` \n Snippet: ``value: int = driver.configure.nrSubMeas.srs.get_no_sub_frames()`` \n Configures the number of subframes captured for the power vs symbol result diagram. :return: number_subframes: numeric """ response = self._core.io.query_str('CONFigure:NRSub:MEASurement<Instance>:SRS:NOSubframes?') return Conversions.str_to_int(response)
[docs] def set_no_sub_frames(self, number_subframes: int) -> None: """ ``CONFigure:NRSub:MEASurement<Instance>:SRS:NOSubframes`` \n Snippet: ``driver.configure.nrSubMeas.srs.set_no_sub_frames(number_subframes = 1)`` \n Configures the number of subframes captured for the power vs symbol result diagram. :param number_subframes: numeric """ param = Conversions.decimal_value_to_str(number_subframes) self._core.io.write(f'CONFigure:NRSub:MEASurement<Instance>:SRS:NOSubframes {param}')
def clone(self) -> 'SrsCls': """ Clones the group by creating new object from it and its whole existing subgroups. Also copies all the existing default Repeated Capabilities setting, which you can change independently without affecting the original group. """ new_group = SrsCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group