Source code for rsmxo.Implementations.Measurement.Main

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


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

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

[docs] def set(self, meas_type: enums.MeasType, measIndex=repcap.MeasIndex.Default) -> None: """ ``MEASurement<*>:MAIN`` \n Snippet: ``driver.measurement.main.set(meas_type = enums.MeasType.ACPower, measIndex = repcap.MeasIndex.Default)`` \n Defines the measurement type that is assigned to the indicated measurement. To query the result, use method ``RsMxo.measurement.result.actual.get()`` . :param meas_type: \n - Amplitude/time measurements: HIGH | LOW | AMPLitude | MAXimum | MINimum | PDELta | MEAN | RMS | STDDev | CRESt | POVershoot | NOVershoot | AREA | RTIMe | FTIMe | PPULse | NPULse | PERiod | FREQuency | PDCYcle | NDCYcle | CYCarea | CYCMean | CYCRms | CYCStddev | CYCCrest | CAMPlitude | CMAXimum | CMINimum | CPDelta | PULCnt | DELay | PHASe | BWIDth | EDGecount | SETup | HOLD | SHT | SHR | DTOTrigger | SLERising | SLEFalling - Jitter measurements: CCJitter | NCJitter | CCWidth | CCDutycycle | TIE | UINTerval | DRATe | SKWDelay | SKWPhaseRequire option R&S MXO5-K12. - Measurements on waveform histograms: WCOunt | HSAMples | HPEak | PEAK | UPEakvalue | LPEakvalue | HMAXimum | HMINimum | MEDian | MAXMin | HMEan | HSTDdev | M1STddev | M2STddev | M3STddev | MKPositive | MKNegative - Measurements for serial protocols: F2F | T2F | F2T | FLDValue | MBITrate | SBITrate | BIDLe | GAP | FCNT | FEC | FER | CFER | RSERrRequire option R&S MXO5-K500. - Eye measurements: ERPercent | ERDB | EHEight | EWIDth | ETOP | EBASe | QFACtor | RMSNoise | SNRatio | DCDistortion | ERTime | EFTime | EBRate | EAMPlitude | PPJitter | STDJitter | RMSJitter | CPPercentRequire option R&S MXO5-K136. :param measIndex: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Measurement') """ param = Conversions.enum_scalar_to_str(meas_type, enums.MeasType) measIndex_cmd_val = self._cmd_group.get_repcap_cmd_value(measIndex, repcap.MeasIndex) self._core.io.write(f'MEASurement{measIndex_cmd_val}:MAIN {param}')
# noinspection PyTypeChecker
[docs] def get(self, measIndex=repcap.MeasIndex.Default) -> enums.MeasType: """ ``MEASurement<*>:MAIN`` \n Snippet: ``value: enums.MeasType = driver.measurement.main.get(measIndex = repcap.MeasIndex.Default)`` \n Defines the measurement type that is assigned to the indicated measurement. To query the result, use method ``RsMxo.measurement.result.actual.get()`` . :param measIndex: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Measurement') :return: meas_type: \n - Amplitude/time measurements: HIGH | LOW | AMPLitude | MAXimum | MINimum | PDELta | MEAN | RMS | STDDev | CRESt | POVershoot | NOVershoot | AREA | RTIMe | FTIMe | PPULse | NPULse | PERiod | FREQuency | PDCYcle | NDCYcle | CYCarea | CYCMean | CYCRms | CYCStddev | CYCCrest | CAMPlitude | CMAXimum | CMINimum | CPDelta | PULCnt | DELay | PHASe | BWIDth | EDGecount | SETup | HOLD | SHT | SHR | DTOTrigger | SLERising | SLEFalling - Jitter measurements: CCJitter | NCJitter | CCWidth | CCDutycycle | TIE | UINTerval | DRATe | SKWDelay | SKWPhaseRequire option R&S MXO5-K12. - Measurements on waveform histograms: WCOunt | HSAMples | HPEak | PEAK | UPEakvalue | LPEakvalue | HMAXimum | HMINimum | MEDian | MAXMin | HMEan | HSTDdev | M1STddev | M2STddev | M3STddev | MKPositive | MKNegative - Measurements for serial protocols: F2F | T2F | F2T | FLDValue | MBITrate | SBITrate | BIDLe | GAP | FCNT | FEC | FER | CFER | RSERrRequire option R&S MXO5-K500. - Eye measurements: ERPercent | ERDB | EHEight | EWIDth | ETOP | EBASe | QFACtor | RMSNoise | SNRatio | DCDistortion | ERTime | EFTime | EBRate | EAMPlitude | PPJitter | STDJitter | RMSJitter | CPPercentRequire option R&S MXO5-K136. """ measIndex_cmd_val = self._cmd_group.get_repcap_cmd_value(measIndex, repcap.MeasIndex) response = self._core.io.query_str(f'MEASurement{measIndex_cmd_val}:MAIN?') return Conversions.str_to_scalar_enum(response, enums.MeasType)