Source code for rsmxo.Implementations.Zone.Area.Intersect

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

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

[docs] def set(self, intersection: enums.Intersection, zone=repcap.Zone.Default, area=repcap.Area.Default) -> None: """ ``ZONE<*>:AREA<*>:INTersect`` \n Snippet: ``driver.zone.area.intersect.set(intersection = enums.Intersection.MUST, zone = repcap.Zone.Default, area = repcap.Area.Default)`` \n Defines if the signal must intersect the zone to allow the instrument to trigger, or if it must not intersect the zone. :param intersection: MUST | NOT :param zone: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Zone') :param area: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Area') """ param = Conversions.enum_scalar_to_str(intersection, enums.Intersection) zone_cmd_val = self._cmd_group.get_repcap_cmd_value(zone, repcap.Zone) area_cmd_val = self._cmd_group.get_repcap_cmd_value(area, repcap.Area) self._core.io.write(f'ZONE{zone_cmd_val}:AREA{area_cmd_val}:INTersect {param}')
# noinspection PyTypeChecker
[docs] def get(self, zone=repcap.Zone.Default, area=repcap.Area.Default) -> enums.Intersection: """ ``ZONE<*>:AREA<*>:INTersect`` \n Snippet: ``value: enums.Intersection = driver.zone.area.intersect.get(zone = repcap.Zone.Default, area = repcap.Area.Default)`` \n Defines if the signal must intersect the zone to allow the instrument to trigger, or if it must not intersect the zone. :param zone: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Zone') :param area: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Area') :return: intersection: MUST | NOT """ zone_cmd_val = self._cmd_group.get_repcap_cmd_value(zone, repcap.Zone) area_cmd_val = self._cmd_group.get_repcap_cmd_value(area, repcap.Area) response = self._core.io.query_str(f'ZONE{zone_cmd_val}:AREA{area_cmd_val}:INTersect?') return Conversions.str_to_scalar_enum(response, enums.Intersection)