Source code for rsmxo.Implementations.Display.Annotation.Arrow.Direction

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

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

[docs] def set(self, type_py: enums.TypePy, annotation=repcap.Annotation.Default) -> None: """ ``DISPlay:ANNotation:ARRow<*>:DIRection`` \n Snippet: ``driver.display.annotation.arrow.direction.set(type_py = enums.TypePy.BLEFt, annotation = repcap.Annotation.Default)`` \n Sets the direction of the indicated arrow annotation from starting point to arrow tip. :param type_py: TLEFt: to top left TRIGht: to top right BLEFt: to bottom left BRIGht: to bottom right :param annotation: optional repeated capability selector. Default value: Ix1 (settable in the interface 'Annotation') """ param = Conversions.enum_scalar_to_str(type_py, enums.TypePy) annotation_cmd_val = self._cmd_group.get_repcap_cmd_value(annotation, repcap.Annotation) self._core.io.write(f'DISPlay:ANNotation:ARRow{annotation_cmd_val}:DIRection {param}')
# noinspection PyTypeChecker
[docs] def get(self, annotation=repcap.Annotation.Default) -> enums.TypePy: """ ``DISPlay:ANNotation:ARRow<*>:DIRection`` \n Snippet: ``value: enums.TypePy = driver.display.annotation.arrow.direction.get(annotation = repcap.Annotation.Default)`` \n Sets the direction of the indicated arrow annotation from starting point to arrow tip. :param annotation: optional repeated capability selector. Default value: Ix1 (settable in the interface 'Annotation') :return: type_py: TLEFt: to top left TRIGht: to top right BLEFt: to bottom left BRIGht: to bottom right """ annotation_cmd_val = self._cmd_group.get_repcap_cmd_value(annotation, repcap.Annotation) response = self._core.io.query_str(f'DISPlay:ANNotation:ARRow{annotation_cmd_val}:DIRection?') return Conversions.str_to_scalar_enum(response, enums.TypePy)