Source code for rsrtx.Implementations.Mtest.Ctype

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 CtypeCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

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

[docs] def set(self, mask_test: str, definition_type: enums.MeasDefinitionType) -> None: """ ``MTESt:CTYPe`` \n Snippet: ``driver.mtest.ctype.set(mask_test = 'abc', definition_type = enums.MeasDefinitionType.EYEMask)`` \n Sets the method of mask definition. :param mask_test: String with the name of the mask test :param definition_type: USER | WFML | EYEMask | PROTocol \n - USER: The mask segments are created by entering the numerical x- and y-values of the mask points.See: 'Mask definition: user mask' - WFML: The mask is created from the envelope of an existing waveform.See: 'Mask definition: waveform mask' - EYEMask: Mask for eye diagram testing. See: 'Eye mask testing'.Requires jitter option R&S RTP-K12 """ param = ArgSingleList().compose_cmd_string(ArgSingle('mask_test', mask_test, DataType.String), ArgSingle('definition_type', definition_type, DataType.Enum, enums.MeasDefinitionType)) self._core.io.write_with_opc(f'MTESt:CTYPe {param}'.rstrip())
# noinspection PyTypeChecker
[docs] def get(self, mask_test: str) -> enums.MeasDefinitionType: """ ``MTESt:CTYPe`` \n Snippet: ``value: enums.MeasDefinitionType = driver.mtest.ctype.get(mask_test = 'abc')`` \n Sets the method of mask definition. :param mask_test: String with the name of the mask test :return: definition_type: USER | WFML | EYEMask | PROTocol \n - USER: The mask segments are created by entering the numerical x- and y-values of the mask points.See: 'Mask definition: user mask' - WFML: The mask is created from the envelope of an existing waveform.See: 'Mask definition: waveform mask' - EYEMask: Mask for eye diagram testing. See: 'Eye mask testing'.Requires jitter option R&S RTP-K12 """ param = Conversions.value_to_quoted_str(mask_test) response = self._core.io.query_str_with_opc(f'MTESt:CTYPe? {param}') return Conversions.str_to_scalar_enum(response, enums.MeasDefinitionType)