Source code for rsrtx.Implementations.Layout.Add

from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal.Types import DataType
from ...Internal.ArgSingleList import ArgSingleList
from ...Internal.ArgSingle import ArgSingle
from ... import enums


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

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

[docs] def set(self, node_name: str, parent_type: enums.LayoutParentType, insert_before: bool, first_source: enums.SignalSource, diagram_name: str) -> None: """ ``LAYout:ADD`` \n Snippet: ``driver.layout.add.set(node_name = 'abc', parent_type = enums.LayoutParentType.HORizontal, insert_before = False, first_source = enums.SignalSource.AJ1, diagram_name = 'abc')`` \n Adds a new diagram with a waveform on the screen, in relation to an existing diagram. :param node_name: String with the name of the existing diagram :param parent_type: Position of the new diagram in relation to the existing one. \n - HORizontal: Besides the existing diagram - VERTical: Above or below the existing diagram - TAB: In a new tab in the existing diagram :param insert_before: If on, the new diagram is inserted to the left (for HORizontal) , above (for VERTical) or in a tab in front the existing diagram. HOR, ON = left to the existing diagram, defined in NodeName HOR, OFF = right to the existing diagram VERT, ON = above the existing diagram VERT, OFF = below the existing diagram :param first_source: Waveform to be displayed in the new diagram, see 'Waveform parameter'. Spectrum analysis, option R&S RTO6-K37: Spectrograms and timeline spectrums are automatically displayed in their own diagrams. Eye diagram analysis with option R&S RTO6-K91: Eye diagrams are automatically displayed in their own diagrams. TDR/TDT analysis with option R&S RTO6-K130: Measurement waveforms are automatically displayed in their own diagrams. Advanced jitter analysis with option R&S RTO6-K133: Jitter analysis waveforms are automatically displayed in their own diagrams. Advanced noise analysis with option R&S RTO6-K134 : Noise analysis waveforms are automatically displayed in their own diagrams. :param diagram_name: String with the name of the new diagram. """ param = ArgSingleList().compose_cmd_string(ArgSingle('node_name', node_name, DataType.String), ArgSingle('parent_type', parent_type, DataType.Enum, enums.LayoutParentType), ArgSingle('insert_before', insert_before, DataType.Boolean), ArgSingle('first_source', first_source, DataType.Enum, enums.SignalSource), ArgSingle('diagram_name', diagram_name, DataType.String)) self._core.io.write_with_opc(f'LAYout:ADD {param}'.rstrip())