Source code for rsrtx.Implementations.Trigger.Can.Symbolic.SigValue

from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from .....Internal.Utilities import trim_str_response
from ..... import repcap


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

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

[docs] def set(self, signal_name: str, trigger=repcap.Trigger.Default) -> None: """ ``TRIGger<*>:CAN:SYMBolic:SIGValue`` \n Snippet: ``driver.trigger.can.symbolic.sigValue.set(signal_name = 'abc', trigger = repcap.Trigger.Default)`` \n Sets the signal name to be triggered or searched for. The setting is used by symbolic trigger and symbolic search. Thus, you always trigger on and search for the same signal if symbolic trigger and symbolic search is used at the same time. See also: method ``RsRtx.search.trigger.can.symbolic.sigValue.set()`` :param signal_name: String with the signal name as defined in the DBC file. :param trigger: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger') """ param = Conversions.value_to_quoted_str(signal_name) trigger_cmd_val = self._cmd_group.get_repcap_cmd_value(trigger, repcap.Trigger) self._core.io.write(f'TRIGger{trigger_cmd_val}:CAN:SYMBolic:SIGValue {param}')
[docs] def get(self, trigger=repcap.Trigger.Default) -> str: """ ``TRIGger<*>:CAN:SYMBolic:SIGValue`` \n Snippet: ``value: str = driver.trigger.can.symbolic.sigValue.get(trigger = repcap.Trigger.Default)`` \n Sets the signal name to be triggered or searched for. The setting is used by symbolic trigger and symbolic search. Thus, you always trigger on and search for the same signal if symbolic trigger and symbolic search is used at the same time. See also: method ``RsRtx.search.trigger.can.symbolic.sigValue.set()`` :param trigger: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger') :return: signal_name: String with the signal name as defined in the DBC file. """ trigger_cmd_val = self._cmd_group.get_repcap_cmd_value(trigger, repcap.Trigger) response = self._core.io.query_str(f'TRIGger{trigger_cmd_val}:CAN:SYMBolic:SIGValue?') return trim_str_response(response)