Source code for rsrtx.Implementations.Measurement

from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal.RepeatedCapability import RepeatedCapability
from ... import repcap


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class MeasurementCls:
	"""
	| Commands in total: 246
	| Subgroups: 36
	| Direct child commands: 1

	Repeated Capability Setting:
	
	.. code-block:: python
	
			# Range: Nr1 .. Nr13 \n
			driver.measurement.repcap_measurement_set(repcap.Measurement.Nr1)
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("measurement", core, parent)
		self._cmd_group.rep_cap = RepeatedCapability(self._cmd_group.group_name, 'repcap_measurement_get', 'repcap_measurement_set', repcap.Measurement.Nr1)

	def repcap_measurement_set(self, measurement: repcap.Measurement) -> None:
		"""
		Repeated Capability default value numeric suffix.
		This value is used, if you do not explicitely set it in the child set/get methods, or if you leave it to Measurement.Default.
		Default value after init: Measurement.Nr1
		"""
		self._cmd_group.set_repcap_enum_value(measurement)

	def repcap_measurement_get(self) -> repcap.Measurement:
		"""
		Returns the current default repeated capability for the child set/get methods.
		"""
		# noinspection PyTypeChecker
		return self._cmd_group.get_repcap_enum_value()

	@property
	def mnoMeas(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_mnoMeas'):
			from .MnoMeas import MnoMeasCls
			self._mnoMeas = MnoMeasCls(self._core, self._cmd_group)
		return self._mnoMeas

	@property
	def additional(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_additional'):
			from .Additional import AdditionalCls
			self._additional = AdditionalCls(self._core, self._cmd_group)
		return self._additional

	@property
	def aoff(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_aoff'):
			from .Aoff import AoffCls
			self._aoff = AoffCls(self._core, self._cmd_group)
		return self._aoff

	@property
	def aon(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_aon'):
			from .Aon import AonCls
			self._aon = AonCls(self._core, self._cmd_group)
		return self._aon

	@property
	def ares(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_ares'):
			from .Ares import AresCls
			self._ares = AresCls(self._core, self._cmd_group)
		return self._ares

	@property
	def arNames(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_arNames'):
			from .ArNames import ArNamesCls
			self._arNames = ArNamesCls(self._core, self._cmd_group)
		return self._arNames

	@property
	def category(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_category'):
			from .Category import CategoryCls
			self._category = CategoryCls(self._core, self._cmd_group)
		return self._category

	@property
	def detThreshold(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_detThreshold'):
			from .DetThreshold import DetThresholdCls
			self._detThreshold = DetThresholdCls(self._core, self._cmd_group)
		return self._detThreshold

	@property
	def enable(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_enable'):
			from .Enable import EnableCls
			self._enable = EnableCls(self._core, self._cmd_group)
		return self._enable

	@property
	def lcheck(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_lcheck'):
			from .Lcheck import LcheckCls
			self._lcheck = LcheckCls(self._core, self._cmd_group)
		return self._lcheck

	@property
	def main(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_main'):
			from .Main import MainCls
			self._main = MainCls(self._core, self._cmd_group)
		return self._main

	@property
	def multiple(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_multiple'):
			from .Multiple import MultipleCls
			self._multiple = MultipleCls(self._core, self._cmd_group)
		return self._multiple

	@property
	def source(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_source'):
			from .Source import SourceCls
			self._source = SourceCls(self._core, self._cmd_group)
		return self._source

	@property
	def envSelect(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_envSelect'):
			from .EnvSelect import EnvSelectCls
			self._envSelect = EnvSelectCls(self._core, self._cmd_group)
		return self._envSelect

	@property
	def fsrc(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_fsrc'):
			from .Fsrc import FsrcCls
			self._fsrc = FsrcCls(self._core, self._cmd_group)
		return self._fsrc

	@property
	def ssrc(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_ssrc'):
			from .Ssrc import SsrcCls
			self._ssrc = SsrcCls(self._core, self._cmd_group)
		return self._ssrc

	@property
	def pamplitude(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_pamplitude'):
			from .Pamplitude import PamplitudeCls
			self._pamplitude = PamplitudeCls(self._core, self._cmd_group)
		return self._pamplitude

	@property
	def peye(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_peye'):
			from .Peye import PeyeCls
			self._peye = PeyeCls(self._core, self._cmd_group)
		return self._peye

	@property
	def ampTime(self):
		"""
		| Commands in total: 37
		| Subgroups: 20
		| Direct child commands: 0
		"""
		if not hasattr(self, '_ampTime'):
			from .AmpTime import AmpTimeCls
			self._ampTime = AmpTimeCls(self._core, self._cmd_group)
		return self._ampTime

	@property
	def jitter(self):
		"""
		| Commands in total: 11
		| Subgroups: 9
		| Direct child commands: 0
		"""
		if not hasattr(self, '_jitter'):
			from .Jitter import JitterCls
			self._jitter = JitterCls(self._core, self._cmd_group)
		return self._jitter

	@property
	def display(self):
		"""
		| Commands in total: 5
		| Subgroups: 5
		| Direct child commands: 0
		"""
		if not hasattr(self, '_display'):
			from .Display import DisplayCls
			self._display = DisplayCls(self._core, self._cmd_group)
		return self._display

	@property
	def optical(self):
		"""
		| Commands in total: 8
		| Subgroups: 3
		| Direct child commands: 0
		"""
		if not hasattr(self, '_optical'):
			from .Optical import OpticalCls
			self._optical = OpticalCls(self._core, self._cmd_group)
		return self._optical

	@property
	def eyeJitter(self):
		"""
		| Commands in total: 29
		| Subgroups: 7
		| Direct child commands: 0
		"""
		if not hasattr(self, '_eyeJitter'):
			from .EyeJitter import EyeJitterCls
			self._eyeJitter = EyeJitterCls(self._core, self._cmd_group)
		return self._eyeJitter

	@property
	def gate(self):
		"""
		| Commands in total: 12
		| Subgroups: 10
		| Direct child commands: 0
		"""
		if not hasattr(self, '_gate'):
			from .Gate import GateCls
			self._gate = GateCls(self._core, self._cmd_group)
		return self._gate

	@property
	def histogram(self):
		"""
		| Commands in total: 8
		| Subgroups: 3
		| Direct child commands: 0
		"""
		if not hasattr(self, '_histogram'):
			from .Histogram import HistogramCls
			self._histogram = HistogramCls(self._core, self._cmd_group)
		return self._histogram

	@property
	def ltMeas(self):
		"""
		| Commands in total: 3
		| Subgroups: 3
		| Direct child commands: 0
		"""
		if not hasattr(self, '_ltMeas'):
			from .LtMeas import LtMeasCls
			self._ltMeas = LtMeasCls(self._core, self._cmd_group)
		return self._ltMeas

	@property
	def track(self):
		"""
		| Commands in total: 4
		| Subgroups: 2
		| Direct child commands: 0
		"""
		if not hasattr(self, '_track'):
			from .Track import TrackCls
			self._track = TrackCls(self._core, self._cmd_group)
		return self._track

	@property
	def onViolation(self):
		"""
		| Commands in total: 8
		| Subgroups: 8
		| Direct child commands: 0
		"""
		if not hasattr(self, '_onViolation'):
			from .OnViolation import OnViolationCls
			self._onViolation = OnViolationCls(self._core, self._cmd_group)
		return self._onViolation

	@property
	def refLevel(self):
		"""
		| Commands in total: 9
		| Subgroups: 1
		| Direct child commands: 0
		"""
		if not hasattr(self, '_refLevel'):
			from .RefLevel import RefLevelCls
			self._refLevel = RefLevelCls(self._core, self._cmd_group)
		return self._refLevel

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

	@property
	def spectrum(self):
		"""
		| Commands in total: 23
		| Subgroups: 8
		| Direct child commands: 0
		"""
		if not hasattr(self, '_spectrum'):
			from .Spectrum import SpectrumCls
			self._spectrum = SpectrumCls(self._core, self._cmd_group)
		return self._spectrum

	@property
	def statistics(self):
		"""
		| Commands in total: 8
		| Subgroups: 7
		| Direct child commands: 1
		"""
		if not hasattr(self, '_statistics'):
			from .Statistics import StatisticsCls
			self._statistics = StatisticsCls(self._core, self._cmd_group)
		return self._statistics

	@property
	def vertical(self):
		"""
		| Commands in total: 4
		| Subgroups: 4
		| Direct child commands: 0
		"""
		if not hasattr(self, '_vertical'):
			from .Vertical import VerticalCls
			self._vertical = VerticalCls(self._core, self._cmd_group)
		return self._vertical

	@property
	def protocol(self):
		"""
		| Commands in total: 20
		| Subgroups: 5
		| Direct child commands: 0
		"""
		if not hasattr(self, '_protocol'):
			from .Protocol import ProtocolCls
			self._protocol = ProtocolCls(self._core, self._cmd_group)
		return self._protocol

	@property
	def pamResults(self):
		"""
		| Commands in total: 14
		| Subgroups: 5
		| Direct child commands: 0
		"""
		if not hasattr(self, '_pamResults'):
			from .PamResults import PamResultsCls
			self._pamResults = PamResultsCls(self._core, self._cmd_group)
		return self._pamResults

	@property
	def emc(self):
		"""
		| Commands in total: 7
		| Subgroups: 5
		| Direct child commands: 0
		"""
		if not hasattr(self, '_emc'):
			from .Emc import EmcCls
			self._emc = EmcCls(self._core, self._cmd_group)
		return self._emc

[docs] def clear(self, measurement=repcap.Measurement.Default, opc_timeout_ms: int = -1) -> None: """ ``MEASurement<*>:CLEar`` \n Snippet: ``driver.measurement.clear(measurement = repcap.Measurement.Default)`` \n Deletes the statistic results of the indicated mesurement. :param measurement: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Measurement') :param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call. """ measurement_cmd_val = self._cmd_group.get_repcap_cmd_value(measurement, repcap.Measurement) self._core.io.write_with_opc(f'MEASurement{measurement_cmd_val}:CLEar', opc_timeout_ms)
def clone(self) -> 'MeasurementCls': """ 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 = MeasurementCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group