Source code for rsrtx.Implementations.Layout.Zoom

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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ZoomCls:
	"""
	| Commands in total: 23
	| Subgroups: 5
	| Direct child commands: 2
	"""

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

	@property
	def addCoupled(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_addCoupled'):
			from .AddCoupled import AddCoupledCls
			self._addCoupled = AddCoupledCls(self._core, self._cmd_group)
		return self._addCoupled

	@property
	def posCoupling(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_posCoupling'):
			from .PosCoupling import PosCouplingCls
			self._posCoupling = PosCouplingCls(self._core, self._cmd_group)
		return self._posCoupling

	@property
	def remove(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_remove'):
			from .Remove import RemoveCls
			self._remove = RemoveCls(self._core, self._cmd_group)
		return self._remove

	@property
	def horz(self):
		"""
		| Commands in total: 9
		| Subgroups: 3
		| Direct child commands: 0
		"""
		if not hasattr(self, '_horz'):
			from .Horz import HorzCls
			self._horz = HorzCls(self._core, self._cmd_group)
		return self._horz

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

	# noinspection PyTypeChecker
[docs] class AddStruct(StructBase): """ Structure for setting input parameters. Fields: \n - Node_Name: str: String with the name of diagram to be zoomed - Parent_Type: enums.LayoutParentType: The new zoom diagram is displayed below the original one. - Insert_Before: bool: Position of the zoom diagram, depending on ParentType - Xstart: int: Defines the x-value at the beginning of the zoom area. - Xstop: int: Defines the x-value at the end of the zoom area. - Ystart: int: Defines the y-value at the beginning of the zoom area. - Ystop: int: Defines the y-value at the end of the zoom area. - New_Zoom_Name: str: String with the name of the new zoom diagram. """ __meta_args_list = [ ArgStruct.scalar_str('Node_Name'), ArgStruct.scalar_enum('Parent_Type', enums.LayoutParentType), ArgStruct.scalar_bool('Insert_Before'), ArgStruct.scalar_int('Xstart'), ArgStruct.scalar_int('Xstop'), ArgStruct.scalar_int('Ystart'), ArgStruct.scalar_int('Ystop'), ArgStruct.scalar_str('New_Zoom_Name')] def __init__(self): StructBase.__init__(self, self) self.Node_Name: str=None self.Parent_Type: enums.LayoutParentType=None self.Insert_Before: bool=None self.Xstart: int=None self.Xstop: int=None self.Ystart: int=None self.Ystop: int=None self.New_Zoom_Name: str=None
[docs] def set_add(self, value: AddStruct) -> None: """ ``LAYout:ZOOM:ADD`` \n Snippet with structure: \n structure = driver.layout.zoom.AddStruct() \n structure.Node_Name: str = 'abc' \n structure.Parent_Type: enums.LayoutParentType = enums.LayoutParentType.HORizontal \n structure.Insert_Before: bool = False \n structure.Xstart: int = 1 \n structure.Xstop: int = 1 \n structure.Ystart: int = 1 \n structure.Ystop: int = 1 \n structure.New_Zoom_Name: str = 'abc' \n driver.layout.zoom.set_add(value = structure) \n Adds a new zoom diagram based on the specified waveform. For numerical values, the input of a unit is not supported for this command. :param value: see the help for AddStruct structure arguments. """ self._core.io.write_struct_with_opc('LAYout:ZOOM:ADD', value)
[docs] def get_one_diagram(self) -> bool: """ ``LAYout:ZOOM:ONEDiagram`` \n Snippet: ``value: bool = driver.layout.zoom.get_one_diagram()`` \n Shows all zooms of a diagram in one zoom window. The zoomed areas are overlaid for better comparison of the zoomed waveforms. The command takes effect on all zoom diagrams. """ response = self._core.io.query_str_with_opc('LAYout:ZOOM:ONEDiagram?') return Conversions.str_to_bool(response)
[docs] def set_one_diagram(self, shw_zm_in_one_diag: bool) -> None: """ ``LAYout:ZOOM:ONEDiagram`` \n Snippet: ``driver.layout.zoom.set_one_diagram(shw_zm_in_one_diag = False)`` \n Shows all zooms of a diagram in one zoom window. The zoomed areas are overlaid for better comparison of the zoomed waveforms. The command takes effect on all zoom diagrams. :param shw_zm_in_one_diag: OFF | ON """ param = Conversions.bool_to_str(shw_zm_in_one_diag) self._core.io.write_with_opc(f'LAYout:ZOOM:ONEDiagram {param}')
def clone(self) -> 'ZoomCls': """ 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 = ZoomCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group