Source code for rsrtx.Implementations.Trigger.FlxRay.Symbol

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

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

[docs] def set(self, symbol: enums.BusFlxraySymbol, trigger=repcap.Trigger.Default) -> None: """ ``TRIGger<*>:FLXRay:SYMBol`` \n Snippet: ``driver.trigger.flxRay.symbol.set(symbol = enums.BusFlxraySymbol.CASMts, trigger = repcap.Trigger.Default)`` \n Triggers on a symbol or on a wakeup pattern. :param symbol: CASMts | WAKeup \n - CASMts: Collision Avoidance Symbol / Media access Test Symbol. These symbols are identical and can be sent in the optional symbol window at the end of a communication cycle. They are used to avoid collisions during the system start. - WAKeup: The wakeup pattern is sent to activate the nodes of the system. :param trigger: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger') """ param = Conversions.enum_scalar_to_str(symbol, enums.BusFlxraySymbol) trigger_cmd_val = self._cmd_group.get_repcap_cmd_value(trigger, repcap.Trigger) self._core.io.write(f'TRIGger{trigger_cmd_val}:FLXRay:SYMBol {param}')
# noinspection PyTypeChecker
[docs] def get(self, trigger=repcap.Trigger.Default) -> enums.BusFlxraySymbol: """ ``TRIGger<*>:FLXRay:SYMBol`` \n Snippet: ``value: enums.BusFlxraySymbol = driver.trigger.flxRay.symbol.get(trigger = repcap.Trigger.Default)`` \n Triggers on a symbol or on a wakeup pattern. :param trigger: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger') :return: symbol: CASMts | WAKeup \n - CASMts: Collision Avoidance Symbol / Media access Test Symbol. These symbols are identical and can be sent in the optional symbol window at the end of a communication cycle. They are used to avoid collisions during the system start. - WAKeup: The wakeup pattern is sent to activate the nodes of the system. """ trigger_cmd_val = self._cmd_group.get_repcap_cmd_value(trigger, repcap.Trigger) response = self._core.io.query_str(f'TRIGger{trigger_cmd_val}:FLXRay:SYMBol?') return Conversions.str_to_scalar_enum(response, enums.BusFlxraySymbol)