Source code for RsSmw.Implementations.Source.Regenerator.Diagram

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


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

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

	# noinspection PyTypeChecker
[docs] def get_type_py(self) -> enums.RegPrevDiagrType: """ ``[SOURce<HW>]:REGenerator:DIAGram:TYPE`` \n Snippet: ``value: enums.RegPrevDiagrType = driver.source.regenerator.diagram.get_type_py()`` \n Sets the diagram type. :return: type_py: VELocity | POWer """ response = self._core.io.query_str('SOURce<HwInstance>:REGenerator:DIAGram:TYPE?') return Conversions.str_to_scalar_enum(response, enums.RegPrevDiagrType)
[docs] def set_type_py(self, type_py: enums.RegPrevDiagrType) -> None: """ ``[SOURce<HW>]:REGenerator:DIAGram:TYPE`` \n Snippet: ``driver.source.regenerator.diagram.set_type_py(type_py = enums.RegPrevDiagrType.POLar)`` \n Sets the diagram type. :param type_py: VELocity | POWer """ param = Conversions.enum_scalar_to_str(type_py, enums.RegPrevDiagrType) self._core.io.write(f'SOURce<HwInstance>:REGenerator:DIAGram:TYPE {param}')